#include "psppire-acr.h"
#include "helper.h"
-G_DEFINE_TYPE (PsppireAcr, psppire_acr, GTK_TYPE_HBOX);
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+#define N_(msgid) msgid
+
+G_DEFINE_TYPE (PsppireAcr, psppire_acr, GTK_TYPE_BOX);
static void
psppire_acr_dispose (GObject *obj)
&& row_is_selected (acr));
}
-
static void
psppire_acr_init (PsppireAcr *acr)
{
GtkWidget *sw = gtk_scrolled_window_new (NULL, NULL);
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (acr), GTK_ORIENTATION_HORIZONTAL);
+
acr->tv = GTK_TREE_VIEW (gtk_tree_view_new ());
- acr->add_button = gtk_button_new_from_stock (GTK_STOCK_ADD);
- acr->change_button = gtk_button_new_from_stock (GTK_STOCK_EDIT);
- acr->remove_button = gtk_button_new_from_stock (GTK_STOCK_REMOVE);
+ acr->add_button = gtk_button_new_with_label (_("Add"));
+ acr->change_button = gtk_button_new_with_label (_("Edit"));
+ acr->remove_button = gtk_button_new_with_label (_("Remove"));
acr->get_value = NULL;
acr->get_value_data = NULL;
struct _PsppireAcr
{
- GtkHBox parent;
+ GtkBox parent;
GtkListStore *list_store;
struct _PsppireAcrClass
{
- GtkHBoxClass parent_class;
+ GtkBoxClass parent_class;
};
static void psppire_scanf_class_init (PsppireScanfClass *class);
static void psppire_scanf_init (PsppireScanf *w);
-G_DEFINE_TYPE (PsppireScanf, psppire_scanf, GTK_TYPE_HBOX)
+G_DEFINE_TYPE (PsppireScanf, psppire_scanf, GTK_TYPE_BOX)
/* Properties */
enum
static void
psppire_scanf_init (PsppireScanf *w)
{
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (w), GTK_ORIENTATION_HORIZONTAL);
}
gchar
/*
- This widget is a GtkHBox populated with GtkLabel and GtkEntry widgets.
+ This widget is a horizontal GtkBox populated with GtkLabel and GtkEntry widgets.
Each conversion in FMT will cause a GtkEntry (possibly a GtkSpinButton) to
be created. Any text between conversions produces a GtkLabel.
There should be N arguments following FMT should be of type GtkEntry **,
/* All members are private. */
struct _PsppireScanf
{
- GtkHBox parent;
+ GtkBox parent;
const gchar *format;
GtkWidget **widgets;
struct _PsppireScanfClass
{
- GtkHBoxClass parent_class;
+ GtkBoxClass parent_class;
};