aboutsummaryrefslogtreecommitdiff
path: root/src/datetime-service.c
diff options
context:
space:
mode:
authorkarl-qdh <karl@qdh.org.uk>2011-03-30 12:49:01 +0100
committerkarl-qdh <karl@qdh.org.uk>2011-03-30 12:49:01 +0100
commit851b7395730c2679403bc69013a9aea94584721d (patch)
treea4784968ed84bd309e2af8e6fa2dec186dc3a2bb /src/datetime-service.c
parent26fddf955899a2751b140a8c5a75f6861509b66e (diff)
downloadayatana-indicator-datetime-851b7395730c2679403bc69013a9aea94584721d.tar.gz
ayatana-indicator-datetime-851b7395730c2679403bc69013a9aea94584721d.tar.bz2
ayatana-indicator-datetime-851b7395730c2679403bc69013a9aea94584721d.zip
Made marking work when you change month, still needs more work to get it to do it on startup properly.
Diffstat (limited to 'src/datetime-service.c')
-rw-r--r--src/datetime-service.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/datetime-service.c b/src/datetime-service.c
index b0298ae..36a9a73 100644
--- a/src/datetime-service.c
+++ b/src/datetime-service.c
@@ -607,7 +607,7 @@ update_appointment_menu_items (gpointer user_data)
int days[12]={31,28,31,30,31,30,31,31,30,31,30,31};
if ((this_year % 400 == 0) || (this_year % 100 > 0 && this_year % 4 == 0)) days[1] = 29;
- int highlightdays = days[mon] - mday;
+ int highlightdays = days[mon] - mday + 1;
t1 = curtime; // By default the current time is the appointment start time.
if (start_time_appointments > 0) {
@@ -621,7 +621,7 @@ update_appointment_menu_items (gpointer user_data)
month_start.tm_mon = start_tm->tm_mon;
month_start.tm_mday = 1;
t1 = mktime(&month_start);
- highlightdays = days[mon];
+ highlightdays = days[start_month];
}
}
@@ -699,8 +699,6 @@ update_appointment_menu_items (gpointer user_data)
} else {
apt_output = SETTINGS_TIME_LOCALE;
}
- // Remove all highlights from the calendar widget
- dbusmenu_menuitem_property_set (calendar, CALENDAR_MENUITEM_PROP_CLEAR_MARKS, NULL);
GVariantBuilder markeddays;
g_variant_builder_init (&markeddays, G_VARIANT_TYPE_ARRAY);