Changeset 191

Show
Ignore:
Timestamp:
06/22/08 13:09:23 (7 months ago)
Author:
poillubo
Message:

* s/menu.py/menus.py/ and s/button.py/buttons.py/

+ to have more consistency in the naming scheme


Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/conf/config-example.py

    r189 r191  
    2424from pycawm import (Client, ClientUnderPointer, MoveUnderPointer, PycaWM, 
    2525                    ScreenshotUnderPointer) 
    26 from pycawm.button import (Button, CloseButton, MiniIconButton, ShadeButton, 
    27                            MaximizeButton, IconifyButton) 
     26from pycawm.buttons import (Button, CloseButton, MiniIconButton, ShadeButton, 
     27                            MaximizeButton, IconifyButton) 
    2828from 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) 
     29from pycawm.menus import (Menu, FocusesMenu, IconifiedClientsMenu, 
     30                          ClientsSwitchMenu, DesktopsMenu, ApplicationMenu, 
     31                          WindowManagerMenu, ConfigMenu, AddPluginMenu, 
     32                          DynamicAddPluginMenu, RemovePluginMenu) 
    3333from pycawm.plugins import (ActionButtonBox, MiniIconBox, MovePos, 
    3434                            MusicActionButtonBox, ResizePos, Pager, RemoteREPL, 
  • trunk/pycawm/buttons.py

    r189 r191  
    22 
    33#  PycaWM 
    4 #  button.py 
     4#  buttons.py 
    55#  Copyright (c) 2007-2008 Vincent Rasneur, Anaël Verrier 
    66 
     
    2121 
    2222if 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!') 
    2424 
    2525from copy import copy 
  • trunk/pycawm/menus.py

    r176 r191  
    22 
    33#  PycaWM 
    4 #  menu.py 
     4#  menus.py 
    55#  Copyright (c) 2007-2008 Vincent Rasneur, Anaël Verrier 
    66 
     
    2323 
    2424if 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!') 
    2626 
    2727from dircache import listdir 
  • trunk/pycawm/misc.py

    r190 r191  
    2525from types import ClassType, TypeType, MethodType, FunctionType 
    2626 
    27 import button 
     27import buttons 
    2828import focuses 
    2929import placements 
     
    193193            if is_plugin_valid(plugin)] 
    194194 
    195 def is_button_valid(button_): 
     195def is_button_valid(button): 
    196196    try: 
    197197        # do not use is_strict_subclass here, Button is a usable button too 
    198         return (issubclass(button_, button.Button) and 
    199                 not button_.__name__.startswith('_')) 
     198        return (issubclass(button, buttons.Button) and 
     199                not button.__name__.startswith('_')) 
    200200    except TypeError: 
    201201        return False 
     
    203203def find_default_buttons(): 
    204204    """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_buttons 
    208             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  
    2626from re import compile as re_compile 
    2727 
    28 from pycawm.button import Button 
     28from pycawm.buttons import Button 
    2929from pycawm.plugins import ActionButtonBox, PycaPluginError 
    3030