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 /mail | |
parent | 9fc545eb953a65888f3ae78703e1500d8ad9f1be (diff) | |
download | gsoc2013-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')
-rw-r--r-- | mail/ChangeLog | 9 | ||||
-rw-r--r-- | mail/component-factory.c | 2 | ||||
-rw-r--r-- | mail/folder-browser-factory.c | 98 | ||||
-rw-r--r-- | mail/subscribe-dialog.c | 38 |
4 files changed, 49 insertions, 98 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 2b7e546853..c914b2dd80 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,12 @@ +2001-04-01 Gediminas Paulauskas <menesis@delfi.lt> + + * component-factory.c: changed vtrash icon to trash. doh + * folder-browser-factory.c: pixmap cache got moved from here to + e-util/e-gui-utils.c. Changed pixmap paths according to file renames. + Added icons for print, get mail, etc., changed get mail icon as Jacub + suggested. + * subscribe-dialog.c: also use new pixmap cache. + 2001-03-30 Dan Winship <danw@ximian.com> * mail-config.c (check_service_check): Register for cancellation. diff --git a/mail/component-factory.c b/mail/component-factory.c index a2f32c56b3..215abfd9d1 100644 --- a/mail/component-factory.c +++ b/mail/component-factory.c @@ -282,7 +282,7 @@ debug_cb (EvolutionShellComponent *shell_component, gpointer user_data) static const EvolutionShellComponentFolderType folder_types[] = { { "mail", "evolution-inbox.png" }, { "mailstorage", "evolution-inbox.png" }, - { "vtrash", "evolution-inbox.png" }, + { "vtrash", "delete_message.xpm" }, { NULL, NULL } }; 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); diff --git a/mail/subscribe-dialog.c b/mail/subscribe-dialog.c index 657661c01d..5608c44820 100644 --- a/mail/subscribe-dialog.c +++ b/mail/subscribe-dialog.c @@ -51,7 +51,8 @@ #include <gal/e-paned/e-hpaned.h> -#include <e-util/e-html-utils.h> +#include "e-util/e-html-utils.h" +#include "e-util/e-gui-utils.h" #include "mail.h" #include "mail-tools.h" #include "mail-mt.h" @@ -110,33 +111,12 @@ static GtkObjectClass *subscribe_dialog_parent_class; static void build_tree (SubscribeDialog *sc, CamelStore *store); -static void -set_pixmap (BonoboUIComponent *component, - const char *xml_path, - const char *icon) -{ - char *path; - GdkPixbuf *pixbuf; - - path = g_concat_dir_and_file (EVOLUTION_DATADIR "/images/evolution/buttons", icon); - - pixbuf = gdk_pixbuf_new_from_file (path); - g_return_if_fail (pixbuf != NULL); - - bonobo_ui_util_set_pixbuf (component, xml_path, pixbuf); - - gdk_pixbuf_unref (pixbuf); - - g_free (path); -} - -static void -update_pixmaps (BonoboUIComponent *component) -{ - set_pixmap (component, "/Toolbar/SubscribeFolder", "fetch-mail.png"); /* XXX */ - set_pixmap (component, "/Toolbar/UnsubscribeFolder", "compose-message.png"); /* XXX */ - set_pixmap (component, "/Toolbar/RefreshList", "forward.png"); /* XXX */ -} +static EPixmap pixmaps [] = { + E_PIXMAP ("/Toolbar/SubscribeFolder", "buttons/fetch-mail.png"), /* XXX */ + E_PIXMAP ("/Toolbar/UnsubscribeFolder", "buttons/compose-message.png"), /* XXX */ + E_PIXMAP ("/Toolbar/RefreshList", "buttons/forward.png"), /* XXX */ + E_PIXMAP_END +}; static GtkWidget* make_folder_search_widget (GtkSignalFunc start_search_func, @@ -910,7 +890,7 @@ subscribe_dialog_gui_init (SubscribeDialog *sc) "evolution-subscribe.xml", "evolution-subscribe"); - update_pixmaps (component); + e_pixmaps_update (component, pixmaps); bonobo_ui_component_thaw (component, NULL); |