From: Sergio Villar Senin Date: Mon, 23 Jul 2007 10:18:00 +0000 (+0000) Subject: * Reverted some changes from one of the latest armin's commits. We can never call... X-Git-Tag: git_migration_finished~2773 X-Git-Url: http://vcs.maemo.org/git/?a=commitdiff_plain;h=2440bcf084dc3e89f1f08c8a537373d4a3cbface;p=modest * Reverted some changes from one of the latest armin's commits. We can never call gtk_widget_destroy over a window, we need to do all the window management always through the window manager pmo-trunk-r2768 --- diff --git a/src/maemo/modest-msg-view-window.c b/src/maemo/modest-msg-view-window.c index 3a5f47e..b136be5 100644 --- a/src/maemo/modest-msg-view-window.c +++ b/src/maemo/modest-msg-view-window.c @@ -1589,17 +1589,22 @@ on_account_removed (ModestAccountMgr *mgr, gboolean server_account, gpointer user_data) { - ModestTnyAccountStore *store = modest_runtime_get_account_store (); - const gchar *our_acc = modest_window_get_active_account (MODEST_WINDOW (user_data)); + ModestTnyAccountStore *store; + const gchar *our_acc; + TnyAccount *tny_acc; - TnyAccount *tny_acc = modest_tny_account_store_get_tny_account_by (store, MODEST_TNY_ACCOUNT_STORE_QUERY_ID, account); - if(tny_acc != NULL) - { - const gchar* parent_acc = modest_tny_account_get_parent_modest_account_name_for_server_account (tny_acc); + store = modest_runtime_get_account_store (); + our_acc = modest_window_get_active_account (MODEST_WINDOW (user_data)); + tny_acc = modest_tny_account_store_get_tny_account_by (store, + MODEST_TNY_ACCOUNT_STORE_QUERY_ID, + account); + + + if(tny_acc != NULL) { + const gchar* parent_acc = + modest_tny_account_get_parent_modest_account_name_for_server_account (tny_acc); if (strcmp (parent_acc, our_acc) == 0) - { - gtk_widget_destroy (GTK_WIDGET (user_data)); - } + modest_ui_actions_on_close_window (NULL, MODEST_WINDOW (user_data)); } } diff --git a/src/modest-ui-actions.c b/src/modest-ui-actions.c index 31b85d8..879540d 100644 --- a/src/modest-ui-actions.c +++ b/src/modest-ui-actions.c @@ -467,6 +467,7 @@ void modest_ui_actions_on_close_window (GtkAction *action, ModestWindow *win) { gboolean ret_value; + g_signal_emit_by_name (G_OBJECT (win), "delete-event", NULL, &ret_value); /* if (MODEST_IS_MSG_VIEW_WINDOW (win)) { */