[gtk/new-style-menu] widget-factory: Move the popover bar to the ui file



commit 836fa2221e4abe56b8d670b9f0c44aa1da076fb5
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Jun 8 15:28:22 2019 +0000

    widget-factory: Move the popover bar to the ui file

 demos/widget-factory/widget-factory.c  | 6 ------
 demos/widget-factory/widget-factory.ui | 5 +++++
 2 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/demos/widget-factory/widget-factory.c b/demos/widget-factory/widget-factory.c
index 7faffdbd08..678d5f5f1c 100644
--- a/demos/widget-factory/widget-factory.c
+++ b/demos/widget-factory/widget-factory.c
@@ -1931,12 +1931,6 @@ activate (GApplication *app)
   model = (GMenuModel *)gtk_builder_get_object (builder, "new_style_context_menu_model");
   set_up_context_popover (widget, model);
 
-  widget = gtk_bin_get_child (GTK_BIN (gtk_builder_get_object (builder, "page2frame2")));
-  model = (GMenuModel *)gtk_builder_get_object (builder, "menu_bar_model");
-  widget2 = gtk_popover_bar_new_from_model (model);
-  gtk_container_add (GTK_CONTAINER (widget), widget2);
-  gtk_box_reorder_child_after (GTK_BOX (widget), widget2, NULL);
-
   gtk_widget_show (GTK_WIDGET (window));
 
   g_object_unref (builder);
diff --git a/demos/widget-factory/widget-factory.ui b/demos/widget-factory/widget-factory.ui
index 2c7e6bc0b3..7b873fbc8a 100644
--- a/demos/widget-factory/widget-factory.ui
+++ b/demos/widget-factory/widget-factory.ui
@@ -1821,6 +1821,11 @@ microphone-sensitivity-medium-symbolic</property>
                                 <child>
                                   <object class="GtkBox">
                                     <property name="orientation">vertical</property>
+                                    <child>
+                                      <object class="GtkPopoverBar">
+                                        <property name="menu-model">menu_bar_model</property>
+                                      </object>
+                                    </child>
                                     <child>
                                       <object class="GtkMenuBar">
                                         <child>


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