}
static inline ThreePixbufs *
-get_account_protocol_pixbufs (ModestProtocolType protocol_type,
+get_account_protocol_pixbufs (ModestFolderView *folder_view,
+ ModestProtocolType protocol_type,
GObject *object)
{
ModestProtocol *protocol;
const GdkPixbuf *pixbuf = NULL;
+ ModestFolderViewPrivate *priv;
+
+ priv = MODEST_FOLDER_VIEW_GET_PRIVATE (folder_view);
protocol = modest_protocol_registry_get_protocol_by_type (modest_runtime_get_protocol_registry (),
protocol_type);
if (MODEST_IS_ACCOUNT_PROTOCOL (protocol)) {
pixbuf = modest_account_protocol_get_icon (MODEST_ACCOUNT_PROTOCOL (protocol),
+ priv->filter & MODEST_FOLDER_VIEW_FILTER_SHOW_ONLY_MAILBOXES?
+ MODEST_ACCOUNT_PROTOCOL_ICON_MAILBOX:
MODEST_ACCOUNT_PROTOCOL_ICON_FOLDER,
object, FOLDER_ICON_SIZE);
}
}
static inline ThreePixbufs*
-get_folder_icons (TnyFolderType type, GObject *instance)
+get_folder_icons (ModestFolderView *folder_view, TnyFolderType type, GObject *instance)
{
TnyAccount *account = NULL;
static GdkPixbuf *inbox_pixbuf = NULL, *outbox_pixbuf = NULL,
if (TNY_IS_ACCOUNT (instance)) {
account = g_object_ref (instance);
- } else if (TNY_IS_FOLDER (instance)) {
+ } else if (TNY_IS_FOLDER (instance) && !TNY_IS_MERGE_FOLDER (instance)) {
account = tny_folder_get_account (TNY_FOLDER (instance));
}
ModestProtocolType account_store_protocol;
account_store_protocol = modest_tny_account_get_protocol_type (account);
- retval = get_account_protocol_pixbufs (account_store_protocol, instance);
+ retval = get_account_protocol_pixbufs (folder_view, account_store_protocol, instance);
g_object_unref (account);
}
TnyFolderType type = TNY_FOLDER_TYPE_UNKNOWN;
gboolean has_children;
ThreePixbufs *pixbufs;
+ ModestFolderView *folder_view = (ModestFolderView *) data;
rendobj = (GObject *) renderer;
return;
has_children = gtk_tree_model_iter_has_child (tree_model, iter);
- pixbufs = get_folder_icons (type, instance);
+ pixbufs = get_folder_icons (folder_view, type, instance);
g_object_unref (instance);
/* Set pixbuf */