rpms/control-center/devel gnome-control-center-2.26.0-support-touchpads.patch, NONE, 1.1 control-center.spec, 1.442, 1.443

Matthias Clasen mclasen at fedoraproject.org
Thu Apr 9 03:04:17 UTC 2009


Author: mclasen

Update of /cvs/pkgs/rpms/control-center/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv4233

Modified Files:
	control-center.spec 
Added Files:
	gnome-control-center-2.26.0-support-touchpads.patch 
Log Message:
Support touchpads


gnome-control-center-2.26.0-support-touchpads.patch:

--- NEW FILE gnome-control-center-2.26.0-support-touchpads.patch ---
diff -up gnome-control-center-2.26.0/capplets/mouse/gnome-mouse-properties.c.support-touchpads gnome-control-center-2.26.0/capplets/mouse/gnome-mouse-properties.c
--- gnome-control-center-2.26.0/capplets/mouse/gnome-mouse-properties.c.support-touchpads	2009-03-16 11:14:59.000000000 -0400
+++ gnome-control-center-2.26.0/capplets/mouse/gnome-mouse-properties.c	2009-04-08 21:54:56.713738066 -0400
@@ -41,6 +41,9 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <dirent.h>
+#include <X11/Xatom.h>
+#include <X11/extensions/XInput.h>
+#include <X11/extensions/XIproto.h>
 
 #ifdef HAVE_XCURSOR
 #include <X11/Xcursor/Xcursor.h>
@@ -312,6 +315,87 @@ left_handed_to_gconf (GConfPropertyEdito
 	return new_value;
 }
 
+static void
+scrollmethod_radio_button_release_event (GtkWidget *widget,
+					GdkEventButton *event,
+					GladeXML *dialog)
+{
+	gtk_widget_set_sensitive(WID("horiz_scroll_toggle"),
+				(widget != WID("scroll_disabled_radio")));
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
+}
+
+static GConfValue *
+scroll_method_from_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_int (value));
+
+	return new_value;
+}
+
+static GConfValue *
+scroll_method_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_int (value));
+
+	return new_value;
+}
+
+static gboolean
+find_synaptics()
+{
+	int numdevices, i;
+	gboolean ret = FALSE;
+	XDeviceInfo *devicelist = XListInputDevices (GDK_DISPLAY(), &numdevices);
+	Atom realtype, prop;
+	int realformat;
+	unsigned long nitems, bytes_after;
+	unsigned char *data;
+
+	prop = XInternAtom(GDK_DISPLAY(), "Synaptics Off", True);
+	if (!prop)
+		return False;
+
+	for (i = 0; i < numdevices; i++) {
+		if (devicelist[i].use != IsXExtensionPointer)
+			continue;
+
+		gdk_error_trap_push();
+		XDevice *device = XOpenDevice (GDK_DISPLAY(),
+					       devicelist[i].id);
+		if (gdk_error_trap_pop())
+			continue;
+
+		gdk_error_trap_push();
+		if ((XGetDeviceProperty(GDK_DISPLAY(), device, prop, 0, 1, False,
+					XA_INTEGER, &realtype, &realformat, &nitems,
+					&bytes_after, &data) == Success) && (realtype != None))
+		{
+			XFree(data);
+			ret = TRUE;
+		}
+		gdk_error_trap_pop();
+
+		XCloseDevice (GDK_DISPLAY(), device);
+
+		if (ret)
+			break;
+	}
+
+	XFreeDeviceList(devicelist);
+	return ret;
+}
+
 /* Set up the property editors in the dialog. */
 static void
 setup_dialog (GladeXML *dialog, GConfChangeSet *changeset)
