conduit r1275 - in trunk: . conduit conduit/dataproviders conduit/modules conduit/modules/BackpackModule conduit/modules/BansheeModule conduit/modules/BoxDotNetModule conduit/modules/FileModule conduit/modules/FlickrModule conduit/modules/FspotModule conduit/modules/GmailModule conduit/modules/GoogleModule conduit/modules/N800Module conduit/modules/PicasaDesktopModule conduit/modules/RhythmboxModule conduit/modules/ShutterflyModule conduit/modules/SmugMugModule



Author: jstowers
Date: Tue Feb  5 23:19:03 2008
New Revision: 1275
URL: http://svn.gnome.org/viewvc/conduit?rev=1275&view=rev

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

	* conduit/Synchronization.py:
	* conduit/dataproviders/DataProvider.py:
	* conduit/dataproviders/File.py:
	* conduit/dataproviders/Image.py:
	* conduit/modules/BackpackModule/BackpackModule.py:
	* conduit/modules/BansheeModule/BansheeModule.py:
	* conduit/modules/BoxDotNetModule/BoxDotNetModule.py:
	* conduit/modules/FileModule/FileModule.py:
	* conduit/modules/FlickrModule/FlickrModule.py:
	* conduit/modules/FspotModule/FspotModule.py:
	* conduit/modules/GmailModule/GmailModule.py:
	* conduit/modules/GoogleModule/GoogleModule.py:
	* conduit/modules/N800Module/N800Module.py:
	* conduit/modules/PicasaDesktopModule/PicasaDesktopModule.py:
	* conduit/modules/RhythmboxModule/RhythmboxModule.py:
	* conduit/modules/ShutterflyModule/ShutterflyModule.py:
	* conduit/modules/SmugMugModule/SmugMugModule.py:
	* conduit/modules/TestModule.py: Change is_configuration prototype
	to accept a isSource and a isTwoWay argument. This gives dataproviders
	enough information to make their configuration dependant on whether they
	are source/sink or one/two-way. Fixes bug #510091



Modified:
   trunk/ChangeLog
   trunk/conduit/Synchronization.py
   trunk/conduit/dataproviders/DataProvider.py
   trunk/conduit/dataproviders/File.py
   trunk/conduit/dataproviders/Image.py
   trunk/conduit/modules/BackpackModule/BackpackModule.py
   trunk/conduit/modules/BansheeModule/BansheeModule.py
   trunk/conduit/modules/BoxDotNetModule/BoxDotNetModule.py
   trunk/conduit/modules/FileModule/FileModule.py
   trunk/conduit/modules/FlickrModule/FlickrModule.py
   trunk/conduit/modules/FspotModule/FspotModule.py
   trunk/conduit/modules/GmailModule/GmailModule.py
   trunk/conduit/modules/GoogleModule/GoogleModule.py
   trunk/conduit/modules/N800Module/N800Module.py
   trunk/conduit/modules/PicasaDesktopModule/PicasaDesktopModule.py
   trunk/conduit/modules/RhythmboxModule/RhythmboxModule.py
   trunk/conduit/modules/ShutterflyModule/ShutterflyModule.py
   trunk/conduit/modules/SmugMugModule/SmugMugModule.py
   trunk/conduit/modules/TestModule.py

Modified: trunk/conduit/Synchronization.py
==============================================================================
--- trunk/conduit/Synchronization.py	(original)
+++ trunk/conduit/Synchronization.py	Tue Feb  5 23:19:03 2008
@@ -618,13 +618,17 @@
 
                 #Check dps have been configured
                 if self.state is self.CONFIGURE_STATE:
-                    if not self.source.module.is_configured():
+                    if not self.source.module.is_configured(
+                                                    isSource=True,
+                                                    isTwoWay=self.cond.is_two_way()):
                         self.source.module.set_status(DataProvider.STATUS_DONE_SYNC_NOT_CONFIGURED)
                         #Cannot continue if source not configured
                         raise Exceptions.StopSync(self.state)
         
                     for sink in self.sinks:
-                        if not sink.module.is_configured():
+                        if not sink.module.is_configured(
+                                                    isSource=False,
+                                                    isTwoWay=self.cond.is_two_way()):
                             sinkDidntConfigureOK[sink] = True
                             self.sinkErrors[sink] = DataProvider.STATUS_DONE_SYNC_NOT_CONFIGURED
                     #Need to have at least one successfully configured sink
