Invalidate screenshots on deleting/adding accounts, so we don't invalidate
authorJose Dapena Paz <jdapena@igalia.com>
Mon, 14 Dec 2009 10:41:02 +0000 (11:41 +0100)
committerJose Dapena Paz <jdapena@igalia.com>
Mon, 14 Dec 2009 10:54:09 +0000 (11:54 +0100)
on every time we close modest.

Fix 2/3 of NB#139348

src/hildon2/modest-accounts-window.c
src/hildon2/modest-easysetup-wizard-dialog.c
src/modest-ui-actions.c

index e5bda01..628329b 100644 (file)
@@ -720,7 +720,6 @@ on_delete_event (GtkWidget *widget,
 
        /* Take screenshot. We have to wait a bit to ensure that
           screenshot is properly taken */
 
        /* Take screenshot. We have to wait a bit to ensure that
           screenshot is properly taken */
-       hildon_gtk_window_take_screenshot (GTK_WINDOW (widget), FALSE);
        hildon_gtk_window_take_screenshot (GTK_WINDOW (widget), TRUE);
        g_usleep (G_USEC_PER_SEC);
 
        hildon_gtk_window_take_screenshot (GTK_WINDOW (widget), TRUE);
        g_usleep (G_USEC_PER_SEC);
 
index 02b6a2a..9ecb29f 100644 (file)
@@ -2024,6 +2024,7 @@ on_before_next (ModestWizardDialog *dialog, GtkWidget *current_page, GtkWidget *
                }
 
                modest_account_mgr_add_account_from_settings (priv->account_manager, priv->settings);
                }
 
                modest_account_mgr_add_account_from_settings (priv->account_manager, priv->settings);
+               hildon_gtk_window_take_screenshot ((GtkWindow *) dialog, FALSE);
        }
 
 
        }
 
 
@@ -2463,6 +2464,7 @@ on_save (ModestWizardDialog *dialog)
 {
        ModestEasysetupWizardDialog *self = MODEST_EASYSETUP_WIZARD_DIALOG (dialog);
        ModestEasysetupWizardDialogPrivate *priv = MODEST_EASYSETUP_WIZARD_DIALOG_GET_PRIVATE (self);
 {
        ModestEasysetupWizardDialog *self = MODEST_EASYSETUP_WIZARD_DIALOG (dialog);
        ModestEasysetupWizardDialogPrivate *priv = MODEST_EASYSETUP_WIZARD_DIALOG_GET_PRIVATE (self);
+       gboolean result;
 
        save_to_settings (self);
 
 
        save_to_settings (self);
 
@@ -2471,7 +2473,12 @@ on_save (ModestWizardDialog *dialog)
                return FALSE;
        }
 
                return FALSE;
        }
 
-       return modest_account_mgr_add_account_from_settings (priv->account_manager, priv->settings);
+       
+       result = modest_account_mgr_add_account_from_settings (priv->account_manager, priv->settings);
+       if (result) {
+               hildon_gtk_window_take_screenshot ((GtkWindow *) dialog, FALSE);
+       }
+       return result;
 
 }
 
 
 }
 
index ada820a..a5e3c74 100644 (file)
@@ -7053,6 +7053,9 @@ modest_ui_actions_on_delete_account (GtkWindow *parent_window,
 
                removed = modest_account_mgr_remove_account (account_mgr, account_name);
                if (removed) {
 
                removed = modest_account_mgr_remove_account (account_mgr, account_name);
                if (removed) {
+#ifdef MODEST_TOOLKIT_HILDON2
+                       hildon_gtk_window_take_screenshot (parent_window, FALSE);
+#endif
                        /* Close all email notifications, we cannot
                           distinguish if the notification belongs to
                           this account or not, so for safety reasons
                        /* Close all email notifications, we cannot
                           distinguish if the notification belongs to
                           this account or not, so for safety reasons