[gnome-photos] application: Don't refresh a miner if it is already running



commit 3358d0d7bed671d4045e6cda6152570a4e3ccb14
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Jul 14 00:01:59 2016 +0200

    application: Don't refresh a miner if it is already running

 src/photos-application.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-application.c b/src/photos-application.c
index faad9ff..5e40da6 100644
--- a/src/photos-application.c
+++ b/src/photos-application.c
@@ -969,6 +969,9 @@ photos_application_refresh_miner_now (PhotosApplication *self, GomMiner *miner)
   if (g_getenv ("GNOME_PHOTOS_DISABLE_MINERS") != NULL)
     return;
 
+  if (g_list_find (self->miners_running, miner) != NULL)
+    return;
+
   self->miners_running = g_list_prepend (self->miners_running, g_object_ref (miner));
   g_signal_emit (self, signals[MINERS_CHANGED], 0, self->miners_running);
 


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