Change api so object and settings are passed in at creation time.
This commit is contained in:
@@ -32,7 +32,7 @@ class GuiBulkImport (threading.Thread):
|
||||
print "BulkImport is not recursive - please select the final directory in which the history files are"
|
||||
else:
|
||||
self.inputFile=self.path+os.sep+file
|
||||
self.importer.import_file_dict(self, self.settings)
|
||||
self.importer.import_file_dict()
|
||||
print "GuiBulkImport.import_dir done"
|
||||
|
||||
def load_clicked(self, widget, data=None):
|
||||
@@ -64,12 +64,10 @@ class GuiBulkImport (threading.Thread):
|
||||
else:
|
||||
self.failOnError=True
|
||||
|
||||
self.server, self.database, self.user, self.password=self.db.get_db_info()
|
||||
|
||||
if os.path.isdir(self.inputFile):
|
||||
self.import_dir()
|
||||
else:
|
||||
self.importer.import_file_dict(self, self.settings)
|
||||
self.importer.import_file_dict()
|
||||
|
||||
def get_vbox(self):
|
||||
"""returns the vbox of this thread"""
|
||||
@@ -83,7 +81,7 @@ class GuiBulkImport (threading.Thread):
|
||||
def __init__(self, db, settings):
|
||||
self.db=db
|
||||
self.settings=settings
|
||||
self.importer = fpdb_import.Importer()
|
||||
self.importer = fpdb_import.Importer(self,self.settings)
|
||||
|
||||
self.vbox=gtk.VBox(False,1)
|
||||
self.vbox.show()
|
||||
|
||||
Reference in New Issue
Block a user