From 042704ddd3f26ef3becbe000547564127694c069 Mon Sep 17 00:00:00 2001 From: Gediminas Paulauskas Date: Mon, 2 Apr 2001 03:59:11 +0000 Subject: Blessed by Ettore. Guided by Jacub Stener's mail, where he explaned which icons were renamed or added, I added a bunch of new icons to menus, fixed renamed ones. Changed Trash and Executive summary folder type icons. Fixed art/Makefile.am for these changes. Also, pulled icon cache from mailer and moved it to e-util/e-gui-utils.h, made all components and dialogs use cache and not load pixmaps every time. Accidentally got a couple of includes fix in, but they won't break anything. svn path=/trunk/; revision=9092 --- calendar/gui/calendar-commands.c | 62 ++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 37 deletions(-) (limited to 'calendar/gui/calendar-commands.c') diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c index e60f381f47..029e417b2e 100644 --- a/calendar/gui/calendar-commands.c +++ b/calendar/gui/calendar-commands.c @@ -32,11 +32,17 @@ #include #include #include -#include + #include +#include +#include +#include + +#include +#include +#include #include #include -#include #include #include #include "calendar-commands.h" @@ -44,7 +50,7 @@ #include "goto.h" #include "print.h" #include "dialogs/cal-prefs-dialog.h" - +#include "e-util/e-gui-utils.h" /* A list of all of the calendars started */ static GList *all_calendars = NULL; @@ -372,40 +378,22 @@ static BonoboUIVerb verbs [] = { BONOBO_UI_VERB_END }; -static void -set_pixmap (BonoboUIComponent *uic, - const char *xml_path, - const char *icon) +static EPixmap pixmaps [] = { - char *path; - GdkPixbuf *pixbuf; - - path = g_concat_dir_and_file (EVOLUTION_DATADIR "/images/evolution", icon); - - pixbuf = gdk_pixbuf_new_from_file (path); - if (pixbuf == NULL) { - g_warning ("Cannot load image -- %s", path); - g_free (path); - return; - } - - bonobo_ui_util_set_pixbuf (uic, xml_path, pixbuf); - - gdk_pixbuf_unref (pixbuf); - - g_free (path); -} - -static void -update_pixmaps (BonoboUIComponent *uic) -{ - set_pixmap (uic, "/Toolbar/New", "buttons/new_appointment.png"); - - set_pixmap (uic, "/Toolbar/DayView", "buttons/dayview.xpm"); - set_pixmap (uic, "/Toolbar/WorkWeekView", "buttons/workweekview.xpm"); - set_pixmap (uic, "/Toolbar/WeekView", "buttons/weekview.xpm"); - set_pixmap (uic, "/Toolbar/MonthView", "buttons/monthview.xpm"); -} + E_PIXMAP ("/menu/File/New/NewFirstItem/CalendarNew", "new_appointment.xpm"), + E_PIXMAP ("/menu/File/Print/Print", "print.xpm"), + E_PIXMAP ("/menu/File/Print/Print Preview", "print-preview.xpm"), + E_PIXMAP ("/menu/Actions/Component/CalendarNew", "new_appointment.xpm"), + E_PIXMAP ("/menu/Tools/Component/CalendarPreferences", "configure_16_calendar.xpm"), + E_PIXMAP ("/Toolbar/New", "buttons/new_appointment.png"), + + E_PIXMAP ("/Toolbar/DayView", "buttons/dayview.xpm"), + E_PIXMAP ("/Toolbar/WorkWeekView", "buttons/workweekview.xpm"), + E_PIXMAP ("/Toolbar/WeekView", "buttons/weekview.xpm"), + E_PIXMAP ("/Toolbar/MonthView", "buttons/monthview.xpm"), + + E_PIXMAP_END +}; void calendar_control_activate (BonoboControl *control, @@ -446,7 +434,7 @@ calendar_control_activate (BonoboControl *control, "evolution-calendar.xml", "evolution-calendar"); - update_pixmaps (uic); + e_pixmaps_update (uic, pixmaps); bonobo_ui_component_thaw (uic, NULL); } -- cgit v1.2.3