[gnome-photos/wip/rishi/dlna-renderers-dialog-g_auto: 2/3] dlna-renderers-dialog: Style fixes




commit e2bd1b7dcee7774b050ea0b8ad2a855a42a8be3a
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Apr 8 00:11:16 2021 +0200

    dlna-renderers-dialog: Style fixes

 src/photos-dlna-renderers-dialog.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/src/photos-dlna-renderers-dialog.c b/src/photos-dlna-renderers-dialog.c
index dc7a4596..c690f720 100644
--- a/src/photos-dlna-renderers-dialog.c
+++ b/src/photos-dlna-renderers-dialog.c
@@ -145,8 +145,6 @@ photos_dlna_renderers_dialog_set_icon_cb (GObject      *source_object,
 
 out:
   g_clear_object (&pixbuf);
-
-  /* release the ref we took before the async call */
   g_object_unref (image);
 }
 
@@ -177,14 +175,13 @@ photos_dlna_renderers_dialog_add_renderer (PhotosDlnaRenderersDialog *self, Phot
   icon = g_themed_icon_new_with_default_fallbacks ("video-display-symbolic");
   image = gtk_image_new_from_gicon (icon, GTK_ICON_SIZE_DIALOG);
 
-  g_object_ref (image); /* keep a ref for the following async call and release it in the callback */
   photos_dlna_renderer_get_icon (renderer,
                                  "",
                                  "",
                                  GTK_ICON_SIZE_DIALOG,
                                  NULL,
                                  photos_dlna_renderers_dialog_set_icon_cb,
-                                 image);
+                                 g_object_ref (image));
 
   gtk_container_add (GTK_CONTAINER (row_grid), image);
 


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