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:
parent
c76159ab9d
commit
89c4ee887c
@ -142,7 +142,8 @@ class ChangeNames(Tool.BatchTool, ManagedWindow.ManagedWindow):
|
|||||||
self.progress.close()
|
self.progress.close()
|
||||||
self.close()
|
self.close()
|
||||||
OkDialog(_('No modifications made'),
|
OkDialog(_('No modifications made'),
|
||||||
_("No capitalization changes were detected."))
|
_("No capitalization changes were detected."),
|
||||||
|
parent=uistate.window)
|
||||||
|
|
||||||
def name_cap(self, name):
|
def name_cap(self, name):
|
||||||
name.strip()
|
name.strip()
|
||||||
|
@ -150,7 +150,7 @@ class ChangeTypes(Tool.BatchTool, ManagedWindow.ManagedWindow):
|
|||||||
self.options.handler.options_dict['totype'] = the_type.xml_str()
|
self.options.handler.options_dict['totype'] = the_type.xml_str()
|
||||||
|
|
||||||
modified,msg = self.run_tool(cli=False)
|
modified,msg = self.run_tool(cli=False)
|
||||||
OkDialog(_('Change types'),msg,self.window)
|
OkDialog(_('Change types'), msg, self.window)
|
||||||
|
|
||||||
# Save options
|
# Save options
|
||||||
self.options.handler.save_options()
|
self.options.handler.save_options()
|
||||||
|
@ -199,7 +199,7 @@ class Check(Tool.BatchTool):
|
|||||||
self.db.enable_signals()
|
self.db.enable_signals()
|
||||||
self.db.request_rebuild()
|
self.db.request_rebuild()
|
||||||
|
|
||||||
errs = checker.build_report(cli)
|
errs = checker.build_report(uistate)
|
||||||
if errs:
|
if errs:
|
||||||
Report(uistate, checker.text.getvalue(), cli)
|
Report(uistate, checker.text.getvalue(), cli)
|
||||||
|
|
||||||
@ -1406,7 +1406,7 @@ class CheckIntegrity(object):
|
|||||||
not in self.invalid_note_references]
|
not in self.invalid_note_references]
|
||||||
self.invalid_note_references += new_bad_handles
|
self.invalid_note_references += new_bad_handles
|
||||||
|
|
||||||
def build_report(self, cl=0):
|
def build_report(self, uistate=None):
|
||||||
self.progress.close()
|
self.progress.close()
|
||||||
bad_photos = len(self.bad_photo)
|
bad_photos = len(self.bad_photo)
|
||||||
replaced_photos = len(self.replaced_photo)
|
replaced_photos = len(self.replaced_photo)
|
||||||
@ -1448,11 +1448,12 @@ class CheckIntegrity(object):
|
|||||||
)
|
)
|
||||||
|
|
||||||
if errors == 0:
|
if errors == 0:
|
||||||
if cl:
|
if uistate:
|
||||||
print "No errors were found: the database has passed internal checks."
|
|
||||||
else:
|
|
||||||
OkDialog(_("No errors were found"),
|
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
|
return 0
|
||||||
|
|
||||||
self.text = cStringIO.StringIO()
|
self.text = cStringIO.StringIO()
|
||||||
|
@ -171,7 +171,8 @@ class Merge(Tool.Tool,ManagedWindow.ManagedWindow):
|
|||||||
if len(self.map) == 0:
|
if len(self.map) == 0:
|
||||||
OkDialog(
|
OkDialog(
|
||||||
_("No matches found"),
|
_("No matches found"),
|
||||||
_("No potential duplicate people were found"))
|
_("No potential duplicate people were found"),
|
||||||
|
parent=self.window)
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
ShowMatches(self.dbstate,self.uistate,self.track,
|
ShowMatches(self.dbstate,self.uistate,self.track,
|
||||||
|
@ -83,7 +83,8 @@ class Rebuild(Tool.Tool, UpdateCallback):
|
|||||||
uistate.set_busy_cursor(0)
|
uistate.set_busy_cursor(0)
|
||||||
uistate.progress.hide()
|
uistate.progress.hide()
|
||||||
OkDialog(_("Secondary indices rebuilt"),
|
OkDialog(_("Secondary indices rebuilt"),
|
||||||
_('All secondary indices have been rebuilt.'))
|
_('All secondary indices have been rebuilt.'),
|
||||||
|
parent=uistate.window)
|
||||||
else:
|
else:
|
||||||
print "Rebuilding Secondary Indices..."
|
print "Rebuilding Secondary Indices..."
|
||||||
self.db.rebuild_secondary(self.update_empty)
|
self.db.rebuild_secondary(self.update_empty)
|
||||||
|
@ -88,7 +88,8 @@ class RebuildRefMap(Tool.Tool, UpdateCallback):
|
|||||||
uistate.set_busy_cursor(0)
|
uistate.set_busy_cursor(0)
|
||||||
uistate.progress.hide()
|
uistate.progress.hide()
|
||||||
OkDialog(_("Reference maps rebuilt"),
|
OkDialog(_("Reference maps rebuilt"),
|
||||||
_('All reference maps have been rebuilt.'))
|
_('All reference maps have been rebuilt.'),
|
||||||
|
parent=uistate.window)
|
||||||
else:
|
else:
|
||||||
print "All reference maps have been rebuilt."
|
print "All reference maps have been rebuilt."
|
||||||
self.db.enable_signals()
|
self.db.enable_signals()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user