diff options
author | Lucian Langa <lucilanga@gnome.org> | 2009-05-29 04:39:37 +0800 |
---|---|---|
committer | Lucian Langa <lucilanga@gnome.org> | 2009-05-29 04:39:37 +0800 |
commit | b7d79d3a852746058de93dd0af9b2c13969d55c0 (patch) | |
tree | a783b1988666039bb3e4ee70eff7c32e11e3cad8 /mail | |
parent | 2a62fc778c898effc4d76f1380691ac574092bdb (diff) | |
download | gsoc2013-evolution-b7d79d3a852746058de93dd0af9b2c13969d55c0.tar.gz gsoc2013-evolution-b7d79d3a852746058de93dd0af9b2c13969d55c0.tar.zst gsoc2013-evolution-b7d79d3a852746058de93dd0af9b2c13969d55c0.zip |
Bug 584154 – custom icon folder hook does not work
Diffstat (limited to 'mail')
-rw-r--r-- | mail/em-event.c | 5 | ||||
-rw-r--r-- | mail/em-event.h | 5 | ||||
-rw-r--r-- | mail/em-folder-tree-model.c | 5 |
3 files changed, 11 insertions, 4 deletions
diff --git a/mail/em-event.c b/mail/em-event.c index 852e319e1b..b1bf7a7d05 100644 --- a/mail/em-event.c +++ b/mail/em-event.c @@ -199,11 +199,12 @@ em_event_target_new_send_receive(EMEvent *eme, GtkWidget *table, gpointer data, } EMEventTargetCustomIcon * -em_event_target_new_custom_icon(EMEvent *eme, GtkCellRenderer *renderer, const gchar *folder_name, guint32 flags) +em_event_target_new_custom_icon(EMEvent *eme, GtkTreeStore *store, GtkTreeIter *iter, const gchar *folder_name, guint32 flags) { EMEventTargetCustomIcon *t = e_event_target_new(&eme->popup, EM_EVENT_TARGET_CUSTOM_ICON, sizeof(*t)); - t->renderer = renderer; + t->store = store; + t->iter = iter; t->folder_name = folder_name; t->target.mask = ~flags; diff --git a/mail/em-event.h b/mail/em-event.h index 0af32086cf..5dc11bd910 100644 --- a/mail/em-event.h +++ b/mail/em-event.h @@ -133,7 +133,8 @@ typedef struct _EMEventTargetCustomIcon EMEventTargetCustomIcon; struct _EMEventTargetCustomIcon { EEventTarget target; - GtkCellRenderer *renderer; + GtkTreeStore *store; + GtkTreeIter *iter; const gchar *folder_name; }; @@ -159,7 +160,7 @@ EMEventTargetFolderBrowser *em_event_target_new_folder_browser (EMEvent *eme, EM EMEventTargetComposer *em_event_target_new_composer(EMEvent *emp, const struct _EMsgComposer *composer, guint32 flags); EMEventTargetMessage *em_event_target_new_message(EMEvent *emp, struct _CamelFolder *folder, struct _CamelMimeMessage *message, const gchar *uid, guint32 flags); EMEventTargetSendReceive * em_event_target_new_send_receive(EMEvent *eme, struct _GtkWidget *table, gpointer data, gint row, guint32 flags); -EMEventTargetCustomIcon * em_event_target_new_custom_icon(EMEvent *eme, GtkCellRenderer *renderer, const gchar *uri, guint32 flags); +EMEventTargetCustomIcon * em_event_target_new_custom_icon(EMEvent *eme, GtkTreeStore *store, GtkTreeIter *iter, const gchar *uri, guint32 flags); /* ********************************************************************** */ diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c index 2fedce05b3..a12b453e53 100644 --- a/mail/em-folder-tree-model.c +++ b/mail/em-folder-tree-model.c @@ -55,6 +55,7 @@ #include "em-utils.h" #include "em-folder-utils.h" +#include "em-event.h" #include <camel/camel-folder.h> #include <camel/camel-vee-store.h> @@ -453,6 +454,7 @@ em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, GtkTreeIter *ite const gchar *name; const gchar *icon_name; guint32 flags; + EMEventTargetCustomIcon *target; /* make sure we don't already know about it? */ if (g_hash_table_lookup (si->full_hash, fi->full_name)) @@ -540,6 +542,9 @@ em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, GtkTreeIter *ite COL_BOOL_LOAD_SUBDIRS, load, -1); + target = em_event_target_new_custom_icon (em_event_peek(), tree_store, iter, fi->full_name, EM_EVENT_CUSTOM_ICON); + e_event_emit ((EEvent *)em_event_peek (), "folder.customicon", (EEventTarget *) target); + if (unread != ~0) gtk_tree_store_set (tree_store, iter, COL_UINT_UNREAD, unread, -1); |