Commit 6ee1ae13 authored by Alexander Larsson's avatar Alexander Larsson Committed by Alexander Larsson

Add properties, based on patch by Lee Mallabone.

2001-05-17  Alexander Larsson  <alla@lysator.liu.se>

	* gtk/gtkbbox.c:
	Add properties, based on patch by Lee Mallabone.

	* gtk/gtknotebook.c:
	* gtk/gtktoolbar.c:
	Convert from GtkArg to GParam, based on patch by John Margaglione.

	* gtk/gtkhscale.c:
	* gtk/gtkvscale.c:
	* gtk/gtkhscrollbar.c:
	* gtk/gtkvscrollbar.c:
	* gtk/gtkrange.c:
	Move adjustment property to GtkRange.

	* gtk/gtklabel.c:
	Setup mnemonics on property changes

	* gtk/gtkwidget.c (gtk_widget_get_property):
	GdkExtensionMode is an enum, not a flag. Set it with
	g_value_set_enum ().

	* tests/prop-editor.c:
	Better propery editor.

	* tests/testgtk.c:
	Add new property test. Pass zero to the property editor to
	get properties from all derived types.
parent be277ae4
2001-05-17 Alexander Larsson <alla@lysator.liu.se>
* gtk/gtkbbox.c:
Add properties, based on patch by Lee Mallabone.
* gtk/gtknotebook.c:
* gtk/gtktoolbar.c:
Convert from GtkArg to GParam, based on patch by John Margaglione.
* gtk/gtkhscale.c:
* gtk/gtkvscale.c:
* gtk/gtkhscrollbar.c:
* gtk/gtkvscrollbar.c:
* gtk/gtkrange.c:
Move adjustment property to GtkRange.
* gtk/gtklabel.c:
Setup mnemonics on property changes
* gtk/gtkwidget.c (gtk_widget_get_property):
GdkExtensionMode is an enum, not a flag. Set it with
g_value_set_enum ().
* tests/prop-editor.c:
Better propery editor.
* tests/testgtk.c:
Add new property test. Pass zero to the property editor to
get properties from all derived types.
Sun May 13 12:01:12 2001 Owen Taylor <otaylor@redhat.com>
* autogen.sh (have_automake): Require libtool-1.4,
......
2001-05-17 Alexander Larsson <alla@lysator.liu.se>
* gtk/gtkbbox.c:
Add properties, based on patch by Lee Mallabone.
* gtk/gtknotebook.c:
* gtk/gtktoolbar.c:
Convert from GtkArg to GParam, based on patch by John Margaglione.
* gtk/gtkhscale.c:
* gtk/gtkvscale.c:
* gtk/gtkhscrollbar.c:
* gtk/gtkvscrollbar.c:
* gtk/gtkrange.c:
Move adjustment property to GtkRange.
* gtk/gtklabel.c:
Setup mnemonics on property changes
* gtk/gtkwidget.c (gtk_widget_get_property):
GdkExtensionMode is an enum, not a flag. Set it with
g_value_set_enum ().
* tests/prop-editor.c:
Better propery editor.
* tests/testgtk.c:
Add new property test. Pass zero to the property editor to
get properties from all derived types.
Sun May 13 12:01:12 2001 Owen Taylor <otaylor@redhat.com>
* autogen.sh (have_automake): Require libtool-1.4,
......
2001-05-17 Alexander Larsson <alla@lysator.liu.se>
* gtk/gtkbbox.c:
Add properties, based on patch by Lee Mallabone.
* gtk/gtknotebook.c:
* gtk/gtktoolbar.c:
Convert from GtkArg to GParam, based on patch by John Margaglione.
* gtk/gtkhscale.c:
* gtk/gtkvscale.c:
* gtk/gtkhscrollbar.c:
* gtk/gtkvscrollbar.c:
* gtk/gtkrange.c:
Move adjustment property to GtkRange.
* gtk/gtklabel.c:
Setup mnemonics on property changes
* gtk/gtkwidget.c (gtk_widget_get_property):
GdkExtensionMode is an enum, not a flag. Set it with
g_value_set_enum ().
* tests/prop-editor.c:
Better propery editor.
* tests/testgtk.c:
Add new property test. Pass zero to the property editor to
get properties from all derived types.
Sun May 13 12:01:12 2001 Owen Taylor <otaylor@redhat.com>
* autogen.sh (have_automake): Require libtool-1.4,
......
2001-05-17 Alexander Larsson <alla@lysator.liu.se>
* gtk/gtkbbox.c:
Add properties, based on patch by Lee Mallabone.
* gtk/gtknotebook.c:
* gtk/gtktoolbar.c:
Convert from GtkArg to GParam, based on patch by John Margaglione.
* gtk/gtkhscale.c:
* gtk/gtkvscale.c:
* gtk/gtkhscrollbar.c:
* gtk/gtkvscrollbar.c:
* gtk/gtkrange.c:
Move adjustment property to GtkRange.
* gtk/gtklabel.c:
Setup mnemonics on property changes
* gtk/gtkwidget.c (gtk_widget_get_property):
GdkExtensionMode is an enum, not a flag. Set it with
g_value_set_enum ().
* tests/prop-editor.c:
Better propery editor.
* tests/testgtk.c:
Add new property test. Pass zero to the property editor to
get properties from all derived types.
Sun May 13 12:01:12 2001 Owen Taylor <otaylor@redhat.com>
* autogen.sh (have_automake): Require libtool-1.4,
......
2001-05-17 Alexander Larsson <alla@lysator.liu.se>
* gtk/gtkbbox.c:
Add properties, based on patch by Lee Mallabone.
* gtk/gtknotebook.c:
* gtk/gtktoolbar.c:
Convert from GtkArg to GParam, based on patch by John Margaglione.
* gtk/gtkhscale.c:
* gtk/gtkvscale.c:
* gtk/gtkhscrollbar.c:
* gtk/gtkvscrollbar.c:
* gtk/gtkrange.c:
Move adjustment property to GtkRange.
* gtk/gtklabel.c:
Setup mnemonics on property changes
* gtk/gtkwidget.c (gtk_widget_get_property):
GdkExtensionMode is an enum, not a flag. Set it with
g_value_set_enum ().
* tests/prop-editor.c:
Better propery editor.
* tests/testgtk.c:
Add new property test. Pass zero to the property editor to
get properties from all derived types.
Sun May 13 12:01:12 2001 Owen Taylor <otaylor@redhat.com>
* autogen.sh (have_automake): Require libtool-1.4,
......
2001-05-17 Alexander Larsson <alla@lysator.liu.se>
* gtk/gtkbbox.c:
Add properties, based on patch by Lee Mallabone.
* gtk/gtknotebook.c:
* gtk/gtktoolbar.c:
Convert from GtkArg to GParam, based on patch by John Margaglione.
* gtk/gtkhscale.c:
* gtk/gtkvscale.c:
* gtk/gtkhscrollbar.c:
* gtk/gtkvscrollbar.c:
* gtk/gtkrange.c:
Move adjustment property to GtkRange.
* gtk/gtklabel.c:
Setup mnemonics on property changes
* gtk/gtkwidget.c (gtk_widget_get_property):
GdkExtensionMode is an enum, not a flag. Set it with
g_value_set_enum ().
* tests/prop-editor.c:
Better propery editor.
* tests/testgtk.c:
Add new property test. Pass zero to the property editor to
get properties from all derived types.
Sun May 13 12:01:12 2001 Owen Taylor <otaylor@redhat.com>
* autogen.sh (have_automake): Require libtool-1.4,
......
2001-05-17 Alexander Larsson <alla@lysator.liu.se>
* gtk/gtkbbox.c:
Add properties, based on patch by Lee Mallabone.
* gtk/gtknotebook.c:
* gtk/gtktoolbar.c:
Convert from GtkArg to GParam, based on patch by John Margaglione.
* gtk/gtkhscale.c:
* gtk/gtkvscale.c:
* gtk/gtkhscrollbar.c:
* gtk/gtkvscrollbar.c:
* gtk/gtkrange.c:
Move adjustment property to GtkRange.
* gtk/gtklabel.c:
Setup mnemonics on property changes
* gtk/gtkwidget.c (gtk_widget_get_property):
GdkExtensionMode is an enum, not a flag. Set it with
g_value_set_enum ().
* tests/prop-editor.c:
Better propery editor.
* tests/testgtk.c:
Add new property test. Pass zero to the property editor to
get properties from all derived types.
Sun May 13 12:01:12 2001 Owen Taylor <otaylor@redhat.com>
* autogen.sh (have_automake): Require libtool-1.4,
......
......@@ -27,9 +27,22 @@
#include "gtkbbox.h"
#include "gtkintl.h"
enum {
PROP_0,
PROP_LAYOUT_STYLE,
PROP_LAST
};
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,
GParamSpec *pspec);
static void gtk_button_box_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec);
#define DEFAULT_CHILD_MIN_WIDTH 85
#define DEFAULT_CHILD_MIN_HEIGHT 27
......@@ -65,9 +78,14 @@ static void
gtk_button_box_class_init (GtkButtonBoxClass *class)
{
GtkWidgetClass *widget_class;
GObjectClass *gobject_class;
gobject_class = G_OBJECT_CLASS (class);
widget_class = (GtkWidgetClass*) class;
gobject_class->set_property = gtk_button_box_set_property;
gobject_class->get_property = gtk_button_box_get_property;
/* FIXME we need to override the "spacing" property on GtkBox once
* libgobject allows that.
*/
......@@ -107,6 +125,14 @@ gtk_button_box_class_init (GtkButtonBoxClass *class)
G_MAXINT,
DEFAULT_CHILD_IPAD_Y,
G_PARAM_READABLE));
g_object_class_install_property (gobject_class,
PROP_LAYOUT_STYLE,
g_param_spec_enum ("layout_style",
_("Layout style"),
_("How to layout the buttons in the box. Possible values are default, spread, edge, start and end"),
GTK_TYPE_BUTTON_BOX_STYLE,
GTK_BUTTONBOX_DEFAULT_STYLE,
G_PARAM_READWRITE));
}
static void
......@@ -120,6 +146,43 @@ gtk_button_box_init (GtkButtonBox *button_box)
button_box->layout_style = GTK_BUTTONBOX_DEFAULT_STYLE;
}
static void
gtk_button_box_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
switch (prop_id)
{
case PROP_LAYOUT_STYLE:
gtk_button_box_set_layout (GTK_BUTTON_BOX (object),
g_value_get_enum (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gtk_button_box_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
switch (prop_id)
{
case PROP_LAYOUT_STYLE:
g_value_set_enum (value, GTK_BUTTON_BOX (object)->layout_style);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
/* set per widget values for spacing, child size and child internal padding */
void gtk_button_box_set_child_size (GtkButtonBox *widget, gint width, gint height)
......@@ -141,7 +204,12 @@ void gtk_button_box_set_layout (GtkButtonBox *widget,
g_return_if_fail (layout_style >= GTK_BUTTONBOX_DEFAULT_STYLE &&
layout_style <= GTK_BUTTONBOX_END);
widget->layout_style = layout_style;
if (widget->layout_style != layout_style)
{
widget->layout_style = layout_style;
g_object_notify (G_OBJECT (widget), "layout_style");
gtk_widget_queue_resize (GTK_WIDGET (widget));
}
}
......
......@@ -35,8 +35,7 @@
#define RANGE_CLASS(w) GTK_RANGE_GET_CLASS (w)
enum {
PROP_0,
PROP_ADJUSTMENT
PROP_0
};
static void gtk_hscale_class_init (GtkHScaleClass *klass);
......@@ -132,13 +131,6 @@ gtk_hscale_class_init (GtkHScaleClass *class)
scale_class->draw_value = gtk_hscale_draw_value;
g_object_class_install_property (gobject_class,
PROP_ADJUSTMENT,
g_param_spec_object ("adjustment",
_("Adjustment"),
_("The GtkAdjustment that determines the values to use for this HScale."),
GTK_TYPE_ADJUSTMENT,
G_PARAM_READWRITE));
binding_set = gtk_binding_set_by_class (object_class);
add_slider_binding (binding_set, GDK_Left, 0,
......@@ -192,9 +184,6 @@ gtk_hscale_set_property (GObject *object,
switch (prop_id)
{
case PROP_ADJUSTMENT:
gtk_range_set_adjustment (GTK_RANGE (hscale), g_value_get_object (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
......@@ -213,10 +202,6 @@ gtk_hscale_get_property (GObject *object,
switch (prop_id)
{
case PROP_ADJUSTMENT:
g_value_set_object (value,
G_OBJECT (gtk_range_get_adjustment (GTK_RANGE (hscale))));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
......
......@@ -35,8 +35,7 @@
#define RANGE_CLASS(w) GTK_RANGE_GET_CLASS (w)
enum {
PROP_0,
PROP_ADJUSTMENT
PROP_0
};
static void gtk_hscrollbar_class_init (GtkHScrollbarClass *klass);
......@@ -109,15 +108,6 @@ gtk_hscrollbar_class_init (GtkHScrollbarClass *class)
range_class->slider_update = gtk_hscrollbar_slider_update;
range_class->trough_click = _gtk_range_default_htrough_click;
range_class->motion = _gtk_range_default_hmotion;
g_object_class_install_property (gobject_class,
PROP_ADJUSTMENT,
g_param_spec_object ("adjustment",
_("Adjustment"),
_("The GtkAdjustment that determines the values to use for this scrollbar."),
GTK_TYPE_ADJUSTMENT,
G_PARAM_READWRITE));
}
static void
......@@ -132,10 +122,6 @@ gtk_hscrollbar_set_property (GObject *object,
switch (prop_id)
{
case PROP_ADJUSTMENT:
gtk_range_set_adjustment (GTK_RANGE (hscrollbar),
g_value_get_object (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
......@@ -154,9 +140,6 @@ gtk_hscrollbar_get_property (GObject *object,
switch (prop_id)
{
case PROP_ADJUSTMENT:
g_value_set_object (value, G_OBJECT (hscrollbar));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
......
......@@ -125,6 +125,8 @@ static void gtk_label_select_region_index (GtkLabel *label,
static gboolean gtk_label_mnemonic_activate (GtkWidget *widget,
gboolean group_cycling);
static void gtk_label_setup_mnemonic (GtkLabel *label,
guint last_key);
static GtkMiscClass *parent_class = NULL;
......@@ -272,8 +274,10 @@ gtk_label_set_property (GObject *object,
GParamSpec *pspec)
{
GtkLabel *label;
guint last_keyval;
label = GTK_LABEL (object);
last_keyval = label->mnemonic_keyval;
switch (prop_id)
{
......@@ -281,6 +285,8 @@ gtk_label_set_property (GObject *object,
gtk_label_set_label_internal (label,
g_strdup (g_value_get_string (value)));
gtk_label_recalculate (label);
if (last_keyval != label->mnemonic_keyval)
gtk_label_setup_mnemonic (label, last_keyval);
break;
case PROP_ATTRIBUTES:
gtk_label_set_attributes (label, g_value_get_boxed (value));
......@@ -292,6 +298,8 @@ gtk_label_set_property (GObject *object,
case PROP_USE_UNDERLINE:
gtk_label_set_use_underline_internal (label, g_value_get_boolean (value));
gtk_label_recalculate (label);
if (label->use_underline)
gtk_label_setup_mnemonic (label, last_keyval);
break;
case PROP_JUSTIFY:
gtk_label_set_justify (label, g_value_get_enum (value));
......
This diff is collapsed.
......@@ -40,7 +40,8 @@
enum {
PROP_0,
PROP_UPDATE_POLICY
PROP_UPDATE_POLICY,
PROP_ADJUSTMENT
};
enum {
......@@ -197,6 +198,14 @@ gtk_range_class_init (GtkRangeClass *class)
GTK_UPDATE_CONTINUOUS,
G_PARAM_READWRITE));
g_object_class_install_property (gobject_class,
PROP_ADJUSTMENT,
g_param_spec_object ("adjustment",
_("Adjustment"),
_("The GtkAdjustment that contains the current value of this range object"),
GTK_TYPE_ADJUSTMENT,
G_PARAM_READWRITE));
gtk_widget_class_install_style_property (widget_class,
g_param_spec_int ("slider_width",
_("Slider Width"),
......@@ -246,6 +255,9 @@ gtk_range_set_property (GObject *object,
case PROP_UPDATE_POLICY:
gtk_range_set_update_policy (range, g_value_get_enum (value));
break;
case PROP_ADJUSTMENT:
gtk_range_set_adjustment (range, g_value_get_object (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
......@@ -267,6 +279,9 @@ gtk_range_get_property (GObject *object,
case PROP_UPDATE_POLICY:
g_value_set_enum (value, range->policy);
break;
case PROP_ADJUSTMENT:
g_value_set_object (value, G_OBJECT (range->adjustment));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
......@@ -363,6 +378,7 @@ gtk_range_set_adjustment (GtkRange *range,
range->old_page_size = adjustment->page_size;
gtk_range_adjustment_changed (adjustment, (gpointer) range);
g_object_notify (G_OBJECT (range), "adjustment");
}
}
......
......@@ -48,12 +48,9 @@
#define SPACE_LINE_END 7
enum {
ARG_0,
ARG_ORIENTATION,
ARG_TOOLBAR_STYLE,
ARG_SPACE_SIZE,
ARG_SPACE_STYLE,
ARG_RELIEF
PROP_0,
PROP_ORIENTATION,
PROP_TOOLBAR_STYLE,
};
enum {
......@@ -72,12 +69,14 @@ struct _GtkToolbarChildSpace
static void gtk_toolbar_class_init (GtkToolbarClass *class);
static void gtk_toolbar_init (GtkToolbar *toolbar);
static void gtk_toolbar_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void gtk_toolbar_get_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void gtk_toolbar_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec);
static void gtk_toolbar_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec);
static void gtk_toolbar_destroy (GtkObject *object);
static void gtk_toolbar_map (GtkWidget *widget);
static void gtk_toolbar_unmap (GtkWidget *widget);
......@@ -164,10 +163,12 @@ gtk_toolbar_get_type (void)
static void
gtk_toolbar_class_init (GtkToolbarClass *class)
{
GObjectClass *gobject_class;
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
GtkContainerClass *container_class;
gobject_class = G_OBJECT_CLASS (class);
object_class = (GtkObjectClass *) class;
widget_class = (GtkWidgetClass *) class;
container_class = (GtkContainerClass *) class;
......@@ -175,8 +176,8 @@ gtk_toolbar_class_init (GtkToolbarClass *class)
parent_class = gtk_type_class (gtk_container_get_type ());
object_class->destroy = gtk_toolbar_destroy;
object_class->set_arg = gtk_toolbar_set_arg;
object_class->get_arg = gtk_toolbar_get_arg;
gobject_class->set_property = gtk_toolbar_set_property;
gobject_class->get_property = gtk_toolbar_get_property;
widget_class->map = gtk_toolbar_map;
widget_class->unmap = gtk_toolbar_unmap;
......@@ -210,10 +211,24 @@ gtk_toolbar_class_init (GtkToolbarClass *class)
GTK_TYPE_NONE, 1,
GTK_TYPE_INT);
gtk_object_add_arg_type ("GtkToolbar::orientation", GTK_TYPE_ORIENTATION,
GTK_ARG_READWRITE, ARG_ORIENTATION);
gtk_object_add_arg_type ("GtkToolbar::toolbar_style", GTK_TYPE_TOOLBAR_STYLE,
GTK_ARG_READWRITE, ARG_TOOLBAR_STYLE);
g_object_class_install_property (gobject_class,
PROP_ORIENTATION,
g_param_spec_enum ("orientation",
_("Orientation"),
_("The orientation of the toolbar"),
GTK_TYPE_ORIENTATION,
GTK_ORIENTATION_HORIZONTAL,
G_PARAM_READWRITE));
g_object_class_install_property (gobject_class,
PROP_TOOLBAR_STYLE,
g_param_spec_enum ("toolbar_style",
_("Toolbar Style"),
_("How to draw the toolbar"),
GTK_TYPE_TOOLBAR_STYLE,
GTK_TOOLBAR_ICONS,
G_PARAM_READWRITE));
gtk_widget_class_install_style_property (widget_class,
g_param_spec_int ("space_size",
......@@ -258,40 +273,42 @@ gtk_toolbar_init (GtkToolbar *toolbar)
}
static void
gtk_toolbar_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id)
gtk_toolbar_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
GtkToolbar *toolbar = GTK_TOOLBAR (object);
switch (arg_id)
switch (prop_id)
{
case ARG_ORIENTATION:
gtk_toolbar_set_orientation (toolbar, GTK_VALUE_ENUM (*arg));
case PROP_ORIENTATION:
gtk_toolbar_set_orientation (toolbar, g_value_get_enum (value));
break;
case ARG_TOOLBAR_STYLE:
gtk_toolbar_set_style (toolbar, GTK_VALUE_ENUM (*arg));
case PROP_TOOLBAR_STYLE:
gtk_toolbar_set_style (toolbar, g_value_get_enum (value));
break;
}
}
static void
gtk_toolbar_get_arg (GtkObject *object,
GtkArg *arg,
guint arg_id)
gtk_toolbar_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
GtkToolbar *toolbar = GTK_TOOLBAR (object);
switch (arg_id)
switch (prop_id)
{
case ARG_ORIENTATION:
GTK_VALUE_ENUM (*arg) = toolbar->orientation;
case PROP_ORIENTATION:
g_value_set_enum (value, toolbar->orientation);
break;
case ARG_TOOLBAR_STYLE:
GTK_VALUE_ENUM (*arg) = toolbar->style;
case PROP_TOOLBAR_STYLE:
g_value_set_enum (value, toolbar->style);
break;
default:
arg->type = GTK_TYPE_INVALID;
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
......@@ -1262,6 +1279,7 @@ gtk_real_toolbar_orientation_changed (GtkToolbar *toolbar,
{
toolbar->orientation = orientation;
gtk_widget_queue_resize (GTK_WIDGET (toolbar));
g_object_notify (G_OBJECT (toolbar), "orientation");
}
}
......@@ -1400,8 +1418,9 @@ gtk_real_toolbar_style_changed (GtkToolbar *toolbar,
g_assert_not_reached ();
}
}
gtk_widget_queue_resize (GTK_WIDGET (toolbar));
g_object_notify (G_OBJECT (toolbar), "toolbar_style");
}
}
......
......@@ -36,8 +36,7 @@
#define RANGE_CLASS(w) GTK_RANGE_GET_CLASS (w)
enum {
PROP_0,
PROP_ADJUSTMENT
PROP_0
};
static void gtk_vscale_class_init (GtkVScaleClass *klass);
......@@ -131,14 +130,6 @@ gtk_vscale_class_init (GtkVScaleClass *class)
scale_class->draw_value = gtk_vscale_draw_value;
g_object_class_install_property (gobject_class,
PROP_ADJUSTMENT,
g_param_spec_object ("adjustment",
_("Adjustment"),
_("The GtkAdjustment that determines the values to use for this VScale."),
GTK_TYPE_ADJUSTMENT,
G_PARAM_READWRITE));
binding_set = gtk_binding_set_by_class (object_class);
add_slider_binding (binding_set, GDK_Up, 0,
......@@ -204,9 +195,6 @@ gtk_vscale_set_property (GObject *object,
switch (prop_id)
{
case PROP_ADJUSTMENT:
gtk_range_set_adjustment (GTK_RANGE (vscale), g_value_get_object (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
......@@ -225,10 +213,6 @@ gtk_vscale_get_property (GObject *object,
switch (prop_id)
{
case PROP_ADJUSTMENT:
g_value_set_object (value,
G_OBJECT (gtk_range_get_adjustment (GTK_RANGE (vscale))));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
......
......@@ -36,7 +36,6 @@
enum {
PROP_0,
PROP_ADJUSTMENT
};
static void gtk_vscrollbar_class_init (GtkVScrollbarClass *klass);
......@@ -107,15 +106,6 @@ gtk_vscrollbar_class_init (GtkVScrollbarClass *class)
range_class->slider_update = gtk_vscrollbar_slider_update;
range_class->trough_click = _gtk_range_default_vtrough_click;
range_class->motion = _gtk_range_default_vmotion;
g_object_class_install_property (gobject_class,
PROP_ADJUSTMENT,
g_param_spec_object ("adjustment",
_("Adjustment"),
_("The GtkAdjustment that determines the values to use for this scrollbar."),
GTK_TYPE_ADJUSTMENT,
G_PARAM_READWRITE));
}
static void
......@@ -130,9 +120,6 @@ gtk_vscrollbar_set_property (GObject *object,
switch (prop_id)
{
case PROP_ADJUSTMENT:
gtk_range_set_adjustment (GTK_RANGE (vscrollbar), g_value_get_object (value));