gnome-mouse-properties.c (delay_value_changed_cb) (setup_dialog): patch

2003-11-19 Sivaiah Nallagatla <snallagatla@novell.com>
 gnome-mouse-properties.c
 (delay_value_changed_cb)
 (setup_dialog): patch for fixing showing double click time out value initially. #119859 in bugzilla.gnome.org
This commit is contained in:
Sivaiah Nallagatla 2003-11-19 06:00:45 +00:00 committed by Sivaiah Nallagatla
parent 5f2e3042d9
commit e477e1c2b0

View file

@ -131,7 +131,7 @@ 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);
gtk_label_set_label ((GtkLabel*) WID ("delay_label"), message);
g_free (message);
}
@ -546,6 +546,7 @@ setup_dialog (GladeXML *dialog, GConfChangeSet *changeset)
gchar *font_path;
gchar *cursor_string;
gboolean found_default;
gchar *message;
program = gnome_program_get ();
found_default = FALSE;
@ -562,12 +563,22 @@ setup_dialog (GladeXML *dialog, GConfChangeSet *changeset)
gconf_value_free (value);
/* Double-click time */
peditor = gconf_peditor_new_numeric_range
(changeset, DOUBLE_CLICK_KEY, WID ("delay_scale"),
"conv-to-widget-cb", double_click_from_gconf,
NULL);
g_signal_connect (G_OBJECT (WID ("delay_scale")), "value_changed", (GCallback) delay_value_changed_cb, dialog);
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",
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"));
gtk_label_set_label ((GtkLabel*) WID ("delay_label"), message);
g_free (message);
/* Cursors page */
tree_view = WID ("cursor_tree");
cursor_font = read_cursor_font ();
@ -695,12 +706,7 @@ setup_dialog (GladeXML *dialog, GConfChangeSet *changeset)
/* Motion page */
/* speed */
peditor = gconf_peditor_new_numeric_range
(changeset, DOUBLE_CLICK_KEY, WID ("delay_scale"),
"conv-to-widget-cb", double_click_from_gconf,
NULL);
g_signal_connect (G_OBJECT (WID ("delay_scale")), "value_changed", delay_value_changed_cb, dialog);
gconf_peditor_new_numeric_range
gconf_peditor_new_numeric_range
(changeset, "/desktop/gnome/peripherals/mouse/motion_acceleration", WID ("accel_scale"),
"conv-to-widget-cb", motion_acceleration_from_gconf,
"conv-from-widget-cb", motion_acceleration_to_gconf,