@@ -362,6 +446,33 @@ setup_dialog (GladeXML *dialog, GConfCha
 		(changeset, "/desktop/gnome/peripherals/mouse/drag_threshold", WID ("drag_threshold_scale"),
 		 "conv-to-widget-cb", drag_threshold_from_gconf,
 		 NULL);
+
+	/* Trackpad page */
+	if (find_synaptics() == FALSE)
+		gtk_notebook_remove_page (GTK_NOTEBOOK(WID("prefs_widget")),-1);
+	else {
+		gtk_widget_set_sensitive(WID("disable_w_typing_toggle"),
+					 g_find_program_in_path ("syndaemon"));
+		peditor = gconf_peditor_new_boolean
+			(changeset, "/desktop/gnome/peripherals/touchpad/disable_while_typing", WID ("disable_w_typing_toggle"), NULL);
+		peditor = gconf_peditor_new_boolean
+			(changeset, "/desktop/gnome/peripherals/touchpad/tap_to_click", WID ("tap_to_click_toggle"), NULL);
+		peditor = gconf_peditor_new_boolean
+			(changeset, "/desktop/gnome/peripherals/touchpad/horiz_scroll_enabled", WID ("horiz_scroll_toggle"), NULL);
+		radio = GTK_RADIO_BUTTON (WID ("scroll_disabled_radio"));
+		peditor = gconf_peditor_new_select_radio
+			(changeset, "/desktop/gnome/peripherals/touchpad/scroll_method", gtk_radio_button_get_group (radio),
+			 "conv-to-widget-cb", scroll_method_from_gconf,
+			 "conv-from-widget-cb", scroll_method_to_gconf,
+			 NULL);
+			 g_signal_connect (WID ("scroll_disabled_radio"), "button_release_event",
+				 G_CALLBACK (scrollmethod_radio_button_release_event), dialog);
+			 g_signal_connect (WID ("scroll_edge_radio"), "button_release_event",
+				 G_CALLBACK (scrollmethod_radio_button_release_event), dialog);
+			 g_signal_connect (WID ("scroll_twofinger_radio"), "button_release_event",
+				 G_CALLBACK (scrollmethod_radio_button_release_event), dialog);
+	}
+
 }
 
 /* Construct the dialog */
diff -up gnome-control-center-2.26.0/capplets/mouse/gnome-mouse-properties.glade.support-touchpads gnome-control-center-2.26.0/capplets/mouse/gnome-mouse-properties.glade
--- gnome-control-center-2.26.0/capplets/mouse/gnome-mouse-properties.glade.support-touchpads	2008-08-04 07:30:47.000000000 -0400
+++ gnome-control-center-2.26.0/capplets/mouse/gnome-mouse-properties.glade	2009-04-08 21:13:06.129764811 -0400
@@ -1161,6 +1161,289 @@
                 <property name="tab_fill">False</property>
               </packing>
             </child>
