* src/modest-ui-actions.c:
authorJose Dapena Paz <jdapena@igalia.com>
Fri, 18 Apr 2008 16:49:59 +0000 (16:49 +0000)
committerJose Dapena Paz <jdapena@igalia.com>
Fri, 18 Apr 2008 16:49:59 +0000 (16:49 +0000)
* Disallow opening messages (with header activate) when they're
  being sent (fixes NB#83721).

pmo-trunk-r4434

src/modest-ui-actions.c

index f28f61b..ecae79a 100644 (file)
@@ -2189,6 +2189,7 @@ modest_ui_actions_on_header_activated (ModestHeaderView *header_view,
                                       ModestMainWindow *main_window)
 {
        TnyList *headers;
                                       ModestMainWindow *main_window)
 {
        TnyList *headers;
+       GtkWidget *open_widget;
 
        g_return_if_fail (MODEST_IS_MAIN_WINDOW(main_window));
 
 
        g_return_if_fail (MODEST_IS_MAIN_WINDOW(main_window));
 
@@ -2206,6 +2207,10 @@ modest_ui_actions_on_header_activated (ModestHeaderView *header_view,
        if (modest_platform_check_memory_low (MODEST_WINDOW(main_window)))
                return;
 
        if (modest_platform_check_memory_low (MODEST_WINDOW(main_window)))
                return;
 
+       modest_ui_actions_check_menu_dimming_rules (MODEST_WINDOW (main_window));
+       open_widget = modest_window_get_action_widget (MODEST_WINDOW (main_window), "/MenuBar/EmailMenu/EmailOpenMenu");
+       if (!GTK_WIDGET_IS_SENSITIVE (open_widget))
+               return;
 
 /*     headers = tny_simple_list_new (); */
 /*     tny_list_prepend (headers, G_OBJECT (header)); */
 
 /*     headers = tny_simple_list_new (); */
 /*     tny_list_prepend (headers, G_OBJECT (header)); */