28 lines
799 B
Python
28 lines
799 B
Python
|
|
import gtk
|
|
import gobject
|
|
import plots
|
|
import logger
|
|
|
|
class NavigatorView (gtk.TreeView):
|
|
def __init__(self, nav, app):
|
|
gtk.TreeView.__init__(self, nav)
|
|
self.navigator = nav
|
|
self.app = app
|
|
|
|
self.set_headers_visible(False)
|
|
self.connect('row-activated', self.row_activated_handler)
|
|
|
|
renderer = gtk.CellRendererText()
|
|
self.object_col = gtk.TreeViewColumn('Object', renderer, text=0)
|
|
self.append_column(self.object_col)
|
|
|
|
logger.log('debug', 'Initializing naviagor window')
|
|
|
|
def row_activated_handler(self, widget, path, column):
|
|
|
|
iter = self.navigator.get_iter(path)
|
|
object = self.navigator.get_value(iter, 2)
|
|
logger.log('notice', 'Button pressed')
|
|
self.app.change_plot(object)
|