]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkmenubar.c
Deprecate flag macros for toplevel, state, no window and composite child
[~andy/gtk] / gtk / gtkmenubar.c
index 3b9677bb42c5d8ce250f04272caa351fa77e8487..d051e3b79a76161bcfae8a3c6d9f24eb6f572f1e 100644 (file)
@@ -115,42 +115,42 @@ gtk_menu_bar_class_init (GtkMenuBarClass *class)
   binding_set = gtk_binding_set_by_class (class);
   gtk_binding_entry_add_signal (binding_set,
                                GDK_Left, 0,
-                               "move_current", 1,
+                               "move-current", 1,
                                GTK_TYPE_MENU_DIRECTION_TYPE,
                                GTK_MENU_DIR_PREV);
   gtk_binding_entry_add_signal (binding_set,
                                GDK_KP_Left, 0,
-                               "move_current", 1,
+                               "move-current", 1,
                                GTK_TYPE_MENU_DIRECTION_TYPE,
                                GTK_MENU_DIR_PREV);
   gtk_binding_entry_add_signal (binding_set,
                                GDK_Right, 0,
-                               "move_current", 1,
+                               "move-current", 1,
                                GTK_TYPE_MENU_DIRECTION_TYPE,
                                GTK_MENU_DIR_NEXT);
   gtk_binding_entry_add_signal (binding_set,
                                GDK_KP_Right, 0,
-                               "move_current", 1,
+                               "move-current", 1,
                                GTK_TYPE_MENU_DIRECTION_TYPE,
                                GTK_MENU_DIR_NEXT);
   gtk_binding_entry_add_signal (binding_set,
                                GDK_Up, 0,
-                               "move_current", 1,
+                               "move-current", 1,
                                GTK_TYPE_MENU_DIRECTION_TYPE,
                                GTK_MENU_DIR_PARENT);
   gtk_binding_entry_add_signal (binding_set,
                                GDK_KP_Up, 0,
-                               "move_current", 1,
+                               "move-current", 1,
                                GTK_TYPE_MENU_DIRECTION_TYPE,
                                GTK_MENU_DIR_PARENT);
   gtk_binding_entry_add_signal (binding_set,
                                GDK_Down, 0,
-                               "move_current", 1,
+                               "move-current", 1,
                                GTK_TYPE_MENU_DIRECTION_TYPE,
                                GTK_MENU_DIR_CHILD);
   gtk_binding_entry_add_signal (binding_set,
                                GDK_KP_Down, 0,
-                               "move_current", 1,
+                               "move-current", 1,
                                GTK_TYPE_MENU_DIRECTION_TYPE,
                                GTK_MENU_DIR_CHILD);
 
@@ -174,7 +174,7 @@ gtk_menu_bar_class_init (GtkMenuBarClass *class)
   /**
    * GtkMenuBar:child-pack-direction:
    *
-   * The pack direction of the menubar. It determines how
+   * The child pack direction of the menubar. It determines how
    * the widgets contained in child menuitems are arranged.
    *
    * Since: 2.8
@@ -537,7 +537,7 @@ gtk_menu_bar_expose (GtkWidget      *widget,
     {
       gtk_menu_bar_paint (widget, &event->area);
 
-      (* GTK_WIDGET_CLASS (gtk_menu_bar_parent_class)->expose_event) (widget, event);
+      GTK_WIDGET_CLASS (gtk_menu_bar_parent_class)->expose_event (widget, event);
     }
 
   return FALSE;
@@ -625,6 +625,7 @@ window_key_press_handler (GtkWidget   *widget,
            {
              GtkMenuShell *menu_shell = GTK_MENU_SHELL (menubars->data);
 
+              _gtk_menu_shell_set_keyboard_mode (menu_shell, TRUE);
              _gtk_menu_shell_activate (menu_shell);
              gtk_menu_shell_select_first (menu_shell, FALSE);
              
@@ -649,7 +650,7 @@ add_to_window (GtkWindow  *window,
   if (!menubars)
     {
       g_signal_connect (window,
-                       "key_press_event",
+                       "key-press-event",
                        G_CALLBACK (window_key_press_handler),
                        NULL);
     }
@@ -689,7 +690,7 @@ gtk_menu_bar_hierarchy_changed (GtkWidget *widget,
   if (old_toplevel)
     remove_from_window (GTK_WINDOW (old_toplevel), menubar);
   
-  if (GTK_WIDGET_TOPLEVEL (toplevel))
+  if (gtk_widget_is_toplevel (toplevel))
     add_to_window (GTK_WINDOW (toplevel), menubar);
 }
 
@@ -707,7 +708,7 @@ _gtk_menu_bar_cycle_focus (GtkMenuBar       *menubar,
   GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (menubar));
   GtkMenuItem *to_activate = NULL;
 
-  if (GTK_WIDGET_TOPLEVEL (toplevel))
+  if (gtk_widget_is_toplevel (toplevel))
     {
       GList *tmp_menubars = get_viewable_menu_bars (GTK_WINDOW (toplevel));
       GList *menubars;
@@ -828,13 +829,13 @@ gtk_menu_bar_move_current (GtkMenuShell         *menu_shell,
  * gtk_menu_bar_get_pack_direction:
  * @menubar: a #GtkMenuBar
  * 
- * Retrieves the current pack direction of the menubar. See
- * gtk_menu_bar_set_pack_direction().
+ * Retrieves the current pack direction of the menubar. 
+ * See gtk_menu_bar_set_pack_direction().
  *
  * Return value: the pack direction
  *
  * Since: 2.8
- **/
+ */
 GtkPackDirection
 gtk_menu_bar_get_pack_direction (GtkMenuBar *menubar)
 {
@@ -850,13 +851,13 @@ gtk_menu_bar_get_pack_direction (GtkMenuBar *menubar)
 
 /**
  * gtk_menu_bar_set_pack_direction:
- * @menubar: a #GtkMenuBar.
- * @pack_dir: a new #GtkPackDirection.
+ * @menubar: a #GtkMenuBar
+ * @pack_dir: a new #GtkPackDirection
  * 
  * Sets how items should be packed inside a menubar.
  * 
  * Since: 2.8
- **/
+ */
 void
 gtk_menu_bar_set_pack_direction (GtkMenuBar       *menubar,
                                  GtkPackDirection  pack_dir)
@@ -885,13 +886,13 @@ gtk_menu_bar_set_pack_direction (GtkMenuBar       *menubar,
  * gtk_menu_bar_get_child_pack_direction:
  * @menubar: a #GtkMenuBar
  * 
- * Retrieves the current child pack direction of the menubar. See
- * gtk_menu_bar_set_child_pack_direction().
+ * Retrieves the current child pack direction of the menubar.
+ * See gtk_menu_bar_set_child_pack_direction().
  *
  * Return value: the child pack direction
  *
  * Since: 2.8
- **/
+ */
 GtkPackDirection
 gtk_menu_bar_get_child_pack_direction (GtkMenuBar *menubar)
 {
@@ -907,13 +908,13 @@ gtk_menu_bar_get_child_pack_direction (GtkMenuBar *menubar)
 
 /**
  * gtk_menu_bar_set_child_pack_direction:
- * @menubar: a #GtkMenuBar.
- * @child_pack_dir: a new #GtkPackDirection.
+ * @menubar: a #GtkMenuBar
+ * @child_pack_dir: a new #GtkPackDirection
  * 
  * Sets how widgets should be packed inside the children of a menubar.
  * 
  * Since: 2.8
- **/
+ */
 void
 gtk_menu_bar_set_child_pack_direction (GtkMenuBar       *menubar,
                                        GtkPackDirection  child_pack_dir)