This repository has been archived on 2024-07-04. You can view files and clone it, but cannot push or open issues or pull requests.
2006-04-16 20:25:54 +02:00
|
|
|
|
|
|
|
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):
|
2006-04-20 16:29:13 +02:00
|
|
|
|
|
|
|
iter = self.navigator.get_iter(path)
|
|
|
|
object = self.navigator.get_value(iter, 2)
|
2006-04-16 20:25:54 +02:00
|
|
|
logger.log('notice', 'Button pressed')
|
2006-04-20 16:29:13 +02:00
|
|
|
self.app.change_plot(object)
|