+2002-02-14 Jody Goldberg <jody@gnome.org>
+
+ * gtk/gtkrange.c (gtk_range_class_init) : add new signal
+ 'adjust_bounds' to potentialy change the bounds before assigning the
+ new value and camping it to the existing bounds.
+ (gtk_range_internal_set_value) : used here. #68800.
+ * gtk/gtkmarshalers.list : add VOID:DOUBLE
+
Thu Feb 14 21:08:49 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkglobals.c: Remove GDKVAR from C file, see
+2002-02-14 Jody Goldberg <jody@gnome.org>
+
+ * gtk/gtkrange.c (gtk_range_class_init) : add new signal
+ 'adjust_bounds' to potentialy change the bounds before assigning the
+ new value and camping it to the existing bounds.
+ (gtk_range_internal_set_value) : used here. #68800.
+ * gtk/gtkmarshalers.list : add VOID:DOUBLE
+
Thu Feb 14 21:08:49 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkglobals.c: Remove GDKVAR from C file, see
+2002-02-14 Jody Goldberg <jody@gnome.org>
+
+ * gtk/gtkrange.c (gtk_range_class_init) : add new signal
+ 'adjust_bounds' to potentialy change the bounds before assigning the
+ new value and camping it to the existing bounds.
+ (gtk_range_internal_set_value) : used here. #68800.
+ * gtk/gtkmarshalers.list : add VOID:DOUBLE
+
Thu Feb 14 21:08:49 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkglobals.c: Remove GDKVAR from C file, see
+2002-02-14 Jody Goldberg <jody@gnome.org>
+
+ * gtk/gtkrange.c (gtk_range_class_init) : add new signal
+ 'adjust_bounds' to potentialy change the bounds before assigning the
+ new value and camping it to the existing bounds.
+ (gtk_range_internal_set_value) : used here. #68800.
+ * gtk/gtkmarshalers.list : add VOID:DOUBLE
+
Thu Feb 14 21:08:49 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkglobals.c: Remove GDKVAR from C file, see
+2002-02-14 Jody Goldberg <jody@gnome.org>
+
+ * gtk/gtkrange.c (gtk_range_class_init) : add new signal
+ 'adjust_bounds' to potentialy change the bounds before assigning the
+ new value and camping it to the existing bounds.
+ (gtk_range_internal_set_value) : used here. #68800.
+ * gtk/gtkmarshalers.list : add VOID:DOUBLE
+
Thu Feb 14 21:08:49 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkglobals.c: Remove GDKVAR from C file, see
+2002-02-14 Jody Goldberg <jody@gnome.org>
+
+ * gtk/gtkrange.c (gtk_range_class_init) : add new signal
+ 'adjust_bounds' to potentialy change the bounds before assigning the
+ new value and camping it to the existing bounds.
+ (gtk_range_internal_set_value) : used here. #68800.
+ * gtk/gtkmarshalers.list : add VOID:DOUBLE
+
Thu Feb 14 21:08:49 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkglobals.c: Remove GDKVAR from C file, see
+2002-02-14 Jody Goldberg <jody@gnome.org>
+
+ * gtk/gtkrange.c (gtk_range_class_init) : add new signal
+ 'adjust_bounds' to potentialy change the bounds before assigning the
+ new value and camping it to the existing bounds.
+ (gtk_range_internal_set_value) : used here. #68800.
+ * gtk/gtkmarshalers.list : add VOID:DOUBLE
+
Thu Feb 14 21:08:49 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkglobals.c: Remove GDKVAR from C file, see
NONE:NONE
NONE:STRING,INT,POINTER
STRING:DOUBLE
+VOID:DOUBLE
VOID:BOOLEAN
VOID:BOOLEAN,BOOLEAN,BOOLEAN
VOID:BOXED
enum {
VALUE_CHANGED,
+ ADJUST_BOUNDS,
MOVE_SLIDER,
LAST_SIGNAL
};
_gtk_marshal_NONE__NONE,
G_TYPE_NONE, 0);
+ signals[ADJUST_BOUNDS] =
+ g_signal_new ("adjust_bounds",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (GtkRangeClass, adjust_bounds),
+ NULL, NULL,
+ _gtk_marshal_VOID__DOUBLE,
+ G_TYPE_NONE, 1,
+ G_TYPE_DOUBLE);
+
signals[MOVE_SLIDER] =
g_signal_new ("move_slider",
G_TYPE_FROM_CLASS (object_class),
G_TYPE_NONE, 1,
GTK_TYPE_SCROLL_TYPE);
-
g_object_class_install_property (gobject_class,
PROP_UPDATE_POLICY,
g_param_spec_enum ("update_policy",
gtk_range_internal_set_value (GtkRange *range,
gdouble value)
{
+ /* potentially adjust the bounds _before we clamp */
+ g_signal_emit (G_OBJECT (range), signals[ADJUST_BOUNDS], 0, value);
+
value = CLAMP (value, range->adjustment->lower,
(range->adjustment->upper - range->adjustment->page_size));
gchar *stepper_detail;
void (* value_changed) (GtkRange *range);
+ void (* adjust_bounds) (GtkRange *range,
+ gdouble new_value);
/* action signals for keybindings */
void (* move_slider) (GtkRange *range,