diff --git a/po/POTFILES.skip b/po/POTFILES.skip index 08c5c6c79..61a5bea53 100644 --- a/po/POTFILES.skip +++ b/po/POTFILES.skip @@ -6,7 +6,6 @@ #src src/AutoComp.py src/ImgManip.py -src/RecentFiles.py src/Sort.py src/soundex.py src/TreeTips.py @@ -17,11 +16,10 @@ src/cli/user.py # gen src/gen/errors.py -src/gen/user.py - -# gen API src/gen/__init__.py +src/gen/recentfiles.py src/gen/updatecallback.py +src/gen/user.py # gen.datehandler package src/gen/datehandler/_date_bg.py diff --git a/src/Makefile.am b/src/Makefile.am index f5974ea6b..05049cfd3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -25,7 +25,6 @@ gdir_PYTHON = \ LdsUtils.py \ Lru.py\ MacTransUtils.py\ - RecentFiles.py\ Relationship.py\ Reorder.py\ Sort.py\ diff --git a/src/cli/arghandler.py b/src/cli/arghandler.py index 3ac23191b..8e64481de 100644 --- a/src/cli/arghandler.py +++ b/src/cli/arghandler.py @@ -45,7 +45,7 @@ from gen.ggettext import gettext as _ # gramps modules # #------------------------------------------------------------------------- -import RecentFiles +from gen.recentfiles import recent_files import Utils import gen from clidbman import CLIDbManager, NAME_FILE, find_locker_name @@ -378,7 +378,7 @@ class ArgHandler(object): ifile.close() except: title = db_path - RecentFiles.recent_files(db_path, title) + recent_files(db_path, title) self.open = db_path self.__open_action() else: diff --git a/src/cli/grampscli.py b/src/cli/grampscli.py index 9603dbba1..2e8865375 100644 --- a/src/cli/grampscli.py +++ b/src/cli/grampscli.py @@ -54,7 +54,7 @@ from gen.db import DbBsddb import gen.db.exceptions from gen.plug import BasePluginManager from Utils import get_researcher -import RecentFiles +from gen.recentfiles import recent_files #------------------------------------------------------------------------- # @@ -273,7 +273,7 @@ class CLIManager(object): config.set('paths.recent-file', filename) - RecentFiles.recent_files(filename, name) + recent_files(filename, name) self.file_loaded = True def do_reg_plugins(self, dbstate, uistate): diff --git a/src/gen/Makefile.am b/src/gen/Makefile.am index 40db4a373..0b96e61a8 100644 --- a/src/gen/Makefile.am +++ b/src/gen/Makefile.am @@ -25,6 +25,7 @@ pkgpython_PYTHON = \ dbstate.py \ errors.py \ ggettext.py \ + recentfiles.py \ updatecallback.py \ user.py diff --git a/src/RecentFiles.py b/src/gen/recentfiles.py similarity index 100% rename from src/RecentFiles.py rename to src/gen/recentfiles.py diff --git a/src/gui/dbman.py b/src/gui/dbman.py index 2ef61120a..a4cf9aaee 100644 --- a/src/gui/dbman.py +++ b/src/gui/dbman.py @@ -75,7 +75,7 @@ from gen.db import DbBsddb from gui.pluginmanager import GuiPluginManager from cli.clidbman import CLIDbManager, NAME_FILE, time_val from gui.ddtargets import DdTargets -import RecentFiles +from gen.recentfiles import rename_filename, remove_filename from gui.glade import Glade from gen.db.backup import restore from gen.db.exceptions import DbException @@ -471,7 +471,7 @@ class DbManager(CLIDbManager): return old_text, new_text = self.rename_database(filename, new_text) if not (old_text is None): - RecentFiles.rename_filename(old_text, new_text) + rename_filename(old_text, new_text) self.model.set_value(node, NAME_COL, new_text) def __rcs(self, obj): @@ -563,7 +563,7 @@ class DbManager(CLIDbManager): name_file = open(filename, "r") file_name_to_delete=name_file.read() name_file.close() - RecentFiles.remove_filename(file_name_to_delete) + remove_filename(file_name_to_delete) for (top, dirs, files) in os.walk(self.data_to_delete[1]): for filename in files: os.unlink(os.path.join(top, filename)) diff --git a/src/gui/displaystate.py b/src/gui/displaystate.py index 64e3be486..bfc8222e4 100644 --- a/src/gui/displaystate.py +++ b/src/gui/displaystate.py @@ -236,7 +236,7 @@ class History(gen.utils.Callback): _RCT_TOP = '' _RCT_BTM = '' -import RecentFiles +from gen.recentfiles import RecentFiles import os class RecentDocsMenu(object): @@ -255,7 +255,7 @@ class RecentDocsMenu(object): def build(self): buf = StringIO() buf.write(_RCT_TOP) - gramps_rf = RecentFiles.RecentFiles() + gramps_rf = RecentFiles() count = 0