[Xfce4-commits] <xfce4-settings:master> Remove all xfconf_channel_new occurrences.

Jérôme Guelfucci noreply at xfce.org
Sun Nov 14 18:00:01 CET 2010


Updating branch refs/heads/master
         to e6fd9663822aad208e723ae665d037036815d3e5 (commit)
       from 6c13ff5975a5c24a2019a47a5fdb23754b7238ff (commit)

commit e6fd9663822aad208e723ae665d037036815d3e5
Author: Jérôme Guelfucci <jeromeg at xfce.org>
Date:   Sun Nov 14 17:59:41 2010 +0100

    Remove all xfconf_channel_new occurrences.

 xfce4-settings-helper/accessibility.c   |    6 +-----
 xfce4-settings-helper/displays.c        |    6 +-----
 xfce4-settings-helper/keyboard-layout.c |    6 +-----
 xfce4-settings-helper/pointers.c        |    6 +-----
 xfce4-settings-helper/workspaces.c      |    3 +--
 5 files changed, 5 insertions(+), 22 deletions(-)

diff --git a/xfce4-settings-helper/accessibility.c b/xfce4-settings-helper/accessibility.c
index 4a7a13c..df46348 100644
--- a/xfce4-settings-helper/accessibility.c
+++ b/xfce4-settings-helper/accessibility.c
@@ -121,7 +121,7 @@ xfce_accessibility_helper_init (XfceAccessibilityHelper *helper)
     if (XkbQueryExtension (GDK_DISPLAY (), &dummy, &dummy, &dummy, &dummy, &dummy))
     {
         /* open the channel */
-        helper->channel = xfconf_channel_new ("accessibility");
+        helper->channel = xfconf_channel_get ("accessibility");
 
         /* monitor channel changes */
         g_signal_connect (G_OBJECT (helper->channel), "property-changed", G_CALLBACK (xfce_accessibility_helper_channel_property_changed), helper);
@@ -161,10 +161,6 @@ xfce_accessibility_helper_finalize (GObject *object)
         notify_notification_close (helper->notification, NULL);
 #endif /* !HAVE_LIBNOTIFY */
 
-    /* release the channel */
-    if (G_LIKELY (helper->channel))
-        g_object_unref (G_OBJECT (helper->channel));
-
     (*G_OBJECT_CLASS (xfce_accessibility_helper_parent_class)->finalize) (object);
 }
 
diff --git a/xfce4-settings-helper/displays.c b/xfce4-settings-helper/displays.c
index 22f75ff..90783d8 100644
--- a/xfce4-settings-helper/displays.c
+++ b/xfce4-settings-helper/displays.c
@@ -127,7 +127,7 @@ xfce_displays_helper_init (XfceDisplaysHelper *helper)
             && (major > 1 || (major == 1 && minor >= 2)))
         {
             /* open the channel */
-            helper->channel = xfconf_channel_new ("displays");
+            helper->channel = xfconf_channel_get ("displays");
 
             /* remove any leftover apply property before setting the monitor */
             xfconf_channel_reset_property (helper->channel, "/Schemes/Apply", FALSE);
@@ -163,10 +163,6 @@ xfce_displays_helper_finalize (GObject *object)
 {
     XfceDisplaysHelper *helper = XFCE_DISPLAYS_HELPER (object);
 
-    /* release the channel */
-    if (G_LIKELY (helper->channel))
-        g_object_unref (G_OBJECT (helper->channel));
-
     (*G_OBJECT_CLASS (xfce_displays_helper_parent_class)->finalize) (object);
 }
 
diff --git a/xfce4-settings-helper/keyboard-layout.c b/xfce4-settings-helper/keyboard-layout.c
index 6c21b0a..3d7d3df 100644
--- a/xfce4-settings-helper/keyboard-layout.c
+++ b/xfce4-settings-helper/keyboard-layout.c
@@ -93,7 +93,7 @@ xfce_keyboard_layout_helper_init (XfceKeyboardLayoutHelper *helper)
     helper->channel = NULL;
 
     /* open the channel */
-    helper->channel = xfconf_channel_new ("keyboard-layout");
+    helper->channel = xfconf_channel_get ("keyboard-layout");
 
     /* monitor channel changes */
     g_signal_connect (G_OBJECT (helper->channel), "property-changed", G_CALLBACK (xfce_keyboard_layout_helper_channel_property_changed), helper);
@@ -118,10 +118,6 @@ xfce_keyboard_layout_helper_finalize (GObject *object)
 {
     XfceKeyboardLayoutHelper *helper = XFCE_KEYBOARD_LAYOUT_HELPER (object);
 
-    /* release the channel */
-    if (G_LIKELY (helper->channel))
-        g_object_unref (G_OBJECT (helper->channel));
-
     (*G_OBJECT_CLASS (xfce_keyboard_layout_helper_parent_class)->finalize) (object);
 }
 
diff --git a/xfce4-settings-helper/pointers.c b/xfce4-settings-helper/pointers.c
index 10c04c8..a67be7d 100644
--- a/xfce4-settings-helper/pointers.c
+++ b/xfce4-settings-helper/pointers.c
@@ -155,7 +155,7 @@ xfce_pointers_helper_init (XfcePointersHelper *helper)
     else
     {
         /* open the channel */
-        helper->channel = xfconf_channel_new ("pointers");
+        helper->channel = xfconf_channel_get ("pointers");
 
         /* restore the pointer devices */
         xfce_pointers_helper_restore_devices (helper, NULL);
@@ -193,10 +193,6 @@ xfce_pointers_helper_finalize (GObject *object)
 {
     XfcePointersHelper *helper = XFCE_POINTERS_HELPER (object);
 
-    /* release the channel */
-    if (G_LIKELY (helper->channel))
-        g_object_unref (G_OBJECT (helper->channel));
-
     (*G_OBJECT_CLASS (xfce_pointers_helper_parent_class)->finalize) (object);
 }
 
diff --git a/xfce4-settings-helper/workspaces.c b/xfce4-settings-helper/workspaces.c
index b8de631..1c66e81 100644
--- a/xfce4-settings-helper/workspaces.c
+++ b/xfce4-settings-helper/workspaces.c
@@ -100,7 +100,7 @@ xfce_workspaces_helper_init (XfceWorkspacesHelper *helper)
     GdkWindow    *root_window;
     GdkEventMask  events;
 
-    helper->channel = xfconf_channel_new(WORKSPACES_CHANNEL);
+    helper->channel = xfconf_channel_get(WORKSPACES_CHANNEL);
 
     /* monitor root window property changes */
     root_window = gdk_get_default_root_window ();
@@ -125,7 +125,6 @@ xfce_workspaces_helper_finalize (GObject *object)
     g_signal_handlers_disconnect_by_func(G_OBJECT (helper->channel),
                                          G_CALLBACK (xfce_workspaces_helper_prop_changed),
                                          helper);
-    g_object_unref (G_OBJECT (helper->channel));
 
     G_OBJECT_CLASS (xfce_workspaces_helper_parent_class)->finalize (object);
 }



More information about the Xfce4-commits mailing list