From a2af7d66b39da978216687b4b8a97d643d267863 Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Fri, 8 Jun 2012 20:37:17 +0000 Subject: [PATCH] GEPS008: Moved soundex module svn: r19800 --- po/POTFILES.skip | 2 +- src/Makefile.am | 1 - src/gen/Makefile.am | 1 + src/{ => gen}/soundex.py | 0 src/gui/glade/Makefile.am | 2 +- src/plugins/tool/FindDupes.py | 6 +++--- src/plugins/tool/SoundGen.py | 10 +++++----- 7 files changed, 11 insertions(+), 11 deletions(-) rename src/{ => gen}/soundex.py (100%) diff --git a/po/POTFILES.skip b/po/POTFILES.skip index 61a5bea53..d04d5fab8 100644 --- a/po/POTFILES.skip +++ b/po/POTFILES.skip @@ -7,7 +7,6 @@ src/AutoComp.py src/ImgManip.py src/Sort.py -src/soundex.py src/TreeTips.py # cli @@ -18,6 +17,7 @@ src/cli/user.py src/gen/errors.py src/gen/__init__.py src/gen/recentfiles.py +src/gen/soundex.py src/gen/updatecallback.py src/gen/user.py diff --git a/src/Makefile.am b/src/Makefile.am index 4123b7797..c2b907aa3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -22,7 +22,6 @@ gdir_PYTHON = \ LdsUtils.py \ MacTransUtils.py\ Sort.py\ - soundex.py\ Spell.py\ ToolTips.py\ TransUtils.py\ diff --git a/src/gen/Makefile.am b/src/gen/Makefile.am index 9a7d5b1bc..b04f05442 100644 --- a/src/gen/Makefile.am +++ b/src/gen/Makefile.am @@ -27,6 +27,7 @@ pkgpython_PYTHON = \ ggettext.py \ recentfiles.py \ relationship.py \ + soundex.py \ updatecallback.py \ user.py diff --git a/src/soundex.py b/src/gen/soundex.py similarity index 100% rename from src/soundex.py rename to src/gen/soundex.py diff --git a/src/gui/glade/Makefile.am b/src/gui/glade/Makefile.am index 542949ff8..48d270510 100644 --- a/src/gui/glade/Makefile.am +++ b/src/gui/glade/Makefile.am @@ -19,7 +19,7 @@ dist_pkgdata_DATA = \ addmedia.glade \ dialog.glade \ configure.glade \ - dateedit.glade \ + editdate.glade \ editsource.glade \ editcitation.glade \ styleeditor.glade \ diff --git a/src/plugins/tool/FindDupes.py b/src/plugins/tool/FindDupes.py index b423c7aa2..bb55633d1 100644 --- a/src/plugins/tool/FindDupes.py +++ b/src/plugins/tool/FindDupes.py @@ -40,7 +40,7 @@ import const import gen.lib from gui.utils import ProgressMeter from gui.plug import tool -import soundex +from gen.soundex import soundex, compare from gen.display.name import displayer as name_displayer from gui.dialog import OkDialog from gui.listmodel import ListModel @@ -250,7 +250,7 @@ class Merge(tool.Tool,ManagedWindow): def gen_key(self, val): if self.use_soundex: try: - return soundex.soundex(val) + return soundex(val) except UnicodeEncodeError: return val else: @@ -401,7 +401,7 @@ class Merge(tool.Tool,ManagedWindow): def name_compare(self, s1, s2): if self.use_soundex: try: - return soundex.compare(s1,s2) + return compare(s1,s2) except UnicodeEncodeError: return s1 == s2 else: diff --git a/src/plugins/tool/SoundGen.py b/src/plugins/tool/SoundGen.py index 7dd36e57e..7a1500911 100644 --- a/src/plugins/tool/SoundGen.py +++ b/src/plugins/tool/SoundGen.py @@ -30,7 +30,7 @@ # #------------------------------------------------------------------------ import const -import soundex +from gen.soundex import soundex from gui.display import display_help from gui.managedwindow import ManagedWindow import AutoComp @@ -90,9 +90,9 @@ class SoundGen(tool.Tool, ManagedWindow): n = person.get_primary_name().get_surname() self.name.set_text(n) try: - se_text = soundex.soundex(n) + se_text = soundex(n) except UnicodeEncodeError: - se_text = soundex.soundex('') + se_text = soundex('') self.value.set_text(se_text) else: self.name.set_text("") @@ -108,9 +108,9 @@ class SoundGen(tool.Tool, ManagedWindow): def on_apply_clicked(self, obj): try: - se_text = soundex.soundex(unicode(obj.get_text())) + se_text = soundex(unicode(obj.get_text())) except UnicodeEncodeError: - se_text = soundex.soundex('') + se_text = soundex('') self.value.set_text(se_text) #------------------------------------------------------------------------