gpointing-device-settings r28 - trunk/src



Author: hiikezoe
Date: Thu Feb 26 07:28:38 2009
New Revision: 28
URL: http://svn.gnome.org/viewvc/gpointing-device-settings?rev=28&view=rev

Log:
g_return_if_fail().

Modified:
   trunk/src/gpds-xinput.c

Modified: trunk/src/gpds-xinput.c
==============================================================================
--- trunk/src/gpds-xinput.c	(original)
+++ trunk/src/gpds-xinput.c	Thu Feb 26 07:28:38 2009
@@ -190,7 +190,7 @@
         g_set_error(error,
                     GPDS_XINPUT_ERROR,
                     GPDS_XINPUT_ERROR_NO_DEVICE,
-                    _("No  device found."));
+                    _("No device found."));
         return NULL;
     }
 
@@ -292,9 +292,9 @@
 
 gboolean
 gpds_xinput_set_property (GpdsXInput *xinput,
-                       const gchar *property_name,
-                       GError **error,
-                       gint first_value, ...)
+                          const gchar *property_name,
+                          GError **error,
+                          gint first_value, ...)
 {
     gboolean success;
     va_list var_args;
@@ -348,6 +348,8 @@
     gulong i;
     gint *int_values;
 
+    g_return_val_if_fail(GPDS_IS_XINPUT(xinput), FALSE);
+
     device = get_device(xinput, error);
     if (!device)
         return FALSE;
@@ -394,13 +396,15 @@
 
 gboolean
 gpds_xinput_get_property (GpdsXInput *xinput,
-                       const gchar *property_name,
-                       GError **error,
-                       gint **values,
-                       gulong *n_values)
+                          const gchar *property_name,
+                          GError **error,
+                          gint **values,
+                          gulong *n_values)
 {
     XDevice *device;
 
+    g_return_val_if_fail(GPDS_IS_XINPUT(xinput), FALSE);
+
     device = get_device(xinput, error);
     if (!device)
         return FALSE;



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