mailr11999 - /branches/bieri_gui/gui_bieri/about.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on December 28, 2010 - 20:48:
Author: bugman
Date: Tue Dec 28 20:48:30 2010
New Revision: 11999

URL: http://svn.gna.org/viewcvs/relax?rev=11999&view=rev
Log:
Shifted the about relax process_click() method to the base class so that 
clicking on URLs opens the link.


Modified:
    branches/bieri_gui/gui_bieri/about.py

Modified: branches/bieri_gui/gui_bieri/about.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/about.py?rev=11999&r1=11998&r2=11999&view=diff
==============================================================================
--- branches/bieri_gui/gui_bieri/about.py (original)
+++ branches/bieri_gui/gui_bieri/about.py Tue Dec 28 20:48:30 2010
@@ -287,11 +287,20 @@
 
 
     def process_click(self, event):
-        """Base method which just closes the widget on a click event.
+        """Determine what to do with the mouse click.
 
         @param event:   The wx event.
         @type event:    wx event
         """
+
+        # Determine the mouse position.
+        x = event.GetX()
+        y = event.GetY()
+
+        # A click on a URL.
+        for i in range(len(self.url_pos)):
+            if x > self.url_pos[i][0, 0] and x < self.url_pos[i][0, 1] and y 
self.url_pos[i][1, 0] and y < self.url_pos[i][1, 1]:
+                webbrowser.open_new(self.url_text[i])
 
         # Close the widget.
         if self.DESTROY_ON_CLICK:
@@ -546,24 +555,3 @@
         """Draw the relax licence text."""
 
         self.draw_wrapped_text(self.info.licence, spacer=10)
-
-
-    def process_click(self, event):
-        """Determine what to do with the mouse click.
-
-        @param event:   The wx event.
-        @type event:    wx event
-        """
-
-        # Determine the mouse position.
-        x = event.GetX()
-        y = event.GetY()
-
-        # A click on a URL.
-        for i in range(len(self.url_pos)):
-            if x > self.url_pos[i][0, 0] and x < self.url_pos[i][0, 1] and y 
self.url_pos[i][1, 0] and y < self.url_pos[i][1, 1]:
-                webbrowser.open_new(self.url_text[i])
-
-        # Close the dialog on all clicks.
-        if self.DESTROY_ON_CLICK:
-            self.Destroy()




Related Messages


Powered by MHonArc, Updated Tue Dec 28 21:00:02 2010