-/* GTK - The GIMP Toolkit
+/* GTK - The GTK+ Toolkit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
-#include <config.h>
+#include "config.h"
#include "gtkbbox.h"
#include "gtkprivate.h"
#include "gtkintl.h"
enum {
PROP_0,
- PROP_LAYOUT_STYLE,
- PROP_LAST
+ PROP_LAYOUT_STYLE
};
enum {
CHILD_PROP_SECONDARY
};
-static void gtk_button_box_class_init (GtkButtonBoxClass *klass);
-static void gtk_button_box_init (GtkButtonBox *box);
static void gtk_button_box_set_property (GObject *object,
guint prop_id,
const GValue *value,
#define DEFAULT_CHILD_IPAD_X 4
#define DEFAULT_CHILD_IPAD_Y 0
-GType
-gtk_button_box_get_type (void)
-{
- static GType button_box_type = 0;
-
- if (!button_box_type)
- {
- static const GTypeInfo button_box_info =
- {
- sizeof (GtkButtonBoxClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) gtk_button_box_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (GtkButtonBox),
- 0, /* n_preallocs */
- (GInstanceInitFunc) gtk_button_box_init,
- NULL, /* value_table */
- };
-
- button_box_type =
- g_type_register_static (GTK_TYPE_BOX, "GtkButtonBox",
- &button_box_info, G_TYPE_FLAG_ABSTRACT);
- }
-
- return button_box_type;
-}
+G_DEFINE_ABSTRACT_TYPE (GtkButtonBox, gtk_button_box, GTK_TYPE_BOX)
static void
gtk_button_box_class_init (GtkButtonBoxClass *class)
{
g_return_if_fail (GTK_IS_BUTTON_BOX (widget));
g_return_if_fail (layout_style >= GTK_BUTTONBOX_DEFAULT_STYLE &&
- layout_style <= GTK_BUTTONBOX_END);
+ layout_style <= GTK_BUTTONBOX_CENTER);
if (widget->layout_style != layout_style)
{