2007-06-26 Don Allingham <don@gramps-project.org>
* src/Bookmarks.py: pylint * src/DateEdit.py: pylint * src/AutoComp.py: pylint * src/BaseDoc.py: pylint * src/DateHandler/_DateParser.py: pylint * src/DateHandler/_Date_fi.py: pylint * src/DateHandler/_DateUtils.py: pylint * src/DateHandler/__init__.py: pylint * src/DateHandler/_DateDisplay.py: pylint * src/DateHandler/_Date_fr.py: pylint * src/DateHandler/_Date_es.py: pylint * src/DateHandler/_Date_nl.py: pylint * src/DateHandler/_Date_sk.py: pylint * src/DateHandler/_DateHandler.py: pylint * src/DateHandler/_Date_lt.py: pylint * src/DateHandler/_Date_ru.py: pylint * src/DateHandler/_Date_sv.py: pylint * src/DateHandler/_Date_de.py: pylint svn: r8675
This commit is contained in:
@@ -64,8 +64,8 @@ import Utils
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
_top = '''<ui><menubar name="MenuBar"><menu action="BookMenu">'''
|
||||
_btm = '''</menu></menubar></ui>'''
|
||||
TOP = '''<ui><menubar name="MenuBar"><menu action="BookMenu">'''
|
||||
BTM = '''</menu></menubar></ui>'''
|
||||
|
||||
DISABLED = -1
|
||||
|
||||
@@ -125,7 +125,7 @@ class Bookmarks :
|
||||
def redraw(self):
|
||||
"""Create the pulldown menu"""
|
||||
text = StringIO()
|
||||
text.write(_top)
|
||||
text.write(TOP)
|
||||
|
||||
self.undisplay()
|
||||
|
||||
@@ -150,7 +150,7 @@ class Bookmarks :
|
||||
text.write('</placeholder>')
|
||||
self.bookmarks.set(new_list)
|
||||
|
||||
text.write(_btm)
|
||||
text.write(BTM)
|
||||
self.action_group.add_actions(actions)
|
||||
self.uistate.uimanager.insert_action_group(self.action_group, 1)
|
||||
self.active = self.uistate.uimanager.add_ui_from_string(text.getvalue())
|
||||
@@ -414,5 +414,8 @@ class NoteBookmarks(ListBookmarks) :
|
||||
def connect_signals(self):
|
||||
self.dbstate.db.connect('note-delete', self.remove_handles)
|
||||
|
||||
def make_callback(n, f):
|
||||
return lambda x: f(n)
|
||||
def make_callback(handle, function):
|
||||
"""
|
||||
Builds a unique call to the function with the associated handle
|
||||
"""
|
||||
return lambda x: function(handle)
|
||||
|
Reference in New Issue
Block a user