From: John Darrington Date: Sat, 21 Feb 2009 02:24:58 +0000 (+0900) Subject: convert labels and missing values dialogs to GtkBuilder X-Git-Tag: v0.7.3~296^2~4 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=24a302ed4c0a7fbd52a4a549766c077f9e2bfe37;p=pspp-builds.git convert labels and missing values dialogs to GtkBuilder --- diff --git a/src/ui/gui/automake.mk b/src/ui/gui/automake.mk index 0176108d..e9677386 100644 --- a/src/ui/gui/automake.mk +++ b/src/ui/gui/automake.mk @@ -68,6 +68,7 @@ src_ui_gui_psppiredir = $(pkgdatadir) nodist_src_ui_gui_psppire_DATA = \ $(top_builddir)/src/ui/gui/crosstabs.ui \ + $(top_builddir)/src/ui/gui/data-editor.ui \ $(top_builddir)/src/ui/gui/examine.ui \ $(top_builddir)/src/ui/gui/frequencies.ui \ $(top_builddir)/src/ui/gui/message-dialog.ui \ diff --git a/src/ui/gui/missing-val-dialog.c b/src/ui/gui/missing-val-dialog.c index 4e9682f7..e8027bf8 100644 --- a/src/ui/gui/missing-val-dialog.c +++ b/src/ui/gui/missing-val-dialog.c @@ -32,7 +32,6 @@ #include -#include #include @@ -221,11 +220,11 @@ on_delete (GtkWidget *w, GdkEvent *e, gpointer data) /* Creates the dialog structure from the xml */ struct missing_val_dialog * -missing_val_dialog_create (GladeXML *xml) +missing_val_dialog_create (GtkBuilder *xml) { struct missing_val_dialog *dialog = g_malloc (sizeof (*dialog)); - connect_help (xml); + // connect_help (xml); dialog->window = get_widget_assert (xml, "missing_values_dialog"); diff --git a/src/ui/gui/missing-val-dialog.h b/src/ui/gui/missing-val-dialog.h index b7fab934..c6a09fc6 100644 --- a/src/ui/gui/missing-val-dialog.h +++ b/src/ui/gui/missing-val-dialog.h @@ -48,7 +48,7 @@ struct missing_val_dialog GtkWidget *discrete; }; -struct missing_val_dialog * missing_val_dialog_create (GladeXML *xml); +struct missing_val_dialog * missing_val_dialog_create (GtkBuilder *xml); void missing_val_dialog_show (struct missing_val_dialog *dialog); diff --git a/src/ui/gui/psppire-var-sheet.c b/src/ui/gui/psppire-var-sheet.c index d9148666..a36bf6f9 100644 --- a/src/ui/gui/psppire-var-sheet.c +++ b/src/ui/gui/psppire-var-sheet.c @@ -18,7 +18,6 @@ #include "psppire-var-sheet.h" #include -#include #include "helper.h" #include "customentry.h" @@ -486,13 +485,13 @@ var_sheet_change_active_cell (PsppireVarSheet *vs, static void psppire_var_sheet_init (PsppireVarSheet *vs) { - GladeXML *xml = XML_NEW ("data-editor.glade"); + GtkBuilder *builder = builder_new ("data-editor.ui"); - vs->val_labs_dialog = val_labs_dialog_create (xml); - vs->missing_val_dialog = missing_val_dialog_create (xml); - vs->var_type_dialog = var_type_dialog_create (xml); + vs->val_labs_dialog = val_labs_dialog_create (builder); + vs->missing_val_dialog = missing_val_dialog_create (builder); + vs->var_type_dialog = var_type_dialog_create (builder); - g_object_unref (xml); + g_object_unref (builder); vs->dispose_has_run = FALSE; vs->may_create_vars = TRUE; diff --git a/src/ui/gui/val-labs-dialog.c b/src/ui/gui/val-labs-dialog.c index d5228e04..6cddeb3e 100644 --- a/src/ui/gui/val-labs-dialog.c +++ b/src/ui/gui/val-labs-dialog.c @@ -364,7 +364,7 @@ on_select_row (GtkTreeView *treeview, /* Create a new dialog box (there should normally be only one)*/ struct val_labs_dialog * -val_labs_dialog_create (GladeXML *xml) +val_labs_dialog_create (GtkBuilder *xml) { GtkTreeViewColumn *column; @@ -372,7 +372,7 @@ val_labs_dialog_create (GladeXML *xml) struct val_labs_dialog *dialog = g_malloc (sizeof (*dialog)); - connect_help (xml); + // connect_help (xml); dialog->window = get_widget_assert (xml,"val_labs_dialog"); dialog->value_entry = get_widget_assert (xml,"value_entry"); diff --git a/src/ui/gui/val-labs-dialog.h b/src/ui/gui/val-labs-dialog.h index ffe3ed9b..af2cd711 100644 --- a/src/ui/gui/val-labs-dialog.h +++ b/src/ui/gui/val-labs-dialog.h @@ -32,7 +32,7 @@ struct val_labs; -struct val_labs_dialog * val_labs_dialog_create (GladeXML *); +struct val_labs_dialog * val_labs_dialog_create (GtkBuilder *); void val_labs_dialog_show (struct val_labs_dialog *); diff --git a/src/ui/gui/var-type-dialog.c b/src/ui/gui/var-type-dialog.c index db2e85b5..44afc84e 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 @@ -324,7 +323,7 @@ set_format_type_from_treeview (GtkTreeView *treeview, gpointer data) /* Create the structure from the XML definitions */ struct var_type_dialog * -var_type_dialog_create (GladeXML *xml) +var_type_dialog_create (GtkBuilder *xml) { gint i; struct var_type_dialog *dialog = g_malloc (sizeof (struct var_type_dialog)); diff --git a/src/ui/gui/var-type-dialog.h b/src/ui/gui/var-type-dialog.h index cab34096..536ba465 100644 --- a/src/ui/gui/var-type-dialog.h +++ b/src/ui/gui/var-type-dialog.h @@ -84,7 +84,7 @@ struct var_type_dialog }; -struct var_type_dialog * var_type_dialog_create (GladeXML *xml); +struct var_type_dialog * var_type_dialog_create (GtkBuilder *xml); void var_type_dialog_set_variable (struct var_type_dialog *dialog,