2007-08-17 Murray Cumming <murrayc@murrayc.com>
authorMurray Cumming <murrayc@murrayc.com>
Fri, 17 Aug 2007 14:26:36 +0000 (14:26 +0000)
committerMurray Cumming <murrayc@murrayc.com>
Fri, 17 Aug 2007 14:26:36 +0000 (14:26 +0000)
* src/modest-ui-dimming-rules.c:
(modest_ui_dimming_rules_on_view_window_move_to):
Enable the Move To toolbar button for search results, fixing the
last part of projects.maemo.org bug NB#63807.

pmo-trunk-r3011

ChangeLog2
src/modest-ui-dimming-rules.c

index 54dac8e..bd7d787 100644 (file)
@@ -1,5 +1,12 @@
 2007-08-17  Murray Cumming  <murrayc@murrayc.com>
 
+       * src/modest-ui-dimming-rules.c:
+       (modest_ui_dimming_rules_on_view_window_move_to): 
+       Enable the Move To toolbar button for search results, fixing the 
+       last part of projects.maemo.org bug NB#63807.
+
+2007-08-17  Murray Cumming  <murrayc@murrayc.com>
+
        * src/dbus_api/modest-dbus-callbacks.c:
        (check_and_offer_account_creation): Use gdk_thread_enter/leave(), 
        because this is called from idle handlers, to fix hangs afte the 
index 3c11cff..445d73c 100644 (file)
@@ -955,9 +955,18 @@ modest_ui_dimming_rules_on_view_window_move_to (ModestWindow *win, gpointer user
                if (dimmed)
                        modest_dimming_rule_set_notification (rule, _("mail_ib_notavailable_downloading"));
        }
+       
        if (!dimmed) {
-               if (MODEST_IS_MSG_VIEW_WINDOW (win))
-                       dimmed = !modest_msg_view_window_has_headers_model (MODEST_MSG_VIEW_WINDOW (win));
+               if (MODEST_IS_MSG_VIEW_WINDOW (win)) {
+                       /* The move_to button should be dimmed when viewing an attachment,
+                        * but should be enabled when viewing a message from the list, 
+                        * or when viewing a search result.
+                        */
+                       if (!modest_msg_view_window_is_search_result (MODEST_MSG_VIEW_WINDOW(win))) {
+                               dimmed = !modest_msg_view_window_has_headers_model (MODEST_MSG_VIEW_WINDOW (win));
+                       }
+               }
+               
                if (dimmed) 
                        modest_dimming_rule_set_notification (rule, _("mcen_ib_unable_to_move_mail_attachment"));
        }