aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamon Chaplin <damon@ximian.com>2001-07-25 06:38:57 +0800
committerDamon Chaplin <damon@src.gnome.org>2001-07-25 06:38:57 +0800
commitb6d9682a8944b7cad5f4efcdf68494481a9b6420 (patch)
tree42fa0fbaffc8436664108e3aab44c11018b9e5d9
parent96a9eafc7290ef276d2f0559d20cc2f1057c4231 (diff)
downloadgsoc2013-evolution-b6d9682a8944b7cad5f4efcdf68494481a9b6420.tar.gz
gsoc2013-evolution-b6d9682a8944b7cad5f4efcdf68494481a9b6420.tar.zst
gsoc2013-evolution-b6d9682a8944b7cad5f4efcdf68494481a9b6420.zip
don't show the year in the popup submenu for the months, and center the
2001-07-24 Damon Chaplin <damon@ximian.com> * 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
-rw-r--r--widgets/misc/ChangeLog6
-rw-r--r--widgets/misc/e-calendar-item.c13
2 files changed, 15 insertions, 4 deletions
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 <damon@ximian.com>
+
+ * 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 <fejj@ximian.com>
* 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 <gtk/gtkmain.h>
#include <gtk/gtkmenu.h>
#include <gtk/gtkmenuitem.h>
+#include <gtk/gtklabel.h>
#include <gtk/gtksignal.h>
#include <libgnome/gnome-defs.h>
#include <libgnome/gnome-i18n.h>
@@ -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));