diff options
author | Matthias Clasen <maclas@gmx.de> | 2004-07-04 05:31:45 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2004-07-04 05:31:45 +0000 |
commit | fd10968b1237065726bd1154acf201670732568f (patch) | |
tree | c1e764e8f2dbb2821b8e596a912dc3c0cfee274d /gtk/gtkcalendar.c | |
parent | b98e17c85088757547a38268818597eaf03028ef (diff) | |
download | gtk+-fd10968b1237065726bd1154acf201670732568f.tar.gz |
Fix off-by-one error. GDate month is one-based and GtkCalendar month is
Sun Jul 4 01:29:35 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcalendar.c (gtk_calendar_drag_data_get):
(gtk_calendar_drag_data_received): Fix off-by-one error.
GDate month is one-based and GtkCalendar month is zero-based.
(#145134, William Jon McCann)
Diffstat (limited to 'gtk/gtkcalendar.c')
-rw-r--r-- | gtk/gtkcalendar.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c index 331f3fe4bc..e0fdef80fd 100644 --- a/gtk/gtkcalendar.c +++ b/gtk/gtkcalendar.c @@ -3389,7 +3389,7 @@ gtk_calendar_drag_data_get (GtkWidget *widget, gchar str[128]; gsize len; - date = g_date_new_dmy (calendar->selected_day, calendar->month, calendar->year); + date = g_date_new_dmy (calendar->selected_day, calendar->month + 1, calendar->year); len = g_date_strftime (str, 127, "%x", date); gtk_selection_data_set_text (selection_data, str, len); @@ -3550,7 +3550,7 @@ gtk_calendar_drag_data_received (GtkWidget *widget, g_object_freeze_notify (G_OBJECT (calendar)); if (!(calendar->display_flags & GTK_CALENDAR_NO_MONTH_CHANGE) && (calendar->display_flags & GTK_CALENDAR_SHOW_HEADING)) - gtk_calendar_select_month (calendar, month, year); + gtk_calendar_select_month (calendar, month - 1, year); gtk_calendar_select_day (calendar, day); g_object_thaw_notify (G_OBJECT (calendar)); } |