[gnome-panel/gtk3] Fix use of sealed field active_menu_item



commit 692d224b864f06acafe31b59af9c1e477c3198d0
Author: Germán Póo-Caamaño <gpoo gnome org>
Date:   Wed Jan 5 22:20:56 2011 -0800

    Fix use of sealed field active_menu_item
    
    Replaced menu_shell->active_menu_item by
    gtk_menu_shell_get_selected_item() and
    menu_shell->active_menu_item_submenu by
    gtk_menu_item_get_submenu().
    
    https://bugzilla.gnome.org/show_bug.cgi?id=627455
    
    Signed-off-by: Germán Póo-Caamaño <gpoo gnome org>

 gnome-panel/menu.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/gnome-panel/menu.c b/gnome-panel/menu.c
index f191bb8..f3c3c92 100644
--- a/gnome-panel/menu.c
+++ b/gnome-panel/menu.c
@@ -1903,22 +1903,21 @@ panel_menu_key_press_handler (GtkWidget   *widget,
 			      GdkEventKey *event)
 {
 	gboolean retval = FALSE;
+	GtkWidget *active_menu_item = NULL;
 
 	if ((event->keyval == GDK_KEY_Menu) ||
 	    (event->keyval == GDK_KEY_F10 &&
 	    (event->state & gtk_accelerator_get_default_mod_mask ()) == GDK_SHIFT_MASK)) {
 		GtkMenuShell *menu_shell = GTK_MENU_SHELL (widget);
 
-		if (menu_shell->GSEAL(active_menu_item) &&
-		    GTK_MENU_ITEM (menu_shell->GSEAL(active_menu_item))->GSEAL(submenu) == NULL) {
+		active_menu_item = gtk_menu_shell_get_selected_item (menu_shell);
+		if (active_menu_item && gtk_menu_item_get_submenu (GTK_MENU_ITEM (active_menu_item)) == NULL) {
 			GdkEventButton bevent;
 
 			bevent.button = 3;
 			bevent.time = GDK_CURRENT_TIME;
-			retval = show_item_menu (menu_shell->GSEAL(active_menu_item),
-						 &bevent);
+			retval = show_item_menu (active_menu_item, &bevent);
 		}
-		
 	}
 	return retval;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]