/* #define MODEST_FOLDER_ICON_LOCAL_FOLDERS PIXMAP_PREFIX "qgn_list_gene_fldr_cls.png" */
#define MODEST_FOLDER_ICON_LOCAL_FOLDERS "computer"
#define MODEST_FOLDER_ICON_MMC "media-flash"
-
+#define MODEST_FOLDER_ICON_MMC_FOLDER MODEST_FOLDER_ICON_NORMAL
/* toolbar */
#define MODEST_TOOLBAR_ICON_MAIL_SEND PIXMAP_PREFIX "qgn_list_messagin_sent.png"
#define MODEST_FOLDER_ICON_NORMAL "general_folder"
#define MODEST_FOLDER_ICON_LOCAL_FOLDERS "general_device_root_folder"
#define MODEST_FOLDER_ICON_MMC "general_removable_memory_card"
-
+#define MODEST_FOLDER_ICON_MMC_FOLDER "general_removable_memory_card"
/* toolbar */
#define MODEST_TOOLBAR_ICON_MAIL_SEND "email_message_send"
#define MODEST_FOLDER_ICON_NORMAL "qgn_list_gene_fldr_cls"
#define MODEST_FOLDER_ICON_LOCAL_FOLDERS "qgn_list_shell_mydevice"
#define MODEST_FOLDER_ICON_MMC "qgn_list_gene_mmc"
-
+#define MODEST_FOLDER_ICON_MMC_FOLDER MODEST_FOLDER_ICON_NORMAL
/* toolbar */
#define MODEST_TOOLBAR_ICON_MAIL_SEND "qgn_toolb_messagin_send"
modest_tny_folder_is_memory_card_folder (TnyFolder *folder)
{
g_return_val_if_fail (folder, FALSE);
-
- /* The merge folder is a special case,
- * used to merge the per-account local outbox folders.
+
+ /* The merge folder is a special case,
+ * used to merge the per-account local outbox folders.
* and can have no get_account() implementation.
*/
if (TNY_IS_MERGE_FOLDER (folder))
return FALSE;
const gchar* account_id = tny_account_get_id (account);
- if (!account_id) {
+ if (!account_id) {
g_object_unref (account);
return FALSE;
}
g_object_unref (account);
-
+
return (strcmp (account_id, MODEST_MMC_ACCOUNT_ID) == 0);
-}
+}
gboolean
modest_tny_folder_is_remote_folder (TnyFolder *folder)
return retval;
}
-static ThreePixbufs*
+static inline ThreePixbufs*
get_folder_icons (TnyFolderType type, GObject *instance)
{
static GdkPixbuf *inbox_pixbuf = NULL, *outbox_pixbuf = NULL,
}
switch (type) {
+ const gchar *icon_code;
+
case TNY_FOLDER_TYPE_INVALID:
g_warning ("%s: BUG: TNY_FOLDER_TYPE_INVALID", __FUNCTION__);
break;
break;
case TNY_FOLDER_TYPE_NORMAL:
default:
- retval = get_composite_icons (MODEST_FOLDER_ICON_NORMAL,
+ /* Memory card folders could have an special icon */
+ if (modest_tny_folder_is_memory_card_folder (TNY_FOLDER (instance)))
+ icon_code = MODEST_FOLDER_ICON_MMC_FOLDER;
+ else
+ icon_code = MODEST_FOLDER_ICON_NORMAL;
+
+ retval = get_composite_icons (icon_code,
&normal_pixbuf,
&normal_pixbuf_open,
&normal_pixbuf_close);