* src/Bookmarks.py: get bookmark menu working

* src/EditPlace.py: menu tracking


svn: r5632
This commit is contained in:
Don Allingham
2005-12-25 04:01:47 +00:00
parent 8cb5f9673e
commit fbdfb92449
5 changed files with 64 additions and 38 deletions

View File

@@ -65,7 +65,7 @@ class History(GrampsDb.GrampsDBCallback):
def clear(self):
self.history = []
self.mistory = []
self.mhistory = []
self.index = -1
self.lock = False
@@ -366,7 +366,6 @@ class RecentDocsMenu:
self.state = state
def load(self,item):
print item
name = item.get_path()
dbtype = item.get_mime()
@@ -390,7 +389,9 @@ class RecentDocsMenu:
self.active = DISABLED
actions = []
for item in gramps_rf.gramps_recent_files:
rfiles = gramps_rf.gramps_recent_files
rfiles.sort(by_time)
for item in rfiles:
try:
filename = os.path.basename(item.get_path()).replace('_','__')
filetype = get_mime_type(item.get_path())
@@ -411,6 +412,9 @@ class RecentDocsMenu:
def make_callback(n,f):
return lambda x: f(n)
def by_time(a,b):
return cmp(b.get_time(),a.get_time())
#-------------------------------------------------------------------------
#
# Gramps Managed Window class