Exemplo n.º 1
0
 def _init_toolbar(self):
     NavigationToolbar._init_toolbar(self)
     image = gtk.Image()
     image.set_from_stock(gtk.STOCK_PRINT, 22)
     tbutton = gtk.ToolButton(image, 'Print')
     self.insert(tbutton, -1)
     tbutton.connect('clicked', getattr(self, 'print_canvas'))
     if not _new_tooltip_api:
         tbutton.set_tooltip(self.tooltips, 'Print current view',
                             'Private')
     else:
         tbutton.set_tooltip_text('Print current view')
     image = gtk.Image()
     image.set_from_stock(edit_img, 22)
     tbutton = gtk.ToolButton(image, 'Comments')
     self.insert(tbutton, -1)
     if not _new_tooltip_api:
         tbutton.set_tooltip(self.tooltips, 'Insert Comment to Plot',
                             'Private')
     else:
         tbutton.set_tooltip_text('Insert Comment to Plot')
     tbutton.connect('clicked', getattr(self,'insert_comments'))
     self.show_all()