[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-usability
Subject:    Re: Clock and timezone
From:       "Aaron J. Seigo" <aseigo () kde ! org>
Date:       2004-07-26 6:13:53
Message-ID: 200407260013.54126.aseigo () kde ! org
[Download RAW message or body]

On Sunday 25 July 2004 01:48, GĂ©rard Delafond wrote:
> Agree ?

see, and pls test, attached patch... i can't test ATM due to my generally 
breaking kicker ATM. i know it compiles, but who knows about the 
functionality ;-)

this can't go into 3.3 due to string freeze, but can make it into the next 
release =)

(p.s. fish rocks. i attached the patch on my "general use" box from my "devel, 
ripped to shreds box" via fish:// in KMail's add attachment dialog. damn!)

-- 
Aaron J. Seigo
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

["clockapplet_showtzintip.diff" (text/x-diff)]

Index: clock.cpp
===================================================================
RCS file: /home/kde/kdebase/kicker/applets/clock/clock.cpp,v
retrieving revision 1.177
diff -u -3 -d -p -r1.177 clock.cpp
--- clock.cpp	1 Jul 2004 15:54:27 -0000	1.177
+++ clock.cpp	26 Jul 2004 06:12:49 -0000
@@ -1359,15 +1359,23 @@ ClockAppletToolTip::ClockAppletToolTip( 
 
 void ClockAppletToolTip::maybeTip( const QPoint & /*point*/ )
 {
+    QString tipText;
     if (m_clock->type() == Prefs::EnumType::Fuzzy)
     {
         // show full time (incl. hour) as tooltip for Fuzzy clock
-        tip(m_clock->geometry(), \
KGlobal::locale()->formatDateTime(QDateTime::currentDateTime().addSecs(m_clock->TZoffset), \
false)); +        tipText = \
KGlobal::locale()->formatDateTime(QDateTime::currentDateTime().addSecs(m_clock->TZoffset));  }
     else
     {
-        tip(m_clock->geometry(), KGlobal::locale()->formatDate(m_clock->clockGetDate(), \
false)); +        tipText = KGlobal::locale()->formatDate(m_clock->clockGetDate());
+    }
+
+    if (m_clock->timezones() && m_clock->timezones()->zoneIndex() > 0)
+    {
+        tipText += "\n" + i18n("Showing time for %1").arg(m_clock->timezones()->zone());
     }
+
+    tip(m_clock->geometry(), tipText, false);
 }
 
 //************************************************************
Index: clock.h
===================================================================
RCS file: /home/kde/kdebase/kicker/applets/clock/clock.h,v
retrieving revision 1.46
diff -u -3 -d -p -r1.46 clock.h
--- clock.h	17 Feb 2004 23:44:57 -0000	1.46
+++ clock.h	26 Jul 2004 06:12:49 -0000
@@ -288,6 +288,7 @@ public:
 	int type();
 	Orientation getOrientation()    { return orientation(); }
 	void resizeRequest()            { emit(updateLayout()); }
+	const Zone* timezones()            { return zone; }
 
 	int TZoffset;
 	QTime clockGetTime();
Index: zone.h
===================================================================
RCS file: /home/kde/kdebase/kicker/applets/clock/zone.h,v
retrieving revision 1.1
diff -u -3 -d -p -r1.1 zone.h
--- zone.h	5 Jun 2003 19:31:41 -0000	1.1
+++ zone.h	26 Jul 2004 06:12:49 -0000
@@ -41,7 +41,7 @@ public:
 	QString zone(int z) const;
 	QStringList remoteZoneList() const { return _remotezonelist; };
 	int remoteZoneCount() { return _remotezonelist.count(); };
-	unsigned int zoneIndex() { return _zoneIndex; }
+	unsigned int zoneIndex() const { return _zoneIndex; }
 	void resetZone(int z=0) { _zoneIndex = z; }
 	
 	void nextZone();



_______________________________________________
kde-usability mailing list
kde-usability@kde.org
https://mail.kde.org/mailman/listinfo/kde-usability


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic