Do run dimming rules when clicking on menu in Gtk's port
authorSergio Villar Senín <svillar@igalia.com>
Mon, 14 Dec 2009 17:56:29 +0000 (18:56 +0100)
committerSergio Villar Senín <svillar@igalia.com>
Mon, 14 Dec 2009 17:56:29 +0000 (18:56 +0100)
src/gtk/modest-platform.c
src/gtk/modest-shell.c

index a608cb7..d950cb1 100644 (file)
@@ -1212,7 +1212,7 @@ modest_platform_set_update_interval (guint minutes)
                GtkWidget *shell;
                mgr = modest_runtime_get_window_mgr ();
                shell = modest_gtk_window_mgr_get_shell (MODEST_GTK_WINDOW_MGR (mgr));
-               g_object_weak_ref (shell, shell_weak_ref, NULL);
+               g_object_weak_ref ((GObject *) shell, shell_weak_ref, NULL);
                weak_ref_enabled = TRUE;
        }
        if (timeout_handler_id > 0) {
index de1f043..77aa9a2 100644 (file)
@@ -511,7 +511,11 @@ on_title_button_clicked (GtkToolButton *button, ModestShell *self)
        menu = modest_shell_window_get_menu (MODEST_SHELL_WINDOW (child));
 
        if (menu) {
-               gtk_menu_popup (GTK_MENU (menu), NULL, NULL, 
+               /* Run dimming rules */
+               ModestWindow *window = modest_shell_peek_window (self);
+               modest_ui_actions_check_menu_dimming_rules (window);
+
+               gtk_menu_popup (GTK_MENU (menu), NULL, NULL,
                                (GtkMenuPositionFunc) menu_position_cb, (gpointer) self,
                                1, gtk_get_current_event_time ());
        }