diff --git a/capplets/accessibility/keyboard/ChangeLog b/capplets/accessibility/keyboard/ChangeLog index 46e3b01fa..5fcf3e880 100644 --- a/capplets/accessibility/keyboard/ChangeLog +++ b/capplets/accessibility/keyboard/ChangeLog @@ -1,3 +1,9 @@ +Mon Aug 11 11:55:49 2003 Jonathan Blandford + + * gnome-accessibility-keyboard-properties.glade: Patch from Elijah + Newren to bring the possible repeat range + in sync with the keyboard capplet. + 2003-08-01 Dennis Cranston * gnome-accessibility-keyboard-properties.glade: Patch to add diff --git a/capplets/accessibility/keyboard/accessibility-keyboard.c b/capplets/accessibility/keyboard/accessibility-keyboard.c index 21e96ac0e..19fc45bc9 100644 --- a/capplets/accessibility/keyboard/accessibility-keyboard.c +++ b/capplets/accessibility/keyboard/accessibility-keyboard.c @@ -84,7 +84,7 @@ static struct { } const ranges [] = { { "repeatkeys_delay_slide", "repeatkeys_delay_spin", 500, 100, 1500, 10, "/desktop/gnome/peripherals/keyboard/delay" }, - { "repeatkeys_rate_slide", "repeatkeys_rate_spin", 90, 10, 210, 10, + { "repeatkeys_rate_slide", "repeatkeys_rate_spin", 90, 10, 110, 10, "/desktop/gnome/peripherals/keyboard/rate" }, { "bouncekeys_delay_slide", "bouncekeys_delay_spin", 0, 0, 900, 10, CONFIG_ROOT "/bouncekeys_delay" }, @@ -212,8 +212,6 @@ setup_ranges (GladeXML *dialog, GConfChangeSet *changeset) ranges [i].step_size, 0); peditor = gconf_peditor_new_numeric_range (changeset, (gchar *)ranges [i].gconf_key, slide, - "conv-to-widget-cb", gconf_value_int_to_float, - "conv-from-widget-cb", gconf_value_float_to_int, NULL); } } diff --git a/capplets/keyboard/ChangeLog b/capplets/keyboard/ChangeLog index aca80322a..2fa7dbbed 100644 --- a/capplets/keyboard/ChangeLog +++ b/capplets/keyboard/ChangeLog @@ -1,3 +1,12 @@ +Mon Aug 11 11:50:36 2003 Jonathan Blandford + + * gnome-keyboard-properties.glade: Patch from Elijah Newren + to bring the possible repeat range in sync + with the a11y capplet. + + * gnome-keyboard-properties.c: Patch from Elijah Newren to deal + with the change in the peditor code. + Fri Aug 1 15:04:39 2003 Jonathan Blandford * gnome-keyboard-properties.glade: Patch from Dennis Cranston diff --git a/capplets/keyboard/gnome-keyboard-properties.c b/capplets/keyboard/gnome-keyboard-properties.c index b637a1cab..e989deb78 100644 --- a/capplets/keyboard/gnome-keyboard-properties.c +++ b/capplets/keyboard/gnome-keyboard-properties.c @@ -76,7 +76,7 @@ blink_from_widget (GConfPropertyEditor *peditor, const GConfValue *value) GConfValue *new_value; new_value = gconf_value_new (GCONF_VALUE_INT); - gconf_value_set_int (new_value, 2600 - (int) gconf_value_get_float (value)); + gconf_value_set_int (new_value, 2600 - gconf_value_get_int (value)); return new_value; } @@ -88,8 +88,8 @@ blink_to_widget (GConfPropertyEditor *peditor, const GConfValue *value) gint current_rate; current_rate = gconf_value_get_int (value); - new_value = gconf_value_new (GCONF_VALUE_FLOAT); - gconf_value_set_float (new_value, CLAMP (2600 - current_rate, 100, 2500)); + new_value = gconf_value_new (GCONF_VALUE_INT); + gconf_value_set_int (new_value, CLAMP (2600 - current_rate, 100, 2500)); return new_value; } @@ -138,14 +138,10 @@ setup_dialog (GladeXML *dialog, gconf_peditor_new_numeric_range (changeset, "/desktop/gnome/peripherals/keyboard/delay", WID ("repeat_delay_scale"), - "conv-to-widget-cb", gconf_value_int_to_float, - "conv-from-widget-cb", gconf_value_float_to_int, NULL); gconf_peditor_new_numeric_range (changeset, "/desktop/gnome/peripherals/keyboard/rate", WID ("repeat_speed_scale"), - "conv-to-widget-cb", gconf_value_int_to_float, - "conv-from-widget-cb", gconf_value_float_to_int, NULL); peditor = gconf_peditor_new_boolean diff --git a/capplets/keyboard/gnome-keyboard-properties.glade b/capplets/keyboard/gnome-keyboard-properties.glade index aa8ebb8c3..c774ca27f 100644 --- a/capplets/keyboard/gnome-keyboard-properties.glade +++ b/capplets/keyboard/gnome-keyboard-properties.glade @@ -354,7 +354,7 @@ 1 GTK_UPDATE_CONTINUOUS False - 500 100 1510 10 10 0 + 500 100 1500 10 10 0 0 diff --git a/capplets/mouse/ChangeLog b/capplets/mouse/ChangeLog index f295f9f20..1bc6bf2ee 100644 --- a/capplets/mouse/ChangeLog +++ b/capplets/mouse/ChangeLog @@ -1,3 +1,8 @@ +Mon Aug 11 13:53:23 2003 Jonathan Blandford + + * gnome-mouse-properties.c (delay_value_changed_cb): fix the + double click peditor. + 2003-08-01 Dennis Cranston * gnome-mouse-properties.glade: Patch to fix spacing between action diff --git a/capplets/mouse/gnome-mouse-properties.c b/capplets/mouse/gnome-mouse-properties.c index 1ce573e7f..0d4563ec1 100644 --- a/capplets/mouse/gnome-mouse-properties.c +++ b/capplets/mouse/gnome-mouse-properties.c @@ -121,21 +121,19 @@ double_click_from_gconf (GConfPropertyEditor *peditor, const GConfValue *value) { GConfValue *new_value; - new_value = gconf_value_new (GCONF_VALUE_FLOAT); - gconf_value_set_float (new_value, CLAMP (floor ((gconf_value_get_int (value) + 50) / 100) * 100, 0, 1000) / 1000.0); - return new_value; -} - -static GConfValue * -double_click_to_gconf (GConfPropertyEditor *peditor, const GConfValue *value) -{ - GConfValue *new_value; - new_value = gconf_value_new (GCONF_VALUE_INT); - gconf_value_set_int (new_value, gconf_value_get_float (value) * 1000.0); + gconf_value_set_int (new_value, CLAMP ((int) floor ((gconf_value_get_int (value) + 50) / 100.0) * 100, 100, 1000)); return new_value; } +static void +delay_value_changed_cb (GtkWidget *range, + gpointer dialog) +{ + gchar *message = g_strdup_printf ("%.1f %s", gtk_range_get_value (GTK_RANGE (WID ("delay_scale"))) / 1000.0, _("seconds")); + gtk_label_set_label (WID ("delay_label"), message); + g_free (message); +} static void get_default_mouse_info (int *default_numerator, int *default_denominator, int *default_threshold) @@ -564,6 +562,7 @@ setup_dialog (GladeXML *dialog, GConfChangeSet *changeset) gconf_value_free (value); /* Double-click time */ + gtk_widget_set_size_request (WID ("delay_scale"), 150, -1); gtk_image_set_from_stock (GTK_IMAGE (WID ("double_click_image")), MOUSE_DBLCLCK_OFF, mouse_capplet_dblclck_icon_get_size ()); g_object_set_data (G_OBJECT (WID ("double_click_eventbox")), "image", WID ("double_click_image")); g_signal_connect (WID ("double_click_eventbox"), "button_press_event", @@ -696,12 +695,11 @@ setup_dialog (GladeXML *dialog, GConfChangeSet *changeset) /* Motion page */ /* speed */ - gconf_peditor_new_numeric_range + peditor = gconf_peditor_new_numeric_range (changeset, DOUBLE_CLICK_KEY, WID ("delay_scale"), "conv-to-widget-cb", double_click_from_gconf, - "conv-from-widget-cb", double_click_to_gconf, NULL); - + g_signal_connect (G_OBJECT (WID ("delay_scale")), "value_changed", delay_value_changed_cb, dialog); gconf_peditor_new_numeric_range (changeset, "/desktop/gnome/peripherals/mouse/motion_acceleration", WID ("accel_scale"), "conv-to-widget-cb", motion_acceleration_from_gconf, @@ -788,8 +786,8 @@ dialog_response_cb (GtkDialog *dialog, gint response_id, GConfChangeSet *changes { if (response_id == GTK_RESPONSE_HELP) capplet_help (GTK_WINDOW (dialog), - "wgoscustdesk.xml", - "goscustperiph-5"); + "wgoscustdesk.xml", + "goscustperiph-5"); else gtk_main_quit (); } diff --git a/capplets/mouse/gnome-mouse-properties.glade b/capplets/mouse/gnome-mouse-properties.glade index 836be7685..574fead24 100644 --- a/capplets/mouse/gnome-mouse-properties.glade +++ b/capplets/mouse/gnome-mouse-properties.glade @@ -320,12 +320,12 @@ True True - True + False GTK_POS_RIGHT 1 GTK_UPDATE_DISCONTINUOUS False - 0.4 0.1 1 0.1 0.1 0 + 400 100 1000 100 100 0 0 @@ -335,7 +335,7 @@ - + True seconds False