[totem] grilo: Simplify test whether to monitor a source



commit 444f512131efdd28714c821e9fa383d4e6723c6b
Author: Bastien Nocera <hadess hadess net>
Date:   Sun Mar 29 15:22:18 2015 +0200

    grilo: Simplify test whether to monitor a source
    
    A little bit cleaner.

 src/totem-grilo.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/totem-grilo.c b/src/totem-grilo.c
index 48f54f6..b973d22 100644
--- a/src/totem-grilo.c
+++ b/src/totem-grilo.c
@@ -1297,12 +1297,12 @@ source_added_cb (GrlRegistry *registry,
                                                           MODEL_RESULTS_IS_PRETHUMBNAIL, TRUE,
                                                           MODEL_RESULTS_CAN_REMOVE, can_remove (source, 
NULL),
                                                           -1);
-                       monitor = TRUE;
+
+                       if (g_str_equal (id, "grl-filesystem") == FALSE)
+                               monitor = TRUE;
                }
 
-               if (monitor &&
-                   (ops & GRL_OP_NOTIFY_CHANGE) &&
-                   g_str_equal (id, "grl-filesystem") == FALSE) {
+               if (monitor && (ops & GRL_OP_NOTIFY_CHANGE)) {
                        grl_source_notify_change_start (source, NULL);
                        g_signal_connect (G_OBJECT (source), "content-changed",
                                          G_CALLBACK (content_changed_cb), self);


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