aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-03-30 10:43:05 -0500
committerTed Gould <ted@gould.cx>2011-03-30 10:43:05 -0500
commitce0945b155b33f862904fa4a8c05b8f4cd119ece (patch)
tree4ac219ea1f206cdb15866abf96c9ff589fb97ec0
parentb7c7b708126be12a4c73f14a7017c8118f99e10e (diff)
downloadayatana-indicator-datetime-ce0945b155b33f862904fa4a8c05b8f4cd119ece.tar.gz
ayatana-indicator-datetime-ce0945b155b33f862904fa4a8c05b8f4cd119ece.tar.bz2
ayatana-indicator-datetime-ce0945b155b33f862904fa4a8c05b8f4cd119ece.zip
Making sure to get the inital values of the calendar properties
-rw-r--r--src/indicator-datetime.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c
index 707dd24..1bd1916 100644
--- a/src/indicator-datetime.c
+++ b/src/indicator-datetime.c
@@ -1377,11 +1377,26 @@ new_calendar_item (DbusmenuMenuitem * newitem,
gtk_widget_set_visible (GTK_WIDGET (self->priv->ido_calendar), self->priv->show_calendar);
dbusmenu_gtkclient_newitem_base(DBUSMENU_GTKCLIENT(client), newitem, GTK_MENU_ITEM(ido), parent);
+
g_signal_connect_after(ido, "month-changed", G_CALLBACK(month_changed_cb), (gpointer)newitem);
g_signal_connect_after(ido, "day-selected", G_CALLBACK(day_selected_cb), (gpointer)newitem);
g_signal_connect_after(ido, "day-selected-double-click", G_CALLBACK(day_selected_double_click_cb), (gpointer)newitem);
g_signal_connect(G_OBJECT(newitem), DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED, G_CALLBACK(calendar_prop_change_cb), ido);
+
+ /* Run the current values through prop changed */
+ GVariant * propval = NULL;
+
+ propval = dbusmenu_menuitem_property_get_variant(newitem, CALENDAR_MENUITEM_PROP_MARKS);
+ if (propval != NULL) {
+ calendar_prop_change_cb(newitem, CALENDAR_MENUITEM_PROP_MARKS, propval, ido);
+ }
+
+ propval = dbusmenu_menuitem_property_get_variant(newitem, CALENDAR_MENUITEM_PROP_SET_DATE);
+ if (propval != NULL) {
+ calendar_prop_change_cb(newitem, CALENDAR_MENUITEM_PROP_SET_DATE, propval, ido);
+ }
+
return TRUE;
}