by
Changes to 13 files · Browse files at 00adba2623b3 Showing diff from parent 411557532036 288e39c4ecb2 Diff from another changeset...
@@ -72,7 +72,7 @@ msgvbox.pack_start(scrolledwindow)
## tooltips
- self.tips = gtk.Tooltips()
+ self.tips = gtklib.Tooltips()
self.tips.set_tip(frame,
_('Commit message text for new changeset that reverses the'
' effect of the change being backed out.'))
|
@@ -658,7 +658,7 @@
btn = self.get_toolbutton('commit')
btn.set_label(label)
- btn.set_tooltip(self.tooltips, tooltip)
+ self.tooltips.set_tip(btn, tooltip)
def get_head_info(self):
def ishead(ctx):
|
@@ -260,7 +260,7 @@ self.show_all()
else:
self._parse_opts()
- self.tooltips = gtk.Tooltips()
+ self.tooltips = gtklib.Tooltips()
def test_opt(self, opt):
@@ -326,7 +326,7 @@ tbutton = gtk.ToolButton(stock)
if tip:
- tbutton.set_tooltip(self.tooltips, tip)
+ self.tooltips.set_tip(tbutton, tip)
if icon:
image = gtklib.get_icon_image(icon)
tbutton.set_icon_widget(image)
@@ -461,7 +461,7 @@ if x >= 0 and x < w and y >= 0 and y < h:
self.move(x, y)
- self.tooltips = gtk.Tooltips()
+ self.tooltips = gtklib.Tooltips()
toolbar = gtk.Toolbar()
tbuttons = self.get_tbbuttons()
for tbutton in tbuttons:
|
@@ -32,7 +32,7 @@
self.gotofunc = gotofunc
- self.tips = gtk.Tooltips()
+ self.tips = gtklib.Tooltips()
hbox = gtk.HBox()
self.revEntry = gtk.Entry()
|
@@ -49,6 +49,17 @@ PYELLOW = '#ffffaa'
PORANGE = '#ffddaa'
+if gtk.pygtk_version < (2, 12, 0):
+ # old nasty
+ Tooltips = gtk.Tooltips
+else:
+ # new shiny
+ class Tooltips(object):
+ def __init__(self):
+ pass
+ def set_tip(self, widget, tip):
+ widget.set_tooltip_text(tip)
+
RED = 'red'
GREEN = 'green'
BLUE = 'blue'
|
@@ -268,7 +268,7 @@
# tooltips
if tooltips is None:
- tooltips = gtk.Tooltips()
+ tooltips = gtklib.Tooltips()
# log viewer
if self.is_normal:
|
@@ -30,7 +30,7 @@ self.revargs = revargs
self.tbar = gtk.Toolbar()
- self.tips = gtk.Tooltips()
+ self.tips = gtklib.Tooltips()
tbuttons = [
self._toolbutton(gtk.STOCK_GOTO_LAST, _('Send'),
@@ -95,10 +95,9 @@ table = gtklib.LayoutTable()
flagframe.add(table)
- self.tooltips = gtk.Tooltips()
self._normal = gtk.RadioButton(None, _('Send changesets as Hg patches'))
table.add_row(self._normal)
- self.tooltips.set_tip(self._normal,
+ self.tips.set_tip(self._normal,
_('Hg patches (as generated by export command) are compatible'
' with most patch programs. They include a header which'
' contains the most important changeset metadata.'))
@@ -106,7 +105,7 @@ self._git = gtk.RadioButton(self._normal,
_('Use extended (git) patch format'))
table.add_row(self._git)
- self.tooltips.set_tip(self._git,
+ self.tips.set_tip(self._git,
_('Git patches can describe binary files, copies, and'
' permission changes, but recipients may not be able to'
' use them if they are not using git or Mercurial.'))
@@ -114,7 +113,7 @@ self._plain = gtk.RadioButton(self._normal,
_('Plain, do not prepend Hg header'))
table.add_row(self._plain)
- self.tooltips.set_tip(self._plain,
+ self.tips.set_tip(self._plain,
_('Stripping Mercurial header removes username and parent'
' information. Only useful if recipient is not using'
' Mercurial (and does not like to see the headers).'))
@@ -123,24 +122,24 @@ _('Send single binary bundle, not patches'))
table.add_row(self._bundle)
if revargs[0] in ('--outgoing', '-o'):
- self.tooltips.set_tip(self._bundle,
+ self.tips.set_tip(self._bundle,
_('Bundles store complete changesets in binary form.'
' Upstream users can pull from them. This is the safest'
' way to send changes to recipient Mercurial users.'))
else:
self._bundle.set_sensitive(False)
- self.tooltips.set_tip(self._bundle,
+ self.tips.set_tip(self._bundle,
_('This feature is only available when sending outgoing'
' changesets. It is not applicable with revision ranges.'))
self._attach = gtk.CheckButton(_('attach'))
- self.tooltips.set_tip(self._attach,
+ self.tips.set_tip(self._attach,
_('send patches as attachments'))
self._inline = gtk.CheckButton(_('inline'))
- self.tooltips.set_tip(self._inline,
+ self.tips.set_tip(self._inline,
_('send patches as inline attachments'))
self._diffstat = gtk.CheckButton(_('diffstat'))
- self.tooltips.set_tip(self._diffstat,
+ self.tips.set_tip(self._diffstat,
_('add diffstat output to messages'))
table.add_row(self._attach, self._inline, self._diffstat, padding=False)
@@ -193,7 +192,7 @@ def _toolbutton(self, stock, label, handler, tip):
tbutton = gtk.ToolButton(stock)
tbutton.set_label(label)
- tbutton.set_tooltip(self.tips, tip)
+ self.tips.set_tip(tbutton, tip)
tbutton.connect('clicked', handler)
return tbutton
@@ -229,7 +228,7 @@ self._ccbox.child.set_text(hglib.fromutf(repo.ui.config('email', 'cc', '')))
self._frombox.child.set_text(hglib.fromutf(getfromaddr(repo.ui)))
self._subjbox.child.set_text(hglib.fromutf(repo.ui.config('email', 'subject', '')))
- self.tooltips.set_tip(self._eventbox,
+ self.tips.set_tip(self._eventbox,
_('Patch series description is sent in initial summary'
' email with [PATCH 0 of N] subject. It should describe'
' the effects of the entire patch series. When emailing'
|
@@ -1835,13 +1835,13 @@
# create apply/reject toolbar buttons
apply = gtk.ToolButton(gtk.STOCK_APPLY)
- apply.set_tooltip(self.tooltips,
+ self.tooltips.set_tip(apply,
_('Accept incoming previewed changesets'))
apply.set_label(_('Accept'))
apply.show()
reject = gtk.ToolButton(gtk.STOCK_DIALOG_ERROR)
- reject.set_tooltip(self.tooltips,
+ self.tooltips.set_tip(reject,
_('Reject incoming previewed changesets'))
reject.set_label(_('Reject'))
reject.show()
|
@@ -41,7 +41,7 @@
# toolbar
self.tbar = gtk.Toolbar()
- self.tips = gtk.Tooltips()
+ self.tips = gtklib.Tooltips()
self._stop_button = self._toolbutton(gtk.STOCK_STOP,
_('Stop'), self._stop_clicked, tip=_('Stop the hg operation'))
self._stop_button.set_sensitive(False)
@@ -115,7 +115,7 @@
tbutton.set_label(label)
if tip:
- tbutton.set_tooltip(self.tips, tip)
+ self.tips.set_tip(tbutton, tip)
tbutton.connect('clicked', handler, userdata)
return tbutton
|
@@ -56,7 +56,7 @@
# toolbar
self.tbar = gtk.Toolbar()
- self.tooltips = gtk.Tooltips()
+ self.tooltips = gtklib.Tooltips()
self._button_start = self._toolbutton(gtk.STOCK_MEDIA_PLAY,
_('Start'),
self._on_start_clicked,
@@ -142,7 +142,7 @@ tbutton = gtk.ToolButton(stock)
if tip:
- tbutton.set_tooltip(self.tooltips, tip)
+ self.tooltips.set_tip(tbutton, tip)
tbutton.set_label(label)
tbutton.connect('clicked', handler, userdata)
|
@@ -192,7 +192,7 @@ hbox.pack_start(self.hgighlight_taskbaricon, False, False, 2)
# Tooltips
- tips = gtk.Tooltips()
+ tips = gtklib.Tooltips()
tooltip = _('Show overlay icons in Mercurial repositories')
tips.set_tip(self.ovenable, tooltip)
|
@@ -54,7 +54,7 @@
# toolbar
self.tbar = gtk.Toolbar()
- self.tips = gtk.Tooltips()
+ self.tips = gtklib.Tooltips()
self.stop_button = self.toolbutton(gtk.STOCK_STOP,
_('Stop'), self.stop_clicked, tip=_('Stop the hg operation'))
self.stop_button.set_sensitive(False)
@@ -415,7 +415,7 @@
tbutton.set_label(label)
if tip:
- tbutton.set_tooltip(self.tips, tip)
+ self.tips.set_tip(tbutton, tip)
tbutton.connect('clicked', handler, userdata)
return tbutton
|
@@ -679,7 +679,7 @@
self.dirty = False
self.pages = {}
- self.tooltips = gtk.Tooltips()
+ self.tooltips = gtklib.Tooltips()
self.history = settings.Settings('thgconfig')
# add page items to treeview
|
Loading...