[gnome-control-center] Mouse: set up scroll method radios initially
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] Mouse: set up scroll method radios initially
- Date: Sun, 13 Mar 2011 04:40:55 +0000 (UTC)
commit 4109335861a4bdfaf5e9d3c11ca24a8ca5900f6e
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Mar 13 00:39:13 2011 -0500
Mouse: set up scroll method radios initially
The panel was always coming up with scrolling disabled.
https://bugzilla.gnome.org/show_bug.cgi?id=644223
panels/mouse/gnome-mouse-properties.c | 25 ++++++++++++++++++++++++-
1 files changed, 24 insertions(+), 1 deletions(-)
---
diff --git a/panels/mouse/gnome-mouse-properties.c b/panels/mouse/gnome-mouse-properties.c
index a2d3bb3..3d5dfa2 100644
--- a/panels/mouse/gnome-mouse-properties.c
+++ b/panels/mouse/gnome-mouse-properties.c
@@ -149,6 +149,29 @@ orientation_radio_button_release_event (GtkWidget *widget,
}
static void
+setup_scrollmethod_radios (GtkBuilder *dialog)
+{
+ GsdTouchpadScrollMethod method;
+
+ method = g_settings_get_enum (touchpad_settings, "scroll-method");
+
+ switch (method) {
+ case GSD_TOUCHPAD_SCROLL_METHOD_EDGE_SCROLLING:
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("scroll_edge_radio")), TRUE);
+ break;
+ case GSD_TOUCHPAD_SCROLL_METHOD_TWO_FINGER_SCROLLING:
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("scroll_twofinger_radio")), TRUE);
+ break;
+ case GSD_TOUCHPAD_SCROLL_METHOD_DISABLED:
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("scroll_disabled_radio")), TRUE);
+ break;
+ }
+
+ gtk_widget_set_sensitive (WID ("horiz_scroll_toggle"),
+ !gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (WID ("scroll_disabled_radio"))));
+}
+
+static void
scrollmethod_changed_event (GtkToggleButton *button, GtkBuilder *dialog)
{
GsdTouchpadScrollMethod method;
@@ -288,7 +311,7 @@ setup_dialog (GtkBuilder *dialog)
G_CALLBACK (scrollmethod_changed_event), dialog);
synaptics_check_capabilities (dialog);
- scrollmethod_changed_event (GTK_TOGGLE_BUTTON (WID ("scroll_disabled_radio")), dialog);
+ setup_scrollmethod_radios (dialog);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]