Changeset 178
- Timestamp:
- 08/06/2005 11:22:18 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 2 modified
-
examples/plpwm.py (modified) (6 diffs)
-
plwm/pane_utilities.py (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/plpwm.py
r177 r178 1 1 #!/usr/bin/env python 2 # $Id: plpwm.py,v 1.3 7 2005-08-07 03:18:52mwm Exp $2 # $Id: plpwm.py,v 1.38 2005-08-07 04:22:18 mwm Exp $ 3 3 # 4 4 # plpwm.py -- Example PLWM window manager configuration with panes. … … 119 119 def S_M4_0(my, event): 120 120 pane = my.wm.panes_list[my.wm.panes_current] 121 splitpane(pane, pane.vertical_split )121 splitpane(pane, pane.vertical_split, paneWindow) 122 122 123 123 def M4_1(my, event): … … 138 138 # Keystrokes for launching applications 139 139 def M4_exclam(my, event): 140 runcommand(my.wm.panes_list[my.wm.panes_current] )140 runcommand(my.wm.panes_list[my.wm.panes_current], paneWindow) 141 141 142 142 def M4_b(my, event): … … 161 161 getapp(my.wm.panes_list[my.wm.panes_current], "J-Pilot", "jpilot") 162 162 163 def M4_ n(my, event):163 def M4_f(my, event): 164 164 getapp(my.wm.panes_list[my.wm.panes_current], "Mozilla", "mozilla") 165 166 def M4_s(my, event):167 getapp(my.wm.panes_list[my.wm.panes_current], "SkipStone", "skipstone")168 165 169 166 # Keystrokes for window manager operations 170 167 def M4_equal(my, event): 171 numberpane(my.wm.panes_list[my.wm.panes_current] )168 numberpane(my.wm.panes_list[my.wm.panes_current], paneWindow) 172 169 173 170 def M4_quoteright(my, event): 174 pullwindow(my.wm.panes_list[my.wm.panes_current] )171 pullwindow(my.wm.panes_list[my.wm.panes_current], paneWindow) 175 172 176 173 def M4_quotedbl(my, event): 177 gotowindow(my.wm.panes_list[my.wm.panes_current] )174 gotowindow(my.wm.panes_list[my.wm.panes_current], screenWindow) 178 175 179 176 def M4_Return(my, event): … … 284 281 class paneWindow(input.inputWindow): 285 282 bordercolor = "Goldenrod" 283 editHandler = MyEditHandler 286 284 287 285 … … 289 287 borderwidth = 5 290 288 bordercolor = "Orange" 289 editHandler = MyEditHandler 291 290 292 291 -
trunk/plwm/pane_utilities.py
r177 r178 1 1 #!/usr/bin/env python 2 # $Id: pane_utilities.py,v 1. 1 2005-08-07 03:18:53mwm Exp $2 # $Id: pane_utilities.py,v 1.2 2005-08-07 04:22:18 mwm Exp $ 3 3 # 4 4 # pane_utilities.py -- Utility clases and functions for use with panes … … 122 122 "Read a string from the user, and run it." 123 123 124 def __init__(my, pane, prompt = "Command: "):124 def __init__(my, pane, winclass, prompt = "Command: "): 125 125 my.system = pane.screen.system 126 window = paneWindow(prompt, pane.screen, length = 50)127 window.read(my, MyEditHandler, pane.x, pane.y)126 window = winclass(prompt, pane.screen, length = 50) 127 window.read(my, window.editHandler, pane.x, pane.y) 128 128 129 129 def __call__(my, string): … … 134 134 "Read in a fraction, and split that much off the current pane." 135 135 136 def __init__(my, pane, splitter, prompt = "Fraction: "):136 def __init__(my, pane, splitter, winclass, prompt = "Fraction: "): 137 137 my.pane, my.splitter = pane, splitter 138 window = paneWindow(prompt, pane.screen, length = 50)138 window = winclass(prompt, pane.screen, length = 50) 139 139 window.read(my, MyEditHandler, pane.x, pane.y) 140 140 … … 150 150 "Read a new number for the current pane." 151 151 152 def __init__(my, pane, prompt = "New number: "):152 def __init__(my, pane, winclass, prompt = "New number: "): 153 153 my.wm = pane.wm 154 window = paneWindow(prompt, pane.screen)155 window.read(my, MyEditHandler, pane.x, pane.y)154 window = winclass(prompt, pane.screen) 155 window.read(my, window.editHandler, pane.x, pane.y) 156 156 157 157 def __call__(my, name): … … 162 162 "Read a window's name, and pull it to the current pane." 163 163 164 def __init__(my, pane, prompt = "Pull: "):164 def __init__(my, pane, winclass, prompt = "Pull: "): 165 165 my.pane = pane 166 window = paneWindow(prompt, pane.screen)167 window.read(my, MyEditHandler, pane.x, pane.y)166 window = winclass(prompt, pane.screen) 167 window.read(my, window.editHandler, pane.x, pane.y) 168 168 169 169 def __call__(my, name): … … 179 179 "Emulate the rp 'goto' command." 180 180 181 def __init__(my, pane, prompt = "Goto: "):181 def __init__(my, pane, winclass, prompt = "Goto: "): 182 182 my.pane = pane 183 window = screenWindow(prompt, pane.screen)184 window.read(my, MyEditHandler)183 window = winclass(prompt, pane.screen) 184 window.read(my, window.editHandler) 185 185 186 186 def __call__(my, name):
