pspp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] var-type-dialog: Convert to a GObject.


From: John Darrington
Subject: Re: [PATCH] var-type-dialog: Convert to a GObject.
Date: Thu, 9 Aug 2012 14:52:50 +0000
User-agent: Mutt/1.5.18 (2008-05-17)

This looks good.  There are a few packing properties which could
be adjusted, but those can be done later.

J'

On Wed, Aug 08, 2012 at 11:30:28PM -0700, Ben Pfaff wrote:
     The one issue I can't figure out is why this changes the look of
     the dialog box so that its height is the total height of all of
     the widgets in the "middlebox", rather than the maximum height
     actually needed.

        Now that the dialog inherits (ultimately) from PsppireWindowBase,
its geometry is "remembered" from the last time it ran.
        ---
      src/ui/gui/psppire-dialog.h    |   12 +-
      src/ui/gui/psppire-var-sheet.c |   33 ++-
      src/ui/gui/psppire-var-sheet.h |    3 +-
      src/ui/gui/var-type-dialog.c   |  254 +++++++++-----
      src/ui/gui/var-type-dialog.h   |   51 ++-
      src/ui/gui/var-type-dialog.ui  |  777 
+++++++++++++++++++---------------------
      6 files changed, 592 insertions(+), 538 deletions(-)
     
     diff --git a/src/ui/gui/psppire-dialog.h b/src/ui/gui/psppire-dialog.h
     index b3f98e6..3b01557 100644
     --- a/src/ui/gui/psppire-dialog.h
     +++ b/src/ui/gui/psppire-dialog.h
     @@ -1,5 +1,5 @@
      /* PSPPIRE - a graphical user interface for PSPP.
     -   Copyright (C) 2007, 2010, 2011  Free Software Foundation
     +   Copyright (C) 2007, 2010, 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
     @@ -31,11 +31,11 @@
      
      G_BEGIN_DECLS
      
     -#define PSPPIRE_DIALOG_TYPE            (psppire_dialog_get_type ())
     -#define PSPPIRE_DIALOG(obj)            (G_TYPE_CHECK_INSTANCE_CAST 
((obj), PSPPIRE_DIALOG_TYPE, PsppireDialog))
     -#define PSPPIRE_DIALOG_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), 
PSPPIRE_DIALOG_TYPE, PsppireDialogClass))
     -#define PSPPIRE_IS_DIALOG(obj)         (G_TYPE_CHECK_INSTANCE_TYPE 
((obj), PSPPIRE_DIALOG_TYPE))
     -#define PSPPIRE_IS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), 
PSPPIRE_DIALOG_TYPE))
     +#define PSPPIRE_TYPE_DIALOG            (psppire_dialog_get_type ())
     +#define PSPPIRE_DIALOG(obj)            (G_TYPE_CHECK_INSTANCE_CAST 
((obj), PSPPIRE_TYPE_DIALOG, PsppireDialog))
     +#define PSPPIRE_DIALOG_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), 
PSPPIRE_TYPE_DIALOG, PsppireDialogClass))
     +#define PSPPIRE_IS_DIALOG(obj)         (G_TYPE_CHECK_INSTANCE_TYPE 
((obj), PSPPIRE_TYPE_DIALOG))
     +#define PSPPIRE_IS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), 
PSPPIRE_TYPE_DIALOG))
      
      
      typedef struct _PsppireDialog       PsppireDialog;
     diff --git a/src/ui/gui/psppire-var-sheet.c 
b/src/ui/gui/psppire-var-sheet.c
     index 648d9fd..a3208f0 100644
     --- a/src/ui/gui/psppire-var-sheet.c
     +++ b/src/ui/gui/psppire-var-sheet.c
     @@ -1,5 +1,5 @@
      /* PSPPIRE - a graphical user interface for PSPP.
     -   Copyright (C) 2008, 2009, 2011 Free Software Foundation, Inc.
     +   Copyright (C) 2008, 2009, 2011, 2012 Free Software Foundation, Inc.
      
         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
     @@ -288,7 +288,26 @@ traverse_cell_callback (PsppireSheet *sheet,
        return FALSE;
      }
      
     +static void
     +var_sheet_show_var_type_dialog (PsppireVarSheet *vs)
     +{
     +  PsppireVarStore *var_store;
     +  struct fmt_spec format;
     +  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);
      
     +  format = *var_get_print_format (var);
     +  psppire_var_type_dialog_run (GTK_WINDOW (gtk_widget_get_toplevel (
     +                                             GTK_WIDGET (vs))), &format);
     +  var_set_width (var, fmt_var_width (&format));
     +  var_set_both_formats (var, &format);
     +}
      
      /*
         Callback whenever the active cell changes on the var sheet.
     @@ -404,14 +423,10 @@ var_sheet_change_active_cell (PsppireVarSheet *vs,
        customEntry =
          PSPPIRE_CUSTOM_ENTRY (psppire_sheet_get_entry (sheet));
      
     -
     -  /* Popup the Variable Type dialog box */
     -  vs->var_type_dialog->pv = var;
     -
        g_signal_connect_swapped (customEntry,
                                 "clicked",
     -                           G_CALLBACK (var_type_dialog_show),
     -                            vs->var_type_dialog);
     +                                  G_CALLBACK 
(var_sheet_show_var_type_dialog),
     +                            vs);
            }
            break;
      
     @@ -485,8 +500,7 @@ psppire_var_sheet_realize (GtkWidget *w)
        vs->val_labs_dialog = val_labs_dialog_create (GTK_WINDOW (toplevel));
      
        vs->missing_val_dialog = missing_val_dialog_create (GTK_WINDOW 
(toplevel));
     -  vs->var_type_dialog = var_type_dialog_create (GTK_WINDOW (toplevel));
     -
     +  
        /* Chain up to the parent class */
        GTK_WIDGET_CLASS (parent_class)->realize (w);
      }
     @@ -498,7 +512,6 @@ psppire_var_sheet_unrealize (GtkWidget *w)
      
        g_free (vs->val_labs_dialog);
        g_free (vs->missing_val_dialog);
     -  g_free (vs->var_type_dialog);
      
        /* Chain up to the parent class */
        GTK_WIDGET_CLASS (parent_class)->unrealize (w);
     diff --git a/src/ui/gui/psppire-var-sheet.h 
