From b6d9682a8944b7cad5f4efcdf68494481a9b6420 Mon Sep 17 00:00:00 2001 From: Damon Chaplin Date: Tue, 24 Jul 2001 22:38:57 +0000 Subject: don't show the year in the popup submenu for the months, and center the 2001-07-24 Damon Chaplin * e-calendar-item.c (e_calendar_item_show_popup_menu): don't show the year in the popup submenu for the months, and center the months. Fixes bug #4397. svn path=/trunk/; revision=11365 --- widgets/misc/ChangeLog | 6 ++++++ widgets/misc/e-calendar-item.c | 13 +++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) (limited to 'widgets') diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index b9f00712a3..7f0c9f1a01 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,9 @@ +2001-07-24 Damon Chaplin + + * e-calendar-item.c (e_calendar_item_show_popup_menu): don't show the + year in the popup submenu for the months, and center the months. + Fixes + 2001-07-18 Jeffrey Stedfast * e-filter-bar.c (rule_editor_destroyed): When the dialog gets diff --git a/widgets/misc/e-calendar-item.c b/widgets/misc/e-calendar-item.c index c5399c14f8..3872d7fb63 100644 --- a/widgets/misc/e-calendar-item.c +++ b/widgets/misc/e-calendar-item.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -2734,7 +2735,7 @@ e_calendar_item_show_popup_menu (ECalendarItem *calitem, GdkEventButton *event, gint month_offset) { - GtkWidget *menu, *submenu, *menuitem; + GtkWidget *menu, *submenu, *menuitem, *label; gint year, month; gchar buffer[64]; struct tm tmp_tm; @@ -2762,13 +2763,17 @@ e_calendar_item_show_popup_menu (ECalendarItem *calitem, tmp_tm.tm_mday = 1; tmp_tm.tm_isdst = -1; mktime (&tmp_tm); - /* This is a strftime() format. %B = Month name, %Y = Year. */ - strftime (buffer, sizeof (buffer), _("%B %Y"), &tmp_tm); + strftime (buffer, sizeof (buffer), "%B", &tmp_tm); - menuitem = gtk_menu_item_new_with_label (buffer); + menuitem = gtk_menu_item_new (); gtk_widget_show (menuitem); gtk_container_add (GTK_CONTAINER (submenu), menuitem); + label = gtk_label_new (buffer); + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_widget_show (label); + gtk_container_add (GTK_CONTAINER (menuitem), label); + gtk_object_set_data (GTK_OBJECT (menuitem), "month", GINT_TO_POINTER (month)); -- cgit