[mythtv] [PATCH] OSD timeformat internationalization, better way
Leandro Dardini
ldardini at tiscali.it
Tue Jan 27 16:31:59 EST 2004
Instead of withdraw the possibility for theme developer to customize their
own timeformat, I propose the following patch to allow the theme developer
to give the user the ability to customize the timeformat through settings,
simply using BYSETTINGS as timeformat.
Thank you
Leandro
-------------- next part --------------
Index: libs/libmythtv/osd.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/osd.cpp,v
retrieving revision 1.92
diff -b -u -2 -r1.92 osd.cpp
--- libs/libmythtv/osd.cpp 25 Jan 2004 01:37:50 -0000 1.92
+++ libs/libmythtv/osd.cpp 27 Jan 2004 21:28:32 -0000
@@ -927,4 +927,6 @@
{
timeFormat = getFirstText(e);
+ if (timeFormat.upper() == "BYSETTINGS")
+ timeFormat = gContext->GetSetting("TimeFormat", "h:mm AP");
}
else if (e.tagName() == "fadeaway")
Index: themes/blueosd/osd.xml
===================================================================
RCS file: /var/lib/mythcvs/mythtv/themes/blueosd/osd.xml,v
retrieving revision 1.6
diff -b -u -2 -r1.6 osd.xml
--- themes/blueosd/osd.xml 8 Nov 2003 21:04:31 -0000 1.6
+++ themes/blueosd/osd.xml 27 Jan 2004 21:28:34 -0000
@@ -1,5 +1,5 @@
<mythosdtheme>
- <timeformat>h:mm ap</timeformat>
+ <timeformat>BYSETTINGS</timeformat>
<fadeaway>30</fadeaway>
Index: themes/defaultosd/osd.xml
===================================================================
RCS file: /var/lib/mythcvs/mythtv/themes/defaultosd/osd.xml,v
retrieving revision 1.10
diff -b -u -2 -r1.10 osd.xml
--- themes/defaultosd/osd.xml 9 Nov 2003 23:05:23 -0000 1.10
+++ themes/defaultosd/osd.xml 27 Jan 2004 21:28:35 -0000
@@ -1,5 +1,5 @@
<mythosdtheme>
- <timeformat>hh:mm</timeformat>
+ <timeformat>BYSETTINGS</timeformat>
<fadeaway>30</fadeaway>
More information about the mythtv-dev
mailing list