b/src/ui/gui/psppire-var-sheet.h
     index b996275..7c043ca 100644
     --- a/src/ui/gui/psppire-var-sheet.h
     +++ b/src/ui/gui/psppire-var-sheet.h
     @@ -1,5 +1,5 @@
      /* PSPPIRE - a graphical user interface for PSPP.
     -   Copyright (C) 2008 Free Software Foundation, Inc.
     +   Copyright (C) 2008, 2012 Free Software Foundation, Inc.
      
         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
     @@ -47,7 +47,6 @@ struct _PsppireVarSheet
      
        struct val_labs_dialog *val_labs_dialog ;
        struct missing_val_dialog *missing_val_dialog ;
     -  struct var_type_dialog *var_type_dialog ;
      };
      
      
     diff --git a/src/ui/gui/var-type-dialog.c b/src/ui/gui/var-type-dialog.c
     index f5533b4..7b66338 100644
     --- a/src/ui/gui/var-type-dialog.c
     +++ b/src/ui/gui/var-type-dialog.c
     @@ -29,6 +29,7 @@
      #include "data/variable.h"
      #include "libpspp/message.h"
      #include "ui/gui/builder-wrapper.h"
     +#include "ui/gui/psppire-format.h"
      #include "ui/gui/var-type-dialog.h"
      
      static const struct fmt_spec date_format[] =
     @@ -79,6 +80,9 @@ static const int cc_format[] =
          FMT_CCE,
        };
      
     +static GObject *psppire_var_type_dialog_constructor (GType type, guint,
     +                                                     
GObjectConstructParam *);
     +static void psppire_var_type_dialog_set_state (PsppireVarTypeDialog *);
      
      static int find_format (const struct fmt_spec *target,
                              const struct fmt_spec formats[], int n_formats);
     @@ -86,25 +90,142 @@ static int find_format_type (int target, const int 
types[], int n_types);
      
      static void select_treeview_at_index (GtkTreeView *, int index);
      
     -static void update_width_decimals (const struct var_type_dialog *);
     -static void refresh_active_button (struct var_type_dialog *);
     +static void update_width_decimals (const PsppireVarTypeDialog *);
     +static void refresh_active_button (PsppireVarTypeDialog *);
      static void on_active_button_change (GtkToggleButton *,
     -                                     struct var_type_dialog *);
     -static void on_width_changed (GtkEntry *, struct var_type_dialog *);
     -static void on_decimals_changed (GtkEntry *, struct var_type_dialog *);
     +                                     PsppireVarTypeDialog *);
     +static void on_width_changed (GtkEntry *, PsppireVarTypeDialog *);
     +static void on_decimals_changed (GtkEntry *, PsppireVarTypeDialog *);
     +
     +G_DEFINE_TYPE (PsppireVarTypeDialog,
     +               psppire_var_type_dialog,
     +               PSPPIRE_TYPE_DIALOG);
     +
     +enum
     +  {
     +    PROP_0,
     +    PROP_FORMAT
     +  };
     +
     +static void
     +psppire_var_type_dialog_set_property (GObject      *object,
     +                                      guint         prop_id,
     +                                      const GValue *value,
     +                                      GParamSpec   *pspec)
     +{
     +  PsppireVarTypeDialog *obj = PSPPIRE_VAR_TYPE_DIALOG (object);
     +
     +  switch (prop_id)
     +    {
     +    case PROP_FORMAT:
     +      psppire_var_type_dialog_set_format (obj, g_value_get_boxed (value));
     +      break;
     +    default:
     +      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
     +      break;
     +    }
     +}
     +
     +static void
     +psppire_var_type_dialog_get_property (GObject      *object,
     +                                      guint         prop_id,
     +                                      GValue       *value,
     +                                      GParamSpec   *pspec)
     +{
     +  PsppireVarTypeDialog *obj = PSPPIRE_VAR_TYPE_DIALOG (object);
     +
     +  switch (prop_id)
     +    {
     +    case PROP_FORMAT:
     +      g_value_set_boxed (value, &obj->fmt_l);
     +      break;
     +    default:
     +      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
     +      break;
     +    }
     +}
     +
     +void
     +psppire_var_type_dialog_set_format (PsppireVarTypeDialog *dialog,
     +                                    const struct fmt_spec *format)
     +{
     +  dialog->base_format = *format;
     +  psppire_var_type_dialog_set_state (dialog);
     +}
     +
     +const struct fmt_spec *
     +psppire_var_type_dialog_get_format (const PsppireVarTypeDialog *dialog)
     +{
     +  return &dialog->fmt_l;
     +}
     +
     +static void
     +psppire_var_type_dialog_init (PsppireVarTypeDialog *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->base_format = F_8_0;
     +  obj->fmt_l = F_8_0;
     +}
     +
     +static void
     +psppire_var_type_dialog_class_init (PsppireVarTypeDialogClass *class)
     +{
     +  GObjectClass *gobject_class;
     +  gobject_class = G_OBJECT_CLASS (class);
     +
     +  gobject_class->constructor = psppire_var_type_dialog_constructor;
     +  gobject_class->set_property = psppire_var_type_dialog_set_property;
     +  gobject_class->get_property = psppire_var_type_dialog_get_property;
     +
     +  g_object_class_install_property (
     +    gobject_class, PROP_FORMAT,
     +    g_param_spec_boxed ("format",
     +                        "Format",
     +                        "The format being edited.",
     +                        PSPPIRE_TYPE_FORMAT,
     +                        G_PARAM_READABLE | G_PARAM_WRITABLE));
     +}
     +
     +PsppireVarTypeDialog *
     +psppire_var_type_dialog_new (const struct fmt_spec *format)
     +{
     +  return PSPPIRE_VAR_TYPE_DIALOG (
     +    g_object_new (PSPPIRE_TYPE_VAR_TYPE_DIALOG,
     +                  "orientation", PSPPIRE_HORIZONTAL,
     +                  "format", format,
     +                  NULL));
     +}
     +
     +void
     +psppire_var_type_dialog_run (GtkWindow *parent_window,
     +                             struct fmt_spec *format)
     +{
     +  PsppireVarTypeDialog *dialog;
     +
     +  dialog = psppire_var_type_dialog_new (format);
     +  gtk_window_set_transient_for (GTK_WINDOW (dialog), parent_window);
     +  gtk_widget_show (GTK_WIDGET (dialog));
     +
     +  if (psppire_dialog_run (PSPPIRE_DIALOG (dialog)) == GTK_RESPONSE_OK)
     +    *format = *psppire_var_type_dialog_get_format (dialog);
     +}
     +
      
      /* callback for when any of the radio buttons are toggled */
      static void
      on_toggle (GtkToggleButton *togglebutton, gpointer dialog_)
      {
     -  struct var_type_dialog *dialog = dialog_;
     +  PsppireVarTypeDialog *dialog = dialog_;
      
        if ( gtk_toggle_button_get_active (togglebutton) == TRUE)
          refresh_active_button (dialog);
      }
      
      static void
     -refresh_active_button (struct var_type_dialog *dialog)
     +refresh_active_button (PsppireVarTypeDialog *dialog)
      {
        int i;
      
     @@ -127,7 +248,7 @@ refresh_active_button (struct var_type_dialog *dialog)
      }
      
      static void
     -update_adj_ranges (struct var_type_dialog *dialog)
     +update_adj_ranges (PsppireVarTypeDialog *dialog)
      {
        enum fmt_type type = dialog->fmt_l.type;
        const enum fmt_use use = FMT_FOR_OUTPUT;
     @@ -149,7 +270,7 @@ update_adj_ranges (struct var_type_dialog *dialog)
      /* callback for when any of the radio buttons are toggled */
      static void
      on_active_button_change (GtkToggleButton *togglebutton,
     -                         struct var_type_dialog *dialog)
     +                         PsppireVarTypeDialog *dialog)
      {
        enum widgets {
          W_WIDTH          = 1 << 0,
     @@ -203,7 +324,7 @@ on_active_button_change (GtkToggleButton *togglebutton,
        gtk_widget_set_visible (dialog->dollar_window,
                                (widgets & W_DOLLAR_FORMATS) != 0);
      
     -  dialog->fmt_l = *var_get_print_format (dialog->pv);
     +  dialog->fmt_l = dialog->base_format;
      
        switch (dialog->active_button)
          {
     @@ -247,12 +368,6 @@ on_active_button_change (GtkToggleButton 
*togglebutton,
        update_width_decimals (dialog);
      }
      
     -
     -
     -static gint on_var_type_ok_clicked (GtkWidget *w, gpointer data);
     -static gint hide_dialog (GtkWidget *w,  gpointer data);
     -
     -
      static void
      add_to_group (GtkWidget *w, gpointer data)
      {
     @@ -263,14 +378,14 @@ add_to_group (GtkWidget *w, gpointer data)
      
      /* Set the local width and decimals entry boxes to reflec the local 
format */
      static void
     -update_width_decimals (const struct var_type_dialog *dialog)
     +update_width_decimals (const PsppireVarTypeDialog *dialog)
      {
        gtk_adjustment_set_value (dialog->adj_width, dialog->fmt_l.w);
        gtk_adjustment_set_value (dialog->adj_decimals, dialog->fmt_l.d);
      }
      
      static void
     -on_width_changed (GtkEntry *entry, struct var_type_dialog *dialog)
     +on_width_changed (GtkEntry *entry, PsppireVarTypeDialog *dialog)
      {
        int w = atoi (gtk_entry_get_text (GTK_ENTRY (dialog->entry_width)));
        fmt_change_width (&dialog->fmt_l, w, FMT_FOR_OUTPUT);
     @@ -278,7 +393,7 @@ on_width_changed (GtkEntry *entry, struct 
var_type_dialog *dialog)
      }
      
      static void
     -on_decimals_changed (GtkEntry *entry, struct var_type_dialog *dialog)
     +on_decimals_changed (GtkEntry *entry, PsppireVarTypeDialog *dialog)
      {
        int d = atoi (gtk_entry_get_text (GTK_ENTRY (dialog->entry_decimals)));
        fmt_change_decimals (&dialog->fmt_l, d, FMT_FOR_OUTPUT);
     @@ -292,7 +407,7 @@ preview_custom (GtkWidget *w, gpointer data)
      {
        const gchar *text ;
      
     -  struct var_type_dialog *dialog = data;
     +  PsppireVarTypeDialog *dialog = data;
      
        if ( dialog->active_button != BUTTON_CUSTOM )
          return;
     @@ -351,7 +466,7 @@ get_index_from_treeview (GtkTreeView *treeview)
         It sets the fmt_l_spec to reflect the selected format */
      static void
      set_date_format_from_treeview (GtkTreeView *treeview,
     -                               struct var_type_dialog *dialog)
     +                               PsppireVarTypeDialog *dialog)
      {
        dialog->fmt_l = date_format[get_index_from_treeview (treeview)];
      }
     @@ -360,7 +475,7 @@ set_date_format_from_treeview (GtkTreeView *treeview,
         It sets the fmt_l_spec to reflect the selected format */
      static void
      set_dollar_format_from_treeview (GtkTreeView *treeview,
     -                                 struct var_type_dialog *dialog)
     +                                 PsppireVarTypeDialog *dialog)
      {
        dialog->fmt_l = dollar_format[get_index_from_treeview (treeview)];
      }
     @@ -369,7 +484,7 @@ set_dollar_format_from_treeview (GtkTreeView *treeview,
         It sets the type of the fmt_l to reflect the selected type */
      static void
      set_custom_format_from_treeview (GtkTreeView *treeview,
     -                                 struct var_type_dialog *dialog)
     +                                 PsppireVarTypeDialog *dialog)
      {
        dialog->fmt_l.type = cc_format[get_index_from_treeview (treeview)];
        update_adj_ranges (dialog);
     @@ -378,23 +493,31 @@ set_custom_format_from_treeview (GtkTreeView 
*treeview,
      }
      
      /* Create the structure */
     -struct var_type_dialog *
     -var_type_dialog_create (GtkWindow *toplevel)
     +static GObject *
     +psppire_var_type_dialog_constructor (GType                  type,
     +                                     guint                  n_properties,
     +                                     GObjectConstructParam *properties)
      {
     +  PsppireVarTypeDialog *dialog;
     +  GtkContainer *content_area;
     +  GtkBuilder *xml;
     +  GObject *obj;
        gint i;
     -  struct var_type_dialog *dialog = g_malloc (sizeof (struct 
var_type_dialog));
      
     -  GtkBuilder *xml = builder_new ("var-type-dialog.ui");
     +  obj = G_OBJECT_CLASS 
(psppire_var_type_dialog_parent_class)->constructor (
     +    type, n_properties, properties);
     +  dialog = PSPPIRE_VAR_TYPE_DIALOG (obj);
      
     -  dialog->window = get_widget_assert (xml,"var_type_dialog");
     -  dialog->active_button = -1;
     +  xml = builder_new ("var-type-dialog.ui");
      
     +  content_area = GTK_CONTAINER (PSPPIRE_DIALOG (dialog)->box);
     +  gtk_container_add (GTK_CONTAINER (content_area),
     +                     get_widget_assert (xml, "var-type-dialog"));
      
     -  g_signal_connect (dialog->window, "delete-event",
     -              G_CALLBACK (gtk_widget_hide_on_delete), NULL);
     +  dialog->active_button = -1;
      
     -  gtk_window_set_transient_for (GTK_WINDOW (dialog->window),
     -                          toplevel);
     +  g_signal_connect (dialog, "delete-event",
     +              G_CALLBACK (gtk_widget_hide_on_delete), NULL);
      
        dialog->radioButton[BUTTON_NUMERIC] =
          get_widget_assert (xml,"radiobutton1");
     @@ -439,8 +562,6 @@ var_type_dialog_create (GtkWindow *toplevel)
          GTK_TREE_VIEW (get_widget_assert (xml, "custom_treeview"));
      
      
     -  dialog->ok = get_widget_assert (xml,"var_type_ok");
     -
      
        {
        GtkTreeIter iter;
     @@ -594,27 +715,19 @@ var_type_dialog_create (GtkWindow *toplevel)
                   "changed",
                   G_CALLBACK (preview_custom), dialog);
      
     -
     -  /* Connect to the OK button */
     -  g_signal_connect (dialog->ok, "clicked", G_CALLBACK 
(on_var_type_ok_clicked),
     -             dialog);
     -
     -
     -  /* And the cancel button */
     -  g_signal_connect (get_widget_assert (xml, "var_type_cancel") , 
"clicked",
     -              G_CALLBACK (hide_dialog),
     -              dialog);
        }
      
        g_object_unref (xml);
      
     -  return dialog;
     +  psppire_var_type_dialog_set_state (dialog);
     +
     +  return obj;
      }
      
      
      /* Set a particular button to be active */
      void
     -var_type_dialog_set_active_button (struct var_type_dialog *dialog, gint b)
     +var_type_dialog_set_active_button (PsppireVarTypeDialog *dialog, gint b)
      {
        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON 
(dialog->radioButton[b]),
                               TRUE);
     @@ -659,15 +772,14 @@ find_format_type (int target, const int types[], int 
n_types)
      
      /* Set up the state of the dialog box to match the variable VAR */
      static void
     -var_type_dialog_set_state (struct var_type_dialog *dialog)
     +psppire_var_type_dialog_set_state (PsppireVarTypeDialog *dialog)
      {
        int button;
      
     -  g_assert (dialog);
     -  g_assert (dialog->pv);
     +  g_return_if_fail (dialog != NULL);
      
        /* Populate the radio button states */
     -  switch (var_get_print_format (dialog->pv)->type)
     +  switch (dialog->base_format.type)
          {
          default:
          case FMT_F:
     @@ -714,43 +826,3 @@ var_type_dialog_set_state (struct var_type_dialog 
*dialog)
        on_active_button_change (GTK_TOGGLE_BUTTON 
(dialog->radioButton[button]),
                                 dialog);
      }
     -
     -
     -/* Popup the dialog box */
     -void
     -var_type_dialog_show (struct var_type_dialog *dialog)
     -{
     -  var_type_dialog_set_state (dialog);
     -
     -  gtk_widget_show (dialog->window);
     -}
     -
     -/* Callbacks for the Variable Type Dialog Box */
     -
     -/* Callback for when the var type dialog is closed using the OK button.
     -   It sets the appropriate variable accordingly. */
     -static gint
     -on_var_type_ok_clicked (GtkWidget *w, gpointer data)
     -{
     -  struct var_type_dialog *dialog = data;
     -
     -  var_set_width (dialog->pv, fmt_var_width (&dialog->fmt_l));
     -  var_set_both_formats (dialog->pv, &dialog->fmt_l);
     -
     -  gtk_widget_hide (dialog->window);
     -
     -  return FALSE;
     -}
     -
     -
     -
     -static gint
     -hide_dialog (GtkWidget *w,  gpointer data)
     -{
     -  struct var_type_dialog *dialog = data;
     -
     -  gtk_widget_hide (dialog->window);
     -
     -  return FALSE;
     -}
     -
     diff --git a/src/ui/gui/var-type-dialog.h b/src/ui/gui/var-type-dialog.h
     index d8c499f..0251cbe 100644
     --- a/src/ui/gui/var-type-dialog.h
     +++ b/src/ui/gui/var-type-dialog.h
     @@ -15,13 +15,25 @@
         along with this program.  If not, see <http://www.gnu.org/licenses/>. 
*/
      
      
     -#ifndef __PSPPIRE_VAR_TYPE_DIALOG_H
     -#define __PSPPIRE_VAR_TYPE_DIALOG_H
     -
     -#include <data/format.h>
     +#ifndef PSPPIRE_VAR_TYPE_DIALOG_H
     +#define PSPPIRE_VAR_TYPE_DIALOG_H 1
      
     +#include "data/format.h"
     +#include "psppire-dialog.h"
      #include "psppire-var-store.h"
      
     +G_BEGIN_DECLS
     +
     +#define PSPPIRE_TYPE_VAR_TYPE_DIALOG             
(psppire_var_type_dialog_get_type())
     +#define PSPPIRE_VAR_TYPE_DIALOG(obj)             
(G_TYPE_CHECK_INSTANCE_CAST 
((obj),PSPPIRE_TYPE_VAR_TYPE_DIALOG,PsppireVarTypeDialog))
     +#define PSPPIRE_VAR_TYPE_DIALOG_CLASS(class)     (G_TYPE_CHECK_CLASS_CAST 
((class),PSPPIRE_TYPE_VAR_TYPE_DIALOG,PsppireVarTypeDialogClass))
     +#define PSPPIRE_IS_VAR_TYPE_DIALOG(obj)          
(G_TYPE_CHECK_INSTANCE_TYPE ((obj),PSPPIRE_TYPE_VAR_TYPE_DIALOG))
     +#define PSPPIRE_IS_VAR_TYPE_DIALOG_CLASS(class)  (G_TYPE_CHECK_CLASS_TYPE 
((class),PSPPIRE_TYPE_VAR_TYPE_DIALOG))
     +#define PSPPIRE_VAR_TYPE_DIALOG_GET_CLASS(obj)   
(G_TYPE_INSTANCE_GET_CLASS 
((obj),PSPPIRE_TYPE_VAR_TYPE_DIALOG,PsppireVarTypeDialogClass))
     +
     +typedef struct _PsppireVarTypeDialog      PsppireVarTypeDialog;
     +typedef struct _PsppireVarTypeDialogClass PsppireVarTypeDialogClass;
     +
      /*  This module describes the behaviour of the Variable Type dialog box,
          used for input of the variable type parameter in the var sheet */
      
     @@ -40,14 +52,13 @@ enum
      
      struct variable;
      
     -struct var_type_dialog
     -{
     -  GtkWidget *window;
     +struct _PsppireVarTypeDialog {
     +  PsppireDialog parent;
      
     -  /* Variable to be updated */
     -  struct variable *pv;
     -  
     -  /* Local copy of format specifier */
     +  /* Format being edited. */
     +  struct fmt_spec base_format;
     +
     +  /* Current version of format. */
        struct fmt_spec fmt_l;
      
        /* Toggle Buttons */
     @@ -85,9 +96,21 @@ struct var_type_dialog
        gint active_button;
      };
      
     +struct _PsppireVarTypeDialogClass {
     +  PsppireDialogClass parent_class;
     +};
     +
     +GType psppire_var_type_dialog_get_type (void) G_GNUC_CONST;
     +PsppireVarTypeDialog* psppire_var_type_dialog_new (const struct fmt_spec 
*);
     +
     +void psppire_var_type_dialog_set_format (PsppireVarTypeDialog *,
     +                                         const struct fmt_spec *);
     +const struct fmt_spec *psppire_var_type_dialog_get_format (
     +  const PsppireVarTypeDialog *);
      
     -struct var_type_dialog * var_type_dialog_create (GtkWindow *);
     +void psppire_var_type_dialog_run (GtkWindow *parent_window,
     +                                  struct fmt_spec *format);
      
     -void var_type_dialog_show (struct var_type_dialog *dialog);
     +G_END_DECLS
      
     -#endif
     +#endif /* PSPPIRE_VAR_TYPE_DIALOG_H */
     diff --git a/src/ui/gui/var-type-dialog.ui b/src/ui/gui/var-type-dialog.ui
     index d5cd681..77d825f 100644
     --- a/src/ui/gui/var-type-dialog.ui
     +++ b/src/ui/gui/var-type-dialog.ui
     @@ -16,423 +16,370 @@
          <property name="step_increment">1</property>
          <property name="page_increment">1</property>
        </object>
     -  <object class="GtkWindow" id="var_type_dialog">
     -    <property name="border_width">6</property>
     -    <property name="title" translatable="yes">Variable Type</property>
     -    <property name="resizable">False</property>
     -    <property name="modal">True</property>
     -    <property name="default_width">485</property>
     -    <property name="type_hint">dialog</property>
     -    <property name="skip_taskbar_hint">True</property>
     -    <property name="skip_pager_hint">True</property>
     +  <object class="GtkHBox" id="var-type-dialog">
     +    <property name="visible">True</property>
     +    <property name="border_width">5</property>
     +    <property name="spacing">5</property>
          <child>
     -      <object class="GtkHBox" id="hbox1">
     -        <property name="visible">True</property>
     -        <property name="border_width">5</property>
     -        <property name="spacing">5</property>
     -        <child>
     -          <object class="GtkVBox" id="vbox2">
     -            <property name="visible">True</property>
     -            <property name="border_width">13</property>
     -            <property name="orientation">vertical</property>
     -            <property name="homogeneous">True</property>
     -            <child>
     -              <object class="GtkRadioButton" id="radiobutton1">
     -                <property name="label" 
translatable="yes">Numeric</property>
     -                <property name="visible">True</property>
     -                <property name="can_focus">True</property>
     -                <property name="receives_default">False</property>
     -                <property name="use_underline">True</property>
     -                <property name="active">True</property>
     -                <property name="draw_indicator">True</property>
     -              </object>
     -              <packing>
     -                <property name="expand">False</property>
     -                <property name="fill">False</property>
     -                <property name="position">0</property>
     -              </packing>
     -            </child>
     -            <child>
     -              <object class="GtkRadioButton" id="radiobutton2">
     -                <property name="label" translatable="yes">Comma</property>
     -                <property name="visible">True</property>
     -                <property name="can_focus">True</property>
     -                <property name="receives_default">False</property>
     -                <property name="use_underline">True</property>
     -                <property name="draw_indicator">True</property>
     -                <property name="group">radiobutton1</property>
     -              </object>
     -              <packing>
     -                <property name="expand">False</property>
     -                <property name="fill">False</property>
     -                <property name="position">1</property>
     -              </packing>
     -            </child>
     -            <child>
     -              <object class="GtkRadioButton" id="radiobutton3">
     -                <property name="label" translatable="yes">Dot</property>
     -                <property name="visible">True</property>
     -                <property name="can_focus">True</property>
     -                <property name="receives_default">False</property>
     -                <property name="use_underline">True</property>
     -                <property name="draw_indicator">True</property>
     -                <property name="group">radiobutton1</property>
     -              </object>
     -              <packing>
     -                <property name="expand">False</property>
     -                <property name="fill">False</property>
     -                <property name="position">2</property>
     -              </packing>
     -            </child>
     -            <child>
     -              <object class="GtkRadioButton" id="radiobutton4">
     -                <property name="label" translatable="yes">Scientific 
notation</property>
     -                <property name="visible">True</property>
     -                <property name="can_focus">True</property>
     -                <property name="receives_default">False</property>
     -                <property name="use_underline">True</property>
     -                <property name="draw_indicator">True</property>
     -                <property name="group">radiobutton1</property>
     -              </object>
     -              <packing>
     -                <property name="expand">False</property>
     -                <property name="fill">False</property>
     -                <property name="position">3</property>
     -              </packing>
     -            </child>
     -            <child>
     -              <object class="GtkRadioButton" id="radiobutton5">
     -                <property name="label" translatable="yes">Date</property>
     -                <property name="visible">True</property>
     -                <property name="can_focus">True</property>
     -                <property name="receives_default">False</property>
     -                <property name="use_underline">True</property>
     -                <property name="draw_indicator">True</property>
     -                <property name="group">radiobutton1</property>
     -              </object>
     -              <packing>
     -                <property name="expand">False</property>
     -                <property name="fill">False</property>
     -                <property name="position">4</property>
     -              </packing>
     -            </child>
     -            <child>
     -              <object class="GtkRadioButton" id="radiobutton6">
     -                <property name="label" 
translatable="yes">Dollar</property>
     -                <property name="visible">True</property>
     -                <property name="can_focus">True</property>
     -                <property name="receives_default">False</property>
     -                <property name="use_underline">True</property>
     -                <property name="draw_indicator">True</property>
     -                <property name="group">radiobutton1</property>
     -              </object>
     -              <packing>
     -                <property name="expand">False</property>
     -                <property name="fill">False</property>
     -                <property name="position">5</property>
     -              </packing>
     -            </child>
     -            <child>
     -              <object class="GtkRadioButton" id="radiobutton7">
     -                <property name="label" translatable="yes">Custom 
currency</property>
     -                <property name="visible">True</property>
     -                <property name="can_focus">True</property>
     -                <property name="receives_default">False</property>
     -                <property name="use_underline">True</property>
     -                <property name="draw_indicator">True</property>
     -                <property name="group">radiobutton1</property>
     -              </object>
     -              <packing>
     -                <property name="expand">False</property>
     -                <property name="fill">False</property>
     -                <property name="position">6</property>
     -              </packing>
     -            </child>
     -            <child>
     -              <object class="GtkRadioButton" id="radiobutton8">
     -                <property name="label" 
translatable="yes">String</property>
     -                <property name="visible">True</property>
     -                <property name="can_focus">True</property>
     -                <property name="receives_default">False</property>
     -                <property name="use_underline">True</property>
     -                <property name="draw_indicator">True</property>
     -                <property name="group">radiobutton1</property>
     -              </object>
     -              <packing>
     -                <property name="expand">False</property>
     -                <property name="fill">False</property>
     -                <property name="position">7</property>
     -              </packing>
     -            </child>
     -          </object>
     -          <packing>
     -            <property name="expand">False</property>
     -            <property name="fill">False</property>
     -            <property name="position">0</property>
     -          </packing>
     -        </child>
     -        <child>
     -          <object class="GtkVBox" id="middle_box">
     -            <property name="visible">True</property>
     -            <property name="spacing">10</property>
     -            <child>
     -              <object class="GtkScrolledWindow" id="scrolledwindow4">
     -                <property name="width_request">20</property>
     -                <property name="height_request">194</property>
     -                <property name="can_focus">True</property>
     -                <property name="hscrollbar_policy">never</property>
     -                <property name="shadow_type">in</property>
     -                <child>
     -                  <object class="GtkTreeView" id="date_format_list_view">
     -                    <property name="visible">True</property>
     -                    <property name="can_focus">True</property>
     -                    <property name="headers_visible">False</property>
     -                  </object>
     -                </child>
     -              </object>
     -              <packing>
     -                <property name="expand">False</property>
     -                <property name="fill">False</property>
     -                <property name="position">0</property>
     -              </packing>
     -            </child>
     -            <child>
     -              <object class="GtkHBox" id="custom_currency_hbox">
     -                <property name="spacing">15</property>
     -                <child>
     -                  <object class="GtkScrolledWindow" id="scrolledwindow5">
     -                    <property name="width_request">1</property>
     -                    <property name="height_request">120</property>
     -                    <property name="visible">True</property>
     -                    <property name="can_focus">True</property>
     -                    <property name="hscrollbar_policy">never</property>
     -                    <property name="vscrollbar_policy">never</property>
     -                    <property name="shadow_type">in</property>
     -                    <child>
     -                      <object class="GtkTreeView" id="custom_treeview">
     -                        <property name="visible">True</property>
     -                        <property name="can_focus">True</property>
     -                        <property name="headers_visible">False</property>
     -                      </object>
     -                    </child>
     -                  </object>
     -                  <packing>
     -                    <property name="position">0</property>
     -                  </packing>
     -                </child>
     -                <child>
     -                  <object class="GtkFrame" id="Sample">
     -                    <property name="visible">True</property>
     -                    <property name="label_xalign">0</property>
     -                    <child>
     -                      <object class="GtkAlignment" id="alignment2">
     -                        <property name="visible">True</property>
     -                        <property name="left_padding">12</property>
     -                        <child>
     -                          <object class="GtkVBox" id="vbox10">
     -                            <property name="visible">True</property>
     -                            <property 
name="orientation">vertical</property>
     -                            <property name="homogeneous">True</property>
     -                            <child>
     -                              <object class="GtkLabel" id="psample_label">
     -                                <property name="visible">True</property>
     -                                <property name="label" 
translatable="yes">positive</property>
     -                              </object>
     -                              <packing>
     -                                <property name="position">0</property>
     -                              </packing>
     -                            </child>
     -                            <child>
     -                              <object class="GtkLabel" id="nsample_label">
     -                                <property name="visible">True</property>
     -                                <property name="label" 
translatable="yes">negative</property>
     -                              </object>
     -                              <packing>
     -                                <property name="position">1</property>
     -                              </packing>
     -                            </child>
     -                          </object>
     -                        </child>
     -                      </object>
     -                    </child>
     -                    <child type="label">
     -                      <object class="GtkLabel" id="label13">
     -                        <property name="visible">True</property>
     -                        <property name="label" 
translatable="yes">Sample</property>
     -                        <property name="use_markup">True</property>
     -                      </object>
     -                    </child>
     -                  </object>
     -                  <packing>
     -                    <property name="pack_type">end</property>
     -                    <property name="position">1</property>
     -                  </packing>
     -                </child>
     -              </object>
     -              <packing>
     -                <property name="position">1</property>
     -              </packing>
     -            </child>
     -            <child>
     -              <object class="GtkScrolledWindow" id="dollar_window">
     -                <property name="can_focus">True</property>
     -                <property name="hscrollbar_policy">never</property>
     -                <property name="shadow_type">in</property>
     -                <child>
     -                  <object class="GtkTreeView" id="dollar_treeview">
     -                    <property name="visible">True</property>
     -                    <property name="can_focus">True</property>
     -                    <property name="headers_visible">False</property>
     -                  </object>
     -                </child>
     -              </object>
     -              <packing>
     -                <property name="position">2</property>
     -              </packing>
     -            </child>
     -            <child>
     -              <object class="GtkTable" id="width_decimals">
     -                <property name="width_request">100</property>
     -                <property name="height_request">50</property>
     -                <property name="visible">True</property>
     -                <property name="n_rows">2</property>
     -                <property name="n_columns">2</property>
     -                <property name="column_spacing">2</property>
     -                <property name="row_spacing">1</property>
     -                <child>
     -                  <object class="GtkHBox" id="hbox2">
     -                    <property name="visible">True</property>
     -                    <child>
     -                      <object class="GtkLabel" id="width_label">
     -                        <property name="visible">True</property>
     -                        <property name="label" 
translatable="yes">Width:</property>
     -                        <property name="justify">right</property>
     -                      </object>
     -                      <packing>
     -                        <property name="expand">False</property>
     -                        <property name="fill">False</property>
     -                        <property name="pack_type">end</property>
     -                        <property name="position">0</property>
     -                      </packing>
     -                    </child>
     -                  </object>
     -                  <packing>
     -                    <property name="x_options">GTK_FILL</property>
     -                    <property name="y_options">GTK_FILL</property>
     -                  </packing>
     -                </child>
     -                <child>
     -                  <object class="GtkSpinButton" id="decimals_entry">
     -                    <property name="width_request">25</property>
     -                    <property name="visible">True</property>
     -                    <property name="can_focus">True</property>
     -              <property name="digits">0</property>
     -              <property name="numeric">True</property>
     -              <property name="adjustment">adj_decimals</property>
     -                  </object>
     -                  <packing>
     -                    <property name="left_attach">1</property>
     -                    <property name="right_attach">2</property>
     -                    <property name="top_attach">1</property>
     -                    <property name="bottom_attach">2</property>
     -                    <property name="y_options"></property>
     -                  </packing>
     -                </child>
     -                <child>
     -                  <object class="GtkSpinButton" id="width_entry">
     -                    <property name="width_request">25</property>
     -                    <property name="can_focus">True</property>
     -              <property name="digits">0</property>
     -              <property name="numeric">True</property>
     -              <property name="adjustment">adj_width</property>
     -                  </object>
     -                  <packing>
     -                    <property name="left_attach">1</property>
     -                    <property name="right_attach">2</property>
     -                    <property name="y_options"></property>
     -                  </packing>
     -                </child>
     -                <child>
     -                  <object class="GtkLabel" id="decimals_label">
     -                    <property name="visible">True</property>
     -                    <property name="xalign">0</property>
     -                    <property name="label" translatable="yes">Decimal 
Places:</property>
     -                    <property name="justify">right</property>
     -                  </object>
     -                  <packing>
     -                    <property name="top_attach">1</property>
     -                    <property name="bottom_attach">2</property>
     -                    <property name="x_options">GTK_FILL</property>
     -                    <property name="y_options"></property>
     -                  </packing>
     -                </child>
     -              </object>
     -              <packing>
     -                <property name="position">3</property>
     -              </packing>
     -            </child>
     -          </object>
     -          <packing>
     -            <property name="fill">False</property>
     -            <property name="position">1</property>
     -          </packing>
     -        </child>
     -        <child>
     -          <object class="GtkVButtonBox" id="vbuttonbox6">
     -            <property name="visible">True</property>
     -            <property name="spacing">5</property>
     -            <property name="layout_style">start</property>
     -            <child>
     -              <object class="GtkButton" id="var_type_ok">
     -                <property name="label">gtk-ok</property>
     -                <property name="visible">True</property>
     -                <property name="can_focus">True</property>
     -                <property name="can_default">True</property>
     -                <property name="receives_default">False</property>
     -                <property name="use_stock">True</property>
     -              </object>
     -              <packing>
     -                <property name="expand">False</property>
     -                <property name="fill">False</property>
     -                <property name="position">0</property>
     -              </packing>
     -            </child>
     -            <child>
     -              <object class="GtkButton" id="var_type_cancel">
     -                <property name="label">gtk-cancel</property>
     -                <property name="visible">True</property>
     -                <property name="can_focus">True</property>
     -                <property name="can_default">True</property>
     -                <property name="receives_default">False</property>
     -                <property name="use_stock">True</property>
     -              </object>
     -              <packing>
     -                <property name="expand">False</property>
     -                <property name="fill">False</property>
     -                <property name="position">1</property>
     -              </packing>
     -            </child>
     -            <child>
     -              <object class="GtkButton" id="help_button_variable_type">
     -                <property name="label">gtk-help</property>
     -                <property name="visible">True</property>
     -                <property name="can_focus">True</property>
     -                <property name="can_default">True</property>
     -                <property name="receives_default">False</property>
     -                <property name="use_stock">True</property>
     -              </object>
     -              <packing>
     -                <property name="expand">False</property>
     -                <property name="fill">False</property>
     -                <property name="position">2</property>
     -              </packing>
     -            </child>
     -          </object>
     -          <packing>
     -            <property name="position">2</property>
     -          </packing>
     -        </child>
     +      <object class="GtkVBox" id="vbox2">
     +  <property name="visible">True</property>
     +  <property name="border_width">13</property>
     +  <property name="orientation">vertical</property>
     +  <property name="homogeneous">True</property>
     +  <child>
     +    <object class="GtkRadioButton" id="radiobutton1">
     +      <property name="label" translatable="yes">Numeric</property>
     +      <property name="visible">True</property>
     +      <property name="can_focus">True</property>
     +      <property name="receives_default">False</property>
     +      <property name="use_underline">True</property>
     +      <property name="active">True</property>
     +      <property name="draw_indicator">True</property>
     +    </object>
     +    <packing>
     +      <property name="expand">False</property>
     +      <property name="fill">False</property>
     +      <property name="position">0</property>
     +    </packing>
     +  </child>
     +  <child>
     +    <object class="GtkRadioButton" id="radiobutton2">
     +      <property name="label" translatable="yes">Comma</property>
     +      <property name="visible">True</property>
     +      <property name="can_focus">True</property>
     +      <property name="receives_default">False</property>
     +      <property name="use_underline">True</property>
     +      <property name="draw_indicator">True</property>
     +      <property name="group">radiobutton1</property>
     +    </object>
     +    <packing>
     +      <property name="expand">False</property>
     +      <property name="fill">False</property>
     +      <property name="position">1</property>
     +    </packing>
     +  </child>
     +  <child>
     +    <object class="GtkRadioButton" id="radiobutton3">
     +      <property name="label" translatable="yes">Dot</property>
     +      <property name="visible">True</property>
     +      <property name="can_focus">True</property>
     +      <property name="receives_default">False</property>
     +      <property name="use_underline">True</property>
     +      <property name="draw_indicator">True</property>
     +      <property name="group">radiobutton1</property>
     +    </object>
     +    <packing>
     +      <property name="expand">False</property>
     +      <property name="fill">False</property>
     +      <property name="position">2</property>
     +    </packing>
     +  </child>
     +  <child>
     +    <object class="GtkRadioButton" id="radiobutton4">
     +      <property name="label" translatable="yes">Scientific 
notation</property>
     +      <property name="visible">True</property>
     +      <property name="can_focus">True</property>
     +      <property name="receives_default">False</property>
     +      <property name="use_underline">True</property>
     +      <property name="draw_indicator">True</property>
     +      <property name="group">radiobutton1</property>
     +    </object>
     +    <packing>
     +      <property name="expand">False</property>
     +      <property name="fill">False</property>
     +      <property name="position">3</property>
     +    </packing>
     +  </child>
     +  <child>
     +    <object class="GtkRadioButton" id="radiobutton5">
     +      <property name="label" translatable="yes">Date</property>
     +      <property name="visible">True</property>
     +      <property name="can_focus">True</property>
     +      <property name="receives_default">False</property>
     +      <property name="use_underline">True</property>
     +      <property name="draw_indicator">True</property>
     +      <property name="group">radiobutton1</property>
     +    </object>
     +    <packing>
     +      <property name="expand">False</property>
     +      <property name="fill">False</property>
     +      <property name="position">4</property>
     +    </packing>
     +  </child>
     +  <child>
     +    <object class="GtkRadioButton" id="radiobutton6">
     +      <property name="label" translatable="yes">Dollar</property>
     +      <property name="visible">True</property>
     +      <property name="can_focus">True</property>
     +      <property name="receives_default">False</property>
     +      <property name="use_underline">True</property>
     +      <property name="draw_indicator">True</property>
     +      <property name="group">radiobutton1</property>
     +    </object>
     +    <packing>
     +      <property name="expand">False</property>
     +      <property name="fill">False</property>
     +      <property name="position">5</property>
     +    </packing>
     +  </child>
     +  <child>
     +    <object class="GtkRadioButton" id="radiobutton7">
     +      <property name="label" translatable="yes">Custom currency</property>
     +      <property name="visible">True</property>
     +      <property name="can_focus">True</property>
     +      <property name="receives_default">False</property>
     +      <property name="use_underline">True</property>
     +      <property name="draw_indicator">True</property>
     +      <property name="group">radiobutton1</property>
     +    </object>
     +    <packing>
     +      <property name="expand">False</property>
     +      <property name="fill">False</property>
     +      <property name="position">6</property>
     +    </packing>
     +  </child>
     +  <child>
     +    <object class="GtkRadioButton" id="radiobutton8">
     +      <property name="label" translatable="yes">String</property>
     +      <property name="visible">True</property>
     +      <property name="can_focus">True</property>
     +      <property name="receives_default">False</property>
     +      <property name="use_underline">True</property>
     +      <property name="draw_indicator">True</property>
     +      <property name="group">radiobutton1</property>
     +    </object>
     +    <packing>
     +      <property name="expand">False</property>
     +      <property name="fill">False</property>
     +      <property name="position">7</property>
     +    </packing>
     +  </child>
            </object>
     +      <packing>
     +  <property name="expand">False</property>
     +  <property name="fill">False</property>
     +  <property name="position">0</property>
     +      </packing>
     +    </child>
     +    <child>
     +      <object class="GtkVBox" id="middle_box">
     +  <property name="visible">True</property>
     +  <property name="spacing">10</property>
     +  <child>
     +    <object class="GtkScrolledWindow" id="scrolledwindow4">
     +      <property name="width_request">20</property>
     +      <property name="height_request">194</property>
     +      <property name="can_focus">True</property>
     +      <property name="hscrollbar_policy">never</property>
     +      <property name="shadow_type">in</property>
     +      <child>
     +        <object class="GtkTreeView" id="date_format_list_view">
     +          <property name="visible">True</property>
     +          <property name="can_focus">True</property>
     +          <property name="headers_visible">False</property>
     +        </object>
     +      </child>
     +    </object>
     +    <packing>
     +      <property name="expand">False</property>
     +      <property name="fill">False</property>
     +      <property name="position">0</property>
     +    </packing>
     +  </child>
     +  <child>
     +    <object class="GtkHBox" id="custom_currency_hbox">
     +      <property name="spacing">15</property>
     +      <child>
     +        <object class="GtkScrolledWindow" id="scrolledwindow5">
     +          <property name="width_request">1</property>
     +          <property name="height_request">120</property>
     +          <property name="visible">True</property>
     +          <property name="can_focus">True</property>
     +          <property name="hscrollbar_policy">never</property>
     +          <property name="vscrollbar_policy">never</property>
     +          <property name="shadow_type">in</property>
     +          <child>
     +            <object class="GtkTreeView" id="custom_treeview">
     +              <property name="visible">True</property>
     +              <property name="can_focus">True</property>
     +              <property name="headers_visible">False</property>
     +            </object>
     +          </child>
     +        </object>
     +        <packing>
     +          <property name="position">0</property>
     +        </packing>
     +      </child>
     +      <child>
     +        <object class="GtkFrame" id="Sample">
     +          <property name="visible">True</property>
     +          <property name="label_xalign">0</property>
     +          <child>
     +            <object class="GtkAlignment" id="alignment2">
     +              <property name="visible">True</property>
     +              <property name="left_padding">12</property>
     +              <child>
     +                <object class="GtkVBox" id="vbox10">
     +                  <property name="visible">True</property>
     +                  <property name="orientation">vertical</property>
     +                  <property name="homogeneous">True</property>
     +                  <child>
     +                    <object class="GtkLabel" id="psample_label">
     +                      <property name="visible">True</property>
     +                      <property name="label" 
translatable="yes">positive</property>
     +                    </object>
     +                    <packing>
     +                      <property name="position">0</property>
     +                    </packing>
     +                  </child>
     +                  <child>
     +                    <object class="GtkLabel" id="nsample_label">
     +                      <property name="visible">True</property>
     +                      <property name="label" 
translatable="yes">negative</property>
     +                    </object>
     +                    <packing>
     +                      <property name="position">1</property>
     +                    </packing>
     +                  </child>
     +                </object>
     +              </child>
     +            </object>
     +          </child>
     +          <child type="label">
     +            <object class="GtkLabel" id="label13">
     +              <property name="visible">True</property>
     +              <property name="label" translatable="yes">Sample</property>
     +              <property name="use_markup">True</property>
     +            </object>
     +          </child>
     +        </object>
     +        <packing>
     +          <property name="pack_type">end</property>
     +          <property name="position">1</property>
     +        </packing>
     +      </child>
     +    </object>
     +    <packing>
     +      <property name="position">1</property>
     +    </packing>
     +  </child>
     +  <child>
     +    <object class="GtkScrolledWindow" id="dollar_window">
     +      <property name="can_focus">True</property>
     +      <property name="hscrollbar_policy">never</property>
     +      <property name="shadow_type">in</property>
     +      <child>
     +        <object class="GtkTreeView" id="dollar_treeview">
     +          <property name="visible">True</property>
     +          <property name="can_focus">True</property>
     +          <property name="headers_visible">False</property>
     +        </object>
     +      </child>
     +    </object>
     +    <packing>
     +      <property name="position">2</property>
     +    </packing>
     +  </child>
     +  <child>
     +    <object class="GtkTable" id="width_decimals">
     +      <property name="width_request">100</property>
     +      <property name="height_request">50</property>
     +      <property name="visible">True</property>
     +      <property name="n_rows">2</property>
     +      <property name="n_columns">2</property>
     +      <property name="column_spacing">2</property>
     +      <property name="row_spacing">1</property>
     +      <child>
     +        <object class="GtkHBox" id="hbox2">
     +          <property name="visible">True</property>
     +          <child>
     +            <object class="GtkLabel" id="width_label">
     +              <property name="visible">True</property>
     +              <property name="label" translatable="yes">Width:</property>
     +              <property name="justify">right</property>
     +            </object>
     +            <packing>
     +              <property name="expand">False</property>
     +              <property name="fill">False</property>
     +              <property name="pack_type">end</property>
     +              <property name="position">0</property>
     +            </packing>
     +          </child>
     +        </object>
     +        <packing>
     +          <property name="x_options">GTK_FILL</property>
     +          <property name="y_options">GTK_FILL</property>
     +        </packing>
     +      </child>
     +      <child>
     +        <object class="GtkSpinButton" id="decimals_entry">
     +          <property name="width_request">25</property>
     +          <property name="visible">True</property>
     +          <property name="can_focus">True</property>
     +          <property name="digits">0</property>
     +          <property name="numeric">True</property>
     +          <property name="adjustment">adj_decimals</property>
     +        </object>
     +        <packing>
     +          <property name="left_attach">1</property>
     +          <property name="right_attach">2</property>
     +          <property name="top_attach">1</property>
     +          <property name="bottom_attach">2</property>
     +          <property name="y_options"></property>
     +        </packing>
     +      </child>
     +      <child>
     +        <object class="GtkSpinButton" id="width_entry">
     +          <property name="width_request">25</property>
     +          <property name="can_focus">True</property>
     +          <property name="digits">0</property>
     +          <property name="numeric">True</property>
     +          <property name="adjustment">adj_width</property>
     +        </object>
     +        <packing>
     +          <property name="left_attach">1</property>
     +          <property name="right_attach">2</property>
     +          <property name="y_options"></property>
     +        </packing>
     +      </child>
     +      <child>
     +        <object class="GtkLabel" id="decimals_label">
     +          <property name="visible">True</property>
     +          <property name="xalign">0</property>
     +          <property name="label" translatable="yes">Decimal 
Places:</property>
     +          <property name="justify">right</property>
     +        </object>
     +        <packing>
     +          <property name="top_attach">1</property>
     +          <property name="bottom_attach">2</property>
     +          <property name="x_options">GTK_FILL</property>
     +          <property name="y_options"></property>
     +        </packing>
     +      </child>
     +    </object>
     +    <packing>
     +      <property name="position">3</property>
     +    </packing>
     +  </child>
     +      </object>
     +      <packing>
     +  <property name="fill">False</property>
     +  <property name="position">1</property>
     +      </packing>
     +    </child>
     +    <child>
     +      <object class="PsppireVButtonBox" id="vbuttonbox">
     +  <property name="visible">True</property>
     +  <property name="events">GDK_POINTER_MOTION_MASK | 
GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | 
GDK_BUTTON_RELEASE_MASK</property>
     +  <property name="border_width">5</property>
     +  <property name="buttons">PSPPIRE_BUTTON_CANCEL_MASK | 
PSPPIRE_BUTTON_OK_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
     +      </object>
     +      <packing>
     +  <property name="expand">False</property>
     +  <property name="fill">False</property>
     +  <property name="pack_type">end</property>
     +  <property name="position">1</property>
     +      </packing>
          </child>
        </object>
      </interface>
     -- 
     1.7.2.5
     
     
     _______________________________________________
     pspp-dev mailing list
     address@hidden
     https://lists.gnu.org/mailman/listinfo/pspp-dev

-- 
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://keys.gnupg.net or any PGP keyserver for public key.

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]