X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmaemo%2Fmodest-main-window.c;h=7bde64db9e99a98b0f846cfb8f0ad9e260423eab;hp=a39c31af0b478ad5b1d0edaf8e37b887f9a60372;hb=6485bda3ba3d2ef1dd9dd4b633757664cf0fe72f;hpb=d8f84008fa1e26dc63a2aaf44fd37da8bdfc6207;ds=sidebyside diff --git a/src/maemo/modest-main-window.c b/src/maemo/modest-main-window.c index a39c31a..7bde64d 100644 --- a/src/maemo/modest-main-window.c +++ b/src/maemo/modest-main-window.c @@ -59,7 +59,7 @@ #include "modest-tny-msg.h" #include "modest-mail-operation.h" #include "modest-icon-names.h" -#include "modest-progress-bar-widget.h" +#include "modest-progress-bar.h" #include "modest-text-utils.h" #include "modest-ui-dimming-manager.h" #include "maemo/modest-osso-state-saving.h" @@ -1491,7 +1491,7 @@ modest_main_window_show_toolbar (ModestWindow *self, toolbar_resize (MODEST_MAIN_WINDOW (self)); /* Add ProgressBar (Transfer toolbar) */ - priv->progress_bar = modest_progress_bar_widget_new (); + priv->progress_bar = modest_progress_bar_new (); gtk_widget_set_no_show_all (priv->progress_bar, TRUE); placeholder = gtk_ui_manager_get_widget (parent_priv->ui_manager, "/ToolBar/ProgressBarView"); insert_index = gtk_toolbar_get_item_index(GTK_TOOLBAR (parent_priv->toolbar), GTK_TOOL_ITEM(placeholder)); @@ -1903,6 +1903,7 @@ on_msg_count_changed (ModestHeaderView *header_view, TnyFolderChange *change, ModestMainWindow *main_window) { + gboolean refilter = FALSE; gboolean folder_empty = FALSE; gboolean all_marked_as_deleted = FALSE; ModestMainWindowPrivate *priv; @@ -1923,8 +1924,11 @@ on_msg_count_changed (ModestHeaderView *header_view, /* Play a sound (if configured) and make the LED blink */ if (changed & TNY_FOLDER_CHANGE_CHANGED_ADDED_HEADERS) { - modest_platform_on_new_headers_received (NULL, FALSE); + modest_platform_push_email_notification (); } + + if ((changed) & TNY_FOLDER_CHANGE_CHANGED_EXPUNGED_HEADERS) + refilter = TRUE; } /* Check if all messages are marked to be deleted */ @@ -1940,6 +1944,9 @@ on_msg_count_changed (ModestHeaderView *header_view, modest_main_window_set_contents_style (main_window, MODEST_MAIN_WINDOW_CONTENTS_STYLE_HEADERS); } + + if (refilter) + modest_header_view_refilter (header_view); } @@ -2233,6 +2240,7 @@ get_toolbar_mode_from_mail_operation (ModestMainWindow *self, /* Get toolbar mode from operation id*/ switch (modest_mail_operation_get_type_operation (mail_op)) { + case MODEST_MAIL_OPERATION_TYPE_SEND_AND_RECEIVE: case MODEST_MAIL_OPERATION_TYPE_RECEIVE: case MODEST_MAIL_OPERATION_TYPE_OPEN: mode = TOOLBAR_MODE_TRANSFER; @@ -2694,6 +2702,8 @@ modest_main_window_screen_is_on (ModestMainWindow *self) { ModestMainWindowPrivate *priv = NULL; + g_return_val_if_fail (MODEST_IS_MAIN_WINDOW(self), FALSE); + priv = MODEST_MAIN_WINDOW_GET_PRIVATE (self); return (priv->display_state == OSSO_DISPLAY_ON) ? TRUE : FALSE;