The refresh button in the toolbar reloads the currently active workflow module.
This commit is contained in:
12
fluent
12
fluent
@@ -93,7 +93,8 @@ class FluentApp:
|
||||
'on_zoom_out_button_clicked' : (self.on_multiple_view),
|
||||
'on_new1_activate' : (self.on_create_project),
|
||||
'on_button_new_clicked' : (self.on_create_project),
|
||||
'on_about1_activate' : (self.on_help_about)}
|
||||
'on_about1_activate' : (self.on_help_about),
|
||||
'on_workflow_refresh_clicked' : (self.on_workflow_refresh_clicked)}
|
||||
self.widget_tree.signal_autoconnect(signals)
|
||||
|
||||
# Log that we've set up the app now
|
||||
@@ -123,6 +124,15 @@ class FluentApp:
|
||||
about = widget_tree.get_widget('aboutdialog')
|
||||
about.run()
|
||||
|
||||
def on_workflow_refresh_clicked(self, *ignored):
|
||||
try:
|
||||
reload(sys.modules[self.workflow.__class__.__module__])
|
||||
except Exception, e:
|
||||
logger.log('error', 'Relading workflow failed.')
|
||||
logger.log('error', e)
|
||||
else:
|
||||
logger.log('notice', 'Successfully reloaded workflow.')
|
||||
|
||||
if __name__ == '__main__':
|
||||
gnome.program_init(PROGRAM_NAME, VERSION)
|
||||
app = FluentApp()
|
||||
|
||||
Reference in New Issue
Block a user