Changeset 8961982c295d…
Parent 00c3b466f8ff…
by
Changes to 4 files · Browse files at 8961982c295d Showing diff from parent 00c3b466f8ff Diff from another changeset...
@@ -599,13 +599,13 @@
### public methods ###
- def append_stock(self, stock_id, tooltip=None, toggle=False, group=None):
- icon = gtk.image_new_from_stock(stock_id, gtk.ICON_SIZE_MENU)
+ def append_button(self, icon, tooltip=None, toggle=False, group=None):
+ img = gtk.image_new_from_stock(icon, gtk.ICON_SIZE_MENU)
if toggle:
button = gtk.ToggleButton()
else:
button = gtk.Button()
- button.set_image(icon)
+ button.set_image(img)
button.set_relief(gtk.RELIEF_NONE)
button.set_focus_on_click(False)
if self.tooltips and tooltip:
|
@@ -269,7 +269,7 @@ self.pack_start(progbox)
def add_button(stock_id, tooltip, handler, toggle=False):
- btn = progbox.append_stock(stock_id, tooltip, toggle)
+ btn = progbox.append_button(stock_id, tooltip, toggle)
btn.connect('clicked', handler)
return btn
|
@@ -1044,29 +1044,29 @@ self.syncbox = gtklib.SlimToolbar(self.tooltips)
syncbox = self.syncbox
- refresh = syncbox.append_stock(gtk.STOCK_REFRESH,
+ refresh = syncbox.append_button(gtk.STOCK_REFRESH,
_('Reload revision history'))
syncbox.append_separator()
- apply = syncbox.append_stock(gtk.STOCK_APPLY,
+ apply = syncbox.append_button(gtk.STOCK_APPLY,
_('Accept changes from Bundle preview'),
group='bundle')
- reject = syncbox.append_stock(gtk.STOCK_DIALOG_ERROR,
+ reject = syncbox.append_button(gtk.STOCK_DIALOG_ERROR,
_('Reject changes from Bundle preview'),
group='bundle')
syncbox.append_separator(group='bundle')
- incoming = syncbox.append_stock(gtk.STOCK_GO_DOWN,
+ incoming = syncbox.append_button(gtk.STOCK_GO_DOWN,
_('Download and view incoming changesets'))
- pull = syncbox.append_stock(gtk.STOCK_GOTO_BOTTOM,
+ pull = syncbox.append_button(gtk.STOCK_GOTO_BOTTOM,
_('Pull incoming changesets'))
syncbox.append_separator()
- outgoing = syncbox.append_stock(gtk.STOCK_GO_UP,
+ outgoing = syncbox.append_button(gtk.STOCK_GO_UP,
_('Determine and mark outgoing changesets'))
- push = syncbox.append_stock(gtk.STOCK_GOTO_TOP,
+ push = syncbox.append_button(gtk.STOCK_GOTO_TOP,
_('Push outgoing changesets'))
- email = syncbox.append_stock(gtk.STOCK_GOTO_LAST,
+ email = syncbox.append_button(gtk.STOCK_GOTO_LAST,
_('Email outgoing changesets'))
syncbox.append_separator(group='stop')
- stop = syncbox.append_stock(gtk.STOCK_STOP,
+ stop = syncbox.append_button(gtk.STOCK_STOP,
_('Stop current transaction'), group='stop')
syncbox.set_visible('stop', False)
@@ -1116,7 +1116,7 @@ self.update_postpull(ppull)
## add conf button
- conf = syncbox.append_stock(gtk.STOCK_PREFERENCES,
+ conf = syncbox.append_button(gtk.STOCK_PREFERENCES,
_('Configure aliases and after pull behavior'))
## connect syncbar buttons
|
@@ -92,23 +92,23 @@
## buttons
self.btn = {}
- popallbtn = tbar.append_stock(gtk.STOCK_GOTO_FIRST,
+ popallbtn = tbar.append_button(gtk.STOCK_GOTO_FIRST,
_('Unapply all patches'))
popallbtn.connect('clicked', self.popall_clicked)
self.btn['popall'] = popallbtn
- popbtn = tbar.append_stock(gtk.STOCK_GO_BACK,
+ popbtn = tbar.append_button(gtk.STOCK_GO_BACK,
_('Unapply last patch'))
popbtn.connect('clicked', self.pop_clicked)
self.btn['pop'] = popbtn
pushbtn = gtk.ToolButton(gtk.STOCK_GO_FORWARD)
- pushbtn = tbar.append_stock(gtk.STOCK_GO_FORWARD,
+ pushbtn = tbar.append_button(gtk.STOCK_GO_FORWARD,
_('Apply next patch'))
pushbtn.connect('clicked', self.push_clicked)
self.btn['push'] = pushbtn
- pushallbtn = tbar.append_stock(gtk.STOCK_GOTO_LAST,
+ pushallbtn = tbar.append_button(gtk.STOCK_GOTO_LAST,
_('Apply all patches'))
pushallbtn.connect('clicked', self.pushall_clicked)
self.btn['pushall'] = pushallbtn
|
Loading...