+ if (PROP_BUTTONS != prop_id)
+ {
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ return;
+ }
+
+ for (i = 0 ; i < n_PsppireButtonBoxButtons ; ++i )
+ {
+ gboolean visibility;
+ g_object_get (bb->button[i], "visible", &visibility, NULL);
+
+ if ( visibility )
+ flags |= (0x01 << i);
+ }
+
+ g_value_set_flags (value, flags);
+}
+
+
+typedef enum
+ {
+ PSPPIRE_BUTTON_OK_MASK = (1 << PSPPIRE_BUTTON_OK),
+ PSPPIRE_BUTTON_GOTO_MASK = (1 << PSPPIRE_BUTTON_GOTO),
+ PSPPIRE_BUTTON_CONTINUE_MASK = (1 << PSPPIRE_BUTTON_CONTINUE),
+ PSPPIRE_BUTTON_CANCEL_MASK = (1 << PSPPIRE_BUTTON_CANCEL),
+ PSPPIRE_BUTTON_HELP_MASK = (1 << PSPPIRE_BUTTON_HELP),
+ PSPPIRE_BUTTON_RESET_MASK = (1 << PSPPIRE_BUTTON_RESET),
+ PSPPIRE_BUTTON_PASTE_MASK = (1 << PSPPIRE_BUTTON_PASTE)
+ } PsppireButtonMask;
+
+static GParamSpec *button_flags;
+
+static void
+psppire_button_box_class_init (PsppireButtonBoxClass *class)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (class);
+
+ object_class->set_property = psppire_buttonbox_set_property;
+ object_class->get_property = psppire_buttonbox_get_property;
+
+ button_flags =
+ g_param_spec_flags ("buttons",
+ _("Buttons"),
+ _("The mask that decides what buttons appear in the button box"),
+ G_TYPE_PSPPIRE_BUTTON_MASK,
+ PSPPIRE_BUTTON_OK_MASK |
+ PSPPIRE_BUTTON_CANCEL_MASK |
+ PSPPIRE_BUTTON_RESET_MASK |
+ PSPPIRE_BUTTON_HELP_MASK |
+ PSPPIRE_BUTTON_PASTE_MASK,
+ G_PARAM_READWRITE);
+
+
+ g_object_class_install_property (object_class,
+ PROP_BUTTONS,
+ button_flags);