dabo Commit
Revision 6814
Date: 2011-08-31 15:39:46 -0700 (Wed, 31 Aug 2011)
Author: Paul
Trac: http://trac.dabodev.com/changeset/6814

Changed:
U   trunk/dabo/ui/uiwx/dHyperLink.py

Log:
Map ForeColor to LinkColor. Remove "copy hyperlink" menu item when 
ShowInBrowser is False.


Diff:
Modified: trunk/dabo/ui/uiwx/dHyperLink.py
===================================================================
--- trunk/dabo/ui/uiwx/dHyperLink.py    2011-08-31 07:11:20 UTC (rev 6813)
+++ trunk/dabo/ui/uiwx/dHyperLink.py    2011-08-31 22:39:46 UTC (rev 6814)
@@ -29,6 +29,7 @@
                self.ShowHover = self.ShowHover
 
                self.Bind(hyperlink.EVT_HYPERLINK_LEFT, self._onWxHit)  ## only 
called if ShowInBrowser False
+               self.bindEvent(dabo.dEvents.MouseRightClick, 
self._onMouseRightClick)
 
 
        def refresh(self):
@@ -36,6 +37,12 @@
                self.UpdateLink(True)
 
 
+       def _onMouseRightClick(self, evt):
+               if not self.ShowInBrowser:
+                       ## hide the popup menu with "copy hyperlink" action
+                       evt.stop()
+
+
        def _setColors(self):
                """Updated the link with the specified colors."""
                lc, vc, rc = self.LinkColor, self.VisitedColor, self.HoverColor
@@ -187,6 +194,7 @@
        VisitedUnderline = property(_getVisitedUnderline, _setVisitedUnderline, 
None,
                        _("Is the link underlined in the visited state?  
(bool)"))
 
+       ForeColor = LinkColor
 
 
 class _dHyperLink_test(dHyperLink):



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to