GEPS008: Moved RecentFiles module

svn: r19787
This commit is contained in:
Nick Hall 2012-06-07 20:17:11 +00:00
parent 6bd01cdff1
commit c559890644
8 changed files with 12 additions and 14 deletions

View File

@ -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

View File

@ -25,7 +25,6 @@ gdir_PYTHON = \
LdsUtils.py \
Lru.py\
MacTransUtils.py\
RecentFiles.py\
Relationship.py\
Reorder.py\
Sort.py\

View File

@ -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:

View File

@ -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):

View File

@ -25,6 +25,7 @@ pkgpython_PYTHON = \
dbstate.py \
errors.py \
ggettext.py \
recentfiles.py \
updatecallback.py \
user.py

View File

@ -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))

View File

@ -236,7 +236,7 @@ class History(gen.utils.Callback):
_RCT_TOP = '<ui><menubar name="MenuBar"><menu action="FileMenu"><menu action="OpenRecent">'
_RCT_BTM = '</menu></menu></menubar></ui>'
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