fix papercut: OKDialogs which are modal but can hide behind gramps are very

annoying: fix 6 of them in often used tools


svn: r14387
This commit is contained in:
Benny Malengier 2010-02-15 12:45:33 +00:00
parent c76159ab9d
commit 89c4ee887c
6 changed files with 16 additions and 11 deletions

View File

@ -142,7 +142,8 @@ class ChangeNames(Tool.BatchTool, ManagedWindow.ManagedWindow):
self.progress.close()
self.close()
OkDialog(_('No modifications made'),
_("No capitalization changes were detected."))
_("No capitalization changes were detected."),
parent=uistate.window)
def name_cap(self, name):
name.strip()

View File

@ -199,7 +199,7 @@ class Check(Tool.BatchTool):
self.db.enable_signals()
self.db.request_rebuild()
errs = checker.build_report(cli)
errs = checker.build_report(uistate)
if errs:
Report(uistate, checker.text.getvalue(), cli)
@ -1406,7 +1406,7 @@ class CheckIntegrity(object):
not in self.invalid_note_references]
self.invalid_note_references += new_bad_handles
def build_report(self, cl=0):
def build_report(self, uistate=None):
self.progress.close()
bad_photos = len(self.bad_photo)
replaced_photos = len(self.replaced_photo)
@ -1448,11 +1448,12 @@ class CheckIntegrity(object):
)
if errors == 0:
if cl:
print "No errors were found: the database has passed internal checks."
else:
if uistate:
OkDialog(_("No errors were found"),
_('The database has passed internal checks'))
_('The database has passed internal checks'),
parent=uistate.window)
else:
print "No errors were found: the database has passed internal checks."
return 0
self.text = cStringIO.StringIO()

View File

@ -171,7 +171,8 @@ class Merge(Tool.Tool,ManagedWindow.ManagedWindow):
if len(self.map) == 0:
OkDialog(
_("No matches found"),
_("No potential duplicate people were found"))
_("No potential duplicate people were found"),
parent=self.window)
else:
try:
ShowMatches(self.dbstate,self.uistate,self.track,

View File

@ -83,7 +83,8 @@ class Rebuild(Tool.Tool, UpdateCallback):
uistate.set_busy_cursor(0)
uistate.progress.hide()
OkDialog(_("Secondary indices rebuilt"),
_('All secondary indices have been rebuilt.'))
_('All secondary indices have been rebuilt.'),
parent=uistate.window)
else:
print "Rebuilding Secondary Indices..."
self.db.rebuild_secondary(self.update_empty)

View File

@ -88,7 +88,8 @@ class RebuildRefMap(Tool.Tool, UpdateCallback):
uistate.set_busy_cursor(0)
uistate.progress.hide()
OkDialog(_("Reference maps rebuilt"),
_('All reference maps have been rebuilt.'))
_('All reference maps have been rebuilt.'),
parent=uistate.window)
else:
print "All reference maps have been rebuilt."
self.db.enable_signals()