mailr14191 - /branches/gui_testing/gui/controller.py


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

Header


Content

Posted by edward on August 06, 2011 - 00:16:
Author: bugman
Date: Sat Aug  6 00:16:54 2011
New Revision: 14191

URL: http://svn.gna.org/viewcvs/relax?rev=14191&view=rev
Log:
The relax controller log control can no longer have text inserted.

This was happening with the middle mouse button click on GNU/Linux.  The 
control is now read only
except for when the write() method is used to add text.


Modified:
    branches/gui_testing/gui/controller.py

Modified: branches/gui_testing/gui/controller.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/controller.py?rev=14191&r1=14190&r2=14191&view=diff
==============================================================================
--- branches/gui_testing/gui/controller.py (original)
+++ branches/gui_testing/gui/controller.py Sat Aug  6 00:16:54 2011
@@ -525,6 +525,9 @@
         self.find_data = wx.FindReplaceData()
         self.find_data.SetFlags(wx.FR_DOWN)
 
+        # Make the control read only.
+        self.SetReadOnly(True)
+
         # Bind events.
         self.Bind(wx.EVT_FIND, self.find)
         self.Bind(wx.EVT_FIND_NEXT, self.find)
@@ -758,6 +761,9 @@
         if self.GetScrollPos(wx.VERTICAL) == 
self.GetScrollRange(wx.VERTICAL) - self.LinesOnScreen():
             at_end = True
 
+        # Turn of the read only state.
+        self.SetReadOnly(False)
+
         # Add the text.
         for i in range(len(string_list)):
             # Add the text.
@@ -779,6 +785,9 @@
         # Stay at the end.
         if at_end:
             self.ScrollToLine(self.GetLineCount())
+
+        # Make the control read only again.
+        self.SetReadOnly(True)
 
         # Show the relax controller when text is added.
         if status.show_gui and not self.controller.IsShown():




Related Messages


Powered by MHonArc, Updated Sat Aug 06 01:00:02 2011