Changeset 186
- Timestamp:
- 15.06.2008 00:46:38 (7 months ago)
- Files:
-
- trunk/utils/pycagenconf (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/utils/pycagenconf
r185 r186 27 27 pygtk.require('2.0') 28 28 import gtk 29 import os 29 30 from os.path import expanduser 30 31 31 32 import pycawm.plugins as plugins … … 161 162 162 163 @staticmethod 163 def show_plugin_name( view, cell, store, iter):164 def show_plugin_name(_, cell, store, iter): 164 165 plugin = store.get_value(iter, 0) 165 166 cell.set_property('text', plugin.__name__) 166 167 167 def add_plugin(self, button, vbox):168 def add_plugin(self, _, vbox): 168 169 active = self.plugins.get_active() 169 170 if active < 0: … … 184 185 plugin_vars[arg] = entry.get_text 185 186 table.attach(entry, 1, 2, i, i + 1) 186 self.plugins_vars.append((plugin.__name__, plugin_vars)) 187 plugin_val = (plugin.__name__, plugin_vars) 188 self.plugins_vars.append(plugin_val) 187 189 remove = gtk.Button('remove plugin') 188 remove.connect('clicked', lambda button: vbox.remove(frame))190 remove.connect('clicked', self.remove_plugin, vbox, frame, plugin_val) 189 191 table.attach(remove, 0, 2, 190 192 table_len - 1, table_len, 10, 0) 191 193 vbox.add(frame) 192 194 self.frame.show_all() 195 196 def remove_plugin(self, _, vbox, frame, plugin_val): 197 vbox.remove(frame) 198 self.plugins_vars.remove(plugin_val) 193 199 194 200 def generate_code(self, generator): … … 241 247 for page in BasePage.pages: 242 248 page.generate_code(self) 243 config_path = os.path.expanduser(self.gen_vars['config_path'])249 config_path = expanduser(self.gen_vars['config_path']) 244 250 try: 245 251 config = open(config_path, 'w')
