X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-scanf.c;h=52446b38922dadfab027ec8618e8ecebf3a3cda3;hb=c1f04750c4430bf3e7f0630842f879ee695b947d;hp=2396245af7357005b9da109802c379c115815552;hpb=d98577661abddfdb5576b2aea7826bc050f1bb6d;p=pspp diff --git a/src/ui/gui/psppire-scanf.c b/src/ui/gui/psppire-scanf.c index 2396245af7..52446b3892 100644 --- a/src/ui/gui/psppire-scanf.c +++ b/src/ui/gui/psppire-scanf.c @@ -29,7 +29,7 @@ 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 @@ -93,7 +93,7 @@ guts (PsppireScanf *scanf) g_return_if_fail (0 == printf_parse (scanf->format, &scanf->d, &a)); if ( scanf->d.count > 0) - scanf->widgets = xcalloc (sizeof (*scanf->widgets), scanf->d.count); + scanf->widgets = xcalloc (scanf->d.count, sizeof (*scanf->widgets)); /* A is not used, so get rid of it */ if (a.arg != a.direct_alloc_arg) @@ -331,6 +331,7 @@ psppire_scanf_class_init (PsppireScanfClass *class) static void psppire_scanf_init (PsppireScanf *w) { + gtk_orientable_set_orientation (GTK_ORIENTABLE (w), GTK_ORIENTATION_HORIZONTAL); } gchar @@ -349,7 +350,7 @@ psppire_scanf_get_child (PsppireScanf *w, gint n) /* - 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 **,