From e10c2952cf51a443381a40de4fed12a89f720927 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sat, 18 Aug 2012 12:26:03 -0700 Subject: [PATCH] val-labs-dialog: Convert to a GObject. --- src/ui/gui/automake.mk | 1 + src/ui/gui/psppire-var-sheet.c | 34 +++- src/ui/gui/psppire-var-sheet.h | 2 - src/ui/gui/val-labs-dialog.c | 341 +++++++++++++++++--------------- src/ui/gui/val-labs-dialog.h | 69 +++++-- src/ui/gui/val-labs-dialog.ui | 215 ++++++++++++++++++++ src/ui/gui/var-sheet-dialogs.ui | 265 ------------------------- 7 files changed, 487 insertions(+), 440 deletions(-) create mode 100644 src/ui/gui/val-labs-dialog.ui diff --git a/src/ui/gui/automake.mk b/src/ui/gui/automake.mk index 55f8291432..7468c89038 100644 --- a/src/ui/gui/automake.mk +++ b/src/ui/gui/automake.mk @@ -38,6 +38,7 @@ UI_FILES = \ src/ui/gui/t-test.ui \ src/ui/gui/text-data-import.ui \ src/ui/gui/univariate.ui \ + src/ui/gui/val-labs-dialog.ui \ src/ui/gui/var-sheet-dialogs.ui \ src/ui/gui/variable-info.ui \ src/ui/gui/data-editor.ui \ diff --git a/src/ui/gui/psppire-var-sheet.c b/src/ui/gui/psppire-var-sheet.c index a3208f0000..5171cabbb1 100644 --- a/src/ui/gui/psppire-var-sheet.c +++ b/src/ui/gui/psppire-var-sheet.c @@ -23,7 +23,9 @@ #include "customentry.h" #include +#include "data/value-labels.h" #include "psppire-var-store.h" +#include "ui/gui/val-labs-dialog.h" #include #define _(msgid) gettext (msgid) @@ -309,6 +311,29 @@ var_sheet_show_var_type_dialog (PsppireVarSheet *vs) var_set_both_formats (var, &format); } +static void +var_sheet_show_val_labs_dialog (PsppireVarSheet *vs) +{ + PsppireVarStore *var_store; + struct val_labs *labels; + struct variable *var; + gint row; + + var_store = PSPPIRE_VAR_STORE (psppire_sheet_get_model (PSPPIRE_SHEET (vs))); + + psppire_sheet_get_active_cell (PSPPIRE_SHEET (vs), &row, NULL); + var = psppire_var_store_get_var (var_store, row); + g_return_if_fail (var != NULL); + + labels = psppire_val_labs_dialog_run (GTK_WINDOW (gtk_widget_get_toplevel ( + GTK_WIDGET (vs))), var); + if (labels) + { + var_set_value_labels (var, labels); + val_labs_destroy (labels); + } +} + /* Callback whenever the active cell changes on the var sheet. */ @@ -386,12 +411,10 @@ var_sheet_change_active_cell (PsppireVarSheet *vs, customEntry = PSPPIRE_CUSTOM_ENTRY (psppire_sheet_get_entry (sheet)); - val_labs_dialog_set_target_variable (vs->val_labs_dialog, var); - g_signal_connect_swapped (customEntry, "clicked", - G_CALLBACK (val_labs_dialog_show), - vs->val_labs_dialog); + G_CALLBACK (var_sheet_show_val_labs_dialog), + vs); } break; @@ -497,8 +520,6 @@ psppire_var_sheet_realize (GtkWidget *w) GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (vs)); - vs->val_labs_dialog = val_labs_dialog_create (GTK_WINDOW (toplevel)); - vs->missing_val_dialog = missing_val_dialog_create (GTK_WINDOW (toplevel)); /* Chain up to the parent class */ @@ -510,7 +531,6 @@ psppire_var_sheet_unrealize (GtkWidget *w) { PsppireVarSheet *vs = PSPPIRE_VAR_SHEET (w); - g_free (vs->val_labs_dialog); g_free (vs->missing_val_dialog); /* Chain up to the parent class */ diff --git a/src/ui/gui/psppire-var-sheet.h b/src/ui/gui/psppire-var-sheet.h index 7c043ca5a2..24e69af1b0 100644 --- a/src/ui/gui/psppire-var-sheet.h +++ b/src/ui/gui/psppire-var-sheet.h @@ -21,7 +21,6 @@ #include #include #include -#include "val-labs-dialog.h" #include "missing-val-dialog.h" #include "var-type-dialog.h" @@ -45,7 +44,6 @@ struct _PsppireVarSheet gboolean dispose_has_run; gboolean may_create_vars; - struct val_labs_dialog *val_labs_dialog ; struct missing_val_dialog *missing_val_dialog ; }; diff --git a/src/ui/gui/val-labs-dialog.c b/src/ui/gui/val-labs-dialog.c index 6b556d6de7..094a422af0 100644 --- a/src/ui/gui/val-labs-dialog.c +++ b/src/ui/gui/val-labs-dialog.c @@ -20,48 +20,152 @@ #include -#include +#include "ui/gui/val-labs-dialog.h" -#include "builder-wrapper.h" -#include "val-labs-dialog.h" -#include -#include -#include "psppire-var-sheet.h" -#include "psppire-var-store.h" -#include +#include -#include "helper.h" +#include "data/value-labels.h" +#include "data/format.h" +#include "libpspp/i18n.h" +#include "ui/gui/builder-wrapper.h" +#include "ui/gui/helper.h" #include #define _(msgid) gettext (msgid) #define N_(msgid) msgid -struct val_labs_dialog +static GObject *psppire_val_labs_dialog_constructor (GType type, guint, + GObjectConstructParam *); +static void psppire_val_labs_dialog_finalize (GObject *); + +G_DEFINE_TYPE (PsppireValLabsDialog, + psppire_val_labs_dialog, + PSPPIRE_TYPE_DIALOG); +enum + { + PROP_0, + PROP_VARIABLE, + PROP_VALUE_LABELS + }; + +static void +psppire_val_labs_dialog_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) { - GtkWidget *window; + PsppireValLabsDialog *obj = PSPPIRE_VAL_LABS_DIALOG (object); - /* The variable to be updated */ - struct variable *pv; + switch (prop_id) + { + case PROP_VARIABLE: + psppire_val_labs_dialog_set_variable (obj, g_value_get_pointer (value)); + break; + case PROP_VALUE_LABELS: + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} - /* Local copy of labels */ - struct val_labs *labs; +static void +psppire_val_labs_dialog_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + PsppireValLabsDialog *obj = PSPPIRE_VAL_LABS_DIALOG (object); - /* Actions */ - GtkWidget *add_button; - GtkWidget *remove_button; - GtkWidget *change_button; + switch (prop_id) + { + case PROP_VALUE_LABELS: + g_value_set_pointer (value, obj->labs); + break; + case PROP_VARIABLE: + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} - /* Entry Boxes */ - GtkWidget *value_entry; - GtkWidget *label_entry; +static void +psppire_val_labs_dialog_class_init (PsppireValLabsDialogClass *class) +{ + GObjectClass *gobject_class; + gobject_class = G_OBJECT_CLASS (class); + + gobject_class->constructor = psppire_val_labs_dialog_constructor; + gobject_class->finalize = psppire_val_labs_dialog_finalize; + gobject_class->set_property = psppire_val_labs_dialog_set_property; + gobject_class->get_property = psppire_val_labs_dialog_get_property; + + g_object_class_install_property ( + gobject_class, PROP_VARIABLE, + g_param_spec_pointer ("variable", + "Variable", + "Variable whose value labels are to be edited. The " + "variable's print format and encoding are also used " + "for editing.", + G_PARAM_WRITABLE)); + + g_object_class_install_property ( + gobject_class, PROP_VALUE_LABELS, + g_param_spec_pointer ("value-labels", + "Value Labels", + "Edited value labels.", + G_PARAM_READABLE)); +} - /* Signal handler ids */ - gint change_handler_id; - gint value_handler_id; +static void +psppire_val_labs_dialog_init (PsppireValLabsDialog *obj) +{ + /* We do all of our work on widgets in the constructor function, because that + runs after the construction properties have been set. Otherwise + PsppireDialog's "orientation" property hasn't been set and therefore we + have no box to populate. */ + obj->labs = val_labs_create (0); +} - GtkWidget *treeview; -}; +static void +psppire_val_labs_dialog_finalize (GObject *obj) +{ + PsppireValLabsDialog *dialog = PSPPIRE_VAL_LABS_DIALOG (obj); + val_labs_destroy (dialog->labs); + g_free (dialog->encoding); + + G_OBJECT_CLASS (psppire_val_labs_dialog_parent_class)->finalize (obj); +} + +PsppireValLabsDialog * +psppire_val_labs_dialog_new (const struct variable *var) +{ + return PSPPIRE_VAL_LABS_DIALOG ( + g_object_new (PSPPIRE_TYPE_VAL_LABS_DIALOG, + "orientation", PSPPIRE_HORIZONTAL, + "variable", var, + NULL)); +} + +struct val_labs * +psppire_val_labs_dialog_run (GtkWindow *parent_window, + const struct variable *var) +{ + PsppireValLabsDialog *dialog; + struct val_labs *labs; + + dialog = psppire_val_labs_dialog_new (var); + gtk_window_set_transient_for (GTK_WINDOW (dialog), parent_window); + gtk_widget_show (GTK_WIDGET (dialog)); + + labs = (psppire_dialog_run (PSPPIRE_DIALOG (dialog)) == GTK_RESPONSE_OK + ? val_labs_clone (psppire_val_labs_dialog_get_value_labels (dialog)) + : NULL); + + gtk_widget_destroy (GTK_WIDGET (dialog)); + + return labs; +} /* This callback occurs when the text in the label entry box is changed */ @@ -70,14 +174,12 @@ on_label_entry_change (GtkEntry *entry, gpointer data) { union value v; const gchar *text ; - struct val_labs_dialog *dialog = data; + PsppireValLabsDialog *dialog = data; g_assert (dialog->labs); text = gtk_entry_get_text (GTK_ENTRY (dialog->value_entry)); - text_to_value (text, - dialog->pv, - &v); + text_to_value__ (text, &dialog->format, dialog->encoding, &v); if (val_labs_find (dialog->labs, &v)) { @@ -90,7 +192,7 @@ on_label_entry_change (GtkEntry *entry, gpointer data) gtk_widget_set_sensitive (dialog->add_button, TRUE); } - value_destroy (&v, var_get_width (dialog->pv)); + value_destroy (&v, val_labs_get_width (dialog->labs)); } @@ -142,15 +244,12 @@ on_value_entry_change (GtkEntry *entry, gpointer data) { const char *s; - struct val_labs_dialog *dialog = data; + PsppireValLabsDialog *dialog = data; const gchar *text = gtk_entry_get_text (GTK_ENTRY (dialog->value_entry)); union value v; - text_to_value (text, - dialog->pv, - &v); - + text_to_value__ (text, &dialog->format, dialog->encoding, &v); g_signal_handler_block (GTK_ENTRY (dialog->label_entry), dialog->change_handler_id); @@ -174,68 +273,13 @@ on_value_entry_change (GtkEntry *entry, gpointer data) g_signal_handler_unblock (GTK_ENTRY (dialog->label_entry), dialog->change_handler_id); - value_destroy (&v, var_get_width (dialog->pv)); -} - - -/* Callback for when the Value Labels dialog is closed using - the OK button.*/ -static gint -val_labs_ok (GtkWidget *w, gpointer data) -{ - struct val_labs_dialog *dialog = data; - - var_set_value_labels (dialog->pv, dialog->labs); - - val_labs_destroy (dialog->labs); - - dialog->labs = NULL; - - gtk_widget_hide (dialog->window); - - return FALSE; -} - -/* Callback for when the Value Labels dialog is closed using - the Cancel button.*/ -static void -val_labs_cancel (struct val_labs_dialog *dialog) -{ - val_labs_destroy (dialog->labs); - - dialog->labs = NULL; - - gtk_widget_hide (dialog->window); -} - - -/* Callback for when the Value Labels dialog is closed using - the Cancel button.*/ -static void -on_cancel (GtkWidget *w, gpointer data) -{ - struct val_labs_dialog *dialog = data; - - val_labs_cancel (dialog); -} - - -/* Callback for when the Value Labels dialog is closed using - the window delete button.*/ -static gint -on_delete (GtkWidget *w, GdkEvent *e, gpointer data) -{ - struct val_labs_dialog *dialog = data; - - val_labs_cancel (dialog); - - return TRUE; + value_destroy (&v, val_labs_get_width (dialog->labs)); } /* Return the value-label pair currently selected in the dialog box */ static void -get_selected_tuple (struct val_labs_dialog *dialog, +get_selected_tuple (PsppireValLabsDialog *dialog, union value *valuep, const char **label) { GtkTreeView *treeview = GTK_TREE_VIEW (dialog->treeview); @@ -266,21 +310,19 @@ get_selected_tuple (struct val_labs_dialog *dialog, } -static void repopulate_dialog (struct val_labs_dialog *dialog); +static void repopulate_dialog (PsppireValLabsDialog *dialog); /* Callback which occurs when the "Change" button is clicked */ static void on_change (GtkWidget *w, gpointer data) { - struct val_labs_dialog *dialog = data; + PsppireValLabsDialog *dialog = data; const gchar *val_text = gtk_entry_get_text (GTK_ENTRY (dialog->value_entry)); union value v; - text_to_value (val_text, - dialog->pv, - &v); + text_to_value__ (val_text, &dialog->format, dialog->encoding, &v); val_labs_replace (dialog->labs, &v, gtk_entry_get_text (GTK_ENTRY (dialog->label_entry))); @@ -290,22 +332,20 @@ on_change (GtkWidget *w, gpointer data) repopulate_dialog (dialog); gtk_widget_grab_focus (dialog->value_entry); - value_destroy (&v, var_get_width (dialog->pv)); + value_destroy (&v, val_labs_get_width (dialog->labs)); } /* Callback which occurs when the "Add" button is clicked */ static void on_add (GtkWidget *w, gpointer data) { - struct val_labs_dialog *dialog = data; + PsppireValLabsDialog *dialog = data; union value v; const gchar *text = gtk_entry_get_text (GTK_ENTRY (dialog->value_entry)); - text_to_value (text, - dialog->pv, - &v); + text_to_value__ (text, &dialog->format, dialog->encoding, &v); if (val_labs_add (dialog->labs, &v, gtk_entry_get_text @@ -317,14 +357,14 @@ on_add (GtkWidget *w, gpointer data) gtk_widget_grab_focus (dialog->value_entry); } - value_destroy (&v, var_get_width (dialog->pv)); + value_destroy (&v, val_labs_get_width (dialog->labs)); } /* Callback which occurs when the "Remove" button is clicked */ static void on_remove (GtkWidget *w, gpointer data) { - struct val_labs_dialog *dialog = data; + PsppireValLabsDialog *dialog = data; union value value; struct val_lab *vl; @@ -347,7 +387,7 @@ on_remove (GtkWidget *w, gpointer data) static void on_select_row (GtkTreeView *treeview, gpointer data) { - struct val_labs_dialog *dialog = data; + PsppireValLabsDialog *dialog = data; union value value; const char *label = NULL; @@ -355,7 +395,7 @@ on_select_row (GtkTreeView *treeview, gpointer data) gchar *text; get_selected_tuple (dialog, &value, &label); - text = value_to_text (value, dialog->pv); + text = value_to_text__ (value, &dialog->format, dialog->encoding); g_signal_handler_block (GTK_ENTRY (dialog->value_entry), dialog->value_handler_id); @@ -383,24 +423,32 @@ on_select_row (GtkTreeView *treeview, gpointer data) /* Create a new dialog box (there should normally be only one)*/ -struct val_labs_dialog * -val_labs_dialog_create (GtkWindow *toplevel) +static GObject * +psppire_val_labs_dialog_constructor (GType type, + guint n_properties, + GObjectConstructParam *properties) { + PsppireValLabsDialog *dialog; GtkTreeViewColumn *column; GtkCellRenderer *renderer ; - GtkBuilder *xml = builder_new ("var-sheet-dialogs.ui"); + GtkBuilder *xml = builder_new ("val-labs-dialog.ui"); + + GtkContainer *content_area; + GObject *obj; + + obj = G_OBJECT_CLASS (psppire_val_labs_dialog_parent_class)->constructor ( + type, n_properties, properties); + dialog = PSPPIRE_VAL_LABS_DIALOG (obj); - struct val_labs_dialog *dialog = g_malloc (sizeof (*dialog)); + content_area = GTK_CONTAINER (PSPPIRE_DIALOG (dialog)->box); + gtk_container_add (GTK_CONTAINER (content_area), + get_widget_assert (xml, "val-labs-dialog")); - dialog->window = get_widget_assert (xml,"val_labs_dialog"); dialog->value_entry = get_widget_assert (xml,"value_entry"); dialog->label_entry = get_widget_assert (xml,"label_entry"); - gtk_window_set_transient_for - (GTK_WINDOW (dialog->window), toplevel); - dialog->add_button = get_widget_assert (xml, "val_labs_add"); dialog->remove_button = get_widget_assert (xml, "val_labs_remove"); dialog->change_button = get_widget_assert (xml, "val_labs_change"); @@ -419,17 +467,6 @@ val_labs_dialog_create (GtkWindow *toplevel) gtk_tree_view_append_column (GTK_TREE_VIEW (dialog->treeview), column); - g_signal_connect (get_widget_assert (xml, "val_labs_cancel"), - "clicked", - G_CALLBACK (on_cancel), dialog); - - g_signal_connect (dialog->window, "delete-event", - G_CALLBACK (on_delete), dialog); - - g_signal_connect (get_widget_assert (xml, "val_labs_ok"), - "clicked", - G_CALLBACK (val_labs_ok), dialog); - dialog->change_handler_id = g_signal_connect (dialog->label_entry, "changed", @@ -458,23 +495,14 @@ val_labs_dialog_create (GtkWindow *toplevel) g_object_unref (xml); - return dialog; + return obj; } -void -val_labs_dialog_set_target_variable (struct val_labs_dialog *dialog, - struct variable *var) -{ - dialog->pv = var; -} - - - /* Populate the components of the dialog box, from the 'labs' member variable */ static void -repopulate_dialog (struct val_labs_dialog *dialog) +repopulate_dialog (PsppireValLabsDialog *dialog) { const struct val_lab **labels; size_t n_labels; @@ -506,7 +534,7 @@ repopulate_dialog (struct val_labs_dialog *dialog) const struct val_lab *vl = labels[i]; gchar *const vstr = - value_to_text (vl->value, dialog->pv); + value_to_text__ (vl->value, &dialog->format, dialog->encoding); gchar *const text = g_strdup_printf (_("%s = `%s'"), vstr, val_lab_get_escaped_label (vl)); @@ -529,28 +557,33 @@ repopulate_dialog (struct val_labs_dialog *dialog) } -/* Initialise and display the dialog box */ void -val_labs_dialog_show (struct val_labs_dialog *dialog) +psppire_val_labs_dialog_set_variable (PsppireValLabsDialog *dialog, + const struct variable *var) { - const struct val_labs *value_labels; - - g_assert (!dialog->labs); + val_labs_destroy (dialog->labs); + dialog->labs = NULL; - value_labels = var_get_value_labels (dialog->pv); + g_free (dialog->encoding); + dialog->encoding = NULL; - if (value_labels) - dialog->labs = val_labs_clone ( value_labels ); + if (var != NULL) + { + dialog->labs = val_labs_clone (var_get_value_labels (var)); + dialog->encoding = g_strdup (var_get_encoding (var)); + dialog->format = *var_get_print_format (var); + } else - dialog->labs = val_labs_create ( var_get_width (dialog->pv)); + dialog->format = F_8_0; - gtk_widget_set_sensitive (dialog->remove_button, FALSE); - gtk_widget_set_sensitive (dialog->change_button, FALSE); - gtk_widget_set_sensitive (dialog->add_button, FALSE); - - gtk_widget_grab_focus (dialog->value_entry); + if (dialog->labs == NULL) + dialog->labs = val_labs_create (var_get_width (var)); repopulate_dialog (dialog); - gtk_widget_show (dialog->window); } +const struct val_labs * +psppire_val_labs_dialog_get_value_labels (const PsppireValLabsDialog *dialog) +{ + return dialog->labs; +} diff --git a/src/ui/gui/val-labs-dialog.h b/src/ui/gui/val-labs-dialog.h index 85feaaca78..f3facce054 100644 --- a/src/ui/gui/val-labs-dialog.h +++ b/src/ui/gui/val-labs-dialog.h @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2005, 2011 Free Software Foundation + Copyright (C) 2005, 2011, 2012 Free Software Foundation This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -14,8 +14,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef __PSPPIRE_VAL_LABS_DIALOG_H -#define __PSPPIRE_VAL_LABS_DIALOG_H +#ifndef PSPPIRE_VAL_LABS_DIALOG_H +#define PSPPIRE_VAL_LABS_DIALOG_H /* This module describes the behaviour of the Value Labels dialog box, @@ -23,18 +23,63 @@ #include -#include -//#include -#include "psppire-var-store.h" +#include "data/format.h" +#include "data/variable.h" +#include "ui/gui/psppire-dialog.h" +#include "ui/gui/psppire-var-store.h" -struct val_labs; +G_BEGIN_DECLS +#define PSPPIRE_TYPE_VAL_LABS_DIALOG (psppire_val_labs_dialog_get_type()) +#define PSPPIRE_VAL_LABS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),PSPPIRE_TYPE_VAL_LABS_DIALOG,PsppireValLabsDialog)) +#define PSPPIRE_VAL_LABS_DIALOG_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class),PSPPIRE_TYPE_VAL_LABS_DIALOG,PsppireValLabsDialogClass)) +#define PSPPIRE_IS_VAL_LABS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),PSPPIRE_TYPE_VAL_LABS_DIALOG)) +#define PSPPIRE_IS_VAL_LABS_DIALOG_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class),PSPPIRE_TYPE_VAL_LABS_DIALOG)) +#define PSPPIRE_VAL_LABS_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),PSPPIRE_TYPE_VAL_LABS_DIALOG,PsppireValLabsDialogClass)) -struct val_labs_dialog * val_labs_dialog_create (GtkWindow *); +typedef struct _PsppireValLabsDialog PsppireValLabsDialog; +typedef struct _PsppireValLabsDialogClass PsppireValLabsDialogClass; -void val_labs_dialog_show (struct val_labs_dialog *); +struct _PsppireValLabsDialog { + PsppireDialog parent; -void val_labs_dialog_set_target_variable (struct val_labs_dialog *, - struct variable *); + GtkWidget *window; -#endif + struct val_labs *labs; + gchar *encoding; + struct fmt_spec format; + + /* Actions */ + GtkWidget *add_button; + GtkWidget *remove_button; + GtkWidget *change_button; + + /* Entry Boxes */ + GtkWidget *value_entry; + GtkWidget *label_entry; + + /* Signal handler ids */ + gint change_handler_id; + gint value_handler_id; + + GtkWidget *treeview; +}; + +struct _PsppireValLabsDialogClass { + PsppireDialogClass parent_class; +}; + +GType psppire_val_labs_dialog_get_type (void) G_GNUC_CONST; +PsppireValLabsDialog* psppire_val_labs_dialog_new (const struct variable *); + +void psppire_val_labs_dialog_set_variable (PsppireValLabsDialog *, + const struct variable *); +const struct val_labs *psppire_val_labs_dialog_get_value_labels ( + const PsppireValLabsDialog *); + +struct val_labs *psppire_val_labs_dialog_run (GtkWindow *parent_window, + const struct variable *); + +G_END_DECLS + +#endif /* psppire-val-labs-dialog.h */ diff --git a/src/ui/gui/val-labs-dialog.ui b/src/ui/gui/val-labs-dialog.ui new file mode 100644 index 0000000000..d75abc54a7 --- /dev/null +++ b/src/ui/gui/val-labs-dialog.ui @@ -0,0 +1,215 @@ + + + + + + True + 5 + + + True + 0 + + + True + 8 + 12 + + + True + 2 + 2 + 5 + + + True + True + automatic + automatic + etched-in + + + True + True + False + False + + + + + 1 + 2 + 1 + 2 + GTK_FILL + + + + + True + 5 + 2 + 2 + 5 + 4 + + + True + + + 85 + True + True + + + False + False + 1 + 0 + + + + + 1 + 2 + GTK_FILL + GTK_FILL + + + + + True + True + + + 1 + 2 + 1 + 2 + + + + + + True + 0 + Value Label: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Value: + + + GTK_FILL + + + + + + 2 + GTK_FILL + + + + + + True + 5 + vertical + + + gtk-add + True + False + True + True + False + True + + + False + False + 0 + + + + + gtk-apply + True + False + True + True + False + True + + + False + False + 1 + + + + + gtk-remove + True + False + True + True + False + True + + + False + False + 2 + + + + + 1 + 2 + GTK_FILL + + + + + + + + + True + Value Labels + True + + + + + 10 + 0 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_OK_MASK | PSPPIRE_BUTTON_HELP_MASK + + + False + False + end + 1 + + + + diff --git a/src/ui/gui/var-sheet-dialogs.ui b/src/ui/gui/var-sheet-dialogs.ui index cfba0b53bc..eb0c124668 100644 --- a/src/ui/gui/var-sheet-dialogs.ui +++ b/src/ui/gui/var-sheet-dialogs.ui @@ -2,271 +2,6 @@ - - Value Labels - True - dialog - True - True - - - True - 5 - - - True - 0 - - - True - 8 - 12 - - - True - 2 - 2 - 5 - - - True - True - automatic - automatic - etched-in - - - True - True - False - False - - - - - 1 - 2 - 1 - 2 - GTK_FILL - - - - - True - 5 - 2 - 2 - 5 - 4 - - - True - - - 85 - True - True - - - False - False - 1 - 0 - - - - - 1 - 2 - GTK_FILL - GTK_FILL - - - - - True - True - - - 1 - 2 - 1 - 2 - - - - - - True - 0 - Value Label: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Value: - - - GTK_FILL - - - - - - 2 - GTK_FILL - - - - - - True - 5 - vertical - - - gtk-add - True - False - True - True - False - True - - - False - False - 0 - - - - - gtk-apply - True - False - True - True - False - True - - - False - False - 1 - - - - - gtk-remove - True - False - True - True - False - True - - - False - False - 2 - - - - - 1 - 2 - GTK_FILL - - - - - - - - - True - Value Labels - True - - - - - 10 - 0 - - - - - True - 5 - vertical - 5 - start - - - gtk-ok - True - True - True - False - True - - - False - False - 0 - - - - - gtk-cancel - True - True - True - False - True - - - False - False - 1 - - - - - gtk-help - True - True - True - False - True - - - False - False - 2 - - - - - False - False - end - 1 - - - - - 12 Missing Values -- 2.30.2