Author: juha
Date: 2008-11-01 05:09:32 +0000 (Sat, 01 Nov 2008)
New Revision: 28546

Modified:
   xfcalendar/trunk/panel-plugin/orageclock.c
Log:
fixed panel plugin clock bug where time was not properly refreshed
causing clock to show wrong time.


Modified: xfcalendar/trunk/panel-plugin/orageclock.c
===================================================================
--- xfcalendar/trunk/panel-plugin/orageclock.c  2008-11-01 00:31:10 UTC (rev 
28545)
+++ xfcalendar/trunk/panel-plugin/orageclock.c  2008-11-01 05:09:32 UTC (rev 
28546)
@@ -128,6 +128,7 @@
     oc_get_time(clock);
     time(&t);
     localtime_r(&t, &clock->now);
+    g_message("oc_start_timer: %d:%d:%d", clock->now.tm_hour, 
clock->now.tm_min, clock->now.tm_sec);
     if (clock->interval >= 60000) {
         if (clock->interval >= 3600000) /* match to next full hour */
             delay_time = (clock->interval -
@@ -153,10 +154,10 @@
         /* let's run it once in case we happened to kill it
            just when it was supposed to start */
             oc_get_time(clock); 
-        return(FALSE);
+        return(TRUE);
     }
     else
-        return(TRUE);
+        return(FALSE);
 }
 
 static void oc_end_tuning(Clock *clock)
@@ -167,9 +168,9 @@
         g_source_remove(clock->adjust_timeout_id);
         clock->adjust_timeout_id = 0;
     }
-    if (clock->interval >= 60000) { /* resync it after each 6 hours */
+    if (clock->interval >= 60000) { /* resync it after each 4 hours */
         clock->adjust_timeout_id = g_timeout_add_full(G_PRIORITY_DEFAULT_IDLE
-                , 6*60*60*1000, (GSourceFunc)oc_start_timer, clock, NULL);
+                , 4*60*60*1000, (GSourceFunc)oc_start_timer, clock, NULL);
     }
     g_free(clock->tune);
     clock->tune = NULL;

_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to