Commit d466bcb7 authored by Tim Janik's avatar Tim Janik Committed by Tim Janik

only emit "value_changed" if we really passed a new value.

Sat May  2 20:19:03 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkadjustment.c (gtk_adjustment_set_value): only emit
                "value_changed" if we really passed a new value.
                        (gtk_adjustment_changed): new function to emit the "changed" signal.
                                (gtk_adjustment_set_value): new function to emit the "value_changed"
                                        signal.
parent 998ac310
Sat May 2 20:19:03 1998 Tim Janik <timj@gtk.org>
* gtk/gtkadjustment.c (gtk_adjustment_set_value): only emit
"value_changed" if we really passed a new value.
(gtk_adjustment_changed): new function to emit the "changed" signal.
(gtk_adjustment_set_value): new function to emit the "value_changed"
signal.
Fri May 1 12:28:35 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcombo.c: Further changes to the way the window
......
Sat May 2 20:19:03 1998 Tim Janik <timj@gtk.org>
* gtk/gtkadjustment.c (gtk_adjustment_set_value): only emit
"value_changed" if we really passed a new value.
(gtk_adjustment_changed): new function to emit the "changed" signal.
(gtk_adjustment_set_value): new function to emit the "value_changed"
signal.
Fri May 1 12:28:35 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcombo.c: Further changes to the way the window
......
Sat May 2 20:19:03 1998 Tim Janik <timj@gtk.org>
* gtk/gtkadjustment.c (gtk_adjustment_set_value): only emit
"value_changed" if we really passed a new value.
(gtk_adjustment_changed): new function to emit the "changed" signal.
(gtk_adjustment_set_value): new function to emit the "value_changed"
signal.
Fri May 1 12:28:35 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcombo.c: Further changes to the way the window
......
Sat May 2 20:19:03 1998 Tim Janik <timj@gtk.org>
* gtk/gtkadjustment.c (gtk_adjustment_set_value): only emit
"value_changed" if we really passed a new value.
(gtk_adjustment_changed): new function to emit the "changed" signal.
(gtk_adjustment_set_value): new function to emit the "value_changed"
signal.
Fri May 1 12:28:35 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcombo.c: Further changes to the way the window
......
Sat May 2 20:19:03 1998 Tim Janik <timj@gtk.org>
* gtk/gtkadjustment.c (gtk_adjustment_set_value): only emit
"value_changed" if we really passed a new value.
(gtk_adjustment_changed): new function to emit the "changed" signal.
(gtk_adjustment_set_value): new function to emit the "value_changed"
signal.
Fri May 1 12:28:35 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcombo.c: Further changes to the way the window
......
Sat May 2 20:19:03 1998 Tim Janik <timj@gtk.org>
* gtk/gtkadjustment.c (gtk_adjustment_set_value): only emit
"value_changed" if we really passed a new value.
(gtk_adjustment_changed): new function to emit the "changed" signal.
(gtk_adjustment_set_value): new function to emit the "value_changed"
signal.
Fri May 1 12:28:35 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcombo.c: Further changes to the way the window
......
Sat May 2 20:19:03 1998 Tim Janik <timj@gtk.org>
* gtk/gtkadjustment.c (gtk_adjustment_set_value): only emit
"value_changed" if we really passed a new value.
(gtk_adjustment_changed): new function to emit the "changed" signal.
(gtk_adjustment_set_value): new function to emit the "value_changed"
signal.
Fri May 1 12:28:35 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcombo.c: Further changes to the way the window
......
......@@ -126,7 +126,30 @@ gtk_adjustment_set_value (GtkAdjustment *adjustment,
g_return_if_fail (adjustment != NULL);
g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment));
adjustment->value = CLAMP (value, adjustment->lower, adjustment->upper);
value = CLAMP (value, adjustment->lower, adjustment->upper);
if (value != adjustment->value)
{
adjustment->value = value;
gtk_signal_emit_by_name (GTK_OBJECT (adjustment), "value_changed");
}
}
void
gtk_adjustment_changed (GtkAdjustment *adjustment)
{
g_return_if_fail (adjustment != NULL);
g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment));
gtk_signal_emit_by_name (GTK_OBJECT (adjustment), "changed");
}
void
gtk_adjustment_value_changed (GtkAdjustment *adjustment)
{
g_return_if_fail (adjustment != NULL);
g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment));
gtk_signal_emit_by_name (GTK_OBJECT (adjustment), "value_changed");
}
......
......@@ -59,19 +59,21 @@ struct _GtkAdjustmentClass
};
GtkType gtk_adjustment_get_type (void);
GtkObject* gtk_adjustment_new (gfloat value,
gfloat lower,
gfloat upper,
gfloat step_increment,
gfloat page_increment,
gfloat page_size);
void gtk_adjustment_set_value (GtkAdjustment *adjustment,
gfloat value);
void gtk_adjustment_clamp_page (GtkAdjustment *adjustment,
gfloat lower,
gfloat upper);
GtkType gtk_adjustment_get_type (void);
GtkObject* gtk_adjustment_new (gfloat value,
gfloat lower,
gfloat upper,
gfloat step_increment,
gfloat page_increment,
gfloat page_size);
void gtk_adjustment_set_value (GtkAdjustment *adjustment,
gfloat value);
void gtk_adjustment_changed (GtkAdjustment *adjustment);
void gtk_adjustment_value_changed (GtkAdjustment *adjustment);
void gtk_adjustment_clamp_page (GtkAdjustment *adjustment,
gfloat lower,
gfloat upper);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment