[gtk/wip/otte/toolbar: 6/8] xxx: demo



commit b360ea56516da386c0ba94dd3ebc40c6bbe81eb2
Author: Benjamin Otte <otte redhat com>
Date:   Mon Feb 3 05:36:03 2020 +0100

    xxx: demo

 demos/gtk-demo/application.c  |  8 ++++----
 demos/gtk-demo/application.ui | 10 +++++-----
 2 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/demos/gtk-demo/application.c b/demos/gtk-demo/application.c
index 92034b5e43..783966dfd8 100644
--- a/demos/gtk-demo/application.c
+++ b/demos/gtk-demo/application.c
@@ -14,7 +14,7 @@ typedef struct {
   GtkWidget *message;
   GtkWidget *infobar;
   GtkWidget *status;
-  GtkWidget *menutool;
+  GtkWidget *menubutton;
   GMenuModel *toolmenu;
   GtkTextBuffer *buffer;
 
@@ -428,8 +428,8 @@ demo_application_window_init (DemoApplicationWindow *window)
 
   gtk_widget_init_template (GTK_WIDGET (window));
 
-  popover = gtk_popover_menu_new_from_model (window->menutool, window->toolmenu);
-  gtk_menu_tool_button_set_popover (GTK_MENU_TOOL_BUTTON (window->menutool), popover);
+  popover = gtk_popover_menu_new_from_model (window->menubutton, window->toolmenu);
+  gtk_menu_button_set_popover (GTK_MENU_BUTTON (window->menubutton), popover);
 
   g_action_map_add_action_entries (G_ACTION_MAP (window),
                                    win_entries, G_N_ELEMENTS (win_entries),
@@ -528,7 +528,7 @@ demo_application_window_class_init (DemoApplicationWindowClass *class)
   gtk_widget_class_bind_template_child (widget_class, DemoApplicationWindow, infobar);
   gtk_widget_class_bind_template_child (widget_class, DemoApplicationWindow, status);
   gtk_widget_class_bind_template_child (widget_class, DemoApplicationWindow, buffer);
-  gtk_widget_class_bind_template_child (widget_class, DemoApplicationWindow, menutool);
+  gtk_widget_class_bind_template_child (widget_class, DemoApplicationWindow, menubutton);
   gtk_widget_class_bind_template_child (widget_class, DemoApplicationWindow, toolmenu);
   gtk_widget_class_bind_template_callback (widget_class, clicked_cb);
   gtk_widget_class_bind_template_callback (widget_class, update_statusbar);
diff --git a/demos/gtk-demo/application.ui b/demos/gtk-demo/application.ui
index f457d89f32..c26baafe3b 100644
--- a/demos/gtk-demo/application.ui
+++ b/demos/gtk-demo/application.ui
@@ -8,27 +8,27 @@
     <child>
       <object class="GtkGrid">
         <child>
-          <object class="GtkToolbar">
+          <object class="GtkBox">
             <property name="hexpand">1</property>
             <style>
               <class name="primary-toolbar"/>
             </style>
             <child>
-              <object class="GtkMenuToolButton" id="menutool">
+              <object class="GtkMenuButton" id="menubutton">
                 <property name="icon-name">document-open</property>
               </object>
             </child>
             <child>
-              <object class="GtkToolButton">
+              <object class="GtkButton">
                 <property name="icon-name">application-exit</property>
                 <property name="action-name">app.quit</property>
               </object>
             </child>
             <child>
-              <object class="GtkSeparatorToolItem"/>
+              <object class="GtkSeparator"/>
             </child>
             <child>
-              <object class="GtkToolButton">
+              <object class="GtkButton">
                 <property name="icon-name">applications-other</property>
                 <property name="action-name">win.logo</property>
               </object>


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