The refresh button in the toolbar reloads the currently active workflow module.
This commit is contained in:
parent
9d7a5ba769
commit
16820cf29e
12
fluent
12
fluent
|
@ -93,7 +93,8 @@ class FluentApp:
|
||||||
'on_zoom_out_button_clicked' : (self.on_multiple_view),
|
'on_zoom_out_button_clicked' : (self.on_multiple_view),
|
||||||
'on_new1_activate' : (self.on_create_project),
|
'on_new1_activate' : (self.on_create_project),
|
||||||
'on_button_new_clicked' : (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)
|
self.widget_tree.signal_autoconnect(signals)
|
||||||
|
|
||||||
# Log that we've set up the app now
|
# Log that we've set up the app now
|
||||||
|
@ -123,6 +124,15 @@ class FluentApp:
|
||||||
about = widget_tree.get_widget('aboutdialog')
|
about = widget_tree.get_widget('aboutdialog')
|
||||||
about.run()
|
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__':
|
if __name__ == '__main__':
|
||||||
gnome.program_init(PROGRAM_NAME, VERSION)
|
gnome.program_init(PROGRAM_NAME, VERSION)
|
||||||
app = FluentApp()
|
app = FluentApp()
|
||||||
|
|
|
@ -299,6 +299,21 @@
|
||||||
<property name="homogeneous">True</property>
|
<property name="homogeneous">True</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkToolButton" id="workflow_refresh">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="stock_id">gtk-refresh</property>
|
||||||
|
<property name="visible_horizontal">True</property>
|
||||||
|
<property name="visible_vertical">True</property>
|
||||||
|
<property name="is_important">False</property>
|
||||||
|
<signal name="clicked" handler="on_workflow_refresh_clicked" last_modification_time="Tue, 25 Apr 2006 10:13:36 GMT"/>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="homogeneous">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
Reference in New Issue