# HG changeset patch
# User Adrian Buehlmann <[email protected]>
# Date 1254866976 -7200
# Node ID 7b26ff23c3879c60573754544f992720b83c6e34
# Parent 39a2f3febed2c8eb3d6413e6670470fbc1639b05
commit: kill self.undo_button and self.commit_button
using self.get_toolbutton instead
diff --git a/tortoisehg/hgtk/commit.py b/tortoisehg/hgtk/commit.py
--- a/tortoisehg/hgtk/commit.py
+++ b/tortoisehg/hgtk/commit.py
@@ -229,12 +229,12 @@ class GCommit(GStatus):
# insert to head of toolbar
tbbuttons = GStatus.get_tbbuttons(self)
tbbuttons.insert(0, gtk.SeparatorToolItem())
- self.undo_button = self.make_toolbutton(gtk.STOCK_UNDO, _('_Undo'),
- self.undo_clicked, tip=_('undo recent commit'))
- self.commit_button = self.make_toolbutton(gtk.STOCK_OK, _('_Commit'),
- self.commit_clicked, tip=_('commit'))
- tbbuttons.insert(0, self.undo_button)
- tbbuttons.insert(0, self.commit_button)
+ undo_btn = self.make_toolbutton(gtk.STOCK_UNDO, _('_Undo'),
+ self.undo_clicked, name='undo', tip=_('undo recent commit'))
+ commit_btn = self.make_toolbutton(gtk.STOCK_OK, _('_Commit'),
+ self.commit_clicked, name='commit', tip=_('commit'))
+ tbbuttons.insert(0, undo_btn)
+ tbbuttons.insert(0, commit_btn)
return tbbuttons
def should_live(self, widget=None, event=None):
@@ -484,7 +484,7 @@ class GCommit(GStatus):
tooltip = _('no parent is a head, '
'commit to add a new head')
- btn = self.commit_button
+ btn = self.get_toolbutton('commit')
btn.set_label(label)
btn.set_tooltip(self.tooltips, tooltip)
@@ -626,7 +626,7 @@ class GCommit(GStatus):
def check_undo(self):
can_undo = os.path.exists(self.repo.sjoin("undo")) and \
self.last_commit_id is not None
- self.undo_button.set_sensitive(can_undo)
+ self.get_toolbutton('undo').set_sensitive(can_undo)
self.get_menuitem('undo').set_sensitive(can_undo)
def check_merge(self):
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Tortoisehg-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop