[gnome-photos] dlna-renderers-manager: Style fixes



commit f837178cdf22da2c99f763a3b2419f1092e60d90
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Aug 23 16:35:42 2013 +0200

    dlna-renderers-manager: Style fixes

 src/photos-dlna-renderers-manager.c |   40 ++++++++++++++++++++++++----------
 1 files changed, 28 insertions(+), 12 deletions(-)
---
diff --git a/src/photos-dlna-renderers-manager.c b/src/photos-dlna-renderers-manager.c
index 90620fc..dc16a6e 100644
--- a/src/photos-dlna-renderers-manager.c
+++ b/src/photos-dlna-renderers-manager.c
@@ -20,13 +20,13 @@
 
 #include "config.h"
 
-#include "photos-dlna-renderers-manager.h"
-
 #include <gio/gio.h>
 
 #include "photos-dleyna-renderer-manager.h"
+#include "photos-dlna-renderers-manager.h"
 #include "photos-dlna-renderer.h"
 
+
 struct _PhotosDlnaRenderersManagerPrivate
 {
   DleynaManager *proxy;
@@ -43,10 +43,13 @@ enum
 
 static guint signals[LAST_SIGNAL] = { 0 };
 
-static GObject *photos_dlna_renderers_manager_singleton = NULL;
 
 G_DEFINE_TYPE_WITH_PRIVATE (PhotosDlnaRenderersManager, photos_dlna_renderers_manager, G_TYPE_OBJECT);
 
+
+static GObject *photos_dlna_renderers_manager_singleton = NULL;
+
+
 static void
 photos_dlna_renderers_manager_dispose (GObject *object)
 {
@@ -60,6 +63,7 @@ photos_dlna_renderers_manager_dispose (GObject *object)
   G_OBJECT_CLASS (photos_dlna_renderers_manager_parent_class)->dispose (object);
 }
 
+
 static void
 photos_dlna_renderers_manager_renderer_new_cb (GObject      *source_object,
                                                GAsyncResult *res,
@@ -88,6 +92,7 @@ photos_dlna_renderers_manager_renderer_new_cb (GObject      *source_object,
   g_signal_emit (self, signals[RENDERER_FOUND], 0, renderer);
 }
 
+
 static void
 photos_dlna_renderers_manager_renderer_found_cb (PhotosDlnaRenderersManager *self,
                                                  const gchar                *object_path,
@@ -102,6 +107,7 @@ photos_dlna_renderers_manager_renderer_found_cb (PhotosDlnaRenderersManager *sel
                                     self);
 }
 
+
 static void
 photos_dlna_renderers_manager_renderer_lost_cb (PhotosDlnaRenderersManager *self,
                                                 const gchar                *object_path,
@@ -122,6 +128,7 @@ photos_dlna_renderers_manager_renderer_lost_cb (PhotosDlnaRenderersManager *self
   g_object_unref (renderer);
 }
 
+
 static void
 photos_dlna_renderers_manager_proxy_get_renderers_cb (GObject      *source_object,
                                                       GAsyncResult *res,
@@ -146,6 +153,7 @@ photos_dlna_renderers_manager_proxy_get_renderers_cb (GObject      *source_objec
   g_strfreev (object_paths);
 }
 
+
 static void
 photos_dlna_renderers_manager_proxy_new_cb (GObject      *source_object,
                                             GAsyncResult *res,
@@ -174,23 +182,27 @@ photos_dlna_renderers_manager_proxy_new_cb (GObject      *source_object,
                                      photos_dlna_renderers_manager_proxy_get_renderers_cb, self);
 }
 
+
 static GObject *
 photos_dlna_renderers_manager_constructor (GType                  type,
                                            guint                  n_construct_params,
                                            GObjectConstructParam *construct_params)
 {
-  if (photos_dlna_renderers_manager_singleton != NULL)
-    return g_object_ref (photos_dlna_renderers_manager_singleton);
-
-  photos_dlna_renderers_manager_singleton =
-      G_OBJECT_CLASS (photos_dlna_renderers_manager_parent_class)->constructor
-          (type, n_construct_params, construct_params);
-
-  g_object_add_weak_pointer (photos_dlna_renderers_manager_singleton, (gpointer) 
&photos_dlna_renderers_manager_singleton);
+  if (photos_dlna_renderers_manager_singleton == NULL)
+    {
+      photos_dlna_renderers_manager_singleton
+        = G_OBJECT_CLASS (photos_dlna_renderers_manager_parent_class)->constructor (type,
+                                                                                    n_construct_params,
+                                                                                    construct_params);
+      g_object_add_weak_pointer (photos_dlna_renderers_manager_singleton,
+                                 (gpointer) &photos_dlna_renderers_manager_singleton);
+      return photos_dlna_renderers_manager_singleton;
+    }
 
-  return photos_dlna_renderers_manager_singleton;
+  return g_object_ref (photos_dlna_renderers_manager_singleton);
 }
 
+
 static void
 photos_dlna_renderers_manager_init (PhotosDlnaRenderersManager *self)
 {
@@ -208,6 +220,7 @@ photos_dlna_renderers_manager_init (PhotosDlnaRenderersManager *self)
   priv->renderers = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, g_object_unref);
 }
 
+
 static void
 photos_dlna_renderers_manager_class_init (PhotosDlnaRenderersManagerClass *class)
 {
@@ -227,12 +240,14 @@ photos_dlna_renderers_manager_class_init (PhotosDlnaRenderersManagerClass *class
                                           G_TYPE_NONE, 1, PHOTOS_TYPE_DLNA_RENDERER);
 }
 
+
 PhotosDlnaRenderersManager *
 photos_dlna_renderers_manager_dup_singleton (void)
 {
   return g_object_new (PHOTOS_TYPE_DLNA_RENDERERS_MANAGER, NULL);
 }
 
+
 GList *
 photos_dlna_renderers_manager_dup_renderers (PhotosDlnaRenderersManager *self)
 {
@@ -245,6 +260,7 @@ photos_dlna_renderers_manager_dup_renderers (PhotosDlnaRenderersManager *self)
   return renderers;
 }
 
+
 gboolean
 photos_dlna_renderers_manager_is_available (void)
 {


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