2007-07-30 Johannes Schmid <johannes.schmid@openismus.com>
authorJohannes Schmid <johannes.schmid@openismus.com>
Tue, 31 Jul 2007 08:05:46 +0000 (08:05 +0000)
committerJohannes Schmid <johannes.schmid@openismus.com>
Tue, 31 Jul 2007 08:05:46 +0000 (08:05 +0000)
* src/modest-ui-actions.c: (modest_ui_actions_on_send):

Show account wizard if no accounts are defined while sending
(automatic sending after the account wizard finished does not
work because it takes some time until the accoun

pmo-trunk-r2862

ChangeLog2
src/modest-ui-actions.c

index 2c04fc1..e6e3de5 100644 (file)
@@ -1,3 +1,12 @@
+2007-07-30  Johannes Schmid <johannes.schmid@openismus.com>
+
+       * src/modest-ui-actions.c: (modest_ui_actions_on_send):
+       
+       Show account wizard if no accounts are defined while sending
+       (automatic sending after the account wizard finished does not
+       work because it takes some time until the account manager
+       synchronizes everything. (projects.maemo.org NB#62792)
+       
 2007-07-30  Murray Cumming  <murrayc@murrayc.com>
 
        * src/modest-tny-account-store.c: (on_account_removed),
index b984c95..da6c745 100644 (file)
@@ -145,7 +145,7 @@ static void
 run_account_setup_wizard (ModestWindow *win)
 {
        ModestEasysetupWizardDialog *wizard;
-
+       
        g_return_if_fail (MODEST_IS_WINDOW(win));
        
        wizard = modest_easysetup_wizard_dialog_new ();
@@ -1978,7 +1978,8 @@ modest_ui_actions_on_send (GtkWidget *widget, ModestMsgEditWindow *edit_window)
                account_name = modest_account_mgr_get_default_account (account_mgr);
                
        if (!account_name) {
-               g_printerr ("modest: no account found\n");
+               /* Run account setup wizard */
+               run_account_setup_wizard(MODEST_WINDOW(edit_window));
                return;
        }
        
@@ -1994,9 +1995,8 @@ modest_ui_actions_on_send (GtkWidget *widget, ModestMsgEditWindow *edit_window)
                                      (modest_runtime_get_account_store(),
                                       account_name));
        if (!transport_account) {
-               g_printerr ("modest: no transport account found for '%s'\n", account_name);
-               g_free (account_name);
-               modest_msg_edit_window_free_msg_data (edit_window, data);
+               /* Run account setup wizard */
+               run_account_setup_wizard(MODEST_WINDOW(edit_window));
                return;
        }