From: Jose Dapena Paz Date: Wed, 5 Dec 2007 13:36:46 +0000 (+0000) Subject: * src/modest-ui-actions.c: X-Git-Tag: git_migration_finished~1959 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=b466e01900ebda2e69725d5676cff353160b2ae7 * src/modest-ui-actions.c: * Removed unused code. * src/modest-ui-dimming-rules.c: * Add dimming rule to prevent removing attachments of messages we're sending (fixes NB#76634). pmo-trunk-r3878 --- diff --git a/src/modest-ui-actions.c b/src/modest-ui-actions.c index 4f6ffd4..3cd52fc 100644 --- a/src/modest-ui-actions.c +++ b/src/modest-ui-actions.c @@ -1880,7 +1880,7 @@ modest_ui_actions_on_send_receive (GtkAction *action, ModestWindow *win) /* Refresh the current folder. The if is always TRUE it's just an extra check */ if (MODEST_IS_MAIN_WINDOW (win)) { - GtkWidget *header_view, *folder_view; + GtkWidget *folder_view; TnyFolderStore *folder_store; folder_view = @@ -1891,15 +1891,6 @@ modest_ui_actions_on_send_receive (GtkAction *action, ModestWindow *win) folder_store = modest_folder_view_get_selected (MODEST_FOLDER_VIEW (folder_view)); - /* No need to refresh the INBOX the send_receive will do it for us */ - if (folder_store && TNY_IS_FOLDER (folder_store) && - tny_folder_get_folder_type (TNY_FOLDER (folder_store)) != TNY_FOLDER_TYPE_INBOX) { - header_view = - modest_main_window_get_child_widget (MODEST_MAIN_WINDOW (win), - MODEST_MAIN_WINDOW_WIDGET_TYPE_HEADER_VIEW); - - } - if (folder_store) g_object_unref (folder_store); } diff --git a/src/modest-ui-dimming-rules.c b/src/modest-ui-dimming-rules.c index da4a671..e383913 100644 --- a/src/modest-ui-dimming-rules.c +++ b/src/modest-ui-dimming-rules.c @@ -1218,6 +1218,14 @@ modest_ui_dimming_rules_on_remove_attachments (ModestWindow *win, gpointer user_ modest_dimming_rule_set_notification (rule, _("FIXME:no attachment selected")); } + if (!dimmed) { + + dimmed = _selected_msg_sent_in_progress (win); + if (dimmed) { + modest_dimming_rule_set_notification (rule, _("mail_ib_unable_to_purge_attachments")); + } + } + /* cannot purge in editable drafts nor pop folders */ if (!dimmed) { dimmed = _invalid_folder_for_purge (win, rule);