Changeset 1493
- Timestamp:
- 07/11/08 19:36:32 (8 weeks ago)
- Location:
- trunk/peppy
- Files:
-
- 2 modified
-
mainmenu.py (modified) (2 diffs)
-
minor.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/peppy/mainmenu.py
r1481 r1493 711 711 712 712 713 class HideSidebars(SelectAction): 714 """Close all sidebars""" 715 name = "All Sidebars" 716 default_menu = (("View/Hide", 991), 100) 717 key_bindings = {'emacs': "C-x 4 1", } 718 719 def action(self, index=-1, multiplier=1): 720 for m in self.frame.sidebar_panes: 721 m.Show(False) 722 self.frame._mgr.Update() 723 724 class HideMinorModes(SelectAction): 725 """Close all minor modes""" 726 name = "All Minor Modes" 727 default_menu = ("View/Hide", 110) 728 key_bindings = {'emacs': "C-x 4 2", } 729 730 def action(self, index=-1, multiplier=1): 731 self.mode.wrapper.minors.hideAll() 732 733 class HideAll(SelectAction): 734 """Close all sidebars and minor modes""" 735 name = "All Sidebars and Minor Modes" 736 default_menu = ("View/Hide", 120) 737 key_bindings = {'emacs': "C-x 1", } 738 739 def action(self, index=-1, multiplier=1): 740 for m in self.frame.sidebar_panes: 741 m.Show(False) 742 self.frame._mgr.Update() 743 self.mode.wrapper.minors.hideAll() 744 745 713 746 class ToolbarShow(ToggleAction): 714 747 alias = "show-toolbar" … … 921 954 RunScript, RunScriptWithArgs, RunFilter, StopScript, 922 955 923 MajorModeSelect, MinorModeShow, SidebarShow, 956 MajorModeSelect, MinorModeShow, 957 958 SidebarShow, HideSidebars, HideMinorModes, HideAll, 959 924 960 ToolbarShow, 925 961 -
trunk/peppy/minor.py
r1157 r1493 219 219 self.mgr.Update() 220 220 221 def hideAll(self): 222 """Toggle the shown state, or create the minor mode if necessary. 223 224 Minor modes are created on demand if not speficied as one of the modes 225 to load at mode startup time. If an entry doesn't exist and it is 226 attempted to be toggled, it is created and shown. 227 """ 228 for entry in self.map.itervalues(): 229 if entry.win: 230 entry.win.paneinfo.Show(False) 231 self.mgr.Update() 232 221 233 def create(self, keyword): 222 234 """Create the minor mode.
