0001908: BUG: running tools from command line
svn: r10303
This commit is contained in:
parent
3febc1e429
commit
68ad749f6a
@ -161,6 +161,7 @@ class CommandLineTool:
|
||||
self.database = database
|
||||
self.category = category
|
||||
self.option_class = option_class(name)
|
||||
self.option_class.load_previous_values()
|
||||
self.show = options_str_dict.pop('show',None)
|
||||
self.options_str_dict = options_str_dict
|
||||
self.init_options(noopt)
|
||||
|
@ -67,28 +67,27 @@ class Rebuild(Tool.Tool,UpdateCallback):
|
||||
return
|
||||
|
||||
self.db.disable_signals()
|
||||
|
||||
if uistate:
|
||||
self.callback = uistate.pulse_progressbar
|
||||
uistate.set_busy_cursor(1)
|
||||
uistate.progress.show()
|
||||
uistate.push_message(dbstate, _("Rebuilding secondary indices..."))
|
||||
else:
|
||||
print "Rebuilding Secondary Indices..."
|
||||
self.db.rebuild_secondary(self.empty)
|
||||
print "All secondary indices have been rebuilt."
|
||||
|
||||
UpdateCallback.__init__(self,self.callback)
|
||||
self.set_total(11)
|
||||
self.db.rebuild_secondary(self.update)
|
||||
self.reset()
|
||||
|
||||
if uistate:
|
||||
|
||||
UpdateCallback.__init__(self,self.callback)
|
||||
self.set_total(11)
|
||||
self.db.rebuild_secondary(self.update)
|
||||
self.reset()
|
||||
|
||||
uistate.set_busy_cursor(0)
|
||||
uistate.progress.hide()
|
||||
OkDialog(_("Secondary indices rebuilt"),
|
||||
_('All secondary indices have been rebuilt.'))
|
||||
else:
|
||||
print "Rebuilding Secondary Indices..."
|
||||
self.db.rebuild_secondary(self.update_empty)
|
||||
print "All secondary indices have been rebuilt."
|
||||
|
||||
self.db.enable_signals()
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user