[Panel-devel] [PATCH] Displaying the timezone when the timezone is Local

Sebastian Kuegler sebas at kde.org
Sun Dec 16 22:43:47 CET 2007


On Sunday 16 December 2007 20:17:57 Aaron J. Seigo wrote:
> On Sunday 16 December 2007, Alex Merry wrote:
> > The digital clock is patched to show the real local timezone when the
> > local timezone is selected and "Show timezone" is selected.
>
> looks fine... pls commit (at least the time engine stuff.. sebas can
> probably comment on the clock thing though it looks good from here as well)

If I'm not mistaken, the clock will, with this patch, always display the 
timezone it gets from the dataEngine, it should only do that if the timezone 
== Local checkbox is ticked, otherwise, it should show the configured 
timezone (stored in m_timezone).

             if (m_showTimezone) {
-                dateString = dateString + " " + m_timezone;
+                dateString = dateString + " " + m_prettyTimezone;
                 dateString.replace("_", " ");
             }

Should be

if (m_showTimezone) {
	if (m_timezone == "Local") {
		dateString =  dateString + " " + m_timezone;
	} else {
		dateString =  dateString + " " + m_prettyTimezone;
	} 
        dateString.replace("_", " ");
}

(untested). 

Otherwise, nice solution making the dataEngine a bit smarter. Commit away :-)

> (i still find having elements in the init list of the ctor that use their
> default ctor (e.g. for empty QStrings) to be odd, but that's not my applet
> so.. whatever

/me too. Feel free to change it.
-- 
sebas

 http://www.kde.org | http://vizZzion.org |  GPG Key ID: 9119 0EF9 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 481 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20071216/015b0cff/attachment.pgp 


More information about the Panel-devel mailing list