# HG changeset patch # User Adrian Buehlmann <adr...@cadifra.com> # Date 1253008499 -7200 # Node ID 10d90696ce8a8c3c82c6cb6c3928eb7aeb618737 # Parent f83cb2afb97e5b34d8924a9fc829a43a83c96823 status: inactivate text diff and hunk selection tabs for non-MAR files
Clean ('C'), missing ('!'), unknown ('?') and ignored ('I') files don't have diffs. Diffs are only applicable for modified ('M'), added ('A') and removed ('R') files. This grays out the child page area and the tab labels of the text diff and the hunk selection tabs in the right pane, if a file with a status not in 'MAR' is selected. This emphasizes that these tabs are not applicable for non-MAR files. Note that the inactivated tabs can still be selected. It just gives a bit better visual feedback. diff --git a/tortoisehg/hgtk/status.py b/tortoisehg/hgtk/status.py --- a/tortoisehg/hgtk/status.py +++ b/tortoisehg/hgtk/status.py @@ -851,6 +851,17 @@ class GStatus(gdialog.GDialog): if not paths: return row = paths[0] + + # desensitize the text diff and hunk selection tabs + # if a non-MAR file is selected + status = model[row][FM_STATUS] + enable = (status in 'MAR') + for pn in [0, 1]: + child = self.diff_notebook.get_nth_page(pn) + child.set_sensitive(enable) + lb = self.diff_notebook.get_tab_label(child) + lb.set_sensitive(enable) + if page_num is None: page_num = self.diff_notebook.get_current_page() if page_num == 0: ------------------------------------------------------------------------------ Come build with us! The BlackBerry® 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/devconf _______________________________________________ Tortoisehg-develop mailing list Tortoisehg-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop