[gnome-photos] Make sure that default-height & default-width are respected



commit 5f3f8c073bf7e78c2015d17ca2c7aeff854a1381
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Apr 15 00:19:26 2013 +0200

    Make sure that default-height & default-width are respected
    
    If a window is shown before default-height & default-width are set,
    then they will not be respected. Since those are not construct
    properties we should show the window after g_object_new has returned.

 src/photos-application.c                | 1 +
 src/photos-organize-collection-dialog.c | 2 --
 src/photos-properties-dialog.c          | 2 --
 src/photos-selection-toolbar.c          | 2 ++
 4 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/src/photos-application.c b/src/photos-application.c
index cc20cf4..1ee6c58 100644
--- a/src/photos-application.c
+++ b/src/photos-application.c
@@ -145,6 +145,7 @@ photos_application_properties (PhotosApplication *self)
 
   id = photos_base_item_get_id (item);
   dialog = photos_properties_dialog_new (GTK_WINDOW (priv->main_window), id);
+  gtk_widget_show_all (dialog);
   g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
 }
 
diff --git a/src/photos-organize-collection-dialog.c b/src/photos-organize-collection-dialog.c
index 0f42f08..97e5316 100644
--- a/src/photos-organize-collection-dialog.c
+++ b/src/photos-organize-collection-dialog.c
@@ -104,8 +104,6 @@ photos_organize_collection_dialog_init (PhotosOrganizeCollectionDialog *self)
                     "button-press-event",
                     G_CALLBACK (photos_organize_collection_dialog_button_press_event),
                     self);
-
-  gtk_widget_show_all (GTK_WIDGET (self));
 }
 
 
diff --git a/src/photos-properties-dialog.c b/src/photos-properties-dialog.c
index 3b4e3a9..30f4d2e 100644
--- a/src/photos-properties-dialog.c
+++ b/src/photos-properties-dialog.c
@@ -268,8 +268,6 @@ photos_properties_dialog_constructed (GObject *object)
   item_type_data = gtk_label_new (type_description);
   gtk_widget_set_halign (item_type_data, GTK_ALIGN_START);
   gtk_grid_attach_next_to (GTK_GRID (grid), item_type_data, item_type, 1, 2, 1);
-
-  gtk_widget_show_all (GTK_WIDGET (self));
 }
 
 
diff --git a/src/photos-selection-toolbar.c b/src/photos-selection-toolbar.c
index 920b857..a2c6c03 100644
--- a/src/photos-selection-toolbar.c
+++ b/src/photos-selection-toolbar.c
@@ -114,6 +114,7 @@ photos_selection_toolbar_collection_clicked (GtkButton *button, gpointer user_da
     return;
 
   dialog = photos_organize_collection_dialog_new (GTK_WINDOW (toplevel));
+  gtk_widget_show_all (dialog);
   photos_selection_toolbar_fade_out (self);
   g_signal_connect (dialog, "response", G_CALLBACK (photos_selection_toolbar_dialog_response), self);
 }
@@ -226,6 +227,7 @@ photos_selection_toolbar_properties_clicked (GtkButton *button, gpointer user_da
   urn = (gchar *) selection->data;
 
   dialog = photos_properties_dialog_new (GTK_WINDOW (windows->data), urn);
+  gtk_widget_show_all (dialog);
   photos_selection_toolbar_fade_out (self);
 
   g_object_unref (app);


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