aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucian Langa <lucilanga@gnome.org>2009-05-29 04:39:37 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-06-02 22:39:19 +0800
commita868ce4a81c64db0a6f9feb88f18479f11a900a5 (patch)
tree4c329c3f62f5e13aa1cc5f623c8388215318f443
parentf5ed12396d34ba7e07219d5965f18563e5339846 (diff)
downloadgsoc2013-evolution-a868ce4a81c64db0a6f9feb88f18479f11a900a5.tar
gsoc2013-evolution-a868ce4a81c64db0a6f9feb88f18479f11a900a5.tar.gz
gsoc2013-evolution-a868ce4a81c64db0a6f9feb88f18479f11a900a5.tar.bz2
gsoc2013-evolution-a868ce4a81c64db0a6f9feb88f18479f11a900a5.tar.lz
gsoc2013-evolution-a868ce4a81c64db0a6f9feb88f18479f11a900a5.tar.xz
gsoc2013-evolution-a868ce4a81c64db0a6f9feb88f18479f11a900a5.tar.zst
gsoc2013-evolution-a868ce4a81c64db0a6f9feb88f18479f11a900a5.zip
Bug 584154 – custom icon folder hook does not work
-rw-r--r--mail/em-event.c5
-rw-r--r--mail/em-event.h5
-rw-r--r--mail/em-folder-tree-model.c5
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 adc77fdbfe..ea2ddebd93 100644
--- a/mail/em-folder-tree-model.c
+++ b/mail/em-folder-tree-model.c
@@ -53,6 +53,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>
@@ -574,6 +575,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))
@@ -672,6 +674,9 @@ em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, GtkTreeIter *ite
COL_UINT_UNREAD_LAST_SEL, 0,
-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,