diff options
author | Gediminas Paulauskas <menesis@src.gnome.org> | 2001-04-02 11:59:11 +0800 |
---|---|---|
committer | Gediminas Paulauskas <menesis@src.gnome.org> | 2001-04-02 11:59:11 +0800 |
commit | 042704ddd3f26ef3becbe000547564127694c069 (patch) | |
tree | da06292a7ffea58469c87ef330045163b2003d89 /calendar/gui/calendar-commands.c | |
parent | 9fc545eb953a65888f3ae78703e1500d8ad9f1be (diff) | |
download | gsoc2013-evolution-042704ddd3f26ef3becbe000547564127694c069.tar gsoc2013-evolution-042704ddd3f26ef3becbe000547564127694c069.tar.gz gsoc2013-evolution-042704ddd3f26ef3becbe000547564127694c069.tar.bz2 gsoc2013-evolution-042704ddd3f26ef3becbe000547564127694c069.tar.lz gsoc2013-evolution-042704ddd3f26ef3becbe000547564127694c069.tar.xz gsoc2013-evolution-042704ddd3f26ef3becbe000547564127694c069.tar.zst gsoc2013-evolution-042704ddd3f26ef3becbe000547564127694c069.zip |
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
Diffstat (limited to 'calendar/gui/calendar-commands.c')
-rw-r--r-- | calendar/gui/calendar-commands.c | 62 |
1 files changed, 25 insertions, 37 deletions
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 <string.h> #include <ctype.h> #include <errno.h> -#include <glib.h> + #include <gdk-pixbuf/gdk-pixbuf.h> +#include <gtk/gtkfilesel.h> +#include <gtk/gtkmain.h> +#include <gtk/gtksignal.h> + +#include <libgnomeui/gnome-dialog-util.h> +#include <libgnomeui/gnome-messagebox.h> +#include <libgnomeui/gnome-stock.h> #include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> -#include <libgnomeui/gnome-messagebox.h> #include <bonobo/bonobo-ui-util.h> #include <cal-util/timeutil.h> #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); } |