X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fmodest-ui-actions.c;h=377da559a0e164d924dab472942af2a53883be59;hb=05a9e3f03099ec873c29f572d169843a61021c7f;hp=95b920a2b36b854c16d203eea8ca45fa843331b6;hpb=09f875751e898932c6bafbea7efe692f6aa70f9c;p=modest diff --git a/src/modest-ui-actions.c b/src/modest-ui-actions.c index 95b920a..377da55 100644 --- a/src/modest-ui-actions.c +++ b/src/modest-ui-actions.c @@ -223,14 +223,38 @@ modest_ui_actions_run_account_setup_wizard (ModestWindow *win) wizard = GTK_WINDOW (modest_platform_get_account_settings_wizard ()); modest_window_mgr_set_modal (modest_runtime_get_window_mgr(), GTK_WINDOW (wizard), (GtkWindow *) win); +#ifndef MODEST_TOOLKIT_HILDON2 /* always present a main window in the background * we do it here, so we cannot end up with two wizards (as this * function might be called in modest_window_mgr_get_main_window as well */ - if (!win) + if (!win) win = modest_window_mgr_get_main_window (modest_runtime_get_window_mgr(), TRUE); /* create if not existent */ +#else + if (!win) { + GList *window_list; + ModestWindowMgr *mgr; + + mgr = modest_runtime_get_window_mgr (); + + window_list = modest_window_mgr_get_window_list (mgr); + if (window_list == NULL) { + win = MODEST_WINDOW (modest_accounts_window_new ()); + modest_window_mgr_register_window (mgr, win, NULL); + gtk_widget_show_all (GTK_WIDGET (win)); + + win = MODEST_WINDOW (modest_folder_window_new (NULL)); + modest_window_mgr_register_window (mgr, win, NULL); + + gtk_widget_show_all (GTK_WIDGET (win)); + } else { + g_list_free (window_list); + } + } +#endif - gtk_window_set_transient_for (GTK_WINDOW (wizard), GTK_WINDOW (win)); + if (win) + gtk_window_set_transient_for (GTK_WINDOW (wizard), GTK_WINDOW (win)); /* make sure the mainwindow is visible. We need to present the wizard again to give it the focus back. show_all are needed @@ -995,7 +1019,6 @@ get_info_from_header (TnyHeader *header, gboolean *is_draft, gboolean *can_open) outbox which is not in failed state */ *can_open = FALSE; - g_object_unref(traccount); } #endif } @@ -1434,7 +1457,7 @@ open_msg_from_header (TnyHeader *header, GtkTreeRowReference *rowref, ModestWind GtkWidget *header_view = NULL; OpenMsgHelper *helper; ModestWindow *window; - + g_return_if_fail (header != NULL && rowref != NULL); mgr = modest_runtime_get_window_mgr (); @@ -1451,7 +1474,7 @@ open_msg_from_header (TnyHeader *header, GtkTreeRowReference *rowref, ModestWind window = NULL; found = modest_window_mgr_find_registered_header (mgr, header, &window); - + /* Do not open again the message and present the window to the user */ if (found) { @@ -3419,7 +3442,7 @@ modest_ui_actions_rename_folder_error_handler (ModestMailOperation *mail_op, message is opened for example */ message = _("emev_ni_internal_error"); } else { - message = _("emev_ib_ui_imap_unable_to_rename"); + message = _CS("ckdg_ib_unable_to_remove"); } /* We don't set a parent for the dialog because the dialog