aboutsummaryrefslogtreecommitdiffstats
path: root/mail/folder-browser-factory.c
diff options
context:
space:
mode:
authorGediminas Paulauskas <menesis@src.gnome.org>2001-04-02 11:59:11 +0800
committerGediminas Paulauskas <menesis@src.gnome.org>2001-04-02 11:59:11 +0800
commit042704ddd3f26ef3becbe000547564127694c069 (patch)
treeda06292a7ffea58469c87ef330045163b2003d89 /mail/folder-browser-factory.c
parent9fc545eb953a65888f3ae78703e1500d8ad9f1be (diff)
downloadgsoc2013-evolution-042704ddd3f26ef3becbe000547564127694c069.tar.gz
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 'mail/folder-browser-factory.c')
-rw-r--r--mail/folder-browser-factory.c98
1 files changed, 30 insertions, 68 deletions
diff --git a/mail/folder-browser-factory.c b/mail/folder-browser-factory.c
index 45d5a17cd7..7dbb768645 100644
--- a/mail/folder-browser-factory.c
+++ b/mail/folder-browser-factory.c
@@ -37,6 +37,8 @@
#include "mail-ops.h"
#include "mail-session.h"
+#include "e-util/e-gui-utils.h"
+
/* The FolderBrowser BonoboControls we have. */
static EList *control_list = NULL;
@@ -110,77 +112,37 @@ BonoboUIVerb verbs [] = {
BONOBO_UI_VERB_END
};
-static struct {
- const char *path;
- const char *fname;
- char *pixbuf;
-} pixcache [] = {
- { "/menu/File/Print/Print Preview", "16_print.xpm", NULL },
- { "/menu/Actions/Component/MessageMove", "16_move_message.xpm", NULL },
- { "/menu/Actions/Component/MessageReplyAll", "16_reply_to_all.xpm", NULL },
- { "/menu/Actions/Component/MessageReplySndr", "16_reply.xpm", NULL },
- { "/menu/File/Folder/FolderConfig", "16_configure_folder.xpm", NULL },
- { "/menu/Tools/Component/SetMailConfig", "16_configure_mail.xpm", NULL },
- { "/menu/Edit/MessageDelete", "delete_message.xpm", NULL },
- { "/menu/Edit/MessageUndelete", "undelete_message.xpm", NULL },
- /*{ "/menu/View/MessageHideDeleted", "hide_deleted_messages.xpm", NULL },*/
- { "/menu/View/MessageHideRead", "hide_read_messages.xpm", NULL },
- { "/menu/View/MessageHideSelected", "hide_selected_messages.xpm", NULL },
- { "/menu/View/MessageHideClear", "show_all_messages.xpm", NULL },
- { "/Toolbar/MailGet", "buttons/fetch-mail.png", NULL },
- { "/Toolbar/MailCompose", "buttons/compose-message.png", NULL },
- { "/Toolbar/Reply", "buttons/reply.png", NULL },
- { "/Toolbar/ReplyAll", "buttons/reply-to-all.png", NULL },
- { "/Toolbar/Forward", "buttons/forward.png", NULL },
- { "/Toolbar/Move", "buttons/move-message.png", NULL },
- { "/Toolbar/Copy", "buttons/copy-message.png", NULL },
- { NULL, NULL, NULL }
-};
-
-static void
-free_pixmaps (void)
-{
- int i;
+static EPixmap pixcache [] = {
+ E_PIXMAP ("/menu/File/New/NewFirstItem/MessageNew", "new-message.xpm"),
+ E_PIXMAP ("/menu/File/Folder/FolderConfig", "configure_16_folder.xpm"),
+ E_PIXMAP ("/menu/File/Print/Print", "print.xpm"),
+ E_PIXMAP ("/menu/File/Print/Print Preview", "print-preview.xpm"),
- for (i = 0; pixcache [i].path; i++)
- g_free (pixcache [i].pixbuf);
-}
+ E_PIXMAP ("/menu/Edit/MessageDelete", "delete_message.xpm"),
+ E_PIXMAP ("/menu/Edit/MessageUndelete", "undelete_message.xpm"),
-static void
-update_pixmaps (BonoboUIComponent *uic)
-{
- static int done_init = 0;
- int i;
+ /*E_PIXMAP ("/menu/View/MessageHideDeleted", "hide_deleted_messages.xpm"),*/
+ E_PIXMAP ("/menu/View/MessageHideRead", "hide_read_messages.xpm"),
+ E_PIXMAP ("/menu/View/MessageHideSelected", "hide_selected_messages.xpm"),
+ E_PIXMAP ("/menu/View/MessageHideClear", "show_all_messages.xpm"),
+ E_PIXMAP ("/menu/Actions/Component/SendReceive", "send-receive.xpm"),
+ E_PIXMAP ("/menu/Actions/Component/MessageMove", "move_message.xpm"),
+ E_PIXMAP ("/menu/Actions/Component/MessageReplyAll", "reply_to_all.xpm"),
+ E_PIXMAP ("/menu/Actions/Component/MessageReplySndr", "reply.xpm"),
- if (!done_init) {
- g_atexit (free_pixmaps);
- done_init = 1;
- }
-
- for (i = 0; pixcache [i].path; i++) {
- if (!pixcache [i].pixbuf) {
- char *path;
- GdkPixbuf *pixbuf;
-
- path = g_concat_dir_and_file (
- EVOLUTION_DATADIR "/images/evolution",
- pixcache [i].fname);
-
- pixbuf = gdk_pixbuf_new_from_file (path);
- if (pixbuf == NULL) {
- g_warning ("Cannot load image -- %s", path);
- } else {
- pixcache [i].pixbuf = bonobo_ui_util_pixbuf_to_xml (pixbuf);
- gdk_pixbuf_unref (pixbuf);
- }
-
- g_free (path);
- }
- bonobo_ui_component_set_prop (uic, pixcache [i].path, "pixname",
- pixcache [i].pixbuf, NULL);
- }
-}
+ E_PIXMAP ("/menu/Tools/Component/SetMailConfig", "configure_16_mail.xpm"),
+
+ E_PIXMAP ("/Toolbar/MailGet", "buttons/send-24-receive.png"),
+ E_PIXMAP ("/Toolbar/MailCompose", "buttons/compose-message.png"),
+ E_PIXMAP ("/Toolbar/Reply", "buttons/reply.png"),
+ E_PIXMAP ("/Toolbar/ReplyAll", "buttons/reply-to-all.png"),
+ E_PIXMAP ("/Toolbar/Forward", "buttons/forward.png"),
+ E_PIXMAP ("/Toolbar/Move", "buttons/move-message.png"),
+ E_PIXMAP ("/Toolbar/Copy", "buttons/copy-message.png"),
+
+ E_PIXMAP_END
+};
static void
display_view(GalViewCollection *collection,
@@ -304,7 +266,7 @@ control_activate (BonoboControl *control,
folder_browser_setup_view_menus (fb, uic);
folder_browser_setup_property_menu (fb, uic);
- update_pixmaps (uic);
+ e_pixmaps_update (uic, pixcache);
bonobo_ui_component_set_prop(uic, "/commands/MailStop", "sensitive", "0", NULL);