[anjal] Use themable icons for the unread icon.
- From: Srinivasa Ragavan <sragavan src gnome org>
- To: svn-commits-list gnome org
- Subject: [anjal] Use themable icons for the unread icon.
- Date: Tue, 14 Jul 2009 19:06:59 +0000 (UTC)
commit 27ff4af3470c5c0626791f88cdc380303736ba43
Author: Srinivasa Ragavan <sragavan novell com>
Date: Wed Jul 15 00:36:16 2009 +0530
Use themable icons for the unread icon.
src/mail-folder-view.c | 3 +--
src/mail-message-view.c | 2 +-
src/main.c | 1 +
3 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/mail-folder-view.c b/src/mail-folder-view.c
index 6d83080..523da79 100644
--- a/src/mail-folder-view.c
+++ b/src/mail-folder-view.c
@@ -86,7 +86,6 @@ enum {
};
static const char * mfv_get_selected_uid (GtkTreeView *tree, MailFolderView *mfv);
-const char *unread_image = ANJAL_IMAGEDIR"anjal-mail-new.png";
static void mfv_message_activated (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, MailFolderView *shell);
static void mfv_delete (MailFolderView *mfv, gboolean del);
static void mfv_read (MailFolderView *mfv, gboolean del);
@@ -1478,7 +1477,7 @@ mail_folder_view_construct (MailFolderView *shell)
custom_cell_renderer_vbox_append (vbox, cell);
/* Pack a renderer for unread indication */
- cell = custom_cell_renderer_toggle_pixbuf_new (gdk_pixbuf_new_from_file(unread_image, NULL), gdk_pixbuf_new_from_file(unread_image, NULL));
+ cell = custom_cell_renderer_toggle_pixbuf_new (mail_utils_get_icon("anjal-mail-new",GTK_ICON_SIZE_MENU), mail_utils_get_icon("anjal-mail-new",GTK_ICON_SIZE_MENU));
g_object_set_data ((GObject *)cell, "mfv", shell);
g_object_set_data ((GObject *)cell, "activate_func", mfv_msg_unread);
if (shell->priv->light)
diff --git a/src/mail-message-view.c b/src/mail-message-view.c
index ca6c3e8..f55ea0d 100644
--- a/src/mail-message-view.c
+++ b/src/mail-message-view.c
@@ -1118,7 +1118,7 @@ mail_message_view_set_message (MailMessageView *mmview, CamelFolder *folder, con
EXPOSE(tmp, mmview);
mmview->priv->unread_image = gtk_image_new ();
EXPOSE(mmview->priv->unread_image, mmview);
- gtk_image_set_from_pixbuf ((GtkImage *)mmview->priv->unread_image, gdk_pixbuf_new_from_file(unread_image, NULL));
+ gtk_image_set_from_pixbuf ((GtkImage *)mmview->priv->unread_image, mail_utils_get_icon("anjal-mail-new",GTK_ICON_SIZE_MENU));
gtk_widget_show (mmview->priv->unread_image);
if (camel_message_info_flags(info) & CAMEL_MESSAGE_SEEN)
gtk_widget_set_sensitive (mmview->priv->unread_image, FALSE);
diff --git a/src/main.c b/src/main.c
index 1c39cdc..a1cb018 100644
--- a/src/main.c
+++ b/src/main.c
@@ -224,6 +224,7 @@ main (int argc, char *argv[])
e_cursors_init ();
e_passwords_init();
e_icon_factory_init ();
+ gtk_icon_theme_append_search_path (gtk_icon_theme_get_default(), PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "anjal" G_DIR_SEPARATOR_S "icons");
if (!g_thread_supported ())
g_thread_init (NULL);
mail_msg_init ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]