SOURCES: gsynaptics-do-not-set-zero.patch (NEW) - don't set undefined keys ...

megabajt megabajt at pld-linux.org
Wed Sep 17 11:06:00 CEST 2008


Author: megabajt                     Date: Wed Sep 17 09:06:00 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- don't set undefined keys to 0 (patch from Debian #480744)

---- Files affected:
SOURCES:
   gsynaptics-do-not-set-zero.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/gsynaptics-do-not-set-zero.patch
diff -u /dev/null SOURCES/gsynaptics-do-not-set-zero.patch:1.1
--- /dev/null	Wed Sep 17 11:06:00 2008
+++ SOURCES/gsynaptics-do-not-set-zero.patch	Wed Sep 17 11:05:54 2008
@@ -0,0 +1,180 @@
+diff -urNad gsynaptics-0.9.14~/src/init.c gsynaptics-0.9.14/src/init.c
+--- gsynaptics-0.9.14~/src/init.c	2008-02-28 23:27:41.000000000 +0100
++++ gsynaptics-0.9.14/src/init.c	2008-05-17 09:14:12.000000000 +0200
+@@ -36,63 +36,148 @@
+ {
+ 	gboolean b_value;
+ 	gint i_value;
++    GConfValue *gval = NULL;
+ 
+ 	if (!gconf_client_dir_exists (gconf, DIRNAME, NULL))
+ 		return;
+ 
+ 	/* touchpad on/off */	
+-	b_value = gconf_client_get_bool (gconf, OFF_KEY, NULL);
+-	g_synaptics_set_enabled (synaptics, b_value ? 1 : 0);
++	gval = gconf_client_get (gconf, OFF_KEY, NULL);
++	if (gval != NULL) {
++		if (gval->type == GCONF_VALUE_BOOL) {
++			b_value = gconf_value_get_bool(gval);
++			g_synaptics_set_enabled (synaptics, b_value ? 1 : 0);
++		}
++		gconf_value_free(gval);
++	}
+ 	
+ 	/* vertical scroll delta */
+-	i_value = gconf_client_get_int (gconf, VERTSCROLLDELTA_KEY, NULL);
+-	g_synaptics_set_vertical_scroll_delta (synaptics, i_value);
++	gval = gconf_client_get (gconf, VERTSCROLLDELTA_KEY, NULL);
++	if (gval != NULL) {
++		if (gval->type == GCONF_VALUE_INT) {
++			i_value = gconf_value_get_int(gval);
++			g_synaptics_set_vertical_scroll_delta (synaptics, i_value);
++		}
++		gconf_value_free(gval);
++	}
+ 	
+ 	/* horizontal scroll delta */
+-	i_value = gconf_client_get_int (gconf, HORIZSCROLLDELTA_KEY, NULL);
+-	g_synaptics_set_horizontal_scroll_delta (synaptics, i_value);
++	gval = gconf_client_get (gconf, HORIZSCROLLDELTA_KEY, NULL);
++	if (gval != NULL) {
++		if (gval->type == GCONF_VALUE_INT) {
++			i_value = gconf_value_get_int(gval);
++			g_synaptics_set_horizontal_scroll_delta (synaptics, i_value);
++		}
++		gconf_value_free(gval);
++	}
+ 	
+ 	/* circular scroll */
+-	i_value = gconf_client_get_int (gconf, CIRCSCROLLDELTA_KEY, NULL);
+-	b_value = gconf_client_get_bool (gconf, CIRCULARSCROLLING_KEY, NULL);
+-	g_synaptics_set_circular_scroll_delta (synaptics, i_value);
+-	g_synaptics_set_circular_scroll_enabled (synaptics, b_value);
++	gval = gconf_client_get (gconf, CIRCSCROLLDELTA_KEY, NULL);
++	if (gval != NULL) {
++		if (gval->type == GCONF_VALUE_INT) {
++			i_value = gconf_value_get_int(gval);
++			g_synaptics_set_circular_scroll_delta (synaptics, i_value);
++		}
++		gconf_value_free(gval);
++	}
++	gval = gconf_client_get (gconf, CIRCULARSCROLLING_KEY, NULL);
++	if (gval != NULL) {
++		if (gval->type == GCONF_VALUE_BOOL) {
++			b_value = gconf_value_get_bool(gval);
++			g_synaptics_set_circular_scroll_enabled (synaptics, b_value);
++		}
++		gconf_value_free(gval);
++	}
+ 	/* the trigger of circular scrolling */
+-	i_value = gconf_client_get_int (gconf, CIRCSCROLLTRIGGER_KEY, NULL);
+-	g_synaptics_set_circular_scroll_trigger (synaptics, i_value);
++	gval = gconf_client_get (gconf, CIRCSCROLLTRIGGER_KEY, NULL);
++	if (gval != NULL) {
++		if (gval->type == GCONF_VALUE_INT) {
++			i_value = gconf_value_get_int(gval);
++			g_synaptics_set_circular_scroll_trigger (synaptics, i_value);
++		}
++		gconf_value_free(gval);
++	}
+ 	
+ 	
+ 	/* tapping time */
+-	i_value = gconf_client_get_int (gconf, MAXTAPTIME_KEY, NULL);
+-	g_synaptics_set_tap_time (synaptics, i_value);
++	gval = gconf_client_get (gconf, MAXTAPTIME_KEY, NULL);
++	if (gval != NULL) {
++		if (gval->type == GCONF_VALUE_INT) {
++			i_value = gconf_value_get_int(gval);
++			g_synaptics_set_tap_time (synaptics, i_value);
++		}
++		gconf_value_free(gval);
++	}
+ 	
+ 	/* fast taps */
+-	b_value = gconf_client_get_bool (gconf, FASTTAPS_KEY, NULL);
+-	g_synaptics_set_fast_taps (synaptics, b_value);
++	gval = gconf_client_get (gconf, FASTTAPS_KEY, NULL);
++	if (gval != NULL) {
++		if (gval->type == GCONF_VALUE_BOOL) {
++			b_value = gconf_value_get_bool(gval);
++			g_synaptics_set_fast_taps (synaptics, b_value);
++		}
++		gconf_value_free(gval);
++	}
+ 	
+ 	/* sensitivity */
+-	i_value = gconf_client_get_int (gconf, SENSITIVITY_KEY, NULL);
+-	g_synaptics_set_sensitivity (synaptics, i_value);
++	gval = gconf_client_get (gconf, SENSITIVITY_KEY, NULL);
++	if (gval != NULL) {
++		if (gval->type == GCONF_VALUE_INT) {
++			i_value = gconf_value_get_int(gval);
++			g_synaptics_set_sensitivity (synaptics, i_value);
++		}
++		gconf_value_free(gval);
++	}
+ 
+ 	/* coasting */
+-	b_value = gconf_client_get_bool (gconf, COASTENABLE_KEY, NULL);
+-	g_synaptics_set_coasting_enabled (synaptics, b_value);
++	gval = gconf_client_get (gconf, COASTENABLE_KEY, NULL);
++	if (gval != NULL) {
++		if (gval->type == GCONF_VALUE_BOOL) {
++			b_value = gconf_value_get_bool(gval);
++			g_synaptics_set_coasting_enabled (synaptics, b_value);
++		}
++		gconf_value_free(gval);
++	}
+ 	
+ 	/* edge motion */
+-	b_value = gconf_client_get_bool (gconf, EDGEMOTIONUSEALWAYS_KEY, NULL);
+-	g_synaptics_set_edge_motion_enabled (synaptics, b_value);
++	gval = gconf_client_get (gconf, EDGEMOTIONUSEALWAYS_KEY, NULL);
++	if (gval != NULL) {
++		if (gval->type == GCONF_VALUE_BOOL) {
++			b_value = gconf_value_get_bool(gval);
++			g_synaptics_set_edge_motion_enabled (synaptics, b_value);
++		}
++		gconf_value_free(gval);
++	}
+ 
+ 	/* min speed */
+-	i_value = gconf_client_get_int (gconf, MINSPEED_KEY, NULL);
+-	g_synaptics_set_min_speed (synaptics, i_value);
++	gval = gconf_client_get (gconf, MINSPEED_KEY, NULL);
++	if (gval != NULL) {
++		if (gval->type == GCONF_VALUE_INT) {
++			i_value = gconf_value_get_int(gval);
++			g_synaptics_set_min_speed (synaptics, i_value);
++		}
++		gconf_value_free(gval);
++	}
+ 
+ 	/* max speed */
+-	i_value = gconf_client_get_int (gconf, MAXSPEED_KEY, NULL);
+-	g_synaptics_set_max_speed (synaptics, i_value);
++	gval = gconf_client_get (gconf, MAXSPEED_KEY, NULL);
++	if (gval != NULL) {
++		if (gval->type == GCONF_VALUE_INT) {
++			i_value = gconf_value_get_int(gval);
++			g_synaptics_set_max_speed (synaptics, i_value);
++		}
++		gconf_value_free(gval);
++	}
+ 
+ 	/* accel factor */
+-	i_value = gconf_client_get_int (gconf, ACCELFACTOR_KEY, NULL);
+-	g_synaptics_set_accel_factor (synaptics, i_value);
++	gval = gconf_client_get (gconf, ACCELFACTOR_KEY, NULL);
++	if (gval != NULL) {
++		if (gval->type == GCONF_VALUE_INT) {
++			i_value = gconf_value_get_int(gval);
++			g_synaptics_set_accel_factor (synaptics, i_value);
++		}
++		gconf_value_free(gval);
++	}
+ 
+ }
+ 
================================================================


More information about the pld-cvs-commit mailing list