* (modest_ui_actions_on_send_receive): we do not force a set
folder here for currently focused folder. This prevents an
unnecessary refresh of focused folder if it's not inbox.
* (on_send_receive_finished): replaced the second set_folder
with a mail operation to refresh the currently focused folder
if it's not the inbox. THis way we finally don't lose focus on
refresh (fixes NB#64670).
pmo-trunk-r3875
modest_main_window_get_child_widget (MODEST_MAIN_WINDOW (win),
MODEST_MAIN_WINDOW_WIDGET_TYPE_HEADER_VIEW);
modest_main_window_get_child_widget (MODEST_MAIN_WINDOW (win),
MODEST_MAIN_WINDOW_WIDGET_TYPE_HEADER_VIEW);
- /* We do not need to set the contents style
- because it hasn't changed. We also do not
- need to save the widget status. Just force
- a refresh */
- modest_header_view_set_folder (MODEST_HEADER_VIEW(header_view),
- TNY_FOLDER (folder_store),
- folder_refreshed_cb,
- MODEST_MAIN_WINDOW (win));
update_account does it always automatically */
if (folder_store && TNY_IS_FOLDER (folder_store) &&
tny_folder_get_folder_type (TNY_FOLDER (folder_store)) != TNY_FOLDER_TYPE_INBOX) {
update_account does it always automatically */
if (folder_store && TNY_IS_FOLDER (folder_store) &&
tny_folder_get_folder_type (TNY_FOLDER (folder_store)) != TNY_FOLDER_TYPE_INBOX) {
+ ModestMailOperation *refresh_op;
header_view = modest_main_window_get_child_widget (main_win,
MODEST_MAIN_WINDOW_WIDGET_TYPE_HEADER_VIEW);
header_view = modest_main_window_get_child_widget (main_win,
MODEST_MAIN_WINDOW_WIDGET_TYPE_HEADER_VIEW);
because it hasn't changed. We also do not
need to save the widget status. Just force
a refresh */
because it hasn't changed. We also do not
need to save the widget status. Just force
a refresh */
- modest_header_view_set_folder (MODEST_HEADER_VIEW(header_view),
- TNY_FOLDER (folder_store),
- folder_refreshed_cb,
- main_win);
+ refresh_op = modest_mail_operation_new (G_OBJECT (main_win));
+ modest_mail_operation_queue_add (modest_runtime_get_mail_operation_queue (), refresh_op);
+ modest_mail_operation_refresh_folder (refresh_op, TNY_FOLDER (folder_store),
+ folder_refreshed_cb, main_win);
+ g_object_unref (refresh_op);