[evolution-patches] Icon Theme Patch
- From: Rodney Dawes <dobey ximian com>
- To: evolution-patches ximian com
- Cc: mike mterry name
- Subject: [evolution-patches] Icon Theme Patch
- Date: Fri, 16 Apr 2004 15:56:16 -0400
So,
Here it finally is. I've gone through and updated the patch to
apply/build against the latest cvs (as of 3:50 PM EST today, anyway).
I've also gone through and taken care to fix the issues where the patch
was requesting the wrong icon names, and the places where we've recently
changed things that add new widgets that weren't using this stuff. The
ChangeLog entries contain the mostly appropriate accredidation of either
Michael Terry, or myself. It also requires gnome-icon-theme 1.2.0 at
configure time now, since there is a pkgconfig file there. I'd like to
get this committed as soon as possible. It works great, except for like
one or two problems in the icon theme itself, where images get scaled
up. It is particularly noticable in the mailer for the Important column.
I've filed a bug against gnome-icon-theme upstream for Jakub to fix.
I also know how to do the right thing for fallback icons now, but I want
to get these bits out of my tree, so I don't have 80+ modified files
sitting around, waiting to get more conflicts from cvs updates. The
patch works great for me.
-- dobey
? addressbook/gui/foo.patch
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/ChangeLog,v
retrieving revision 1.1324
diff -u -r1.1324 ChangeLog
--- ChangeLog 9 Apr 2004 19:06:57 -0000 1.1324
+++ ChangeLog 16 Apr 2004 19:46:51 -0000
@@ -1,3 +1,11 @@
+2004-04-16 Rodney Dawes <dobey ximian com>
+
+ * configure.in: Require gnome-icon-theme >= 1.2.0
+
+2004-04-16 Michael Terry <mike mterry name>
+
+ * data/evolution.desktop.in.in: Use the icon theme
+
2004-04-09 Chris Toshok <toshok ximian com>
* configure.in (UPGRADE_REVISION): bump to 8 for new contact list
Index: configure.in
===================================================================
RCS file: /cvs/gnome/evolution/configure.in,v
retrieving revision 1.679
diff -u -r1.679 configure.in
--- configure.in 9 Apr 2004 19:06:57 -0000 1.679
+++ configure.in 16 Apr 2004 19:46:51 -0000
@@ -261,6 +261,10 @@
AC_DEFINE(GETHOSTBYADDR_R_SEVEN_ARGS, 1, [Solaris-style gethostbyaddr_r])
fi
+dnl **************************************************
+dnl * Gnome Icon Theme
+dnl **************************************************
+PKG_CHECK_MODULES(GIT, gnome-icon-theme >= 1.2.0)
dnl **************************************************
dnl * Accessibility support
Index: addressbook/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/ChangeLog,v
retrieving revision 1.1653
diff -u -r1.1653 ChangeLog
--- addressbook/ChangeLog 16 Apr 2004 08:23:37 -0000 1.1653
+++ addressbook/ChangeLog 16 Apr 2004 19:46:51 -0000
@@ -1,3 +1,26 @@
+2004-04-16 Rodney Dawes <dobey ximian com>
+
+ * gui/contact-editor/contact-editor.glade: Set the default image for
+ the contact photo to be the stock_person image in the icon theme
+
+2004-04-16 Michael Terry <mike mterry name>
+
+ * gui/component/GNOME_Evolution_Addressbook.server.in.in:
+ * gui/component/addressbook-component.c:
+ * gui/component/addressbook-view.c:
+ * gui/component/select-names/e-select-names-popup.c:
+ * gui/contact-editor/e-contact-editor-address.c:
+ * gui/contact-editor/e-contact-editor-fullname.c:
+ * gui/contact-editor/e-contact-editor-im.c:
+ * gui/contact-list-editor/contact-list-editor.glade:
+ * gui/contact-list-editor/e-contact-list-editor.c:
+ * gui/merging/eab-contact-commit-duplicate-detected.glade:
+ * gui/merging/eab-contact-duplicate-detected.glade:
+ * gui/widgets/e-minicard.c:
+ * gui/widgets/eab-contact-display.c:
+ * gui/widgets/eab-gui-util.c: Update the addressbook to use the icon
+ theme via the EIconFactory object in e-util
+
2004-04-16 Hans Petter Jansson <hpj ximian com>
* gui/contact-editor/contact-editor.glade: Commit new contact editor
Index: addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in,v
retrieving revision 1.12
diff -u -r1.12 GNOME_Evolution_Addressbook.server.in.in
--- addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in 6 Dec 2003 23:19:00 -0000 1.12
+++ addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in 16 Apr 2004 19:46:51 -0000
@@ -61,7 +61,7 @@
<oaf_attribute name="evolution:button_label" type="string" _value="Contacts"/>
<oaf_attribute name="evolution:button_sort_order" type="string" value="-9"/>
- <oaf_attribute name="evolution:button_icon" type="string" value="evolution-contacts.png"/>
+ <oaf_attribute name="evolution:button_icon" type="string" value="stock_addressbook"/>
</oaf_server>
@@ -108,7 +108,7 @@
_value="Manager your S/Mime certificates here"/>
<oaf_attribute name="evolution2:config_item:icon_name" type="string"
- value="pgp-signature-ok.png"/>
+ value="stock_lock-ok"/>
<oaf_attribute name="evolution2:config_item:priority" type="string" value="-6"/>
@@ -132,7 +132,7 @@
_value="Configure autocomple here"/>
<oaf_attribute name="evolution2:config_item:icon_name" type="string"
- value="folder-settings.png"/>
+ value="stock_contact"/>
<oaf_attribute name="evolution2:config_item:priority" type="string" value="-9"/>
Index: addressbook/gui/component/addressbook-component.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/component/addressbook-component.c,v
retrieving revision 1.124
diff -u -r1.124 addressbook-component.c
--- addressbook/gui/component/addressbook-component.c 15 Apr 2004 02:14:35 -0000 1.124
+++ addressbook/gui/component/addressbook-component.c 16 Apr 2004 19:46:51 -0000
@@ -94,7 +94,7 @@
list->_buffer[0].menuDescription = _("_Contact");
list->_buffer[0].tooltip = _("Create a new contact");
list->_buffer[0].menuShortcut = 'c';
- list->_buffer[0].iconName = "evolution-contacts-mini.png";
+ list->_buffer[0].iconName = "stock_contact";
list->_buffer[0].type = GNOME_Evolution_CREATABLE_OBJECT;
list->_buffer[1].id = "contact_list";
@@ -102,7 +102,7 @@
list->_buffer[1].menuDescription = _("Contact _List");
list->_buffer[1].tooltip = _("Create a new contact list");
list->_buffer[1].menuShortcut = 'l';
- list->_buffer[1].iconName = "contact-list-16.png";
+ list->_buffer[1].iconName = "stock_contact-list";
list->_buffer[1].type = GNOME_Evolution_CREATABLE_OBJECT;
list->_buffer[2].id = "address_book";
@@ -110,7 +110,7 @@
list->_buffer[2].menuDescription = _("_Contacts Group");
list->_buffer[2].tooltip = _("Create a new contacts group");
list->_buffer[2].menuShortcut = 'g';
- list->_buffer[2].iconName = "evolution-contacts-mini.png";
+ list->_buffer[2].iconName = "stock_addressbook";
list->_buffer[2].type = GNOME_Evolution_CREATABLE_FOLDER;
return list;
Index: addressbook/gui/component/addressbook-view.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/component/addressbook-view.c,v
retrieving revision 1.2
diff -u -r1.2 addressbook-view.c
--- addressbook/gui/component/addressbook-view.c 15 Apr 2004 03:11:22 -0000 1.2
+++ addressbook/gui/component/addressbook-view.c 16 Apr 2004 19:46:51 -0000
@@ -44,6 +44,7 @@
#include "widgets/misc/e-source-selector.h"
#include "e-util/e-passwords.h"
+#include "e-util/e-icon-factory.h"
#include "shell/e-user-creatable-items-handler.h"
#include "evolution-shell-component-utils.h"
@@ -66,7 +67,7 @@
static GObjectClass *parent_class = NULL;
/* This is used for the addressbook status bar */
-#define EVOLUTION_CONTACTS_PROGRESS_IMAGE "evolution-contacts-mini.png"
+#define EVOLUTION_CONTACTS_PROGRESS_IMAGE "stock_contact"
static GdkPixbuf *progress_icon = NULL;
#define d(x)
@@ -285,7 +286,7 @@
char *clientid = g_strdup_printf ("%p", view);
if (progress_icon == NULL)
- progress_icon = gdk_pixbuf_new_from_file (EVOLUTION_IMAGESDIR "/" EVOLUTION_CONTACTS_PROGRESS_IMAGE, NULL);
+ progress_icon = e_icon_factory_get_icon (EVOLUTION_CONTACTS_PROGRESS_IMAGE, 16);
priv->activity_id = e_activity_handler_operation_started (activity_handler, clientid,
progress_icon, message, TRUE);
@@ -432,17 +433,17 @@
};
static EPixmap pixmaps [] = {
- E_PIXMAP ("/menu/File/FileOps/ContactsSaveAsVCard", "save-as-16.png"),
- E_PIXMAP ("/menu/File/Print/ContactsPrint", "print.xpm"),
- E_PIXMAP ("/menu/File/Print/ContactsPrintPreview", "print-preview.xpm"),
-
- E_PIXMAP ("/menu/EditPlaceholder/Edit/ContactsCut", "16_cut.png"),
- E_PIXMAP ("/menu/EditPlaceholder/Edit/ContactsCopy", "16_copy.png"),
- E_PIXMAP ("/menu/EditPlaceholder/Edit/ContactsPaste", "16_paste.png"),
- E_PIXMAP ("/menu/EditPlaceholder/Edit/ContactDelete", "evolution-trash-mini.png"),
+ E_PIXMAP ("/menu/File/FileOps/ContactsSaveAsVCard", "stock_save_as", 16),
+ E_PIXMAP ("/menu/File/Print/ContactsPrint", "stock_print", 16),
+ E_PIXMAP ("/menu/File/Print/ContactsPrintPreview", "stock_print-preview", 16),
+
+ E_PIXMAP ("/menu/EditPlaceholder/Edit/ContactsCut", "stock_cut", 16),
+ E_PIXMAP ("/menu/EditPlaceholder/Edit/ContactsCopy", "stock_copy", 16),
+ E_PIXMAP ("/menu/EditPlaceholder/Edit/ContactsPaste", "stock_paste", 16),
+ E_PIXMAP ("/menu/EditPlaceholder/Edit/ContactDelete", "stock_delete", 16),
- E_PIXMAP ("/Toolbar/ContactsPrint", "buttons/print.png"),
- E_PIXMAP ("/Toolbar/ContactDelete", "buttons/delete-message.png"),
+ E_PIXMAP ("/Toolbar/ContactsPrint", "stock_print", 24),
+ E_PIXMAP ("/Toolbar/ContactDelete", "stock_delete", 24),
E_PIXMAP_END
};
@@ -1026,7 +1027,7 @@
e_activity_handler_attach_task_bar (priv->activity_handler,
E_TASK_BAR (priv->statusbar_widget));
- priv->info_widget = e_info_label_new("evolution-contacts-mini.png");
+ priv->info_widget = e_info_label_new("stock_contact");
e_info_label_set_info((EInfoLabel*)priv->info_widget, _("Contacts"), "");
gtk_widget_show (priv->info_widget);
Index: addressbook/gui/component/select-names/e-select-names-popup.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/component/select-names/e-select-names-popup.c,v
retrieving revision 1.31
diff -u -r1.31 e-select-names-popup.c
--- addressbook/gui/component/select-names/e-select-names-popup.c 9 Apr 2004 17:26:46 -0000 1.31
+++ addressbook/gui/component/select-names/e-select-names-popup.c 16 Apr 2004 19:46:51 -0000
@@ -44,9 +44,10 @@
#include <addressbook/gui/contact-editor/e-contact-quick-add.h>
#include "eab-gui-util.h"
#include "e-select-names-popup.h"
+#include <e-util/e-icon-factory.h>
-#define LIST_ICON_FILENAME "contact-list-16.png"
-#define CONTACT_ICON_FILENAME "evolution-contacts-mini.png"
+#define LIST_ICON_NAME "stock_contact-list"
+#define CONTACT_ICON_NAME "stock_contact"
typedef struct _PopupInfo PopupInfo;
struct _PopupInfo {
@@ -191,6 +192,7 @@
static void
populate_popup_contact (GtkWidget *pop, gboolean list, PopupInfo *info)
{
+ GdkPixbuf *pixbuf;
GtkWidget *image;
EContact *contact;
GtkWidget *menuitem;
@@ -289,9 +291,9 @@
gtk_widget_show (menuitem);
gtk_menu_shell_prepend (GTK_MENU_SHELL (pop), menuitem);
- image = gtk_image_new_from_file (list
- ? EVOLUTION_IMAGESDIR "/" LIST_ICON_FILENAME
- : EVOLUTION_IMAGESDIR "/" CONTACT_ICON_FILENAME);
+ pixbuf = e_icon_factory_get_icon (list ? LIST_ICON_NAME : CONTACT_ICON_NAME, 16);
+ image = gtk_image_new_from_pixbuf (pixbuf);
+ g_object_unref (pixbuf);
gtk_widget_show (image);
menuitem = gtk_image_menu_item_new_with_label (e_destination_get_name (info->dest));
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem),
Index: addressbook/gui/contact-editor/contact-editor.glade
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/contact-editor/contact-editor.glade,v
retrieving revision 1.50
diff -u -r1.50 contact-editor.glade
--- addressbook/gui/contact-editor/contact-editor.glade 16 Apr 2004 08:23:37 -0000 1.50
+++ addressbook/gui/contact-editor/contact-editor.glade 16 Apr 2004 19:46:52 -0000
@@ -64,6 +64,7 @@
<widget class="Custom" id="image-chooser">
<property name="visible">True</property>
<property name="creation_function">eab_create_image_chooser_widget</property>
+ <property name="string1">stock_person</property>
<property name="int1">0</property>
<property name="int2">0</property>
<property name="last_modification_time">Tue, 13 Apr 2004 20:51:33 GMT</property>
Index: addressbook/gui/contact-editor/e-contact-editor-address.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/contact-editor/e-contact-editor-address.c,v
retrieving revision 1.29
diff -u -r1.29 e-contact-editor-address.c
--- addressbook/gui/contact-editor/e-contact-editor-address.c 6 Jan 2004 19:15:50 -0000 1.29
+++ addressbook/gui/contact-editor/e-contact-editor-address.c 16 Apr 2004 19:46:52 -0000
@@ -22,10 +22,10 @@
#include <config.h>
#include <e-contact-editor-address.h>
+#include <e-util/e-icon-factory.h>
#include <glib.h>
#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-window-icon.h>
#include <libgnome/gnome-util.h>
#include <gal/widgets/e-gui-utils.h>
#include <gtk/gtkcombo.h>
@@ -420,7 +420,7 @@
{
GladeXML *gui;
GtkWidget *widget;
- char *icon_path;
+ GList *icon_list;
gtk_dialog_add_buttons (GTK_DIALOG (e_contact_editor_address),
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
@@ -447,9 +447,12 @@
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (e_contact_editor_address)->vbox), widget, TRUE, TRUE, 0);
g_object_unref(widget);
- icon_path = g_concat_dir_and_file (EVOLUTION_IMAGESDIR, "evolution-contacts-mini.png");
- gnome_window_icon_set_from_file (GTK_WINDOW (e_contact_editor_address), icon_path);
- g_free (icon_path);
+ icon_list = e_icon_factory_get_icon_list ("stock_contact");
+ if (icon_list) {
+ gtk_window_set_icon_list (GTK_WINDOW (e_contact_editor_address), icon_list);
+ g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
+ g_list_free (icon_list);
+ }
}
void
Index: addressbook/gui/contact-editor/e-contact-editor-fullname.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/contact-editor/e-contact-editor-fullname.c,v
retrieving revision 1.26
diff -u -r1.26 e-contact-editor-fullname.c
--- addressbook/gui/contact-editor/e-contact-editor-fullname.c 27 Jan 2004 21:47:15 -0000 1.26
+++ addressbook/gui/contact-editor/e-contact-editor-fullname.c 16 Apr 2004 19:46:52 -0000
@@ -21,7 +21,7 @@
#include <config.h>
#include "e-contact-editor-fullname.h"
-#include <libgnomeui/gnome-window-icon.h>
+#include <e-util/e-icon-factory.h>
#include <libgnome/gnome-util.h>
#include <libgnome/gnome-i18n.h>
#include <gtk/gtkcombo.h>
@@ -103,7 +103,7 @@
{
GladeXML *gui;
GtkWidget *widget;
- char *icon_path;
+ GList *icon_list;
gtk_dialog_add_buttons (GTK_DIALOG (e_contact_editor_fullname),
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
@@ -126,9 +126,12 @@
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (e_contact_editor_fullname)->vbox), widget, TRUE, TRUE, 0);
g_object_unref(widget);
- icon_path = g_concat_dir_and_file (EVOLUTION_IMAGESDIR, "evolution-contacts-mini.png");
- gnome_window_icon_set_from_file (GTK_WINDOW (e_contact_editor_fullname), icon_path);
- g_free (icon_path);
+ icon_list = e_icon_factory_get_icon_list ("stock_contact");
+ if (icon_list) {
+ gtk_window_set_icon_list (GTK_WINDOW (e_contact_editor_fullname), icon_list);
+ g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
+ g_list_free (icon_list);
+ }
}
void
Index: addressbook/gui/contact-editor/e-contact-editor-im.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/contact-editor/e-contact-editor-im.c,v
retrieving revision 1.5
diff -u -r1.5 e-contact-editor-im.c
--- addressbook/gui/contact-editor/e-contact-editor-im.c 9 Mar 2004 17:47:02 -0000 1.5
+++ addressbook/gui/contact-editor/e-contact-editor-im.c 16 Apr 2004 19:46:52 -0000
@@ -21,7 +21,6 @@
#include <config.h>
#include "e-contact-editor-im.h"
-#include <libgnomeui/gnome-window-icon.h>
#include <libgnome/gnome-util.h>
#include <libgnome/gnome-i18n.h>
#include <gtk/gtkbox.h>
@@ -34,6 +33,7 @@
#include <gtk/gtksizegroup.h>
#include <gtk/gtkstock.h>
#include <string.h>
+#include <e-util/e-icon-factory.h>
static void e_contact_editor_im_init (EContactEditorIm *card);
static void e_contact_editor_im_class_init (EContactEditorImClass *klass);
@@ -68,12 +68,12 @@
};
static const char *im_images[] = {
- "im-aim.png",
- "im-nov.png",
- "im-jabber.png",
- "im-yahoo.png",
- "im-msn.png",
- "im-icq.png"
+ "im-aim",
+ "im-nov",
+ "im-jabber",
+ "im-yahoo",
+ "im-msn",
+ "im-icq"
};
GType
@@ -176,9 +176,7 @@
GtkWidget *label;
GtkWidget *image;
GdkPixbuf *pixbuf;
- GdkPixbuf *scale;
GtkSizeGroup *sg;
- char *icon_path;
int i;
optmenu = glade_xml_get_widget(editor->gui, "optmenu-service");
@@ -198,16 +196,12 @@
gtk_container_add(GTK_CONTAINER(item), hbox);
gtk_widget_show(hbox);
- icon_path = g_concat_dir_and_file(EVOLUTION_IMAGESDIR, im_images[i]);
- pixbuf = gdk_pixbuf_new_from_file(icon_path, NULL);
- g_free(icon_path);
+ pixbuf = e_icon_factory_get_icon(im_images[i], 16);
if (pixbuf != NULL) {
- scale = gdk_pixbuf_scale_simple(pixbuf, 16, 16, GDK_INTERP_BILINEAR);
- image = gtk_image_new_from_pixbuf(scale);
+ image = gtk_image_new_from_pixbuf(pixbuf);
g_object_unref(G_OBJECT(pixbuf));
- g_object_unref(G_OBJECT(scale));
}
else
image = gtk_image_new();
@@ -261,7 +255,7 @@
{
GladeXML *gui;
GtkWidget *widget;
- char *icon_path;
+ GList *icon_list;
gtk_dialog_add_buttons (GTK_DIALOG (e_contact_editor_im),
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
@@ -295,9 +289,13 @@
gtk_widget_grab_focus(glade_xml_get_widget(gui, "entry-username"));
- icon_path = g_concat_dir_and_file (EVOLUTION_IMAGESDIR, "evolution-contacts-mini.png");
- gnome_window_icon_set_from_file (GTK_WINDOW (e_contact_editor_im), icon_path);
- g_free (icon_path);
+ /* set the icon */
+ icon_list = e_icon_factory_get_icon_list ("stock_contact");
+ if (icon_list) {
+ gtk_window_set_icon_list (GTK_WINDOW (e_contact_editor_im), icon_list);
+ g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
+ g_list_free (icon_list);
+ }
}
void
Index: addressbook/gui/contact-list-editor/contact-list-editor.glade
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/contact-list-editor/contact-list-editor.glade,v
retrieving revision 1.10
diff -u -r1.10 contact-list-editor.glade
--- addressbook/gui/contact-list-editor/contact-list-editor.glade 30 Jan 2004 22:52:39 -0000 1.10
+++ addressbook/gui/contact-list-editor/contact-list-editor.glade 16 Apr 2004 19:46:52 -0000
@@ -81,7 +81,7 @@
<widget class="Custom" id="list-image">
<property name="visible">True</property>
<property name="creation_function">eab_create_image_chooser_widget</property>
- <property name="string1">evolution-contacts-plain.png</property>
+ <property name="string1">stock_addressbook</property>
<property name="int1">0</property>
<property name="int2">0</property>
<property name="last_modification_time">Sat, 23 Jun 2001 05:59:21 GMT</property>
Index: addressbook/gui/contact-list-editor/e-contact-list-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/contact-list-editor/e-contact-list-editor.c,v
retrieving revision 1.52
diff -u -r1.52 e-contact-list-editor.c
--- addressbook/gui/contact-list-editor/e-contact-list-editor.c 9 Apr 2004 17:26:38 -0000 1.52
+++ addressbook/gui/contact-list-editor/e-contact-list-editor.c 16 Apr 2004 19:46:52 -0000
@@ -21,6 +21,7 @@
#include <config.h>
#include "e-contact-list-editor.h"
+#include <e-util/e-icon-factory.h>
#include <string.h>
@@ -182,7 +183,7 @@
GladeXML *gui;
GtkWidget *bonobo_win;
BonoboUIContainer *container;
- char *icon_path;
+ GList *icon_list;
editor->contact = NULL;
editor->changed = FALSE;
@@ -278,9 +279,12 @@
G_CALLBACK (app_delete_event_cb), editor);
/* set the icon */
- icon_path = g_build_filename (EVOLUTION_IMAGESDIR, "contact-list-16.png", NULL);
- gnome_window_icon_set_from_file (GTK_WINDOW (editor->app), icon_path);
- g_free (icon_path);
+ icon_list = e_icon_factory_get_icon_list ("stock_contact-list");
+ if (icon_list) {
+ gtk_window_set_icon_list (GTK_WINDOW (editor->app), icon_list);
+ g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
+ g_list_free (icon_list);
+ }
}
static void
@@ -514,18 +518,18 @@
};
static EPixmap pixmaps[] = {
- E_PIXMAP ("/commands/ContactListEditorSave", "save-16.png"),
- E_PIXMAP ("/commands/ContactListEditorSaveClose", "save-16.png"),
- E_PIXMAP ("/commands/ContactListEditorSaveAs", "save-as-16.png"),
+ E_PIXMAP ("/commands/ContactListEditorSave", "stock_save", 16),
+ E_PIXMAP ("/commands/ContactListEditorSaveClose", "stock_save", 16),
+ E_PIXMAP ("/commands/ContactListEditorSaveAs", "stock_save_as", 16),
- E_PIXMAP ("/commands/ContactListEditorDelete", "evolution-trash-mini.png"),
+ E_PIXMAP ("/commands/ContactListEditorDelete", "stock_delete", 16),
#if 0 /* Envelope printing is disabled for Evolution 1.0. */
- E_PIXMAP ("/commands/ContactListEditorPrint", "print.xpm"),
- E_PIXMAP ("/commands/ContactListEditorPrintEnvelope", "print.xpm"),
+ E_PIXMAP ("/commands/ContactListEditorPrint", "stock_print", 16),
+ E_PIXMAP ("/commands/ContactListEditorPrintEnvelope", "stock_print", 16),
#endif
- E_PIXMAP ("/Toolbar/ContactListEditorSaveClose", "buttons/save-24.png"),
- E_PIXMAP ("/Toolbar/ContactListEditorDelete", "buttons/delete-message.png"),
- E_PIXMAP ("/Toolbar/ContactListEditorPrint", "buttons/print.png"),
+ E_PIXMAP ("/Toolbar/ContactListEditorSaveClose", "stock_save", 24),
+ E_PIXMAP ("/Toolbar/ContactListEditorDelete", "stock_delete", 24),
+ E_PIXMAP ("/Toolbar/ContactListEditorPrint", "stock_print", 24),
E_PIXMAP_END
};
Index: addressbook/gui/merging/eab-contact-commit-duplicate-detected.glade
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/merging/eab-contact-commit-duplicate-detected.glade,v
retrieving revision 1.2
diff -u -r1.2 eab-contact-commit-duplicate-detected.glade
--- addressbook/gui/merging/eab-contact-commit-duplicate-detected.glade 21 Oct 2003 18:48:52 -0000 1.2
+++ addressbook/gui/merging/eab-contact-commit-duplicate-detected.glade 16 Apr 2004 19:46:52 -0000
@@ -182,7 +182,7 @@
<widget class="Custom" id="custom2">
<property name="visible">True</property>
<property name="creation_function">e_create_image_widget</property>
- <property name="string1">malehead.png</property>
+ <property name="string1">stock_person</property>
<property name="int1">0</property>
<property name="int2">0</property>
<property name="last_modification_time">Fri, 08 Jun 2001 00:18:39 GMT</property>
Index: addressbook/gui/merging/eab-contact-duplicate-detected.glade
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/merging/eab-contact-duplicate-detected.glade,v
retrieving revision 1.2
diff -u -r1.2 eab-contact-duplicate-detected.glade
--- addressbook/gui/merging/eab-contact-duplicate-detected.glade 21 Oct 2003 18:48:52 -0000 1.2
+++ addressbook/gui/merging/eab-contact-duplicate-detected.glade 16 Apr 2004 19:46:52 -0000
@@ -182,7 +182,7 @@
<widget class="Custom" id="custom2">
<property name="visible">True</property>
<property name="creation_function">e_create_image_widget</property>
- <property name="string1">malehead.png</property>
+ <property name="string1">stock_person</property>
<property name="int1">0</property>
<property name="int2">0</property>
<property name="last_modification_time">Fri, 08 Jun 2001 00:18:39 GMT</property>
Index: addressbook/gui/widgets/e-minicard.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/widgets/e-minicard.c,v
retrieving revision 1.114
diff -u -r1.114 e-minicard.c
--- addressbook/gui/widgets/e-minicard.c 9 Apr 2004 17:26:16 -0000 1.114
+++ addressbook/gui/widgets/e-minicard.c 16 Apr 2004 19:46:52 -0000
@@ -39,6 +39,7 @@
#include "e-minicard-label.h"
#include "e-minicard-view.h"
#include "e-contact-editor.h"
+#include <e-util/e-icon-factory.h>
#include "util/e-destination.h"
static void e_minicard_init (EMinicard *card);
@@ -62,7 +63,7 @@
#define d(x)
-#define LIST_ICON_FILENAME "contact-list-16.png"
+#define LIST_ICON_NAME "stock_contact-list"
static void
e_minicard_field_destroy(EMinicardField *field)
@@ -235,7 +236,7 @@
minicard->contact = NULL;
- minicard->list_icon_pixbuf = gdk_pixbuf_new_from_file (EVOLUTION_IMAGESDIR "/" LIST_ICON_FILENAME, NULL);
+ minicard->list_icon_pixbuf = e_icon_factory_get_icon (LIST_ICON_NAME, 16);
minicard->list_icon_size = gdk_pixbuf_get_height (minicard->list_icon_pixbuf);
minicard->editor = NULL;
@@ -426,6 +427,9 @@
if (e_minicard->contact)
g_object_unref (e_minicard->contact);
+
+ if (e_minicard->list_icon_pixbuf)
+ g_object_unref (e_minicard->list_icon_pixbuf);
if (G_OBJECT_CLASS (parent_class)->finalize)
(* G_OBJECT_CLASS (parent_class)->finalize) (object);
Index: addressbook/gui/widgets/eab-contact-display.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/widgets/eab-contact-display.c,v
retrieving revision 1.9
diff -u -r1.9 eab-contact-display.c
--- addressbook/gui/widgets/eab-contact-display.c 13 Apr 2004 20:26:50 -0000 1.9
+++ addressbook/gui/widgets/eab-contact-display.c 16 Apr 2004 19:46:52 -0000
@@ -44,14 +44,14 @@
#define HEADER_COLOR "#7f7f7f"
#define IMAGE_COL_WIDTH "20"
-#define CONTACT_LIST_ICON "contact-list-16.png"
-#define AIM_ICON "im-aim.png"
-#define GROUPWISE_ICON "im-nov.png"
-#define ICQ_ICON "im-icq.png"
-#define JABBER_ICON "im-jabber.png"
-#define MSN_ICON "im-msn.png"
-#define YAHOO_ICON "im-yahoo.png"
-#define VIDEOCONF_ICON "videoconf.png"
+#define CONTACT_LIST_ICON "stock_contact-list"
+#define AIM_ICON "im-aim"
+#define GROUPWISE_ICON "im-nov"
+#define ICQ_ICON "im-icq"
+#define JABBER_ICON "im-jabber"
+#define MSN_ICON "im-msn"
+#define YAHOO_ICON "im-yahoo"
+#define VIDEOCONF_ICON "stock_video-conferencing"
#define MAX_COMPACT_IMAGE_DIMENSION 48
@@ -73,20 +73,17 @@
else if (!strncmp (url, "evo-icon:", strlen ("evo-icon:"))) {
gchar *data;
gsize data_length;
- char *filename;
+ gchar *filename;
- /* make sure people can't embed ../../../../../../etc/passwd or something */
- if (!strchr (url, '/')) {
- filename = g_build_filename (EVOLUTION_IMAGESDIR, url + strlen ("evo-icon:"), NULL);
-
- if (g_file_get_contents (filename, &data, &data_length, NULL))
- gtk_html_stream_write (handle, data, data_length);
-
- gtk_html_end (html, handle, GTK_HTML_STREAM_OK);
-
- g_free (filename);
+ filename = e_icon_factory_get_icon_filename (url + strlen ("evo-icon:"), 16);
+ if (g_file_get_contents (filename, &data, &data_length, NULL)) {
+ gtk_html_stream_write (handle, data, data_length);
g_free (data);
}
+
+ gtk_html_stream_close (handle, GTK_HTML_STREAM_OK);
+
+ g_free (filename);
}
}
Index: addressbook/gui/widgets/eab-gui-util.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/widgets/eab-gui-util.c,v
retrieving revision 1.14
diff -u -r1.14 eab-gui-util.c
--- addressbook/gui/widgets/eab-gui-util.c 10 Apr 2004 17:23:16 -0000 1.14
+++ addressbook/gui/widgets/eab-gui-util.c 16 Apr 2004 19:46:52 -0000
@@ -971,10 +971,7 @@
char *filename;
GtkWidget *w = NULL;
if (string1) {
- if (*string1 == '/')
- filename = g_strdup(string1);
- else
- filename = g_build_filename (EVOLUTION_IMAGESDIR, string1, NULL);
+ filename = e_icon_factory_get_icon_filename (string1, 48);
w = e_image_chooser_new ();
e_image_chooser_set_from_file (E_IMAGE_CHOOSER (w), filename);
Index: calendar/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2257
diff -u -r1.2257 ChangeLog
--- calendar/ChangeLog 16 Apr 2004 01:26:55 -0000 1.2257
+++ calendar/ChangeLog 16 Apr 2004 19:46:52 -0000
@@ -1,3 +1,26 @@
+2004-04-16 Michael Terry <mike mterry name>
+
+ * gui/GNOME_Evolution_Calendar.server.in.in:
+ * gui/calendar-commands.c:
+ * gui/calendar-component.c:
+ * gui/e-calendar-table.c:
+ * gui/e-calendar-view.c:
+ * gui/e-day-view-main-item.c:
+ * gui/e-day-view-top-item.c:
+ * gui/e-day-view.c:
+ * gui/e-day-view.h:
+ * gui/e-itip-control.c:
+ * gui/e-timezone-entry.c:
+ * gui/e-week-view-event-item.c:
+ * gui/e-week-view.c:
+ * gui/e-week-view.h:
+ * gui/tasks-component.c:
+ * gui/alarm-notify/alarm-notify-dialog.c:
+ * gui/alarm-notify/alarm-queue.c:
+ * gui/dialogs/comp-editor.c:
+ * gui/dialogs/event-editor.c: Update the calendar to use the icon theme
+ through the EIconFactory object in e-util
+
2004-04-15 Gary Ekker <gekker novell com>
Fixes #52271
Index: calendar/gui/GNOME_Evolution_Calendar.server.in.in
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/GNOME_Evolution_Calendar.server.in.in,v
retrieving revision 1.11
diff -u -r1.11 GNOME_Evolution_Calendar.server.in.in
--- calendar/gui/GNOME_Evolution_Calendar.server.in.in 1 Dec 2003 22:14:20 -0000 1.11
+++ calendar/gui/GNOME_Evolution_Calendar.server.in.in 16 Apr 2004 19:46:52 -0000
@@ -44,7 +44,7 @@
<oaf_attribute name="name" type="string" _value="Evolution's Calendar component"/>
<oaf_attribute name="evolution:button_label" type="string" _value="Calendars"/>
- <oaf_attribute name="evolution:button_icon" type="string" value="evolution-calendar.png"/>
+ <oaf_attribute name="evolution:button_icon" type="string" value="stock_calendar"/>
<oaf_attribute name="evolution:button_sort_order" type="string" value="-8"/>
</oaf_server>
@@ -79,7 +79,7 @@
<oaf_attribute name="name" type="string" _value="Evolution's Tasks component"/>
<oaf_attribute name="evolution:button_label" type="string" _value="Tasks"/>
- <oaf_attribute name="evolution:button_icon" type="string" value="evolution-tasks.png"/>
+ <oaf_attribute name="evolution:button_icon" type="string" value="stock_todo"/>
<oaf_attribute name="evolution:button_sort_order" type="string" value="-8"/>
</oaf_server>
@@ -129,7 +129,7 @@
_value="Configure your timezone, Calendar and Task List here "/>
<oaf_attribute name="evolution2:config_item:icon_name" type="string"
- value="evolution-calendar.png"/>
+ value="stock_calendar-and-tasks"/>
<oaf_attribute name="evolution2:config_item:type" type="stringv">
<item value="calendar"/>
Index: calendar/gui/calendar-commands.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/calendar-commands.c,v
retrieving revision 1.150
diff -u -r1.150 calendar-commands.c
--- calendar/gui/calendar-commands.c 9 Apr 2004 15:56:21 -0000 1.150
+++ calendar/gui/calendar-commands.c 16 Apr 2004 19:46:52 -0000
@@ -715,11 +715,11 @@
static EPixmap pixmaps [] =
{
- 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 ("/Toolbar/ListView", "buttons/listview.xpm"),
+ E_PIXMAP ("/Toolbar/DayView", "stock_calendar-view-day", 24),
+ E_PIXMAP ("/Toolbar/WorkWeekView", "stock_calendar-view-work-week", 24),
+ E_PIXMAP ("/Toolbar/WeekView", "stock_calendar-view-week", 24),
+ E_PIXMAP ("/Toolbar/MonthView", "stock_calendar-view-month", 24),
+ E_PIXMAP ("/Toolbar/ListView", "stock_calendar-view-list", 24),
E_PIXMAP_END
};
Index: calendar/gui/calendar-component.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/calendar-component.c,v
retrieving revision 1.162
diff -u -r1.162 calendar-component.c
--- calendar/gui/calendar-component.c 15 Apr 2004 14:44:20 -0000 1.162
+++ calendar/gui/calendar-component.c 16 Apr 2004 19:46:52 -0000
@@ -49,6 +49,7 @@
#include "dialogs/event-editor.h"
#include "widgets/misc/e-source-selector.h"
#include "widgets/misc/e-info-label.h"
+#include "e-util/e-icon-factory.h"
/* IDs for user creatable items */
#define CREATE_EVENT_ID "event"
@@ -306,19 +307,18 @@
/* Callbacks. */
static void
-add_popup_menu_item (GtkMenu *menu, const char *label, const char *pixmap,
+add_popup_menu_item (GtkMenu *menu, const char *label, const char *icon_name,
GCallback callback, gpointer user_data, gboolean sensitive)
{
GtkWidget *item, *image;
+ GdkPixbuf *pixbuf;
- if (pixmap) {
+ if (icon_name) {
item = gtk_image_menu_item_new_with_label (label);
/* load the image */
- if (g_file_test (pixmap, G_FILE_TEST_EXISTS))
- image = gtk_image_new_from_file (pixmap);
- else
- image = gtk_image_new_from_stock (pixmap, GTK_ICON_SIZE_MENU);
+ pixbuf = e_icon_factory_get_icon (icon_name, 16);
+ image = gtk_image_new_from_pixbuf (pixbuf);
if (image) {
gtk_widget_show (image);
@@ -431,11 +431,11 @@
sensitive = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (comp->priv->source_selector)) ?
TRUE : FALSE;
- add_popup_menu_item (menu, _("New Calendar"), EVOLUTION_IMAGESDIR "/evolution-calendar-mini.png",
+ add_popup_menu_item (menu, _("New Calendar"), "stock_calendar",
G_CALLBACK (new_calendar_cb), comp, TRUE);
- add_popup_menu_item (menu, _("Copy"), EVOLUTION_IMAGESDIR "/folder-copy-16.png",
+ add_popup_menu_item (menu, _("Copy"), "stock_folder-copy",
G_CALLBACK (copy_calendar_cb), comp, sensitive);
- add_popup_menu_item (menu, _("Delete"), GTK_STOCK_DELETE, G_CALLBACK (delete_calendar_cb), comp, sensitive);
+ add_popup_menu_item (menu, _("Delete"), "stock_delete", G_CALLBACK (delete_calendar_cb), comp, sensitive);
add_popup_menu_item (menu, _("Properties..."), NULL, G_CALLBACK (edit_calendar_cb), comp, sensitive);
}
@@ -829,7 +829,7 @@
GTK_SHADOW_IN);
gtk_widget_show (selector_scrolled_window);
- info = e_info_label_new("evolution-calendar-mini.png");
+ info = e_info_label_new("stock_calendar");
e_info_label_set_info((EInfoLabel *)info, _("Calendars"), "");
gtk_widget_show (info);
@@ -916,7 +916,7 @@
list->_buffer[0].menuDescription = _("_Appointment");
list->_buffer[0].tooltip = _("Create a new appointment");
list->_buffer[0].menuShortcut = 'a';
- list->_buffer[0].iconName = "new_appointment.xpm";
+ list->_buffer[0].iconName = "stock_new-appointment";
list->_buffer[0].type = GNOME_Evolution_CREATABLE_OBJECT;
list->_buffer[1].id = CREATE_MEETING_ID;
@@ -924,7 +924,7 @@
list->_buffer[1].menuDescription = _("M_eeting");
list->_buffer[1].tooltip = _("Create a new meeting request");
list->_buffer[1].menuShortcut = 'e';
- list->_buffer[1].iconName = "meeting-request-16.png";
+ list->_buffer[1].iconName = "stock_new-meeting";
list->_buffer[1].type = GNOME_Evolution_CREATABLE_OBJECT;
list->_buffer[2].id = CREATE_ALLDAY_EVENT_ID;
@@ -932,7 +932,7 @@
list->_buffer[2].menuDescription = _("All _Day Appointment");
list->_buffer[2].tooltip = _("Create a new all-day appointment");
list->_buffer[2].menuShortcut = 'd';
- list->_buffer[2].iconName = "new_all_day_event.png";
+ list->_buffer[2].iconName = "stock_new-24h-appointment";
list->_buffer[2].type = GNOME_Evolution_CREATABLE_OBJECT;
list->_buffer[3].id = CREATE_CALENDAR_ID;
@@ -940,7 +940,7 @@
list->_buffer[3].menuDescription = _("C_alendar");
list->_buffer[3].tooltip = _("Create a new calendar");
list->_buffer[3].menuShortcut = 'a';
- list->_buffer[3].iconName = "evolution-calendar-mini.png";
+ list->_buffer[3].iconName = "stock_calendar";
list->_buffer[3].type = GNOME_Evolution_CREATABLE_FOLDER;
return list;
Index: calendar/gui/e-calendar-table.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-calendar-table.c,v
retrieving revision 1.114
diff -u -r1.114 e-calendar-table.c
--- calendar/gui/e-calendar-table.c 29 Mar 2004 11:41:09 -0000 1.114
+++ calendar/gui/e-calendar-table.c 16 Apr 2004 19:46:52 -0000
@@ -51,14 +51,7 @@
#include "e-cell-date-edit-text.h"
#include "e-comp-editor-registry.h"
#include "print.h"
-
-/* Pixmaps. */
-#include "art/task.xpm"
-#include "art/task-recurring.xpm"
-#include "art/task-assigned.xpm"
-#include "art/task-assigned-to.xpm"
-
-#include "art/check-filled.xpm"
+#include <e-util/e-icon-factory.h>
extern ECompEditorRegistry *comp_editor_registry;
@@ -114,8 +107,8 @@
/* The icons to represent the task. */
#define E_CALENDAR_MODEL_NUM_ICONS 4
-static char** icon_xpm_data[E_CALENDAR_MODEL_NUM_ICONS] = {
- task_xpm, task_recurring_xpm, task_assigned_xpm, task_assigned_to_xpm
+static const char* icon_names[E_CALENDAR_MODEL_NUM_ICONS] = {
+ "stock_task", "stock_task-recurring", "stock_task-assigned", "stock_task-assigned-to"
};
static GdkPixbuf* icon_pixbufs[E_CALENDAR_MODEL_NUM_ICONS] = { 0 };
@@ -487,8 +480,7 @@
if (!icon_pixbufs[0])
for (i = 0; i < E_CALENDAR_MODEL_NUM_ICONS; i++) {
- icon_pixbufs[i] = gdk_pixbuf_new_from_xpm_data (
- (const char **) icon_xpm_data[i]);
+ icon_pixbufs[i] = e_icon_factory_get_icon (icon_names[i], 16);
}
cell = e_cell_toggle_new (0, E_CALENDAR_MODEL_NUM_ICONS, icon_pixbufs);
@@ -498,7 +490,7 @@
e_table_extras_add_cell(extras, "icon", cell);
e_table_extras_add_pixbuf(extras, "icon", icon_pixbufs[0]);
- pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **) check_filled_xpm);
+ pixbuf = e_icon_factory_get_icon ("stock_check-filled", 16);
e_table_extras_add_pixbuf(extras, "complete", pixbuf);
gdk_pixbuf_unref(pixbuf);
@@ -1374,7 +1366,7 @@
#endif
/* Displays messages on the status bar */
-#define EVOLUTION_TASKS_PROGRESS_IMAGE "evolution-tasks-mini.png"
+#define EVOLUTION_TASKS_PROGRESS_IMAGE "stock_todo"
static GdkPixbuf *progress_icon = NULL;
void
@@ -1391,9 +1383,9 @@
}
} else if (cal_table->activity_id == 0) {
char *client_id = g_strdup_printf ("%p", cal_table);
-
+
if (progress_icon == NULL)
- progress_icon = gdk_pixbuf_new_from_file (EVOLUTION_IMAGESDIR "/" EVOLUTION_TASKS_PROGRESS_IMAGE, NULL);
+ progress_icon = e_icon_factory_get_icon (EVOLUTION_TASKS_PROGRESS_IMAGE, 16);
cal_table->activity_id = e_activity_handler_operation_started (activity_handler, client_id,
progress_icon, message, TRUE);
Index: calendar/gui/e-calendar-view.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-calendar-view.c,v
retrieving revision 1.46
diff -u -r1.46 e-calendar-view.c
--- calendar/gui/e-calendar-view.c 15 Apr 2004 11:16:23 -0000 1.46
+++ calendar/gui/e-calendar-view.c 16 Apr 2004 19:46:52 -0000
@@ -55,7 +55,7 @@
#include "ea-calendar.h"
/* Used for the status bar messages */
-#define EVOLUTION_CALENDAR_PROGRESS_IMAGE "evolution-calendar-mini.png"
+#define EVOLUTION_CALENDAR_PROGRESS_IMAGE "stock_calendar"
static GdkPixbuf *progress_icon = NULL;
struct _ECalendarViewPrivate {
@@ -543,7 +543,7 @@
char *client_id = g_strdup_printf ("%p", cal_view);
if (progress_icon == NULL)
- progress_icon = gdk_pixbuf_new_from_file (EVOLUTION_IMAGESDIR "/" EVOLUTION_CALENDAR_PROGRESS_IMAGE, NULL);
+ progress_icon = e_icon_factory_get_icon (EVOLUTION_CALENDAR_PROGRESS_IMAGE, 16);
cal_view->priv->activity_id = e_activity_handler_operation_started (activity_handler, client_id, progress_icon, message, TRUE);
@@ -1315,7 +1315,8 @@
for (i = 0; context_menu[i].name; i++) {
GtkWidget *pixmap_widget = NULL;
-
+ GdkPixbuf *pixbuf;
+
if (!strcmp (context_menu[i].name, _("_Copy")))
pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_COPY, GTK_ICON_SIZE_MENU);
else if (!strcmp (context_menu[i].name, _("C_ut")))
@@ -1328,14 +1329,26 @@
pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_HOME, GTK_ICON_SIZE_MENU);
else if (!strcmp (context_menu[i].name, _("_Go to Date...")))
pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_JUMP_TO, GTK_ICON_SIZE_MENU);
- else if (!strcmp (context_menu[i].name, _("New _Appointment...")))
- pixmap_widget = gtk_image_new_from_file (EVOLUTION_IMAGESDIR "/new_appointment.xpm");
- else if (!strcmp (context_menu[i].name, _("New All Day _Event")))
- pixmap_widget = gtk_image_new_from_file (EVOLUTION_IMAGESDIR "/new_all_day_event.png");
- else if (!strcmp (context_menu[i].name, _("New Meeting")))
- pixmap_widget = gtk_image_new_from_file (EVOLUTION_IMAGESDIR "/meeting-request-16.png");
- else if (!strcmp (context_menu[i].name, _("New Task")))
- pixmap_widget = gtk_image_new_from_file (EVOLUTION_IMAGESDIR "/new_task-16.png");
+ else if (!strcmp (context_menu[i].name, _("New _Appointment..."))) {
+ pixbuf = e_icon_factory_get_icon ("stock_new-appointment", 16);
+ pixmap_widget = gtk_image_new_from_pixbuf (pixbuf);
+ gdk_pixbuf_unref (pixbuf);
+ }
+ else if (!strcmp (context_menu[i].name, _("New All Day _Event"))) {
+ pixbuf = e_icon_factory_get_icon ("stock_new-24h-appointment", 16);
+ pixmap_widget = gtk_image_new_from_pixbuf (pixbuf);
+ gdk_pixbuf_unref (pixbuf);
+ }
+ else if (!strcmp (context_menu[i].name, _("New Meeting"))) {
+ pixbuf = e_icon_factory_get_icon ("stock_new-meeting", 16);
+ pixmap_widget = gtk_image_new_from_pixbuf (pixbuf);
+ gdk_pixbuf_unref (pixbuf);
+ }
+ else if (!strcmp (context_menu[i].name, _("New Task"))) {
+ pixbuf = e_icon_factory_get_icon ("stock_task", 16);
+ pixmap_widget = gtk_image_new_from_pixbuf (pixbuf);
+ gdk_pixbuf_unref (pixbuf);
+ }
else if (!strcmp (context_menu[i].name, _("_Open")))
pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU);
else if (!strcmp (context_menu[i].name, _("_Paste")))
Index: calendar/gui/e-day-view-main-item.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-day-view-main-item.c,v
retrieving revision 1.36
diff -u -r1.36 e-day-view-main-item.c
--- calendar/gui/e-day-view-main-item.c 7 Nov 2003 05:51:59 -0000 1.36
+++ calendar/gui/e-day-view-main-item.c 16 Apr 2004 19:46:52 -0000
@@ -644,15 +644,16 @@
max_icon_h = item_y + item_h - icon_y
- E_DAY_VIEW_EVENT_BORDER_HEIGHT;
- gdk_gc_set_clip_origin (gc, icon_x, icon_y);
- gdk_gc_set_clip_mask (gc, day_view->reminder_mask);
- gdk_draw_pixmap (drawable, gc,
+ gdk_gc_set_clip_mask (gc, NULL);
+ gdk_draw_pixbuf (drawable, gc,
day_view->reminder_icon,
0, 0, icon_x, icon_y,
MIN (E_DAY_VIEW_ICON_WIDTH,
max_icon_w),
MIN (E_DAY_VIEW_ICON_HEIGHT,
- max_icon_h));
+ max_icon_h),
+ GDK_RGB_DITHER_NORMAL,
+ 0, 0);
icon_x += icon_x_inc;
icon_y += icon_y_inc;
}
@@ -663,16 +664,16 @@
max_icon_h = item_y + item_h - icon_y
- E_DAY_VIEW_EVENT_BORDER_HEIGHT;
- gdk_gc_set_clip_origin (gc, icon_x, icon_y);
- gdk_gc_set_clip_mask (gc, day_view->recurrence_mask);
- gdk_draw_pixmap (drawable, gc,
+ gdk_gc_set_clip_mask (gc, NULL);
+ gdk_draw_pixbuf (drawable, gc,
day_view->recurrence_icon,
0, 0, icon_x, icon_y,
MIN (E_DAY_VIEW_ICON_WIDTH,
max_icon_w),
MIN (E_DAY_VIEW_ICON_HEIGHT,
- max_icon_h));
-
+ max_icon_h),
+ GDK_RGB_DITHER_NORMAL,
+ 0, 0);
icon_x += icon_x_inc;
icon_y += icon_y_inc;
}
@@ -683,15 +684,16 @@
max_icon_h = item_y + item_h - icon_y
- E_DAY_VIEW_EVENT_BORDER_HEIGHT;
- gdk_gc_set_clip_origin (gc, icon_x, icon_y);
- gdk_gc_set_clip_mask (gc, day_view->timezone_mask);
- gdk_draw_pixmap (drawable, gc,
+ gdk_gc_set_clip_mask (gc, NULL);
+ gdk_draw_pixbuf (drawable, gc,
day_view->timezone_icon,
0, 0, icon_x, icon_y,
MIN (E_DAY_VIEW_ICON_WIDTH,
max_icon_w),
MIN (E_DAY_VIEW_ICON_HEIGHT,
- max_icon_h));
+ max_icon_h),
+ GDK_RGB_DITHER_NORMAL,
+ 0, 0);
icon_x += icon_x_inc;
icon_y += icon_y_inc;
}
@@ -703,15 +705,16 @@
max_icon_h = item_y + item_h - icon_y
- E_DAY_VIEW_EVENT_BORDER_HEIGHT;
- gdk_gc_set_clip_origin (gc, icon_x, icon_y);
- gdk_gc_set_clip_mask (gc, day_view->meeting_mask);
- gdk_draw_pixmap (drawable, gc,
+ gdk_gc_set_clip_mask (gc, NULL);
+ gdk_draw_pixbuf (drawable, gc,
day_view->meeting_icon,
0, 0, icon_x, icon_y,
MIN (E_DAY_VIEW_ICON_WIDTH,
max_icon_w),
MIN (E_DAY_VIEW_ICON_HEIGHT,
- max_icon_h));
+ max_icon_h),
+ GDK_RGB_DITHER_NORMAL,
+ 0, 0);
icon_x += icon_x_inc;
icon_y += icon_y_inc;
}
Index: calendar/gui/e-day-view-top-item.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-day-view-top-item.c,v
retrieving revision 1.39
diff -u -r1.39 e-day-view-top-item.c
--- calendar/gui/e-day-view-top-item.c 7 Nov 2003 05:51:59 -0000 1.39
+++ calendar/gui/e-day-view-top-item.c 16 Apr 2004 19:46:52 -0000
@@ -528,24 +528,26 @@
+ E_DAY_VIEW_ICON_Y_PAD - y;
if (icon_x <= max_icon_x && e_cal_component_has_recurrences (comp)) {
- gdk_gc_set_clip_origin (gc, icon_x, icon_y);
- gdk_gc_set_clip_mask (gc, day_view->recurrence_mask);
- gdk_draw_pixmap (drawable, gc,
+ gdk_gc_set_clip_mask (gc, NULL);
+ gdk_draw_pixbuf (drawable, gc,
day_view->recurrence_icon,
0, 0, icon_x, icon_y,
E_DAY_VIEW_ICON_WIDTH,
- E_DAY_VIEW_ICON_HEIGHT);
+ E_DAY_VIEW_ICON_HEIGHT,
+ GDK_RGB_DITHER_NORMAL,
+ 0, 0);
icon_x -= icon_x_inc;
}
if (icon_x <= max_icon_x && e_cal_component_has_alarms (comp)) {
- gdk_gc_set_clip_origin (gc, icon_x, icon_y);
- gdk_gc_set_clip_mask (gc, day_view->reminder_mask);
- gdk_draw_pixmap (drawable, gc,
+ gdk_gc_set_clip_mask (gc, NULL);
+ gdk_draw_pixbuf (drawable, gc,
day_view->reminder_icon,
0, 0, icon_x, icon_y,
E_DAY_VIEW_ICON_WIDTH,
- E_DAY_VIEW_ICON_HEIGHT);
+ E_DAY_VIEW_ICON_HEIGHT,
+ GDK_RGB_DITHER_NORMAL,
+ 0, 0);
icon_x -= icon_x_inc;
}
Index: calendar/gui/e-day-view.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-day-view.c,v
retrieving revision 1.241
diff -u -r1.241 e-day-view.c
--- calendar/gui/e-day-view.c 7 Apr 2004 16:12:22 -0000 1.241
+++ calendar/gui/e-day-view.c 16 Apr 2004 19:46:52 -0000
@@ -73,12 +73,7 @@
#include "e-day-view-layout.h"
#include "e-day-view-main-item.h"
#include "misc.h"
-
-/* Images */
-#include "art/bell.xpm"
-#include "art/recur.xpm"
-#include "art/timezone-16.xpm"
-#include "art/schedule-meeting-16.xpm"
+#include <e-util/e-icon-factory.h>
/* The minimum amount of space wanted on each side of the date string. */
#define E_DAY_VIEW_DATE_X_PAD 4
@@ -1222,13 +1217,13 @@
if (nfailed)
g_warning ("Failed to allocate all colors");
+ gdk_gc_set_colormap (day_view->main_gc, colormap);
/* Create the pixmaps. */
- day_view->reminder_icon = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &day_view->reminder_mask, NULL, bell_xpm);
- day_view->recurrence_icon = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &day_view->recurrence_mask, NULL, recur_xpm);
- day_view->timezone_icon = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &day_view->timezone_mask, NULL, timezone_16_xpm);
- day_view->meeting_icon = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &day_view->meeting_mask, NULL, schedule_meeting_16_xpm);
-
+ day_view->reminder_icon = e_icon_factory_get_icon ("stock_bell", E_DAY_VIEW_ICON_WIDTH);
+ day_view->recurrence_icon = e_icon_factory_get_icon ("stock_refresh", E_DAY_VIEW_ICON_WIDTH);
+ day_view->timezone_icon = e_icon_factory_get_icon ("stock_timezone", E_DAY_VIEW_ICON_WIDTH);
+ day_view->meeting_icon = e_icon_factory_get_icon ("stock_people", E_DAY_VIEW_ICON_WIDTH);
/* Set the canvas item colors. */
@@ -1290,10 +1285,14 @@
colormap = gtk_widget_get_colormap (widget);
gdk_colormap_free_colors (colormap, day_view->colors, E_DAY_VIEW_COLOR_LAST);
- gdk_pixmap_unref (day_view->reminder_icon);
+ g_object_unref (day_view->reminder_icon);
day_view->reminder_icon = NULL;
- gdk_pixmap_unref (day_view->recurrence_icon);
+ g_object_unref (day_view->recurrence_icon);
day_view->recurrence_icon = NULL;
+ g_object_unref (day_view->timezone_icon);
+ day_view->timezone_icon = NULL;
+ g_object_unref (day_view->meeting_icon);
+ day_view->meeting_icon = NULL;
if (GTK_WIDGET_CLASS (parent_class)->unrealize)
(*GTK_WIDGET_CLASS (parent_class)->unrealize)(widget);
Index: calendar/gui/e-day-view.h
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-day-view.h,v
retrieving revision 1.60
diff -u -r1.60 e-day-view.h
--- calendar/gui/e-day-view.h 15 Mar 2004 16:53:50 -0000 1.60
+++ calendar/gui/e-day-view.h 16 Apr 2004 19:46:52 -0000
@@ -324,14 +324,10 @@
GdkGC *main_gc;
/* The icons. */
- GdkPixmap *reminder_icon;
- GdkBitmap *reminder_mask;
- GdkPixmap *recurrence_icon;
- GdkBitmap *recurrence_mask;
- GdkPixmap *timezone_icon;
- GdkBitmap *timezone_mask;
- GdkPixmap *meeting_icon;
- GdkBitmap *meeting_mask;
+ GdkPixbuf *reminder_icon;
+ GdkPixbuf *recurrence_icon;
+ GdkPixbuf *timezone_icon;
+ GdkPixbuf *meeting_icon;
/* Colors for drawing. */
GdkColor colors[E_DAY_VIEW_COLOR_LAST];
Index: calendar/gui/e-itip-control.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-itip-control.c,v
retrieving revision 1.141
diff -u -r1.141 e-itip-control.c
--- calendar/gui/e-itip-control.c 24 Mar 2004 00:17:57 -0000 1.141
+++ calendar/gui/e-itip-control.c 16 Apr 2004 19:46:53 -0000
@@ -55,6 +55,7 @@
#include "itip-utils.h"
#include "e-itip-control.h"
#include "common/authentication.h"
+#include <e-util/e-icon-factory.h>
struct _EItipControlPrivate {
GtkWidget *html;
@@ -759,6 +760,7 @@
{
EItipControlPrivate *priv;
GtkHTMLStream *html_stream;
+ gchar *filename;
priv = itip->priv;
@@ -776,7 +778,9 @@
/* The column for the image */
gtk_html_stream_printf (html_stream, "<tr><td width=48 align=\"center\" valign=\"top\" rowspan=\"8\">");
/* The image */
- gtk_html_stream_printf (html_stream, "<img src=\"/meeting-request.png\"></td>");
+ filename = e_icon_factory_get_icon_filename ("stock_new-meeting", 48);
+ gtk_html_stream_printf (html_stream, "<img src=\"%s\"></td>", filename);
+ g_free (filename);
gtk_html_stream_printf (html_stream, "<td align=\"left\" valign=\"top\">");
@@ -809,6 +813,7 @@
const char *string;
gchar *html;
const gchar *const_html;
+ gchar *filename;
priv = itip->priv;
@@ -832,8 +837,9 @@
gtk_html_write (GTK_HTML (priv->html), html_stream, const_html, strlen(const_html));
/* The image */
- const_html = "<img src=\"/meeting-request.png\"></td>";
- gtk_html_write (GTK_HTML (priv->html), html_stream, const_html, strlen(const_html));
+ filename = e_icon_factory_get_icon_filename ("stock_new-meeting", 48);
+ gtk_html_stream_printf (html_stream, "<img src=\"%s\"></td>", filename);
+ g_free (filename);
const_html = "<td align=\"left\" valign=\"top\">";
gtk_html_write (GTK_HTML (priv->html), html_stream, const_html, strlen(const_html));
@@ -1988,13 +1994,10 @@
url_requested_cb (GtkHTML *html, const gchar *url, GtkHTMLStream *handle, gpointer data)
{ unsigned char buffer[4096];
int len, fd;
- char *path;
-
- path = g_strdup_printf ("%s/%s", EVOLUTION_IMAGESDIR, url);
- if ((fd = open (path, O_RDONLY)) == -1) {
+ if ((fd = open (url, O_RDONLY)) == -1) {
g_warning ("%s", g_strerror (errno));
- goto cleanup;
+ return;
}
while ((len = read (fd, buffer, 4096)) > 0) {
@@ -2005,14 +2008,11 @@
/* check to see if we stopped because of an error */
gtk_html_end (html, handle, GTK_HTML_STREAM_ERROR);
g_warning ("%s", g_strerror (errno));
- goto cleanup;
+ return;
}
/* done with no errors */
gtk_html_end (html, handle, GTK_HTML_STREAM_OK);
close (fd);
-
- cleanup:
- g_free (path);
}
static gboolean
Index: calendar/gui/e-timezone-entry.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-timezone-entry.c,v
retrieving revision 1.23
diff -u -r1.23 e-timezone-entry.c
--- calendar/gui/e-timezone-entry.c 10 Jan 2004 20:19:07 -0000 1.23
+++ calendar/gui/e-timezone-entry.c 16 Apr 2004 19:46:53 -0000
@@ -37,9 +37,7 @@
#include <gal/util/e-util.h>
#include <widgets/e-timezone-dialog/e-timezone-dialog.h>
#include "e-timezone-entry.h"
-
-/* The timezone icon for the button. */
-#include "art/timezone-16.xpm"
+#include <e-util/e-icon-factory.h>
struct _ETimezoneEntryPrivate {
/* The current timezone, set in e_timezone_entry_set_timezone()
@@ -115,10 +113,8 @@
e_timezone_entry_init (ETimezoneEntry *tentry)
{
ETimezoneEntryPrivate *priv;
- GdkColormap *colormap;
- GdkPixmap *timezone_icon;
- GdkBitmap *timezone_mask;
- GtkWidget *pixmap;
+ GtkWidget *gtk_image;
+ GdkPixbuf *gdk_pixbuf;
tentry->priv = priv = g_new0 (ETimezoneEntryPrivate, 1);
@@ -137,12 +133,12 @@
gtk_box_pack_start (GTK_BOX (tentry), priv->button, FALSE, FALSE, 6);
gtk_widget_show (priv->button);
- colormap = gtk_widget_get_colormap (priv->button);
- timezone_icon = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &timezone_mask, NULL, timezone_16_xpm);
-
- pixmap = gtk_pixmap_new (timezone_icon, timezone_mask);
- gtk_container_add (GTK_CONTAINER (priv->button), pixmap);
- gtk_widget_show (pixmap);
+ gdk_pixbuf = e_icon_factory_get_icon ("stock_timezone", 16);
+ gtk_image = gtk_image_new_from_pixbuf (gdk_pixbuf);
+ gtk_container_add (GTK_CONTAINER (priv->button), gtk_image);
+ gtk_widget_show (gtk_image);
+
+ g_object_unref (gdk_pixbuf);
}
Index: calendar/gui/e-week-view-event-item.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-week-view-event-item.c,v
retrieving revision 1.45
diff -u -r1.45 e-week-view-event-item.c
--- calendar/gui/e-week-view-event-item.c 7 Nov 2003 05:51:59 -0000 1.45
+++ calendar/gui/e-week-view-event-item.c 16 Apr 2004 19:46:53 -0000
@@ -642,35 +642,38 @@
icon_x -= icon_x_inc * num_icons;
if (draw_reminder_icon && icon_x + E_WEEK_VIEW_ICON_WIDTH <= x2) {
- gdk_gc_set_clip_origin (gc, icon_x, icon_y);
- gdk_gc_set_clip_mask (gc, week_view->reminder_mask);
- gdk_draw_pixmap (drawable, gc,
+ gdk_gc_set_clip_mask (gc, NULL);
+ gdk_draw_pixbuf (drawable, gc,
week_view->reminder_icon,
0, 0, icon_x, icon_y,
E_WEEK_VIEW_ICON_WIDTH,
- E_WEEK_VIEW_ICON_HEIGHT);
+ E_WEEK_VIEW_ICON_HEIGHT,
+ GDK_RGB_DITHER_NORMAL,
+ 0, 0);
icon_x += icon_x_inc;
}
if (draw_recurrence_icon && icon_x + E_WEEK_VIEW_ICON_WIDTH <= x2) {
- gdk_gc_set_clip_origin (gc, icon_x, icon_y);
- gdk_gc_set_clip_mask (gc, week_view->recurrence_mask);
- gdk_draw_pixmap (drawable, gc,
+ gdk_gc_set_clip_mask (gc, NULL);
+ gdk_draw_pixbuf (drawable, gc,
week_view->recurrence_icon,
0, 0, icon_x, icon_y,
E_WEEK_VIEW_ICON_WIDTH,
- E_WEEK_VIEW_ICON_HEIGHT);
+ E_WEEK_VIEW_ICON_HEIGHT,
+ GDK_RGB_DITHER_NORMAL,
+ 0, 0);
icon_x += icon_x_inc;
}
if (draw_timezone_icon && icon_x + E_WEEK_VIEW_ICON_WIDTH <= x2) {
- gdk_gc_set_clip_origin (gc, icon_x, icon_y);
- gdk_gc_set_clip_mask (gc, week_view->timezone_mask);
- gdk_draw_pixmap (drawable, gc,
+ gdk_gc_set_clip_mask (gc, NULL);
+ gdk_draw_pixbuf (drawable, gc,
week_view->timezone_icon,
0, 0, icon_x, icon_y,
E_WEEK_VIEW_ICON_WIDTH,
- E_WEEK_VIEW_ICON_HEIGHT);
+ E_WEEK_VIEW_ICON_HEIGHT,
+ GDK_RGB_DITHER_NORMAL,
+ 0, 0);
icon_x += icon_x_inc;
}
Index: calendar/gui/e-week-view.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-week-view.c,v
retrieving revision 1.203
diff -u -r1.203 e-week-view.c
--- calendar/gui/e-week-view.c 7 Apr 2004 16:12:22 -0000 1.203
+++ calendar/gui/e-week-view.c 16 Apr 2004 19:46:53 -0000
@@ -70,11 +70,9 @@
#include "e-week-view-main-item.h"
#include "e-week-view-titles-item.h"
#include "misc.h"
+#include <e-util/e-icon-factory.h>
/* Images */
-#include "art/bell.xpm"
-#include "art/recur.xpm"
-#include "art/timezone-16.xpm"
#include "art/jump.xpm"
#define E_WEEK_VIEW_SMALL_FONT_PTSIZE 7
@@ -91,7 +89,6 @@
we get from the server. */
#define E_WEEK_VIEW_LAYOUT_TIMEOUT 100
-
typedef struct {
EWeekView *week_view;
ECalModelComponent *comp_data;
@@ -828,11 +825,12 @@
if (nfailed)
g_warning ("Failed to allocate all colors");
+ gdk_gc_set_colormap (week_view->main_gc, colormap);
/* Create the pixmaps. */
- week_view->reminder_icon = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &week_view->reminder_mask, NULL, bell_xpm);
- week_view->recurrence_icon = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &week_view->recurrence_mask, NULL, recur_xpm);
- week_view->timezone_icon = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &week_view->timezone_mask, NULL, timezone_16_xpm);
+ week_view->reminder_icon = e_icon_factory_get_icon ("stock_bell", E_WEEK_VIEW_ICON_WIDTH);
+ week_view->recurrence_icon = e_icon_factory_get_icon ("stock_refresh", E_WEEK_VIEW_ICON_WIDTH);
+ week_view->timezone_icon = e_icon_factory_get_icon ("stock_timezone", E_WEEK_VIEW_ICON_WIDTH);
}
@@ -850,10 +848,12 @@
colormap = gtk_widget_get_colormap (widget);
gdk_colormap_free_colors (colormap, week_view->colors, E_WEEK_VIEW_COLOR_LAST);
- gdk_pixmap_unref (week_view->reminder_icon);
+ g_object_unref (week_view->reminder_icon);
week_view->reminder_icon = NULL;
- gdk_pixmap_unref (week_view->recurrence_icon);
+ g_object_unref (week_view->recurrence_icon);
week_view->recurrence_icon = NULL;
+ g_object_unref (week_view->timezone_icon);
+ week_view->timezone_icon = NULL;
if (GTK_WIDGET_CLASS (parent_class)->unrealize)
(*GTK_WIDGET_CLASS (parent_class)->unrealize)(widget);
Index: calendar/gui/e-week-view.h
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-week-view.h,v
retrieving revision 1.52
diff -u -r1.52 e-week-view.h
--- calendar/gui/e-week-view.h 15 Mar 2004 16:53:51 -0000 1.52
+++ calendar/gui/e-week-view.h 16 Apr 2004 19:46:53 -0000
@@ -278,12 +278,9 @@
GdkGC *main_gc;
/* The icons. */
- GdkPixmap *reminder_icon;
- GdkBitmap *reminder_mask;
- GdkPixmap *recurrence_icon;
- GdkBitmap *recurrence_mask;
- GdkPixmap *timezone_icon;
- GdkBitmap *timezone_mask;
+ GdkPixbuf *reminder_icon;
+ GdkPixbuf *recurrence_icon;
+ GdkPixbuf *timezone_icon;
/* Colors for drawing. */
GdkColor colors[E_WEEK_VIEW_COLOR_LAST];
Index: calendar/gui/tasks-component.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/tasks-component.c,v
retrieving revision 1.60
diff -u -r1.60 tasks-component.c
--- calendar/gui/tasks-component.c 14 Apr 2004 05:40:01 -0000 1.60
+++ calendar/gui/tasks-component.c 16 Apr 2004 19:46:53 -0000
@@ -46,7 +46,7 @@
#include "dialogs/task-editor.h"
#include "widgets/misc/e-source-selector.h"
#include "widgets/misc/e-info-label.h"
-
+#include "e-util/e-icon-factory.h"
#define CREATE_TASK_ID "task"
#define CREATE_TASK_LIST_ID "task-list"
@@ -234,19 +234,18 @@
/* Callbacks. */
static void
-add_popup_menu_item (GtkMenu *menu, const char *label, const char *pixmap,
+add_popup_menu_item (GtkMenu *menu, const char *label, const char *icon_name,
GCallback callback, gpointer user_data, gboolean sensitive)
{
GtkWidget *item, *image;
+ GdkPixbuf *pixbuf;
- if (pixmap) {
+ if (icon_name) {
item = gtk_image_menu_item_new_with_label (label);
/* load the image */
- if (g_file_test (pixmap, G_FILE_TEST_EXISTS))
- image = gtk_image_new_from_file (pixmap);
- else
- image = gtk_image_new_from_stock (pixmap, GTK_ICON_SIZE_MENU);
+ pixbuf = e_icon_factory_get_icon (icon_name, 16);
+ image = gtk_image_new_from_pixbuf (pixbuf);
if (image) {
gtk_widget_show (image);
@@ -361,11 +360,11 @@
sensitive = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (component->priv->source_selector)) ?
TRUE : FALSE;
- add_popup_menu_item (menu, _("New Task List"), EVOLUTION_IMAGESDIR "/evolution-tasks-mini.png",
+ add_popup_menu_item (menu, _("New Task List"), "stock_todo",
G_CALLBACK (new_task_list_cb), component, TRUE);
- add_popup_menu_item (menu, _("Copy"), EVOLUTION_IMAGESDIR "/folder-copy-16.png",
+ add_popup_menu_item (menu, _("Copy"), "stock_folder-copy",
G_CALLBACK (copy_task_list_cb), component, sensitive);
- add_popup_menu_item (menu, _("Delete"), GTK_STOCK_DELETE, G_CALLBACK (delete_task_list_cb),
+ add_popup_menu_item (menu, _("Delete"), "stock_delete", G_CALLBACK (delete_task_list_cb),
component, sensitive);
add_popup_menu_item (menu, _("Properties..."), NULL, G_CALLBACK (edit_task_list_cb),
component, sensitive);
@@ -496,7 +495,7 @@
GTK_SHADOW_IN);
gtk_widget_show (selector_scrolled_window);
- info = e_info_label_new("evolution-tasks-mini.png");
+ info = e_info_label_new("stock_task");
e_info_label_set_info((EInfoLabel *)info, _("Tasks"), "");
gtk_widget_show (info);
@@ -571,7 +570,7 @@
list->_buffer[0].menuDescription = _("_Task");
list->_buffer[0].tooltip = _("Create a new task");
list->_buffer[0].menuShortcut = 't';
- list->_buffer[0].iconName = "new_task-16.png";
+ list->_buffer[0].iconName = "stock_task";
list->_buffer[0].type = GNOME_Evolution_CREATABLE_OBJECT;
list->_buffer[1].id = CREATE_TASK_LIST_ID;
@@ -579,7 +578,7 @@
list->_buffer[1].menuDescription = _("_Tasks Group");
list->_buffer[1].tooltip = _("Create a new tasks group");
list->_buffer[1].menuShortcut = 'n';
- list->_buffer[1].iconName = "evolution-tasks-mini.png";
+ list->_buffer[1].iconName = "stock_todo";
list->_buffer[1].type = GNOME_Evolution_CREATABLE_FOLDER;
return list;
Index: calendar/gui/alarm-notify/alarm-notify-dialog.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/alarm-notify/alarm-notify-dialog.c,v
retrieving revision 1.26
diff -u -r1.26 alarm-notify-dialog.c
--- calendar/gui/alarm-notify/alarm-notify-dialog.c 4 Mar 2004 12:09:14 -0000 1.26
+++ calendar/gui/alarm-notify/alarm-notify-dialog.c 16 Apr 2004 19:46:53 -0000
@@ -31,7 +31,6 @@
#if 0
# include <libgnomeui/gnome-winhints.h>
#endif
-#include <libgnomeui/gnome-window-icon.h>
#include <glade/glade.h>
#include <e-util/e-time-utils.h>
#include <gtkhtml/gtkhtml.h>
@@ -40,6 +39,7 @@
#include "alarm-notify-dialog.h"
#include "config-data.h"
#include "util.h"
+#include <e-util/e-icon-factory.h>
GtkWidget *make_html_display (gchar *widget_name, char *s1, char *s2, int scroll, int shadow);
@@ -223,9 +223,14 @@
char *buf;
char *start, *end;
char *bg_path = "file://" EVOLUTION_IMAGESDIR "/bcg.png";
- char *image_path = "file://" EVOLUTION_IMAGESDIR "/alarm.png";
+ gchar *image_path;
+ gchar *icon_path;
icaltimezone *current_zone;
+ icon_path = e_icon_factory_get_icon_filename ("stock_alarm", 48);
+ image_path = g_strdup_printf ("file://%s", icon_path);
+ g_free (icon_path);
+
/* Stringize the times */
current_zone = config_data_get_timezone ();
@@ -273,6 +278,7 @@
g_free (start);
g_free (end);
+ g_free (image_path);
}
/**
@@ -299,6 +305,7 @@
GtkHTMLStream *stream;
icaltimezone *current_zone;
char *buf, *title;
+ GList *icon_list;
g_return_val_if_fail (trigger != -1, NULL);
@@ -377,7 +384,12 @@
if (!GTK_WIDGET_REALIZED (an->dialog))
gtk_widget_realize (an->dialog);
- gtk_window_set_icon_from_file (GTK_WINDOW (an->dialog), EVOLUTION_IMAGESDIR "/alarm.png", NULL);
+ icon_list = e_icon_factory_get_icon_list ("stock_alarm");
+ if (icon_list) {
+ gtk_window_set_icon_list (GTK_WINDOW (an->dialog), icon_list);
+ g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
+ g_list_free (icon_list);
+ }
gtk_widget_show (an->dialog);
return an;
Index: calendar/gui/alarm-notify/alarm-queue.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/alarm-notify/alarm-queue.c,v
retrieving revision 1.63
diff -u -r1.63 alarm-queue.c
--- calendar/gui/alarm-notify/alarm-queue.c 5 Apr 2004 12:17:34 -0000 1.63
+++ calendar/gui/alarm-notify/alarm-queue.c 16 Apr 2004 19:46:53 -0000
@@ -42,6 +42,7 @@
#include <libgnomeui/gnome-dialog-util.h>
#include <libgnomeui/gnome-uidefs.h>
#include <e-util/eggtrayicon.h>
+#include <e-util/e-icon-factory.h>
#include <libecal/e-cal-time-util.h>
#include "evolution-calendar.h"
#include "alarm.h"
@@ -888,14 +889,15 @@
tray_icon_blink_cb (gpointer data)
{
TrayIconData *tray_data = data;
-
- /* FIXME: Use stock image equivalents when they become available */
+ GdkPixbuf *pixbuf;
tray_data->blink_state = tray_data->blink_state == TRUE ? FALSE : TRUE;
- gtk_image_set_from_file (GTK_IMAGE (tray_data->image),
- tray_data->blink_state == TRUE ?
- EVOLUTION_IMAGESDIR "/appointment-reminder-excl.png" :
- EVOLUTION_IMAGESDIR "/appointment-reminder.png");
+ pixbuf = e_icon_factory_get_icon (tray_data->blink_state == TRUE ?
+ "stock_appointment-reminder-excl" :
+ "stock_appointment-reminder",
+ 24);
+ gtk_image_set_from_pixbuf (GTK_IMAGE (tray_data->image), pixbuf);
+ gdk_pixbuf_unref (pixbuf);
return TRUE;
}
@@ -916,6 +918,7 @@
ECalComponentText text;
char *str, *start_str, *end_str, *alarm_str;
icaltimezone *current_zone;
+ GdkPixbuf *pixbuf;
comp = cqa->alarms->comp;
qa = lookup_queued_alarm (cqa, alarm_id);
@@ -946,7 +949,9 @@
/* FIXME: Use stock image equivalent when it becomes available */
tray_icon = egg_tray_icon_new (qa->instance->auid);
- image = gtk_image_new_from_file (EVOLUTION_IMAGESDIR "/appointment-reminder.png");
+ pixbuf = e_icon_factory_get_icon ("stock_appointment-reminder", 24);
+ image = gtk_image_new_from_pixbuf (pixbuf);
+ gdk_pixbuf_unref (pixbuf);
ebox = gtk_event_box_new ();
gtk_widget_show (image);
Index: calendar/gui/dialogs/comp-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/comp-editor.c,v
retrieving revision 1.97
diff -u -r1.97 comp-editor.c
--- calendar/gui/dialogs/comp-editor.c 15 Apr 2004 15:45:27 -0000 1.97
+++ calendar/gui/dialogs/comp-editor.c 16 Apr 2004 19:46:53 -0000
@@ -33,11 +33,11 @@
#include <libgnomeui/gnome-uidefs.h>
#include <libgnomeui/gnome-dialog.h>
#include <libgnomeui/gnome-dialog-util.h>
-#include <libgnomeui/gnome-window-icon.h>
#include <libgnomeui/gnome-messagebox.h>
#include <bonobo/bonobo-ui-container.h>
#include <bonobo/bonobo-ui-util.h>
#include <e-util/e-dialog-utils.h>
+#include <e-util/e-icon-factory.h>
#include <evolution-shell-component-utils.h>
#include "../print.h"
#include "../comp-util.h"
@@ -122,18 +122,18 @@
static EPixmap pixmaps [] =
{
- E_PIXMAP ("/menu/File/FileSave", "save-16.png"),
- E_PIXMAP ("/menu/File/FileSaveAndClose", "save-16.png"),
- E_PIXMAP ("/menu/File/FileSaveAs", "save-as-16.png"),
-
- E_PIXMAP ("/menu/File/FileDelete", "evolution-trash-mini.png"),
-
- E_PIXMAP ("/menu/File/FilePrint", "print.xpm"),
- E_PIXMAP ("/menu/File/FilePrintPreview", "print-preview.xpm"),
-
- E_PIXMAP ("/Toolbar/FileSaveAndClose", "buttons/save-24.png"),
- E_PIXMAP ("/Toolbar/FilePrint", "buttons/print.png"),
- E_PIXMAP ("/Toolbar/FileDelete", "buttons/delete-message.png"),
+ E_PIXMAP ("/menu/File/FileSave", "stock_save", 16),
+ E_PIXMAP ("/menu/File/FileSaveAndClose", "stock_save", 16),
+ E_PIXMAP ("/menu/File/FileSaveAs", "stock_save_as", 16),
+
+ E_PIXMAP ("/menu/File/FileDelete", "stock_delete", 16),
+
+ E_PIXMAP ("/menu/File/FilePrint", "stock_print", 16),
+ E_PIXMAP ("/menu/File/FilePrintPreview", "stock_print-preview", 16),
+
+ E_PIXMAP ("/Toolbar/FileSaveAndClose", "stock_save", 24),
+ E_PIXMAP ("/Toolbar/FilePrint", "stock_print", 24),
+ E_PIXMAP ("/Toolbar/FileDelete", "stock_delete", 24),
E_PIXMAP_END
};
@@ -971,18 +971,18 @@
ECalComponentVType type;
if (!comp)
- return EVOLUTION_IMAGESDIR "/evolution-calendar-mini.png";
+ return "stock_calendar";
type = e_cal_component_get_vtype (comp);
switch (type) {
case E_CAL_COMPONENT_EVENT:
- return EVOLUTION_IMAGESDIR "/buttons/new_appointment.png";
+ return "stock_new-appointment";
break;
case E_CAL_COMPONENT_TODO:
- return EVOLUTION_IMAGESDIR "/buttons/new_task.png";
+ return "stock_task";
break;
default:
- return EVOLUTION_IMAGESDIR "/evolution-calendar-mini.png";
+ return "stock_calendar";
}
}
@@ -1015,11 +1015,18 @@
set_icon_from_comp (CompEditor *editor)
{
CompEditorPrivate *priv;
- const char *file;
+ const char *icon_name;
+ GList *icon_list;
priv = editor->priv;
- file = make_icon_from_comp (priv->comp);
- gnome_window_icon_set_from_file (GTK_WINDOW (editor), file);
+ icon_name = make_icon_from_comp (priv->comp);
+
+ icon_list = e_icon_factory_get_icon_list (icon_name);
+ 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);
+ }
}
static void
Index: calendar/gui/dialogs/event-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/event-editor.c,v
retrieving revision 1.39
diff -u -r1.39 event-editor.c
--- calendar/gui/dialogs/event-editor.c 20 Nov 2003 15:11:40 -0000 1.39
+++ calendar/gui/dialogs/event-editor.c 16 Apr 2004 19:46:53 -0000
@@ -69,7 +69,7 @@
static void model_row_delete_cb (GtkTreeModel *model, GtkTreePath *path, gpointer data);
static EPixmap pixmaps [] = {
- E_PIXMAP ("/Toolbar/Actions/ActionScheduleMeeting", "schedule-meeting-24.png"),
+ E_PIXMAP ("/Toolbar/Actions/ActionScheduleMeeting", "stock_people", 24),
E_PIXMAP_END
};
Index: composer/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/composer/ChangeLog,v
retrieving revision 1.627
diff -u -r1.627 ChangeLog
--- composer/ChangeLog 15 Apr 2004 18:55:33 -0000 1.627
+++ composer/ChangeLog 16 Apr 2004 19:46:53 -0000
@@ -1,3 +1,9 @@
+2004-04-16 Michael Terry <mike mterry name>
+
+ * e-msg-composer-select-file.c:
+ * e-msg-composer.c: Update the composer to use the icon theme via
+ the EIconFactory object in e-util
+
2004-04-15 Jeffrey Stedfast <fejj ximian com>
* e-msg-composer-attachment-bar.c (attach_to_multipart): Same idea
Index: composer/e-msg-composer-select-file.c
===================================================================
RCS file: /cvs/gnome/evolution/composer/e-msg-composer-select-file.c,v
retrieving revision 1.26
diff -u -r1.26 e-msg-composer-select-file.c
--- composer/e-msg-composer-select-file.c 6 Oct 2003 16:56:52 -0000 1.26
+++ composer/e-msg-composer-select-file.c 16 Apr 2004 19:46:53 -0000
@@ -34,9 +34,9 @@
#include <gtk/gtksignal.h>
#include <libgnomeui/gnome-uidefs.h>
-#include <libgnomeui/gnome-window-icon.h>
#include "e-msg-composer-select-file.h"
+#include <e-util/e-icon-factory.h>
static GtkFileSelection *
run_selector(EMsgComposer *composer, const char *title, int multi, gboolean *showinline_p)
@@ -44,12 +44,20 @@
GtkFileSelection *selection;
GtkWidget *showinline = NULL;
char *path;
+ GList *icon_list;
selection = (GtkFileSelection *)gtk_file_selection_new(title);
gtk_window_set_transient_for((GtkWindow *)selection, (GtkWindow *)composer);
gtk_window_set_wmclass((GtkWindow *)selection, "fileselection", "Evolution:composer");
gtk_window_set_modal((GtkWindow *)selection, TRUE);
- gnome_window_icon_set_from_file((GtkWindow *)selection, EVOLUTION_DATADIR "/images/evolution/compose-message.png");
+
+ icon_list = e_icon_factory_get_icon_list ("stock_mail-compose");
+ if (icon_list) {
+ gtk_window_set_icon_list (GTK_WINDOW (selection), icon_list);
+ g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
+ g_list_free (icon_list);
+ }
+
gtk_file_selection_set_select_multiple((GtkFileSelection *)selection, multi);
/* restore last path used */
Index: composer/e-msg-composer.c
===================================================================
RCS file: /cvs/gnome/evolution/composer/e-msg-composer.c,v
retrieving revision 1.460
diff -u -r1.460 e-msg-composer.c
--- composer/e-msg-composer.c 15 Apr 2004 18:55:33 -0000 1.460
+++ composer/e-msg-composer.c 16 Apr 2004 19:46:53 -0000
@@ -114,8 +114,7 @@
#include "e-msg-composer-select-file.h"
#include "evolution-shell-component-utils.h"
-
-#include "art/attachment.xpm"
+#include <e-util/e-icon-factory.h>
#include "Editor.h"
#include "listener.h"
@@ -2020,13 +2019,13 @@
};
static EPixmap pixcache [] = {
- E_PIXMAP ("/Toolbar/FileAttach", "buttons/add-attachment.png"),
- E_PIXMAP ("/Toolbar/FileSend", "buttons/send-24.png"),
+ E_PIXMAP ("/Toolbar/FileAttach", "stock_attach", 24),
+ E_PIXMAP ("/Toolbar/FileSend", "stock_mail-send", 24),
-/* E_PIXMAP ("/menu/Insert/FileAttach", "buttons/add-attachment.png"), */
- E_PIXMAP ("/commands/FileSend", "send-16.png"),
- E_PIXMAP ("/commands/FileSave", "save-16.png"),
- E_PIXMAP ("/commands/FileSaveAs", "save-as-16.png"),
+/* E_PIXMAP ("/menu/Insert/FileAttach", "stock_attach", 24), */
+ E_PIXMAP ("/commands/FileSend", "stock_mail-send", 16),
+ E_PIXMAP ("/commands/FileSave", "stock_save", 16),
+ E_PIXMAP ("/commands/FileSaveAs", "stock_save_as", 16),
E_PIXMAP_END
};
@@ -3166,6 +3165,7 @@
CORBA_Environment ev;
GConfClient *gconf;
int vis;
+ GList *icon_list;
BonoboControlFrame *control_frame;
GdkPixbuf *attachment_pixbuf;
@@ -3181,8 +3181,12 @@
G_CALLBACK (msg_composer_destroy_notify),
NULL);
- gnome_window_icon_set_from_file (GTK_WINDOW (composer), EVOLUTION_IMAGESDIR
- "/compose-message.png");
+ icon_list = e_icon_factory_get_icon_list ("stock_mail-compose");
+ if (icon_list) {
+ gtk_window_set_icon_list (GTK_WINDOW (composer), icon_list);
+ g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
+ g_list_free (icon_list);
+ }
/* DND support */
gtk_drag_dest_set (GTK_WIDGET (composer), GTK_DEST_DEFAULT_ALL,
@@ -3293,7 +3297,7 @@
gtk_misc_set_alignment (GTK_MISC (composer->attachment_expander_num), 1.0, 0.5);
expander_hbox = gtk_hbox_new (FALSE, 0);
- attachment_pixbuf = gdk_pixbuf_new_from_xpm_data (attachment_xpm);
+ attachment_pixbuf = e_icon_factory_get_icon ("stock_attach", 16);
composer->attachment_expander_icon = gtk_image_new_from_pixbuf (attachment_pixbuf);
gtk_misc_set_alignment (GTK_MISC (composer->attachment_expander_icon), 1, 0.5);
gtk_widget_set_size_request (composer->attachment_expander_icon, 100, -1);
Index: data/evolution.desktop.in.in
===================================================================
RCS file: /cvs/gnome/evolution/data/evolution.desktop.in.in,v
retrieving revision 1.3
diff -u -r1.3 evolution.desktop.in.in
--- data/evolution.desktop.in.in 9 Feb 2004 14:46:12 -0000 1.3
+++ data/evolution.desktop.in.in 16 Apr 2004 19:46:53 -0000
@@ -2,7 +2,7 @@
_Name=Ximian Evolution (Unstable)
_Comment=The Ximian Evolution Groupware Suite
Exec=evolution- BASE_VERSION@
-Icon=evolution- BASE_VERSION@.png
+Icon=evolution
Terminal=false
Type=Application
Categories=GNOME;Application;Office;X-Red-Hat-Base;
Index: e-util/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/e-util/ChangeLog,v
retrieving revision 1.454
diff -u -r1.454 ChangeLog
--- e-util/ChangeLog 14 Apr 2004 17:29:15 -0000 1.454
+++ e-util/ChangeLog 16 Apr 2004 19:46:53 -0000
@@ -1,3 +1,10 @@
+2004-04-16 Michael Terry <mike mterry name>
+
+ * Makefile.am: Add e-icon-factory.[ch]
+ * e-gui-utils.c: Use the icon theme via EIconFactory
+ * e-icon-factory.[ch]: Move EIconFactory to e-util, and add icon theme
+ support to the object so evolution uses them
+
2004-04-13 Jeffrey Stedfast <fejj ximian com>
* e-signature-list.c (gconf_signatures_changed): Don't add an
Index: e-util/Makefile.am
===================================================================
RCS file: /cvs/gnome/evolution/e-util/Makefile.am,v
retrieving revision 1.112
diff -u -r1.112 Makefile.am
--- e-util/Makefile.am 31 Mar 2004 21:13:00 -0000 1.112
+++ e-util/Makefile.am 16 Apr 2004 19:46:53 -0000
@@ -27,6 +27,7 @@
e-gui-utils.h \
e-host-utils.h \
e-html-utils.h \
+ e-icon-factory.h \
e-iterator.h \
e-lang-utils.h \
e-list-iterator.h \
@@ -65,6 +66,7 @@
e-gui-utils.c \
e-host-utils.c \
e-html-utils.c \
+ e-icon-factory.c \
e-iterator.c \
e-lang-utils.c \
e-list-iterator.c \
@@ -120,4 +122,4 @@
CLEANFILES = $(BUILT_SOURCES)
dist-hook:
- cd $(distdir); rm -f $(BUILT_SOURCES)
\ No newline at end of file
+ cd $(distdir); rm -f $(BUILT_SOURCES)
Index: e-util/e-gui-utils.c
===================================================================
RCS file: /cvs/gnome/evolution/e-util/e-gui-utils.c,v
retrieving revision 1.18
diff -u -r1.18 e-gui-utils.c
--- e-util/e-gui-utils.c 25 Feb 2004 21:15:45 -0000 1.18
+++ e-util/e-gui-utils.c 16 Apr 2004 19:46:53 -0000
@@ -14,6 +14,7 @@
#include <string.h>
#include "e-gui-utils.h"
+#include <e-util/e-icon-factory.h>
#include <glib.h>
#include <gtk/gtkalignment.h>
@@ -27,25 +28,23 @@
#ifdef HAVE_LIBGNOMEUI_GNOME_ICON_LOOKUP_H
#include <libgnomeui/gnome-icon-lookup.h>
-#else
-#include "art/empty.xpm"
#endif
GtkWidget *e_create_image_widget(gchar *name,
gchar *string1, gchar *string2,
gint int1, gint int2)
{
- char *filename;
GtkWidget *alignment = NULL;
if (string1) {
GtkWidget *w;
+ GdkPixbuf *pixbuf;
+
+ pixbuf = e_icon_factory_get_icon (string1, 48);
- if (*string1 == '/')
- filename = g_strdup(string1);
- else
- filename = g_build_filename (EVOLUTION_IMAGES, string1, NULL);
+ w = gtk_image_new_from_pixbuf (pixbuf);
+ g_object_unref (pixbuf);
- w = gtk_image_new_from_file (filename);
+ gtk_misc_set_alignment (GTK_MISC (w), 0.5, 0.5);
alignment = gtk_widget_new(gtk_alignment_get_type(),
"child", w,
@@ -56,7 +55,6 @@
NULL);
gtk_widget_show_all (alignment);
- g_free (filename);
}
return alignment;
@@ -159,7 +157,7 @@
"document-icons/i-regular.png", TRUE, NULL);
if (!icon_path) {
g_warning ("Could not get any icon for %s!",mime_type);
- return gdk_pixbuf_new_from_xpm_data((const char **)empty_xpm);
+ return e_icon_factory_get_icon (NULL, size_hint);
}
}
#endif
Index: e-util/e-icon-factory.c
===================================================================
RCS file: e-util/e-icon-factory.c
diff -N e-util/e-icon-factory.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ e-util/e-icon-factory.c 16 Apr 2004 19:46:53 -0000
@@ -0,0 +1,288 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/* e-icon-factory.c - Icon factory for the Evolution components.
+ *
+ * Copyright (C) 2002 Ximian, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Author: Ettore Perazzoli <ettore ximian com>, Michael Terry <mterry fastmail fm>
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+#include <libgnomeui/gnome-icon-theme.h>
+#include <e-util/e-icon-factory.h>
+#include "art/empty.xpm"
+
+
+/* One icon. Keep both a small (16x16) and a large (48x48) version around. */
+struct _Icon {
+ char *name;
+ GdkPixbuf *pixbuf_16;
+ GdkPixbuf *pixbuf_24;
+ GdkPixbuf *pixbuf_48;
+};
+typedef struct _Icon Icon;
+
+/* Hash of all the icons. */
+static GHashTable *name_to_icon = NULL;
+static GnomeIconTheme *icon_theme = NULL;
+static GdkPixbuf *empty_pixbuf = NULL;
+
+
+/* Creating and destroying icons. */
+
+static Icon *
+icon_new (const gchar *name,
+ GdkPixbuf *pixbuf_16,
+ GdkPixbuf *pixbuf_24,
+ GdkPixbuf *pixbuf_48)
+{
+ Icon *icon;
+
+ icon = g_new (Icon, 1);
+ icon->name = g_strdup (name);
+ icon->pixbuf_16 = pixbuf_16;
+ icon->pixbuf_24 = pixbuf_24;
+ icon->pixbuf_48 = pixbuf_48;
+
+ if (pixbuf_16 != NULL)
+ g_object_ref (pixbuf_16);
+ if (pixbuf_24 != NULL)
+ g_object_ref (pixbuf_24);
+ if (pixbuf_48 != NULL)
+ g_object_ref (pixbuf_48);
+
+ return icon;
+}
+
+#if 0
+
+/* (This is not currently used since we never prune icons out of the
+ cache.) */
+static void
+icon_free (Icon *icon)
+{
+ g_free (icon->name);
+
+ if (icon->pixbuf_16 != NULL)
+ g_object_unref (icon->pixbuf_16);
+ if (icon->pixbuf_24 != NULL)
+ g_object_unref (icon->pixbuf_24);
+ if (icon->pixbuf_48 != NULL)
+ g_object_unref (icon->pixbuf_48);
+
+ g_free (icon);
+}
+
+#endif
+
+
+/* Loading icons. */
+
+static Icon *
+load_icon (const gchar *icon_name)
+{
+ GdkPixbuf *unscaled;
+ GdkPixbuf *pixbuf_16;
+ GdkPixbuf *pixbuf_24;
+ GdkPixbuf *pixbuf_48;
+ gchar *filename;
+ Icon *icon;
+
+ filename = gnome_icon_theme_lookup_icon (icon_theme, icon_name, 16,
+ NULL, NULL);
+
+ if (filename == NULL)
+ return NULL;
+ unscaled = gdk_pixbuf_new_from_file (filename, NULL);
+ pixbuf_16 = gdk_pixbuf_scale_simple (unscaled, 16, 16, GDK_INTERP_BILINEAR);
+ g_object_unref (unscaled);
+ g_free (filename);
+
+ filename = gnome_icon_theme_lookup_icon (icon_theme, icon_name, 24,
+ NULL, NULL);
+
+ if (filename == NULL)
+ return NULL;
+ unscaled = gdk_pixbuf_new_from_file (filename, NULL);
+ pixbuf_24 = gdk_pixbuf_scale_simple (unscaled, 24, 24, GDK_INTERP_BILINEAR);
+ g_object_unref (unscaled);
+ g_free (filename);
+
+ filename = gnome_icon_theme_lookup_icon (icon_theme, icon_name, 48,
+ NULL, NULL);
+
+ if (filename == NULL)
+ return NULL;
+ unscaled = gdk_pixbuf_new_from_file (filename, NULL);
+ pixbuf_48 = gdk_pixbuf_scale_simple (unscaled, 48, 48, GDK_INTERP_BILINEAR);
+ g_object_unref (unscaled);
+ g_free (filename);
+
+ icon = icon_new (icon_name, pixbuf_16, pixbuf_24, pixbuf_48);
+
+ g_object_unref (pixbuf_16);
+ g_object_unref (pixbuf_24);
+ g_object_unref (pixbuf_48);
+
+ return icon;
+}
+
+
+/* Public API. */
+
+void
+e_icon_factory_init (void)
+{
+ if (name_to_icon != NULL) {
+ /* Already initialized. */
+ return;
+ }
+
+ name_to_icon = g_hash_table_new (g_str_hash, g_str_equal);
+ icon_theme = gnome_icon_theme_new ();
+ empty_pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **) empty_xpm);
+}
+
+gchar *
+e_icon_factory_get_icon_filename (const gchar *icon_name,
+ gint icon_size)
+{
+ gchar *filename;
+
+ g_return_val_if_fail (icon_name != NULL, NULL);
+ g_return_val_if_fail (strcmp (icon_name, ""), NULL);
+
+ filename = gnome_icon_theme_lookup_icon (icon_theme,
+ icon_name,
+ icon_size,
+ NULL,
+ NULL);
+
+ return filename;
+}
+
+/* Loads the themed version of the icon name at the appropriate size.
+ The returned icon is guaranteed to be the requested size and exist. If
+ the themed icon cannot be found, an empty icon is returned. */
+GdkPixbuf *
+e_icon_factory_get_icon (const gchar *icon_name,
+ gint icon_size)
+{
+ if (icon_name != NULL && strcmp (icon_name, "")) {
+ Icon *icon;
+
+ icon = g_hash_table_lookup (name_to_icon, icon_name);
+ if (icon == NULL) {
+ icon = load_icon (icon_name);
+ if (icon == NULL) {
+ g_warning ("Icon not found -- %s", icon_name);
+
+ /* Create an empty icon so that we don't keep spitting
+ out the same warning over and over, every time this
+ icon is requested. */
+
+ icon = icon_new (icon_name, NULL, NULL, NULL);
+ g_hash_table_insert (name_to_icon, icon->name, icon);
+ }
+ else {
+ g_hash_table_insert (name_to_icon, icon->name, icon);
+ }
+ }
+
+ if (icon->pixbuf_16) {
+ gchar *filename;
+ GdkPixbuf *pixbuf, *scaled;
+
+ switch (icon_size) {
+ case 16:
+ return g_object_ref (icon->pixbuf_16);
+
+ case 24:
+ return g_object_ref (icon->pixbuf_24);
+
+ case 48:
+ return g_object_ref (icon->pixbuf_48);
+
+ default:
+ /* Non-standard size. Do a non-cached load. */
+
+ filename = gnome_icon_theme_lookup_icon (icon_theme,
+ icon_name,
+ icon_size,
+ NULL,
+ NULL);
+ if (filename == NULL)
+ break;
+
+ pixbuf = gdk_pixbuf_new_from_file (filename, NULL);
+ g_free (filename);
+ if (pixbuf == NULL)
+ break;
+
+ scaled = gdk_pixbuf_scale_simple (pixbuf, icon_size, icon_size, GDK_INTERP_BILINEAR);
+ g_object_unref (pixbuf);
+
+ return scaled;
+ }
+ }
+ }
+
+ /* icon not found -- create an empty icon */
+ return gdk_pixbuf_scale_simple (empty_pixbuf, icon_size, icon_size, GDK_INTERP_NEAREST);
+}
+
+GList *
+e_icon_factory_get_icon_list (const gchar *icon_name)
+{
+ if (icon_name != NULL && strcmp (icon_name, "")) {
+ Icon *icon;
+
+ icon = g_hash_table_lookup (name_to_icon, icon_name);
+ if (icon == NULL) {
+ icon = load_icon (icon_name);
+ if (icon == NULL) {
+ g_warning ("Icon not found -- %s", icon_name);
+
+ /* Create an empty icon so that we don't keep spitting
+ out the same warning over and over, every time this
+ icon is requested. */
+
+ icon = icon_new (icon_name, NULL, NULL, NULL);
+ g_hash_table_insert (name_to_icon, icon->name, icon);
+ }
+ else {
+ g_hash_table_insert (name_to_icon, icon->name, icon);
+ }
+ }
+
+ if (icon->pixbuf_16) {
+ GList *list = NULL;
+
+ list = g_list_append (list, g_object_ref (icon->pixbuf_48));
+ list = g_list_append (list, g_object_ref (icon->pixbuf_24));
+ list = g_list_append (list, g_object_ref (icon->pixbuf_16));
+
+ return list;
+ }
+ }
+
+ /* icons not found */
+ return NULL;
+}
Index: e-util/e-icon-factory.h
===================================================================
RCS file: e-util/e-icon-factory.h
diff -N e-util/e-icon-factory.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ e-util/e-icon-factory.h 16 Apr 2004 19:46:53 -0000
@@ -0,0 +1,38 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/* e-icon-factory.h - Icon factory for the Evolution shell.
+ *
+ * Copyright (C) 2002 Ximian, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Author: Ettore Perazzoli <ettore ximian com>
+ */
+
+#ifndef _E_ICON_FACTORY_H_
+#define _E_ICON_FACTORY_H_
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
+
+void e_icon_factory_init (void);
+
+gchar *e_icon_factory_get_icon_filename (const gchar *icon_name,
+ gint icon_size);
+
+GdkPixbuf *e_icon_factory_get_icon (const gchar *icon_name,
+ gint icon_size);
+
+GList *e_icon_factory_get_icon_list (const gchar *icon_name);
+
+#endif /* _E_ICON_FACTORY_H_ */
Index: mail/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3244
diff -u -r1.3244 ChangeLog
--- mail/ChangeLog 15 Apr 2004 20:50:04 -0000 1.3244
+++ mail/ChangeLog 16 Apr 2004 19:46:53 -0000
@@ -1,3 +1,24 @@
+2004-04-16 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-15 Jeffrey Stedfast <fejj ximian com>
* mail-config.c (config_write_style): Change the message display
Index: mail/GNOME_Evolution_Mail.server.in.in
===================================================================
RCS file: /cvs/gnome/evolution/mail/GNOME_Evolution_Mail.server.in.in,v
retrieving revision 1.18
diff -u -r1.18 GNOME_Evolution_Mail.server.in.in
--- mail/GNOME_Evolution_Mail.server.in.in 12 Jan 2004 16:51:55 -0000 1.18
+++ mail/GNOME_Evolution_Mail.server.in.in 16 Apr 2004 19:46:53 -0000
@@ -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"/>
Index: mail/em-account-prefs.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-account-prefs.c,v
retrieving revision 1.6
diff -u -r1.6 em-account-prefs.c
--- mail/em-account-prefs.c 7 Apr 2004 20:52:49 -0000 1.6
+++ mail/em-account-prefs.c 16 Apr 2004 19:46:53 -0000
@@ -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 @@
/* 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 @@
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 @@
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);
}
Index: mail/em-account-prefs.h
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-account-prefs.h,v
retrieving revision 1.4
diff -u -r1.4 em-account-prefs.h
--- mail/em-account-prefs.h 7 Apr 2004 20:52:49 -0000 1.4
+++ mail/em-account-prefs.h 16 Apr 2004 19:46:53 -0000
@@ -61,8 +61,7 @@
GtkWidget *druid;
GtkWidget *editor;
- GdkPixmap *mark_pixmap;
- GdkBitmap *mark_bitmap;
+ GdkPixbuf *mark_pixbuf;
GtkTreeView *table;
Index: mail/em-composer-prefs.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-composer-prefs.c,v
retrieving revision 1.10
diff -u -r1.10 em-composer-prefs.c
--- mail/em-composer-prefs.c 7 Apr 2004 20:52:49 -0000 1.10
+++ mail/em-composer-prefs.c 16 Apr 2004 19:46:53 -0000
@@ -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 @@
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 @@
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 @@
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));
Index: mail/em-composer-prefs.h
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-composer-prefs.h,v
retrieving revision 1.7
diff -u -r1.7 em-composer-prefs.h
--- mail/em-composer-prefs.h 7 Apr 2004 20:52:49 -0000 1.7
+++ mail/em-composer-prefs.h 16 Apr 2004 19:46:53 -0000
@@ -76,8 +76,12 @@
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;
Index: mail/em-folder-browser.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-folder-browser.c,v
retrieving revision 1.36
diff -u -r1.36 em-folder-browser.c
--- mail/em-folder-browser.c 14 Apr 2004 10:33:38 -0000 1.36
+++ mail/em-folder-browser.c 16 Apr 2004 19:46:53 -0000
@@ -706,12 +706,12 @@
};
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
};
Index: mail/em-folder-tree.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-folder-tree.c,v
retrieving revision 1.90
diff -u -r1.90 em-folder-tree.c
--- mail/em-folder-tree.c 12 Apr 2004 19:11:14 -0000 1.90
+++ mail/em-folder-tree.c 16 Apr 2004 19:46:53 -0000
@@ -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 @@
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 @@
{ 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
Index: mail/em-folder-view.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-folder-view.c,v
retrieving revision 1.54
diff -u -r1.54 em-folder-view.c
--- mail/em-folder-view.c 14 Apr 2004 10:33:38 -0000 1.54
+++ mail/em-folder-view.c 16 Apr 2004 19:46:53 -0000
@@ -768,31 +768,31 @@
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 @@
{ 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 @@
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
};
Index: mail/em-format-html-display.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-format-html-display.c,v
retrieving revision 1.39
diff -u -r1.39 em-format-html-display.c
--- mail/em-format-html-display.c 14 Apr 2004 09:48:36 -0000 1.39
+++ mail/em-format-html-display.c 16 Apr 2004 19:46:53 -0000
@@ -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 @@
/* ********************************************************************** */
-/* 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 @@
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 @@
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 @@
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%%\">");
Index: mail/em-format-html.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-format-html.c,v
retrieving revision 1.48
diff -u -r1.48 em-format-html.c
--- mail/em-format-html.c 13 Apr 2004 11:00:37 -0000 1.48
+++ mail/em-format-html.c 16 Apr 2004 19:46:54 -0000
@@ -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 @@
}
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 @@
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 @@
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 @@
&& (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 @@
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 @@
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);
Index: mail/em-format-html.h
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-format-html.h,v
retrieving revision 1.11
diff -u -r1.11 em-format-html.h
--- mail/em-format-html.h 31 Mar 2004 10:09:04 -0000 1.11
+++ mail/em-format-html.h 16 Apr 2004 19:46:54 -0000
@@ -138,7 +138,7 @@
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);
Index: mail/em-popup.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-popup.c,v
retrieving revision 1.15
diff -u -r1.15 em-popup.c
--- mail/em-popup.c 18 Feb 2004 20:22:04 -0000 1.15
+++ mail/em-popup.c 16 Apr 2004 19:46:54 -0000
@@ -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 @@
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 @@
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 @@
}
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 },
};
Index: mail/mail-component.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-component.c,v
retrieving revision 1.72
diff -u -r1.72 mail-component.c
--- mail/mail-component.c 14 Apr 2004 09:48:36 -0000 1.72
+++ mail/mail-component.c 16 Apr 2004 19:46:54 -0000
@@ -534,7 +534,7 @@
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 @@
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 @@
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;
Index: mail/mail-config-druid.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-config-druid.c,v
retrieving revision 1.105
diff -u -r1.105 mail-config-druid.c
--- mail/mail-config-druid.c 31 Mar 2004 10:09:04 -0000 1.105
+++ mail/mail-config-druid.c 16 Apr 2004 19:46:54 -0000
@@ -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 @@
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 @@
"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 @@
{
MailConfigWizard *mcw;
GtkWidget *new, *page;
+ GdkPixbuf *icon;
int i;
mcw = config_wizard_new ();
@@ -622,6 +621,9 @@
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 @@
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);
Index: mail/mail-config.glade
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-config.glade,v
retrieving revision 1.139
diff -u -r1.139 mail-config.glade
--- mail/mail-config.glade 13 Apr 2004 18:55:29 -0000 1.139
+++ mail/mail-config.glade 16 Apr 2004 19:46:54 -0000
@@ -33,7 +33,6 @@
<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 @@
<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 @@
<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 @@
<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 @@
<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">
Index: mail/mail-mt.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-mt.c,v
retrieving revision 1.78
diff -u -r1.78 mail-mt.c
--- mail/mail-mt.c 31 Mar 2004 10:09:04 -0000 1.78
+++ mail/mail-mt.c 16 Apr 2004 19:46:54 -0000
@@ -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 @@
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 @@
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)
Index: mail/mail-send-recv.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-send-recv.c,v
retrieving revision 1.87
diff -u -r1.87 mail-send-recv.c
--- mail/mail-send-recv.c 31 Mar 2004 10:09:04 -0000 1.87
+++ mail/mail-send-recv.c 16 Apr 2004 19:46:54 -0000
@@ -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 @@
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 @@
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 @@
} 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 @@
} 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);
Index: mail/message-list.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/message-list.c,v
retrieving revision 1.376
diff -u -r1.376 message-list.c
--- mail/message-list.c 14 Apr 2004 22:24:56 -0000 1.376
+++ mail/message-list.c 16 Apr 2004 19:46:54 -0000
@@ -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 @@
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 @@
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);
}
}
Index: mail/message-tag-followup.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/message-tag-followup.c,v
retrieving revision 1.27
diff -u -r1.27 message-tag-followup.c
--- mail/message-tag-followup.c 25 Mar 2004 06:56:12 -0000 1.27
+++ mail/message-tag-followup.c 16 Apr 2004 19:46:54 -0000
@@ -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 @@
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 @@
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);
Index: mail/message-tags.glade
===================================================================
RCS file: /cvs/gnome/evolution/mail/message-tags.glade,v
retrieving revision 1.7
diff -u -r1.7 message-tags.glade
--- mail/message-tags.glade 25 Mar 2004 06:56:12 -0000 1.7
+++ mail/message-tags.glade 16 Apr 2004 19:46:54 -0000
@@ -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>
Index: shell/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/shell/ChangeLog,v
retrieving revision 1.1415
diff -u -r1.1415 ChangeLog
--- shell/ChangeLog 14 Apr 2004 15:46:33 -0000 1.1415
+++ shell/ChangeLog 16 Apr 2004 19:46:54 -0000
@@ -1,3 +1,21 @@
+2004-04-16 Michael Terry <mike mterry name>
+
+ * GNOME_Evolution_Test.server.in.in: Change component icons to use the
+ icon theme names for icons
+ * Makefile.am: Remove e-icon-factory.[ch]
+ * e-component-registry.c: Use the icon theme for component icons
+ * e-icon-factory.[ch]: Removed these files
+ * e-shell-importer.c:
+ * e-shell-settings-dialog.c:
+ * e-shell-startup-wizard.c:
+ * e-shell-window-commands.c:
+ * e-user-creatable-items-handler.c:
+ * evolution-shell-component-utils.[ch]:
+ * main.c:
+ * glade/evolution-startup-wizard.glade:
+ * importer/import.glade: Use the icon theme via EIconFactory for all
+ of the icons in the shell, and the window icons
+
2004-04-14 JP Rosevear <jpr ximian com>
* e-shell-importer.c (get_iid_for_filetype): differentiate between
Index: shell/GNOME_Evolution_Test.server.in.in
===================================================================
RCS file: /cvs/gnome/evolution/shell/GNOME_Evolution_Test.server.in.in,v
retrieving revision 1.1
diff -u -r1.1 GNOME_Evolution_Test.server.in.in
--- shell/GNOME_Evolution_Test.server.in.in 11 Jan 2004 06:45:44 -0000 1.1
+++ shell/GNOME_Evolution_Test.server.in.in 16 Apr 2004 19:46:54 -0000
@@ -29,9 +29,9 @@
<oaf_attribute name="evolution:button_label" type="string" _value="Test"/>
<oaf_attribute name="evolution:button_sort_order" type="string" value="-1"/>
- <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_server>
Index: shell/Makefile.am
===================================================================
RCS file: /cvs/gnome/evolution/shell/Makefile.am,v
retrieving revision 1.193
diff -u -r1.193 Makefile.am
--- shell/Makefile.am 9 Apr 2004 15:46:00 -0000 1.193
+++ shell/Makefile.am 16 Apr 2004 19:46:54 -0000
@@ -101,7 +101,6 @@
eshellinclude_HEADERS = \
Evolution.h \
- e-icon-factory.h \
e-shell-corba-icon-utils.h \
e-shell-utils.h \
e-user-creatable-items-handler.h \
@@ -112,7 +111,6 @@
libeshell_la_SOURCES = \
$(IDL_GENERATED) \
$(MARSHAL_GENERATED) \
- e-icon-factory.c \
e-shell-corba-icon-utils.c \
e-shell-utils.c \
e-user-creatable-items-handler.c \
Index: shell/e-component-registry.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-component-registry.c,v
retrieving revision 1.44
diff -u -r1.44 e-component-registry.c
--- shell/e-component-registry.c 2 Feb 2004 21:57:37 -0000 1.44
+++ shell/e-component-registry.c 16 Apr 2004 19:46:54 -0000
@@ -27,7 +27,7 @@
#include "e-component-registry.h"
#include "e-shell-utils.h"
-
+#include <e-util/e-icon-factory.h>
#include "e-util/e-lang-utils.h"
#include <libgnome/gnome-i18n.h>
@@ -173,8 +173,7 @@
if (icon_name == NULL) {
icon = NULL;
} else {
- char *full_path = e_shell_get_icon_path (icon_name, TRUE);
- icon = gdk_pixbuf_new_from_file (full_path, NULL);
+ icon = e_icon_factory_get_icon (icon_name, 24);
}
sort_order_string = bonobo_server_info_prop_lookup (& info_list->_buffer[i],
Index: shell/e-icon-factory.c
===================================================================
RCS file: shell/e-icon-factory.c
diff -N shell/e-icon-factory.c
--- shell/e-icon-factory.c 2 Dec 2002 03:23:56 -0000 1.6
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,162 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-icon-factory.c - Icon factory for the Evolution shell.
- *
- * Copyright (C) 2002 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Ettore Perazzoli <ettore ximian com>
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "e-icon-factory.h"
-
-#include "e-shell-constants.h"
-
-
-/* One icon. Keep both a small (16x16) and a large (48x48) version around. */
-struct _Icon {
- char *name;
- GdkPixbuf *small_pixbuf;
- GdkPixbuf *large_pixbuf;
-};
-typedef struct _Icon Icon;
-
-/* Hash of all the icons. */
-static GHashTable *name_to_icon = NULL;
-
-
-/* Creating and destroying icons. */
-
-static Icon *
-icon_new (const char *name,
- GdkPixbuf *small_pixbuf,
- GdkPixbuf *large_pixbuf)
-{
- Icon *icon;
-
- icon = g_new (Icon, 1);
- icon->name = g_strdup (name);
- icon->small_pixbuf = small_pixbuf;
- icon->large_pixbuf = large_pixbuf;
-
- if (small_pixbuf != NULL)
- g_object_ref (small_pixbuf);
- if (large_pixbuf != NULL)
- g_object_ref (large_pixbuf);
-
- return icon;
-}
-
-#if 0
-
-/* (This is not currently used since we never prune icons out of the
- cache.) */
-static void
-icon_free (Icon *icon)
-{
- g_free (icon->name);
-
- if (icon->large_pixbuf != NULL)
- g_object_unref (icon->large_pixbuf);
- if (icon->small_pixbuf != NULL)
- g_object_unref (icon->small_pixbuf);
-
- g_free (icon);
-}
-
-#endif
-
-
-/* Loading icons. */
-
-static Icon *
-load_icon (const char *icon_name)
-{
- GdkPixbuf *small_pixbuf;
- GdkPixbuf *large_pixbuf;
- Icon *icon;
- char *path;
-
- path = g_strconcat (EVOLUTION_IMAGES, "/", icon_name, "-mini.png", NULL);
- small_pixbuf = gdk_pixbuf_new_from_file (path, NULL);
- g_free (path);
-
- path = g_strconcat (EVOLUTION_IMAGES, "/", icon_name, ".png", NULL);
- large_pixbuf = gdk_pixbuf_new_from_file (path, NULL);
- g_free (path);
-
- if (large_pixbuf == NULL || small_pixbuf == NULL)
- return NULL;
-
- icon = icon_new (icon_name, small_pixbuf, large_pixbuf);
-
- g_object_unref (small_pixbuf);
- g_object_unref (large_pixbuf);
-
- return icon;
-}
-
-
-/* Public API. */
-
-void
-e_icon_factory_init (void)
-{
- if (name_to_icon != NULL) {
- /* Already initialized. */
- return;
- }
-
- name_to_icon = g_hash_table_new (g_str_hash, g_str_equal);
-}
-
-GdkPixbuf *
-e_icon_factory_get_icon (const char *icon_name,
- gboolean mini)
-{
- Icon *icon;
-
- g_return_val_if_fail (icon_name != NULL, NULL);
-
- icon = g_hash_table_lookup (name_to_icon, icon_name);
- if (icon == NULL) {
- icon = load_icon (icon_name);
- if (icon == NULL) {
- g_warning ("Icon not found -- %s", icon_name);
-
- /* Create an empty icon so that we don't keep spitting
- out the same warning over and over, every time this
- icon is requested. */
-
- icon = icon_new (icon_name, NULL, NULL);
- g_hash_table_insert (name_to_icon, icon->name, icon);
- return NULL;
- }
-
- g_hash_table_insert (name_to_icon, icon->name, icon);
- }
-
- if (mini) {
- g_object_ref (icon->small_pixbuf);
- return icon->small_pixbuf;
- } else {
- g_object_ref (icon->large_pixbuf);
- return icon->large_pixbuf;
- }
-}
Index: shell/e-icon-factory.h
===================================================================
RCS file: shell/e-icon-factory.h
diff -N shell/e-icon-factory.h
--- shell/e-icon-factory.h 9 Jul 2002 17:06:18 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,33 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-icon-factory.h - Icon factory for the Evolution shell.
- *
- * Copyright (C) 2002 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Ettore Perazzoli <ettore ximian com>
- */
-
-#ifndef _E_ICON_FACTORY_H_
-#define _E_ICON_FACTORY_H_
-
-#include <gdk-pixbuf/gdk-pixbuf.h>
-
-void e_icon_factory_init (void);
-
-GdkPixbuf *e_icon_factory_get_icon (const char *icon_name,
- gboolean mini);
-
-#endif /* _E_ICON_FACTORY_H_ */
Index: shell/e-shell-importer.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-shell-importer.c,v
retrieving revision 1.67
diff -u -r1.67 e-shell-importer.c
--- shell/e-shell-importer.c 14 Apr 2004 15:46:33 -0000 1.67
+++ shell/e-shell-importer.c 16 Apr 2004 19:46:54 -0000
@@ -1141,10 +1141,13 @@
ImportData *data = g_new0 (ImportData, 1);
GtkWidget *html;
static gboolean dialog_open = FALSE;
+ GdkPixbuf *icon;
if (dialog_open) {
return;
}
+
+ icon = e_icon_factory_get_icon ("stock_import", 48);
dialog_open = TRUE;
data->window = shell_window;
@@ -1166,9 +1169,11 @@
/* Start page */
data->start = GNOME_DRUID_PAGE_EDGE (glade_xml_get_widget (data->wizard, "page0"));
+ gnome_druid_page_edge_set_logo (data->start, icon);
/* Intelligent or direct import page */
data->typedialog = glade_xml_get_widget (data->wizard, "page1");
+ gnome_druid_page_standard_set_logo (data->typedialog, icon);
g_signal_connect (data->typedialog, "next",
G_CALLBACK (next_type_page), data);
data->typepage = importer_type_page_new (data);
@@ -1180,6 +1185,7 @@
/* Intelligent importer source page */
data->intelligent = glade_xml_get_widget (data->wizard, "page2-intelligent");
+ gnome_druid_page_standard_set_logo (data->intelligent, icon);
g_signal_connect (data->intelligent, "back",
G_CALLBACK (back_intelligent_page), data);
g_signal_connect_after (data->intelligent, "prepare",
@@ -1195,10 +1201,12 @@
/* File selection and file type page */
data->filedialog = glade_xml_get_widget (data->wizard, "page2-file");
+ gnome_druid_page_standard_set_logo (data->filedialog, icon);
g_signal_connect_after (data->filedialog, "prepare",
G_CALLBACK (prepare_file_page), data);
g_signal_connect (data->filedialog, "next",
G_CALLBACK (next_file_page), data);
+ gnome_druid_page_edge_set_logo (data->finish, icon);
data->filepage = importer_file_page_new (data);
html = create_help ("file_html");
@@ -1227,6 +1235,8 @@
G_CALLBACK (import_druid_finish), data);
g_object_weak_ref ((GObject *)data->dialog, import_druid_weak_notify, data);
+
+ g_object_unref (icon);
gtk_widget_show_all (data->dialog);
}
Index: shell/e-shell-settings-dialog.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-shell-settings-dialog.c,v
retrieving revision 1.29
diff -u -r1.29 e-shell-settings-dialog.c
--- shell/e-shell-settings-dialog.c 31 Mar 2004 17:05:52 -0000 1.29
+++ shell/e-shell-settings-dialog.c 16 Apr 2004 19:46:54 -0000
@@ -28,7 +28,7 @@
#include "e-shell-settings-dialog.h"
#include "e-corba-config-page.h"
-
+#include <e-util/e-icon-factory.h>
#include "e-util/e-lang-utils.h"
#include <gal/util/e-util.h>
@@ -204,11 +204,7 @@
if (g_path_is_absolute (icon_path)) {
icon = gdk_pixbuf_new_from_file (icon_path, NULL);
} else {
- char *real_icon_path;
-
- real_icon_path = g_build_filename (EVOLUTION_IMAGES, icon_path, NULL);
- icon = gdk_pixbuf_new_from_file (real_icon_path, NULL);
- g_free (real_icon_path);
+ icon = e_icon_factory_get_icon (icon_path, 48);
}
}
Index: shell/e-shell-startup-wizard.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-shell-startup-wizard.c,v
retrieving revision 1.49
diff -u -r1.49 e-shell-startup-wizard.c
--- shell/e-shell-startup-wizard.c 31 Mar 2004 17:05:52 -0000 1.49
+++ shell/e-shell-startup-wizard.c 16 Apr 2004 19:46:54 -0000
@@ -31,7 +31,7 @@
#include "e-timezone-dialog/e-timezone-dialog.h"
#include "e-util/e-gtk-utils.h"
-
+#include <e-util/e-icon-factory.h>
#include <gconf/gconf-client.h>
#include <evolution-wizard.h>
@@ -493,6 +493,7 @@
{
TimezoneDialogPage *page;
ETimezoneDialog *etd;
+ GdkPixbuf *pixbuf;
g_return_val_if_fail (data != NULL, NULL);
@@ -500,6 +501,10 @@
page->page = glade_xml_get_widget (data->wizard, "timezone-page");
g_return_val_if_fail (page->page != NULL, NULL);
+ pixbuf = e_icon_factory_get_icon ("stock_timezone", 48);
+ gnome_druid_page_standard_set_logo (GNOME_DRUID_PAGE_STANDARD (page->page), pixbuf);
+ g_object_unref (pixbuf);
+
g_signal_connect_after (page->page, "prepare",
G_CALLBACK (prepare_timezone_page), data);
page->vbox = GTK_WIDGET (GNOME_DRUID_PAGE_STANDARD (page->page)->vbox);
@@ -723,12 +728,17 @@
{
ImportDialogPage *page;
GtkWidget *label, *sep;
+ GdkPixbuf *pixbuf;
g_return_val_if_fail (data != NULL, NULL);
page = g_new0 (ImportDialogPage, 1);
page->page = glade_xml_get_widget (data->wizard, "import-page");
g_return_val_if_fail (page->page != NULL, NULL);
+
+ pixbuf = e_icon_factory_get_icon ("stock_mail-import", 48);
+ gnome_druid_page_standard_set_logo (GNOME_DRUID_PAGE_STANDARD (page->page), pixbuf);
+ g_object_unref (pixbuf);
g_signal_connect_after (page->page, "prepare",
G_CALLBACK (prepare_importer_page), data);
Index: shell/e-shell-window-commands.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-shell-window-commands.c,v
retrieving revision 1.12
diff -u -r1.12 e-shell-window-commands.c
--- shell/e-shell-window-commands.c 8 Mar 2004 16:58:41 -0000 1.12
+++ shell/e-shell-window-commands.c 16 Apr 2004 19:46:54 -0000
@@ -345,22 +345,22 @@
};
static EPixmap pixmaps [] = {
- E_PIXMAP ("/commands/SendReceive", "send-receive.xpm"),
- E_PIXMAP ("/Toolbar/SendReceive", "buttons/send-24-receive.png"),
- E_PIXMAP ("/menu/File/FileImporter", "import.xpm"),
- E_PIXMAP ("/menu/File/ToggleOffline", "work_offline.xpm"),
- E_PIXMAP ("/menu/Tools/Settings", "settings-16.png"),
+ E_PIXMAP ("/commands/SendReceive", "stock_mail-send-receive", 16),
+ E_PIXMAP ("/Toolbar/SendReceive", "stock_mail-send-receive", 24),
+ E_PIXMAP ("/menu/File/FileImporter", "stock_mail-import", 16),
+ E_PIXMAP ("/menu/File/ToggleOffline", "stock_disconnect", 16),
+ E_PIXMAP ("/menu/Tools/Settings", "gnome-settings", 16),
E_PIXMAP_END
};
static EPixmap offline_pixmaps [] = {
- E_PIXMAP ("/menu/File/ToggleOffline", "work_offline.xpm"),
+ E_PIXMAP ("/menu/File/ToggleOffline", "stock_disconnect", 16),
E_PIXMAP_END
};
static EPixmap online_pixmaps [] = {
- E_PIXMAP ("/menu/File/ToggleOffline", "work_online-16.png"),
+ E_PIXMAP ("/menu/File/ToggleOffline", "stock_connect", 16),
E_PIXMAP_END
};
Index: shell/e-user-creatable-items-handler.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-user-creatable-items-handler.c,v
retrieving revision 1.7
diff -u -r1.7 e-user-creatable-items-handler.c
--- shell/e-user-creatable-items-handler.c 13 Apr 2004 10:37:19 -0000 1.7
+++ shell/e-user-creatable-items-handler.c 16 Apr 2004 19:46:54 -0000
@@ -25,7 +25,7 @@
#endif
#include "e-user-creatable-items-handler.h"
-
+#include <e-util/e-icon-factory.h>
#include "e-shell-utils.h"
#include "Evolution.h"
@@ -267,9 +267,7 @@
if (corba_item->iconName == "") {
item->icon = NULL;
} else {
- char *icon_path = e_shell_get_icon_path (corba_item->iconName, TRUE);
- item->icon = gdk_pixbuf_new_from_file (icon_path, NULL);
- g_free (icon_path);
+ item->icon = e_icon_factory_get_icon (corba_item->iconName, 16);
}
if (corba_item->type == GNOME_Evolution_CREATABLE_OBJECT)
Index: shell/evolution-shell-component-utils.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/evolution-shell-component-utils.c,v
retrieving revision 1.14
diff -u -r1.14 evolution-shell-component-utils.c
--- shell/evolution-shell-component-utils.c 25 Mar 2003 15:48:33 -0000 1.14
+++ shell/evolution-shell-component-utils.c 16 Apr 2004 19:46:54 -0000
@@ -24,7 +24,7 @@
#endif
#include "evolution-shell-component-utils.h"
-
+#include <e-util/e-icon-factory.h>
#include "e-util/e-dialog-utils.h"
#include <string.h>
@@ -53,23 +53,14 @@
for (i = 0; pixcache [i].path; i++) {
if (!pixcache [i].pixbuf) {
- char *path;
GdkPixbuf *pixbuf;
- path = g_build_filename (EVOLUTION_IMAGES, pixcache [i].fname, NULL);
-
- pixbuf = gdk_pixbuf_new_from_file (path, NULL);
- if (pixbuf == NULL) {
- g_warning ("Cannot load image -- %s", path);
- } else {
- pixcache [i].pixbuf = bonobo_ui_util_pixbuf_to_xml (pixbuf);
- g_object_unref (pixbuf);
- bonobo_ui_component_set_prop (uic,
- pixcache [i].path, "pixname",
- pixcache [i].pixbuf, NULL);
- }
-
- g_free (path);
+ pixbuf = e_icon_factory_get_icon (pixcache [i].name, pixcache [i].size);
+ pixcache [i].pixbuf = bonobo_ui_util_pixbuf_to_xml (pixbuf);
+ g_object_unref (pixbuf);
+ bonobo_ui_component_set_prop (uic,
+ pixcache [i].path, "pixname",
+ pixcache [i].pixbuf, NULL);
} else {
bonobo_ui_component_set_prop (uic, pixcache [i].path,
"pixname",
Index: shell/evolution-shell-component-utils.h
===================================================================
RCS file: /cvs/gnome/evolution/shell/evolution-shell-component-utils.h,v
retrieving revision 1.5
diff -u -r1.5 evolution-shell-component-utils.h
--- shell/evolution-shell-component-utils.h 4 Apr 2002 13:35:26 -0000 1.5
+++ shell/evolution-shell-component-utils.h 16 Apr 2004 19:46:54 -0000
@@ -31,12 +31,13 @@
typedef struct _EPixmap {
const char *path;
- const char *fname;
+ const char *name;
+ gint size;
char *pixbuf;
} EPixmap;
-#define E_PIXMAP(path,fname) { (path), (fname), NULL }
-#define E_PIXMAP_END { NULL, NULL, NULL }
+#define E_PIXMAP(path,name,size) { (path), (name), (size), NULL }
+#define E_PIXMAP_END { NULL, NULL, 0, NULL }
/* Takes an array of pixmaps, terminated by E_PIXMAP_END, and loads into uic */
void e_pixmaps_update (BonoboUIComponent *uic, EPixmap *pixcache);
Index: shell/main.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/main.c,v
retrieving revision 1.149
diff -u -r1.149 main.c
--- shell/main.c 9 Apr 2004 21:56:34 -0000 1.149
+++ shell/main.c 16 Apr 2004 19:46:54 -0000
@@ -28,7 +28,7 @@
#include "e-util/e-gtk-utils.h"
#include "e-util/e-bconf-map.h"
-#include "e-icon-factory.h"
+#include <e-util/e-icon-factory.h>
#include "e-shell-constants.h"
#include "e-shell.h"
@@ -55,7 +55,6 @@
#include <libgnome/gnome-i18n.h>
#include <libgnome/gnome-util.h>
#include <libgnomeui/gnome-ui-init.h>
-#include <libgnomeui/gnome-window-icon.h>
#include <bonobo/bonobo-main.h>
#include <bonobo/bonobo-moniker-util.h>
@@ -521,6 +520,7 @@
poptContext popt_context;
const char **args;
char *evolution_directory;
+ GList *icon_list;
/* Make ElectricFence work. */
free (malloc (10));
@@ -571,7 +571,12 @@
e_cursors_init ();
e_icon_factory_init ();
- gnome_window_icon_set_default_from_file (EVOLUTION_IMAGES "/evolution-inbox.png");
+ icon_list = e_icon_factory_get_icon_list ("stock_mail");
+ if (icon_list) {
+ gtk_window_set_default_icon_list (icon_list);
+ g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
+ g_list_free (icon_list);
+ }
/* FIXME We shouldn't be using the old directory at all I think */
evolution_directory = g_build_filename (g_get_home_dir (), "evolution", NULL);
Index: shell/glade/evolution-startup-wizard.glade
===================================================================
RCS file: /cvs/gnome/evolution/shell/glade/evolution-startup-wizard.glade,v
retrieving revision 1.11
diff -u -r1.11 evolution-startup-wizard.glade
--- shell/glade/evolution-startup-wizard.glade 21 Apr 2003 19:36:00 -0000 1.11
+++ shell/glade/evolution-startup-wizard.glade 16 Apr 2004 19:46:54 -0000
@@ -36,7 +36,6 @@
<widget class="GnomeDruidPageStandard" id="timezone-page">
<property name="visible">True</property>
<property name="title" translatable="yes">Timezone </property>
- <property name="logo">timezone-48.png</property>
<child internal-child="vbox">
<widget class="GtkVBox" id="druid-vbox6">
@@ -57,7 +56,6 @@
<widget class="GnomeDruidPageStandard" id="import-page">
<property name="visible">True</property>
<property name="title" translatable="yes">Importing Files</property>
- <property name="logo">import.png</property>
<child internal-child="vbox">
<widget class="GtkVBox" id="druid-vbox7">
Index: shell/importer/import.glade
===================================================================
RCS file: /cvs/gnome/evolution/shell/importer/import.glade,v
retrieving revision 1.10
diff -u -r1.10 import.glade
--- shell/importer/import.glade 6 Feb 2004 13:44:11 -0000 1.10
+++ shell/importer/import.glade 16 Apr 2004 19:46:54 -0000
@@ -33,7 +33,6 @@
<widget class="GnomeDruidPageStandard" id="page1">
<property name="visible">True</property>
<property name="title" translatable="yes">Importer Type</property>
- <property name="logo">import.png</property>
<child internal-child="vbox">
<widget class="GtkVBox" id="druid-vbox2">
@@ -54,7 +53,6 @@
<widget class="GnomeDruidPageStandard" id="page2-file">
<property name="visible">True</property>
<property name="title" translatable="yes">Select a File</property>
- <property name="logo">import.png</property>
<child internal-child="vbox">
<widget class="GtkVBox" id="druid-vbox1">
@@ -75,7 +73,6 @@
<widget class="GnomeDruidPageStandard" id="page3-file">
<property name="visible">True</property>
<property name="title" translatable="yes">Import Location</property>
- <property name="logo">import.png</property>
<child internal-child="vbox">
<widget class="GtkVBox" id="druid-vbox3">
@@ -96,7 +93,6 @@
<widget class="GnomeDruidPageStandard" id="page2-intelligent">
<property name="visible">True</property>
<property name="title" translatable="yes">Select Importers</property>
- <property name="logo">import.png</property>
<child internal-child="vbox">
<widget class="GtkVBox" id="druid-vbox3">
Index: widgets/misc/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/widgets/misc/ChangeLog,v
retrieving revision 1.291
diff -u -r1.291 ChangeLog
--- widgets/misc/ChangeLog 14 Apr 2004 21:30:54 -0000 1.291
+++ widgets/misc/ChangeLog 16 Apr 2004 19:46:54 -0000
@@ -1,3 +1,14 @@
+2004-04-16 Rodney Dawes <dobey ximian com>
+
+ * e-info-label.c (e_info_label_new): Update to use EIconFactory to
+ get the filename for the component icons using the icon theme
+
+2004-04-16 Michael Terry <mike mterry name>
+
+ * e-combo-buddon.c:
+ * e-url-entry.c: Update these to use EIconFactory and GtkImages
+ directly instead of GdkPixmaps
+
2004-04-09 Rodney Dawes <dobey ximian com>
* e-charset-picker.c: Include gtkhbox.h in here to avoid the warnings
Index: widgets/misc/e-combo-button.c
===================================================================
RCS file: /cvs/gnome/evolution/widgets/misc/e-combo-button.c,v
retrieving revision 1.16
diff -u -r1.16 e-combo-button.c
--- widgets/misc/e-combo-button.c 21 Jan 2004 04:18:57 -0000 1.16
+++ widgets/misc/e-combo-button.c 16 Apr 2004 19:46:54 -0000
@@ -25,13 +25,13 @@
#endif
#include "e-combo-button.h"
-#include "art/empty.xpm"
+#include <e-util/e-icon-factory.h>
#include <gtk/gtkarrow.h>
#include <gtk/gtkhbox.h>
#include <gtk/gtklabel.h>
#include <gtk/gtkmain.h>
-#include <gtk/gtkpixmap.h>
+#include <gtk/gtkimage.h>
#include <gtk/gtksignal.h>
#include <gal/util/e-util.h>
@@ -40,9 +40,9 @@
struct _EComboButtonPrivate {
GdkPixbuf *icon;
- GtkWidget *icon_pixmap;
+ GtkWidget *icon_image;
GtkWidget *label;
- GtkWidget *arrow_pixmap;
+ GtkWidget *arrow_image;
GtkWidget *hbox;
GtkMenu *menu;
@@ -68,35 +68,18 @@
/* Utility functions. */
static GtkWidget *
-create_pixmap_widget_from_pixbuf (GdkPixbuf *pixbuf)
+create_empty_image_widget (void)
{
- GtkWidget *pixmap_widget;
- GdkPixmap *pixmap;
- GdkBitmap *mask;
-
- gdk_pixbuf_render_pixmap_and_mask (pixbuf, &pixmap, &mask, 128);
-
- pixmap_widget = gtk_pixmap_new (pixmap, mask);
-
- gdk_pixmap_unref (pixmap);
- g_object_unref (mask);
-
- return pixmap_widget;
-}
-
-static GtkWidget *
-create_empty_pixmap_widget (void)
-{
- GtkWidget *pixmap_widget;
+ GtkWidget *image_widget;
GdkPixbuf *pixbuf;
- pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **)empty_xpm);
+ pixbuf = e_icon_factory_get_icon (NULL, 16);
- pixmap_widget = create_pixmap_widget_from_pixbuf (pixbuf);
+ image_widget = gtk_image_new_from_pixbuf (pixbuf);
g_object_unref (pixbuf);
- return pixmap_widget;
+ return image_widget;
}
static void
@@ -104,8 +87,6 @@
GdkPixbuf *pixbuf)
{
EComboButtonPrivate *priv;
- GdkPixmap *pixmap;
- GdkBitmap *mask;
priv = combo_button->priv;
@@ -114,19 +95,15 @@
if (pixbuf == NULL) {
priv->icon = NULL;
- gtk_widget_hide (priv->icon_pixmap);
+ gtk_widget_hide (priv->icon_image);
return;
}
priv->icon = g_object_ref (pixbuf);
- gdk_pixbuf_render_pixmap_and_mask (pixbuf, &pixmap, &mask, 128);
- gtk_pixmap_set (GTK_PIXMAP (priv->icon_pixmap), pixmap, mask);
-
- gtk_widget_show (priv->icon_pixmap);
+ gtk_image_set_from_pixbuf (GTK_IMAGE (priv->icon_image), priv->icon);
- gdk_pixmap_unref (pixmap);
- gdk_pixmap_unref (mask);
+ gtk_widget_show (priv->icon_image);
}
@@ -156,7 +133,7 @@
separator_x = (priv->label->allocation.width
+ priv->label->allocation.x
- + priv->arrow_pixmap->allocation.x) / 2;
+ + priv->arrow_image->allocation.x) / 2;
gtk_widget_style_get (GTK_WIDGET (widget),
"focus-line-width", &focus_width,
@@ -278,9 +255,9 @@
priv = combo_button->priv;
if (priv) {
- if (priv->arrow_pixmap != NULL) {
- gtk_widget_destroy (priv->arrow_pixmap);
- priv->arrow_pixmap = NULL;
+ if (priv->arrow_image != NULL) {
+ gtk_widget_destroy (priv->arrow_image);
+ priv->arrow_image = NULL;
}
if (priv->icon != NULL) {
@@ -313,7 +290,7 @@
GTK_BUTTON (widget)->button_down = TRUE;
if (event->button == 3 ||
- event->x >= priv->arrow_pixmap->allocation.x) {
+ event->x >= priv->arrow_image->allocation.x) {
/* User clicked on the right side: pop up the menu. */
gtk_button_pressed (GTK_BUTTON (widget));
@@ -452,19 +429,19 @@
gtk_container_add (GTK_CONTAINER (combo_button), priv->hbox);
gtk_widget_show (priv->hbox);
- priv->icon_pixmap = create_empty_pixmap_widget ();
- gtk_box_pack_start (GTK_BOX (priv->hbox), priv->icon_pixmap, TRUE, TRUE, 0);
- gtk_widget_show (priv->icon_pixmap);
+ priv->icon_image = create_empty_image_widget ();
+ gtk_box_pack_start (GTK_BOX (priv->hbox), priv->icon_image, TRUE, TRUE, 0);
+ gtk_widget_show (priv->icon_image);
priv->label = gtk_label_new ("");
gtk_box_pack_start (GTK_BOX (priv->hbox), priv->label, TRUE, TRUE,
2 * GTK_WIDGET (combo_button)->style->xthickness);
gtk_widget_show (priv->label);
- priv->arrow_pixmap = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_NONE);
- gtk_box_pack_start (GTK_BOX (priv->hbox), priv->arrow_pixmap, TRUE, TRUE,
+ priv->arrow_image = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_NONE);
+ gtk_box_pack_start (GTK_BOX (priv->hbox), priv->arrow_image, TRUE, TRUE,
GTK_WIDGET (combo_button)->style->xthickness);
- gtk_widget_show (priv->arrow_pixmap);
+ gtk_widget_show (priv->arrow_image);
priv->icon = NULL;
priv->menu = NULL;
Index: widgets/misc/e-info-label.c
===================================================================
RCS file: /cvs/gnome/evolution/widgets/misc/e-info-label.c,v
retrieving revision 1.2
diff -u -r1.2 e-info-label.c
--- widgets/misc/e-info-label.c 8 Apr 2004 08:12:28 -0000 1.2
+++ widgets/misc/e-info-label.c 16 Apr 2004 19:46:54 -0000
@@ -112,9 +112,8 @@
{
EInfoLabel *el = g_object_new(e_info_label_get_type(), 0);
GtkWidget *image;
- char *name = g_strdup_printf(MAP_DIR "/%s", icon);
+ char *name = e_icon_factory_get_icon_filename (icon, 16);
- /* FIXME: the image stuff should use the icon theme stuff when its committed */
image = gtk_image_new_from_file(name);
g_free(name);
gtk_misc_set_padding((GtkMisc *)image, 6, 6);
Index: widgets/misc/e-url-entry.c
===================================================================
RCS file: /cvs/gnome/evolution/widgets/misc/e-url-entry.c,v
retrieving revision 1.9
diff -u -r1.9 e-url-entry.c
--- widgets/misc/e-url-entry.c 2 Apr 2004 16:19:52 -0000 1.9
+++ widgets/misc/e-url-entry.c 16 Apr 2004 19:46:54 -0000
@@ -28,6 +28,7 @@
#include <gtk/gtk.h>
#include <libgnome/gnome-url.h>
#include "e-url-entry.h"
+#include <e-util/e-icon-factory.h>
struct _EUrlEntryPrivate {
GtkWidget *entry;
@@ -93,6 +94,7 @@
{
EUrlEntryPrivate *priv;
GtkWidget *pixmap;
+ GdkPixbuf *pixbuf;
priv = g_new0 (EUrlEntryPrivate, 1);
url_entry->priv = priv;
@@ -102,7 +104,9 @@
priv->button = gtk_button_new ();
gtk_widget_set_sensitive (priv->button, FALSE);
gtk_box_pack_start (GTK_BOX (url_entry), priv->button, FALSE, FALSE, 0);
- pixmap = gtk_image_new_from_file (MAP_DIR "/connect_to_url-16.xpm");
+ pixbuf = e_icon_factory_get_icon ("stock_connect-to-url", 16);
+ pixmap = gtk_image_new_from_pixbuf (pixbuf);
+ g_object_unref (pixbuf);
gtk_container_add (GTK_CONTAINER (priv->button), pixmap);
gtk_widget_show (pixmap);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]