@@ -767,7 +771,9 @@
             log.debug("Refresh %s beginning" % self)
             self.cond.emit("sync-started")
 
-            if not self.dataproviderWrapper.module.is_configured():
+            if not self.dataproviderWrapper.module.is_configured(
+                                                isSource=self.cond.get_dataprovider_position(self.dataproviderWrapper)[0]==0,
+                                                isTwoWay=self.cond.is_two_way()):
                 self.dataproviderWrapper.module.set_status(DataProvider.STATUS_DONE_SYNC_NOT_CONFIGURED)
                 #Cannot continue if source not configured
                 raise Exceptions.StopSync(self.state)

Modified: trunk/conduit/dataproviders/DataProvider.py
==============================================================================
--- trunk/conduit/dataproviders/DataProvider.py	(original)
+++ trunk/conduit/dataproviders/DataProvider.py	Tue Feb  5 23:19:03 2008
@@ -51,10 +51,6 @@
         self.icon = None
         self.status = STATUS_NONE
 
-        #track the state of widget configuration
-        self.need_configuration(False)
-        self.set_configured(False)
-
     def __emit_status_changed(self):
         """
         Emits a 'status-changed' signal to the main loop.
@@ -202,20 +198,6 @@
         else:
             return False
 
-    def need_configuration(self, need):
-        """
-        Derived classes should call this function in their constructor if they
-        require configuration before they can operate
-        """
-        self.needConfiguration = need
-
-    def set_configured(self, configured):
-        """
-        Sets if the widget has been configured or not. Derived classes may call 
-        this for example, to ensure the user enters the configure menu
-        """
-        self.isConfigured = configured
-            
     def configure(self, window):
         """
         Show a configuration box for configuring the dataprovider instance.
@@ -225,13 +207,14 @@
         @type window: {gtk.Window}
         """
         log.debug("configure() not overridden by derived class %s" % self._name_)
-        self.set_configured(True)
 
-    def is_configured(self):
+    def is_configured(self, isSource, isTwoWay):
         """
         Checks if the dp has been configured or not (and if it needs to be)
+        @param isSource: True if the dataprovider is in the source position
+        @param isTwoway: True if the dataprovider is a member of a two-way sync
         """
-        return (not self.needConfiguration) or self.isConfigured
+        return True
         
     def get_configuration(self):
         """

Modified: trunk/conduit/dataproviders/File.py
==============================================================================
--- trunk/conduit/dataproviders/File.py	(original)
+++ trunk/conduit/dataproviders/File.py	Tue Feb  5 23:19:03 2008
@@ -165,8 +165,6 @@
 
     def __init__(self, folder, folderGroupName, includeHidden, compareIgnoreMtime):
         DataProvider.TwoWay.__init__(self)
-        self.need_configuration(True)
-
         self.folder = folder
         self.folderGroupName = folderGroupName
         self.includeHidden = includeHidden
@@ -177,6 +175,9 @@
     def initialize(self):
         return True
 
+    def is_configured(self, isSource, isTwoWay):
+        return Vfs.uri_exists(self.folder)
+
     def refresh(self):
         DataProvider.TwoWay.refresh(self)
         #scan the folder
@@ -260,7 +261,6 @@
         f = File.File(URI=LUID)
         if f.exists() and f.is_directory():
             self.folder = f._get_text_uri()
-            self.set_configured(True)
             return True
         return False
 

Modified: trunk/conduit/dataproviders/Image.py
==============================================================================
--- trunk/conduit/dataproviders/Image.py	(original)
+++ trunk/conduit/dataproviders/Image.py	Tue Feb  5 23:19:03 2008
@@ -32,9 +32,6 @@
 
     def __init__(self, *args):
         DataProvider.DataSink.__init__(self)
-        self.need_configuration(True)
-        
-        self.username = ""
 
     def initialize(self):
         return True
@@ -154,9 +151,6 @@
     def delete(self, LUID):
         pass
  
