fix export assistant to show textual progress steps and first step

This commit is contained in:
prculley 2017-01-17 08:51:29 -06:00
parent a860a9d80b
commit a937d151af
2 changed files with 9 additions and 6 deletions

View File

@ -640,6 +640,9 @@ class ExportAssistant(ManagedWindow, Gtk.Assistant):
self.progressbar.set_fraction(min(value/100.0, 1.0)) self.progressbar.set_fraction(min(value/100.0, 1.0))
if text: if text:
self.progressbar.set_text("%s: %d%%" % (text, value)) self.progressbar.set_text("%s: %d%%" % (text, value))
self.confirm.set_label(
_("Please wait while your data is selected and exported") +
"\n" + text)
else: else:
self.progressbar.set_text("%d%%" % value) self.progressbar.set_text("%d%%" % value)
while Gtk.events_pending(): while Gtk.events_pending():

View File

@ -587,8 +587,8 @@ class WriterOptionBox:
if self.private: if self.private:
if progress: if progress:
progress.reset(_("Filtering private data")) progress.reset(_("Filtering private data"))
progress.progress_cnt += 1
progress.update(progress.progress_cnt) progress.update(progress.progress_cnt)
progress.progress_cnt += 1
dbase = PrivateProxyDb(dbase) dbase = PrivateProxyDb(dbase)
# If the restrict flag is set, apply the LivingProxyDb # If the restrict flag is set, apply the LivingProxyDb
@ -596,8 +596,8 @@ class WriterOptionBox:
if self.restrict_num > 0: if self.restrict_num > 0:
if progress: if progress:
progress.reset(_("Filtering living persons")) progress.reset(_("Filtering living persons"))
progress.progress_cnt += 1
progress.update(progress.progress_cnt) progress.update(progress.progress_cnt)
progress.progress_cnt += 1
mode = [None, # include living mode = [None, # include living
LivingProxyDb.MODE_INCLUDE_LAST_NAME_ONLY, LivingProxyDb.MODE_INCLUDE_LAST_NAME_ONLY,
LivingProxyDb.MODE_REPLACE_COMPLETE_NAME, LivingProxyDb.MODE_REPLACE_COMPLETE_NAME,
@ -613,8 +613,8 @@ class WriterOptionBox:
if self.cfilter != None and not self.cfilter.is_empty(): if self.cfilter != None and not self.cfilter.is_empty():
if progress: if progress:
progress.reset(_("Applying selected person filter")) progress.reset(_("Applying selected person filter"))
progress.progress_cnt += 1
progress.update(progress.progress_cnt) progress.update(progress.progress_cnt)
progress.progress_cnt += 1
dbase = FilterProxyDb( dbase = FilterProxyDb(
dbase, self.cfilter) dbase, self.cfilter)
@ -623,17 +623,17 @@ class WriterOptionBox:
if self.nfilter != None and not self.nfilter.is_empty(): if self.nfilter != None and not self.nfilter.is_empty():
if progress: if progress:
progress.reset(_("Applying selected note filter")) progress.reset(_("Applying selected note filter"))
progress.progress_cnt += 1
progress.update(progress.progress_cnt) progress.update(progress.progress_cnt)
progress.progress_cnt += 1
dbase = FilterProxyDb( dbase = FilterProxyDb(
dbase, note_filter=self.nfilter) dbase, note_filter=self.nfilter)
# Apply the ReferencedBySelection # Apply the ReferencedBySelection
elif proxy_name == "reference": elif proxy_name == "reference":
if progress: if self.reference_num > 0 and progress:
progress.reset(_("Filtering referenced records")) progress.reset(_("Filtering referenced records"))
progress.progress_cnt += 1
progress.update(progress.progress_cnt) progress.update(progress.progress_cnt)
progress.progress_cnt += 1
if self.reference_num == 0: if self.reference_num == 0:
pass pass
elif self.reference_num == 1: elif self.reference_num == 1: