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.
This commit is contained in:
@ -1,3 +1,11 @@
|
|||||||
|
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>
|
Fri May 1 12:28:35 1998 Owen Taylor <otaylor@gtk.org>
|
||||||
|
|
||||||
* gtk/gtkcombo.c: Further changes to the way the window
|
* gtk/gtkcombo.c: Further changes to the way the window
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
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>
|
Fri May 1 12:28:35 1998 Owen Taylor <otaylor@gtk.org>
|
||||||
|
|
||||||
* gtk/gtkcombo.c: Further changes to the way the window
|
* gtk/gtkcombo.c: Further changes to the way the window
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
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>
|
Fri May 1 12:28:35 1998 Owen Taylor <otaylor@gtk.org>
|
||||||
|
|
||||||
* gtk/gtkcombo.c: Further changes to the way the window
|
* gtk/gtkcombo.c: Further changes to the way the window
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
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>
|
Fri May 1 12:28:35 1998 Owen Taylor <otaylor@gtk.org>
|
||||||
|
|
||||||
* gtk/gtkcombo.c: Further changes to the way the window
|
* gtk/gtkcombo.c: Further changes to the way the window
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
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>
|
Fri May 1 12:28:35 1998 Owen Taylor <otaylor@gtk.org>
|
||||||
|
|
||||||
* gtk/gtkcombo.c: Further changes to the way the window
|
* gtk/gtkcombo.c: Further changes to the way the window
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
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>
|
Fri May 1 12:28:35 1998 Owen Taylor <otaylor@gtk.org>
|
||||||
|
|
||||||
* gtk/gtkcombo.c: Further changes to the way the window
|
* gtk/gtkcombo.c: Further changes to the way the window
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
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>
|
Fri May 1 12:28:35 1998 Owen Taylor <otaylor@gtk.org>
|
||||||
|
|
||||||
* gtk/gtkcombo.c: Further changes to the way the window
|
* 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 (adjustment != NULL);
|
||||||
g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment));
|
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");
|
gtk_signal_emit_by_name (GTK_OBJECT (adjustment), "value_changed");
|
||||||
}
|
}
|
||||||
|
@ -68,6 +68,8 @@ GtkObject* gtk_adjustment_new (gfloat value,
|
|||||||
gfloat page_size);
|
gfloat page_size);
|
||||||
void gtk_adjustment_set_value (GtkAdjustment *adjustment,
|
void gtk_adjustment_set_value (GtkAdjustment *adjustment,
|
||||||
gfloat value);
|
gfloat value);
|
||||||
|
void gtk_adjustment_changed (GtkAdjustment *adjustment);
|
||||||
|
void gtk_adjustment_value_changed (GtkAdjustment *adjustment);
|
||||||
void gtk_adjustment_clamp_page (GtkAdjustment *adjustment,
|
void gtk_adjustment_clamp_page (GtkAdjustment *adjustment,
|
||||||
gfloat lower,
|
gfloat lower,
|
||||||
gfloat upper);
|
gfloat upper);
|
||||||
|
Reference in New Issue
Block a user