* fluent, system/plots.py: Switching between four and one view now sort of
works. Still a bit buggy, and with messy code.
This commit is contained in:
20
fluent
20
fluent
@@ -47,6 +47,11 @@ class FluentApp:
|
||||
self.log_view.show()
|
||||
return self.log_view
|
||||
|
||||
def create_main_view(self, str1, str2, int1, int2):
|
||||
self.main_view = plots.MainView()
|
||||
self.main_view.show()
|
||||
return self.main_view
|
||||
|
||||
def create_small_view(self, str1, str2, int1, int2):
|
||||
self.small_view = plots.SmallView()
|
||||
self.small_view.show()
|
||||
@@ -98,11 +103,8 @@ class FluentApp:
|
||||
logger.log('debug', 'Program started')
|
||||
|
||||
def change_plot(self, plot):
|
||||
pt = self.widget_tree.get_widget('small_view')
|
||||
pt.set_child(plot, 1, 1)
|
||||
# plot.hide()
|
||||
# pt.remove(plot)
|
||||
# plot.unparent()
|
||||
pt = self.widget_tree.get_widget('main_view')
|
||||
pt.insert_view(plot)
|
||||
|
||||
def toggle_view_log(self, menu_item):
|
||||
lw = self.widget_tree.get_widget('logview')
|
||||
@@ -113,12 +115,12 @@ class FluentApp:
|
||||
logger.log('debug', 'Toggling log window visibility')
|
||||
|
||||
def on_single_view(self, button):
|
||||
nb = self.widget_tree.get_widget('view_notebook')
|
||||
nb.set_current_page(1)
|
||||
nb = self.widget_tree.get_widget('main_view')
|
||||
nb.goto_large()
|
||||
|
||||
def on_multiple_view(self, button):
|
||||
nb = self.widget_tree.get_widget('view_notebook')
|
||||
nb.set_current_page(0)
|
||||
nb = self.widget_tree.get_widget('main_view')
|
||||
nb.goto_small()
|
||||
|
||||
if __name__ == '__main__':
|
||||
gnome.program_init(PROGRAM_NAME, VERSION)
|
||||
|
Reference in New Issue
Block a user