aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/datetime-service.c6
-rw-r--r--src/indicator-datetime.c7
2 files changed, 6 insertions, 7 deletions
diff --git a/src/datetime-service.c b/src/datetime-service.c
index 13dc057..62fa435 100644
--- a/src/datetime-service.c
+++ b/src/datetime-service.c
@@ -551,7 +551,7 @@ update_appointment_menu_items (gpointer user_data)
GSList *g;
GError *gerror = NULL;
gint i;
- gint width, height;
+ gint width = 0, height = 0;
ESourceList * sources = NULL;
if (start_time_appointments > 0)
@@ -621,9 +621,7 @@ update_appointment_menu_items (gpointer user_data)
}
}
- gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &width, &height);
- // Sometimes these give negative numbers, sometimes large numbers which look like timestamps
- // is there a buffer overwrite causing it?
+ gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &width, &height);
if (width <= 0) width = 12;
if (height <= 0) height = 12;
if (width > 30) width = 12;
diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c
index cf61d25..6f69dac 100644
--- a/src/indicator-datetime.c
+++ b/src/indicator-datetime.c
@@ -762,7 +762,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();
@@ -1103,9 +1103,10 @@ 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)) {
- gint *array = g_variant_get_fixed_array(value, 3, sizeof(gint));
+ gsize size = 3;
+ const gint * array = g_variant_get_fixed_array(value, &size, 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]);
+ 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);
}