X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fvar-type-dialog.c;h=c433bf3b2535e080e926093b2be5193c1760a252;hb=e589b646894ffc013ab5e57981c8ac07bce522dd;hp=db2e85b5f792bc5b4c5ee96daed8891ae8b0de19;hpb=06e6e50200bcf8d954dcda70b9c48c326eaec4a3;p=pspp-builds.git diff --git a/src/ui/gui/var-type-dialog.c b/src/ui/gui/var-type-dialog.c index db2e85b5..c433bf3b 100644 --- a/src/ui/gui/var-type-dialog.c +++ b/src/ui/gui/var-type-dialog.c @@ -21,7 +21,6 @@ #include #include -#include #include #include @@ -322,14 +321,14 @@ set_format_type_from_treeview (GtkTreeView *treeview, gpointer data) -/* Create the structure from the XML definitions */ +/* Create the structure */ struct var_type_dialog * -var_type_dialog_create (GladeXML *xml) +var_type_dialog_create (GtkWindow *toplevel) { gint i; struct var_type_dialog *dialog = g_malloc (sizeof (struct var_type_dialog)); - g_assert (xml); + GtkBuilder *xml = builder_new ("var-sheet-dialogs.ui"); dialog->window = get_widget_assert (xml,"var_type_dialog"); dialog->active_button = -1; @@ -339,7 +338,7 @@ var_type_dialog_create (GladeXML *xml) G_CALLBACK (gtk_widget_hide_on_delete), NULL); gtk_window_set_transient_for (GTK_WINDOW (dialog->window), - GTK_WINDOW (get_widget_assert (xml, "data_editor"))); + toplevel); dialog->radioButton[BUTTON_NUMERIC] = get_widget_assert (xml,"radiobutton1"); @@ -555,10 +554,10 @@ var_type_dialog_create (GladeXML *xml) g_signal_connect (get_widget_assert (xml, "var_type_cancel") , "clicked", G_CALLBACK (hide_dialog), dialog); - - } + g_object_unref (xml); + return dialog; }