gnome-scan r507 - in trunk: . lib



Author: bersace
Date: Tue Feb 26 12:57:05 2008
New Revision: 507
URL: http://svn.gnome.org/viewvc/gnome-scan?rev=507&view=rev

Log:
Use gdouble internally.


Modified:
   trunk/ChangeLog
   trunk/lib/gnome-scan-settings.c

Modified: trunk/lib/gnome-scan-settings.c
==============================================================================
--- trunk/lib/gnome-scan-settings.c	(original)
+++ trunk/lib/gnome-scan-settings.c	Tue Feb 26 12:57:05 2008
@@ -100,7 +100,7 @@
 			gtype = G_TYPE_INT;
 			break;
 		case GCONF_VALUE_FLOAT:
-			gtype = G_TYPE_FLOAT;
+			gtype = G_TYPE_DOUBLE;
 			break;
 		case GCONF_VALUE_BOOL:
 			gtype = G_TYPE_BOOLEAN;
@@ -119,7 +119,7 @@
 							gconf_value_get_int(value));
 			break;
 		case GCONF_VALUE_FLOAT:
-			g_value_set_float(gvalue,
+			g_value_set_double(gvalue,
 							  gconf_value_get_float(value));
 			break;
 		case GCONF_VALUE_BOOL:
@@ -157,8 +157,10 @@
 		case G_TYPE_BOOLEAN:
 			type = GCONF_VALUE_BOOL;
 			break;
+	default:
+		return NULL;
 	}
-
+	
 	value = gconf_value_new(type);
 	
 	switch(gtype) {
@@ -174,7 +176,7 @@
 		case G_TYPE_DOUBLE:
 			g_value_init(trans, G_TYPE_FLOAT);
 			g_value_transform (gvalue, trans);
-			gconf_value_set_int(value,
+			gconf_value_set_float(value,
 								g_value_get_float(trans));
 			break;
 		case G_TYPE_BOOLEAN:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]