diff options
author | Rodrigo Moya <rodrigo@ximian.com> | 2003-07-24 17:47:42 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2003-07-24 17:47:42 +0800 |
commit | 4068b19a6f21ee830eeb6754144493d5e6b36036 (patch) | |
tree | d0c28c07dc0a0678b403578c43b84bc7d1550ec5 /calendar/gui | |
parent | 07632435d5ad8955b30048966bdb9582f55773eb (diff) | |
download | gsoc2013-evolution-4068b19a6f21ee830eeb6754144493d5e6b36036.tar.gz gsoc2013-evolution-4068b19a6f21ee830eeb6754144493d5e6b36036.tar.zst gsoc2013-evolution-4068b19a6f21ee830eeb6754144493d5e6b36036.zip |
added missing cases. (setup_popup_icons): new function to set up icons for
2003-07-24 Rodrigo Moya <rodrigo@ximian.com>
* gui/e-cal-view.c (on_print): added missing cases.
(setup_popup_icons): new function to set up icons for the popup menu.
(e_cal_view_create_popup_menu): call setup_popup_icons.
svn path=/trunk/; revision=21942
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/e-cal-view.c | 24 | ||||
-rw-r--r-- | calendar/gui/e-calendar-view.c | 24 |
2 files changed, 48 insertions, 0 deletions
diff --git a/calendar/gui/e-cal-view.c b/calendar/gui/e-cal-view.c index c9bfebc294..fd499ffc6a 100644 --- a/calendar/gui/e-cal-view.c +++ b/calendar/gui/e-cal-view.c @@ -24,6 +24,7 @@ #include <config.h> #include <string.h> #include <gtk/gtkinvisible.h> +#include <gtk/gtkstock.h> #include <libgnome/gnome-i18n.h> #include <gal/util/e-util.h> #include "e-util/e-dialog-utils.h" @@ -655,6 +656,11 @@ on_print (GtkWidget *widget, gpointer user_data) view_type = gnome_calendar_get_view (cal_view->priv->calendar); switch (view_type) { + case GNOME_CAL_DAY_VIEW : + print_view = PRINT_VIEW_DAY; + break; + + case GNOME_CAL_WORK_WEEK_VIEW : case GNOME_CAL_WEEK_VIEW: print_view = PRINT_VIEW_WEEK; break; @@ -984,6 +990,23 @@ free_view_popup (GtkWidget *widget, gpointer data) cal_view->priv->view_menu = NULL; } +static void +setup_popup_icons (EPopupMenu *context_menu) +{ + gint i; + + for (i = 0; context_menu[i].name; i++) { + GtkWidget *pixmap_widget = NULL; + + if (!strcmp (context_menu[i].name, _("_Print..."))) + pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_PRINT); + + if (pixmap_widget) + gtk_widget_show (pixmap_widget); + context_menu[i].pixmap_widget = pixmap_widget; + } +} + GtkMenu * e_cal_view_create_popup_menu (ECalView *cal_view) { @@ -1031,6 +1054,7 @@ e_cal_view_create_popup_menu (ECalView *cal_view) if (being_edited) disable_mask |= MASK_EDITING; + setup_popup_icons (context_menu); popup = e_popup_menu_create (context_menu, disable_mask, hide_mask, cal_view); g_signal_connect (popup, "selection-done", G_CALLBACK (free_view_popup), cal_view); diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c index c9bfebc294..fd499ffc6a 100644 --- a/calendar/gui/e-calendar-view.c +++ b/calendar/gui/e-calendar-view.c @@ -24,6 +24,7 @@ #include <config.h> #include <string.h> #include <gtk/gtkinvisible.h> +#include <gtk/gtkstock.h> #include <libgnome/gnome-i18n.h> #include <gal/util/e-util.h> #include "e-util/e-dialog-utils.h" @@ -655,6 +656,11 @@ on_print (GtkWidget *widget, gpointer user_data) view_type = gnome_calendar_get_view (cal_view->priv->calendar); switch (view_type) { + case GNOME_CAL_DAY_VIEW : + print_view = PRINT_VIEW_DAY; + break; + + case GNOME_CAL_WORK_WEEK_VIEW : case GNOME_CAL_WEEK_VIEW: print_view = PRINT_VIEW_WEEK; break; @@ -984,6 +990,23 @@ free_view_popup (GtkWidget *widget, gpointer data) cal_view->priv->view_menu = NULL; } +static void +setup_popup_icons (EPopupMenu *context_menu) +{ + gint i; + + for (i = 0; context_menu[i].name; i++) { + GtkWidget *pixmap_widget = NULL; + + if (!strcmp (context_menu[i].name, _("_Print..."))) + pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_PRINT); + + if (pixmap_widget) + gtk_widget_show (pixmap_widget); + context_menu[i].pixmap_widget = pixmap_widget; + } +} + GtkMenu * e_cal_view_create_popup_menu (ECalView *cal_view) { @@ -1031,6 +1054,7 @@ e_cal_view_create_popup_menu (ECalView *cal_view) if (being_edited) disable_mask |= MASK_EDITING; + setup_popup_icons (context_menu); popup = e_popup_menu_create (context_menu, disable_mask, hide_mask, cal_view); g_signal_connect (popup, "selection-done", G_CALLBACK (free_view_popup), cal_view); |