ayatana-commits team mailing list archive
-
ayatana-commits team
-
Mailing list archive
-
Message #03997
[Merge] lp:~jjardon/indicator-datetime/fix-740977 into lp:indicator-datetime
Javier Jardón has proposed merging lp:~jjardon/indicator-datetime/fix-740977 into lp:indicator-datetime.
Requested reviews:
Indicator Applet Developers (indicator-applet-developers)
Related bugs:
Bug #740977 in Indicator Date and Time: "Event added in Evolution doesn't appear in the menu immediately"
https://bugs.launchpad.net/indicator-datetime/+bug/740977
For more details, see:
https://code.launchpad.net/~jjardon/indicator-datetime/fix-740977/+merge/78342
--
https://code.launchpad.net/~jjardon/indicator-datetime/fix-740977/+merge/78342
Your team ayatana-commits is subscribed to branch lp:indicator-datetime.
=== modified file 'src/datetime-service.c'
--- src/datetime-service.c 2011-09-29 19:57:50 +0000
+++ src/datetime-service.c 2011-10-06 02:58:24 +0000
@@ -426,41 +426,12 @@
return TRUE;
}
-static guint ecaltimer = 0;
-
-static void
-start_ecal_timer(void)
-{
- if (ecaltimer != 0) {
- g_source_remove(ecaltimer);
- ecaltimer = 0;
- }
- if (update_appointment_menu_items(NULL))
- ecaltimer = g_timeout_add_seconds(60*5, update_appointment_menu_items, NULL);
-}
-
-static void
-stop_ecal_timer(void)
-{
- if (ecaltimer != 0) {
- g_source_remove(ecaltimer);
- ecaltimer = 0;
- }
-}
-static gboolean
-idle_start_ecal_timer (gpointer data)
-{
- start_ecal_timer();
- return FALSE;
-}
-
static void
show_events_changed (void)
{
if (g_settings_get_boolean(conf, SETTINGS_SHOW_EVENTS_S)) {
dbusmenu_menuitem_property_set_bool(add_appointment, DBUSMENU_MENUITEM_PROP_VISIBLE, TRUE);
dbusmenu_menuitem_property_set_bool(events_separator, DBUSMENU_MENUITEM_PROP_VISIBLE, TRUE);
- start_ecal_timer();
} else {
dbusmenu_menuitem_property_set_bool(add_appointment, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
dbusmenu_menuitem_property_set_bool(events_separator, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
@@ -475,7 +446,6 @@
dbusmenu_menuitem_property_set_bool(DBUSMENU_MENUITEM(litem), DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
}
}
- stop_ecal_timer();
}
}
@@ -508,11 +478,9 @@
if (g_settings_get_boolean(conf, SETTINGS_SHOW_EVENTS_S)) {
dbusmenu_menuitem_property_set_bool(add_appointment, DBUSMENU_MENUITEM_PROP_VISIBLE, TRUE);
dbusmenu_menuitem_property_set_bool(events_separator, DBUSMENU_MENUITEM_PROP_VISIBLE, TRUE);
- g_idle_add((GSourceFunc)idle_start_ecal_timer, NULL);
} else {
dbusmenu_menuitem_property_set_bool(add_appointment, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
dbusmenu_menuitem_property_set_bool(events_separator, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
- stop_ecal_timer();
}
// Connect to calendar events
Follow ups