summaryrefslogtreecommitdiff
path: root/gtk/gtkmenushell.c
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2014-04-28 14:01:35 +0200
committerMatthias Clasen <mclasen@redhat.com>2014-04-28 14:14:41 -0400
commitf6ee00769a9190ed95857dab9fc78f935b6645db (patch)
treeceba7c549db663cee30a9910ce1304559f8f89dd /gtk/gtkmenushell.c
parent48db84182211324cc70703da609d15e3a568f5f6 (diff)
downloadgtk+-f6ee00769a9190ed95857dab9fc78f935b6645db.tar.gz
GtkMenuTracker: don't specialise "submenu" link
We have some API in GtkMenuTracker and GtkMenuTrackerItem that is specifically designed to deal with submenus. Generalise these APIs to take a 'link_name' parameter that we always give as G_MENU_SUBMENU for now. In the future, this will allow creating trackers for other types of links, such as sections.
Diffstat (limited to 'gtk/gtkmenushell.c')
-rw-r--r--gtk/gtkmenushell.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gtk/gtkmenushell.c b/gtk/gtkmenushell.c
index 7e2dbe7b36..6626a0e6fe 100644
--- a/gtk/gtkmenushell.c
+++ b/gtk/gtkmenushell.c
@@ -2057,7 +2057,7 @@ gtk_menu_shell_tracker_insert_func (GtkMenuTrackerItem *item,
gtk_widget_show (widget);
}
- else if (gtk_menu_tracker_item_get_has_submenu (item))
+ else if (gtk_menu_tracker_item_get_has_link (item, G_MENU_LINK_SUBMENU))
{
GtkMenuShell *submenu;
@@ -2070,10 +2070,11 @@ gtk_menu_shell_tracker_insert_func (GtkMenuTrackerItem *item,
* prevent arbitrary recursion depth. We could also do it
* lazy...
*/
- submenu->priv->tracker = gtk_menu_tracker_new_for_item_submenu (item,
- gtk_menu_shell_tracker_insert_func,
- gtk_menu_shell_tracker_remove_func,
- submenu);
+ submenu->priv->tracker = gtk_menu_tracker_new_for_item_link (item,
+ G_MENU_LINK_SUBMENU,
+ gtk_menu_shell_tracker_insert_func,
+ gtk_menu_shell_tracker_remove_func,
+ submenu);
gtk_menu_item_set_submenu (GTK_MENU_ITEM (widget), GTK_WIDGET (submenu));
if (gtk_menu_tracker_item_get_should_request_show (item))