* src/Bookmarks.py: Don't use goto submenu
svn: r6446
This commit is contained in:
parent
839d4f4a6b
commit
50ec018a36
@ -1,4 +1,5 @@
|
|||||||
2006-04-25 Don Allingham <don@gramps-project.org>
|
2006-04-25 Don Allingham <don@gramps-project.org>
|
||||||
|
* src/Bookmarks.py: Don't use goto submenu
|
||||||
* src/GrampsCfg/py: move and rename tabs, change Prefixes for Formats
|
* src/GrampsCfg/py: move and rename tabs, change Prefixes for Formats
|
||||||
* src/ViewManager.py: new config changes, handle exception, enable Edit button
|
* src/ViewManager.py: new config changes, handle exception, enable Edit button
|
||||||
by default
|
by default
|
||||||
|
@ -63,8 +63,8 @@ import ListModel
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
_top = '''<ui><menubar name="MenuBar"><menu action="BookMenu"><menu action="GoToBook">'''
|
_top = '''<ui><menubar name="MenuBar"><menu action="BookMenu">'''
|
||||||
_btm = '''</menu></menu></menubar></ui>'''
|
_btm = '''</menu></menubar></ui>'''
|
||||||
|
|
||||||
DISABLED = -1
|
DISABLED = -1
|
||||||
|
|
||||||
@ -98,6 +98,9 @@ class Bookmarks :
|
|||||||
self.active = DISABLED
|
self.active = DISABLED
|
||||||
|
|
||||||
actions = []
|
actions = []
|
||||||
|
|
||||||
|
if len(self.bookmarks) > 0:
|
||||||
|
f.write('<placeholder name="GoToBook">')
|
||||||
for item in self.bookmarks:
|
for item in self.bookmarks:
|
||||||
person = self.dbstate.db.get_person_from_handle(item)
|
person = self.dbstate.db.get_person_from_handle(item)
|
||||||
name = NameDisplay.displayer.display(person)
|
name = NameDisplay.displayer.display(person)
|
||||||
@ -107,9 +110,11 @@ class Bookmarks :
|
|||||||
func = make_callback(item,self.dbstate.change_active_handle)
|
func = make_callback(item,self.dbstate.change_active_handle)
|
||||||
actions.append((action_id,None,label,None,None,func))
|
actions.append((action_id,None,label,None,None,func))
|
||||||
count +=1
|
count +=1
|
||||||
|
f.write('</placeholder>')
|
||||||
f.write(_btm)
|
f.write(_btm)
|
||||||
self.action_group.add_actions(actions)
|
self.action_group.add_actions(actions)
|
||||||
self.uistate.uimanager.insert_action_group(self.action_group,1)
|
self.uistate.uimanager.insert_action_group(self.action_group,1)
|
||||||
|
print f.getvalue()
|
||||||
self.active = self.uistate.uimanager.add_ui_from_string(f.getvalue())
|
self.active = self.uistate.uimanager.add_ui_from_string(f.getvalue())
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
|
@ -128,7 +128,8 @@ uidefault = '''<ui>
|
|||||||
<menu action="BookMenu">
|
<menu action="BookMenu">
|
||||||
<menuitem action="AddBook"/>
|
<menuitem action="AddBook"/>
|
||||||
<menuitem action="EditBook"/>
|
<menuitem action="EditBook"/>
|
||||||
<menu action="GoToBook"/>
|
<separator/>
|
||||||
|
<placeholder name="GoToBook"/>
|
||||||
</menu>
|
</menu>
|
||||||
<menu action="ReportsMenu">
|
<menu action="ReportsMenu">
|
||||||
</menu>
|
</menu>
|
||||||
@ -327,7 +328,6 @@ class ViewManager:
|
|||||||
self.add_bookmark),
|
self.add_bookmark),
|
||||||
('EditBook', None, '_Edit bookmarks', '<control>b', None,
|
('EditBook', None, '_Edit bookmarks', '<control>b', None,
|
||||||
self.edit_bookmarks),
|
self.edit_bookmarks),
|
||||||
('GoToBook', gtk.STOCK_JUMP_TO, '_Go to bookmark'),
|
|
||||||
('ReportsMenu', None, '_Reports'),
|
('ReportsMenu', None, '_Reports'),
|
||||||
('ToolsMenu', None, '_Tools'),
|
('ToolsMenu', None, '_Tools'),
|
||||||
('WindowsMenu', None, '_Windows'),
|
('WindowsMenu', None, '_Windows'),
|
||||||
|
Loading…
Reference in New Issue
Block a user