-    def is_configured (self):
-        return False
-        
     def get_input_conversion_args(self):
         args = {
                 "formats" :             ','.join(self._get_photo_formats()),
@@ -167,7 +161,6 @@
         
     def set_configuration(self, config):
         DataProvider.DataSink.set_configuration(self, config)
-        self.set_configured(self.is_configured())
     
 class ImageTwoWay(DataProvider.DataSource, ImageSink):
     """

Modified: trunk/conduit/modules/BackpackModule/BackpackModule.py
==============================================================================
--- trunk/conduit/modules/BackpackModule/BackpackModule.py	(original)
+++ trunk/conduit/modules/BackpackModule/BackpackModule.py	Tue Feb  5 23:19:03 2008
@@ -30,6 +30,13 @@
 
     def initialize(self):
         return True
+
+    def is_configured (self, isSource, isTwoWay):
+        if len(self.username) < 1:
+            return False
+        if len(self.apikey) < 1:
+            return False
+        return True
     
     def refresh(self):
         if self.loggedIn == False:
@@ -55,8 +62,7 @@
     def __init__(self, *args):
         DataProvider.DataSink.__init__(self)
         BackpackBase.__init__(self, *args)
-        self.need_configuration(True)
-        
+
         self.storeInPage = "Conduit"
         self.pageID = None
         #there is no way to pragmatically see if a note exists so we list them
@@ -114,11 +120,6 @@
             self.storeInPage = pagenameEntry.get_text()
             if apikeyEntry.get_text() != self.apikey:
                 self.apikey = apikeyEntry.get_text()
-
-            #user must enter their username
-            if len(self.username) > 0 and len(self.apikey) > 0:
-                self.set_configured(True)
-
         dlg.destroy()
 
     def get(self, LUID):
@@ -170,11 +171,6 @@
     def get_UID(self):
         return "%s:%s" % (self.username,self.storeInPage)
 
-    def set_configuration(self, config):
-        DataProvider.DataSink.set_configuration(self, config)
-        if len(self.username) > 0 and len(self.apikey) > 0:
-            self.set_configured(True)
-
     def get_configuration(self):
         return {
             "username" : self.username,

Modified: trunk/conduit/modules/BansheeModule/BansheeModule.py
==============================================================================
--- trunk/conduit/modules/BansheeModule/BansheeModule.py	(original)
+++ trunk/conduit/modules/BansheeModule/BansheeModule.py	Tue Feb  5 23:19:03 2008
@@ -62,6 +62,9 @@
 
     def initialize(self):
         return True
+
+    def is_configured(self, isSource, isTwoWay):
+        return len(self.playlists) > 0
         
     def refresh(self):
         DataProvider.DataSource.refresh(self)
@@ -147,15 +150,12 @@
         dlg = tree.get_widget("BansheeConfigDialog")
         
         response = Utils.run_dialog (dlg, window)
-        if response == True:
-            self.set_configured(True)
         dlg.destroy()
 
     def set_configuration(self, config):
         self.playlists = []
         for playlist in config.get("playlists", []):
             self.playlists.append(playlist)
-        self.set_configured(True)
             
     def get_configuration(self):
         return { "playlists" : self.playlists }

Modified: trunk/conduit/modules/BoxDotNetModule/BoxDotNetModule.py
==============================================================================
--- trunk/conduit/modules/BoxDotNetModule/BoxDotNetModule.py	(original)
+++ trunk/conduit/modules/BoxDotNetModule/BoxDotNetModule.py	Tue Feb  5 23:19:03 2008
@@ -38,7 +38,6 @@
 
     def __init__(self, *args):
         DataProvider.TwoWay.__init__(self)
-        self.need_configuration(True)
 
         self.boxapi = None
         self.user_id = None
@@ -295,12 +294,9 @@
             # get the values from the widgets
             self.foldername = foldername.get_text()
 
-            #user must enter their username
-            self.set_configured(self.is_configured())
-
         dlg.destroy()
 
-    def is_configured (self):
+    def is_configured (self, isSource, isTwoWay):
         return len (self.foldername) > 0
 
     def get_configuration(self):

Modified: trunk/conduit/modules/FileModule/FileModule.py
==============================================================================
--- trunk/conduit/modules/FileModule/FileModule.py	(original)
+++ trunk/conduit/modules/FileModule/FileModule.py	Tue Feb  5 23:19:03 2008
@@ -73,8 +73,6 @@
                 FolderTwoWay.DEFAULT_COMPARE_IGNORE_MTIME
                 )
         AutoSync.AutoSync.__init__(self)
-        self.need_configuration(True)
-
         self._monitor_folder_id = None
 
     def __del__(self):
@@ -87,7 +85,6 @@
         import FileConfiguration
         f = FileConfiguration._FolderTwoWayConfigurator(window, self.folder, self.folderGroupName, self.includeHidden, self.compareIgnoreMtime)
         self.folder, self.folderGroupName, self.includeHidden, self.compareIgnoreMtime = f.show_dialog()
-        self.set_configured(True)
         self._monitor_folder()
         
     def set_configuration(self, config):
@@ -95,8 +92,6 @@
         self.folderGroupName = config.get("folderGroupName", FolderTwoWay.DEFAULT_GROUP)
         self.includeHidden = config.get("includeHidden", FolderTwoWay.DEFAULT_HIDDEN)
         self.compareIgnoreMtime = config.get("compareIgnoreMtime", FolderTwoWay.DEFAULT_COMPARE_IGNORE_MTIME)
-
-        self.set_configured(True)
         self._monitor_folder()
 
     def get_configuration(self):

Modified: trunk/conduit/modules/FlickrModule/FlickrModule.py
==============================================================================
--- trunk/conduit/modules/FlickrModule/FlickrModule.py	(original)
+++ trunk/conduit/modules/FlickrModule/FlickrModule.py	Tue Feb  5 23:19:03 2008
@@ -70,8 +70,6 @@
 
     def __init__(self, *args):
         Image.ImageTwoWay.__init__(self)
-        self.need_configuration(True)
-        
         self.fapi = None
         self.token = None
         self.photoSetName = ""
@@ -267,13 +265,9 @@
             self.showPublic = publicCb.get_active()
             self.username = username.get_text()
             self.imageSize = self._resize_combobox_get_active(resizecombobox)
-
-            #user must enter their username
-            self.set_configured(self.is_configured())
-
         dlg.destroy()    
        
-    def is_configured (self):
+    def is_configured (self, isSource, isTwoWay):
         return len (self.username) > 0
         
     def get_configuration(self):

Modified: trunk/conduit/modules/FspotModule/FspotModule.py
==============================================================================
--- trunk/conduit/modules/FspotModule/FspotModule.py	(original)
+++ trunk/conduit/modules/FspotModule/FspotModule.py	Tue Feb  5 23:19:03 2008
@@ -43,7 +43,6 @@
 
     def __init__(self, *args):
         Image.ImageTwoWay.__init__(self)
-        self.need_configuration(True)
 
         self.enabledTags = []
         self.photos = []
@@ -52,7 +51,6 @@
         self.tag_remote = None
 
         self._connect_to_fspot()
-
         self._hookup_signal_handlers()
 
     def _connect_to_fspot(self):
@@ -242,23 +240,16 @@
         dlg.set_transient_for(window)
 
         response = dlg.run()
-        if response == True:
-            self.set_configured(True)
         dlg.destroy()
 
     def set_configuration(self, config):
         self.enabledTags = []
         for tag in config.get("tags", []):
             self.enabledTags.append(str(tag))
-
-        self.set_configured(True)
             
     def get_configuration(self):
         return {"tags": self.enabledTags}
 
-    def is_configured (self):
-        return True
-
     def get_UID(self):
         return Utils.get_user_string()
 
@@ -285,8 +276,6 @@
 
     def __init__(self, *args):
         DataProvider.DataSource.__init__(self)
-
-        self.need_configuration(True)
         #Settings
         self.enabledTags = []
         self.photos = []
@@ -402,8 +391,6 @@
         dlg = tree.get_widget("FspotConfigDialog")
         
         response = Utils.run_dialog (dlg, window)
-        if response == True:
-            self.set_configured(True)
         dlg.destroy()
 
     def set_configuration(self, config):
@@ -411,8 +398,6 @@
         for tag in config.get("tags", []):
             self.enabledTags.append(int(tag))
 
-        self.set_configured(True)
-            
     def get_configuration(self):
         strTags = []
         for tag in self.enabledTags:

Modified: trunk/conduit/modules/GmailModule/GmailModule.py
==============================================================================
--- trunk/conduit/modules/GmailModule/GmailModule.py	(original)
+++ trunk/conduit/modules/GmailModule/GmailModule.py	Tue Feb  5 23:19:03 2008
@@ -29,13 +29,19 @@
     def __init__(self, *args):
         self.username = ""
         self.password = ""
-
         self.loggedIn = False
         self.ga = None
     
     def initialize(self):
         return True
 
+    def is_configured (self, isSource, isTwoWay):
+        if len(self.username) < 1:
+            return False
+        if len(self.password) < 1:
+            return False
+        return True
+
     def refresh(self):
         if self.loggedIn == False:
             if "@" in self.username:
@@ -77,8 +83,7 @@
     def __init__(self, *args):
         GmailBase.__init__(self, *args)
         DataProvider.TwoWay.__init__(self)
-        self.need_configuration(True)
-        
+
         #What emails should the source return??
         self.getAllEmail = False
         self.getUnreadEmail = False
@@ -175,7 +180,6 @@
         
         response = Utils.run_dialog (dlg, window)
         if response == True:
-            self.set_configured(True)
             if searchAllEmailsCb.get_active():
                 self.getAllEmail = True
                 self.getUnreadEmail = False

Modified: trunk/conduit/modules/GoogleModule/GoogleModule.py
==============================================================================
--- trunk/conduit/modules/GoogleModule/GoogleModule.py	(original)
+++ trunk/conduit/modules/GoogleModule/GoogleModule.py	Tue Feb  5 23:19:03 2008
@@ -356,8 +356,6 @@
         DataProvider.TwoWay.__init__(self)
         self.google = GoogleConnection()
         self.events = dict()
-        self.need_configuration(True)
-        self.set_configured(False)
         
     def _loadCalendars(self, widget, tree):
         import gtk, gtk.gdk
@@ -423,7 +421,6 @@
         response = Utils.run_dialog(dlg, window)
         if response == True:
             self.google.SetCalendar( store.get_value(sourceComboBox.get_active_iter(), 1) )
-            self.set_configured(True)
         dlg.destroy()  
         
     def refresh(self):
@@ -450,7 +447,14 @@
         conduitEvent.set_open_URI(LUID)
         conduitEvent.set_mtime(event.GetMTime())
         conduitEvent.set_UID(event.GetUID())
-        return conduitEvent          
+        return conduitEvent
+        
+    def is_configured (self, isSource, isTwoWay):
+        if len(self.google.GetUsername()) < 1:
+            return False
+        if len(self.google.GetPassword()) < 1:
+            return False
+        return True   
                    
     def _createEvent(self, conduitEvent):
         googleEvent = GoogleEvent.FromICalFormat( conduitEvent.get_ical_string() )
@@ -501,7 +505,6 @@
         if self.google is not None:
             config['username'] = self.google.GetUsername()
             config['password'] = self.google.GetPassword()
-        config['isConfigured'] = self.isConfigured
         return config
             
     def set_configuration(self, config):
@@ -511,7 +514,6 @@
             self.google.SetPassword(config['password'])
         if ('selectedCalendarName' in config) and ('selectedCalendarURI' in config):
             self.google.SetCalendar( GoogleCalendar(config['selectedCalendarName'], config['selectedCalendarURI']) )
-        self.set_configured( config['isConfigured'] )
          
     def get_UID(self):
         return self.google.GetUsername()
@@ -524,7 +526,6 @@
 
     def __init__(self, *args):
         Image.ImageTwoWay.__init__(self)
-        self.need_configuration(True)
         
         self.username = ""
         self.password = ""
@@ -651,18 +652,12 @@
         self._resize_combobox_build(resizecombobox, self.imageSize)
         
         dlg = widget.get_widget("PicasaTwoWayConfigDialog")
-        
         response = Utils.run_dialog (dlg, window)
-
         if response == True:
             self.username = username.get_text()
             self.password = password.get_text()
             self.album = album.get_text()
-
             self.imageSize = self._resize_combobox_get_active(resizecombobox)
-
-            self.set_configured(self.is_configured())
-
         dlg.destroy()    
         
     def get_configuration(self):
@@ -673,16 +668,13 @@
             "album" : self.album
             }
             
-    def is_configured (self):
+    def is_configured (self, isSource, isTwoWay):
         if len(self.username) < 1:
             return False
-        
         if len(self.password) < 1:
             return False
-            
         if len(self.album) < 1:
             return False
-            
         return True
 
     def get_UID(self):

Modified: trunk/conduit/modules/N800Module/N800Module.py
==============================================================================
--- trunk/conduit/modules/N800Module/N800Module.py	(original)
+++ trunk/conduit/modules/N800Module/N800Module.py	Tue Feb  5 23:19:03 2008
@@ -66,7 +66,6 @@
                             False,
                             False
                             )
-        self.need_configuration(False)
         self.mount = mount
         self.udi = udi
         self.encodings =  {}
@@ -132,10 +131,6 @@
                     folder=Vfs.uri_join(args[0],self.DEFAULT_FOLDER)
                     )
                     
-    def configure(self, window):
-        #No need to configure encodings for Files
-        self.set_configured(True)                    
-
 class N800AudioTwoWay(N800Base):
     """
     TwoWay dataprovider for synchronizing a folder on a N800

Modified: trunk/conduit/modules/PicasaDesktopModule/PicasaDesktopModule.py
==============================================================================
--- trunk/conduit/modules/PicasaDesktopModule/PicasaDesktopModule.py	(original)
+++ trunk/conduit/modules/PicasaDesktopModule/PicasaDesktopModule.py	Tue Feb  5 23:19:03 2008
@@ -38,7 +38,6 @@
 
     def __init__(self, *args):
         DataProvider.DataSource.__init__(self)
-        self.need_configuration(False)
         self.albums = []
         self.enabledAlbums = []
         
@@ -199,8 +198,6 @@
         dlg = tree.get_widget("PicasaDesktopConfigDialog")
         
         response = Utils.run_dialog (dlg, window)
-        if response == True:
-            self.set_configured(True)
         dlg.destroy()
         
         print self.enabledAlbums

Modified: trunk/conduit/modules/RhythmboxModule/RhythmboxModule.py
==============================================================================
--- trunk/conduit/modules/RhythmboxModule/RhythmboxModule.py	(original)
+++ trunk/conduit/modules/RhythmboxModule/RhythmboxModule.py	Tue Feb  5 23:19:03 2008
@@ -142,8 +142,6 @@
         dlg = tree.get_widget("RBConfigDialog")
 
         response = Utils.run_dialog (dlg, window)
-        if response == True:
-            self.set_configured(True)
         dlg.destroy()
 
     def refresh(self):

Modified: trunk/conduit/modules/ShutterflyModule/ShutterflyModule.py
==============================================================================
--- trunk/conduit/modules/ShutterflyModule/ShutterflyModule.py	(original)
+++ trunk/conduit/modules/ShutterflyModule/ShutterflyModule.py	Tue Feb  5 23:19:03 2008
@@ -30,7 +30,6 @@
 	
 	def __init__(self, *args):
 		Image.ImageSink.__init__(self)
-		self.need_configuration(True)
 		
 		self.username = ""
 		self.password = ""
@@ -131,8 +130,6 @@
 			self.username = username.get_text()
 			self.password = password.get_text()
 			self.album = album.get_text()
-			
-			self.set_configured(self.is_configured())
 		
 		dlg.destroy()
 	
@@ -143,7 +140,7 @@
 			"album" : self.album
 			}
 	
