[gtk+] Fix commit 5f55c420471db9a05d145e140b3a7cdfc5bdba9f



commit dd73be389b4801c30c2df6293ab6d6f94ac4a472
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Apr 17 23:15:06 2011 -0400

    Fix commit 5f55c420471db9a05d145e140b3a7cdfc5bdba9f
    
    Make gtk_menu_shell_activate static and don't use it
    outside gtkmenushell.c

 gtk/gtkmenuitem.c         |    2 --
 gtk/gtkmenushell.c        |    8 ++++----
 gtk/gtkmenushellprivate.h |    2 --
 3 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c
index 618ebab..db2b581 100644
--- a/gtk/gtkmenuitem.c
+++ b/gtk/gtkmenuitem.c
@@ -1848,8 +1848,6 @@ gtk_real_menu_item_activate_item (GtkMenuItem *menu_item)
         gtk_menu_shell_activate_item (menu_shell, widget, TRUE);
       else
         {
-          _gtk_menu_shell_activate (menu_shell);
-
           gtk_menu_shell_select_item (menu_shell, widget);
           _gtk_menu_item_popup_submenu (widget, FALSE);
 
diff --git a/gtk/gtkmenushell.c b/gtk/gtkmenushell.c
index 1a5a097..548bcaa 100644
--- a/gtk/gtkmenushell.c
+++ b/gtk/gtkmenushell.c
@@ -628,8 +628,8 @@ gtk_menu_shell_realize (GtkWidget *widget)
   gtk_style_context_set_background (context, window);
 }
 
-void
-_gtk_menu_shell_activate (GtkMenuShell *menu_shell)
+static void
+gtk_menu_shell_activate (GtkMenuShell *menu_shell)
 {
   GtkMenuShellPrivate *priv = menu_shell->priv;
 
@@ -697,7 +697,7 @@ gtk_menu_shell_button_press (GtkWidget      *widget,
               gtk_widget_get_parent (menu_item) == widget &&
               menu_item != priv->active_menu_item)
             {
-              _gtk_menu_shell_activate (menu_shell);
+              gtk_menu_shell_activate (menu_shell);
               priv->button = event->button;
 
               if (GTK_MENU_SHELL_GET_CLASS (menu_shell)->submenu_placement == GTK_TOP_BOTTOM)
@@ -1312,7 +1312,7 @@ gtk_menu_shell_real_select_item (GtkMenuShell *menu_shell,
       return;
     }
 
-  _gtk_menu_shell_activate (menu_shell);
+  gtk_menu_shell_activate (menu_shell);
 
   priv->active_menu_item = menu_item;
   if (pack_dir == GTK_PACK_DIRECTION_TTB || pack_dir == GTK_PACK_DIRECTION_BTT)
diff --git a/gtk/gtkmenushellprivate.h b/gtk/gtkmenushellprivate.h
index 1c6ed00..5c93b08 100644
--- a/gtk/gtkmenushellprivate.h
+++ b/gtk/gtkmenushellprivate.h
@@ -75,8 +75,6 @@ void       _gtk_menu_shell_set_keyboard_mode (GtkMenuShell *menu_shell,
                                               gboolean      keyboard_mode);
 gboolean   _gtk_menu_shell_get_keyboard_mode (GtkMenuShell *menu_shell);
 
-void       _gtk_menu_shell_activate          (GtkMenuShell *menu_shell);
-
 
 G_END_DECLS
 



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