Projects/laydi
Projects
/
laydi
Archived
7
0
Fork 0

Replaced function as button-attribute with lambda as button click handler.

This commit is contained in:
Truls Alexander Tangstad 2006-05-04 15:32:59 +00:00
parent fafa373e67
commit 9f7ee74189
1 changed files with 2 additions and 5 deletions

View File

@ -145,8 +145,8 @@ class WorkflowView (gtk.VBox):
# Add functions in each stage # Add functions in each stage
for fun in stage.functions: for fun in stage.functions:
btn = gtk.Button(fun.name) btn = gtk.Button(fun.name)
btn.connect('clicked', self.button_click_handler) btn.connect('clicked',
btn.function = fun lambda button, f=fun : self.run_function(f))
btn_box.add(btn) btn_box.add(btn)
btn.show() btn.show()
@ -191,6 +191,3 @@ class WorkflowView (gtk.VBox):
logger.log('debug', 'Function ended: %s' % function.name) logger.log('debug', 'Function ended: %s' % function.name)
def button_click_handler(self, button):
self.run_function(function = button.function)