Changeset 28
- Timestamp:
- 08/25/05 21:21:12 (8 years ago)
- Location:
- branches/greitmayr
- Files:
-
- 1 added
- 1 modified
-
extensions/referrals.py (added)
-
lib/pwiki/PersonalWikiFrame.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/greitmayr/lib/pwiki/PersonalWikiFrame.py
r25 r28 76 76 "openWikiWord", "newWikiWord", "openedWikiWord", "savingWikiWord", 77 77 "savedWikiWord", "renamedWikiWord", "deletedWikiWord", "exit"] ) 78 # interface for editor functions menu plugins 79 self.editorFunctions = self.pluginManager.registerPluginAPI(("EditorFunctions",1), 80 ["describeMenuItem", "describeToolbarItem"]) 78 81 79 82 # load extensions … … 670 673 EVT_MENU(self, menuID, lambda evt: self.showAboutDialog()) 671 674 675 # get info for any plugin menu items and create them as necessary 676 pluginMenu = None 677 menuItems = self.editorFunctions.describeMenuItem(self) 678 if len(menuItems) > 0: 679 pluginMenu = wxMenu() 680 for function, item, tooltip in menuItems: 681 menuID = wxNewId() 682 pluginMenu.Append(menuID, item, tooltip) 683 EVT_MENU(self, menuID, lambda evt: function(self)) 684 672 685 self.mainmenu.Append(wikiMenu, 'W&iki') 673 686 self.mainmenu.Append(wikiWordMenu, '&Wiki Words') 674 687 self.mainmenu.Append(historyMenu, '&History') 675 688 self.mainmenu.Append(formattingMenu, '&Editor') 689 if pluginMenu: 690 self.mainmenu.Append(pluginMenu, "Pl&ugins") 676 691 self.mainmenu.Append(helpMenu, 'He&lp') 677 692 … … 781 796 tb.AddSimpleTool(tbID, icon, "Wikize Selected Word", "Wikize Selected Word") 782 797 EVT_TOOL(self, tbID, lambda evt: self.keyBindings.makeWikiWord(self.editor)) 798 799 # get info for any toolbar items and create them as necessary 800 toolbarItems = self.editorFunctions.describeToolbarItem(self) 801 for function, label, icon, tooltip in toolbarItems: 802 tbID = wxNewId() 803 tb.AddLabelTool( tbID, label, icon, wxNullBitmap, 0, tooltip) 804 EVT_TOOL(self, tbID, lambda evt: function(self)) 783 805 784 806 tb.Realize()
