- if (folder) {
- /* 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(),
- though I don't know why.
- */
- tny_folder_poke_status (folder);
-
- g_object_unref (folder);
- }
-
- 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):
- */
- if (main_win) { /* only needed when there's a mainwindow / UI */
-
- /* This is a GDK lock because we are an idle callback and
- * the code below is or does Gtk+ code */
- gdk_threads_enter (); /* CHECKED */
- ModestHeaderView *header_view = (ModestHeaderView *)
- modest_main_window_get_child_widget (MODEST_MAIN_WINDOW(main_win),
- MODEST_MAIN_WINDOW_WIDGET_TYPE_HEADER_VIEW);
- if (header_view && MODEST_IS_HEADER_VIEW (header_view))
- modest_header_view_refilter (header_view);
- gdk_threads_leave ();
- }
-
- return res;