Fix compiler warnings
[pspp] / src / ui / gui / psppire-scanf.c
index 2396245af7357005b9da109802c379c115815552..52446b38922dadfab027ec8618e8ecebf3a3cda3 100644 (file)
@@ -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 **,