[gnome-settings-daemon/wip/xsettings-manager: 12/16] xsettings: some strategic renames



commit 5af02a1f9f988a66094fdc68f1ef22b698e6ee14
Author: Ryan Lortie <desrt desrt ca>
Date:   Wed Mar 7 23:47:30 2012 -0500

    xsettings: some strategic renames

 plugins/xsettings/xsettings-common.c |   30 +++++++++++++++---------------
 plugins/xsettings/xsettings-common.h |    4 ++--
 2 files changed, 17 insertions(+), 17 deletions(-)
---
diff --git a/plugins/xsettings/xsettings-common.c b/plugins/xsettings/xsettings-common.c
index d74cd14..aa63410 100644
--- a/plugins/xsettings/xsettings-common.c
+++ b/plugins/xsettings/xsettings-common.c
@@ -67,30 +67,30 @@ xsettings_setting_set (XSettingsSetting *setting,
     }
 }
 
-int
-xsettings_setting_equal (XSettingsSetting *setting_a,
-			 XSettingsSetting *setting_b)
+gboolean
+xsettings_setting_equal (XSettingsSetting *setting,
+                         XSettingsSetting *value)
 {
-  if (setting_a->type != setting_b->type)
-    return 0;
+  if (setting->type != value->type)
+    return FALSE;
 
-  if (strcmp (setting_a->name, setting_b->name) != 0)
-    return 0;
+  if (strcmp (setting->name, value->name) != 0)
+    return FALSE;
 
-  switch (setting_a->type)
+  switch (setting->type)
     {
     case XSETTINGS_TYPE_INT:
-      return setting_a->data.v_int == setting_b->data.v_int;
+      return setting->data.v_int == value->data.v_int;
     case XSETTINGS_TYPE_COLOR:
-      return (setting_a->data.v_color.red == setting_b->data.v_color.red &&
-	      setting_a->data.v_color.green == setting_b->data.v_color.green &&
-	      setting_a->data.v_color.blue == setting_b->data.v_color.blue &&
-	      setting_a->data.v_color.alpha == setting_b->data.v_color.alpha);
+      return (setting->data.v_color.red == value->data.v_color.red &&
+              setting->data.v_color.green == value->data.v_color.green &&
+              setting->data.v_color.blue == value->data.v_color.blue &&
+              setting->data.v_color.alpha == value->data.v_color.alpha);
     case XSETTINGS_TYPE_STRING:
-      return strcmp (setting_a->data.v_string, setting_b->data.v_string) == 0;
+      return strcmp (setting->data.v_string, value->data.v_string) == 0;
     }
 
-  return 0;
+  return FALSE;
 }
 
 void
diff --git a/plugins/xsettings/xsettings-common.h b/plugins/xsettings/xsettings-common.h
index 8f60e93..1f46ab9 100644
--- a/plugins/xsettings/xsettings-common.h
+++ b/plugins/xsettings/xsettings-common.h
@@ -59,8 +59,8 @@ XSettingsSetting *xsettings_setting_new   (const gchar      *name);
 void              xsettings_setting_set   (XSettingsSetting *setting,
                                            XSettingsSetting *value);
 void              xsettings_setting_free  (XSettingsSetting *setting);
-int               xsettings_setting_equal (XSettingsSetting *setting_a,
-					   XSettingsSetting *setting_b);
+gboolean          xsettings_setting_equal (XSettingsSetting *setting,
+                                           XSettingsSetting *value);
 
 char xsettings_byte_order (void);
 



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