From 72797decc12602b181f69dba7c54df7a0d1b9326 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 30 Jan 2010 14:03:19 -0500 Subject: Giant leap towards GSEAL compliance. --- widgets/menus/gal-view-new-dialog.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'widgets/menus/gal-view-new-dialog.c') diff --git a/widgets/menus/gal-view-new-dialog.c b/widgets/menus/gal-view-new-dialog.c index 356813c6fa..f364bf0779 100644 --- a/widgets/menus/gal-view-new-dialog.c +++ b/widgets/menus/gal-view-new-dialog.c @@ -73,6 +73,8 @@ gal_view_new_dialog_class_init (GalViewNewDialogClass *klass) static void gal_view_new_dialog_init (GalViewNewDialog *dialog) { + GtkWidget *content_area; + GtkWidget *parent; GtkWidget *widget; dialog->builder = gtk_builder_new (); @@ -83,15 +85,21 @@ gal_view_new_dialog_init (GalViewNewDialog *dialog) if (!widget) { return; } + g_object_ref (widget); - gtk_container_remove (GTK_CONTAINER (widget->parent), widget); - gtk_box_pack_start (GTK_BOX(GTK_DIALOG(dialog)->vbox), widget, TRUE, TRUE, 0); + + parent = gtk_widget_get_parent (widget); + gtk_container_remove (GTK_CONTAINER (parent), widget); + + content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog)); + gtk_box_pack_start (GTK_BOX (content_area), widget, TRUE, TRUE, 0); + g_object_unref (widget); - gtk_dialog_add_buttons (GTK_DIALOG (dialog), - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, GTK_RESPONSE_OK, - NULL); + gtk_dialog_add_buttons ( + GTK_DIALOG (dialog), + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); gtk_window_set_resizable (GTK_WINDOW(dialog), TRUE); gtk_window_set_modal (GTK_WINDOW(dialog), TRUE); -- cgit