[gnome-photos] view-container: Rearrange the code for subsequent changes



commit 86daa5c3326e0d2340f37001035c8970fa8f4a93
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Oct 9 12:41:54 2018 +0200

    view-container: Rearrange the code for subsequent changes
    
    A subsequent commit will remove the single-child GtkGrid. This will
    make it easier to read.

 src/photos-view-container.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/photos-view-container.c b/src/photos-view-container.c
index b2113b12..c6f42dd4 100644
--- a/src/photos-view-container.c
+++ b/src/photos-view-container.c
@@ -339,12 +339,6 @@ photos_view_container_constructed (GObject *object)
   gtk_orientable_set_orientation (GTK_ORIENTABLE (grid), GTK_ORIENTATION_VERTICAL);
   gtk_stack_add_named (GTK_STACK (self), grid, "view");
 
-  self->no_results = photos_empty_results_box_new (self->mode);
-  gtk_stack_add_named (GTK_STACK (self), self->no_results, "no-results");
-
-  self->error_box = photos_error_box_new ();
-  gtk_stack_add_named (GTK_STACK (self), self->error_box, "error");
-
   self->sw = gtk_scrolled_window_new (NULL, NULL);
   gtk_widget_set_hexpand (self->sw, TRUE);
   gtk_widget_set_vexpand (self->sw, TRUE);
@@ -359,6 +353,12 @@ photos_view_container_constructed (GObject *object)
   gd_main_box_set_show_primary_text (GD_MAIN_BOX (self->view), show_primary_text);
   gtk_container_add (GTK_CONTAINER (self->sw), self->view);
 
+  self->no_results = photos_empty_results_box_new (self->mode);
+  gtk_stack_add_named (GTK_STACK (self), self->no_results, "no-results");
+
+  self->error_box = photos_error_box_new ();
+  gtk_stack_add_named (GTK_STACK (self), self->error_box, "error");
+
   gtk_widget_show_all (GTK_WIDGET (self));
 
   gtk_stack_set_visible_child_full (GTK_STACK (self), "view", GTK_STACK_TRANSITION_TYPE_NONE);


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