Projects/laydi
Projects
/
laydi
Archived
7
0
Fork 0
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.
laydi/system/navigator.py

28 lines
799 B
Python
Raw Normal View History

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)