[gnome-builder] greeter: use ui template to add buttons section



commit 618785ed01adeddd168edba5aac45239a6c7d13c
Author: Christian Hergert <chergert redhat com>
Date:   Mon Jan 21 16:26:37 2019 -0800

    greeter: use ui template to add buttons section

 src/libide/greeter/ide-greeter-workspace.c  | 7 ++-----
 src/libide/greeter/ide-greeter-workspace.ui | 5 +++++
 2 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/src/libide/greeter/ide-greeter-workspace.c b/src/libide/greeter/ide-greeter-workspace.c
index 8b8406ec2..46d135374 100644
--- a/src/libide/greeter/ide-greeter-workspace.c
+++ b/src/libide/greeter/ide-greeter-workspace.c
@@ -588,6 +588,7 @@ ide_greeter_workspace_class_init (IdeGreeterWorkspaceClass *klass)
   gtk_widget_class_set_template_from_resource (widget_class, 
"/org/gnome/builder/ui/ide-greeter-workspace.ui");
   gtk_widget_class_bind_template_child (widget_class, IdeGreeterWorkspace, action_bar);
   gtk_widget_class_bind_template_child (widget_class, IdeGreeterWorkspace, back_button);
+  gtk_widget_class_bind_template_child (widget_class, IdeGreeterWorkspace, buttons_section);
   gtk_widget_class_bind_template_child (widget_class, IdeGreeterWorkspace, clone_surface);
   gtk_widget_class_bind_template_child (widget_class, IdeGreeterWorkspace, header_bar);
   gtk_widget_class_bind_template_child (widget_class, IdeGreeterWorkspace, left_box);
@@ -599,6 +600,7 @@ ide_greeter_workspace_class_init (IdeGreeterWorkspaceClass *klass)
   gtk_widget_class_bind_template_callback (widget_class, stack_notify_visible_child_cb);
 
   g_type_ensure (IDE_TYPE_CLONE_SURFACE);
+  g_type_ensure (IDE_TYPE_GREETER_BUTTONS_SECTION);
 }
 
 static void
@@ -632,11 +634,6 @@ ide_greeter_workspace_init (IdeGreeterWorkspace *self)
 
   _ide_greeter_workspace_init_actions (self);
   _ide_greeter_workspace_init_shortcuts (self);
-
-  self->buttons_section = g_object_new (IDE_TYPE_GREETER_BUTTONS_SECTION,
-                                        "visible", TRUE,
-                                        NULL);
-  ide_greeter_workspace_add_section (self, IDE_GREETER_SECTION (self->buttons_section));
 }
 
 IdeGreeterWorkspace *
diff --git a/src/libide/greeter/ide-greeter-workspace.ui b/src/libide/greeter/ide-greeter-workspace.ui
index 4980f13d0..695f01eb8 100644
--- a/src/libide/greeter/ide-greeter-workspace.ui
+++ b/src/libide/greeter/ide-greeter-workspace.ui
@@ -109,6 +109,11 @@
                                 <property name="orientation">vertical</property>
                                 <property name="spacing">32</property>
                                 <property name="visible">true</property>
+                                <child>
+                                  <object class="IdeGreeterButtonsSection" id="buttons_section">
+                                    <property name="visible">true</property>
+                                  </object>
+                                </child>
                               </object>
                             </child>
                           </object>


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