Show the device name in "new folder" dialog
authorSergio Villar Senin <svillar@igalia.com>
Thu, 26 Feb 2009 10:40:41 +0000 (10:40 +0000)
committerSergio Villar Senin <svillar@igalia.com>
Thu, 26 Feb 2009 10:40:41 +0000 (10:40 +0000)
pmo-trunk-r7691

src/hildon2/modest-platform.c

index f266197..030da3f 100644 (file)
@@ -2474,8 +2474,16 @@ move_to_dialog_show_folders (GtkWidget *dialog, TnyFolderStore *folder_store)
 
        account = TNY_ACCOUNT (folder_store);
        if (modest_tny_account_is_virtual_local_folders (account)) {
+               gchar *device_name;
                account_id = tny_account_get_id (account);
-               selection_label_text = g_strconcat (tny_account_get_name (account), "/", NULL);
+               device_name = modest_conf_get_string (modest_runtime_get_conf(),
+                                                     MODEST_CONF_DEVICE_NAME, NULL);
+               if (device_name) {
+                       selection_label_text = g_strconcat (device_name, "/", NULL);
+                       g_free (device_name);
+               } else {
+                       selection_label_text = g_strconcat (tny_account_get_name (account), "/", NULL);
+               }
        } else if (modest_tny_account_is_memory_card_account (account)) {
                account_id = tny_account_get_id (account);
                selection_label_text = g_strconcat (tny_account_get_name (account), "/", NULL);