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));
- gtk_window_set_transient_for (GTK_WINDOW (wizard), GTK_WINDOW (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
+
+ 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
outbox which is not in
failed state */
*can_open = FALSE;
- g_object_unref(traccount);
}
#endif
}
GtkWidget *header_view = NULL;
OpenMsgHelper *helper;
ModestWindow *window;
-
+
g_return_if_fail (header != NULL && rowref != NULL);
mgr = modest_runtime_get_window_mgr ();
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) {
TnyFolderStore *parent_folder;
#ifdef MODEST_TOOLKIT_HILDON2
- const gchar *active_account;
- TnyAccount *account;
ModestTnyAccountStore *acc_store;
- /* In hildon 2.2 we use the current account as default parent */
acc_store = modest_runtime_get_account_store ();
- active_account = modest_window_get_active_account (MODEST_WINDOW (parent_window));
- if (active_account) {
- account = modest_tny_account_store_get_server_account (acc_store,
- active_account,
- TNY_ACCOUNT_TYPE_STORE);
- parent_folder = TNY_FOLDER_STORE (account);
- } else {
- parent_folder = (TnyFolderStore *)
- modest_tny_account_store_get_local_folders_account (acc_store);
- }
+
+ parent_folder = (TnyFolderStore *)
+ modest_tny_account_store_get_local_folders_account (acc_store);
#else
parent_folder = modest_folder_view_get_selected (MODEST_FOLDER_VIEW(folder_view));
#endif