[gnome-photos/wip/rishi/thumbnail-factory-simplify-code] thumbnail-factory: Simplify code




commit 839ef0d36f847acc50aa5057a905d68283b9b396
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Mar 19 22:39:31 2021 +0100

    thumbnail-factory: Simplify code
    
    https://gitlab.gnome.org/GNOME/gnome-photos/-/merge_requests/184

 src/photos-thumbnail-factory.c | 20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)
---
diff --git a/src/photos-thumbnail-factory.c b/src/photos-thumbnail-factory.c
index 43a09b61..ab9e66f5 100644
--- a/src/photos-thumbnail-factory.c
+++ b/src/photos-thumbnail-factory.c
@@ -137,19 +137,13 @@ photos_thumbnail_factory_new_connection (PhotosThumbnailFactory *self, GDBusConn
                             G_CALLBACK (photos_thumbnail_factory_connection_closed),
                             self);
 
-  {
-    g_autoptr (GError) error = NULL;
-
-    self->thumbnailer = photos_thumbnailer_dbus_proxy_new_sync (self->connection,
-                                                                G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES
-                                                                | G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS,
-                                                                NULL,
-                                                                THUMBNAILER_PATH,
-                                                                NULL,
-                                                                &error);
-    if (error != NULL)
-      self->thumbnailer_error = g_error_copy (error);
-  }
+  self->thumbnailer = photos_thumbnailer_dbus_proxy_new_sync (self->connection,
+                                                              G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES
+                                                              | G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS,
+                                                              NULL,
+                                                              THUMBNAILER_PATH,
+                                                              NULL,
+                                                              &self->thumbnailer_error);
 
   g_cond_signal (&self->cond);
   g_mutex_unlock (&self->mutex);


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