+            <child>
+              <widget class="GtkVBox" id="vbox3">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="border_width">12</property>
+                <property name="spacing">18</property>
+                <child>
+                  <widget class="GtkVBox" id="vbox15">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="spacing">6</property>
+                    <child>
+                      <widget class="GtkLabel" id="label18">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="yalign">0</property>
+                        <property name="label" translatable="yes">&lt;b&gt;General&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkHBox" id="hbox3">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <child>
+                          <widget class="GtkLabel" id="label19">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="xalign">0</property>
+                            <property name="yalign">0</property>
+                            <property name="label">    </property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkCheckButton" id="disable_w_typing_toggle">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="label" translatable="yes">_Disable touchpad while typing</property>
+                            <property name="use_underline">True</property>
+                            <property name="response_id">0</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                          </widget>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkHBox" id="hbox11">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <child>
+                          <widget class="GtkLabel" id="label22">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="xalign">0</property>
+                            <property name="yalign">0</property>
+                            <property name="label">    </property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkCheckButton" id="tap_to_click_toggle">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="label" translatable="yes">Enable mouse _clicks with touchpad</property>
+                            <property name="use_underline">True</property>
+                            <property name="response_id">0</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                          </widget>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkVBox" id="vbox19">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="spacing">6</property>
+                    <child>
+                      <widget class="GtkLabel" id="label34">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="yalign">0</property>
+                        <property name="label" translatable="yes">&lt;b&gt;Scrolling&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkHBox" id="hbox15">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <child>
+                          <widget class="GtkLabel" id="label35">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="xalign">0</property>
+                            <property name="yalign">0</property>
+                            <property name="label">    </property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkHBox" id="hbox23">
+                            <property name="visible">True</property>
+                            <property name="homogeneous">False</property>
+                            <property name="spacing">0</property>
+
+                            <child>
+                              <widget class="GtkRadioButton" id="scroll_disabled_radio">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="label" translatable="yes">_Disabled</property>
+                                <property name="use_underline">True</property>
+                                <property name="relief">GTK_RELIEF_NORMAL</property>
+                                <property name="focus_on_click">True</property>
+                                <property name="active">False</property>
+                                <property name="inconsistent">False</property>
+                                <property name="draw_indicator">True</property>
+                              </widget>
+                              <packing>
+                                <property name="padding">0</property>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                              </packing>
+                            </child>
+
+                            <child>
+                              <widget class="GtkRadioButton" id="scroll_edge_radio">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="label" translatable="yes">_Edge scrolling</property>
+                                <property name="use_underline">True</property>
+                                <property name="relief">GTK_RELIEF_NORMAL</property>
+                                <property name="focus_on_click">True</property>
+                                <property name="active">False</property>
+                                <property name="inconsistent">False</property>
+                                <property name="draw_indicator">True</property>
+                                <property name="group">scroll_disabled_radio</property>
+                              </widget>
+                              <packing>
+                                <property name="padding">0</property>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                              </packing>
+                            </child>
+
+                            <child>
+                              <widget class="GtkRadioButton" id="scroll_twofinger_radio">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="label" translatable="yes">Two-_finger scrolling</property>
+                                <property name="use_underline">True</property>
+                                <property name="relief">GTK_RELIEF_NORMAL</property>
+                                <property name="focus_on_click">True</property>
+                                <property name="active">False</property>
+                                <property name="inconsistent">False</property>
+                                <property name="draw_indicator">True</property>
+                                <property name="group">scroll_disabled_radio</property>
+                              </widget>
+                              <packing>
+                                <property name="padding">0</property>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkHBox" id="hbox16">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <child>
+                          <widget class="GtkLabel" id="label36">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="xalign">0</property>
+                            <property name="yalign">0</property>
+                            <property name="label">    </property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkCheckButton" id="horiz_scroll_toggle">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="label" translatable="yes">Enable _horizontal scrolling</property>
+                            <property name="use_underline">True</property>
+                            <property name="response_id">0</property>
+                            <property name="draw_indicator">True</property>
+                          </widget>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="label4">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">Touchpad</property>
+                <property name="justify">GTK_JUSTIFY_CENTER</property>
+              </widget>
+              <packing>
+                <property name="type">tab</property>
+                <property name="position">2</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
           </widget>
           <packing>
             <property name="position">1</property>


Index: control-center.spec
===================================================================
RCS file: /cvs/pkgs/rpms/control-center/devel/control-center.spec,v
retrieving revision 1.442
retrieving revision 1.443
diff -u -r1.442 -r1.443
--- control-center.spec	6 Apr 2009 02:52:14 -0000	1.442
+++ control-center.spec	9 Apr 2009 03:03:46 -0000	1.443
@@ -54,6 +54,9 @@
 # http://bugzilla.gnome.org/show_bug.cgi?id=574973
 Patch34: gcc-new-fingerprint-icons.patch
 
+# http://bugzilla.gnome.org/show_bug.cgi?id=154029
+Patch35: gnome-control-center-2.26.0-support-touchpads.patch
+
 # call the Fedora/RHEL graphical passwd changing apps
 Patch95: gnome-control-center-2.25.2-passwd.patch
 Patch96: gnome-control-center-2.25.2-gecos.patch
@@ -177,6 +180,7 @@
 %patch32 -p1 -b .display-no-help
 %patch33 -p1 -b .notification-theme
 %patch34 -p0 -b .new-icons
+%patch35 -p1 -b .support-touchpads
 pushd capplets/about-me
 mv *png icons/
 popd
@@ -198,8 +202,6 @@
 # Add -Wno-error to silence gswitchit
 %configure --disable-static \
 	--disable-scrollkeeper \
-	--enable-gstreamer \
-	--enable-alsa \
 	--enable-aboutme \
 	--disable-update-mimedb \
 	CFLAGS="$RPM_OPT_FLAGS -Wno-error"
@@ -354,6 +356,9 @@
 %dir %{_datadir}/gnome-control-center/keybindings
 
 %changelog
+* Wed Apr  8 2009 Matthias Clasen <mclasen at redhat.com> - 2.26.0-3
+- Support touchpads
+
 * Sun Apr  5 2009 Matthias Clasen <mclasen at redhat.com> - 2.26.0-2
 - Fix a minor ui issue in the preferred apps capplet (#490421)
 




More information about the scm-commits mailing list