aboutsummaryrefslogtreecommitdiff
path: root/src/indicator-datetime.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-03-16 16:07:34 -0500
committerTed Gould <ted@gould.cx>2011-03-16 16:07:34 -0500
commitb9470a568ec5c149f64362a0e3f243c38fcc5ec8 (patch)
treecaa35fe576b75f7b6ed613b4c1da22ea3b8d74dc /src/indicator-datetime.c
parent9f4692c75d64a4ed46584420170445935a0709ae (diff)
parent5df5bfccdadeeceb31d8e13244e02bc01af557d5 (diff)
downloadayatana-indicator-datetime-b9470a568ec5c149f64362a0e3f243c38fcc5ec8.tar.gz
ayatana-indicator-datetime-b9470a568ec5c149f64362a0e3f243c38fcc5ec8.tar.bz2
ayatana-indicator-datetime-b9470a568ec5c149f64362a0e3f243c38fcc5ec8.zip
New upstream release.
∘ Make appointments match calendar month ∘ Fix time format of appointments ∘ Get date change signals from calendar and adjust based on them. ∘ Crash fixes (LP: #733833, LP: #729444) ∘ Valgrind invalid read (LP: #729175) ∘ Translation fixes to date label (LP: #729632)
Diffstat (limited to 'src/indicator-datetime.c')
-rw-r--r--src/indicator-datetime.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c
index 83ae161..1cdcd3f 100644
--- a/src/indicator-datetime.c
+++ b/src/indicator-datetime.c
@@ -813,7 +813,7 @@ setup_timer (IndicatorDatetime * self, GDateTime * datetime)
if (self->priv->show_seconds ||
(self->priv->time_mode == SETTINGS_TIME_CUSTOM && self->priv->custom_show_seconds)) {
- self->priv->timer = g_timeout_add_seconds(1, timer_func, self);
+ self->priv->timer = g_timeout_add_full(G_PRIORITY_HIGH, 865, timer_func, self, NULL);
} else {
if (datetime == NULL) {
datetime = g_date_time_new_now_local();
@@ -1154,9 +1154,9 @@ indicator_prop_change_cb (DbusmenuMenuitem * mi, gchar * prop, GVariant *value,
} else if (!g_strcmp0(prop, CALENDAR_MENUITEM_PROP_CLEAR_MARKS)) {
ido_calendar_menu_item_clear_marks (IDO_CALENDAR_MENU_ITEM (mi_data));
} else if (!g_strcmp0(prop, CALENDAR_MENUITEM_PROP_SET_DATE)) {
- // const gint * array = g_variant_get_fixed_array(value, NULL, sizeof(gint));
- // TODO: Needs ido branch merged - lp:~karl-qdh/ido/select-activate-set-date
- // ido_calendar_menu_item_set_date (IDO_CALENDAR_MENU_ITEM (mi_data), array[0], array[1], array[2]);
+ gsize size = 3;
+ const gint * array = g_variant_get_fixed_array(value, &size, sizeof(gint));
+ ido_calendar_menu_item_set_date (IDO_CALENDAR_MENU_ITEM (mi_data), array[0], array[1], array[2]);
} else {
g_warning("Indicator Item property '%s' unknown", prop);
}
@@ -1257,13 +1257,10 @@ month_changed_cb (IdoCalendarMenuItem *ido,
guint timestamp = (guint)time(NULL);
dbusmenu_menuitem_handle_event(DBUSMENU_MENUITEM(item), "month-changed", variant, timestamp);
}
-
-// TODO: Needs ido branch merged - lp:~karl-qdh/ido/select-activate-set-date
-/*
+
static void
day_selected_cb (IdoCalendarMenuItem *ido,
- guint day,
- gpointer user_data)
+ gpointer user_data)
{
guint d,m,y;
DbusmenuMenuitem * item = DBUSMENU_MENUITEM (user_data);
@@ -1281,7 +1278,6 @@ day_selected_cb (IdoCalendarMenuItem *ido,
static void
day_selected_double_click_cb (IdoCalendarMenuItem *ido,
- guint day,
gpointer user_data)
{
guint d,m,y;
@@ -1297,8 +1293,6 @@ day_selected_double_click_cb (IdoCalendarMenuItem *ido,
guint timestamp = (guint)time(NULL);
dbusmenu_menuitem_handle_event(DBUSMENU_MENUITEM(item), "day-selected-double-click", variant, timestamp);
}
-*/
-
static gboolean
new_calendar_item (DbusmenuMenuitem * newitem,
@@ -1333,10 +1327,8 @@ new_calendar_item (DbusmenuMenuitem * newitem,
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);
-
- // TODO: Needs ido branch merged - lp:~karl-qdh/ido/select-activate-set-date
- /*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_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);
return TRUE;
}