summaryrefslogtreecommitdiff
path: root/gtk/gtkbutton.c
diff options
context:
space:
mode:
authorTim Janik <timj@gtk.org>2000-12-13 01:34:41 +0000
committerTim Janik <timj@src.gnome.org>2000-12-13 01:34:41 +0000
commit2c9eb3a5725420394322ecedb1556d59b5b4bcaa (patch)
tree20b8260cee065e2f83ff7bb4f15788f28acfa26a /gtk/gtkbutton.c
parent90461d7def6e605e410713d954307864285e8776 (diff)
downloadgtk+-2c9eb3a5725420394322ecedb1556d59b5b4bcaa.tar.gz
doh, this was broken beyond believe.
Tue Dec 12 23:46:44 2000 Tim Janik <timj@gtk.org> * gtk/stock-icons/Makefile.am: doh, this was broken beyond believe. * gtk/gtkbox.c: change property types from (u)long to (u)int for ::position and ::padding. * gtk/gtkcontainer.c: make ::border_width an INT property. * gtk/gtkpacker.c: make ::position an INT property. * gtk/gtkscrolledwindow.c (gtk_scrolled_window_adjustment_changed): guard against NULL h/v scrollbars, since this is used at construction time. * gtk/gtkclist.[hc]: nuked gtk_clist_construct(), implemented internal gtk_clist_constructor(). * gtk/gtkctree.[hc]: nuked gtk_ctree_construct(), implemented gtk_ctree_constructor(). * gtk/gtkprogressbar.c (gtk_progress_bar_class_init): property ::pulse_step should use ARG_PULSE_STEP, not ARG_FRACTION. * docs/reference/Makefile.am: fun stuff, disabled docs generation again, gtk-scan.c needs to introspec paramspecs, not GtkAgs. * gtk/gtkwidget.[hc]: removed gtk_widget_setv(), gtk_widget_getv(), gtk_widget_newv() and gtk_widget_get(). (gtk_widget_new): use g_object_new_valist(). (gtk_widget_set): use g_object_set_valist(). * gtk/gtkobject.[hc]: removed gtk_object_arg_get_info(), gtk_object_getv(), gtk_object_query_args(), gtk_object_newv(), gtk_object_class_add_signals(), gtk_object_class_user_signal_new(), gtk_object_class_user_signal_newv(), gtk_object_arg_set(), gtk_object_arg_get(), gtk_object_args_collect(), gtk_object_default_construct(), gtk_object_constructed(), GTK_CONSTRUCTED and GTK_OBJECT_CONSTRUCTED(). removed nsignals, signals and n_args members from GtkObjectClass. (gtk_object_new): use g_object_new_valist(). (gtk_object_set): use g_object_set_valist(). (gtk_object_get): use g_object_get_valist(). * gtk/gtkcompat.h: define gtk_object_default_construct(). * gtk/gtktypeutils.c (gtk_type_new): create constructed objects via g_object_new(). * gtk/*.c: removed gtk_object_class_add_signals() from class_init() fucntions, cleaned up method assignments (make sure your structures are setup properly before calling out). removed all GTK_CONSTRUCTED hacks ;)
Diffstat (limited to 'gtk/gtkbutton.c')
-rw-r--r--gtk/gtkbutton.c57
1 files changed, 28 insertions, 29 deletions
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index 639edbca1a..a664032692 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -142,6 +142,33 @@ gtk_button_class_init (GtkButtonClass *klass)
parent_class = gtk_type_class (GTK_TYPE_BIN);
+
+ object_class->set_arg = gtk_button_set_arg;
+ object_class->get_arg = gtk_button_get_arg;
+
+ widget_class->realize = gtk_button_realize;
+ widget_class->draw_focus = gtk_button_draw_focus;
+ widget_class->draw_default = gtk_button_draw_default;
+ widget_class->size_request = gtk_button_size_request;
+ widget_class->size_allocate = gtk_button_size_allocate;
+ widget_class->expose_event = gtk_button_expose;
+ widget_class->button_press_event = gtk_button_button_press;
+ widget_class->button_release_event = gtk_button_button_release;
+ widget_class->enter_notify_event = gtk_button_enter_notify;
+ widget_class->leave_notify_event = gtk_button_leave_notify;
+ widget_class->focus_in_event = gtk_button_focus_in;
+ widget_class->focus_out_event = gtk_button_focus_out;
+
+ container_class->add = gtk_button_add;
+ container_class->remove = gtk_button_remove;
+ container_class->child_type = gtk_button_child_type;
+
+ klass->pressed = gtk_real_button_pressed;
+ klass->released = gtk_real_button_released;
+ klass->clicked = NULL;
+ klass->enter = gtk_real_button_enter;
+ klass->leave = gtk_real_button_leave;
+
gtk_object_add_arg_type ("GtkButton::label", GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_LABEL);
gtk_object_add_arg_type ("GtkButton::relief", GTK_TYPE_RELIEF_STYLE, GTK_ARG_READWRITE, ARG_RELIEF);
@@ -166,6 +193,7 @@ gtk_button_class_init (GtkButtonClass *klass)
GTK_SIGNAL_OFFSET (GtkButtonClass, clicked),
gtk_marshal_VOID__VOID,
GTK_TYPE_NONE, 0);
+ widget_class->activate_signal = button_signals[CLICKED];
button_signals[ENTER] =
gtk_signal_new ("enter",
GTK_RUN_FIRST,
@@ -180,35 +208,6 @@ gtk_button_class_init (GtkButtonClass *klass)
GTK_SIGNAL_OFFSET (GtkButtonClass, leave),
gtk_marshal_VOID__VOID,
GTK_TYPE_NONE, 0);
-
- gtk_object_class_add_signals (object_class, button_signals, LAST_SIGNAL);
-
- object_class->set_arg = gtk_button_set_arg;
- object_class->get_arg = gtk_button_get_arg;
-
- widget_class->activate_signal = button_signals[CLICKED];
- widget_class->realize = gtk_button_realize;
- widget_class->draw_focus = gtk_button_draw_focus;
- widget_class->draw_default = gtk_button_draw_default;
- widget_class->size_request = gtk_button_size_request;
- widget_class->size_allocate = gtk_button_size_allocate;
- widget_class->expose_event = gtk_button_expose;
- widget_class->button_press_event = gtk_button_button_press;
- widget_class->button_release_event = gtk_button_button_release;
- widget_class->enter_notify_event = gtk_button_enter_notify;
- widget_class->leave_notify_event = gtk_button_leave_notify;
- widget_class->focus_in_event = gtk_button_focus_in;
- widget_class->focus_out_event = gtk_button_focus_out;
-
- container_class->add = gtk_button_add;
- container_class->remove = gtk_button_remove;
- container_class->child_type = gtk_button_child_type;
-
- klass->pressed = gtk_real_button_pressed;
- klass->released = gtk_real_button_released;
- klass->clicked = NULL;
- klass->enter = gtk_real_button_enter;
- klass->leave = gtk_real_button_leave;
}
static void