/usr/share/pyshared/tryton/common/cellrendererclickablepixbuf.py is in tryton-client 3.0.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | #This file is part of Tryton. The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
import gtk
import gobject
class CellRendererClickablePixbuf(gtk.CellRendererPixbuf):
__gsignals__ = {
'clicked': (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE,
(gobject.TYPE_STRING, )),
}
def __init__(self):
super(CellRendererClickablePixbuf, self).__init__()
self.set_property('mode', gtk.CELL_RENDERER_MODE_ACTIVATABLE)
def do_activate(self, event, widget, path, background_area, cell_area,
flags):
if (event
and cell_area.x <= event.x <= cell_area.x + cell_area.width
and cell_area.y <= event.y <= cell_area.y + cell_area.height):
self.emit('clicked', path)
gobject.type_register(CellRendererClickablePixbuf)
|