Move create_container to constructor in details dialog.
authorJose Dapena Paz <jdapena@igalia.com>
Wed, 26 Nov 2008 10:05:09 +0000 (10:05 +0000)
committerJose Dapena Paz <jdapena@igalia.com>
Wed, 26 Nov 2008 10:05:09 +0000 (10:05 +0000)
This is because the instance_init does not warranty that the class
pointer is the final one. In fact, we were getting scrolleds because
of this.

pmo-trunk-r6408

src/hildon2/modest-hildon2-details-dialog.c
src/widgets/modest-details-dialog.c

index d3595be..52079c5 100644 (file)
@@ -99,6 +99,7 @@ modest_hildon2_details_dialog_new_with_header (GtkWindow *parent,
                                                        "transient-for", parent, 
                                                        NULL));
 
+       MODEST_DETAILS_DIALOG_GET_CLASS (dialog)->create_container_func (dialog);
        MODEST_DETAILS_DIALOG_GET_CLASS (dialog)->set_header_func (dialog, header);
 
        return GTK_WIDGET (dialog);
@@ -117,6 +118,7 @@ modest_hildon2_details_dialog_new_with_folder  (GtkWindow *parent,
                                                        "transient-for", parent, 
                                                        NULL));
 
+       MODEST_DETAILS_DIALOG_GET_CLASS (dialog)->create_container_func (dialog);
        MODEST_DETAILS_DIALOG_GET_CLASS (dialog)->set_folder_func (dialog, folder);
 
        return GTK_WIDGET (dialog);
index 9a14c10..21cdbf2 100644 (file)
@@ -95,7 +95,6 @@ modest_details_dialog_class_init (ModestDetailsDialogClass *klass)
 static void
 modest_details_dialog_init (ModestDetailsDialog *self)
 {
-       MODEST_DETAILS_DIALOG_GET_CLASS (self)->create_container_func (self);
 }
 
 GtkWidget*
@@ -111,6 +110,7 @@ modest_details_dialog_new_with_header (GtkWindow *parent,
                                                        "transient-for", parent, 
                                                        NULL));
 
+       MODEST_DETAILS_DIALOG_GET_CLASS (dialog)->create_container_func (dialog);
        MODEST_DETAILS_DIALOG_GET_CLASS (dialog)->set_header_func (dialog, header);
 
        /* Add close button */
@@ -132,6 +132,7 @@ modest_details_dialog_new_with_folder  (GtkWindow *parent,
                                                        "transient-for", parent, 
                                                        NULL));
 
+       MODEST_DETAILS_DIALOG_GET_CLASS (dialog)->create_container_func (dialog);
        MODEST_DETAILS_DIALOG_GET_CLASS (dialog)->set_folder_func (dialog, folder);
 
        /* Add close button */