[gnome-photos] application: Remove singleton pattern



commit 5f6280b13dd6fdbb63ed57e5152379a85588069f
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Mar 4 09:07:50 2016 +0100

    application: Remove singleton pattern
    
    We already have (and use) g_application_get_default. There is no need
    for our own singleton implementation.

 src/photos-application.c |   19 -------------------
 1 files changed, 0 insertions(+), 19 deletions(-)
---
diff --git a/src/photos-application.c b/src/photos-application.c
index 9a1361b..87a9e62 100644
--- a/src/photos-application.c
+++ b/src/photos-application.c
@@ -1590,24 +1590,6 @@ photos_application_startup (GApplication *application)
 }
 
 
-static GObject *
-photos_application_constructor (GType type, guint n_construct_params, GObjectConstructParam 
*construct_params)
-{
-  static GObject *self = NULL;
-
-  if (self == NULL)
-    {
-      self = G_OBJECT_CLASS (photos_application_parent_class)->constructor (type,
-                                                                            n_construct_params,
-                                                                            construct_params);
-      g_object_add_weak_pointer (self, (gpointer) &self);
-      return self;
-    }
-
-  return g_object_ref (self);
-}
-
-
 static void
 photos_application_dispose (GObject *object)
 {
@@ -1720,7 +1702,6 @@ photos_application_class_init (PhotosApplicationClass *class)
   GObjectClass *object_class = G_OBJECT_CLASS (class);
   GApplicationClass *application_class = G_APPLICATION_CLASS (class);
 
-  object_class->constructor = photos_application_constructor;
   object_class->dispose = photos_application_dispose;
   object_class->finalize = photos_application_finalize;
   application_class->activate = photos_application_activate;


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