summaryrefslogtreecommitdiff
path: root/gtk/gtkcontainer.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/gtkcontainer.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/gtkcontainer.c')
-rw-r--r--gtk/gtkcontainer.c46
1 files changed, 20 insertions, 26 deletions
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index d3ee4fbffa..5f04910f95 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -165,7 +165,24 @@ gtk_container_class_init (GtkContainerClass *class)
vadjustment_key_id = g_quark_from_static_string (vadjustment_key);
hadjustment_key_id = g_quark_from_static_string (hadjustment_key);
- gtk_object_add_arg_type ("GtkContainer::border_width", GTK_TYPE_ULONG, GTK_ARG_READWRITE, ARG_BORDER_WIDTH);
+
+ object_class->get_arg = gtk_container_get_arg;
+ object_class->set_arg = gtk_container_set_arg;
+ object_class->destroy = gtk_container_destroy;
+
+ widget_class->show_all = gtk_container_show_all;
+ widget_class->hide_all = gtk_container_hide_all;
+
+ class->add = gtk_container_add_unimplemented;
+ class->remove = gtk_container_remove_unimplemented;
+ class->check_resize = gtk_container_real_check_resize;
+ class->forall = NULL;
+ class->focus = gtk_container_real_focus;
+ class->set_focus_child = gtk_container_real_set_focus_child;
+ class->child_type = NULL;
+ class->composite_name = gtk_container_child_default_composite_name;
+
+ gtk_object_add_arg_type ("GtkContainer::border_width", GTK_TYPE_UINT, GTK_ARG_READWRITE, ARG_BORDER_WIDTH);
gtk_object_add_arg_type ("GtkContainer::resize_mode", GTK_TYPE_RESIZE_MODE, GTK_ARG_READWRITE, ARG_RESIZE_MODE);
gtk_object_add_arg_type ("GtkContainer::child", GTK_TYPE_WIDGET, GTK_ARG_WRITABLE, ARG_CHILD);
gtk_object_add_arg_type ("GtkContainer::reallocate_redraws", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_REALLOCATE_REDRAWS);
@@ -209,23 +226,6 @@ gtk_container_class_init (GtkContainerClass *class)
gtk_marshal_VOID__POINTER,
GTK_TYPE_NONE, 1,
GTK_TYPE_WIDGET);
- gtk_object_class_add_signals (object_class, container_signals, LAST_SIGNAL);
-
- object_class->get_arg = gtk_container_get_arg;
- object_class->set_arg = gtk_container_set_arg;
- object_class->destroy = gtk_container_destroy;
-
- widget_class->show_all = gtk_container_show_all;
- widget_class->hide_all = gtk_container_hide_all;
-
- class->add = gtk_container_add_unimplemented;
- class->remove = gtk_container_remove_unimplemented;
- class->check_resize = gtk_container_real_check_resize;
- class->forall = NULL;
- class->focus = gtk_container_real_focus;
- class->set_focus_child = gtk_container_real_set_focus_child;
- class->child_type = NULL;
- class->composite_name = gtk_container_child_default_composite_name;
}
GtkType
@@ -266,8 +266,6 @@ gtk_container_add_with_args (GtkContainer *container,
gtk_widget_ref (GTK_WIDGET (container));
gtk_widget_ref (widget);
- if (!GTK_OBJECT_CONSTRUCTED (widget))
- gtk_object_default_construct (GTK_OBJECT (widget));
gtk_signal_emit (GTK_OBJECT (container), container_signals[ADD], widget);
if (widget->parent)
@@ -326,8 +324,6 @@ gtk_container_addv (GtkContainer *container,
gtk_widget_ref (GTK_WIDGET (container));
gtk_widget_ref (widget);
- if (!GTK_OBJECT_CONSTRUCTED (widget))
- gtk_object_default_construct (GTK_OBJECT (widget));
gtk_signal_emit (GTK_OBJECT (container), container_signals[ADD], widget);
if (widget->parent)
@@ -646,7 +642,7 @@ gtk_container_set_arg (GtkObject *object,
switch (arg_id)
{
case ARG_BORDER_WIDTH:
- gtk_container_set_border_width (container, GTK_VALUE_ULONG (*arg));
+ gtk_container_set_border_width (container, GTK_VALUE_UINT (*arg));
break;
case ARG_RESIZE_MODE:
gtk_container_set_resize_mode (container, GTK_VALUE_ENUM (*arg));
@@ -674,7 +670,7 @@ gtk_container_get_arg (GtkObject *object,
switch (arg_id)
{
case ARG_BORDER_WIDTH:
- GTK_VALUE_ULONG (*arg) = container->border_width;
+ GTK_VALUE_UINT (*arg) = container->border_width;
break;
case ARG_RESIZE_MODE:
GTK_VALUE_ENUM (*arg) = container->resize_mode;
@@ -714,8 +710,6 @@ gtk_container_add (GtkContainer *container,
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (widget->parent == NULL);
- if (!GTK_OBJECT_CONSTRUCTED (widget))
- gtk_object_default_construct (GTK_OBJECT (widget));
gtk_signal_emit (GTK_OBJECT (container), container_signals[ADD], widget);
}