* src/ViewManger.py: progressbar callbacks

* src/GrampsDb/_GrampsBSDDB.py: progressbar callbacks
* src/GrampsDb/_GrampsGEDDB.py: progressbar callbacks
* src/GrampsDb/_ReadXML.py: progressbar callbacks
* src/GrampsDb/_ReadGedcom.py: progressbar callbacks


svn: r5783
This commit is contained in:
Don Allingham
2006-01-18 04:08:28 +00:00
parent d169d9c949
commit 572a8a5724
6 changed files with 483 additions and 506 deletions

View File

@ -855,7 +855,7 @@ class ViewManager:
ScratchPad.ScratchPadWindow(self.state, self)
def pulse_progressbar(self,value):
self.progress.set_fraction(value)
self.progress.set_fraction(value/100.0)
while gtk.events_pending():
gtk.main_iteration()
@ -933,16 +933,12 @@ class ViewManager:
self.parent.import_tool_callback()
self.progress.hide()
return True
elif filetype == const.app_gramps_xml:
elif filetype == const.app_gramps_xml or filetype == const.app_gedcom:
choose.destroy()
self.progress.show()
GrampsDb.gramps_db_reader_factory(filetype)(self.state.db,filename,self.pulse_progressbar)
self.progress.hide()
return True
elif filetype == const.app_gedcom:
choose.destroy()
GrampsDb.gramps_db_reader_factory(filetype)(self.state.db,filename)
return True
(the_path,the_file) = os.path.split(filename)
GrampsKeys.save_last_import_dir(the_path)