toolbar mode get and set
This commit is contained in:
parent
ba91663075
commit
9bfe4a30df
|
@ -28,6 +28,7 @@ class FluentApp:
|
|||
self.current_data = None
|
||||
self._last_view = None
|
||||
self._plot_toolbar = None
|
||||
self._toolbar_state = None
|
||||
|
||||
gtk.glade.set_custom_handler(self.custom_object_factory)
|
||||
self.widget_tree = gtk.glade.XML(GLADEFILENAME, 'appwindow')
|
||||
|
@ -115,10 +116,15 @@ class FluentApp:
|
|||
|
||||
window = self['plot_toolbar_dock']
|
||||
if self._plot_toolbar:
|
||||
toolbar_state = self._plot_toolbar.get_mode()
|
||||
window.remove(self._plot_toolbar)
|
||||
else:
|
||||
"Setting DEAULT in fluents"
|
||||
toolbar_state = "DEFAULT"
|
||||
|
||||
if view:
|
||||
self._plot_toolbar = view.get_toolbar()
|
||||
self._plot_toolbar.set_mode(toolbar_state)
|
||||
else:
|
||||
self._plot_toolbar = None
|
||||
|
||||
|
|
Reference in New Issue