2008-02-19 Douglas S. Blank <dblank@cs.brynmawr.edu>

* src/DbLoader.py (DbLoader.import_file): 
	Importer will stay on dialog until cancel or success. Errors
	will remain in dialog until fixed, or cancel.




svn: r10075
This commit is contained in:
Doug Blank 2008-02-20 04:59:52 +00:00
parent cc6654ddab
commit c76b017d64
2 changed files with 47 additions and 36 deletions

View File

@ -1,3 +1,8 @@
2008-02-19 Douglas S. Blank <dblank@cs.brynmawr.edu>
* src/DbLoader.py (DbLoader.import_file):
Importer will stay on dialog until cancel or success. Errors
will remain in dialog until fixed, or cancel.
2008-02-19 Brian Matherly <brian@gramps-project.org>
* src/ReportBase/_WebReportDialog.py:
* src/ReportBase/_ReportDialog.py:
@ -35,6 +40,7 @@
Remove the "person" option from reports, report options, and report dialogs.
Person is selected by the user for all reports.
2008-02-19 Douglas S. Blank <dblank@cs.brynmawr.edu>
* src/plugins/DefaultGramplets.py: News renders text with styles
* src/DataViews/GrampletView.py (GuiGramplet.render_text):

View File

@ -141,15 +141,20 @@ class DbLoader:
default_dir = get_default_dir()
choose_db_dialog.set_current_folder(default_dir)
while True:
response = choose_db_dialog.run()
if response == gtk.RESPONSE_OK:
if response == gtk.RESPONSE_CANCEL:
break
elif response == gtk.RESPONSE_OK:
filename = Utils.get_unicode_path(choose_db_dialog.get_filename())
if self.check_errors(filename):
return False
# displays errors if any
continue
# Do not allow importing from the currently open file
if filename == self.dbstate.db.full_name:
return False
ErrorDialog(_("Cannot import from current file"))
continue
filetype = type_selector.get_value()
if filetype == 'auto':
@ -158,7 +163,7 @@ class DbLoader:
except RuntimeError, msg:
ErrorDialog(_("Could not open file: %s") % filename,
str(msg))
return False
continue
# First we try our best formats
if filetype in OPEN_FORMATS: