Fixed plot things. A plot can only be attached to one view now.

This commit is contained in:
2006-05-29 11:24:33 +00:00
parent 62c1d79dac
commit 581cef75ae
3 changed files with 31 additions and 16 deletions

View File

@@ -18,7 +18,7 @@ from system import project, workflow, dataset, logger, plots, navigator, dialogs
PROGRAM_NAME = 'fluents'
VERSION = '0.1.0'
DATADIR = os.path.dirname(sys.modules['system'].__file__)
GLADEFILENAME = os.path.join(DATADIR, 'fluent.glade')
GLADEFILENAME = os.path.join(DATADIR, 'fluents.glade')
class FluentApp:
@@ -115,7 +115,10 @@ class FluentApp:
'on_workflow_refresh_clicked' : (self.on_workflow_refresh_clicked),
'on_index1_activate' : (self.on_help_index),
'on_about1_activate' : (self.on_help_about),
'on_report_bug1_activate' : (self.on_help_report_bug)}
'on_report_bug1_activate' : (self.on_help_report_bug),
'on_small_view1_activate' : (self.on_multiple_view),
'on_large_view1_activate' : (self.on_single_view),
}
self.widget_tree.signal_autoconnect(signals)
# Log that we've set up the app now
@@ -125,11 +128,11 @@ class FluentApp:
pt = self.widget_tree.get_widget('main_view')
pt.insert_view(plot)
def on_single_view(self, button):
def on_single_view(self, *ignored):
nb = self.widget_tree.get_widget('main_view')
nb.goto_large()
def on_multiple_view(self, button):
def on_multiple_view(self, *ignored):
nb = self.widget_tree.get_widget('main_view')
nb.goto_small()
@@ -159,4 +162,3 @@ class FluentApp:
logger.log('warning', e)
else:
logger.log('notice', 'Successfully reloaded workflow')