Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.9, 0.9.1, and 0.9.1.1

gtklib: add 'toggle' option for generating gtk.ToggleButton

Changeset 8ceb37abc55f

Parent 4e9205c1141e

by Yuki KODAMA

Changes to one file · Browse files at 8ceb37abc55f Showing diff from parent 4e9205c1141e Diff from another changeset...

 
470
471
472
473
 
474
475
 
 
 
 
476
477
478
 
470
471
472
 
473
474
 
475
476
477
478
479
480
481
@@ -470,9 +470,12 @@
  gtk.HBox.__init__(self)   self.tooltips = tooltips   - def append_stock(self, stock_id, tooltip=None): + def append_stock(self, stock_id, tooltip=None, toggle=False):   icon = gtk.image_new_from_stock(stock_id, gtk.ICON_SIZE_MENU) - button = gtk.Button() + if toggle: + button = gtk.ToggleButton() + else: + button = gtk.Button()   button.set_image(icon)   button.set_relief(gtk.RELIEF_NONE)   button.set_focus_on_click(False)