From ae7e848c047382ab9285fce3f7fad0263771306b Mon Sep 17 00:00:00 2001 From: Anilkumar Bacheli Date: Sat, 28 Jan 2006 19:28:51 +0000 Subject: [PATCH] Fixes #154769 2006-01-28 Anilkumar Bacheli Fixes #154769 * gnome-mouse-properties.glade: Modified the glade file so that context information for the slider is available to screen reader. Also, modified the Slider value label to "microseconds" instead of seconds. * gnome-mouse-properties.c: Changed the slider label to be in sync with speech. --- capplets/mouse/ChangeLog | 12 +++ capplets/mouse/gnome-mouse-properties.c | 4 +- capplets/mouse/gnome-mouse-properties.glade | 89 ++++++++++----------- 3 files changed, 57 insertions(+), 48 deletions(-) diff --git a/capplets/mouse/ChangeLog b/capplets/mouse/ChangeLog index 129d97482..b97dec4f8 100644 --- a/capplets/mouse/ChangeLog +++ b/capplets/mouse/ChangeLog @@ -1,3 +1,15 @@ +2006-01-28 Anilkumar Bacheli + + Fixes #154769 + + * gnome-mouse-properties.glade: Modified the glade file so that + context information for the slider is available to screen reader. + Also, modified the Slider value label to "microseconds" instead of + seconds. + + * gnome-mouse-properties.c: Changed the slider label to be in sync with + speech. + 2006-01-28 Scott Bronson Fixes #318056 diff --git a/capplets/mouse/gnome-mouse-properties.c b/capplets/mouse/gnome-mouse-properties.c index d7d699c54..87ea9d177 100644 --- a/capplets/mouse/gnome-mouse-properties.c +++ b/capplets/mouse/gnome-mouse-properties.c @@ -135,7 +135,7 @@ delay_value_changed_cb (GtkWidget *range, GtkScrollType scroll, gdouble value, else if (value > 1000) value = 1000; - message = g_strdup_printf ("%.1f %s", value / 1000.0, _("seconds")); + message = g_strdup_printf ("%d %s", CLAMP ((int) floor ((value+50)/100.0) * 100, 100, 1000), _("microseconds")); gtk_label_set_label ((GtkLabel*) WID ("delay_label"), message); g_free (message); @@ -877,7 +877,7 @@ setup_dialog (GladeXML *dialog, GConfChangeSet *changeset) G_CALLBACK (event_box_button_press_event), changeset); /* set the timeout value label with correct value of timeout */ - message = g_strdup_printf ("%.1f %s", gtk_range_get_value (GTK_RANGE (WID ("delay_scale"))) / 1000.0, _("seconds")); + message = g_strdup_printf ("%d %s", (int) gtk_range_get_value (GTK_RANGE (WID ("delay_scale"))), _("microseconds")); gtk_label_set_label ((GtkLabel*) WID ("delay_label"), message); g_free (message); diff --git a/capplets/mouse/gnome-mouse-properties.glade b/capplets/mouse/gnome-mouse-properties.glade index 8fc113b4f..0d4ec46f6 100644 --- a/capplets/mouse/gnome-mouse-properties.glade +++ b/capplets/mouse/gnome-mouse-properties.glade @@ -329,6 +329,9 @@ -1 False 0 + + + 0 @@ -338,53 +341,19 @@ - + True - False - 6 - - - - True - True - False - GTK_POS_RIGHT - 1 - GTK_UPDATE_DISCONTINUOUS - False - 400 100 1000 100 100 0 - - - 0 - True - True - - - - - - True - seconds - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - + True + False + GTK_POS_RIGHT + 1 + GTK_UPDATE_DISCONTINUOUS + False + 400 100 1000 100 100 0 + + + + 0 @@ -392,6 +361,34 @@ True + + + + True + microseconds + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + + + + 0 + False + False + + 0