* Renamed a function
[modest] / src / modest-ui-actions.c
index 840ad29..7dba805 100644 (file)
@@ -164,9 +164,17 @@ modest_run_account_setup_wizard (ModestWindow *win)
                
        g_return_val_if_fail (MODEST_IS_WINDOW(win), FALSE);
        
-       wizard = modest_easysetup_wizard_dialog_new ();
+       wizard = modest_easysetup_wizard_dialog_new_or_present ();
+
+       /* if wizard == NULL it means there is already a easy setup thingy running;
+        * in that case, don't do anything here; the call above will present it instead */
+       if (!wizard) {
+               g_message ("%s: easysetup wizard already running", __FUNCTION__);
+               return FALSE;
+       }
+
        gtk_window_set_transient_for (GTK_WINDOW (wizard), GTK_WINDOW (win));
-       
+
        /* Don't make this a modal window, because secondary windows will then 
         * be unusable, freezing the UI: */
        /* gtk_window_set_modal (GTK_WINDOW (wizard), TRUE); */
@@ -395,7 +403,6 @@ modest_ui_actions_on_delete_message (GtkAction *action, ModestWindow *win)
                                           tny_list_get_length(header_list)), desc);
 
        /* Confirmation dialog */
-       printf("DEBUG: %s\n", __FUNCTION__);    
        response = modest_platform_run_confirmation_dialog (GTK_WINDOW (win),
                                                            message);
        
@@ -1774,8 +1781,8 @@ folder_refreshed_cb (ModestMailOperation *mail_op,
        ModestMainWindow *win = NULL;
        GtkWidget *header_view;
        TnyFolder *current_folder;
-       gboolean folder_empty = TRUE;
-       gboolean all_marked_as_deleted = TRUE;
+       gboolean folder_empty = FALSE;
+       gboolean all_marked_as_deleted = FALSE;
 
        g_return_if_fail (TNY_IS_FOLDER (folder));
 
@@ -2415,10 +2422,14 @@ modest_ui_actions_on_rename_folder (GtkAction *action,
                gchar *folder_name;
                gint response;
                const gchar *current_name;
+               TnyFolderStore *parent;
 
                current_name = tny_folder_get_name (TNY_FOLDER (folder));
-               response = modest_platform_run_rename_folder_dialog (GTK_WINDOW (main_window), NULL,
-                                                                    current_name, &folder_name);
+               parent = tny_folder_get_folder_store (TNY_FOLDER (folder));
+               response = modest_platform_run_rename_folder_dialog (GTK_WINDOW (main_window), 
+                                                                    parent, current_name, 
+                                                                    &folder_name);
+               g_object_unref (parent);
 
                if (response == GTK_RESPONSE_ACCEPT && strlen (folder_name) > 0) {
                        ModestMailOperation *mail_op;