aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorkarl-qdh <karl@qdh.org.uk>2011-03-08 15:44:28 +0000
committerkarl-qdh <karl@qdh.org.uk>2011-03-08 15:44:28 +0000
commit7d8535da7bd004bf6aa16ea0a52d2a4052614860 (patch)
tree1e308e4d767312cb257ebb23b6556e43680c2287 /src
parentfb0dd849ffde2e04fb86f9e99d442283193b9ba9 (diff)
downloadayatana-indicator-datetime-7d8535da7bd004bf6aa16ea0a52d2a4052614860.tar.gz
ayatana-indicator-datetime-7d8535da7bd004bf6aa16ea0a52d2a4052614860.tar.bz2
ayatana-indicator-datetime-7d8535da7bd004bf6aa16ea0a52d2a4052614860.zip
Fixed calendar browsing with month-changed and removed bogus off by one error
Diffstat (limited to 'src')
-rw-r--r--src/datetime-service.c5
-rw-r--r--src/indicator-datetime.c2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/datetime-service.c b/src/datetime-service.c
index 2db414f..46b31ef 100644
--- a/src/datetime-service.c
+++ b/src/datetime-service.c
@@ -283,8 +283,9 @@ month_changed_cb (DbusmenuMenuitem * menuitem, gchar *name, GVariant *variant, g
// BLOCKED: get type, then get type as string from the variant causes segfault in glib
// TODO: * Set some globals so when we-re-run update appointment menu items it gets the right start date
// * update appointment menu items
- g_debug("Received month changed with timestamp: %d", g_variant_get_uint32(variant));
start_time_appointments = (time_t)g_variant_get_uint32(variant);
+
+ g_debug("Received month changed with timestamp: %d -> %s",(int)start_time_appointments, ctime(&start_time_appointments));
update_appointment_menu_items(NULL);
return TRUE;
}
@@ -678,7 +679,7 @@ update_appointment_menu_items (gpointer user_data)
else
strftime(right, 20, "%a %l:%M %p", due);
- g_debug("Appointment time: %s, for date", right, asctime(&due));
+ g_debug("Appointment time: %s, for date %s", right, asctime(due));
dbusmenu_menuitem_property_set (item, APPOINTMENT_MENUITEM_PROP_RIGHT, right);
// Now we pull out the URI for the calendar event and try to create a URI that'll work when we execute evolution
diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c
index 86eeed6..07be8de 100644
--- a/src/indicator-datetime.c
+++ b/src/indicator-datetime.c
@@ -1197,7 +1197,7 @@ month_changed_cb (IdoCalendarMenuItem *ido,
ido_calendar_menu_item_get_date(ido, &y, &m, &d);
struct tm date = {0};
date.tm_mday = d;
- date.tm_mon = m + 1; // Month is always off by one
+ date.tm_mon = m;
date.tm_year = y - 1900;
guint selecteddate = (guint)mktime(&date);
g_debug("Got month changed signal: %s", asctime(&date));