-	def is_configured(self):
+	def is_configured(self, isSource, isTwoWay):
 		if len(self.username) < 1:
 			return False
 		

Modified: trunk/conduit/modules/SmugMugModule/SmugMugModule.py
==============================================================================
--- trunk/conduit/modules/SmugMugModule/SmugMugModule.py	(original)
+++ trunk/conduit/modules/SmugMugModule/SmugMugModule.py	Tue Feb  5 23:19:03 2008
@@ -32,8 +32,6 @@
 
     def __init__(self, *args):
         Image.ImageTwoWay.__init__(self)
-        self.need_configuration(True)
-        
         self.password = ""
         self.album = ""
         self.imageSize = "None"
@@ -134,8 +132,6 @@
             self.password = password.get_text()
             self.album = album.get_text()
             self.imageSize = self._resize_combobox_get_active(resizecombobox)
-            self.set_configured(self.is_configured())
-
         dlg.destroy()    
         
     def get_configuration(self):
@@ -146,7 +142,7 @@
             "album" : self.album
             }
             
-    def is_configured (self):
+    def is_configured (self, isSource, isTwoWay):
         if len(self.username) < 1:
             return False
         

Modified: trunk/conduit/modules/TestModule.py
==============================================================================
--- trunk/conduit/modules/TestModule.py	(original)
+++ trunk/conduit/modules/TestModule.py	Tue Feb  5 23:19:03 2008
@@ -418,7 +418,6 @@
                             includeHidden=False,
                             compareIgnoreMtime=False
                             )
-        self.need_configuration(False)
 
     def get_UID(self):
         return self.folder
@@ -607,13 +606,16 @@
     def __init__(self, *args):
         _TestBase.__init__(self)
         DataProvider.DataSink.__init__(self)
-        self.need_configuration(True)
+        self.isConfigured = False
         
     def configure(self, window):
-        self.set_configured(True)
+        self.isConfigured = True
 
     def set_configuration(self, config):
-        self.set_configured(True)
+        self.isConfigured = True
+
+    def is_configured(self, isSource, isTwoWay):
+        return self.isConfigured
 
 class TestSinkFailRefresh(_TestBase, DataProvider.DataSink):
 



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