Folder view shows full path for special folders if it's in multiaccount mode
authorJose Dapena Paz <jdapena@igalia.com>
Wed, 10 Dec 2008 17:02:34 +0000 (17:02 +0000)
committerJose Dapena Paz <jdapena@igalia.com>
Wed, 10 Dec 2008 17:02:34 +0000 (17:02 +0000)
pmo-drop-split-view-r6752

src/modest-ui-actions.c
src/widgets/modest-folder-view.c

index ec46c83..41fc278 100644 (file)
@@ -4783,6 +4783,11 @@ create_move_to_dialog (GtkWindow *win,
                          G_CALLBACK(create_move_to_dialog_on_new_folder), 
                          *tree_view);
 
+#ifdef MODEST_TOOLKIT_HILDON2
+       modest_folder_view_set_cell_style (MODEST_FOLDER_VIEW (*tree_view),
+                                          MODEST_FOLDER_VIEW_CELL_STYLE_COMPACT);
+#endif
+
        /* It could happen that we're trying to move a message from a
           window (msg window for example) after the main window was
           closed, so we can not just get the model of the folder
index fa35d73..616dbb8 100644 (file)
@@ -426,6 +426,7 @@ static void
 format_compact_style (gchar **item_name, 
                      GObject *instance,
                      gboolean bold,
+                     gboolean multiaccount,
                      gboolean *use_markup)
 {
        TnyFolder *folder;
@@ -440,7 +441,7 @@ format_compact_style (gchar **item_name,
        folder_type = tny_folder_get_folder_type (folder);
        is_special = (get_cmp_pos (folder_type, folder)!= 4);
 
-       if (!is_special) {
+       if (!is_special || multiaccount) {
                TnyAccount *account = tny_folder_get_account (folder);
                const gchar *folder_name;
                gboolean concat_folder_name = FALSE;
@@ -583,8 +584,13 @@ text_cell_data  (GtkTreeViewColumn *column,
                item_name = g_strdup ("unknown");
 
        if (priv->cell_style == MODEST_FOLDER_VIEW_CELL_STYLE_COMPACT) {
+               gboolean multiaccount;
+
+               multiaccount = (priv->style == MODEST_FOLDER_VIEW_STYLE_SHOW_ALL);
                /* Convert item_name to markup */
-               format_compact_style (&item_name, instance, item_weight == 800, &use_markup);
+               format_compact_style (&item_name, instance, 
+                                     item_weight == 800, 
+                                     multiaccount, &use_markup);
        }
 
        if (item_name && item_weight) {