+ switch (prop_id)
+ {
+ case PROP_VALUE_LABELS:
+ g_value_set_pointer (value, obj->labs);
+ break;
+ case PROP_VARIABLE:
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+psppire_val_labs_dialog_class_init (PsppireValLabsDialogClass *class)
+{
+ GObjectClass *gobject_class;
+ gobject_class = G_OBJECT_CLASS (class);
+
+ gobject_class->constructor = psppire_val_labs_dialog_constructor;
+ gobject_class->finalize = psppire_val_labs_dialog_finalize;
+ gobject_class->set_property = psppire_val_labs_dialog_set_property;
+ gobject_class->get_property = psppire_val_labs_dialog_get_property;
+
+ g_object_class_install_property (
+ gobject_class, PROP_VARIABLE,
+ g_param_spec_pointer ("variable",
+ "Variable",
+ "Variable whose value labels are to be edited. The "
+ "variable's print format and encoding are also used "
+ "for editing.",
+ G_PARAM_WRITABLE));
+
+ g_object_class_install_property (
+ gobject_class, PROP_VALUE_LABELS,
+ g_param_spec_pointer ("value-labels",
+ "Value Labels",
+ "Edited value labels.",
+ G_PARAM_READABLE));
+}
+
+static void
+psppire_val_labs_dialog_init (PsppireValLabsDialog *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->labs = val_labs_create (0);
+}
+
+static void
+psppire_val_labs_dialog_finalize (GObject *obj)
+{
+ PsppireValLabsDialog *dialog = PSPPIRE_VAL_LABS_DIALOG (obj);