From 58c762effe6bbe1ee418b57a1f461bbd33173bd2 Mon Sep 17 00:00:00 2001 From: Friedrich Beckmann Date: Fri, 22 May 2015 09:44:19 +0200 Subject: [PATCH] repair glade; switched to gladeui-2.0; removed the internal-child in psppire-dialog. --- README.Git | 20 +++ configure.ac | 2 +- glade/acr.c | 75 --------- glade/automake.mk | 50 +++--- glade/bbox.c | 77 ---------- glade/dialog.c | 105 ------------- glade/dictview.c | 82 ---------- ...acr.png => widget-psppire-psppire-acr.png} | Bin ....png => widget-psppire-psppire-dialog.png} | Bin ... => widget-psppire-psppire-hbuttonbox.png} | Bin ....png => widget-psppire-psppire-keypad.png} | Bin ...ng => widget-psppire-psppire-selector.png} | Bin ... => widget-psppire-psppire-vbuttonbox.png} | Bin ...acr.png => widget-psppire-psppire-acr.png} | Bin ....png => widget-psppire-psppire-dialog.png} | Bin ... => widget-psppire-psppire-hbuttonbox.png} | Bin ....png => widget-psppire-psppire-keypad.png} | Bin ...ng => widget-psppire-psppire-selector.png} | Bin ... => widget-psppire-psppire-vbuttonbox.png} | Bin glade/psppire.xml | 100 ++++++------ glade/selector.c | 75 --------- glade/var-view.c | 83 ---------- src/ui/gui/aggregate.ui | 3 +- src/ui/gui/autorecode.ui | 2 +- src/ui/gui/binomial.ui | 2 +- src/ui/gui/chi-square.ui | 2 +- src/ui/gui/compute.ui | 4 +- src/ui/gui/correlation.ui | 2 +- src/ui/gui/count.ui | 5 +- src/ui/gui/crosstabs.ui | 8 +- src/ui/gui/descriptives.ui | 2 +- src/ui/gui/entry-dialog.ui | 3 +- src/ui/gui/examine.ui | 7 +- src/ui/gui/factor.ui | 7 +- src/ui/gui/find.ui | 2 +- src/ui/gui/frequencies.ui | 6 +- src/ui/gui/goto-case.ui | 3 +- src/ui/gui/indep-samples.ui | 4 +- src/ui/gui/k-means.ui | 3 +- src/ui/gui/k-related.ui | 3 +- src/ui/gui/ks-one-sample.ui | 2 +- src/ui/gui/logistic.ui | 4 +- src/ui/gui/means.ui | 2 +- src/ui/gui/missing-val-dialog.c | 2 +- src/ui/gui/oneway.ui | 4 +- src/ui/gui/paired-samples.ui | 2 +- src/ui/gui/psppire-dialog.c | 144 +----------------- src/ui/gui/psppire-dialog.h | 11 -- src/ui/gui/psppire.ui | 7 +- src/ui/gui/rank.ui | 6 +- src/ui/gui/recode.ui | 5 +- src/ui/gui/regression.ui | 6 +- src/ui/gui/reliability.ui | 2 +- src/ui/gui/roc.ui | 2 +- src/ui/gui/runs.ui | 3 +- src/ui/gui/select-cases.ui | 9 +- src/ui/gui/sort.ui | 2 +- src/ui/gui/split-file.ui | 2 +- src/ui/gui/t-test.ui | 5 +- src/ui/gui/univariate.ui | 6 +- src/ui/gui/val-labs-dialog.c | 2 +- src/ui/gui/var-type-dialog.c | 2 +- src/ui/gui/variable-info.ui | 2 +- 63 files changed, 160 insertions(+), 809 deletions(-) delete mode 100644 glade/acr.c delete mode 100644 glade/bbox.c delete mode 100644 glade/dialog.c delete mode 100644 glade/dictview.c rename glade/icons/16x16/{psppire-acr.png => widget-psppire-psppire-acr.png} (100%) rename glade/icons/16x16/{psppire-dialog.png => widget-psppire-psppire-dialog.png} (100%) rename glade/icons/16x16/{psppire-hbuttonbox.png => widget-psppire-psppire-hbuttonbox.png} (100%) rename glade/icons/16x16/{psppire-keypad.png => widget-psppire-psppire-keypad.png} (100%) rename glade/icons/16x16/{psppire-selector.png => widget-psppire-psppire-selector.png} (100%) rename glade/icons/16x16/{psppire-vbuttonbox.png => widget-psppire-psppire-vbuttonbox.png} (100%) rename glade/icons/22x22/{psppire-acr.png => widget-psppire-psppire-acr.png} (100%) rename glade/icons/22x22/{psppire-dialog.png => widget-psppire-psppire-dialog.png} (100%) rename glade/icons/22x22/{psppire-hbuttonbox.png => widget-psppire-psppire-hbuttonbox.png} (100%) rename glade/icons/22x22/{psppire-keypad.png => widget-psppire-psppire-keypad.png} (100%) rename glade/icons/22x22/{psppire-selector.png => widget-psppire-psppire-selector.png} (100%) rename glade/icons/22x22/{psppire-vbuttonbox.png => widget-psppire-psppire-vbuttonbox.png} (100%) delete mode 100644 glade/selector.c delete mode 100644 glade/var-view.c diff --git a/README.Git b/README.Git index b9ed2222fc..4a7f7496f0 100644 --- a/README.Git +++ b/README.Git @@ -79,3 +79,23 @@ Once PSPP is built, you may run its self-tests with: make check or for a more thorough test: make distcheck + +Glade UI Design +--------------- + +The ui files in src/ui/gui may be viewed (maybe changed) with Glade. For this +you need + + * libgladeui 2.0 or later + +Then you need to run + + configure --with-gui-tools + make + make install + +psppire uses some self defined widgets. To use glade these widgets have +to be announced to glade such that you can view the interface. +The install process will install the psppire glade library, icons and +psppire.xml files in the appropiate system locations. You cannot override +this with --prefix. After that you can run "glade" and open the ui files. diff --git a/configure.ac b/configure.ac index cc1dbba063..1e6edf6d69 100644 --- a/configure.ac +++ b/configure.ac @@ -222,7 +222,7 @@ AC_ARG_WITH( gui_tools, [AS_HELP_STRING([--with-gui-tools], [build the gui developer tools. For DEVELOPERS only! There is no reason why users will need this flag.])]) if test x"$with_gui_tools" = x"yes" ; then - PKG_CHECK_MODULES(GLADE_UI, gladeui-1.0) + PKG_CHECK_MODULES(GLADE_UI, gladeui-2.0) fi AM_CONDITIONAL(WITH_GUI_TOOLS, test x"$with_gui_tools" = x"yes") diff --git a/glade/acr.c b/glade/acr.c deleted file mode 100644 index c6ee0ef639..0000000000 --- a/glade/acr.c +++ /dev/null @@ -1,75 +0,0 @@ -#include -#include -#include - -#include "psppire-acr.h" - -#include - - -void -glade_psppire_acr_post_create (GladeWidgetAdaptor *adaptor, - GObject *object, - GladeCreateReason reason) -{ - GladeWidget *widget ; - - PsppireAcr *acr = PSPPIRE_ACR (object); - - g_return_if_fail (PSPPIRE_IS_ACR (acr)); - - widget = glade_widget_get_from_gobject (GTK_WIDGET (acr)); - if (!widget) - return; - - if (reason == GLADE_CREATE_USER) - { - /* HIG complient border-width defaults on acrs */ - glade_widget_property_set (widget, "border-width", 5); - } -} - - -GtkWidget * -glade_psppire_acr_get_internal_child (GladeWidgetAdaptor *adaptor, - PsppireAcr *acr, - const gchar *name) -{ -#if DEBUGGING - g_print ("%s\n", __FUNCTION__); -#endif - return GTK_WIDGET (acr); -} - - - -void -glade_psppire_acr_set_property (GladeWidgetAdaptor *adaptor, - GObject *object, - const gchar *id, - const GValue *value) -{ -#if DEBUGGING - g_print ("%s(%p) Type=\"%s\" Id=\"%s\"\n", __FUNCTION__, object, - G_OBJECT_TYPE_NAME( object ), - id); -#endif - - GWA_GET_CLASS (GTK_TYPE_WINDOW)->set_property (adaptor, object, - id, value); -} - - - -GList * -glade_psppire_acr_get_children (GladeWidgetAdaptor *adaptor, - PsppireAcr *acr) -{ - GList *list = NULL; - - g_return_val_if_fail (PSPPIRE_IS_ACR (acr), NULL); - - list = glade_util_container_get_all_children (GTK_CONTAINER (acr)); - - return list; -} diff --git a/glade/automake.mk b/glade/automake.mk index d1077817d5..4bb87f1ab6 100644 --- a/glade/automake.mk +++ b/glade/automake.mk @@ -2,21 +2,22 @@ module_LTLIBRARIES = libglade-psppire.la -moduledir = `pkg-config --variable=moduledir gladeui-1.0` -catalogdir = `pkg-config --variable=catalogdir gladeui-1.0` -pixmapdir = `pkg-config --variable=pixmapdir gladeui-1.0` +moduledir = `pkg-config --variable=moduledir gladeui-2.0` +catalogdir = `pkg-config --variable=catalogdir gladeui-2.0` +pixmapdir = `pkg-config --variable=pixmapdir gladeui-2.0` -small_pixmapdir = $(pixmapdir)/16x16 -large_pixmapdir = $(pixmapdir)/22x22 +small_pixmapdir = $(pixmapdir)/hicolor/16x16/actions +large_pixmapdir = $(pixmapdir)/hicolor/22x22/actions + +# format.c for psppire-value-entry.c libglade_psppire_la_SOURCES = \ - glade/dialog.c \ - glade/bbox.c \ - glade/selector.c \ - glade/acr.c \ - glade/dictview.c \ - glade/var-view.c \ src/ui/gui/helper.c \ + src/ui/gui/dialog-common.c \ + src/ui/gui/psppire-var-ptr.c \ + src/data/format.c \ + src/ui/gui/psppire-format.c \ + src/data/value-labels.c \ src/ui/gui/psppire-conf.c \ src/ui/gui/psppire-acr.c \ src/ui/gui/psppire-buttonbox.c \ @@ -28,26 +29,29 @@ libglade_psppire_la_SOURCES = \ src/ui/gui/psppire-selector.c \ src/ui/gui/psppire-select-dest.c \ src/ui/gui/psppire-var-view.c \ + src/ui/gui/psppire-checkbox-treeview.c \ + src/ui/gui/psppire-val-chooser.c \ + src/ui/gui/psppire-value-entry.c \ src/ui/gui/psppire-window-base.c dist_catalog_DATA = \ glade/psppire.xml dist_small_pixmap_DATA = \ - glade/icons/16x16/psppire-acr.png \ - glade/icons/16x16/psppire-hbuttonbox.png \ - glade/icons/16x16/psppire-vbuttonbox.png \ - glade/icons/16x16/psppire-dialog.png \ - glade/icons/16x16/psppire-keypad.png \ - glade/icons/16x16/psppire-selector.png + glade/icons/16x16/widget-psppire-psppire-acr.png \ + glade/icons/16x16/widget-psppire-psppire-hbuttonbox.png \ + glade/icons/16x16/widget-psppire-psppire-vbuttonbox.png \ + glade/icons/16x16/widget-psppire-psppire-dialog.png \ + glade/icons/16x16/widget-psppire-psppire-keypad.png \ + glade/icons/16x16/widget-psppire-psppire-selector.png dist_large_pixmap_DATA = \ - glade/icons/22x22/psppire-acr.png \ - glade/icons/22x22/psppire-hbuttonbox.png \ - glade/icons/22x22/psppire-vbuttonbox.png \ - glade/icons/22x22/psppire-dialog.png \ - glade/icons/22x22/psppire-keypad.png \ - glade/icons/22x22/psppire-selector.png + glade/icons/22x22/widget-psppire-psppire-acr.png \ + glade/icons/22x22/widget-psppire-psppire-hbuttonbox.png \ + glade/icons/22x22/widget-psppire-psppire-vbuttonbox.png \ + glade/icons/22x22/widget-psppire-psppire-dialog.png \ + glade/icons/22x22/widget-psppire-psppire-keypad.png \ + glade/icons/22x22/widget-psppire-psppire-selector.png libglade_psppire_la_CFLAGS = $(GLADE_UI_CFLAGS) $(GLADE_CFLAGS) \ diff --git a/glade/bbox.c b/glade/bbox.c deleted file mode 100644 index 2e675c41b2..0000000000 --- a/glade/bbox.c +++ /dev/null @@ -1,77 +0,0 @@ -#include -#include -#include - -#include "psppire-buttonbox.h" - -void -glade_psppire_button_box_post_create (GladeWidgetAdaptor *adaptor, - GObject *object, - GladeCreateReason reason) -{ - GladeWidget *box_widget; - - PsppireButtonBox *bbox = PSPPIRE_BUTTONBOX (object); - - g_return_if_fail (PSPPIRE_IS_BUTTONBOX (bbox)); - - box_widget = glade_widget_get_from_gobject (GTK_WIDGET (bbox)); - if (!box_widget) - return; - - - if (reason == GLADE_CREATE_USER) - { - /* HIG complient border-width defaults on dialogs */ - glade_widget_property_set (box_widget, "border-width", 5); - } - -} - - -GtkWidget * -glade_psppire_button_box_get_internal_child (GladeWidgetAdaptor *adaptor, - PsppireButtonBox *bbox, - const gchar *name) -{ -#if DEBUGGING - g_print ("%s\n", __FUNCTION__); -#endif - - return GTK_WIDGET (bbox); -} - - - - -void -glade_psppire_button_box_set_property (GladeWidgetAdaptor *adaptor, - GObject *object, - const gchar *id, - const GValue *value) -{ -#if DEBUGGING - g_print ("%s(%p) Type=\"%s\" Id=\"%s\"\n", __FUNCTION__, object, - G_OBJECT_TYPE_NAME( object ), - id); -#endif - - GWA_GET_CLASS (GTK_TYPE_WINDOW)->set_property (adaptor, object, - id, value); -} - - - - -GList * -glade_psppire_button_box_get_children (GladeWidgetAdaptor *adaptor, - PsppireButtonBox *bbox) -{ - GList *list = NULL; - - g_return_val_if_fail (PSPPIRE_IS_BUTTONBOX (bbox), NULL); - - list = glade_util_container_get_all_children (GTK_CONTAINER (bbox)); - - return list; -} diff --git a/glade/dialog.c b/glade/dialog.c deleted file mode 100644 index 7b13226e01..0000000000 --- a/glade/dialog.c +++ /dev/null @@ -1,105 +0,0 @@ -#include -#include -#include - -#include "psppire-dialog.h" -#include -#include -#include - - -void -glade_psppire_dialog_post_create (GladeWidgetAdaptor *adaptor, - GObject *object, - GladeCreateReason reason) -{ - GladeWidget *widget ; - - GladeWidget *box_widget; - - PsppireDialog *dialog = PSPPIRE_DIALOG (object); - - g_return_if_fail (PSPPIRE_IS_DIALOG (dialog)); - - widget = glade_widget_get_from_gobject (GTK_WIDGET (dialog)); - if (!widget) - return; - - - if (reason == GLADE_CREATE_USER) - { - /* HIG compliant border-width defaults on dialogs */ - glade_widget_property_set (widget, "border-width", 5); - } - - box_widget = glade_widget_adaptor_create_internal - (widget, G_OBJECT(dialog->box), - "hbox", "dialog", FALSE, reason); - - /* These properties are controlled by the GtkDialog style properties: - * "content-area-border", "button-spacing" and "action-area-border", - * so we must disable their use. - */ - glade_widget_remove_property (box_widget, "border-width"); - - /* Only set these on the original create. */ - if (reason == GLADE_CREATE_USER) - { - - /* HIG compliant spacing defaults on dialogs */ - glade_widget_property_set (box_widget, "spacing", 2); - - glade_widget_property_set (box_widget, "size", 2); - - } -} - - -GtkWidget * -glade_psppire_dialog_get_internal_child (GladeWidgetAdaptor *adaptor, - PsppireDialog *dialog, - const gchar *name) -{ -#if DEBUGGING - g_print ("%s\n", __FUNCTION__); -#endif - - g_assert (0 == strcmp (name, "hbox")); - - return dialog->box; -} - - - -void -glade_psppire_dialog_set_property (GladeWidgetAdaptor *adaptor, - GObject *object, - const gchar *id, - const GValue *value) -{ -#if DEBUGGING - g_print ("%s(%p) Type=\"%s\" Id=\"%s\"\n", __FUNCTION__, object, - G_OBJECT_TYPE_NAME( object ), - id); -#endif - - assert ( GWA_GET_CLASS (GTK_TYPE_WINDOW)->set_property ); - - GWA_GET_CLASS (GTK_TYPE_WINDOW)->set_property (adaptor, object, - id, value); -} - - - -GList * -glade_psppire_dialog_get_children (GladeWidgetAdaptor *adaptor, - PsppireDialog *dialog) -{ - GList *list = NULL; - - g_return_val_if_fail (PSPPIRE_IS_DIALOG (dialog), NULL); - - list = glade_util_container_get_all_children (GTK_CONTAINER (dialog)); - - return list; -} diff --git a/glade/dictview.c b/glade/dictview.c deleted file mode 100644 index 5d23b06d1f..0000000000 --- a/glade/dictview.c +++ /dev/null @@ -1,82 +0,0 @@ -#include - -#include -#include -#include "psppire-dictview.h" - -#include - - -GType -psppire_dict_get_type () -{ - return 0; -} - - - -void -glade_psppire_dictview_post_create (GladeWidgetAdaptor *adaptor, - GObject *object, - GladeCreateReason reason) -{ - GladeWidget *widget ; - - PsppireDictView *dictview = PSPPIRE_DICT_VIEW (object); - - g_return_if_fail (PSPPIRE_IS_DICT_VIEW (dictview)); - - widget = glade_widget_get_from_gobject (GTK_WIDGET (dictview)); - if (!widget) - return; - - if (reason == GLADE_CREATE_USER) - { - /* HIG complient border-width defaults on dictviews */ - glade_widget_property_set (widget, "border-width", 5); - } -} - - -GtkWidget * -glade_psppire_dictview_get_internal_child (GladeWidgetAdaptor *adaptor, - PsppireDictView *dictview, - const gchar *name) -{ -#if DEBUGGING - g_print ("%s\n", __FUNCTION__); -#endif - return GTK_WIDGET (dictview); -} - - - -void -glade_psppire_dictview_set_property (GladeWidgetAdaptor *adaptor, - GObject *object, - const gchar *id, - const GValue *value) -{ -#if DEBUGGING - g_print ("%s(%p) Type=\"%s\" Id=\"%s\"\n", __FUNCTION__, object, - G_OBJECT_TYPE_NAME( object ), - id); -#endif - - GWA_GET_CLASS (GTK_TYPE_WINDOW)->set_property (adaptor, object, - id, value); -} - - -GList * -glade_psppire_dictview_get_children (GladeWidgetAdaptor *adaptor, - PsppireDictView *dv) -{ - GList *list = NULL; - - g_return_val_if_fail (PSPPIRE_IS_DICT_VIEW (dv), NULL); - - list = glade_util_container_get_all_children (GTK_CONTAINER (dv)); - - return list; -} diff --git a/glade/icons/16x16/psppire-acr.png b/glade/icons/16x16/widget-psppire-psppire-acr.png similarity index 100% rename from glade/icons/16x16/psppire-acr.png rename to glade/icons/16x16/widget-psppire-psppire-acr.png diff --git a/glade/icons/16x16/psppire-dialog.png b/glade/icons/16x16/widget-psppire-psppire-dialog.png similarity index 100% rename from glade/icons/16x16/psppire-dialog.png rename to glade/icons/16x16/widget-psppire-psppire-dialog.png diff --git a/glade/icons/16x16/psppire-hbuttonbox.png b/glade/icons/16x16/widget-psppire-psppire-hbuttonbox.png similarity index 100% rename from glade/icons/16x16/psppire-hbuttonbox.png rename to glade/icons/16x16/widget-psppire-psppire-hbuttonbox.png diff --git a/glade/icons/16x16/psppire-keypad.png b/glade/icons/16x16/widget-psppire-psppire-keypad.png similarity index 100% rename from glade/icons/16x16/psppire-keypad.png rename to glade/icons/16x16/widget-psppire-psppire-keypad.png diff --git a/glade/icons/16x16/psppire-selector.png b/glade/icons/16x16/widget-psppire-psppire-selector.png similarity index 100% rename from glade/icons/16x16/psppire-selector.png rename to glade/icons/16x16/widget-psppire-psppire-selector.png diff --git a/glade/icons/16x16/psppire-vbuttonbox.png b/glade/icons/16x16/widget-psppire-psppire-vbuttonbox.png similarity index 100% rename from glade/icons/16x16/psppire-vbuttonbox.png rename to glade/icons/16x16/widget-psppire-psppire-vbuttonbox.png diff --git a/glade/icons/22x22/psppire-acr.png b/glade/icons/22x22/widget-psppire-psppire-acr.png similarity index 100% rename from glade/icons/22x22/psppire-acr.png rename to glade/icons/22x22/widget-psppire-psppire-acr.png diff --git a/glade/icons/22x22/psppire-dialog.png b/glade/icons/22x22/widget-psppire-psppire-dialog.png similarity index 100% rename from glade/icons/22x22/psppire-dialog.png rename to glade/icons/22x22/widget-psppire-psppire-dialog.png diff --git a/glade/icons/22x22/psppire-hbuttonbox.png b/glade/icons/22x22/widget-psppire-psppire-hbuttonbox.png similarity index 100% rename from glade/icons/22x22/psppire-hbuttonbox.png rename to glade/icons/22x22/widget-psppire-psppire-hbuttonbox.png diff --git a/glade/icons/22x22/psppire-keypad.png b/glade/icons/22x22/widget-psppire-psppire-keypad.png similarity index 100% rename from glade/icons/22x22/psppire-keypad.png rename to glade/icons/22x22/widget-psppire-psppire-keypad.png diff --git a/glade/icons/22x22/psppire-selector.png b/glade/icons/22x22/widget-psppire-psppire-selector.png similarity index 100% rename from glade/icons/22x22/psppire-selector.png rename to glade/icons/22x22/widget-psppire-psppire-selector.png diff --git a/glade/icons/22x22/psppire-vbuttonbox.png b/glade/icons/22x22/widget-psppire-psppire-vbuttonbox.png similarity index 100% rename from glade/icons/22x22/psppire-vbuttonbox.png rename to glade/icons/22x22/widget-psppire-psppire-vbuttonbox.png diff --git a/glade/psppire.xml b/glade/psppire.xml index db8956b70a..a02d5fbc2b 100644 --- a/glade/psppire.xml +++ b/glade/psppire.xml @@ -10,12 +10,6 @@ default-height="260" title="Dialog Box"> - glade_psppire_dialog_post_create - glade_psppire_dialog_get_internal_child - - glade_psppire_dialog_get_children - - @@ -47,7 +41,6 @@ - @@ -57,15 +50,10 @@ - glade_psppire_button_box_post_create - glade_psppire_button_box_get_children - - glade_psppire_button_box_get_internal_child - - + @@ -90,18 +78,12 @@ - glade_psppire_button_box_post_create - glade_psppire_button_box_get_children - - glade_psppire_button_box_get_internal_child - - + - @@ -112,15 +94,12 @@ - - - @@ -140,12 +119,6 @@ - glade_psppire_selector_post_create - glade_psppire_selector_get_children - - glade_psppire_selector_get_internal_child - - @@ -159,7 +132,7 @@ - + - - - glade_psppire_acr_post_create - glade_psppire_acr_get_children - - glade_psppire_acr_get_internal_child - - + - - - glade_psppire_dictview_post_create - glade_psppire_dictview_get_children - glade_psppire_dictview_get_internal_child - + + - - - glade_psppire_var_view_post_create - glade_psppire_var_view_get_children - glade_psppire_var_view_get_internal_child - + @@ -231,15 +192,44 @@ - + + + + + + + + - + + + + + + + - + + + + + + + + + @@ -250,7 +240,9 @@ + + + - diff --git a/glade/selector.c b/glade/selector.c deleted file mode 100644 index 6b2e4d7938..0000000000 --- a/glade/selector.c +++ /dev/null @@ -1,75 +0,0 @@ -#include -#include -#include - -#include "psppire-selector.h" - -#include - - -void -glade_psppire_selector_post_create (GladeWidgetAdaptor *adaptor, - GObject *object, - GladeCreateReason reason) -{ - GladeWidget *widget ; - - PsppireSelector *selector = PSPPIRE_SELECTOR (object); - - g_return_if_fail (PSPPIRE_IS_SELECTOR (selector)); - - widget = glade_widget_get_from_gobject (GTK_WIDGET (selector)); - if (!widget) - return; - - if (reason == GLADE_CREATE_USER) - { - /* HIG complient border-width defaults on selectors */ - glade_widget_property_set (widget, "border-width", 5); - } -} - - -GtkWidget * -glade_psppire_selector_get_internal_child (GladeWidgetAdaptor *adaptor, - PsppireSelector *selector, - const gchar *name) -{ -#if DEBUGGING - g_print ("%s\n", __FUNCTION__); -#endif - return GTK_WIDGET (selector); -} - - - -void -glade_psppire_selector_set_property (GladeWidgetAdaptor *adaptor, - GObject *object, - const gchar *id, - const GValue *value) -{ -#if DEBUGGING - g_print ("%s(%p) Type=\"%s\" Id=\"%s\"\n", __FUNCTION__, object, - G_OBJECT_TYPE_NAME( object ), - id); -#endif - - GWA_GET_CLASS (GTK_TYPE_WINDOW)->set_property (adaptor, object, - id, value); -} - - - -GList * -glade_psppire_selector_get_children (GladeWidgetAdaptor *adaptor, - PsppireSelector *selector) -{ - GList *list = NULL; - - g_return_val_if_fail (PSPPIRE_IS_SELECTOR (selector), NULL); - - list = glade_util_container_get_all_children (GTK_CONTAINER (selector)); - - return list; -} diff --git a/glade/var-view.c b/glade/var-view.c deleted file mode 100644 index 7eb6c62726..0000000000 --- a/glade/var-view.c +++ /dev/null @@ -1,83 +0,0 @@ -#include - -#include -#include -#include "psppire-var-view.h" - -#include - - -/* Dummy function to keep the linker happy. - Glade never actually needs to use this return value. - */ -GType -psppire_var_ptr_get_type (void) -{ - return 0; -} - -void -glade_psppire_var_view_post_create (GladeWidgetAdaptor *adaptor, - GObject *object, - GladeCreateReason reason) -{ - GladeWidget *widget ; - - PsppireVarView *var_view = PSPPIRE_VAR_VIEW (object); - - g_return_if_fail (PSPPIRE_IS_VAR_VIEW (var_view)); - - widget = glade_widget_get_from_gobject (GTK_WIDGET (var_view)); - if (!widget) - return; - - if (reason == GLADE_CREATE_USER) - { - /* HIG complient border-width defaults on var_views */ - glade_widget_property_set (widget, "border-width", 5); - } -} - - -GtkWidget * -glade_psppire_var_view_get_internal_child (GladeWidgetAdaptor *adaptor, - PsppireVarView *var_view, - const gchar *name) -{ -#if DEBUGGING - g_print ("%s\n", __FUNCTION__); -#endif - return GTK_WIDGET (var_view); -} - - - -void -glade_psppire_var_view_set_property (GladeWidgetAdaptor *adaptor, - GObject *object, - const gchar *id, - const GValue *value) -{ -#if DEBUGGING - g_print ("%s(%p) Type=\"%s\" Id=\"%s\"\n", __FUNCTION__, object, - G_OBJECT_TYPE_NAME( object ), - id); -#endif - - GWA_GET_CLASS (GTK_TYPE_WINDOW)->set_property (adaptor, object, - id, value); -} - - -GList * -glade_psppire_var_view_get_children (GladeWidgetAdaptor *adaptor, - PsppireVarView *dv) -{ - GList *list = NULL; - - g_return_val_if_fail (PSPPIRE_IS_VAR_VIEW (dv), NULL); - - list = glade_util_container_get_all_children (GTK_CONTAINER (dv)); - - return list; -} diff --git a/src/ui/gui/aggregate.ui b/src/ui/gui/aggregate.ui index 7c4905da0e..82299d2f76 100644 --- a/src/ui/gui/aggregate.ui +++ b/src/ui/gui/aggregate.ui @@ -6,9 +6,8 @@ Aggregate Data True - Vertical AGGREGATE - + True vertical diff --git a/src/ui/gui/autorecode.ui b/src/ui/gui/autorecode.ui index c8d8de4d3b..3dc0c69647 100644 --- a/src/ui/gui/autorecode.ui +++ b/src/ui/gui/autorecode.ui @@ -7,7 +7,7 @@ Automatic Recode True AUTORECODE - + True 2 diff --git a/src/ui/gui/binomial.ui b/src/ui/gui/binomial.ui index 66e9822551..7100ea6b55 100644 --- a/src/ui/gui/binomial.ui +++ b/src/ui/gui/binomial.ui @@ -13,7 +13,7 @@ Binomial Test True NPAR-TESTS#BINOMIAL - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK diff --git a/src/ui/gui/chi-square.ui b/src/ui/gui/chi-square.ui index da230eaab6..e084dc92a2 100644 --- a/src/ui/gui/chi-square.ui +++ b/src/ui/gui/chi-square.ui @@ -13,7 +13,7 @@ Chi-Square Test True NPAR-TESTS#CHISQUARE - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK diff --git a/src/ui/gui/compute.ui b/src/ui/gui/compute.ui index 4cabaed536..0b29eeedc5 100644 --- a/src/ui/gui/compute.ui +++ b/src/ui/gui/compute.ui @@ -8,7 +8,7 @@ Compute Variable True COMPUTE - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -359,7 +359,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Compute Variable: Type and Label True - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK diff --git a/src/ui/gui/correlation.ui b/src/ui/gui/correlation.ui index f4b3bc18f5..25d4eaf79e 100644 --- a/src/ui/gui/correlation.ui +++ b/src/ui/gui/correlation.ui @@ -7,7 +7,7 @@ Bivariate Correlations True CORRELATIONS - + True 2 diff --git a/src/ui/gui/count.ui b/src/ui/gui/count.ui index aaf2cb457f..3bb7fc8d49 100644 --- a/src/ui/gui/count.ui +++ b/src/ui/gui/count.ui @@ -7,7 +7,7 @@ Count Occurrences of Values within Cases True COUNT - + True vertical @@ -229,8 +229,7 @@ Count Values within Cases: Values to Count True - Vertical - + True vertical diff --git a/src/ui/gui/crosstabs.ui b/src/ui/gui/crosstabs.ui index 37d6560f04..9daed752f8 100644 --- a/src/ui/gui/crosstabs.ui +++ b/src/ui/gui/crosstabs.ui @@ -7,7 +7,7 @@ Crosstabs True CROSSTABS - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -248,7 +248,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Crosstabs: Format True - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -335,7 +335,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Crosstabs: Cells True - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -397,7 +397,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Crosstabs: Statistics True - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK diff --git a/src/ui/gui/descriptives.ui b/src/ui/gui/descriptives.ui index 0be07385b8..74a282adf7 100644 --- a/src/ui/gui/descriptives.ui +++ b/src/ui/gui/descriptives.ui @@ -8,7 +8,7 @@ Descriptives True DESCRIPTIVES - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK diff --git a/src/ui/gui/entry-dialog.ui b/src/ui/gui/entry-dialog.ui index a0246cbeca..5ce5797660 100644 --- a/src/ui/gui/entry-dialog.ui +++ b/src/ui/gui/entry-dialog.ui @@ -6,8 +6,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True - Vertical - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK diff --git a/src/ui/gui/examine.ui b/src/ui/gui/examine.ui index 200884ead4..9697fa5fa6 100644 --- a/src/ui/gui/examine.ui +++ b/src/ui/gui/examine.ui @@ -8,7 +8,7 @@ Explore True EXAMINE - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -310,8 +310,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Explore: Statistics True - Vertical - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -392,7 +391,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Explore: Options True - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK diff --git a/src/ui/gui/factor.ui b/src/ui/gui/factor.ui index 62b41e2308..fc7813dc3f 100644 --- a/src/ui/gui/factor.ui +++ b/src/ui/gui/factor.ui @@ -28,9 +28,8 @@ Factor Analysis True - Tabular FACTOR - + True 2 @@ -204,7 +203,7 @@ Factor Analysis: Extraction True - + True 2 @@ -560,7 +559,7 @@ Factor Analysis: Rotation True - + True 2 diff --git a/src/ui/gui/find.ui b/src/ui/gui/find.ui index e5e9f062d8..fb0eafd293 100644 --- a/src/ui/gui/find.ui +++ b/src/ui/gui/find.ui @@ -7,7 +7,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Find Case True - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK diff --git a/src/ui/gui/frequencies.ui b/src/ui/gui/frequencies.ui index b1708f7649..45e81c0e3b 100644 --- a/src/ui/gui/frequencies.ui +++ b/src/ui/gui/frequencies.ui @@ -9,7 +9,7 @@ Frequencies True FREQUENCIES - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -243,7 +243,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Frequencies: Frequency Tables True - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -513,7 +513,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Frequencies: Charts True - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK diff --git a/src/ui/gui/goto-case.ui b/src/ui/gui/goto-case.ui index 6cea9869a7..e9bf32009c 100644 --- a/src/ui/gui/goto-case.ui +++ b/src/ui/gui/goto-case.ui @@ -7,8 +7,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Goto Case True - Vertical - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK diff --git a/src/ui/gui/indep-samples.ui b/src/ui/gui/indep-samples.ui index 2251d0dcda..827819e37c 100644 --- a/src/ui/gui/indep-samples.ui +++ b/src/ui/gui/indep-samples.ui @@ -7,7 +7,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Independent-Samples T Test True - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -237,7 +237,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Define Groups True - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK diff --git a/src/ui/gui/k-means.ui b/src/ui/gui/k-means.ui index 7ca549b9ae..7707818815 100644 --- a/src/ui/gui/k-means.ui +++ b/src/ui/gui/k-means.ui @@ -6,9 +6,8 @@ K-Means Cluster Analysis True - Vertical QUICK-CLUSTER - + True vertical diff --git a/src/ui/gui/k-related.ui b/src/ui/gui/k-related.ui index 10d6fb287d..1987a21cc4 100644 --- a/src/ui/gui/k-related.ui +++ b/src/ui/gui/k-related.ui @@ -6,8 +6,7 @@ Tests for Several Related Samples True - Vertical - + True vertical diff --git a/src/ui/gui/ks-one-sample.ui b/src/ui/gui/ks-one-sample.ui index 9386e4093b..6df79bbb8c 100644 --- a/src/ui/gui/ks-one-sample.ui +++ b/src/ui/gui/ks-one-sample.ui @@ -6,7 +6,7 @@ One-Sample Kolmogorov-Smirnov Test True - + True 2 diff --git a/src/ui/gui/logistic.ui b/src/ui/gui/logistic.ui index 1c38cc3f42..6184b1c310 100644 --- a/src/ui/gui/logistic.ui +++ b/src/ui/gui/logistic.ui @@ -7,7 +7,7 @@ Logistic Regression True LOGISTIC-REGRESSION - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -239,7 +239,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Logistic Regression: Options True - + True 2 diff --git a/src/ui/gui/means.ui b/src/ui/gui/means.ui index 5c98f6c234..42eb287db2 100644 --- a/src/ui/gui/means.ui +++ b/src/ui/gui/means.ui @@ -8,7 +8,7 @@ Means True MEANS - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK diff --git a/src/ui/gui/missing-val-dialog.c b/src/ui/gui/missing-val-dialog.c index 030d078670..83dd338cee 100644 --- a/src/ui/gui/missing-val-dialog.c +++ b/src/ui/gui/missing-val-dialog.c @@ -362,7 +362,7 @@ psppire_missing_val_dialog_constructor (GType type, type, n_properties, properties); dialog = PSPPIRE_MISSING_VAL_DIALOG (obj); - content_area = GTK_CONTAINER (PSPPIRE_DIALOG (dialog)->box); + content_area = GTK_CONTAINER (PSPPIRE_DIALOG (dialog)); xml = builder_new ("missing-val-dialog.ui"); gtk_container_add (GTK_CONTAINER (content_area), get_widget_assert (xml, "missing-values-dialog")); diff --git a/src/ui/gui/oneway.ui b/src/ui/gui/oneway.ui index ec50f2451e..bcc73fcc52 100644 --- a/src/ui/gui/oneway.ui +++ b/src/ui/gui/oneway.ui @@ -8,7 +8,7 @@ One-Way ANOVA True ONEWAY - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -306,7 +306,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK One-Way ANOVA: Contrasts True - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK diff --git a/src/ui/gui/paired-samples.ui b/src/ui/gui/paired-samples.ui index 79fb24fbd3..f952273987 100644 --- a/src/ui/gui/paired-samples.ui +++ b/src/ui/gui/paired-samples.ui @@ -6,7 +6,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK diff --git a/src/ui/gui/psppire-dialog.c b/src/ui/gui/psppire-dialog.c index 37eaa1fb50..f3703993b5 100644 --- a/src/ui/gui/psppire-dialog.c +++ b/src/ui/gui/psppire-dialog.c @@ -41,9 +41,6 @@ static guint signals [n_SIGNALS]; static GObjectClass *parent_class = NULL; - -static void psppire_dialog_buildable_init (GtkBuildableIface *iface); - static void psppire_dialog_finalize (GObject *object) { @@ -83,19 +80,8 @@ psppire_dialog_get_type (void) (GInstanceInitFunc) psppire_dialog_init, }; - static const GInterfaceInfo buildable_info = - { - (GInterfaceInitFunc) psppire_dialog_buildable_init, - NULL, - NULL - }; - dialog_type = g_type_register_static (PSPPIRE_TYPE_WINDOW_BASE, "PsppireDialog", &dialog_info, 0); - - g_type_add_interface_static (dialog_type, - GTK_TYPE_BUILDABLE, - &buildable_info); } return dialog_type; @@ -123,16 +109,6 @@ psppire_dialog_get_property (GObject *object, switch (prop_id) { - case PROP_ORIENTATION: - { - if ( GTK_IS_VBOX (dialog->box) || GTK_VPANED (dialog->box)) - g_value_set_enum (value, PSPPIRE_VERTICAL); - else if ( GTK_IS_HBOX (dialog->box) || GTK_HPANED (dialog->box)) - g_value_set_enum (value, PSPPIRE_HORIZONTAL); - else if ( GTK_IS_TABLE (dialog->box)) - g_value_set_enum (value, PSPPIRE_TABULAR); - } - break; case PROP_SLIDING: g_value_set_boolean (value, dialog->slidable); break; @@ -145,43 +121,6 @@ psppire_dialog_get_property (GObject *object, }; } - -static void -dialog_set_container (PsppireDialog *dialog) -{ - if ( dialog->box != NULL) - { - gtk_container_remove (GTK_CONTAINER (dialog), dialog->box); - } - - switch (dialog->orientation) - { - case PSPPIRE_HORIZONTAL: - if ( dialog->slidable) - dialog->box = gtk_hpaned_new(); - else - dialog->box = gtk_hbox_new (FALSE, 5); - break; - case PSPPIRE_VERTICAL: - if ( dialog->slidable) - dialog->box = gtk_vpaned_new(); - else - dialog->box = gtk_vbox_new (FALSE, 5); - break; - case PSPPIRE_TABULAR: - dialog->box = gtk_table_new (2, 3, FALSE); - g_object_set (dialog->box, - "row-spacing", 5, - "column-spacing", 5, - NULL); - break; - } - - gtk_widget_show_all (dialog->box); - gtk_container_add (GTK_CONTAINER (dialog), dialog->box); -} - - static void psppire_dialog_set_property (GObject *object, guint prop_id, @@ -196,9 +135,6 @@ psppire_dialog_set_property (GObject *object, case PROP_SLIDING: dialog->slidable = g_value_get_boolean (value); break; - case PROP_ORIENTATION: - dialog->orientation = g_value_get_enum (value); - break; case PROP_HELP_PAGE: dialog->help_page = g_value_dup_string (value); break; @@ -206,13 +142,8 @@ psppire_dialog_set_property (GObject *object, G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; }; - - dialog_set_container (dialog); } - -static GParamSpec *orientation_spec ; - static void psppire_dialog_class_init (PsppireDialogClass *class) { @@ -228,14 +159,6 @@ psppire_dialog_class_init (PsppireDialogClass *class) NULL, G_PARAM_READWRITE); - orientation_spec = - g_param_spec_enum ("orientation", - "Orientation", - "Which way widgets are packed", - PSPPIRE_TYPE_ORIENTATION, - PSPPIRE_HORIZONTAL /* default value */, - G_PARAM_CONSTRUCT_ONLY |G_PARAM_READWRITE); - sliding_spec = g_param_spec_boolean ("slidable", "Slidable", @@ -246,11 +169,6 @@ psppire_dialog_class_init (PsppireDialogClass *class) object_class->set_property = psppire_dialog_set_property; object_class->get_property = psppire_dialog_get_property; - g_object_class_install_property (object_class, - PROP_ORIENTATION, - orientation_spec); - - g_object_class_install_property (object_class, PROP_SLIDING, sliding_spec); @@ -306,13 +224,9 @@ psppire_dialog_class_init (PsppireDialogClass *class) 1, G_TYPE_STRING); - parent_class = g_type_class_peek_parent (class); } - - - static void close_dialog (GtkWidget *w, gpointer data) { @@ -328,7 +242,6 @@ psppire_dialog_close (PsppireDialog *dialog) gtk_widget_hide (GTK_WIDGET (dialog)); } - static void delete_event_callback (GtkWidget *w, GdkEvent *e, gpointer data) { @@ -339,8 +252,6 @@ delete_event_callback (GtkWidget *w, GdkEvent *e, gpointer data) static void psppire_dialog_init (PsppireDialog *dialog) { - GValue value = {0}; - dialog->box = NULL; dialog->contents_are_valid = NULL; dialog->validity_data = NULL; dialog->contents_are_acceptable = NULL; @@ -348,14 +259,9 @@ psppire_dialog_init (PsppireDialog *dialog) dialog->slidable = FALSE; dialog->help_page = NULL; - g_value_init (&value, orientation_spec->value_type); - g_param_value_set_default (orientation_spec, &value); - gtk_window_set_type_hint (GTK_WINDOW (dialog), GDK_WINDOW_TYPE_HINT_DIALOG); - g_value_unset (&value); - g_signal_connect (dialog, "delete-event", G_CALLBACK (delete_event_callback), dialog); @@ -366,7 +272,6 @@ psppire_dialog_init (PsppireDialog *dialog) g_object_set (dialog, "icon-name", "pspp", NULL); } - GtkWidget* psppire_dialog_new (void) { @@ -519,7 +424,7 @@ psppire_dialog_run (PsppireDialog *dialog) g_warning ("PsppireDialog %s has no title", gtk_widget_get_name (GTK_WIDGET (dialog))); if ( dialog->contents_are_valid != NULL ) - gtk_container_foreach (GTK_CONTAINER (dialog->box), + gtk_container_foreach (gtk_bin_get_child(GTK_BIN(dialog)), connect_notify_signal, dialog); @@ -563,29 +468,6 @@ psppire_dialog_help (PsppireDialog *dialog) g_signal_emit (dialog, signals [DIALOG_HELP], 0, page); } - -GType -psppire_orientation_get_type (void) -{ - static GType etype = 0; - if (etype == 0) - { - static const GEnumValue values[] = - { - { PSPPIRE_HORIZONTAL, "PSPPIRE_HORIZONTAL", "Horizontal" }, - { PSPPIRE_VERTICAL, "PSPPIRE_VERTICAL", "Vertical" }, - { PSPPIRE_TABULAR, "PSPPIRE_TABULAR", "Tabular" }, - { 0, NULL, NULL } - }; - - etype = g_enum_register_static - (g_intern_static_string ("PsppireOrientation"), values); - - } - return etype; -} - - /* Sets a predicate function that is checked after each change that the user makes to the dialog's state. If the predicate function returns false, then "OK" and other buttons that accept the dialog's settings will be @@ -623,27 +505,3 @@ psppire_dialog_is_acceptable (const PsppireDialog *dialog) return (dialog->contents_are_acceptable == NULL || dialog->contents_are_acceptable (dialog->acceptable_data)); } - - - - -static GObject * -get_internal_child (GtkBuildable *buildable, - GtkBuilder *builder, - const gchar *childname) -{ - PsppireDialog *dialog = PSPPIRE_DIALOG (buildable); - - if ( 0 == strcmp (childname, "hbox")) - return G_OBJECT (dialog->box); - - return NULL; -} - - - -static void -psppire_dialog_buildable_init (GtkBuildableIface *iface) -{ - iface->get_internal_child = get_internal_child; -} diff --git a/src/ui/gui/psppire-dialog.h b/src/ui/gui/psppire-dialog.h index 527e8b0d05..c7d3c230e4 100644 --- a/src/ui/gui/psppire-dialog.h +++ b/src/ui/gui/psppire-dialog.h @@ -55,7 +55,6 @@ typedef enum struct _PsppireDialog { PsppireWindowBase window; - GtkWidget *box; /* Private */ GMainLoop *loop; @@ -66,8 +65,6 @@ struct _PsppireDialog ContentsAreValid contents_are_acceptable; gpointer acceptable_data; gboolean slidable; - PsppireOrientation orientation; - gchar *help_page; }; @@ -93,14 +90,6 @@ void psppire_dialog_set_accept_predicate (PsppireDialog *, gboolean psppire_dialog_is_acceptable (const PsppireDialog *); void psppire_dialog_notify_change (PsppireDialog *); - - -GType psppire_orientation_get_type (void); - - -#define PSPPIRE_TYPE_ORIENTATION (psppire_orientation_get_type ()) - - G_END_DECLS #endif /* __PSPPIRE_DIALOG_H__ */ diff --git a/src/ui/gui/psppire.ui b/src/ui/gui/psppire.ui index 5419c3a0b6..694014eef1 100644 --- a/src/ui/gui/psppire.ui +++ b/src/ui/gui/psppire.ui @@ -7,7 +7,7 @@ Weight Cases True WEIGHT - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK @@ -196,7 +196,7 @@ Transpose True FLIP - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK @@ -385,8 +385,7 @@ Data File Comments True DOCUMENT - Vertical - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK diff --git a/src/ui/gui/rank.ui b/src/ui/gui/rank.ui index 2b84d7a8c2..bfb856a922 100644 --- a/src/ui/gui/rank.ui +++ b/src/ui/gui/rank.ui @@ -8,7 +8,7 @@ Rank Cases True RANK - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -350,7 +350,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Rank Cases: Types True - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -642,7 +642,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Rank Cases: Ties True - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK diff --git a/src/ui/gui/recode.ui b/src/ui/gui/recode.ui index 09a643d1f7..8ef594a5ea 100644 --- a/src/ui/gui/recode.ui +++ b/src/ui/gui/recode.ui @@ -6,7 +6,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -331,8 +331,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Recode into Same Variables True - Tabular - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK diff --git a/src/ui/gui/regression.ui b/src/ui/gui/regression.ui index 415fea257a..5f40028846 100644 --- a/src/ui/gui/regression.ui +++ b/src/ui/gui/regression.ui @@ -7,7 +7,7 @@ Regression True REGRESSION - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -252,7 +252,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Regression: Save True - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -317,7 +317,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Regression: Statistics True - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK diff --git a/src/ui/gui/reliability.ui b/src/ui/gui/reliability.ui index 79e467fb74..6d0446cca4 100644 --- a/src/ui/gui/reliability.ui +++ b/src/ui/gui/reliability.ui @@ -26,7 +26,7 @@ Reliability Analysis True RELIABILITY - + True diff --git a/src/ui/gui/roc.ui b/src/ui/gui/roc.ui index e5cefe74a0..0b3c4527d7 100644 --- a/src/ui/gui/roc.ui +++ b/src/ui/gui/roc.ui @@ -7,7 +7,7 @@ ROC Curve True ROC - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK diff --git a/src/ui/gui/runs.ui b/src/ui/gui/runs.ui index 720492b6fd..3eb39a860e 100644 --- a/src/ui/gui/runs.ui +++ b/src/ui/gui/runs.ui @@ -6,9 +6,8 @@ Runs Test True - Vertical NPAR-TESTS#RUNS - + True vertical diff --git a/src/ui/gui/select-cases.ui b/src/ui/gui/select-cases.ui index 597b9fdf01..f4c121bd5a 100644 --- a/src/ui/gui/select-cases.ui +++ b/src/ui/gui/select-cases.ui @@ -7,9 +7,8 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Select Cases True - Vertical SELECT-IF - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -541,8 +540,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Select Cases: Range True - Vertical - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -648,8 +646,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Select Cases: Random Sample True - Vertical - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK diff --git a/src/ui/gui/sort.ui b/src/ui/gui/sort.ui index 16da2313c5..86a3311a2d 100644 --- a/src/ui/gui/sort.ui +++ b/src/ui/gui/sort.ui @@ -8,7 +8,7 @@ Sort Cases True SORT-CASES - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK diff --git a/src/ui/gui/split-file.ui b/src/ui/gui/split-file.ui index 902b01b6a0..934f92091a 100644 --- a/src/ui/gui/split-file.ui +++ b/src/ui/gui/split-file.ui @@ -8,7 +8,7 @@ Split File True SPLIT-FILE - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK diff --git a/src/ui/gui/t-test.ui b/src/ui/gui/t-test.ui index 0c256561d7..96d177d1a6 100644 --- a/src/ui/gui/t-test.ui +++ b/src/ui/gui/t-test.ui @@ -7,7 +7,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Options True - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -116,8 +116,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK One - Sample T Test True - Tabular - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK diff --git a/src/ui/gui/univariate.ui b/src/ui/gui/univariate.ui index a4c8fa8280..da548ee2ea 100644 --- a/src/ui/gui/univariate.ui +++ b/src/ui/gui/univariate.ui @@ -6,7 +6,7 @@ Univariate True - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -206,7 +206,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Univariate: Save True - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -271,7 +271,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Univariate: Statistics True - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK diff --git a/src/ui/gui/val-labs-dialog.c b/src/ui/gui/val-labs-dialog.c index 0d7f41307b..588bc42601 100644 --- a/src/ui/gui/val-labs-dialog.c +++ b/src/ui/gui/val-labs-dialog.c @@ -443,7 +443,7 @@ psppire_val_labs_dialog_constructor (GType type, type, n_properties, properties); dialog = PSPPIRE_VAL_LABS_DIALOG (obj); - content_area = GTK_CONTAINER (PSPPIRE_DIALOG (dialog)->box); + content_area = GTK_CONTAINER (PSPPIRE_DIALOG (dialog)); gtk_container_add (GTK_CONTAINER (content_area), get_widget_assert (xml, "val-labs-dialog")); diff --git a/src/ui/gui/var-type-dialog.c b/src/ui/gui/var-type-dialog.c index 52811c9af5..63f73a9114 100644 --- a/src/ui/gui/var-type-dialog.c +++ b/src/ui/gui/var-type-dialog.c @@ -531,7 +531,7 @@ psppire_var_type_dialog_constructor (GType type, xml = builder_new ("var-type-dialog.ui"); - content_area = GTK_CONTAINER (PSPPIRE_DIALOG (dialog)->box); + content_area = GTK_CONTAINER (PSPPIRE_DIALOG (dialog)); gtk_container_add (GTK_CONTAINER (content_area), get_widget_assert (xml, "var-type-dialog")); diff --git a/src/ui/gui/variable-info.ui b/src/ui/gui/variable-info.ui index 74523b339c..8674036d55 100644 --- a/src/ui/gui/variable-info.ui +++ b/src/ui/gui/variable-info.ui @@ -8,7 +8,7 @@ Variables True True - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK -- 2.30.2