aboutsummaryrefslogtreecommitdiff
path: root/src/datetime-service.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-04-12 22:32:18 -0500
committerTed Gould <ted@gould.cx>2011-04-12 22:32:18 -0500
commit6e96a11fa4adf17f5a439d8dd6a20f59eb679e42 (patch)
tree45598d4cf7f260eb4c90bea1753b6c21a8846688 /src/datetime-service.c
parentd4dc8fa632a432ec7255459122f577eddd6b8978 (diff)
parent8603d94b5950329aeb81bcf255fe7f4173eaf6c3 (diff)
downloadayatana-indicator-datetime-6e96a11fa4adf17f5a439d8dd6a20f59eb679e42.tar.gz
ayatana-indicator-datetime-6e96a11fa4adf17f5a439d8dd6a20f59eb679e42.tar.bz2
ayatana-indicator-datetime-6e96a11fa4adf17f5a439d8dd6a20f59eb679e42.zip
* Upstream Merge
* Use GTK directly for detecting when the menu appears and disappears to reset the date (LP: #649800) * Handle items being removed from the locations list by choosing another item in the list (LP: #740948)
Diffstat (limited to 'src/datetime-service.c')
-rw-r--r--src/datetime-service.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/datetime-service.c b/src/datetime-service.c
index df37b5e..08b352a 100644
--- a/src/datetime-service.c
+++ b/src/datetime-service.c
@@ -440,28 +440,6 @@ day_selected_double_click_cb (DbusmenuMenuitem * menuitem, gchar *name, GVariant
return TRUE;
}
-static gboolean
-close_menu_cb (DbusmenuMenuitem * menuitem, gchar *name, GVariant *variant)
-{
- if (calendar == NULL) return FALSE;
- g_debug("Resetting date on menu close");
- start_time_appointments = 0;
- // TODO create a variant which will be an array of 3 ints {y,m,d}
- GVariant *date_variant;
- time_t curtime;
- struct tm *t1;
- time(&curtime);
- t1 = localtime(&curtime);
- GVariant *date[3];
- date[0] = g_variant_new_uint32(t1->tm_year + 1900);
- date[1] = g_variant_new_uint32(t1->tm_mon);
- date[2] = g_variant_new_uint32(t1->tm_mday);
- date_variant = g_variant_new_array(NULL, date, 3);
-
- dbusmenu_menuitem_property_set_variant (calendar, CALENDAR_MENUITEM_PROP_SET_DATE, date_variant);
- return TRUE;
-}
-
static guint ecaltimer = 0;
static void
@@ -1439,9 +1417,6 @@ main (int argc, char ** argv)
build_menus(root);
- // Connect to the close signal to reset the calendar date
- g_signal_connect(root, "event::closed", G_CALLBACK(close_menu_cb), NULL);
-
/* Cache the timezone */
update_current_timezone();