[conduit/gsoc09_alexandre] Tries to fix GConf delay on erasing directories.



commit e64903e0b5395ad13521a6c953eb2efebba1358a
Author: Alexandre Rosenfeld <airmind gmail com>
Date:   Thu Aug 13 01:30:08 2009 -0300

    Tries to fix GConf delay on erasing directories.

 conduit/SyncSetGConf.py |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/conduit/SyncSetGConf.py b/conduit/SyncSetGConf.py
index a06920d..5151692 100644
--- a/conduit/SyncSetGConf.py
+++ b/conduit/SyncSetGConf.py
@@ -70,7 +70,9 @@ class SyncSetGConf(gobject.GObject):
             for path in client.all_dirs(SYNCSET_PATH + "/" + self.syncset.name):
                 cond_name = path.split("/")[-1]
                 cond_path = path + "/"
-                try:
+                if client.get_string(cond_path + "uid") is None:
+                    continue
+                try:                    
                     #create a new conduit
                     cond = Conduit.Conduit(self.syncset.syncManager, client.get_string(cond_path + "uid"))
 
@@ -121,13 +123,17 @@ class SyncSetGConf(gobject.GObject):
                 
 
     def _on_conduit_parameters_changed(self, cond):
-        log.info("Saving Conduit to GConf")
+        log.info("Conduit paremeters changed, saving to GConf")
         self.save_conduit(cond)
         
     def _on_conduit_removed(self, syncset, cond):
         self.remove_conduit(cond)
     
     def _on_conduit_added(self, syncset, cond):
+        #TODO: Not sure this actually works, it still saves conduits right after
+        # loading them
+        
+        # Dont save conduits if we are still loading them
         if not self.loading:
             self.save_conduit(cond)
         cond.connect("parameters-changed", self._on_conduit_parameters_changed)



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