8128: GtkDialog mapped without a transient parent
This commit is contained in:
parent
76a6e8a502
commit
da8f99bab7
@ -128,12 +128,12 @@ class DeepRelationshipPathBetween(Rule):
|
|||||||
" Each path is not necessarily the shortest path.")
|
" Each path is not necessarily the shortest path.")
|
||||||
|
|
||||||
def prepare(self, db):
|
def prepare(self, db):
|
||||||
# FIXME: this should user the User class
|
# FIXME: this should use the User class
|
||||||
from gramps.gui.utils import ProgressMeter
|
from gramps.gui.utils import ProgressMeter
|
||||||
root_person_id = self.list[0]
|
root_person_id = self.list[0]
|
||||||
root_person = db.get_person_from_gramps_id(root_person_id)
|
root_person = db.get_person_from_gramps_id(root_person_id)
|
||||||
|
|
||||||
progress = ProgressMeter(_('Finding relationship paths'))
|
progress = ProgressMeter(_('Finding relationship paths')) # no-parent
|
||||||
progress.set_pass(header=_('Evaluating people'), mode=ProgressMeter.MODE_ACTIVITY)
|
progress.set_pass(header=_('Evaluating people'), mode=ProgressMeter.MODE_ACTIVITY)
|
||||||
|
|
||||||
filter_name = self.list[1]
|
filter_name = self.list[1]
|
||||||
|
|||||||
@ -214,7 +214,7 @@ class AddMedia(ManagedWindow):
|
|||||||
if filename:
|
if filename:
|
||||||
mtype = get_type(filename)
|
mtype = get_type(filename)
|
||||||
if mtype and mtype.startswith("image"):
|
if mtype and mtype.startswith("image"):
|
||||||
image = scale_image(filename, THUMBSCALE)
|
image = self.scale_image(filename, THUMBSCALE)
|
||||||
else:
|
else:
|
||||||
image = find_mime_type_pixbuf(mtype)
|
image = find_mime_type_pixbuf(mtype)
|
||||||
self.image.set_from_pixbuf(image)
|
self.image.set_from_pixbuf(image)
|
||||||
@ -224,28 +224,28 @@ class AddMedia(ManagedWindow):
|
|||||||
config.set('behavior.addmedia-relative-path', self.relative_path)
|
config.set('behavior.addmedia-relative-path', self.relative_path)
|
||||||
config.save()
|
config.save()
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# scale_image
|
# scale_image
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
def scale_image(path, size):
|
def scale_image(self, path, size):
|
||||||
"""
|
"""
|
||||||
Scales the image to the specified size
|
Scales the image to the specified size
|
||||||
"""
|
"""
|
||||||
|
|
||||||
title_msg = _("Cannot display %s") % path
|
title_msg = _("Cannot display %s") % path
|
||||||
detail_msg = _('Gramps is not able to display the image file. '
|
detail_msg = _('Gramps is not able to display the image file. '
|
||||||
'This may be caused by a corrupt file.')
|
'This may be caused by a corrupt file.')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
image1 = GdkPixbuf.Pixbuf.new_from_file(path)
|
image1 = GdkPixbuf.Pixbuf.new_from_file(path)
|
||||||
width = image1.get_width()
|
width = image1.get_width()
|
||||||
height = image1.get_height()
|
height = image1.get_height()
|
||||||
|
scale = size / float(max(width, height))
|
||||||
scale = size / float(max(width, height))
|
return image1.scale_simple(int(scale*width), int(scale*height),
|
||||||
return image1.scale_simple(int(scale*width), int(scale*height),
|
GdkPixbuf.InterpType.BILINEAR)
|
||||||
GdkPixbuf.InterpType.BILINEAR)
|
except:
|
||||||
except:
|
WarningDialog(title_msg, detail_msg,
|
||||||
WarningDialog(title_msg, detail_msg) # no-parent
|
parent=self.window) # parent-OK
|
||||||
return GdkPixbuf.Pixbuf.new_from_file(ICON)
|
return GdkPixbuf.Pixbuf.new_from_file(ICON)
|
||||||
|
|||||||
@ -114,7 +114,7 @@ class LastNameDialog(ManagedWindow):
|
|||||||
# build up the list of surnames, keeping track of the count for each
|
# build up the list of surnames, keeping track of the count for each
|
||||||
# name (this can be a lengthy process, so by passing in the
|
# name (this can be a lengthy process, so by passing in the
|
||||||
# dictionary we can be certain we only do this once)
|
# dictionary we can be certain we only do this once)
|
||||||
progress = ProgressMeter(_('Finding Surnames'))
|
progress = ProgressMeter(_('Finding Surnames')) # no-parent
|
||||||
progress.set_pass(_('Finding surnames'),
|
progress.set_pass(_('Finding surnames'),
|
||||||
database.get_number_of_people())
|
database.get_number_of_people())
|
||||||
for person in database.iter_people():
|
for person in database.iter_people():
|
||||||
|
|||||||
@ -305,7 +305,7 @@ class PluginStatus(ManagedWindow):
|
|||||||
except:
|
except:
|
||||||
print("Error: cannot open %s" % URL)
|
print("Error: cannot open %s" % URL)
|
||||||
return
|
return
|
||||||
pm = ProgressMeter(_("Refreshing Addon List"))
|
pm = ProgressMeter(_("Refreshing Addon List")) # no-parent
|
||||||
pm.set_pass(header=_("Reading gramps-project.org..."))
|
pm.set_pass(header=_("Reading gramps-project.org..."))
|
||||||
state = "read"
|
state = "read"
|
||||||
rows = []
|
rows = []
|
||||||
@ -383,7 +383,8 @@ class PluginStatus(ManagedWindow):
|
|||||||
Get all addons from the wiki and install them.
|
Get all addons from the wiki and install them.
|
||||||
"""
|
"""
|
||||||
from ..utils import ProgressMeter
|
from ..utils import ProgressMeter
|
||||||
pm = ProgressMeter(_("Install all Addons"), _("Installing..."), message_area=True)
|
pm = ProgressMeter( # no-parent
|
||||||
|
_("Install all Addons"), _("Installing..."), message_area=True)
|
||||||
pm.set_pass(total=len(self.addon_model))
|
pm.set_pass(total=len(self.addon_model))
|
||||||
errors = []
|
errors = []
|
||||||
for row in self.addon_model:
|
for row in self.addon_model:
|
||||||
@ -401,7 +402,8 @@ class PluginStatus(ManagedWindow):
|
|||||||
Toplevel method to get an addon.
|
Toplevel method to get an addon.
|
||||||
"""
|
"""
|
||||||
from ..utils import ProgressMeter
|
from ..utils import ProgressMeter
|
||||||
pm = ProgressMeter(_("Installing Addon"), message_area=True)
|
pm = ProgressMeter( # no-parent
|
||||||
|
_("Installing Addon"), message_area=True)
|
||||||
pm.set_pass(total=2, header=_("Reading gramps-project.org..."))
|
pm.set_pass(total=2, header=_("Reading gramps-project.org..."))
|
||||||
pm.step()
|
pm.step()
|
||||||
self.__get_addon(obj, callback=pm.append_message)
|
self.__get_addon(obj, callback=pm.append_message)
|
||||||
@ -877,7 +879,7 @@ class ToolManagedWindowBase(ManagedWindow):
|
|||||||
|
|
||||||
def pre_run(self):
|
def pre_run(self):
|
||||||
from ..utils import ProgressMeter
|
from ..utils import ProgressMeter
|
||||||
self.progress = ProgressMeter(self.get_title())
|
self.progress = ProgressMeter(self.get_title()) # no-parent
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
raise NotImplementedError("tool needs to define a run() method")
|
raise NotImplementedError("tool needs to define a run() method")
|
||||||
|
|||||||
@ -64,7 +64,8 @@ class Progress:
|
|||||||
"""
|
"""
|
||||||
def __init__(self, uistate):
|
def __init__(self, uistate):
|
||||||
from gi.repository import Gtk
|
from gi.repository import Gtk
|
||||||
self.pm = ProgressMeter(_("Selecting Preview Data"), _('Selecting...'),
|
self.pm = ProgressMeter(_("Selecting Preview Data"), # parent-OK
|
||||||
|
_('Selecting...'),
|
||||||
parent=uistate.window)
|
parent=uistate.window)
|
||||||
self.progress_cnt = 0
|
self.progress_cnt = 0
|
||||||
self.title = _("Selecting...")
|
self.title = _("Selecting...")
|
||||||
|
|||||||
@ -82,7 +82,7 @@ class StyleListDisplay:
|
|||||||
self.sheetlist = stylesheetlist
|
self.sheetlist = stylesheetlist
|
||||||
|
|
||||||
self.parent_window = parent_window
|
self.parent_window = parent_window
|
||||||
|
|
||||||
self.top = Glade(toplevel='styles')
|
self.top = Glade(toplevel='styles')
|
||||||
self.window = self.top.toplevel
|
self.window = self.top.toplevel
|
||||||
|
|
||||||
|
|||||||
@ -68,9 +68,10 @@ class User(user.User):
|
|||||||
:returns: none
|
:returns: none
|
||||||
"""
|
"""
|
||||||
if self.uistate:
|
if self.uistate:
|
||||||
self._progress = ProgressMeter(title, parent=self.uistate.window)
|
self._progress = ProgressMeter(title, # parent-OK
|
||||||
|
parent=self.uistate.window)
|
||||||
else:
|
else:
|
||||||
self._progress = ProgressMeter(title)
|
self._progress = ProgressMeter(title) # parent-OK
|
||||||
if steps > 0:
|
if steps > 0:
|
||||||
self._progress.set_pass(message, steps, ProgressMeter.MODE_FRACTION)
|
self._progress.set_pass(message, steps, ProgressMeter.MODE_FRACTION)
|
||||||
else:
|
else:
|
||||||
|
|||||||
@ -103,7 +103,7 @@ class CLIDialog:
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
class ProgressMeter:
|
class ProgressMeter: # parent-OK
|
||||||
"""
|
"""
|
||||||
Progress meter class for Gramps.
|
Progress meter class for Gramps.
|
||||||
|
|
||||||
|
|||||||
@ -541,8 +541,8 @@ class GrampletBar(Gtk.Notebook):
|
|||||||
"""
|
"""
|
||||||
Called when restore defaults is clicked from the context menu.
|
Called when restore defaults is clicked from the context menu.
|
||||||
"""
|
"""
|
||||||
QuestionDialog(
|
QuestionDialog( # parent-OK
|
||||||
_("Restore to defaults?"), # parent-OK
|
_("Restore to defaults?"),
|
||||||
_("The gramplet bar will be restored to contain its default "
|
_("The gramplet bar will be restored to contain its default "
|
||||||
"gramplets. This action cannot be undone."),
|
"gramplets. This action cannot be undone."),
|
||||||
_("OK"),
|
_("OK"),
|
||||||
|
|||||||
@ -511,7 +511,7 @@ class ProgenParser:
|
|||||||
def parse_progen_file(self):
|
def parse_progen_file(self):
|
||||||
self.def_ = PG30_Def(self.fname)
|
self.def_ = PG30_Def(self.fname)
|
||||||
#print self.def_.diag()
|
#print self.def_.diag()
|
||||||
self.progress = ProgressMeter(_("Import from Pro-Gen"), '')
|
self.progress = ProgressMeter(_("Import from Pro-Gen"), '') # no-parent
|
||||||
|
|
||||||
self.mems = _read_mem(self.bname)
|
self.mems = _read_mem(self.bname)
|
||||||
self.pers = _read_recs(self.def_['Table_1'], self.bname)
|
self.pers = _read_recs(self.def_['Table_1'], self.bname)
|
||||||
|
|||||||
@ -82,8 +82,8 @@ class ChangeNames(tool.BatchTool, ManagedWindow):
|
|||||||
if self.fail:
|
if self.fail:
|
||||||
return
|
return
|
||||||
|
|
||||||
self.progress = ProgressMeter(_('Checking Family Names'),'',
|
self.progress = ProgressMeter( # parent-OK
|
||||||
parent=uistate.window)
|
_('Checking Family Names'), '', parent=uistate.window)
|
||||||
self.progress.set_pass(_('Searching family names'),
|
self.progress.set_pass(_('Searching family names'),
|
||||||
len(self.db.get_surname_list()))
|
len(self.db.get_surname_list()))
|
||||||
self.name_list = []
|
self.name_list = []
|
||||||
|
|||||||
@ -103,7 +103,7 @@ def cross_table_duplicates(db, uistate):
|
|||||||
parent = uistate.window
|
parent = uistate.window
|
||||||
else:
|
else:
|
||||||
parent = None
|
parent = None
|
||||||
progress = ProgressMeter(_('Checking Database'),'', parent)
|
progress = ProgressMeter(_('Checking Database'), '', parent) # parent-OK
|
||||||
progress.set_pass(_('Looking for cross table duplicates'), 9)
|
progress.set_pass(_('Looking for cross table duplicates'), 9)
|
||||||
logging.info('Looking for cross table duplicates')
|
logging.info('Looking for cross table duplicates')
|
||||||
total_nr_handles = 0
|
total_nr_handles = 0
|
||||||
@ -246,8 +246,8 @@ class CheckIntegrity:
|
|||||||
self.empty_objects = defaultdict(list)
|
self.empty_objects = defaultdict(list)
|
||||||
self.replaced_sourceref = []
|
self.replaced_sourceref = []
|
||||||
self.last_img_dir = config.get('behavior.addmedia-image-dir')
|
self.last_img_dir = config.get('behavior.addmedia-image-dir')
|
||||||
self.progress = ProgressMeter(_('Checking Database'),'',
|
self.progress = ProgressMeter(_('Checking Database'), '', # parent-OK
|
||||||
parent=self.parent_window)
|
parent=self.parent_window)
|
||||||
self.explanation = Note(_('Objects referenced by this note '
|
self.explanation = Note(_('Objects referenced by this note '
|
||||||
'were referenced but missing so that is why they have been created '
|
'were referenced but missing so that is why they have been created '
|
||||||
'when you ran Check and Repair on %s.') %
|
'when you ran Check and Repair on %s.') %
|
||||||
|
|||||||
@ -77,8 +77,8 @@ class DateParserDisplayTest(tool.Tool):
|
|||||||
|
|
||||||
|
|
||||||
def run_tool(self):
|
def run_tool(self):
|
||||||
self.progress = ProgressMeter(_('Running Date Test'),'',
|
self.progress = ProgressMeter(_('Running Date Test'), '', # parent-OK
|
||||||
parent=self.parent_window)
|
parent=self.parent_window)
|
||||||
self.progress.set_pass(_('Generating dates'),
|
self.progress.set_pass(_('Generating dates'),
|
||||||
4)
|
4)
|
||||||
dates = []
|
dates = []
|
||||||
|
|||||||
@ -176,9 +176,8 @@ class EventComparison(tool.Tool,ManagedWindow):
|
|||||||
def on_apply_clicked(self, obj):
|
def on_apply_clicked(self, obj):
|
||||||
cfilter = self.filter_model[self.filters.get_active()][1]
|
cfilter = self.filter_model[self.filters.get_active()][1]
|
||||||
|
|
||||||
progress_bar = ProgressMeter(_('Comparing events'),
|
progress_bar = ProgressMeter(_('Comparing events'), '', # parent-OK
|
||||||
'',
|
parent=self.window)
|
||||||
parent=self.window)
|
|
||||||
progress_bar.set_pass(_('Selecting people'),1)
|
progress_bar.set_pass(_('Selecting people'),1)
|
||||||
|
|
||||||
plist = cfilter.apply(self.db,
|
plist = cfilter.apply(self.db,
|
||||||
@ -307,8 +306,8 @@ class DisplayChart(ManagedWindow):
|
|||||||
self.progress_bar.close()
|
self.progress_bar.close()
|
||||||
|
|
||||||
def build_row_data(self):
|
def build_row_data(self):
|
||||||
self.progress_bar = ProgressMeter(_('Comparing Events'),'',
|
self.progress_bar = ProgressMeter( # parent-OK
|
||||||
parent=self.window)
|
_('Comparing Events'), '', parent=self.window)
|
||||||
self.progress_bar.set_pass(_('Building data'),len(self.my_list))
|
self.progress_bar.set_pass(_('Building data'),len(self.my_list))
|
||||||
for individual_id in self.my_list:
|
for individual_id in self.my_list:
|
||||||
individual = self.db.get_person_from_handle(individual_id)
|
individual = self.db.get_person_from_handle(individual_id)
|
||||||
|
|||||||
@ -184,9 +184,9 @@ class Merge(tool.Tool,ManagedWindow):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def find_potentials(self, thresh):
|
def find_potentials(self, thresh):
|
||||||
self.progress = ProgressMeter(_('Find Duplicates'),
|
self.progress = ProgressMeter(_('Find Duplicates'), # parent-OK
|
||||||
_('Looking for duplicate people'),
|
_('Looking for duplicate people'),
|
||||||
parent=self.window)
|
parent=self.window)
|
||||||
|
|
||||||
index = 0
|
index = 0
|
||||||
males = {}
|
males = {}
|
||||||
|
|||||||
@ -86,7 +86,7 @@ class FindLoop(ManagedWindow):
|
|||||||
self.set_window(window, title, self.title)
|
self.set_window(window, title, self.title)
|
||||||
|
|
||||||
# start the progress indicator
|
# start the progress indicator
|
||||||
self.progress = ProgressMeter(self.title, _('Starting'),
|
self.progress = ProgressMeter(self.title, _('Starting'), # parent-OK
|
||||||
parent=self.window)
|
parent=self.window)
|
||||||
self.progress.set_pass(_('Looking for possible loop for each person'),
|
self.progress.set_pass(_('Looking for possible loop for each person'),
|
||||||
self.db.get_number_of_people())
|
self.db.get_number_of_people())
|
||||||
|
|||||||
@ -181,7 +181,7 @@ class MergeCitations(tool.BatchTool,ManagedWindow):
|
|||||||
# Save options
|
# Save options
|
||||||
self.options.handler.save_options()
|
self.options.handler.save_options()
|
||||||
|
|
||||||
self.progress = ProgressMeter(_('Checking Sources'), '',
|
self.progress = ProgressMeter(_('Checking Sources'), '', # parent-OK
|
||||||
parent=self.user.uistate.window)
|
parent=self.user.uistate.window)
|
||||||
self.progress.set_pass(_('Looking for citation fields'),
|
self.progress.set_pass(_('Looking for citation fields'),
|
||||||
self.db.get_number_of_citations())
|
self.db.get_number_of_citations())
|
||||||
|
|||||||
@ -107,7 +107,7 @@ class NotRelated(tool.ActivePersonTool, ManagedWindow) :
|
|||||||
self.tagapply.connect('clicked', self.applyTagClicked)
|
self.tagapply.connect('clicked', self.applyTagClicked)
|
||||||
|
|
||||||
# start the progress indicator
|
# start the progress indicator
|
||||||
self.progress = ProgressMeter(self.title,_('Starting'),
|
self.progress = ProgressMeter(self.title, _('Starting'), # parent-OK
|
||||||
parent=self.window)
|
parent=self.window)
|
||||||
|
|
||||||
# setup the columns
|
# setup the columns
|
||||||
@ -252,7 +252,7 @@ class NotRelated(tool.ActivePersonTool, ManagedWindow) :
|
|||||||
|
|
||||||
# if more than 1 person is selected, use a progress indicator
|
# if more than 1 person is selected, use a progress indicator
|
||||||
if rows > 1:
|
if rows > 1:
|
||||||
progress = ProgressMeter(self.title,_('Starting'),
|
progress = ProgressMeter(self.title, _('Starting'), # parent-OK
|
||||||
parent=self.window)
|
parent=self.window)
|
||||||
progress.set_pass(
|
progress.set_pass(
|
||||||
# translators: leave all/any {...} untranslated
|
# translators: leave all/any {...} untranslated
|
||||||
|
|||||||
@ -167,7 +167,7 @@ class PatchNames(tool.BatchTool, ManagedWindow):
|
|||||||
self.cb = callback
|
self.cb = callback
|
||||||
self.handle_to_action = {}
|
self.handle_to_action = {}
|
||||||
|
|
||||||
self.progress = ProgressMeter(
|
self.progress = ProgressMeter( # no-parent
|
||||||
_('Extracting Information from Names'), '')
|
_('Extracting Information from Names'), '')
|
||||||
self.progress.set_pass(_('Analyzing names'),
|
self.progress.set_pass(_('Analyzing names'),
|
||||||
self.db.get_number_of_people())
|
self.db.get_number_of_people())
|
||||||
|
|||||||
@ -134,7 +134,7 @@ class PopulateSources(tool.Tool, ManagedWindow):
|
|||||||
num_citations_text = self.citations_entry.get_text()
|
num_citations_text = self.citations_entry.get_text()
|
||||||
num_citations = int(num_citations_text)
|
num_citations = int(num_citations_text)
|
||||||
|
|
||||||
self.progress = ProgressMeter(
|
self.progress = ProgressMeter( # no-parent
|
||||||
'Generating data', '')
|
'Generating data', '')
|
||||||
self.progress.set_pass('Generating data',
|
self.progress.set_pass('Generating data',
|
||||||
num_sources*num_citations)
|
num_sources*num_citations)
|
||||||
|
|||||||
@ -65,7 +65,8 @@ class ReorderIds(tool.BatchTool):
|
|||||||
db = dbstate.db
|
db = dbstate.db
|
||||||
self.uistate = uistate
|
self.uistate = uistate
|
||||||
if uistate:
|
if uistate:
|
||||||
self.progress = ProgressMeter(_('Reordering Gramps IDs'),'')
|
self.progress = ProgressMeter( # parent-OK
|
||||||
|
_('Reordering Gramps IDs'), '', parent=uistate.window)
|
||||||
else:
|
else:
|
||||||
print(_("Reordering Gramps IDs..."))
|
print(_("Reordering Gramps IDs..."))
|
||||||
|
|
||||||
|
|||||||
@ -338,8 +338,8 @@ class TestcaseGenerator(tool.BatchTool):
|
|||||||
else:
|
else:
|
||||||
self.window = None
|
self.window = None
|
||||||
|
|
||||||
self.progress = ProgressMeter(_('Generating testcases'),'',
|
self.progress = ProgressMeter( # parent-OK
|
||||||
parent=self.window)
|
_('Generating testcases'), '', parent=self.window)
|
||||||
self.transaction_count = 0;
|
self.transaction_count = 0;
|
||||||
|
|
||||||
if self.options.handler.options_dict['lowlevel']:
|
if self.options.handler.options_dict['lowlevel']:
|
||||||
|
|||||||
@ -288,7 +288,8 @@ class GeoEvents(GeoGraphyView):
|
|||||||
if self.show_all:
|
if self.show_all:
|
||||||
self.show_all = False
|
self.show_all = False
|
||||||
events_handle = dbstate.db.get_event_handles()
|
events_handle = dbstate.db.get_event_handles()
|
||||||
progress = ProgressMeter(self.window_name, can_cancel=False,
|
progress = ProgressMeter(self.window_name, # parent-OK
|
||||||
|
can_cancel=False,
|
||||||
parent=self.uistate.window)
|
parent=self.uistate.window)
|
||||||
length = len(events_handle)
|
length = len(events_handle)
|
||||||
progress.set_pass(_('Selecting all events'), length)
|
progress.set_pass(_('Selecting all events'), length)
|
||||||
@ -299,7 +300,8 @@ class GeoEvents(GeoGraphyView):
|
|||||||
progress.close()
|
progress.close()
|
||||||
elif self.generic_filter:
|
elif self.generic_filter:
|
||||||
events_list = self.generic_filter.apply(dbstate.db)
|
events_list = self.generic_filter.apply(dbstate.db)
|
||||||
progress = ProgressMeter(self.window_name, can_cancel=False,
|
progress = ProgressMeter(self.window_name, # parent-OK
|
||||||
|
can_cancel=False,
|
||||||
parent=self.uistate.window)
|
parent=self.uistate.window)
|
||||||
length = len(events_list)
|
length = len(events_list)
|
||||||
progress.set_pass(_('Selecting all events'), length)
|
progress.set_pass(_('Selecting all events'), length)
|
||||||
|
|||||||
@ -268,7 +268,8 @@ class GeoPlaces(GeoGraphyView):
|
|||||||
places_handle = dbstate.db.get_place_handles()
|
places_handle = dbstate.db.get_place_handles()
|
||||||
except:
|
except:
|
||||||
return
|
return
|
||||||
progress = ProgressMeter(self.window_name, can_cancel=False,
|
progress = ProgressMeter(self.window_name, # parent-OK
|
||||||
|
can_cancel=False,
|
||||||
parent=self.uistate.window)
|
parent=self.uistate.window)
|
||||||
length = len(places_handle)
|
length = len(places_handle)
|
||||||
progress.set_pass(_('Selecting all places'), length)
|
progress.set_pass(_('Selecting all places'), length)
|
||||||
@ -279,7 +280,8 @@ class GeoPlaces(GeoGraphyView):
|
|||||||
progress.close()
|
progress.close()
|
||||||
elif self.generic_filter:
|
elif self.generic_filter:
|
||||||
place_list = self.generic_filter.apply(dbstate.db)
|
place_list = self.generic_filter.apply(dbstate.db)
|
||||||
progress = ProgressMeter(self.window_name, can_cancel=False,
|
progress = ProgressMeter(self.window_name, # parent-OK
|
||||||
|
can_cancel=False,
|
||||||
parent=self.uistate.window)
|
parent=self.uistate.window)
|
||||||
length = len(place_list)
|
length = len(place_list)
|
||||||
progress.set_pass(_('Selecting all places'), length)
|
progress.set_pass(_('Selecting all places'), length)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user