[gtk/kill-tree-menu: 22/52] gtk-demo: Replace a menu with a popover



commit 1e4e63be3f7a16f3b0ee2b1f7e2af2a6e09ca0d3
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Dec 26 21:06:56 2019 -0500

    gtk-demo: Replace a menu with a popover

 demos/gtk-demo/application.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/demos/gtk-demo/application.c b/demos/gtk-demo/application.c
index 7ed8ef6e1d..92034b5e43 100644
--- a/demos/gtk-demo/application.c
+++ b/demos/gtk-demo/application.c
@@ -419,7 +419,7 @@ demo_application_window_load_state (DemoApplicationWindow *win)
 static void
 demo_application_window_init (DemoApplicationWindow *window)
 {
-  GtkWidget *menu;
+  GtkWidget *popover;
 
   window->width = -1;
   window->height = -1;
@@ -428,8 +428,8 @@ demo_application_window_init (DemoApplicationWindow *window)
 
   gtk_widget_init_template (GTK_WIDGET (window));
 
-  menu = gtk_menu_new_from_model (window->toolmenu);
-  gtk_menu_tool_button_set_menu (GTK_MENU_TOOL_BUTTON (window->menutool), menu);
+  popover = gtk_popover_menu_new_from_model (window->menutool, window->toolmenu);
+  gtk_menu_tool_button_set_popover (GTK_MENU_TOOL_BUTTON (window->menutool), popover);
 
   g_action_map_add_action_entries (G_ACTION_MAP (window),
                                    win_entries, G_N_ELEMENTS (win_entries),


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