GEPS008: Moved RecentFiles module
svn: r19787
This commit is contained in:
parent
6bd01cdff1
commit
c559890644
@ -6,7 +6,6 @@
|
|||||||
#src
|
#src
|
||||||
src/AutoComp.py
|
src/AutoComp.py
|
||||||
src/ImgManip.py
|
src/ImgManip.py
|
||||||
src/RecentFiles.py
|
|
||||||
src/Sort.py
|
src/Sort.py
|
||||||
src/soundex.py
|
src/soundex.py
|
||||||
src/TreeTips.py
|
src/TreeTips.py
|
||||||
@ -17,11 +16,10 @@ src/cli/user.py
|
|||||||
|
|
||||||
# gen
|
# gen
|
||||||
src/gen/errors.py
|
src/gen/errors.py
|
||||||
src/gen/user.py
|
|
||||||
|
|
||||||
# gen API
|
|
||||||
src/gen/__init__.py
|
src/gen/__init__.py
|
||||||
|
src/gen/recentfiles.py
|
||||||
src/gen/updatecallback.py
|
src/gen/updatecallback.py
|
||||||
|
src/gen/user.py
|
||||||
|
|
||||||
# gen.datehandler package
|
# gen.datehandler package
|
||||||
src/gen/datehandler/_date_bg.py
|
src/gen/datehandler/_date_bg.py
|
||||||
|
@ -25,7 +25,6 @@ gdir_PYTHON = \
|
|||||||
LdsUtils.py \
|
LdsUtils.py \
|
||||||
Lru.py\
|
Lru.py\
|
||||||
MacTransUtils.py\
|
MacTransUtils.py\
|
||||||
RecentFiles.py\
|
|
||||||
Relationship.py\
|
Relationship.py\
|
||||||
Reorder.py\
|
Reorder.py\
|
||||||
Sort.py\
|
Sort.py\
|
||||||
|
@ -45,7 +45,7 @@ from gen.ggettext import gettext as _
|
|||||||
# gramps modules
|
# gramps modules
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import RecentFiles
|
from gen.recentfiles import recent_files
|
||||||
import Utils
|
import Utils
|
||||||
import gen
|
import gen
|
||||||
from clidbman import CLIDbManager, NAME_FILE, find_locker_name
|
from clidbman import CLIDbManager, NAME_FILE, find_locker_name
|
||||||
@ -378,7 +378,7 @@ class ArgHandler(object):
|
|||||||
ifile.close()
|
ifile.close()
|
||||||
except:
|
except:
|
||||||
title = db_path
|
title = db_path
|
||||||
RecentFiles.recent_files(db_path, title)
|
recent_files(db_path, title)
|
||||||
self.open = db_path
|
self.open = db_path
|
||||||
self.__open_action()
|
self.__open_action()
|
||||||
else:
|
else:
|
||||||
|
@ -54,7 +54,7 @@ from gen.db import DbBsddb
|
|||||||
import gen.db.exceptions
|
import gen.db.exceptions
|
||||||
from gen.plug import BasePluginManager
|
from gen.plug import BasePluginManager
|
||||||
from Utils import get_researcher
|
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)
|
config.set('paths.recent-file', filename)
|
||||||
|
|
||||||
RecentFiles.recent_files(filename, name)
|
recent_files(filename, name)
|
||||||
self.file_loaded = True
|
self.file_loaded = True
|
||||||
|
|
||||||
def do_reg_plugins(self, dbstate, uistate):
|
def do_reg_plugins(self, dbstate, uistate):
|
||||||
|
@ -25,6 +25,7 @@ pkgpython_PYTHON = \
|
|||||||
dbstate.py \
|
dbstate.py \
|
||||||
errors.py \
|
errors.py \
|
||||||
ggettext.py \
|
ggettext.py \
|
||||||
|
recentfiles.py \
|
||||||
updatecallback.py \
|
updatecallback.py \
|
||||||
user.py
|
user.py
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ from gen.db import DbBsddb
|
|||||||
from gui.pluginmanager import GuiPluginManager
|
from gui.pluginmanager import GuiPluginManager
|
||||||
from cli.clidbman import CLIDbManager, NAME_FILE, time_val
|
from cli.clidbman import CLIDbManager, NAME_FILE, time_val
|
||||||
from gui.ddtargets import DdTargets
|
from gui.ddtargets import DdTargets
|
||||||
import RecentFiles
|
from gen.recentfiles import rename_filename, remove_filename
|
||||||
from gui.glade import Glade
|
from gui.glade import Glade
|
||||||
from gen.db.backup import restore
|
from gen.db.backup import restore
|
||||||
from gen.db.exceptions import DbException
|
from gen.db.exceptions import DbException
|
||||||
@ -471,7 +471,7 @@ class DbManager(CLIDbManager):
|
|||||||
return
|
return
|
||||||
old_text, new_text = self.rename_database(filename, new_text)
|
old_text, new_text = self.rename_database(filename, new_text)
|
||||||
if not (old_text is None):
|
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)
|
self.model.set_value(node, NAME_COL, new_text)
|
||||||
|
|
||||||
def __rcs(self, obj):
|
def __rcs(self, obj):
|
||||||
@ -563,7 +563,7 @@ class DbManager(CLIDbManager):
|
|||||||
name_file = open(filename, "r")
|
name_file = open(filename, "r")
|
||||||
file_name_to_delete=name_file.read()
|
file_name_to_delete=name_file.read()
|
||||||
name_file.close()
|
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 (top, dirs, files) in os.walk(self.data_to_delete[1]):
|
||||||
for filename in files:
|
for filename in files:
|
||||||
os.unlink(os.path.join(top, filename))
|
os.unlink(os.path.join(top, filename))
|
||||||
|
@ -236,7 +236,7 @@ class History(gen.utils.Callback):
|
|||||||
_RCT_TOP = '<ui><menubar name="MenuBar"><menu action="FileMenu"><menu action="OpenRecent">'
|
_RCT_TOP = '<ui><menubar name="MenuBar"><menu action="FileMenu"><menu action="OpenRecent">'
|
||||||
_RCT_BTM = '</menu></menu></menubar></ui>'
|
_RCT_BTM = '</menu></menu></menubar></ui>'
|
||||||
|
|
||||||
import RecentFiles
|
from gen.recentfiles import RecentFiles
|
||||||
import os
|
import os
|
||||||
|
|
||||||
class RecentDocsMenu(object):
|
class RecentDocsMenu(object):
|
||||||
@ -255,7 +255,7 @@ class RecentDocsMenu(object):
|
|||||||
def build(self):
|
def build(self):
|
||||||
buf = StringIO()
|
buf = StringIO()
|
||||||
buf.write(_RCT_TOP)
|
buf.write(_RCT_TOP)
|
||||||
gramps_rf = RecentFiles.RecentFiles()
|
gramps_rf = RecentFiles()
|
||||||
|
|
||||||
count = 0
|
count = 0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user