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);
/**
* 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
{
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;
{
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);
if (!menubars)
{
g_signal_connect (window,
- "key_press_event",
+ "key-press-event",
G_CALLBACK (window_key_press_handler),
NULL);
}
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);
}
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;
* 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)
{
/**
* 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)
* 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)
{
/**
* 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)