diff options
author | Owen Taylor <otaylor@redhat.com> | 2001-04-02 15:51:28 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2001-04-02 15:51:28 +0000 |
commit | c944151a3cecd2ab199d1645e22d74fe9a66df0a (patch) | |
tree | e5719998626f9ff28d2fce5c88ff2de3c5d7bb43 /gtk/gtkpaned.c | |
parent | 5d1ee0929e0c4fb6cdbfa7a4bf28e2071da9a220 (diff) | |
download | gtk+-c944151a3cecd2ab199d1645e22d74fe9a66df0a.tar.gz |
Fix G_VALUE_NO_COPY_CONTENTS instead of G_SIGNAL_TYPE_STATIC_SCOPE
Mon Apr 2 10:47:57 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_class_init): Fix
G_VALUE_NO_COPY_CONTENTS instead of G_SIGNAL_TYPE_STATIC_SCOPE
stupidity.
Mon Apr 2 00:51:11 2001 Owen Taylor <otaylor@redhat.com>
[ First pass at adding style properties. Still needs some definite
fine-tuning. ]
* gtk/gtkbutton.c: Add ::default_spacing style property.
* gtk/gtkcheckbutton.[ch] gtkradiobutton.c: Add ::indicator_size,
::indicator_spacing style properties.
* gtk/gtkoptionmenu.c: Add ::indicator_size, ::indicator_spacing
style properties.
* gtk/gtk{,h,v}paned.[ch]: Make handle_size a style property
rather than a normal property.
* gtk/gtkwidget.c: Add an ::interior_focus style property to
draw focus inside buttons, in the Windows/Java Metal/etc. style.
* gtk/gtkbutton.c gtk/gtkcheckbutton.c gtk/gtktogglenbutton.c:
Honor ::interior_focus.
* gtk/gtkentry.c: Don't draw focus at all when ::interior_focus is
TRUE.
* gtk/gtkrange.[ch] gtk/gtk{h,v}scrollbar.c gtk/gtk{h,v}scale.c:
Add ::slider_width, ::trough_border, ::stepper_size,
::stepper_spacing style properties.
* gtk/gtkscale.[ch] Add ::slider-length style property.
Diffstat (limited to 'gtk/gtkpaned.c')
-rw-r--r-- | gtk/gtkpaned.c | 35 |
1 files changed, 9 insertions, 26 deletions
diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c index f073791950..17f02860b6 100644 --- a/gtk/gtkpaned.c +++ b/gtk/gtkpaned.c @@ -24,11 +24,11 @@ * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ +#include "gtkintl.h" #include "gtkpaned.h" enum { ARG_0, - ARG_HANDLE_SIZE }; static void gtk_paned_class_init (GtkPanedClass *klass); @@ -110,8 +110,14 @@ gtk_paned_class_init (GtkPanedClass *class) container_class->forall = gtk_paned_forall; container_class->child_type = gtk_paned_child_type; - gtk_object_add_arg_type("GtkPaned::handle_size", GTK_TYPE_UINT, - GTK_ARG_READWRITE, ARG_HANDLE_SIZE); + gtk_widget_class_install_style_property (widget_class, + g_param_spec_int ("handle_size", + _("Handle Size"), + _("Width of handle"), + 0, + G_MAXINT, + 5, + G_PARAM_READABLE)); } static GtkType @@ -136,7 +142,6 @@ gtk_paned_init (GtkPaned *paned) paned->handle_width = 5; paned->handle_height = 5; - paned->handle_size = 5; paned->position_set = FALSE; paned->last_allocation = -1; paned->in_drag = FALSE; @@ -150,13 +155,8 @@ gtk_paned_set_arg (GtkObject *object, GtkArg *arg, guint arg_id) { - GtkPaned *paned = GTK_PANED (object); - switch (arg_id) { - case ARG_HANDLE_SIZE: - gtk_paned_set_handle_size (paned, GTK_VALUE_UINT (*arg)); - break; default: break; } @@ -167,13 +167,8 @@ gtk_paned_get_arg (GtkObject *object, GtkArg *arg, guint arg_id) { - GtkPaned *paned = GTK_PANED (object); - switch (arg_id) { - case ARG_HANDLE_SIZE: - GTK_VALUE_UINT (*arg) = paned->handle_size; - break; default: arg->type = GTK_TYPE_INVALID; break; @@ -518,18 +513,6 @@ gtk_paned_set_position (GtkPaned *paned, } void -gtk_paned_set_handle_size (GtkPaned *paned, - guint16 size) -{ - g_return_if_fail (paned != NULL); - g_return_if_fail (GTK_IS_PANED (paned)); - - gtk_widget_queue_resize (GTK_WIDGET (paned)); - - paned->handle_size = size; -} - -void gtk_paned_compute_position(GtkPaned *paned, gint allocation, gint child1_req, |