From: Murray Cumming Date: Tue, 24 Jul 2007 09:49:17 +0000 (+0000) Subject: 2007-07-24 Murray Cumming X-Git-Tag: git_migration_finished~2759 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=86e33ad955765e9b0352e513075d8c29143aad25 2007-07-24 Murray Cumming * src/dbus_api/modest-dbus-callbacks.c: (on_idle_delete_message): Remove the hacky send/receive that didn't work, and instead refilter the treemodel to make the deleted email really vanish from the UI (though the delete-from-menu code does has commented out the code that does that). This fixes projects.maemo.org bug NB#62859. pmo-trunk-r2783 --- diff --git a/ChangeLog2 b/ChangeLog2 index 0984c46..f1f59b0 100644 --- a/ChangeLog2 +++ b/ChangeLog2 @@ -1,6 +1,15 @@ 2007-07-24 Murray Cumming * src/dbus_api/modest-dbus-callbacks.c: (on_idle_delete_message): + Remove the hacky send/receive that didn't work, and instead + refilter the treemodel to make the deleted email really vanish from + the UI (though the delete-from-menu code does has commented out + the code that does that). This fixes projects.maemo.org bug + NB#62859. + +2007-07-24 Murray Cumming + + * src/dbus_api/modest-dbus-callbacks.c: (on_idle_delete_message): Try a couple of tricks to force the treeview to update ( poke the folder, and do a send/receive refresh), but the deleted email still appears with a strike-through instead of really being diff --git a/src/dbus_api/modest-dbus-callbacks.c b/src/dbus_api/modest-dbus-callbacks.c index c0e95ae..c0cfc11 100644 --- a/src/dbus_api/modest-dbus-callbacks.c +++ b/src/dbus_api/modest-dbus-callbacks.c @@ -747,22 +747,25 @@ on_idle_delete_message (gpointer user_data) /* Trick: do a poke status in order to speed up the signaling of observers. A delete via the menu does this, in do_headers_action(), - but it does not seem to solve the stricken-out-but-not-removed problem here. + though I don't know why. */ tny_folder_poke_status (folder); g_object_unref (folder); } - if (account) { - /* Do a refresh so that stricken-out emails are really removed from the treeview. - * TODO: Why is this necessary here, but not when doing a delete from the menu or toolbar? */ - const gchar *modest_account_name = - modest_tny_account_get_parent_modest_account_name_for_server_account (account); - modest_ui_actions_do_send_receive (modest_account_name, MODEST_WINDOW (win)); - + if (account) g_object_unref (account); - } + + /* Refilter the header view explicitly, to make sure that + * deleted emails are really removed from view. + * (They are not really deleted until contact is made with the server, + * so they would appear with a strike-through until then): + */ + ModestHeaderView *header_view = MODEST_HEADER_VIEW(modest_main_window_get_child_widget ( + MODEST_MAIN_WINDOW(win), MODEST_WIDGET_TYPE_HEADER_VIEW)); + if (header_view && MODEST_IS_HEADER_VIEW (header_view)) + modest_header_view_refilter (header_view); return res; }