Open main menu

Gramps β

Changes

Addon:Place completion tool

1,598 bytes removed, 08:28, 10 April 2010
change is now on addons repository (thank you)
Note: this patch does not work with locale set to french (e.g. LANGUAGE=fr_FR.UTF-8). Before getting this fixed, users should temporarily move to english locale to use it.
=== For GRAMPS 3.2 ===
 
To allow PlaceCompletion 1.2 to work with trunk, you'll need to make a couple of changes:
 
<pre>
--- .gramps/PlaceCompletion.py 2009-02-11 17:04:27.000000000 -0500
+++ .gramps/plugins/PlaceCompletion.py 2009-09-06 12:06:49.000000000 -0400
@@ -60,6 +60,14 @@
import PlaceUtils
import Errors
+if hasattr(Utils, "ProgressMeter"):
+ ProgressMeter = Utils.ProgressMeter
+else:
+ import gui.utils
+ if hasattr(gui.utils, "ProgressMeter"):
+ ProgressMeter = gui.utils.ProgressMeter
+ else:
+ raise ImportError("can't find ProgressMeter")
#------------------------------------------------------------------------
#
#
@@ -498,8 +506,8 @@
self.nrplaces_in_tree = len(ind_list)
# Populating might take a while, add a progress bar
- progress = Utils.ProgressMeter(
- _("Finding Places and appropriate changes"),'')
+ progress = ProgressMeter(
+ _("Finding Places and appropriate changes"),'')
#apply the filter
progress.set_pass(_('Filtering'),1)
progress.step()
@@ -704,7 +712,7 @@
self.trans = self.db.transaction_begin("",batch=True)
self.db.disable_signals()
- progress = Utils.ProgressMeter(_('Doing Place changes'),'')
+ progress = ProgressMeter(_('Doing Place changes'),'')
#we do not know how many places in the treeview, and counting would
# mean transversing the tree. Set the progress to the possible maximum
progress.set_pass('',self.db.get_number_of_places())
</pre>
[[Category:Proposed Tool Specifications]]
[[Category:Plugins]]
[[Category:Developers/General]]