diff --git a/ChangeLog b/ChangeLog index 1234255e3e..6d83029a2f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2001-06-06 Havoc Pennington + + * gtk/gtkrange.c (gtk_range_class_init): add "inverted" property + + * gtk/gtkscale.c (gtk_scale_class_init): Change Page Up and Page + Down to move visually rather than logically, since it confuses + people. Add -/+ and Ctrl--/+ bindings for logical movement. + Wed Jun 6 10:34:42 2001 Owen Taylor * gtk/gtktooltips.h: Include gtkwidget.h diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 1234255e3e..6d83029a2f 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,11 @@ +2001-06-06 Havoc Pennington + + * gtk/gtkrange.c (gtk_range_class_init): add "inverted" property + + * gtk/gtkscale.c (gtk_scale_class_init): Change Page Up and Page + Down to move visually rather than logically, since it confuses + people. Add -/+ and Ctrl--/+ bindings for logical movement. + Wed Jun 6 10:34:42 2001 Owen Taylor * gtk/gtktooltips.h: Include gtkwidget.h diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 1234255e3e..6d83029a2f 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +2001-06-06 Havoc Pennington + + * gtk/gtkrange.c (gtk_range_class_init): add "inverted" property + + * gtk/gtkscale.c (gtk_scale_class_init): Change Page Up and Page + Down to move visually rather than logically, since it confuses + people. Add -/+ and Ctrl--/+ bindings for logical movement. + Wed Jun 6 10:34:42 2001 Owen Taylor * gtk/gtktooltips.h: Include gtkwidget.h diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 1234255e3e..6d83029a2f 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,11 @@ +2001-06-06 Havoc Pennington + + * gtk/gtkrange.c (gtk_range_class_init): add "inverted" property + + * gtk/gtkscale.c (gtk_scale_class_init): Change Page Up and Page + Down to move visually rather than logically, since it confuses + people. Add -/+ and Ctrl--/+ bindings for logical movement. + Wed Jun 6 10:34:42 2001 Owen Taylor * gtk/gtktooltips.h: Include gtkwidget.h diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 1234255e3e..6d83029a2f 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,11 @@ +2001-06-06 Havoc Pennington + + * gtk/gtkrange.c (gtk_range_class_init): add "inverted" property + + * gtk/gtkscale.c (gtk_scale_class_init): Change Page Up and Page + Down to move visually rather than logically, since it confuses + people. Add -/+ and Ctrl--/+ bindings for logical movement. + Wed Jun 6 10:34:42 2001 Owen Taylor * gtk/gtktooltips.h: Include gtkwidget.h diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 1234255e3e..6d83029a2f 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,11 @@ +2001-06-06 Havoc Pennington + + * gtk/gtkrange.c (gtk_range_class_init): add "inverted" property + + * gtk/gtkscale.c (gtk_scale_class_init): Change Page Up and Page + Down to move visually rather than logically, since it confuses + people. Add -/+ and Ctrl--/+ bindings for logical movement. + Wed Jun 6 10:34:42 2001 Owen Taylor * gtk/gtktooltips.h: Include gtkwidget.h diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 1234255e3e..6d83029a2f 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,11 @@ +2001-06-06 Havoc Pennington + + * gtk/gtkrange.c (gtk_range_class_init): add "inverted" property + + * gtk/gtkscale.c (gtk_scale_class_init): Change Page Up and Page + Down to move visually rather than logically, since it confuses + people. Add -/+ and Ctrl--/+ bindings for logical movement. + Wed Jun 6 10:34:42 2001 Owen Taylor * gtk/gtktooltips.h: Include gtkwidget.h diff --git a/docs/reference/gtk/tmpl/gtkrange.sgml b/docs/reference/gtk/tmpl/gtkrange.sgml index 8275518b0b..5f100325e1 100644 --- a/docs/reference/gtk/tmpl/gtkrange.sgml +++ b/docs/reference/gtk/tmpl/gtkrange.sgml @@ -93,3 +93,8 @@ Emitted when the range value changes. + + + + + diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c index c4ae093d8f..840890abd9 100644 --- a/gtk/gtkrange.c +++ b/gtk/gtkrange.c @@ -39,7 +39,8 @@ enum { PROP_0, PROP_UPDATE_POLICY, - PROP_ADJUSTMENT + PROP_ADJUSTMENT, + PROP_INVERTED }; enum { @@ -261,6 +262,14 @@ gtk_range_class_init (GtkRangeClass *class) GTK_TYPE_ADJUSTMENT, G_PARAM_READWRITE)); + g_object_class_install_property (gobject_class, + PROP_INVERTED, + g_param_spec_boolean ("inverted", + _("Inverted"), + _("Invert direction slider moves to increase range value"), + FALSE, + G_PARAM_READWRITE)); + gtk_widget_class_install_style_property (widget_class, g_param_spec_int ("slider_width", _("Slider Width"), @@ -313,6 +322,9 @@ gtk_range_set_property (GObject *object, case PROP_ADJUSTMENT: gtk_range_set_adjustment (range, g_value_get_object (value)); break; + case PROP_INVERTED: + gtk_range_set_inverted (range, g_value_get_boolean (value)); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -337,6 +349,9 @@ gtk_range_get_property (GObject *object, case PROP_ADJUSTMENT: g_value_set_object (value, G_OBJECT (range->adjustment)); break; + case PROP_INVERTED: + g_value_set_boolean (value, range->inverted); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -492,6 +507,7 @@ gtk_range_set_inverted (GtkRange *range, if (setting != range->inverted) { range->inverted = setting; + g_object_notify (G_OBJECT (range), "inverted"); gtk_widget_queue_resize (GTK_WIDGET (range)); } } diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c index f51d7d4fe1..e406535e65 100644 --- a/gtk/gtkscale.c +++ b/gtk/gtkscale.c @@ -205,7 +205,6 @@ gtk_scale_class_init (GtkScaleClass *class) add_slider_binding (binding_set, GDK_KP_Left, GDK_CONTROL_MASK, GTK_SCROLL_PAGE_LEFT); - add_slider_binding (binding_set, GDK_Right, 0, GTK_SCROLL_STEP_RIGHT); @@ -230,7 +229,6 @@ gtk_scale_class_init (GtkScaleClass *class) add_slider_binding (binding_set, GDK_KP_Up, GDK_CONTROL_MASK, GTK_SCROLL_PAGE_UP); - add_slider_binding (binding_set, GDK_Down, 0, GTK_SCROLL_STEP_DOWN); @@ -242,23 +240,59 @@ gtk_scale_class_init (GtkScaleClass *class) add_slider_binding (binding_set, GDK_KP_Down, GDK_CONTROL_MASK, GTK_SCROLL_PAGE_DOWN); - - /* I think most users will find it strange that these move - * logically instead of visually... - */ add_slider_binding (binding_set, GDK_Page_Up, 0, - GTK_SCROLL_PAGE_BACKWARD); + GTK_SCROLL_PAGE_LEFT); add_slider_binding (binding_set, GDK_KP_Page_Up, 0, - GTK_SCROLL_PAGE_BACKWARD); + GTK_SCROLL_PAGE_LEFT); + add_slider_binding (binding_set, GDK_Page_Up, 0, + GTK_SCROLL_PAGE_UP); + + add_slider_binding (binding_set, GDK_KP_Page_Up, 0, + GTK_SCROLL_PAGE_UP); + add_slider_binding (binding_set, GDK_Page_Down, 0, - GTK_SCROLL_PAGE_FORWARD); + GTK_SCROLL_PAGE_RIGHT); add_slider_binding (binding_set, GDK_KP_Page_Down, 0, - GTK_SCROLL_PAGE_FORWARD); + GTK_SCROLL_PAGE_RIGHT); + add_slider_binding (binding_set, GDK_Page_Down, 0, + GTK_SCROLL_PAGE_DOWN); + + add_slider_binding (binding_set, GDK_KP_Page_Down, 0, + GTK_SCROLL_PAGE_DOWN); + + /* Logical bindings (vs. visual bindings above) */ + + add_slider_binding (binding_set, GDK_plus, 0, + GTK_SCROLL_STEP_FORWARD); + + add_slider_binding (binding_set, GDK_minus, 0, + GTK_SCROLL_STEP_BACKWARD); + + add_slider_binding (binding_set, GDK_plus, GDK_CONTROL_MASK, + GTK_SCROLL_PAGE_FORWARD); + + add_slider_binding (binding_set, GDK_minus, GDK_CONTROL_MASK, + GTK_SCROLL_PAGE_BACKWARD); + + + add_slider_binding (binding_set, GDK_KP_Add, 0, + GTK_SCROLL_STEP_FORWARD); + + add_slider_binding (binding_set, GDK_KP_Subtract, 0, + GTK_SCROLL_STEP_BACKWARD); + + add_slider_binding (binding_set, GDK_KP_Add, GDK_CONTROL_MASK, + GTK_SCROLL_PAGE_FORWARD); + + add_slider_binding (binding_set, GDK_KP_Subtract, GDK_CONTROL_MASK, + GTK_SCROLL_PAGE_BACKWARD); + + add_slider_binding (binding_set, GDK_Home, 0, GTK_SCROLL_START);