src/ui/gui/psppire-conf.c \
src/ui/gui/psppire-acr.c \
src/ui/gui/psppire-buttonbox.c \
- src/ui/gui/psppire-hbuttonbox.c \
- src/ui/gui/psppire-vbuttonbox.c \
src/ui/gui/psppire-dialog.c \
src/ui/gui/psppire-keypad.c \
src/ui/gui/psppire-dictview.c \
dist_small_pixmap_DATA = \
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/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
</packing>
</child>
<child>
- <object class="PsppireHButtonBox" id="psppire-hbuttonbox1">
+ <object class="PsppireButtonbox" id="psppire-hbuttonbox1">
+ <property name="orientation">horizontal</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
src/ui/gui/psppire-keypad.c \
src/ui/gui/psppire-selector.c \
src/ui/gui/psppire-buttonbox.c \
- src/ui/gui/psppire-hbuttonbox.c \
- src/ui/gui/psppire-vbuttonbox.c \
+ src/ui/gui/psppire-buttonbox.h \
src/ui/gui/psppire-scanf.c \
src/ui/gui/psppire-scanf.h \
src/ui/gui/psppire-acr.c \
src/ui/gui/psppire.c \
src/ui/gui/psppire.h \
src/ui/gui/psppire-acr.h \
- src/ui/gui/psppire-buttonbox.h \
src/ui/gui/psppire-checkbox-treeview.c \
src/ui/gui/psppire-checkbox-treeview.h \
src/ui/gui/psppire-conf.c \
src/ui/gui/psppire-encoding-selector.h \
src/ui/gui/psppire-format.c \
src/ui/gui/psppire-format.h \
- src/ui/gui/psppire-hbuttonbox.h \
src/ui/gui/psppire-keypad.h \
src/ui/gui/psppire-lex-reader.c \
src/ui/gui/psppire-lex-reader.h \
src/ui/gui/psppire-var-ptr.h \
src/ui/gui/psppire-var-sheet.c \
src/ui/gui/psppire-var-sheet.h \
- src/ui/gui/psppire-vbuttonbox.h \
src/ui/gui/psppire-window.c \
src/ui/gui/psppire-window.h \
src/ui/gui/psppire-window-base.c \
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox1">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox1">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox1">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox1">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox1">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox1">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox1">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox1">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireHButtonBox" id="psppire-hbuttonbox2">
+ <object class="PsppireButtonbox" id="psppire-hbuttonbox2">
+ <property name="orientation">horizontal</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox1">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox1">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireHButtonBox" id="psppire-hbuttonbox1">
+ <object class="PsppireButtonbox" id="psppire-hbuttonbox1">
+ <property name="orientation">horizontal</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox1">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox1">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
</packing>
</child>
<child>
- <object class="PsppireHButtonBox" id="psppire-hbuttonbox1">
+ <object class="PsppireButtonbox" id="psppire-hbuttonbox1">
+ <property name="orientation">horizontal</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
</packing>
</child>
<child>
- <object class="PsppireHButtonBox" id="psppire-hbuttonbox2">
+ <object class="PsppireButtonbox" id="psppire-hbuttonbox2">
+ <property name="orientation">horizontal</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox3">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox3">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox1">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox1">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox2">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox2">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox4">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox4">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<object class="PsppireDialogActionWeight" id="data_weight-cases">
<property name="name">data_weight-cases</property>
<property name="label" translatable="yes">_Weight Cases...</property>
- <property name="manager">uimanager1</property>
+ <property name="manager">uimanager1</property>
<property name="tooltip" translatable="yes">Weight cases by variable</property>
<property name="stock-id">data-weight-cases</property>
</object>
<child>
<object class="PsppireDialogActionRecodeSame" id="transform_recode-same">
<property name="name">transform_recode-same</property>
- <property name="manager">uimanager1</property>
+ <property name="manager">uimanager1</property>
<property name="label" translatable="yes">Recode into _Same Variables...</property>
<property name="stock-id">transform-in-to-same-variables</property>
</object>
</child>
<child>
<object class="PsppireDialogActionRecodeDifferent" id="transform_recode-different">
- <property name="manager">uimanager1</property>
+ <property name="manager">uimanager1</property>
<property name="name">transform_recode-different</property>
<property name="label" translatable="yes">Recode into _Different Variables...</property>
<property name="stock-id">transform-in-to-different-variables</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-buttonbox6">
+ <object class="PsppireButtonbox" id="psppire-buttonbox6">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireHButtonBox" id="psppire-hbuttonbox5">
+ <object class="PsppireButtonbox" id="psppire-hbuttonbox5">
+ <property name="orientation">horizontal</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox1">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox1">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox2">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox2">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireHButtonBox" id="psppire-hbuttonbox1">
+ <object class="PsppireButtonbox" id="psppire-hbuttonbox1">
+ <property name="orientation">horizontal</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox3">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox3">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox2">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox2">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="margin_bottom">5</property>
<property name="row_spacing">5</property>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox1">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox1">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="find-buttonbox">
+ <object class="PsppireButtonbox" id="find-buttonbox">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox2">
+ <object class="GtkButtonBox" id="psppire-vbuttonbox2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox3">
+ <object class="GtkButtonBox" id="psppire-vbuttonbox3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox1">
+ <object class="GtkButtonBox" id="psppire-vbuttonbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireHButtonBox" id="psppire-hbuttonbox5">
+ <object class="PsppireButtonbox" id="psppire-hbuttonbox5">
+ <property name="orientation">horizontal</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox1">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox1">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox1">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox1">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox2">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox2">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireHButtonBox" id="psppire-hbuttonbox1">
+ <object class="PsppireButtonbox" id="psppire-hbuttonbox1">
+ <property name="orientation">horizontal</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
</packing>
</child>
<child>
- <object class="PsppireHButtonBox" id="psppire-hbuttonbox1">
+ <object class="PsppireButtonbox" id="psppire-hbuttonbox1">
+ <property name="orientation">horizontal</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox1">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox1">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox2">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox2">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox1">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox1">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-buttonbox6">
+ <object class="PsppireButtonbox" id="psppire-buttonbox6">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireHButtonBox" id="hbuttonbox">
+ <object class="PsppireButtonbox" id="hbuttonbox">
+ <property name="orientation">horizontal</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox1">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox1">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox2">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox2">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox4">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox4">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
GType psppire_button_flags_get_type (void);
-static void psppire_button_box_class_init (PsppireButtonBoxClass *);
-static void psppire_button_box_init (PsppireButtonBox *);
+static void psppire_button_box_class_init (PsppireButtonboxClass *);
+static void psppire_button_box_init (PsppireButtonbox *);
GType
-psppire_button_box_get_type (void)
+psppire_buttonbox_get_type (void)
{
static GType button_box_type = 0;
{
static const GTypeInfo button_box_info =
{
- sizeof (PsppireButtonBoxClass),
+ sizeof (PsppireButtonboxClass),
NULL, /* base_init */
NULL, /* base_finalize */
(GClassInitFunc) psppire_button_box_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
- sizeof (PsppireButtonBox),
+ sizeof (PsppireButtonbox),
0,
(GInstanceInitFunc) psppire_button_box_init,
};
button_box_type = g_type_register_static (GTK_TYPE_BUTTON_BOX,
- "PsppireButtonBox", &button_box_info, G_TYPE_FLAG_ABSTRACT);
+ "PsppireButtonbox", &button_box_info, 0);
}
return button_box_type;
};
static void
-set_default (PsppireButtonBox *bb)
+set_default (PsppireButtonbox *bb)
{
int i;
- for (i = 0 ; i < n_PsppireButtonBoxButtons ; ++i )
+ for (i = 0 ; i < n_PsppireButtonboxButtons ; ++i )
if (bb->def == (1 << i))
{
gtk_widget_set_can_default (bb->button[i], TRUE);
{
gint i;
guint flags;
- PsppireButtonBox *bb = PSPPIRE_BUTTONBOX (object);
+ PsppireButtonbox *bb = PSPPIRE_BUTTONBOX (object);
switch (prop_id)
{
case PROP_BUTTONS:
flags = g_value_get_flags (value);
- for (i = 0 ; i < n_PsppireButtonBoxButtons ; ++i )
+ for (i = 0 ; i < n_PsppireButtonboxButtons ; ++i )
g_object_set (bb->button[i], "visible", 0x01 & (flags >> i) , NULL);
break;
guint flags = 0;
gint i;
- PsppireButtonBox *bb = PSPPIRE_BUTTONBOX (object);
+ PsppireButtonbox *bb = PSPPIRE_BUTTONBOX (object);
switch (prop_id)
{
case PROP_BUTTONS:
- for (i = 0 ; i < n_PsppireButtonBoxButtons ; ++i )
+ for (i = 0 ; i < n_PsppireButtonboxButtons ; ++i )
{
gboolean visibility;
g_object_get (bb->button[i], "visible", &visibility, NULL);
static GParamSpec *default_flags;
static void
-psppire_button_box_class_init (PsppireButtonBoxClass *class)
+psppire_button_box_class_init (PsppireButtonboxClass *class)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
psppire_dialog_reload (dialog);
}
-
-
static void
help_clicked (GtkWidget *w, gpointer data)
{
psppire_dialog_help (dialog);
}
-
-
static void
on_validity_change (GtkWidget *toplevel, gboolean valid, gpointer data)
{
- PsppireButtonBox *bb = data;
+ PsppireButtonbox *bb = data;
/* Set the sensitivity of all the 'executive order' buttons */
gtk_widget_set_sensitive (GTK_WIDGET (bb->button[PSPPIRE_BUTTON_OK]), valid);
}
static void
-psppire_button_box_init (PsppireButtonBox *bb)
+psppire_button_box_init (PsppireButtonbox *bb)
{
bb->def = PSPPIRE_BUTTON_CONTINUE;
flags = g_value_get_flags (&value);
- for (i = 0 ; i < n_PsppireButtonBoxButtons ; ++i )
+ for (i = 0 ; i < n_PsppireButtonboxButtons ; ++i )
g_object_set (bb->button[i], "visible", 0x01 & (flags >> i) , NULL);
g_value_unset (&value);
g_signal_connect (bb, "realize", G_CALLBACK (on_realize), NULL);
}
-
-/* This function was lifted verbatim from the Gtk2.10.6 library.
- But later modified to fit Gtk2.24
- */
-void
-_psppire_button_box_child_requisition (GtkWidget *widget,
- int *nvis_children,
- int *nvis_secondaries,
- int *width,
- int *height)
-{
- GtkButtonBox *bbox;
- GList *children;
- gint nchildren;
- gint nsecondaries;
- gint needed_width;
- gint needed_height;
- GtkRequisition child_requisition;
- gint ipad_w;
- gint ipad_h;
- gint width_default;
- gint height_default;
- gint ipad_x_default;
- gint ipad_y_default;
-
- gint child_min_width;
- gint child_min_height;
- gint ipad_x;
- gint ipad_y;
-
- g_return_if_fail (GTK_IS_BUTTON_BOX (widget));
-
- bbox = GTK_BUTTON_BOX (widget);
-
- gtk_widget_style_get (widget,
- "child-min-width", &width_default,
- "child-min-height", &height_default,
- "child-internal-pad-x", &ipad_x_default,
- "child-internal-pad-y", &ipad_y_default,
- NULL);
-
- child_min_width = width_default;
- child_min_height = height_default;
- ipad_x = ipad_x_default;
- ipad_y = ipad_y_default;
-
- nchildren = 0;
- nsecondaries = 0;
-
- needed_width = child_min_width;
- needed_height = child_min_height;
- ipad_w = ipad_x * 2;
- ipad_h = ipad_y * 2;
-
- children = gtk_container_get_children (GTK_CONTAINER (bbox));
- while (children)
- {
- GtkWidget *child = children->data;
- children = children->next;
-
- if (gtk_widget_get_visible (child))
- {
- gboolean is_secondary = FALSE;
- nchildren += 1;
- gtk_widget_get_preferred_size (child, NULL, &child_requisition);
-
- if (child_requisition.width + ipad_w > needed_width)
- needed_width = child_requisition.width + ipad_w;
- if (child_requisition.height + ipad_h > needed_height)
- needed_height = child_requisition.height + ipad_h;
-
- gtk_container_child_get (GTK_CONTAINER (bbox), child, "secondary", &is_secondary, NULL);
-
- if (is_secondary)
- nsecondaries++;
- }
- }
-
- if (nvis_children)
- *nvis_children = nchildren;
- if (nvis_secondaries)
- *nvis_secondaries = nsecondaries;
- if (width)
- *width = needed_width;
- if (height)
- *height = needed_height;
-}
-
-
GType
psppire_button_flags_get_type (void)
{
G_BEGIN_DECLS
-#define PSPPIRE_BUTTONBOX_TYPE (psppire_button_box_get_type ())
-#define PSPPIRE_BUTTONBOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PSPPIRE_BUTTONBOX_TYPE, PsppireButtonBox))
-#define PSPPIRE_BUTTONBOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PSPPIRE_BUTTONBOX_TYPE, PsppireButtonBoxClass))
+#define PSPPIRE_BUTTONBOX_TYPE (psppire_buttonbox_get_type ())
+#define PSPPIRE_BUTTONBOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PSPPIRE_BUTTONBOX_TYPE, PsppireButtonbox))
+#define PSPPIRE_BUTTONBOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PSPPIRE_BUTTONBOX_TYPE, PsppireButtonboxClass))
#define PSPPIRE_IS_BUTTONBOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PSPPIRE_BUTTONBOX_TYPE))
#define PSPPIRE_IS_BUTTONBOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PSPPIRE_BUTTONBOX_TYPE))
-typedef struct _PsppireButtonBox PsppireButtonBox;
-typedef struct _PsppireButtonBoxClass PsppireButtonBoxClass;
+typedef struct _PsppireButtonbox PsppireButtonbox;
+typedef struct _PsppireButtonboxClass PsppireButtonboxClass;
+
enum
{
PSPPIRE_BUTTON_HELP,
PSPPIRE_BUTTON_RESET,
PSPPIRE_BUTTON_PASTE,
- n_PsppireButtonBoxButtons
+ n_PsppireButtonboxButtons
};
-struct _PsppireButtonBox
+
+struct _PsppireButtonbox
{
GtkButtonBox parent;
/* <private> */
- GtkWidget *button[n_PsppireButtonBoxButtons];
+ GtkWidget *button[n_PsppireButtonboxButtons];
guint def;
};
-struct _PsppireButtonBoxClass
+struct _PsppireButtonboxClass
{
GtkButtonBoxClass parent_class;
};
-GType psppire_button_box_get_type (void);
-
+GType psppire_buttonbox_get_type (void);
-/* Internal function. Do not use */
-void
-_psppire_button_box_child_requisition (GtkWidget *widget,
- int *nvis_children,
- int *nvis_secondaries,
- int *width,
- int *height);
#define PSPPIRE_TYPE_BUTTON_MASK psppire_button_flags_get_type()
+++ /dev/null
-/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2007, 2010, 2011 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
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-
-#include <config.h>
-
-#include <glib.h>
-#include <gtk/gtk.h>
-#include "psppire-hbuttonbox.h"
-#include "psppire-dialog.h"
-
-#include <gettext.h>
-
-#define _(msgid) gettext (msgid)
-#define N_(msgid) msgid
-
-
-static void psppire_hbuttonbox_class_init (PsppireHButtonBoxClass *);
-static void psppire_hbuttonbox_init (PsppireHButtonBox *);
-
-static void gtk_hbutton_box_size_request (GtkWidget *widget,
- GtkRequisition *requisition);
-static void gtk_hbutton_box_size_allocate (GtkWidget *widget,
- GtkAllocation *allocation);
-
-
-static void
-psppire_hbutton_box_get_preferred_height (GtkWidget *widget,
- gint *minimal_height,
- gint *natural_height)
-{
- GtkRequisition requisition;
-
- gtk_hbutton_box_size_request (widget, &requisition);
-
- *minimal_height = *natural_height = requisition.height;
-}
-
-
-static void
-psppire_hbutton_box_get_preferred_width (GtkWidget *widget,
- gint *minimal_width,
- gint *natural_width)
-{
- GtkRequisition requisition;
-
- gtk_hbutton_box_size_request (widget, &requisition);
-
- *minimal_width = *natural_width = requisition.width;
-}
-
-
-
-
-GType
-psppire_hbutton_box_get_type (void)
-{
- static GType hbuttonbox_type = 0;
-
- if (!hbuttonbox_type)
- {
- static const GTypeInfo hbuttonbox_info =
- {
- sizeof (PsppireHButtonBoxClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) psppire_hbuttonbox_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (PsppireHButtonBox),
- 0,
- (GInstanceInitFunc) psppire_hbuttonbox_init,
- };
-
- hbuttonbox_type = g_type_register_static (PSPPIRE_BUTTONBOX_TYPE,
- "PsppireHButtonBox", &hbuttonbox_info, 0);
- }
-
- return hbuttonbox_type;
-}
-
-static void
-psppire_hbuttonbox_class_init (PsppireHButtonBoxClass *class)
-{
- GtkWidgetClass *widget_class;
-
- widget_class = (GtkWidgetClass*) class;
-
- widget_class->get_preferred_width = psppire_hbutton_box_get_preferred_width;
- widget_class->get_preferred_height = psppire_hbutton_box_get_preferred_height;
- widget_class->size_allocate = gtk_hbutton_box_size_allocate;
-}
-
-
-static void
-psppire_hbuttonbox_init (PsppireHButtonBox *hbuttonbox)
-{
-}
-
-
-GtkWidget*
-psppire_hbuttonbox_new (void)
-{
- PsppireHButtonBox *hbuttonbox ;
-
- hbuttonbox = g_object_new (psppire_hbutton_box_get_type (), NULL);
-
- return GTK_WIDGET (hbuttonbox) ;
-}
-
-
-
-/* The following two functions are lifted verbatim from
- the Gtk2.10.6 library */
-
-static void
-gtk_hbutton_box_size_request (GtkWidget *widget,
- GtkRequisition *requisition)
-{
- GtkBox *box;
- GtkButtonBox *bbox;
- gint nvis_children;
- gint child_width;
- gint child_height;
- gint spacing;
- GtkButtonBoxStyle layout;
-
- box = GTK_BOX (widget);
- bbox = GTK_BUTTON_BOX (widget);
-
- spacing = gtk_box_get_spacing (box);
- layout = gtk_button_box_get_layout (bbox) ;
-
- _psppire_button_box_child_requisition (widget,
- &nvis_children,
- NULL,
- &child_width,
- &child_height);
-
- if (nvis_children == 0)
- {
- requisition->width = 0;
- requisition->height = 0;
- }
- else
- {
- switch (layout)
- {
- case GTK_BUTTONBOX_SPREAD:
- requisition->width =
- nvis_children*child_width + ((nvis_children+1)*spacing);
- break;
- default:
- case GTK_BUTTONBOX_EDGE:
- case GTK_BUTTONBOX_START:
- case GTK_BUTTONBOX_END:
- requisition->width = nvis_children*child_width + ((nvis_children-1)*spacing);
- break;
- }
-
- requisition->height = child_height;
- }
-
- requisition->width += gtk_container_get_border_width (GTK_CONTAINER (box)) * 2;
- requisition->height += gtk_container_get_border_width (GTK_CONTAINER (box)) * 2;
-}
-
-
-
-static void
-gtk_hbutton_box_size_allocate (GtkWidget *widget,
- GtkAllocation *allocation)
-{
- GtkBox *base_box;
- GtkButtonBox *box;
- GList *children;
- GtkAllocation child_allocation;
- gint nvis_children;
- gint n_secondaries;
- gint child_width;
- gint child_height;
- gint x = 0;
- gint secondary_x = 0;
- gint y = 0;
- gint width;
- gint childspace;
- gint childspacing = 0;
- GtkButtonBoxStyle layout;
- gint spacing;
-
- base_box = GTK_BOX (widget);
- box = GTK_BUTTON_BOX (widget);
- spacing = gtk_box_get_spacing (base_box);
- layout = gtk_button_box_get_layout (box) ;
- _psppire_button_box_child_requisition (widget,
- &nvis_children,
- &n_secondaries,
- &child_width,
- &child_height);
- gtk_widget_set_allocation (widget, allocation);
- width = allocation->width - gtk_container_get_border_width (GTK_CONTAINER (box))*2;
- switch (layout)
- {
- case GTK_BUTTONBOX_SPREAD:
- childspacing = (width - (nvis_children * child_width)) / (nvis_children + 1);
- x = allocation->x + gtk_container_get_border_width (GTK_CONTAINER (box)) + childspacing;
- secondary_x = x + ((nvis_children - n_secondaries) * (child_width + childspacing));
- break;
- default:
- case GTK_BUTTONBOX_EDGE:
- if (nvis_children >= 2)
- {
- childspacing = (width - (nvis_children * child_width)) / (nvis_children - 1);
- x = allocation->x + gtk_container_get_border_width (GTK_CONTAINER (box));
- secondary_x = x + ((nvis_children - n_secondaries) * (child_width + childspacing));
- }
- else
- {
- /* one or zero children, just center */
- childspacing = width;
- x = secondary_x = allocation->x + (allocation->width - child_width) / 2;
- }
- break;
- case GTK_BUTTONBOX_START:
- childspacing = spacing;
- x = allocation->x + gtk_container_get_border_width (GTK_CONTAINER (box));
- secondary_x = allocation->x + allocation->width
- - child_width * n_secondaries
- - spacing * (n_secondaries - 1)
- - gtk_container_get_border_width (GTK_CONTAINER (box));
- break;
- case GTK_BUTTONBOX_END:
- childspacing = spacing;
- x = allocation->x + allocation->width
- - child_width * (nvis_children - n_secondaries)
- - spacing * (nvis_children - n_secondaries - 1)
- - gtk_container_get_border_width (GTK_CONTAINER (box));
- secondary_x = allocation->x + gtk_container_get_border_width (GTK_CONTAINER (box));
- break;
- }
-
-
- y = allocation->y + (allocation->height - child_height) / 2;
- childspace = child_width + childspacing;
-
- children = gtk_container_get_children (GTK_CONTAINER (box));
-
- while (children)
- {
- GtkWidget *child = children->data;
- children = children->next;
-
- if (gtk_widget_get_visible (child))
- {
- gboolean is_secondary = FALSE;
- gtk_container_child_get (GTK_CONTAINER (box), child, "secondary", &is_secondary, NULL);
-
-
- child_allocation.width = child_width;
- child_allocation.height = child_height;
- child_allocation.y = y;
-
- if (is_secondary)
- {
- child_allocation.x = secondary_x;
- secondary_x += childspace;
- }
- else
- {
- child_allocation.x = x;
- x += childspace;
- }
-
- if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
- child_allocation.x = (allocation->x + allocation->width) - (child_allocation.x + child_width - allocation->x);
-
- gtk_widget_size_allocate (child, &child_allocation);
- }
- }
-}
+++ /dev/null
-/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2007 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
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-
-#ifndef __PSPPIRE_HBBOX_H__
-#define __PSPPIRE_HBBOX_H__
-
-
-#include <glib.h>
-#include <glib-object.h>
-#include "psppire-buttonbox.h"
-
-G_BEGIN_DECLS
-
-#define PSPPIRE_HBUTTON_BOX_TYPE (psppire_hbutton_box_get_type ())
-#define PSPPIRE_HBUTTON_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PSPPIRE_HBUTTON_BOX_TYPE, PsppireHButtonBox))
-#define PSPPIRE_HBUTTON_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PSPPIRE_HBUTTON_BOX_TYPE, PsppireHButtonBoxClass))
-#define PSPPIRE_IS_HBUTTON_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PSPPIRE_HBUTTON_BOX_TYPE))
-#define PSPPIRE_IS_HBUTTON_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PSPPIRE_HBUTTON_BOX_TYPE))
-
-
-typedef struct _PsppireHButtonBox PsppireHButtonBox;
-typedef struct _PsppireHButtonBoxClass PsppireHButtonBoxClass;
-
-struct _PsppireHButtonBox
-{
- PsppireButtonBox parent;
-};
-
-struct _PsppireHButtonBoxClass
-{
- PsppireButtonBoxClass parent_class;
-};
-
-GType psppire_hbutton_box_get_type (void);
-GtkWidget* psppire_hbutton_box_new (void);
-
-G_END_DECLS
-
-#endif /* __PSPPIRE_HBBOX_H__ */
-
+++ /dev/null
-/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2007, 2010, 2011 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
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-
-#include <config.h>
-
-#include <glib.h>
-#include <gtk/gtk.h>
-#include "psppire-vbuttonbox.h"
-#include "psppire-dialog.h"
-
-#include <gettext.h>
-
-#define _(msgid) gettext (msgid)
-#define N_(msgid) msgid
-
-
-static void psppire_vbuttonbox_class_init (PsppireVButtonBoxClass *);
-static void psppire_vbuttonbox_init (PsppireVButtonBox *);
-
-static void gtk_vbutton_box_size_request (GtkWidget *widget,
- GtkRequisition *requisition);
-static void gtk_vbutton_box_size_allocate (GtkWidget *widget,
- GtkAllocation *allocation);
-
-
-static void
-psppire_vbutton_box_get_preferred_height (GtkWidget *widget,
- gint *minimal_height,
- gint *natural_height)
-{
- GtkRequisition requisition;
-
- gtk_vbutton_box_size_request (widget, &requisition);
-
- *minimal_height = *natural_height = requisition.height;
-}
-
-
-static void
-psppire_vbutton_box_get_preferred_width (GtkWidget *widget,
- gint *minimal_width,
- gint *natural_width)
-{
- GtkRequisition requisition;
-
- gtk_vbutton_box_size_request (widget, &requisition);
-
- *minimal_width = *natural_width = requisition.width;
-}
-
-
-GType
-psppire_vbutton_box_get_type (void)
-{
- static GType vbuttonbox_type = 0;
-
- if (!vbuttonbox_type)
- {
- static const GTypeInfo vbuttonbox_info =
- {
- sizeof (PsppireVButtonBoxClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) psppire_vbuttonbox_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (PsppireVButtonBox),
- 0,
- (GInstanceInitFunc) psppire_vbuttonbox_init,
- };
-
- vbuttonbox_type = g_type_register_static (PSPPIRE_BUTTONBOX_TYPE,
- "PsppireVButtonBox", &vbuttonbox_info, 0);
- }
-
- return vbuttonbox_type;
-}
-
-static void
-psppire_vbuttonbox_class_init (PsppireVButtonBoxClass *class)
-{
- GtkWidgetClass *widget_class;
-
- widget_class = (GtkWidgetClass*) class;
-
- widget_class->get_preferred_width = psppire_vbutton_box_get_preferred_width;
- widget_class->get_preferred_height = psppire_vbutton_box_get_preferred_height;
- widget_class->size_allocate = gtk_vbutton_box_size_allocate;
-}
-
-
-static void
-psppire_vbuttonbox_init (PsppireVButtonBox *vbuttonbox)
-{
-}
-
-
-GtkWidget*
-psppire_vbuttonbox_new (void)
-{
- PsppireVButtonBox *vbuttonbox ;
-
- vbuttonbox = g_object_new (psppire_vbutton_box_get_type (), NULL);
-
- return GTK_WIDGET (vbuttonbox) ;
-}
-
-
-
-/* The following two functions are lifted verbatim from
- the Gtk2.10.6 library */
-
-static void
-gtk_vbutton_box_size_request (GtkWidget *widget,
- GtkRequisition *requisition)
-{
- GtkBox *box;
- GtkButtonBox *bbox;
- gint nvis_children;
- gint child_width;
- gint child_height;
- gint spacing;
- GtkButtonBoxStyle layout;
-
- box = GTK_BOX (widget);
- bbox = GTK_BUTTON_BOX (widget);
-
- spacing = gtk_box_get_spacing (box);
- layout = gtk_button_box_get_layout (bbox);
-
- _psppire_button_box_child_requisition (widget,
- &nvis_children,
- NULL,
- &child_width,
- &child_height);
-
- if (nvis_children == 0)
- {
- requisition->width = 0;
- requisition->height = 0;
- }
- else
- {
- switch (layout)
- {
- case GTK_BUTTONBOX_SPREAD:
- requisition->height =
- nvis_children*child_height + ((nvis_children+1)*spacing);
- break;
- case GTK_BUTTONBOX_EDGE:
- case GTK_BUTTONBOX_START:
- case GTK_BUTTONBOX_END:
- default:
- requisition->height =
- nvis_children*child_height + ((nvis_children-1)*spacing);
- break;
- }
- requisition->width = child_width;
- }
-
- requisition->width += gtk_container_get_border_width (GTK_CONTAINER (box)) * 2;
- requisition->height += gtk_container_get_border_width (GTK_CONTAINER (box)) * 2;
-}
-
-
-
-static void
-gtk_vbutton_box_size_allocate (GtkWidget *widget,
- GtkAllocation *allocation)
-{
- GtkBox *base_box;
- GtkButtonBox *box;
- GList *children;
- GtkAllocation child_allocation;
- gint nvis_children;
- gint n_secondaries;
- gint child_width;
- gint child_height;
- gint x = 0;
- gint y = 0;
- gint secondary_y = 0;
- gint height;
- gint childspace;
- gint childspacing = 0;
- GtkButtonBoxStyle layout;
- gint spacing;
-
- base_box = GTK_BOX (widget);
- box = GTK_BUTTON_BOX (widget);
- spacing = gtk_box_get_spacing (base_box);
- layout = gtk_button_box_get_layout (box) ;
- _psppire_button_box_child_requisition (widget,
- &nvis_children,
- &n_secondaries,
- &child_width,
- &child_height);
- gtk_widget_set_allocation (widget, allocation);
- height = allocation->height - gtk_container_get_border_width (GTK_CONTAINER (box))*2;
- switch (layout)
- {
- case GTK_BUTTONBOX_SPREAD:
- childspacing = (height - (nvis_children * child_height)) / (nvis_children + 1);
- y = allocation->y + gtk_container_get_border_width (GTK_CONTAINER (box)) + childspacing;
- secondary_y = y + ((nvis_children - n_secondaries) * (child_height + childspacing));
- break;
- case GTK_BUTTONBOX_EDGE:
- default:
- if (nvis_children >= 2)
- {
- childspacing = (height - (nvis_children*child_height)) / (nvis_children-1);
- y = allocation->y + gtk_container_get_border_width (GTK_CONTAINER (box));
- secondary_y = y + ((nvis_children - n_secondaries) * (child_height + childspacing));
- }
- else
- {
- /* one or zero children, just center */
- childspacing = height;
- y = secondary_y = allocation->y + (allocation->height - child_height) / 2;
- }
- break;
- case GTK_BUTTONBOX_START:
- childspacing = spacing;
- y = allocation->y + gtk_container_get_border_width (GTK_CONTAINER (box));
- secondary_y = allocation->y + allocation->height
- - child_height * n_secondaries
- - spacing * (n_secondaries - 1)
- - gtk_container_get_border_width (GTK_CONTAINER (box));
- break;
- case GTK_BUTTONBOX_END:
- childspacing = spacing;
- y = allocation->y + allocation->height
- - child_height * (nvis_children - n_secondaries)
- - spacing * (nvis_children - n_secondaries - 1)
- - gtk_container_get_border_width (GTK_CONTAINER (box));
- secondary_y = allocation->y + gtk_container_get_border_width (GTK_CONTAINER (box));
- break;
- }
-
- x = allocation->x + (allocation->width - child_width) / 2;
- childspace = child_height + childspacing;
-
- children = gtk_container_get_children (GTK_CONTAINER (box));
- while (children)
- {
- GtkWidget *child = children->data;
- children = children->next;
-
- if (gtk_widget_get_visible (child))
- {
- gboolean is_secondary = FALSE;
- gtk_container_child_get (GTK_CONTAINER (box), child, "secondary", &is_secondary, NULL);
-
- child_allocation.width = child_width;
- child_allocation.height = child_height;
- child_allocation.x = x;
-
- if (is_secondary)
- {
- child_allocation.y = secondary_y;
- secondary_y += childspace;
- }
- else
- {
- child_allocation.y = y;
- y += childspace;
- }
-
- gtk_widget_size_allocate (child, &child_allocation);
- }
- }
-}
-
+++ /dev/null
-/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2007 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
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-
-#ifndef __PSPPIRE_VBBOX_H__
-#define __PSPPIRE_VBBOX_H__
-
-
-#include <glib.h>
-#include <glib-object.h>
-#include "psppire-buttonbox.h"
-
-G_BEGIN_DECLS
-
-#define PSPPIRE_VBUTTON_BOX_TYPE (psppire_vbutton_box_get_type ())
-#define PSPPIRE_VBUTTON_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PSPPIRE_VBUTTON_BOX_TYPE, PsppireVButtonBox))
-#define PSPPIRE_VBUTTON_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PSPPIRE_VBUTTON_BOX_TYPE, PsppireVButtonBoxClass))
-#define PSPPIRE_IS_VBUTTON_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PSPPIRE_VBUTTON_BOX_TYPE))
-#define PSPPIRE_IS_VBUTTON_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PSPPIRE_VBUTTON_BOX_TYPE))
-
-
-typedef struct _PsppireVButtonBox PsppireVButtonBox;
-typedef struct _PsppireVButtonBoxClass PsppireVButtonBoxClass;
-
-struct _PsppireVButtonBox
-{
- PsppireButtonBox parent;
-};
-
-struct _PsppireVButtonBoxClass
-{
- PsppireButtonBoxClass parent_class;
-};
-
-GType psppire_vbutton_box_get_type (void);
-GtkWidget* psppire_vbutton_box_new (void);
-
-G_END_DECLS
-
-#endif /* __PSPPIRE_VBBOX_H__ */
-
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox2">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox2">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox1">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox1">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox3">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox3">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireHButtonBox" id="psppire-hbuttonbox1">
+ <object class="PsppireButtonbox" id="psppire-hbuttonbox1">
+ <property name="orientation">horizontal</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox2">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox2">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox1">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox1">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox2">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox2">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox3">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox3">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox1">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox1">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox1">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox1">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
</packing>
</child>
<child>
- <object class="PsppireHButtonBox" id="psppire-hbuttonbox1">
+ <object class="PsppireButtonbox" id="psppire-hbuttonbox1">
+ <property name="orientation">horizontal</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox2">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox2">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireHButtonBox" id="psppire-hbuttonbox4">
+ <object class="PsppireButtonbox" id="psppire-hbuttonbox4">
+ <property name="orientation">horizontal</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireHButtonBox" id="psppire-hbuttonbox3">
+ <object class="PsppireButtonbox" id="psppire-hbuttonbox3">
+ <property name="orientation">horizontal</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireHButtonBox" id="psppire-hbuttonbox6">
+ <object class="PsppireButtonbox" id="psppire-hbuttonbox6">
+ <property name="orientation">horizontal</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-buttonbox4">
+ <object class="PsppireButtonbox" id="psppire-buttonbox4">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-buttonbox3">
+ <object class="PsppireButtonbox" id="psppire-buttonbox3">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox3">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox3">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="margin_bottom">5</property>
<property name="row_spacing">5</property>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox5">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox5">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-buttonbox2">
+ <object class="PsppireButtonbox" id="psppire-buttonbox2">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox2">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox2">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox3">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox3">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-vbuttonbox1">
+ <object class="PsppireButtonbox" id="psppire-vbuttonbox1">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="vbuttonbox">
+ <object class="PsppireButtonbox" id="vbuttonbox">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="vbuttonbox">
+ <object class="PsppireButtonbox" id="vbuttonbox">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
- <object class="PsppireHButtonBox" id="psppire-hbuttonbox4">
+ <object class="PsppireButtonbox" id="psppire-hbuttonbox4">
+ <property name="orientation">horizontal</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</packing>
</child>
<child>
- <object class="PsppireVButtonBox" id="psppire-buttonbox1">
+ <object class="PsppireButtonbox" id="psppire-buttonbox1">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
#include "psppire-dialog.h"
#include "psppire-selector.h"
-#include "psppire-vbuttonbox.h"
-#include "psppire-hbuttonbox.h"
+#include "psppire-buttonbox.h"
#include "psppire-keypad.h"
#include "psppire-acr.h"
#include "psppire-dictview.h"
psppire_val_chooser_get_type ();
psppire_dialog_get_type ();
psppire_selector_get_type ();
- psppire_vbutton_box_get_type ();
- psppire_hbutton_box_get_type ();
+ psppire_buttonbox_get_type ();
psppire_keypad_get_type ();
psppire_acr_get_type ();
psppire_dict_view_get_type ();