Beispiel #1
0
 def addButton(self, nameID, image1path, image2path, tooltip1, tooltip2, cb):
     button = ToolButton()
     button.image1 = gtk.Image()
     button.image1.set_from_file(image1path)
     button.image2 = gtk.Image()
     button.image2.set_from_file(image2path)
     button.image1.show()
     button.nameID = nameID
     button.tooltip1, button.tooltip2 = tooltip1, tooltip2
     button.set_icon_widget(button.image1)
     button.connect('clicked', cb) 
     button.set_tooltip(_(button.tooltip1))
     button.active = False
     self.insert(button, -1)
     button.show()
     return button
Beispiel #2
0
 def addButton(self, nameID, image1path, image2path, tooltip1, tooltip2, cb):
     button = ToolButton()
     log.info("addButtonIMAGE PATH ____   " + image1path )
     button.image1 = gtk.Image()
     button.image1.set_from_file(image1path)
     button.image2 = gtk.Image()
     button.image2.set_from_file(image2path)
     button.image1.show()
     button.tooltip1, button.tooltip2 = tooltip1, tooltip2
     button.set_icon_widget(button.image1)
     button.connect('clicked', cb)
     button.set_tooltip(_(button.tooltip1))
     button.nameID = nameID
     self.toolbar_box.toolbar.insert(button, -1)
     button.show()
     self.nameID.update({nameID:button})