[haiku-commits] r41959 - haiku/trunk/src/apps/deskbar

  • From: leavengood@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 6 Jun 2011 07:02:22 +0200 (CEST)

Author: leavengood
Date: 2011-06-06 07:02:21 +0200 (Mon, 06 Jun 2011)
New Revision: 41959
Changeset: https://dev.haiku-os.org/changeset/41959

Modified:
   haiku/trunk/src/apps/deskbar/TimeView.cpp
Log:
Update the Deskbar date tooltip properly. Previously it was not updated when
the date actually changed at midnight or if the date was changed in the Time
preferences and probably other cases.


Modified: haiku/trunk/src/apps/deskbar/TimeView.cpp
===================================================================
--- haiku/trunk/src/apps/deskbar/TimeView.cpp   2011-06-06 04:38:27 UTC (rev 
41958)
+++ haiku/trunk/src/apps/deskbar/TimeView.cpp   2011-06-06 05:02:21 UTC (rev 
41959)
@@ -332,10 +332,15 @@
                        Update();
 
                strlcpy(fLastTimeStr, fTimeStr, sizeof(fLastTimeStr));
-               strlcpy(fLastDateStr, fDateStr, sizeof(fLastDateStr));
                fNeedToUpdate = true;
        }
 
+       // Update the tooltip if the date has changed
+       if (strcmp(fDateStr, fLastDateStr) != 0) {
+               strlcpy(fLastDateStr, fDateStr, sizeof(fLastDateStr));
+               SetToolTip(fDateStr);
+       }
+
        if (fNeedToUpdate) {
                fSeconds = ct->tm_sec;
                fMinute = ct->tm_min;


Other related posts:

  • » [haiku-commits] r41959 - haiku/trunk/src/apps/deskbar - leavengood