conduit r1341 - in trunk: . conduit conduit/dataproviders conduit/modules/NetworkModule



Author: jstowers
Date: Wed Feb 27 08:40:01 2008
New Revision: 1341
URL: http://svn.gnome.org/viewvc/conduit?rev=1341&view=rev

Log:
2008-02-27  John Stowers  <john stowers gmail com>

	* conduit/Main.py: Remove -dev suffixes from config/db files
	
	* conduit/__init__.py: Store conduit configuration in fd.o compliant
	$XDG_CONFIG_HOME. Fixes bug #518592
	
	* conduit/dataproviders/DataProvider.py: Add class props to base class to
	fix network sync errors with one-way data sources
	
	* conduit/modules/NetworkModule/XMLRPCUtils.py: Differentiate remote data
	providers on the canvas by prefixing their name with 'Remote '



Modified:
   trunk/ChangeLog
   trunk/conduit/Main.py
   trunk/conduit/__init__.py
   trunk/conduit/dataproviders/DataProvider.py
   trunk/conduit/modules/NetworkModule/XMLRPCUtils.py

Modified: trunk/conduit/Main.py
==============================================================================
--- trunk/conduit/Main.py	(original)
+++ trunk/conduit/Main.py	Wed Feb 27 08:40:01 2008
@@ -40,13 +40,8 @@
         self.uiLib = None
 
         gobject.set_application_name("Conduit")
-        #Default command line values
-        if conduit.IS_DEVELOPMENT_VERSION:
-            self.settingsFile = os.path.join(conduit.USER_DIR, "settings-dev.xml")
-            dbFile = os.path.join(conduit.USER_DIR, "mapping-dev.db")
-        else:
-            self.settingsFile = os.path.join(conduit.USER_DIR, "settings.xml")
-            dbFile = os.path.join(conduit.USER_DIR, "mapping.db")
+        self.settingsFile = os.path.join(conduit.USER_DIR, "settings.xml")
+        self.dbFile = os.path.join(conduit.USER_DIR, "mapping.db")
 
         buildGUI = True
         iconify = False
@@ -121,7 +116,7 @@
         conduit.GLOBALS.moduleManager.load_all()
         conduit.GLOBALS.typeConverter = TypeConverter(conduit.GLOBALS.moduleManager)
         conduit.GLOBALS.syncManager = SyncManager(conduit.GLOBALS.typeConverter)
-        conduit.GLOBALS.mappingDB = MappingDB(dbFile)
+        conduit.GLOBALS.mappingDB = MappingDB(self.dbFile)
         conduit.GLOBALS.mainloop = gobject.MainLoop()
         
         #Build both syncsets and put on the bus as early as possible

Modified: trunk/conduit/__init__.py
==============================================================================
--- trunk/conduit/__init__.py	(original)
+++ trunk/conduit/__init__.py	Wed Feb 27 08:40:01 2008
@@ -33,7 +33,12 @@
 IS_DEVELOPMENT_VERSION = True
 
 # Check the profile directory to prevent crashes when saving settings, etc
-USER_DIR = os.path.join(os.environ['HOME'],".conduit")
+USER_DIR = os.path.join(
+                os.environ.get(
+                    "XDG_CONFIG_HOME",
+    			    os.path.join(os.environ['HOME'], ".config")),
+    			"conduit"
+    			)
 if not os.path.exists(USER_DIR):
     os.mkdir(USER_DIR)
 

Modified: trunk/conduit/dataproviders/DataProvider.py
==============================================================================
--- trunk/conduit/dataproviders/DataProvider.py	(original)
+++ trunk/conduit/dataproviders/DataProvider.py	Wed Feb 27 08:40:01 2008
@@ -40,6 +40,14 @@
                     "status-changed": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, []),
                     "change-detected": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, [])
                     }
+                    
+    _name_ = ""
+    _description_ = ""
+    _icon_ = ""
+    _module_type_ = "dataprovider"
+    _category_ = conduit.dataproviders.CATEGORY_TEST
+    _out_type_ = ""
+    _in_type_ = ""
     
     def __init__(self):
         """

Modified: trunk/conduit/modules/NetworkModule/XMLRPCUtils.py
==============================================================================
--- trunk/conduit/modules/NetworkModule/XMLRPCUtils.py	(original)
+++ trunk/conduit/modules/NetworkModule/XMLRPCUtils.py	Wed Feb 27 08:40:01 2008
@@ -183,6 +183,9 @@
     def get_status_text(self):
         return self.server.get_status_text()
         
+    def get_name(self):
+        return "Remote %s" % self._name_
+        
 class DataproviderServer(StoppableXMLRPCServer):
     """
     Wraps a dataproviderwrapper in order to pickle args



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