Changeset 191
- Timestamp:
- 06/22/08 13:09:23 (7 months ago)
- Files:
-
- trunk/conf/config-example.py (modified) (1 diff)
- trunk/pycawm/buttons.py (moved) (moved from trunk/pycawm/button.py) (2 diffs)
- trunk/pycawm/menus.py (moved) (moved from trunk/pycawm/menu.py) (2 diffs)
- trunk/pycawm/misc.py (modified) (3 diffs)
- trunk/pycawm/plugins/musicactionbuttonbox.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/conf/config-example.py
r189 r191 24 24 from pycawm import (Client, ClientUnderPointer, MoveUnderPointer, PycaWM, 25 25 ScreenshotUnderPointer) 26 from pycawm.button import (Button, CloseButton, MiniIconButton, ShadeButton,27 MaximizeButton, IconifyButton)26 from pycawm.buttons import (Button, CloseButton, MiniIconButton, ShadeButton, 27 MaximizeButton, IconifyButton) 28 28 from pycawm.hookmanager import add_post_hook, add_pre_hook 29 from pycawm.menu import (Menu, FocusesMenu, IconifiedClientsMenu,30 ClientsSwitchMenu, DesktopsMenu, ApplicationMenu,31 WindowManagerMenu, ConfigMenu, AddPluginMenu,32 DynamicAddPluginMenu, RemovePluginMenu)29 from pycawm.menus import (Menu, FocusesMenu, IconifiedClientsMenu, 30 ClientsSwitchMenu, DesktopsMenu, ApplicationMenu, 31 WindowManagerMenu, ConfigMenu, AddPluginMenu, 32 DynamicAddPluginMenu, RemovePluginMenu) 33 33 from pycawm.plugins import (ActionButtonBox, MiniIconBox, MovePos, 34 34 MusicActionButtonBox, ResizePos, Pager, RemoteREPL, trunk/pycawm/buttons.py
r189 r191 2 2 3 3 # PycaWM 4 # button .py4 # buttons.py 5 5 # Copyright (c) 2007-2008 Vincent Rasneur, Anaël Verrier 6 6 … … 21 21 22 22 if sys.version_info < (2, 5): 23 raise ImportError('button module needs at least Python 2.5!')23 raise ImportError('buttons module needs at least Python 2.5!') 24 24 25 25 from copy import copy trunk/pycawm/menus.py
r176 r191 2 2 3 3 # PycaWM 4 # menu .py4 # menus.py 5 5 # Copyright (c) 2007-2008 Vincent Rasneur, Anaël Verrier 6 6 … … 23 23 24 24 if sys.version_info < (2, 5): 25 raise ImportError('menu module needs at least Python 2.5!')25 raise ImportError('menus module needs at least Python 2.5!') 26 26 27 27 from dircache import listdir trunk/pycawm/misc.py
r190 r191 25 25 from types import ClassType, TypeType, MethodType, FunctionType 26 26 27 import button 27 import buttons 28 28 import focuses 29 29 import placements … … 193 193 if is_plugin_valid(plugin)] 194 194 195 def is_button_valid(button _):195 def is_button_valid(button): 196 196 try: 197 197 # do not use is_strict_subclass here, Button is a usable button too 198 return (issubclass(button _, button.Button) and199 not button _.__name__.startswith('_'))198 return (issubclass(button, buttons.Button) and 199 not button.__name__.startswith('_')) 200 200 except TypeError: 201 201 return False … … 203 203 def find_default_buttons(): 204 204 """Find all the button classes in the "button" module.""" 205 gen_buttons = (button .__dict__.get(button_name)206 for button_name in dir(button ))207 return [button _ for button_in gen_buttons208 if is_button_valid(button _)]205 gen_buttons = (buttons.__dict__.get(button_name) 206 for button_name in dir(buttons)) 207 return [button for button in gen_buttons 208 if is_button_valid(button)] trunk/pycawm/plugins/musicactionbuttonbox.py
r161 r191 26 26 from re import compile as re_compile 27 27 28 from pycawm.button import Button28 from pycawm.buttons import Button 29 29 from pycawm.plugins import ActionButtonBox, PycaPluginError 30 30
