diff options
author | Michael Terry <mike@mterry.name> | 2004-04-19 23:20:48 +0800 |
---|---|---|
committer | Rodney Dawes <dobey@src.gnome.org> | 2004-04-19 23:20:48 +0800 |
commit | 69bf3985321f43107a694855c764500c89b05deb (patch) | |
tree | 710f94bb8dd3378e397b94cf51a46d2f8dfbd293 | |
parent | cc309ba614fec0dca286fd20d97ab511654a331f (diff) | |
download | gsoc2013-evolution-69bf3985321f43107a694855c764500c89b05deb.tar gsoc2013-evolution-69bf3985321f43107a694855c764500c89b05deb.tar.gz gsoc2013-evolution-69bf3985321f43107a694855c764500c89b05deb.tar.bz2 gsoc2013-evolution-69bf3985321f43107a694855c764500c89b05deb.tar.lz gsoc2013-evolution-69bf3985321f43107a694855c764500c89b05deb.tar.xz gsoc2013-evolution-69bf3985321f43107a694855c764500c89b05deb.tar.zst gsoc2013-evolution-69bf3985321f43107a694855c764500c89b05deb.zip |
mail-component.c
2004-04-19 Michael Terry <mike@mterry.name>
* GNOME_Evolution_Mail.server.in.in:
* em-account-prefs.[ch]:
* em-composer-prefs.[ch]:
* em-folder-browser.c:
* em-folder-tree.c:
* em-folder-view.c:
* em-format-html-display.c:
* em-format-html.[ch]:
* em-popup.c:
* mail-component.c
* mail-config-druid.c:
* mail-config.glade:
* mail-mt.c:
* mail-send-recv.c:
* message-list.c:
* message-tag-followup.c:
* message-tags.glade: Update the mailer to use icon themes through the
EIconFactory object in e-util
svn path=/trunk/; revision=25517
-rw-r--r-- | mail/ChangeLog | 21 | ||||
-rw-r--r-- | mail/GNOME_Evolution_Mail.server.in.in | 12 | ||||
-rw-r--r-- | mail/em-account-prefs.c | 10 | ||||
-rw-r--r-- | mail/em-account-prefs.h | 3 | ||||
-rw-r--r-- | mail/em-composer-prefs.c | 11 | ||||
-rw-r--r-- | mail/em-composer-prefs.h | 8 | ||||
-rw-r--r-- | mail/em-folder-browser.c | 10 | ||||
-rw-r--r-- | mail/em-folder-tree.c | 21 | ||||
-rw-r--r-- | mail/em-folder-view.c | 102 | ||||
-rw-r--r-- | mail/em-format-html-display.c | 57 | ||||
-rw-r--r-- | mail/em-format-html.c | 33 | ||||
-rw-r--r-- | mail/em-format-html.h | 2 | ||||
-rw-r--r-- | mail/em-popup.c | 19 | ||||
-rw-r--r-- | mail/mail-component.c | 6 | ||||
-rw-r--r-- | mail/mail-config-druid.c | 22 | ||||
-rw-r--r-- | mail/mail-config.glade | 5 | ||||
-rw-r--r-- | mail/mail-mt.c | 6 | ||||
-rw-r--r-- | mail/mail-send-recv.c | 21 | ||||
-rw-r--r-- | mail/message-list.c | 61 | ||||
-rw-r--r-- | mail/message-tag-followup.c | 16 | ||||
-rw-r--r-- | mail/message-tags.glade | 12 |
21 files changed, 241 insertions, 217 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 6d05da4a35..bb8024d8f1 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,24 @@ +2004-04-19 Michael Terry <mike@mterry.name> + + * GNOME_Evolution_Mail.server.in.in: + * em-account-prefs.[ch]: + * em-composer-prefs.[ch]: + * em-folder-browser.c: + * em-folder-tree.c: + * em-folder-view.c: + * em-format-html-display.c: + * em-format-html.[ch]: + * em-popup.c: + * mail-component.c + * mail-config-druid.c: + * mail-config.glade: + * mail-mt.c: + * mail-send-recv.c: + * message-list.c: + * message-tag-followup.c: + * message-tags.glade: Update the mailer to use icon themes through the + EIconFactory object in e-util + 2004-04-16 David Malcolm <dmalcolm@redhat.com> * importers/netscape-importer.c (netscape_import_accounts): diff --git a/mail/GNOME_Evolution_Mail.server.in.in b/mail/GNOME_Evolution_Mail.server.in.in index d482615e30..eaca251026 100644 --- a/mail/GNOME_Evolution_Mail.server.in.in +++ b/mail/GNOME_Evolution_Mail.server.in.in @@ -31,9 +31,9 @@ <oaf_attribute name="evolution:button_label" type="string" _value="Mail"/> <oaf_attribute name="evolution:button_sort_order" type="string" value="-10"/> - <oaf_attribute name="evolution:button_icon" type="string" value="evolution-inbox.png"/> + <oaf_attribute name="evolution:button_icon" type="string" value="stock_mail"/> - <oaf_attribute name="evolution:component_icon" type="string" value="evolution-inbox.png"/> + <oaf_attribute name="evolution:component_icon" type="string" value="stock_mail"/> <oaf_attribute name="evolution:component_display_order" type="number" value="1"/> <oaf_attribute name="evolution:uri_schemas" type="stringv"> @@ -55,7 +55,7 @@ _value="Evolution Mail component"/> <oaf_attribute name="evolution:shell_component_icon" type="string" - value="evolution-inbox.png"/> + value="stock_mail"/> <oaf_attribute name="evolution:shell_component_launch_order" type="number" value="1"/> </oaf_server> @@ -124,7 +124,7 @@ _value="Configure your email accounts here"/> <oaf_attribute name="evolution2:config_item:icon_name" type="string" - value="mail-accounts-settings.png"/> + value="stock_people"/> <oaf_attribute name="evolution2:config_item:type" type="stringv"> <item value="mail"/> @@ -153,7 +153,7 @@ _value="Configure mail preferences, including security and message display, here"/> <oaf_attribute name="evolution2:config_item:icon_name" type="string" - value="mail-config-druid.png"/> + value="stock_mail"/> <oaf_attribute name="evolution2:config_item:priority" type="string" value="-9"/> @@ -178,7 +178,7 @@ _value="Configure spell-checking, signatures, and the message composer here"/> <oaf_attribute name="evolution2:config_item:icon_name" type="string" - value="composer-settings.png"/> + value="stock_mail-compose"/> <oaf_attribute name="evolution2:config_item:priority" type="string" value="-8"/> diff --git a/mail/em-account-prefs.c b/mail/em-account-prefs.c index ec4e83ab9e..988a6ab216 100644 --- a/mail/em-account-prefs.c +++ b/mail/em-account-prefs.c @@ -38,9 +38,8 @@ #include "e-util/e-account-list.h" -#include "art/mark.xpm" - #include "em-account-prefs.h" +#include <e-util/e-icon-factory.h> static void em_account_prefs_class_init (EMAccountPrefsClass *class); static void em_account_prefs_init (EMAccountPrefs *prefs); @@ -94,7 +93,7 @@ em_account_prefs_class_init (EMAccountPrefsClass *klass) /* setup static data */ disabled_pixbuf = NULL; - enabled_pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **) mark_xpm); + enabled_pixbuf = e_icon_factory_get_icon ("stock_mark", 16); } static void @@ -103,7 +102,7 @@ em_account_prefs_init (EMAccountPrefs *prefs) prefs->druid = NULL; prefs->editor = NULL; - gdk_pixbuf_render_pixmap_and_mask (enabled_pixbuf, &prefs->mark_pixmap, &prefs->mark_bitmap, 128); + prefs->mark_pixbuf = g_object_ref (enabled_pixbuf); } static void @@ -122,8 +121,7 @@ em_account_prefs_finalise (GObject *obj) EMAccountPrefs *prefs = (EMAccountPrefs *) obj; g_object_unref (prefs->gui); - gdk_pixmap_unref (prefs->mark_pixmap); - g_object_unref (prefs->mark_bitmap); + g_object_unref (prefs->mark_pixbuf); G_OBJECT_CLASS (parent_class)->finalize (obj); } diff --git a/mail/em-account-prefs.h b/mail/em-account-prefs.h index 100d56480d..108c525e6c 100644 --- a/mail/em-account-prefs.h +++ b/mail/em-account-prefs.h @@ -61,8 +61,7 @@ struct _EMAccountPrefs { GtkWidget *druid; GtkWidget *editor; - GdkPixmap *mark_pixmap; - GdkBitmap *mark_bitmap; + GdkPixbuf *mark_pixbuf; GtkTreeView *table; diff --git a/mail/em-composer-prefs.c b/mail/em-composer-prefs.c index 3125c3776f..99870462f2 100644 --- a/mail/em-composer-prefs.c +++ b/mail/em-composer-prefs.c @@ -47,11 +47,10 @@ #include <gtk/gtktreeview.h> #include "widgets/misc/e-charset-picker.h" +#include <e-util/e-icon-factory.h> #include "mail-config.h" -#include "art/mark.xpm" - #define d(x) @@ -101,9 +100,7 @@ em_composer_prefs_class_init (EMComposerPrefsClass *klass) static void em_composer_prefs_init (EMComposerPrefs *prefs) { - prefs->enabled_pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **) mark_xpm); - gdk_pixbuf_render_pixmap_and_mask (prefs->enabled_pixbuf, &prefs->mark_pixmap, &prefs->mark_bitmap, 128); - + prefs->enabled_pixbuf = e_icon_factory_get_icon ("stock_mark", 16); prefs->sig_hash = g_hash_table_new (g_direct_hash, g_direct_equal); } @@ -120,8 +117,6 @@ em_composer_prefs_finalise (GObject *obj) g_object_unref (prefs->gui); g_object_unref (prefs->enabled_pixbuf); - gdk_pixmap_unref (prefs->mark_pixmap); - g_object_unref (prefs->mark_bitmap); g_hash_table_foreach (prefs->sig_hash, (GHFunc) row_free, NULL); g_hash_table_destroy (prefs->sig_hash); @@ -909,7 +904,7 @@ em_composer_prefs_construct (EMComposerPrefs *prefs) prefs->spell_able_button = glade_xml_get_widget (gui, "buttonSpellCheckEnable"); info_pixmap = glade_xml_get_widget (gui, "pixmapSpellInfo"); - gtk_image_set_from_file (GTK_IMAGE (info_pixmap), EVOLUTION_IMAGES "/info-bulb.png"); + gtk_image_set_from_stock (GTK_IMAGE (info_pixmap), GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_BUTTON); if (!spell_setup_check_options (prefs)) { gtk_widget_hide (GTK_WIDGET (prefs->colour)); gtk_widget_hide (GTK_WIDGET (prefs->language)); diff --git a/mail/em-composer-prefs.h b/mail/em-composer-prefs.h index 6c03538b41..df0fcd6ed1 100644 --- a/mail/em-composer-prefs.h +++ b/mail/em-composer-prefs.h @@ -76,8 +76,12 @@ struct _EMComposerPrefs { GtkTreeView *language; CORBA_sequence_GNOME_Spell_Language *language_seq; gboolean spell_active; - GdkPixmap *mark_pixmap; - GdkBitmap *mark_bitmap; + + char *language_str; + char *language_str_orig; + GdkColor spell_error_color; + GdkColor spell_error_color_orig; + GdkPixbuf *enabled_pixbuf; GtkWidget *spell_able_button; diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c index 3da05dd3da..e877eaed83 100644 --- a/mail/em-folder-browser.c +++ b/mail/em-folder-browser.c @@ -706,12 +706,12 @@ static BonoboUIVerb emfb_verbs[] = { }; static EPixmap emfb_pixmaps[] = { - E_PIXMAP ("/commands/ChangeFolderProperties", "configure_16_folder.xpm"), - E_PIXMAP ("/commands/ViewHideRead", "hide_read_messages.xpm"), - E_PIXMAP ("/commands/ViewHideSelected", "hide_selected_messages.xpm"), - E_PIXMAP ("/commands/ViewShowAll", "show_all_messages.xpm"), + E_PIXMAP ("/commands/ChangeFolderProperties", "stock_folder-properties", 16), + E_PIXMAP ("/commands/ViewHideRead", "stock_mail-hide-read", 16), + E_PIXMAP ("/commands/ViewHideSelected", "stock_mail-hide-selected", 16), + E_PIXMAP ("/commands/ViewShowAll", "stock_show-all", 16), - E_PIXMAP ("/commands/MailCompose", "new-message.xpm"), + E_PIXMAP ("/commands/MailCompose", "stock_mail-compose", 16), E_PIXMAP_END }; diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c index 0987ff04b6..a53f283938 100644 --- a/mail/em-folder-tree.c +++ b/mail/em-folder-tree.c @@ -50,6 +50,7 @@ #include "e-util/e-mktemp.h" #include "e-util/e-request.h" #include "e-util/e-dialog-utils.h" +#include <e-util/e-icon-factory.h> #include "filter/vfolder-rule.h" @@ -257,11 +258,11 @@ render_pixbuf (GtkTreeViewColumn *column, GtkCellRenderer *renderer, char *path; if (!initialised) { - folder_icons[FOLDER_ICON_NORMAL] = gdk_pixbuf_new_from_file (EVOLUTION_ICONSDIR "/folder-mini.png", NULL); - folder_icons[FOLDER_ICON_INBOX] = gdk_pixbuf_new_from_file (EVOLUTION_ICONSDIR "/inbox-mini.png", NULL); - folder_icons[FOLDER_ICON_OUTBOX] = gdk_pixbuf_new_from_file (EVOLUTION_ICONSDIR "/outbox-mini.png", NULL); - folder_icons[FOLDER_ICON_TRASH] = gdk_pixbuf_new_from_file (EVOLUTION_ICONSDIR "/evolution-trash-mini.png", NULL); - folder_icons[FOLDER_ICON_JUNK] = gdk_pixbuf_new_from_file (EVOLUTION_ICONSDIR "/evolution-junk-mini.png", NULL); + folder_icons[FOLDER_ICON_NORMAL] = e_icon_factory_get_icon ("stock_folder", 16); + folder_icons[FOLDER_ICON_INBOX] = e_icon_factory_get_icon ("stock_inbox", 16); + folder_icons[FOLDER_ICON_OUTBOX] = e_icon_factory_get_icon ("stock_outbox", 16); + folder_icons[FOLDER_ICON_TRASH] = e_icon_factory_get_icon ("stock_delete", 16); + folder_icons[FOLDER_ICON_JUNK] = e_icon_factory_get_icon ("stock_spam", 16); initialised = TRUE; } @@ -2560,18 +2561,18 @@ static EMPopupItem emft_popup_menu[] = { { EM_POPUP_BAR, "10.emc" }, #endif - { EM_POPUP_ITEM, "10.emc.00", N_("_Copy"), G_CALLBACK (emft_popup_copy), NULL, "folder-copy-16.png", EM_POPUP_FOLDER_FOLDER|EM_POPUP_FOLDER_SELECT }, - { EM_POPUP_ITEM, "10.emc.01", N_("_Move"), G_CALLBACK (emft_popup_move), NULL, "folder-move-16.png", EM_POPUP_FOLDER_FOLDER|EM_POPUP_FOLDER_DELETE }, + { EM_POPUP_ITEM, "10.emc.00", N_("_Copy"), G_CALLBACK (emft_popup_copy), NULL, "stock_folder-copy", EM_POPUP_FOLDER_FOLDER|EM_POPUP_FOLDER_SELECT }, + { EM_POPUP_ITEM, "10.emc.01", N_("_Move"), G_CALLBACK (emft_popup_move), NULL, "stock_folder-move", EM_POPUP_FOLDER_FOLDER|EM_POPUP_FOLDER_DELETE }, { EM_POPUP_BAR, "20.emc" }, /* FIXME: need to disable for nochildren folders */ - { EM_POPUP_ITEM, "20.emc.00", N_("_New Folder..."), G_CALLBACK (emft_popup_new_folder), NULL, "folder-mini.png", EM_POPUP_FOLDER_INFERIORS }, + { EM_POPUP_ITEM, "20.emc.00", N_("_New Folder..."), G_CALLBACK (emft_popup_new_folder), NULL, "stock_folder", EM_POPUP_FOLDER_INFERIORS }, /* FIXME: need to disable for undeletable folders */ - { EM_POPUP_ITEM, "20.emc.01", N_("_Delete"), G_CALLBACK (emft_popup_delete_folder), NULL, "evolution-trash-mini.png", EM_POPUP_FOLDER_FOLDER|EM_POPUP_FOLDER_DELETE }, + { EM_POPUP_ITEM, "20.emc.01", N_("_Delete"), G_CALLBACK (emft_popup_delete_folder), NULL, "stock_delete", EM_POPUP_FOLDER_FOLDER|EM_POPUP_FOLDER_DELETE }, { EM_POPUP_ITEM, "20.emc.01", N_("_Rename"), G_CALLBACK (emft_popup_rename_folder), NULL, NULL, EM_POPUP_FOLDER_FOLDER|EM_POPUP_FOLDER_DELETE }, { EM_POPUP_BAR, "80.emc" }, - { EM_POPUP_ITEM, "80.emc.00", N_("_Properties..."), G_CALLBACK (emft_popup_properties), NULL, "configure_16_folder.xpm", EM_POPUP_FOLDER_FOLDER|EM_POPUP_FOLDER_SELECT }, + { EM_POPUP_ITEM, "80.emc.00", N_("_Properties..."), G_CALLBACK (emft_popup_properties), NULL, "stock_folder-properties", EM_POPUP_FOLDER_FOLDER|EM_POPUP_FOLDER_SELECT } }; static gboolean diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c index f2be4ea56d..669eef3e62 100644 --- a/mail/em-folder-view.c +++ b/mail/em-folder-view.c @@ -768,31 +768,31 @@ EMFV_POPUP_AUTO_TYPE(filter_type_current, emfv_popup_filter_thread, AUTO_THREAD) static EMPopupItem emfv_popup_menu[] = { { EM_POPUP_ITEM, "00.emfv.00", N_("_Open"), G_CALLBACK(emfv_popup_open), NULL, NULL, 0 }, { EM_POPUP_ITEM, "00.emfv.01", N_("_Edit as New Message..."), G_CALLBACK(emfv_popup_resend), NULL, NULL, EM_POPUP_SELECT_RESEND }, - { EM_POPUP_ITEM, "00.emfv.02", N_("_Save As..."), G_CALLBACK(emfv_popup_saveas), NULL, "save-as-16.png", 0 }, - { EM_POPUP_ITEM, "00.emfv.03", N_("_Print"), G_CALLBACK(emfv_popup_print), NULL, "print.xpm", 0 }, + { EM_POPUP_ITEM, "00.emfv.02", N_("_Save As..."), G_CALLBACK(emfv_popup_saveas), NULL, "stock_save_as", 0 }, + { EM_POPUP_ITEM, "00.emfv.03", N_("_Print"), G_CALLBACK(emfv_popup_print), NULL, "stock_print", 0 }, { EM_POPUP_BAR, "10.emfv" }, - { EM_POPUP_ITEM, "10.emfv.00", N_("_Reply to Sender"), G_CALLBACK(emfv_popup_reply_sender), NULL, "reply.xpm", EM_POPUP_SELECT_ONE }, + { EM_POPUP_ITEM, "10.emfv.00", N_("_Reply to Sender"), G_CALLBACK(emfv_popup_reply_sender), NULL, "stock_mail-reply", EM_POPUP_SELECT_ONE }, { EM_POPUP_ITEM, "10.emfv.01", N_("Reply to _List"), G_CALLBACK(emfv_popup_reply_list), NULL, NULL, EM_POPUP_SELECT_ONE|EM_POPUP_SELECT_MAILING_LIST }, - { EM_POPUP_ITEM, "10.emfv.02", N_("Reply to _All"), G_CALLBACK(emfv_popup_reply_all), NULL, "reply_to_all.xpm", EM_POPUP_SELECT_ONE }, - { EM_POPUP_ITEM, "10.emfv.03", N_("_Forward"), G_CALLBACK(emfv_popup_forward), NULL, "forward.xpm", EM_POPUP_SELECT_MANY }, + { EM_POPUP_ITEM, "10.emfv.02", N_("Reply to _All"), G_CALLBACK(emfv_popup_reply_all), NULL, "stock_mail-reply-to-all", EM_POPUP_SELECT_ONE }, + { EM_POPUP_ITEM, "10.emfv.03", N_("_Forward"), G_CALLBACK(emfv_popup_forward), NULL, "stock_mail-forward", EM_POPUP_SELECT_MANY }, { EM_POPUP_BAR, "20.emfv", NULL, NULL, NULL, NULL, EM_POPUP_SELECT_FLAG_FOLLOWUP|EM_POPUP_SELECT_FLAG_COMPLETED|EM_POPUP_SELECT_FLAG_CLEAR }, - { EM_POPUP_ITEM, "20.emfv.00", N_("Follo_w Up..."), G_CALLBACK(emfv_popup_flag_followup), NULL, "flag-for-followup-16.png", EM_POPUP_SELECT_FLAG_FOLLOWUP }, + { EM_POPUP_ITEM, "20.emfv.00", N_("Follo_w Up..."), G_CALLBACK(emfv_popup_flag_followup), NULL, "stock_mail-flag-for-followup", EM_POPUP_SELECT_FLAG_FOLLOWUP }, { EM_POPUP_ITEM, "20.emfv.01", N_("Fla_g Completed"), G_CALLBACK(emfv_popup_flag_completed), NULL, NULL, EM_POPUP_SELECT_FLAG_COMPLETED }, { EM_POPUP_ITEM, "20.emfv.02", N_("Cl_ear Flag"), G_CALLBACK(emfv_popup_flag_clear), NULL, NULL, EM_POPUP_SELECT_FLAG_CLEAR }, { EM_POPUP_BAR, "30.emfv" }, - { EM_POPUP_ITEM, "30.emfv.00", N_("Mar_k as Read"), G_CALLBACK(emfv_popup_mark_read), NULL, "mail-read.xpm", EM_POPUP_SELECT_MARK_READ }, - { EM_POPUP_ITEM, "30.emfv.01", N_("Mark as _Unread"), G_CALLBACK(emfv_popup_mark_unread), NULL, "mail-new.xpm", EM_POPUP_SELECT_MARK_UNREAD }, - { EM_POPUP_ITEM, "30.emfv.02", N_("Mark as _Important"), G_CALLBACK(emfv_popup_mark_important), NULL, "priority-high.xpm", EM_POPUP_SELECT_MARK_IMPORTANT }, + { EM_POPUP_ITEM, "30.emfv.00", N_("Mar_k as Read"), G_CALLBACK(emfv_popup_mark_read), NULL, "stock_mail-open", EM_POPUP_SELECT_MARK_READ }, + { EM_POPUP_ITEM, "30.emfv.01", N_("Mark as _Unread"), G_CALLBACK(emfv_popup_mark_unread), NULL, "stock_mail-unread", EM_POPUP_SELECT_MARK_UNREAD }, + { EM_POPUP_ITEM, "30.emfv.02", N_("Mark as _Important"), G_CALLBACK(emfv_popup_mark_important), NULL, "stock_mail-priority-high", EM_POPUP_SELECT_MARK_IMPORTANT }, { EM_POPUP_ITEM, "30.emfv.03", N_("_Mark as Unimportant"), G_CALLBACK(emfv_popup_mark_unimportant), NULL, NULL, EM_POPUP_SELECT_MARK_UNIMPORTANT }, - { EM_POPUP_ITEM, "30.emfv.04", N_("Mark as _Junk"), G_CALLBACK(emfv_popup_mark_junk), NULL, "stock-junk-16.png", EM_POPUP_SELECT_MARK_JUNK }, - { EM_POPUP_ITEM, "30.emfv.05", N_("Mark as _Not Junk"), G_CALLBACK(emfv_popup_mark_nojunk), NULL, "stock-notjunk-16.png", EM_POPUP_SELECT_MARK_NOJUNK }, + { EM_POPUP_ITEM, "30.emfv.04", N_("Mark as _Junk"), G_CALLBACK(emfv_popup_mark_junk), NULL, "stock_spam", EM_POPUP_SELECT_MARK_JUNK }, + { EM_POPUP_ITEM, "30.emfv.05", N_("Mark as _Not Junk"), G_CALLBACK(emfv_popup_mark_nojunk), NULL, "stock_not-spam", EM_POPUP_SELECT_MARK_NOJUNK }, { EM_POPUP_BAR, "40.emfv" }, - { EM_POPUP_ITEM, "40.emfv.00", N_("_Delete"), G_CALLBACK(emfv_popup_delete), NULL, "evolution-trash-mini.png", EM_POPUP_SELECT_DELETE }, - { EM_POPUP_ITEM, "40.emfv.01", N_("U_ndelete"), G_CALLBACK(emfv_popup_undelete), NULL, "undelete_message-16.png", EM_POPUP_SELECT_UNDELETE }, + { EM_POPUP_ITEM, "40.emfv.00", N_("_Delete"), G_CALLBACK(emfv_popup_delete), NULL, "stock_delete", EM_POPUP_SELECT_DELETE }, + { EM_POPUP_ITEM, "40.emfv.01", N_("U_ndelete"), G_CALLBACK(emfv_popup_undelete), NULL, "stock_undelete", EM_POPUP_SELECT_UNDELETE }, { EM_POPUP_BAR, "50.emfv" }, { EM_POPUP_ITEM, "50.emfv.00", N_("Mo_ve to Folder..."), G_CALLBACK(emfv_popup_move) }, @@ -807,8 +807,8 @@ static EMPopupItem emfv_popup_menu[] = { { EM_POPUP_ITEM, "70.emfv.00", N_("Add Sender to Address_book"), G_CALLBACK(emfv_popup_add_sender), NULL, NULL, EM_POPUP_SELECT_ONE|EM_POPUP_SELECT_ADD_SENDER }, { EM_POPUP_BAR, "80.emfv" }, - { EM_POPUP_ITEM, "80.emfv.00", N_("Appl_y Filters"), G_CALLBACK(emfv_popup_apply_filters), NULL, "apply-filters-16.xpm" }, - { EM_POPUP_ITEM, "80.emfv.01", N_("F_ilter Junk"), G_CALLBACK(emfv_popup_filter_junk), NULL, "stock-junk-16.png" }, + { EM_POPUP_ITEM, "80.emfv.00", N_("Appl_y Filters"), G_CALLBACK(emfv_popup_apply_filters), NULL, "stock_mail-filters-apply" }, + { EM_POPUP_ITEM, "80.emfv.01", N_("F_ilter Junk"), G_CALLBACK(emfv_popup_filter_junk), NULL, "stock_spam" }, { EM_POPUP_BAR, "90.filter", NULL, NULL, NULL, NULL, EM_POPUP_SELECT_ONE }, { EM_POPUP_SUBMENU, "90.filter.00", N_("Crea_te Rule From Message"), NULL, NULL, NULL, EM_POPUP_SELECT_ONE }, @@ -1396,42 +1396,42 @@ static BonoboUIVerb emfv_message_verbs[] = { BONOBO_UI_VERB_END }; static EPixmap emfv_message_pixmaps[] = { - E_PIXMAP ("/commands/EditCut", "16_cut.png"), - E_PIXMAP ("/commands/EditCopy", "16_copy.png"), - E_PIXMAP ("/commands/EditPaste", "16_paste.png"), - - E_PIXMAP ("/commands/PrintMessage", "print.xpm"), - E_PIXMAP ("/commands/PrintPreviewMessage", "print-preview.xpm"), - E_PIXMAP ("/commands/MessageDelete", "evolution-trash-mini.png"), - E_PIXMAP ("/commands/MessageUndelete", "undelete_message-16.png"), - E_PIXMAP ("/commands/MessageCopy", "copy_16_message.xpm"), - E_PIXMAP ("/commands/MessageMove", "move_message.xpm"), - E_PIXMAP ("/commands/MessageReplyAll", "reply_to_all.xpm"), - E_PIXMAP ("/commands/MessageReplySender", "reply.xpm"), - E_PIXMAP ("/commands/MessageForward", "forward.xpm"), - E_PIXMAP ("/commands/MessageApplyFilters", "apply-filters-16.xpm"), - E_PIXMAP ("/commands/MessageFilterJunk", "stock-junk-16.png"), - E_PIXMAP ("/commands/MessageSearch", "search-16.png"), - E_PIXMAP ("/commands/MessageSaveAs", "save-as-16.png"), - E_PIXMAP ("/commands/MessageMarkAsRead", "mail-read.xpm"), - E_PIXMAP ("/commands/MessageMarkAsUnRead", "mail-new.xpm"), - E_PIXMAP ("/commands/MessageMarkAsImportant", "priority-high.xpm"), - E_PIXMAP ("/commands/MessageMarkAsJunk", "stock-junk-16.png"), - E_PIXMAP ("/commands/MessageMarkAsNotJunk", "stock-notjunk-16.png"), - E_PIXMAP ("/commands/MessageFollowUpFlag", "flag-for-followup-16.png"), - - E_PIXMAP ("/Toolbar/MailMessageToolbar/MessageReplySender", "buttons/reply.png"), - E_PIXMAP ("/Toolbar/MailMessageToolbar/MessageReplyAll", "buttons/reply-to-all.png"), - E_PIXMAP ("/Toolbar/MailMessageToolbar/MessageForward", "buttons/forward.png"), - E_PIXMAP ("/Toolbar/MailMessageToolbar/PrintMessage", "buttons/print.png"), - E_PIXMAP ("/Toolbar/MailMessageToolbar/MessageMove", "buttons/move-message.png"), - E_PIXMAP ("/Toolbar/MailMessageToolbar/MessageCopy", "buttons/copy-message.png"), - E_PIXMAP ("/Toolbar/MailMessageToolbar/MessageDelete", "buttons/delete-message.png"), - E_PIXMAP ("/Toolbar/MailMessageToolbar/MessageMarkAsJunk", "stock-junk-24.png"), - E_PIXMAP ("/Toolbar/MailMessageToolbar/MessageMarkAsNotJunk", "stock-notjunk-24.png"), - - E_PIXMAP ("/Toolbar/MailNextButtons/MailNext", "buttons/next-message.png"), - E_PIXMAP ("/Toolbar/MailNextButtons/MailPrevious", "buttons/previous-message.png"), + E_PIXMAP ("/commands/EditCut", "stock_cut", 16), + E_PIXMAP ("/commands/EditCopy", "stock_copy", 16), + E_PIXMAP ("/commands/EditPaste", "stock_paste", 16), + + E_PIXMAP ("/commands/PrintMessage", "stock_print", 16), + E_PIXMAP ("/commands/PrintPreviewMessage", "stock_print-preview", 16), + E_PIXMAP ("/commands/MessageDelete", "stock_delete", 16), + E_PIXMAP ("/commands/MessageUndelete", "stock_undelete", 16), + E_PIXMAP ("/commands/MessageCopy", "stock_mail-copy", 16), + E_PIXMAP ("/commands/MessageMove", "stock_mail-move", 16), + E_PIXMAP ("/commands/MessageReplyAll", "stock_mail-reply-to-all", 16), + E_PIXMAP ("/commands/MessageReplySender", "stock_mail-reply", 16), + E_PIXMAP ("/commands/MessageForward", "stock_mail-forward", 16), + E_PIXMAP ("/commands/MessageApplyFilters", "stock_mail-filters-apply", 16), + E_PIXMAP ("/commands/MessageFilterJunk", "stock_spam", 16), + E_PIXMAP ("/commands/MessageSearch", "stock_search", 16), + E_PIXMAP ("/commands/MessageSaveAs", "stock_save_as", 16), + E_PIXMAP ("/commands/MessageMarkAsRead", "stock_mail-open", 16), + E_PIXMAP ("/commands/MessageMarkAsUnRead", "stock_mail-unread", 16), + E_PIXMAP ("/commands/MessageMarkAsImportant", "stock_mail-priority-high", 16), + E_PIXMAP ("/commands/MessageMarkAsJunk", "stock_spam", 16), + E_PIXMAP ("/commands/MessageMarkAsNotJunk", "stock_not-spam", 16), + E_PIXMAP ("/commands/MessageFollowUpFlag", "stock_mail-flag-for-followup", 16), + + E_PIXMAP ("/Toolbar/MailMessageToolbar/MessageReplySender", "stock_mail-reply", 24), + E_PIXMAP ("/Toolbar/MailMessageToolbar/MessageReplyAll", "stock_mail-reply-to-all", 24), + E_PIXMAP ("/Toolbar/MailMessageToolbar/MessageForward", "stock_mail-forward", 24), + E_PIXMAP ("/Toolbar/MailMessageToolbar/PrintMessage", "stock_print", 24), + E_PIXMAP ("/Toolbar/MailMessageToolbar/MessageMove", "stock_mail-move", 24), + E_PIXMAP ("/Toolbar/MailMessageToolbar/MessageCopy", "stock_mail-copy", 24), + E_PIXMAP ("/Toolbar/MailMessageToolbar/MessageDelete", "stock_delete", 24), + E_PIXMAP ("/Toolbar/MailMessageToolbar/MessageMarkAsJunk", "stock_spam", 24), + E_PIXMAP ("/Toolbar/MailMessageToolbar/MessageMarkAsNotJunk", "stock_not-spam", 24), + + E_PIXMAP ("/Toolbar/MailNextButtons/MailNext", "stock_next", 24), + E_PIXMAP ("/Toolbar/MailNextButtons/MailPrevious", "stock_previous", 24), E_PIXMAP_END }; diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c index 8f03c1bd89..2669a8c7f2 100644 --- a/mail/em-format-html-display.c +++ b/mail/em-format-html-display.c @@ -80,6 +80,7 @@ #include <e-util/e-msgport.h> #include <e-util/e-gui-utils.h> #include <e-util/e-dialog-utils.h> +#include <e-util/e-icon-factory.h> #ifdef HAVE_NSS #include "certificate-viewer.h" @@ -636,25 +637,25 @@ efhd_complete(EMFormat *emf) /* ********************************************************************** */ -/* TODO: rename some of this stuff, it isn't 'smime' specific */ /* TODO: move the dialogue elsehwere */ /* FIXME: also in em-format-html.c */ +/* FIXME: stock_signature-nokey is not in the icon theme yet */ static const struct { const char *icon, *shortdesc, *description; } smime_sign_table[4] = { - { "pgp-signature-nokey.png", N_("Unsigned"), N_("This message is not signed. There is no guarantee that this message is authentic.") }, - { "pgp-signature-ok.png", N_("Valid signature"), N_("This message is signed and is valid meaning that it is very likely that this message is authentic.") }, - { "pgp-signature-bad.png", N_("Invalid signature"), N_("The signature of this message cannot be verified, it may have been altered in transit.") }, - { "pgp-signature-nokey.png", N_("Valid signature, cannot verify sender"), N_("This message is signed with a valid signature, but the sender of the message cannot be verified.") }, + { "stock_signature-nokey", N_("Unsigned"), N_("This message is not signed. There is no guarantee that this message is authentic.") }, + { "stock_signature-ok", N_("Valid signature"), N_("This message is signed and is valid meaning that it is very likely that this message is authentic.") }, + { "stock_signature-bad", N_("Invalid signature"), N_("The signature of this message cannot be verified, it may have been altered in transit.") }, + { "stock_signature", N_("Valid signature, cannot verify sender"), N_("This message is signed with a valid signature, but the sender of the message cannot be verified.") }, }; static const struct { const char *icon, *shortdesc, *description; } smime_encrypt_table[4] = { - { NULL, N_("Unencrypted"), N_("This message is not encrypted. Its content may be viewed in transit across the Internet.") }, - { "pgp-signature-ok.png", N_("Encrypted, weak"), N_("This message is encrypted, but with a weak encryption algorithm. It would be difficult, but not impossible for an outsider to view the content of this message in a practical amount of time.") }, - { "pgp-signature-ok.png", N_("Encrypted"), N_("This message is encrypted. It would be difficult for an outsider to view the content of this message.") }, - { "pgp-signature-ok.png", N_("Encrypted, strong"), N_("This message is encrypted, with a strong encryption algorithm. It would be very difficult for an outsider to view the content of this message in a practical amount of time.") }, + { "stock_signature-nokey", N_("Unencrypted"), N_("This message is not encrypted. Its content may be viewed in transit across The Internet.") }, + { "stock_lock-ok", N_("Encrypted, weak"), N_("This message is encrypted, but with a weak encryption algorithm. It would be difficult, but not impossible for an outsider to view the content of this message in a practical amount of time.") }, + { "stock_lock-ok", N_("Encrypted"), N_("This message is encrypted. It would be difficult for an outsider to view the content of this message.") }, + { "stock_lock-ok", N_("Encrypted, strong"), N_("This message is encrypted, with a strong encryption algorithm. It would be very difficult for an outsider to view the content of this message in a practical amount of time.") }, }; struct _smime_pobject { @@ -838,19 +839,14 @@ efhd_xpkcs7mime_button(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObje GtkWidget *icon, *button; GdkPixbuf *pixbuf; struct _smime_pobject *po = (struct _smime_pobject *)pobject; - char *file; const char *name; /* FIXME: need to have it based on encryption and signing too */ name = smime_sign_table[po->valid->sign.status].icon; - file = g_build_filename(EVOLUTION_ICONSDIR, name, NULL); - pixbuf = gdk_pixbuf_new_from_file(file, NULL); - g_free(file); - if (pixbuf == NULL) - return FALSE; - /* wtf isn't this just scaled on disk? */ - icon = gtk_image_new_from_pixbuf(gdk_pixbuf_scale_simple(pixbuf, 24, 24, GDK_INTERP_BILINEAR)); + pixbuf = e_icon_factory_get_icon (name, 24); + + icon = gtk_image_new_from_pixbuf (pixbuf); g_object_unref(pixbuf); gtk_widget_show(icon); @@ -967,10 +963,10 @@ efhd_write_image(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri) static void efhd_format_prefix(EMFormat *emf, CamelStream *stream) { const char *flag, *comp, *due; - CamelMimePart *iconpart; time_t date; char due_date[128]; struct tm due_tm; + gchar *iconpath; if (emf->folder == NULL || emf->uid == NULL || (flag = camel_folder_get_message_user_tag(emf->folder, emf->uid, "follow-up")) == NULL @@ -981,16 +977,21 @@ static void efhd_format_prefix(EMFormat *emf, CamelStream *stream) camel_stream_printf(stream, "<table border=1 width=\"100%%\" cellspacing=2 cellpadding=2><tr>"); comp = camel_folder_get_message_user_tag(emf->folder, emf->uid, "completed-on"); - iconpart = em_format_html_file_part((EMFormatHTML *)emf, "image/png", EVOLUTION_ICONSDIR, - comp&&comp[0]?"flag-for-followup-done-16.png":"flag-for-followup-16.png"); - if (iconpart) { - char *classid; - - classid = g_strdup_printf("icon:///em-format-html-display/%s/%s", emf->part_id->str, comp&&comp[0]?"comp":"uncomp"); - camel_stream_printf(stream, "<td align=\"left\"><img src=\"%s\"></td>", classid); - (void)em_format_add_puri(emf, sizeof(EMFormatPURI), classid, iconpart, efhd_write_image); - g_free(classid); - camel_object_unref(iconpart); + iconpath = e_icon_factory_get_icon_filename (comp && comp[0] ? "stock_flag-for-followup-done" : "stock_flag-for-followup", 16); + if (iconpath) { + CamelMimePart *iconpart; + + iconpart = em_format_html_file_part((EMFormatHTML *)emf, "image/png", iconpath); + g_free (iconpath); + if (iconpart) { + char *classid; + + classid = g_strdup_printf("icon:///em-format-html-display/%s/%s", emf->part_id->str, comp&&comp[0]?"comp":"uncomp"); + camel_stream_printf(stream, "<td align=\"left\"><img src=\"%s\"></td>", classid); + (void)em_format_add_puri(emf, sizeof(EMFormatPURI), classid, iconpart, efhd_write_image); + g_free(classid); + camel_object_unref(iconpart); + } } camel_stream_printf(stream, "<td align=\"left\" width=\"100%%\">"); diff --git a/mail/em-format-html.c b/mail/em-format-html.c index 2f6c25560f..67ca9d5b4d 100644 --- a/mail/em-format-html.c +++ b/mail/em-format-html.c @@ -36,6 +36,7 @@ #include <gal/util/e-iconv.h> #include <gal/util/e-util.h> /* for e_utf8_strftime, what about e_time_format_time? */ #include "e-util/e-time-utils.h" +#include "e-util/e-icon-factory.h" #include <gtkhtml/gtkhtml.h> #include <gtkhtml/gtkhtml-embedded.h> @@ -291,16 +292,14 @@ em_format_html_set_xmailer_mask(EMFormatHTML *emfh, unsigned int xmailer_mask) } CamelMimePart * -em_format_html_file_part(EMFormatHTML *efh, const char *mime_type, const char *path, const char *name) +em_format_html_file_part(EMFormatHTML *efh, const char *mime_type, const char *filename) { CamelMimePart *part; CamelStream *stream; CamelDataWrapper *dw; - char *filename; + gchar *basename; - filename = g_build_filename(path, name, NULL); stream = camel_stream_fs_new_with_name(filename, O_RDONLY, 0); - g_free(filename); if (stream == NULL) return NULL; @@ -313,7 +312,9 @@ em_format_html_file_part(EMFormatHTML *efh, const char *mime_type, const char *p part = camel_mime_part_new(); camel_medium_set_content_object((CamelMedium *)part, dw); camel_object_unref(dw); - camel_mime_part_set_filename(part, name); + basename = g_path_get_basename (filename); + camel_mime_part_set_filename(part, basename); + g_free (basename); return part; } @@ -565,19 +566,19 @@ efh_object_requested(GtkHTML *html, GtkHTMLEmbedded *eb, EMFormatHTML *efh) static const struct { const char *icon, *shortdesc; } smime_sign_table[4] = { - { "pgp-signature-nokey.png", N_("Unsigned") }, - { "pgp-signature-ok.png", N_("Valid signature") }, - { "pgp-signature-bad.png", N_("Invalid signature") }, - { "pgp-signature-nokey.png", N_("Valid signature, cannot verify sender") }, + { NULL, N_("Unsigned") }, + { "stock_signature-ok", N_("Valid signature") }, + { "stock_signature-bad", N_("Invalid signature") }, + { "stock_signature", N_("Valid signature, cannot verify sender") }, }; static const struct { const char *icon, *shortdesc; } smime_encrypt_table[4] = { { NULL, N_("Unencrypted") }, - { "pgp-signature-ok.png", N_("Encrypted, weak"),}, - { "pgp-signature-ok.png", N_("Encrypted") }, - { "pgp-signature-ok.png", N_("Encrypted, strong") }, + { "stock_lock-ok", N_("Encrypted, weak"),}, + { "stock_lock-ok", N_("Encrypted") }, + { "stock_lock-ok", N_("Encrypted, strong") }, }; /* TODO: this could probably be virtual on em-format-html @@ -595,6 +596,7 @@ efh_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, Camel && (valid->encrypt.status != CAMEL_CIPHER_VALIDITY_ENCRYPT_NONE || valid->sign.status != CAMEL_CIPHER_VALIDITY_SIGN_NONE)) { char *classid; + gchar *iconpath; CamelMimePart *iconpart; camel_stream_printf(stream, "<table border=0 width=\"100%%\" cellpadding=3 cellspacing=0 bgcolor=%s><tr>", @@ -602,12 +604,13 @@ efh_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, Camel classid = g_strdup_printf("smime:///em-format-html/%s/icon/signed", emf->part_id->str); camel_stream_printf(stream, "<td valign=\"top\"><img src=\"%s\"></td><td valign=\"top\" width=\"100%%\">", classid); - iconpart = em_format_html_file_part((EMFormatHTML *)emf, "image/png", - EVOLUTION_ICONSDIR, smime_sign_table[valid->sign.status].icon); + iconpath = e_icon_factory_get_icon_filename (smime_sign_table[valid->sign.status].icon, 48); + iconpart = em_format_html_file_part((EMFormatHTML *)emf, "image/png", iconpath); if (iconpart) { (void)em_format_add_puri(emf, sizeof(EMFormatPURI), classid, iconpart, efh_write_image); camel_object_unref(iconpart); } + g_free (iconpath); g_free(classid); if (valid->sign.status != CAMEL_CIPHER_VALIDITY_SIGN_NONE) { @@ -1679,7 +1682,7 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part) classid = g_strdup_printf("icon:///em-format-html/%s/icon/header", emf->part_id->str); camel_stream_printf(stream, "<td align=\"right\" valign=\"top\"><img width=16 height=16 src=\"%s\"></td>", classid); - iconpart = em_format_html_file_part((EMFormatHTML *)emf, "image/png", EVOLUTION_ICONSDIR, "monkey-16.png"); + iconpart = em_format_html_file_part((EMFormatHTML *)emf, "image/png", EVOLUTION_ICONSDIR "/monkey-16.png"); if (iconpart) { em_format_add_puri(emf, sizeof(EMFormatPURI), classid, iconpart, efh_write_image); camel_object_unref(iconpart); diff --git a/mail/em-format-html.h b/mail/em-format-html.h index ae416a9301..17248a92d5 100644 --- a/mail/em-format-html.h +++ b/mail/em-format-html.h @@ -138,7 +138,7 @@ void em_format_html_set_mark_citations(EMFormatHTML *emf, int state, guint32 cit void em_format_html_set_xmailer_mask(EMFormatHTML *emf, unsigned int xmailer_mask); /* retrieves a pseudo-part icon wrapper for a file */ -struct _CamelMimePart *em_format_html_file_part(EMFormatHTML *efh, const char *mime_type, const char *path, const char *name); +struct _CamelMimePart *em_format_html_file_part(EMFormatHTML *efh, const char *mime_type, const char *filename); /* for implementers */ EMFormatHTMLPObject *em_format_html_add_pobject(EMFormatHTML *efh, size_t size, const char *classid, struct _CamelMimePart *part, EMFormatHTMLPObjectFunc func); diff --git a/mail/em-popup.c b/mail/em-popup.c index 60f10dbb04..6e3a57ebd5 100644 --- a/mail/em-popup.c +++ b/mail/em-popup.c @@ -44,6 +44,7 @@ #include "em-popup.h" #include "e-util/e-msgport.h" +#include <e-util/e-icon-factory.h> #include "em-utils.h" #include <camel/camel-store.h> @@ -292,12 +293,12 @@ em_popup_create_menu(EMPopup *emp, guint32 hide_mask, guint32 disable_mask) switch (item->type & EM_POPUP_TYPE_MASK) { case EM_POPUP_ITEM: if (item->image) { - char *path; + GdkPixbuf *pixbuf; GtkWidget *image; - path = g_build_filename(EVOLUTION_IMAGES, (char *)item->image, NULL); - image = gtk_image_new_from_file(path); - g_free(path); + pixbuf = e_icon_factory_get_icon ((char *)item->image, 16); + image = gtk_image_new_from_pixbuf (pixbuf); + g_object_unref (pixbuf); gtk_widget_show(image); menuitem = (GtkMenuItem *)gtk_image_menu_item_new(); @@ -686,7 +687,7 @@ emp_popup_saveas(GtkWidget *w, EMPopupTarget *t) static EMPopupItem emp_standard_select_popups[] = { /*{ EM_POPUP_ITEM, "00.select.00", N_("_Open"), G_CALLBACK(emp_popup_open), NULL, NULL, 0 },*/ { EM_POPUP_ITEM, "00.select.01", N_("_Edit as New Message..."), G_CALLBACK(emp_popup_resend), NULL, NULL, EM_POPUP_SELECT_RESEND }, - { EM_POPUP_ITEM, "00.select.02", N_("_Save As..."), G_CALLBACK(emp_popup_saveas), NULL, "save-as-16.png", 0 }, + { EM_POPUP_ITEM, "00.select.02", N_("_Save As..."), G_CALLBACK(emp_popup_saveas), NULL, "stock_save_as", 0 }, }; #endif @@ -801,14 +802,14 @@ emp_part_popup_forward (GtkWidget *w, EMPopupTarget *t) } static EMPopupItem emp_standard_object_popups[] = { - { EM_POPUP_ITEM, "00.part.00", N_("_Save As..."), G_CALLBACK(emp_part_popup_saveas), NULL, "save-as-16.png", 0 }, + { EM_POPUP_ITEM, "00.part.00", N_("_Save As..."), G_CALLBACK(emp_part_popup_saveas), NULL, "stock_save_as", 0 }, { EM_POPUP_ITEM, "00.part.10", N_("Set as _Background"), G_CALLBACK(emp_part_popup_set_background), NULL, NULL, EM_POPUP_PART_IMAGE }, { EM_POPUP_BAR, "10.part", NULL, NULL, NULL, NULL, EM_POPUP_PART_MESSAGE }, - { EM_POPUP_ITEM, "10.part.00", N_("_Reply to sender"), G_CALLBACK(emp_part_popup_reply_sender), NULL, "reply.xpm" , EM_POPUP_PART_MESSAGE }, + { EM_POPUP_ITEM, "10.part.00", N_("_Reply to sender"), G_CALLBACK(emp_part_popup_reply_sender), NULL, "stock_mail-reply" , EM_POPUP_PART_MESSAGE }, { EM_POPUP_ITEM, "10.part.01", N_("Reply to _List"), G_CALLBACK(emp_part_popup_reply_list), NULL, NULL, EM_POPUP_PART_MESSAGE}, - { EM_POPUP_ITEM, "10.part.03", N_("Reply to _All"), G_CALLBACK(emp_part_popup_reply_all), NULL, "reply_to_all.xpm", EM_POPUP_PART_MESSAGE}, + { EM_POPUP_ITEM, "10.part.03", N_("Reply to _All"), G_CALLBACK(emp_part_popup_reply_all), NULL, "stock_mail-reply_to_all", EM_POPUP_PART_MESSAGE}, { EM_POPUP_BAR, "20.part", NULL, NULL, NULL, NULL, EM_POPUP_PART_MESSAGE }, - { EM_POPUP_ITEM, "20.part.00", N_("_Forward"), G_CALLBACK(emp_part_popup_forward), NULL, "forward.xpm", EM_POPUP_PART_MESSAGE }, + { EM_POPUP_ITEM, "20.part.00", N_("_Forward"), G_CALLBACK(emp_part_popup_forward), NULL, "stock_mail-forward", EM_POPUP_PART_MESSAGE }, }; diff --git a/mail/mail-component.c b/mail/mail-component.c index 9cef8556ef..815a547e4e 100644 --- a/mail/mail-component.c +++ b/mail/mail-component.c @@ -534,7 +534,7 @@ impl_createControls (PortableServer_Servant servant, gtk_widget_show (statusbar_widget); vbox = gtk_vbox_new(FALSE, 0); - info = e_info_label_new("evolution-inbox-mini.png"); + info = e_info_label_new("stock_mail"); e_info_label_set_info((EInfoLabel *)info, _("Mail"), ""); gtk_box_pack_start((GtkBox *)vbox, info, FALSE, TRUE, 0); gtk_box_pack_start((GtkBox *)vbox, tree_widget, TRUE, TRUE, 0); @@ -650,7 +650,7 @@ impl__get_userCreatableItems (PortableServer_Servant servant, CORBA_Environment list->_buffer[0].menuDescription = _("_Mail Message"); list->_buffer[0].tooltip = _("Compose a new mail message"); list->_buffer[0].menuShortcut = 'm'; - list->_buffer[0].iconName = "new-message.xpm"; + list->_buffer[0].iconName = "stock_mail-compose"; list->_buffer[0].type = GNOME_Evolution_CREATABLE_OBJECT; list->_buffer[1].id = "folder"; @@ -658,7 +658,7 @@ impl__get_userCreatableItems (PortableServer_Servant servant, CORBA_Environment list->_buffer[1].menuDescription = _("Mail _Folder"); list->_buffer[1].tooltip = _("Create a new mail folder"); list->_buffer[1].menuShortcut = 'f'; - list->_buffer[1].iconName = "folder-mini.png"; + list->_buffer[1].iconName = "stock_folder"; list->_buffer[1].type = GNOME_Evolution_CREATABLE_FOLDER; return list; diff --git a/mail/mail-config-druid.c b/mail/mail-config-druid.c index fec23462c4..33453916aa 100644 --- a/mail/mail-config-druid.c +++ b/mail/mail-config-druid.c @@ -49,6 +49,7 @@ #include <evolution-wizard.h> #include <e-util/e-account.h> +#include <e-util/e-icon-factory.h> typedef enum { MAIL_CONFIG_WIZARD_PAGE_NONE = -1, @@ -353,17 +354,14 @@ management_activate_cb (GtkEntry *ent, gpointer user_data) config_wizard_set_page (mcw, mcw->page + 1); } - -#define WIZARD_ICON(name) (EVOLUTION_IMAGES "/mail-config-druid-" name ".png") - static struct { - const char *page_name, *title, *icon_path; + const char *page_name, *title, *icon_name; void (*prepare_func) (MailConfigWizard *mcw); gboolean (*back_func) (MailConfigWizard *mcw); gboolean (*next_func) (MailConfigWizard *mcw); const char *help_text; } wizard_pages[] = { - { "identity_page", N_("Identity"), WIZARD_ICON ("identity"), + { "identity_page", N_("Identity"), "stock_contact", identity_prepare, NULL, identity_next, N_("Please enter your name and email address below. " "The \"optional\" fields below do not need to be " @@ -371,26 +369,26 @@ static struct { "information in email you send.") }, - { "source_page", N_("Receiving Mail"), WIZARD_ICON ("receive"), + { "source_page", N_("Receiving Mail"), "stock_mail-receive", source_prepare, NULL, source_next, N_("Please enter information about your incoming " "mail server below. If you are not sure, ask your " "system administrator or Internet Service Provider.") }, - { "extra_page", N_("Receiving Mail"), WIZARD_ICON ("receive"), + { "extra_page", N_("Receiving Mail"), "stock_mail-receive", extra_prepare, NULL, NULL, N_("Please select among the following options") }, - { "transport_page", N_("Sending Mail"), WIZARD_ICON ("send"), + { "transport_page", N_("Sending Mail"), "stock_mail-send", transport_prepare, transport_back, transport_next, N_("Please enter information about the way you will " "send mail. If you are not sure, ask your system " "administrator or Internet Service Provider.") }, - { "management_page", N_("Account Management"), WIZARD_ICON ("account-name"), + { "management_page", N_("Account Management"), "stock_person", management_prepare, NULL, NULL, N_("You are almost done with the mail configuration " "process. The identity, incoming mail server and " @@ -611,6 +609,7 @@ mail_config_druid_new (void) { MailConfigWizard *mcw; GtkWidget *new, *page; + GdkPixbuf *icon; int i; mcw = config_wizard_new (); @@ -622,6 +621,9 @@ mail_config_druid_new (void) for (i = 0; i < num_wizard_pages; i++) { page = glade_xml_get_widget (mcw->gui->xml, wizard_pages[i].page_name); + icon = e_icon_factory_get_icon (wizard_pages[i].icon_name, 48); + gnome_druid_page_standard_set_logo (GNOME_DRUID_PAGE_STANDARD (page), icon); + g_object_unref (icon); g_ptr_array_add (mcw->interior_pages, page); gtk_box_pack_start (GTK_BOX (GNOME_DRUID_PAGE_STANDARD (page)->vbox), get_page (mcw->gui->xml, i), @@ -746,7 +748,7 @@ evolution_mail_config_wizard_new (void) wizard = evolution_wizard_new (); for (i = 0; i < MAIL_CONFIG_WIZARD_NUM_PAGES; i++) { - icon = gdk_pixbuf_new_from_file (wizard_pages[i].icon_path, NULL); + icon = e_icon_factory_get_icon (wizard_pages[i].icon_name, 48); evolution_wizard_add_page (wizard, _(wizard_pages[i].title), icon, get_page (mcw->gui->xml, i)); g_object_unref (icon); diff --git a/mail/mail-config.glade b/mail/mail-config.glade index 02385254b9..93f0301c31 100644 --- a/mail/mail-config.glade +++ b/mail/mail-config.glade @@ -33,7 +33,6 @@ Click "Forward" to begin. </property> <widget class="GnomeDruidPageStandard" id="identity_page"> <property name="visible">True</property> <property name="title" translatable="yes">Identity</property> - <property name="logo">mail-config-druid-identity.png</property> <child internal-child="vbox"> <widget class="GtkVBox" id="druid_identity_vbox"> @@ -54,7 +53,6 @@ Click "Forward" to begin. </property> <widget class="GnomeDruidPageStandard" id="source_page"> <property name="visible">True</property> <property name="title" translatable="yes">Receiving Email</property> - <property name="logo">mail-config-druid-receive.png</property> <child internal-child="vbox"> <widget class="GtkVBox" id="druid_source_vbox"> @@ -75,7 +73,6 @@ Click "Forward" to begin. </property> <widget class="GnomeDruidPageStandard" id="extra_page"> <property name="visible">True</property> <property name="title" translatable="yes">Receiving Email</property> - <property name="logo">mail-config-druid-receive.png</property> <child internal-child="vbox"> <widget class="GtkVBox" id="druid_extra_vbox"> @@ -96,7 +93,6 @@ Click "Forward" to begin. </property> <widget class="GnomeDruidPageStandard" id="transport_page"> <property name="visible">True</property> <property name="title" translatable="yes">Sending Email</property> - <property name="logo">mail-config-druid-send.png</property> <child internal-child="vbox"> <widget class="GtkVBox" id="druid_transport_vbox"> @@ -117,7 +113,6 @@ Click "Forward" to begin. </property> <widget class="GnomeDruidPageStandard" id="management_page"> <property name="visible">True</property> <property name="title" translatable="yes">Account Management</property> - <property name="logo">mail-config-druid-account-name.png</property> <child internal-child="vbox"> <widget class="GtkVBox" id="druid_management_vbox"> diff --git a/mail/mail-mt.c b/mail/mail-mt.c index 7afb2efe18..4c353195de 100644 --- a/mail/mail-mt.c +++ b/mail/mail-mt.c @@ -22,6 +22,7 @@ #include "camel/camel-operation.h" #include "e-activity-handler.h" +#include <e-util/e-icon-factory.h> #include "mail-config.h" #include "camel/camel-url.h" @@ -52,9 +53,6 @@ struct _mail_msg_priv { int activity_id; }; -/* This is used for the mail status bar, cheap and easy */ -#include "art/mail-new.xpm" - static GdkPixbuf *progress_icon = NULL; /* mail_msg stuff */ @@ -894,7 +892,7 @@ static void do_op_status(struct _mail_msg *mm) data->activity_state = 1; if (progress_icon == NULL) - progress_icon = gdk_pixbuf_new_from_xpm_data ((const char **)mail_new_xpm); + progress_icon = e_icon_factory_get_icon ("stock_mail-unread", 16); MAIL_MT_UNLOCK (mail_msg_lock); if (msg->ops->describe_msg) diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c index 3cd99eaedb..ebd233f586 100644 --- a/mail/mail-send-recv.c +++ b/mail/mail-send-recv.c @@ -27,7 +27,7 @@ #include <stdio.h> #include <string.h> -/* for the dialogue stuff */ +/* for the dialog stuff */ #include <glib.h> #include <gtk/gtkmain.h> #include <gtk/gtkdialog.h> @@ -56,6 +56,7 @@ #include "mail-ops.h" #include "mail-send-recv.h" #include "mail-folder-cache.h" +#include <e-util/e-icon-factory.h> #define d(x) @@ -313,6 +314,8 @@ build_dialog (EAccountList *accounts, CamelFolder *outbox, const char *destinati char *pretty_url; EAccount *account; EIterator *iter; + GdkPixbuf *pixbuf; + GList *icon_list; gd = (GtkDialog *)send_recv_dialog = gtk_dialog_new_with_buttons(_("Send & Receive Mail"), NULL, GTK_DIALOG_NO_SEPARATOR, NULL); gtk_window_set_modal ((GtkWindow *) gd, FALSE); @@ -320,7 +323,13 @@ build_dialog (EAccountList *accounts, CamelFolder *outbox, const char *destinati stop = (GtkButton *)e_gtk_button_new_with_icon(_("Cancel _All"), GTK_STOCK_CANCEL); gtk_widget_show((GtkWidget *)stop); gtk_dialog_add_action_widget(gd, (GtkWidget *)stop, GTK_RESPONSE_CANCEL); - gnome_window_icon_set_from_file (GTK_WINDOW (gd), EVOLUTION_ICONSDIR "/send-receive.xpm"); + + icon_list = e_icon_factory_get_icon_list ("stock_mail-send-receive"); + if (icon_list) { + gtk_window_set_icon_list (GTK_WINDOW (gd), icon_list); + g_list_foreach (icon_list, (GFunc) g_object_unref, NULL); + g_list_free (icon_list); + } num_sources = 0; @@ -388,7 +397,9 @@ build_dialog (EAccountList *accounts, CamelFolder *outbox, const char *destinati } else if (info->timeout_id == 0) info->timeout_id = g_timeout_add (STATUS_TIMEOUT, operation_status_timeout, info); - recv_icon = gtk_image_new_from_file (EVOLUTION_BUTTONSDIR "/receive-24.png"); + pixbuf = e_icon_factory_get_icon ("stock_mail-receive", 24); + recv_icon = gtk_image_new_from_pixbuf (pixbuf); + gdk_pixbuf_unref (pixbuf); pretty_url = format_url (source->url); label = (GtkLabel *)gtk_label_new (pretty_url); @@ -441,7 +452,9 @@ build_dialog (EAccountList *accounts, CamelFolder *outbox, const char *destinati } else if (info->timeout_id == 0) info->timeout_id = g_timeout_add (STATUS_TIMEOUT, operation_status_timeout, info); - send_icon = gtk_image_new_from_file (EVOLUTION_BUTTONSDIR "/send-24.png"); + pixbuf = e_icon_factory_get_icon ("stock_mail-send", 24); + send_icon = gtk_image_new_from_pixbuf (pixbuf); + gdk_pixbuf_unref (pixbuf); pretty_url = format_url (destination); label = (GtkLabel *)gtk_label_new (pretty_url); diff --git a/mail/message-list.c b/mail/message-list.c index b46a553f65..661f695b82 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -62,22 +62,7 @@ #include "mail-ops.h" #include "em-utils.h" - -#include "art/mail-new.xpm" -#include "art/mail-read.xpm" -#include "art/mail-replied.xpm" -#include "art/attachment.xpm" -#include "art/priority-high.xpm" -#include "art/empty.xpm" -#include "art/score-lowest.xpm" -#include "art/score-lower.xpm" -#include "art/score-low.xpm" -#include "art/score-normal.xpm" -#include "art/score-high.xpm" -#include "art/score-higher.xpm" -#include "art/score-highest.xpm" -#include "art/flag-for-followup.xpm" -#include "art/flag-for-followup-done.xpm" +#include <e-util/e-icon-factory.h> /*#define TIMEIT */ @@ -172,28 +157,27 @@ enum { static guint message_list_signals [LAST_SIGNAL] = {0, }; static struct { - char **image_base; + gchar *icon_name; GdkPixbuf *pixbuf; } states_pixmaps [] = { - { mail_new_xpm, NULL }, - { mail_read_xpm, NULL }, - { mail_replied_xpm, NULL }, -/* FIXME: Replace these with pixmaps for multiple_read and multiple_unread */ - { mail_new_xpm, NULL }, - { mail_read_xpm, NULL }, - { empty_xpm, NULL }, - { attachment_xpm, NULL }, - { priority_high_xpm, NULL }, - { score_lowest_xpm, NULL }, - { score_lower_xpm, NULL }, - { score_low_xpm, NULL }, - { score_normal_xpm, NULL }, - { score_high_xpm, NULL }, - { score_higher_xpm, NULL }, - { score_highest_xpm, NULL }, - { flag_for_followup_xpm,NULL }, - { flag_for_followup_done_xpm,NULL }, - { NULL, NULL } + { "stock_mail-unread", NULL }, + { "stock_mail-open", NULL }, + { "stock_mail-replied", NULL }, + { "stock_mail-unread-multiple", NULL }, + { "stock_mail-open-multiple", NULL }, + { "", NULL }, + { "stock_attach", NULL }, + { "stock_mail-priority-high", NULL }, + { "stock_score-lowest", NULL }, + { "stock_score-lower", NULL }, + { "stock_score-low", NULL }, + { "stock_score-normal", NULL }, + { "stock_score-high", NULL }, + { "stock_score-higher", NULL }, + { "stock_score-highest", NULL }, + { "stock_mail-flag-for-followup", NULL }, + { "stock_mail-flag-for-followup-done", NULL }, + { NULL, NULL } }; /* FIXME: junk prefs */ @@ -1243,9 +1227,8 @@ message_list_init_images (void) if (states_pixmaps [0].pixbuf) return; - for (i = 0; states_pixmaps [i].image_base; i++){ - states_pixmaps [i].pixbuf = gdk_pixbuf_new_from_xpm_data ( - (const char **) states_pixmaps [i].image_base); + for (i = 0; states_pixmaps [i].icon_name; i++){ + states_pixmaps [i].pixbuf = e_icon_factory_get_icon (states_pixmaps [i].icon_name, 16); } } diff --git a/mail/message-tag-followup.c b/mail/message-tag-followup.c index 404522f1f3..45794520ca 100644 --- a/mail/message-tag-followup.c +++ b/mail/message-tag-followup.c @@ -43,11 +43,11 @@ #include <gconf/gconf.h> #include <gconf/gconf-client.h> -#include <libgnomeui/gnome-window-icon.h> #include <libgnomeui/gnome-pixmap.h> #include "message-tag-followup.h" #include "mail-config.h" +#include <e-util/e-icon-factory.h> static void message_tag_followup_class_init (MessageTagFollowUpClass *class); static void message_tag_followup_init (MessageTagFollowUp *followup); @@ -276,10 +276,18 @@ construct (MessageTagEditor *editor) GtkWidget *widget; GList *strings; GladeXML *gui; + GList *icon_list; + GdkPixbuf *pixbuf; int i; gtk_window_set_title (GTK_WINDOW (editor), _("Flag to Follow Up")); - gnome_window_icon_set_from_file (GTK_WINDOW (editor), EVOLUTION_IMAGES "/flag-for-followup-16.png"); + + icon_list = e_icon_factory_get_icon_list ("stock_mail-flag-for-followup"); + if (icon_list) { + gtk_window_set_icon_list (GTK_WINDOW (editor), icon_list); + g_list_foreach (icon_list, (GFunc) g_object_unref, NULL); + g_list_free (icon_list); + } gtk_dialog_set_has_separator (GTK_DIALOG (editor), FALSE); gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (editor)->vbox), 0); @@ -294,7 +302,9 @@ construct (MessageTagEditor *editor) gtk_box_set_child_packing (GTK_BOX (GTK_DIALOG (editor)->vbox), widget, TRUE, TRUE, 6, GTK_PACK_START); widget = glade_xml_get_widget (gui, "pixmap"); - gtk_image_set_from_file ((GtkImage *)widget, EVOLUTION_GLADEDIR "/flag-for-followup-48.png"); + pixbuf = e_icon_factory_get_icon ("stock_mail-flag-for-followup", 48); + gtk_image_set_from_pixbuf ((GtkImage *)widget, pixbuf); + g_object_unref (pixbuf); followup->message_list = GTK_TREE_VIEW (glade_xml_get_widget (gui, "message_list")); model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING); diff --git a/mail/message-tags.glade b/mail/message-tags.glade index c8601cfbf3..f36db4cc85 100644 --- a/mail/message-tags.glade +++ b/mail/message-tags.glade @@ -70,13 +70,13 @@ <property name="spacing">6</property> <child> - <widget class="GtkImage" id="pixmap"> + <widget class="Custom" id="pixmap"> <property name="visible">True</property> - <property name="pixbuf">flag-for-followup-48.png</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> + <property name="creation_function">e_create_image_widget</property> + <property name="string1">stock_flag-for-followup</property> + <property name="string2"></property> + <property name="int1">0</property> + <property name="int2">0</property> </widget> <packing> <property name="padding">0</property> |