Changeset 210

Show
Ignore:
Timestamp:
07/26/08 06:20:12 (5 months ago)
Author:
poillubo
Message:

* refactoring for the key bindings page in pycagenconf

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/utils/pycagenconf

    r209 r210  
    212212    def __init__(self): 
    213213        self.keys_vars = (list(), list()) 
    214         # frame titles 
    215         self.titles = ('root window shortcut', 'client window shortcut') 
     214        # keyboard shortcuts types 
     215        self.key_types = ('root window', 'client window') 
    216216        # functions examples for the shortcuts 
    217217        self.fun_examples = (['PycaWM.quit', 
     
    225225        for i, vbox in enumerate(vboxes): 
    226226            vpaned.__getattribute__('pack%d' % (i + 1))(vbox, resize=False) 
    227         for i, title in enumerate(('Add a root window keyboard shortcut', 
    228                                    'Add a client window keyboard shortcut')): 
     227        for i, title in enumerate([('Add a %s keyboard shortcut' % 
     228                                    key_type) for key_type in self.key_types]): 
    229229            gtk_button = gtk.Button(title) 
    230230            vboxes[i].pack_start(gtk_button, expand=False) 
     
    237237 
    238238    def add_key(self, _, vbox, nb): 
    239         frame = gtk.Frame(self.titles[nb]) 
     239        frame = gtk.Frame('%s shortcut' % self.key_types[nb]) 
    240240        table = gtk.Table(4, 2) 
    241241        frame.add(table)