Changeset 73385d42a916…
Parent ed4c2264d6c5…
by
Changes to 3 files · Browse files at 73385d42a916 Showing diff from parent ed4c2264d6c5 Diff from another changeset...
@@ -285,8 +285,8 @@ return cnt
- def make_toolbutton(self, stock, label, handler,
- userdata=None, menu=None, tip=None, toggle=False):
+ def make_toolbutton(self, stock, label, handler, userdata=None,
+ menu=None, tip=None, toggle=False, icon=None):
if menu:
tbutton = gtk.MenuToolButton(stock)
tbutton.set_menu(menu)
@@ -297,6 +297,12 @@
if tip:
tbutton.set_tooltip(self.tooltips, tip)
+ if icon:
+ path = paths.get_tortoise_icon(icon)
+ if path:
+ image = gtk.Image()
+ image.set_from_file(path)
+ tbutton.set_icon_widget(image)
tbutton.set_use_underline(True)
tbutton.set_label(label)
tbutton.connect('clicked', handler, userdata)
|
@@ -83,7 +83,8 @@ _('MQ'),
self.mq_clicked,
tip=_('Toggle MQ panel'),
- toggle=True)
+ toggle=True,
+ icon='menupatch.ico')
tbar += [self.mqtb, gtk.SeparatorToolItem()]
self.settingtb = self.make_toolbutton(gtk.STOCK_PREFERENCES,
_('Configure'),
|
|
Loading...