diff options
Diffstat (limited to 'plugins/dbx-import/dbx-importer.c')
-rw-r--r-- | plugins/dbx-import/dbx-importer.c | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/plugins/dbx-import/dbx-importer.c b/plugins/dbx-import/dbx-importer.c index 9b6f44c171..1c977750b1 100644 --- a/plugins/dbx-import/dbx-importer.c +++ b/plugins/dbx-import/dbx-importer.c @@ -219,22 +219,31 @@ org_gnome_evolution_readdbx_getwidget (EImport *ei, view = e_shell_window_get_active_view (shell_window); if (view && g_str_equal (view, "mail")) { - EShellView *shell_view = e_shell_window_get_shell_view (shell_window, view); + EShellView *shell_view; + EMFolderTree *folder_tree = NULL; + EShellSidebar *shell_sidebar; - if (shell_view) { - EMFolderTree *folder_tree = NULL; - EShellSidebar *shell_sidebar = e_shell_view_get_shell_sidebar (shell_view); + shell_view = e_shell_window_get_shell_view ( + shell_window, view); - g_object_get (shell_sidebar, "folder-tree", &folder_tree, NULL); + shell_sidebar = e_shell_view_get_shell_sidebar ( + shell_view); - if (folder_tree) - select_uri = em_folder_tree_get_selected_uri (folder_tree); - } + g_object_get ( + shell_sidebar, "folder-tree", + &folder_tree, NULL); + + select_uri = em_folder_tree_get_selected_uri ( + folder_tree); } } #endif - if (!select_uri) - select_uri = g_strdup (e_mail_local_get_folder_uri (E_MAIL_LOCAL_FOLDER_INBOX)); + if (!select_uri) { + const gchar *local_inbox_uri; + local_inbox_uri = e_mail_local_get_folder_uri ( + E_MAIL_LOCAL_FOLDER_INBOX); + select_uri = g_strdup (local_inbox_uri); + } hbox = gtk_hbox_new (FALSE, 0); |