# HG changeset patch
# User Adrian Buehlmann <adr...@cadifra.com>
# Date 1253884990 -7200
# Node ID 1505dc27dab170c144c0c60279dd6b6acae5cb05
# Parent  aa4502210e8a0d5ab54cb3e06fa20ee6fb86506f
update: desensitize "Update" button

diff --git a/tortoisehg/hgtk/update.py b/tortoisehg/hgtk/update.py
--- a/tortoisehg/hgtk/update.py
+++ b/tortoisehg/hgtk/update.py
@@ -92,6 +92,8 @@ class UpdateDialog(gtk.Dialog):
 
         self.show_summaries(True)
 
+        self.opt_clean.connect('toggled', lambda b: self.update_summaries())
+
         # prepare to show
         self.updatebtn.grab_focus()
         gobject.idle_add(self.after_init)
@@ -221,8 +223,10 @@ class UpdateDialog(gtk.Dialog):
             new_ctx = self.repo[newrev]
             if not merge and new_ctx.rev() == ctxs[0].rev():
                 self.new_rev_label.set_label(_('(same as parent)'))
+                self.updatebtn.set_sensitive(self.opt_clean.get_active())
             else:
                 setlabel(self.new_rev_label, self.repo[newrev])
+                self.updatebtn.set_sensitive(True)
         except hglib.RepoError:
             pass
 

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; 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&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Tortoisehg-develop mailing list
Tortoisehg-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to