# HG changeset patch
# User Peer Sommerlund <[EMAIL PROTECTED]>
# Date 1228436894 -3600
# Node ID 7eddb719cb22cf4f52cc0abe5bf184d64dc9968d
# Parent 2e853342286c31b4cd803f451957311d93cd9766
thgconfig: Disable Incoming button when configuring user preferences
Previously, the button pops up a warning when trying the operation
without a repository. By disabling the button when it will not work,
the user is spared a frustration.
diff -r 2e853342286c -r 7eddb719cb22 hggtk/thgconfig.py
--- a/hggtk/thgconfig.py Fri Dec 05 01:28:14 2008 +0100
+++ b/hggtk/thgconfig.py Fri Dec 05 01:28:14 2008 +0100
@@ -387,13 +387,11 @@
def refresh_path_list(self):
"""Update sensitivity of buttons"""
- if ( len(self.pathdata)
- and self.pathtree.get_selection().count_selected_rows() ):
- self._delpathbutton.set_sensitive(True)
- self._testpathbutton.set_sensitive(True)
- else:
- self._delpathbutton.set_sensitive(False)
- self._testpathbutton.set_sensitive(False)
+ path_selected = ( len(self.pathdata) > 0
+ and self.pathtree.get_selection().count_selected_rows() > 0)
+ repo_available = self.root is not None
+ self._delpathbutton.set_sensitive(path_selected)
+ self._testpathbutton.set_sensitive(repo_available and path_selected)
def fill_frame(self, frame, info):
widgets = []
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Tortoisehg-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop