mailr19536 - in /branches/relax_disp: ./ gui/analyses/ gui/analyses/elements/


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

Header


Content

Posted by edward on April 21, 2013 - 15:29:
Author: bugman
Date: Sun Apr 21 15:29:07 2013
New Revision: 19536

URL: http://svn.gna.org/viewcvs/relax?rev=19536&view=rev
Log:
Merged revisions 19533-19535 via svnmerge from 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk

........
  r19533 | bugman | 2013-04-21 15:11:53 +0200 (Sun, 21 Apr 2013) | 5 lines
  
  The Text_ctrl analysis frame GUI elements  now have separate tooltips for 
the buttons.
  
  This is to give a hint to the user as to what the button does.
........
  r19534 | bugman | 2013-04-21 15:13:32 +0200 (Sun, 21 Apr 2013) | 3 lines
  
  The model selection GUI analysis element can now have a different tooltip 
for the button.
........
  r19535 | bugman | 2013-04-21 15:18:56 +0200 (Sun, 21 Apr 2013) | 3 lines
  
  Added tooltips to the model-free model list GUI elements in the model-free 
analysis frame.
........

Modified:
    branches/relax_disp/   (props changed)
    branches/relax_disp/gui/analyses/auto_model_free.py
    branches/relax_disp/gui/analyses/auto_noe.py
    branches/relax_disp/gui/analyses/auto_rx_base.py
    branches/relax_disp/gui/analyses/base.py
    branches/relax_disp/gui/analyses/elements/model_list.py
    branches/relax_disp/gui/analyses/elements/text_element.py

Propchange: branches/relax_disp/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sun Apr 21 15:29:07 2013
@@ -1,1 +1,1 @@
-/trunk:1-19531
+/trunk:1-19535

Modified: branches/relax_disp/gui/analyses/auto_model_free.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/gui/analyses/auto_model_free.py?rev=19536&r1=19535&r2=19536&view=diff
==============================================================================
--- branches/relax_disp/gui/analyses/auto_model_free.py (original)
+++ branches/relax_disp/gui/analyses/auto_model_free.py Sun Apr 21 15:29:07 
2013
@@ -511,7 +511,7 @@
         Text_ctrl(box, self, text="The data pipe bundle:", 
default=self.data.pipe_bundle, tooltip="This is the data pipe bundle 
associated with this analysis.", editable=False, width_text=self.width_text, 
width_button=self.width_button, spacer=self.spacer_horizontal)
 
         # Add the results directory GUI element.
-        self.field_results_dir = Text_ctrl(box, self, text="Results 
directory:", icon=paths.icon_16x16.open_folder, default=self.data.save_dir, 
tooltip="The directory in which all automatically created files will be 
saved.", fn=self.results_directory, button=True, width_text=self.width_text, 
width_button=self.width_button, spacer=self.spacer_horizontal)
+        self.field_results_dir = Text_ctrl(box, self, text="Results 
directory:", icon=paths.icon_16x16.open_folder, default=self.data.save_dir, 
tooltip="The directory in which all automatically created files will be 
saved.", tooltip_button="Select the results directory.", 
fn=self.results_directory, button=True, width_text=self.width_text, 
width_button=self.width_button, spacer=self.spacer_horizontal)
 
         # Add the spin GUI element.
         self.add_spin_systems(box, self)
@@ -541,7 +541,7 @@
         self.max_iter = Spin_ctrl(box, self, text="Maximum interations:", 
default=self.data.max_iter, tooltip="The maximum number of iterations for the 
protocol.  This is the limit for the global looping over the optimisation of 
the model-free models, model elimination, model selection and then 
optimisation of the diffusion tensor.", min=25, max=100, 
width_text=self.width_text, width_button=self.width_button, 
spacer=self.spacer_horizontal)
 
         # The calculation mode.
-        self.mode = Text_ctrl(box, self, text="Protocol mode:", 
default='Fully automated', tooltip="Select if the dauvergne_protocol analysis 
will be fully automated or whether the individual global models will be 
optimised separately.", icon=paths.icon_16x16.system_run, 
fn=self.mode_dialog, editable=False, button=True, width_text=self.width_text, 
width_button=self.width_button, spacer=self.spacer_horizontal)
+        self.mode = Text_ctrl(box, self, text="Protocol mode:", 
default='Fully automated', tooltip="Select if the dauvergne_protocol analysis 
will be fully automated or whether the individual global models will be 
optimised separately.", tooltip_button="Open the protocol mode selection 
window.", icon=paths.icon_16x16.system_run, fn=self.mode_dialog, 
editable=False, button=True, width_text=self.width_text, 
width_button=self.width_button, spacer=self.spacer_horizontal)
 
         # Stretchable spacing (with a minimal space).
         box.AddSpacer(30)
@@ -843,6 +843,8 @@
     ]
     warning = "The model-free models used in dauvergne_protocol 
auto-analysis should almost never be changed!  The consequences will be 
unpredictable.  Please proceed only if you are sure of what you are doing.  
Would you like to modify the model-free model list?"
     red_flag = True
+    tooltip = u"The list model-free models with the local \u03C4m parameter 
to optimise as the first step of the protocol (see the about window for 
details).  This really should not be changed."
+    tooltip_button = "Open the model list selector window."
 
 
 
@@ -877,6 +879,8 @@
     ]
     warning = "The model-free models used in dauvergne_protocol 
auto-analysis should almost never be changed!  The consequences will be 
unpredictable.  Please proceed only if you are sure of what you are doing.  
Would you like to modify the model-free model list?"
     red_flag = True
+    tooltip = "The list model-free models to optimise as the iterative part 
of the protocol (see the about window for details).  This really should not 
be changed."
+    tooltip_button = "Open the model list selector window."
 
 
 

Modified: branches/relax_disp/gui/analyses/auto_noe.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/gui/analyses/auto_noe.py?rev=19536&r1=19535&r2=19536&view=diff
==============================================================================
--- branches/relax_disp/gui/analyses/auto_noe.py (original)
+++ branches/relax_disp/gui/analyses/auto_noe.py Sun Apr 21 15:29:07 2013
@@ -203,7 +203,7 @@
         self.field_nmr_frq = Text_ctrl(box, self, text="NMR frequency label 
[MHz]:", default=self.data.frq, tooltip="This label is added to the output 
files.  For example if the label is '600', the NOE values will be located in 
the file 'noe.600.out'.", width_text=self.width_text, 
width_button=self.width_button, spacer=self.spacer_horizontal)
 
         # Add the results directory GUI element.
-        self.field_results_dir = Text_ctrl(box, self, text="Results 
directory:", icon=paths.icon_16x16.open_folder, default=self.data.save_dir, 
tooltip="The directory in which all automatically created files will be 
saved.", fn=self.results_directory, button=True, width_text=self.width_text, 
width_button=self.width_button, spacer=self.spacer_horizontal)
+        self.field_results_dir = Text_ctrl(box, self, text="Results 
directory:", icon=paths.icon_16x16.open_folder, default=self.data.save_dir, 
tooltip="The directory in which all automatically created files will be 
saved.", tooltip_button="Select the results directory.", 
fn=self.results_directory, button=True, width_text=self.width_text, 
width_button=self.width_button, spacer=self.spacer_horizontal)
 
         # Add the spin GUI element.
         self.add_spin_systems(box, self)

Modified: branches/relax_disp/gui/analyses/auto_rx_base.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/gui/analyses/auto_rx_base.py?rev=19536&r1=19535&r2=19536&view=diff
==============================================================================
--- branches/relax_disp/gui/analyses/auto_rx_base.py (original)
+++ branches/relax_disp/gui/analyses/auto_rx_base.py Sun Apr 21 15:29:07 2013
@@ -214,7 +214,7 @@
         self.field_nmr_frq = Text_ctrl(box, self, text="NMR frequency label 
[MHz]:", default=self.data.frq, tooltip="This label is added to the output 
files.  For example if the label is '600', the %s values will be located in 
the file '%s.600.out'." % (self.label, self.label.lower()), 
width_text=self.width_text, width_button=self.width_button, 
spacer=self.spacer_horizontal)
 
         # Add the results directory GUI element.
-        self.field_results_dir = Text_ctrl(box, self, text="Results 
directory:", icon=paths.icon_16x16.open_folder, default=self.data.save_dir, 
tooltip="The directory in which all automatically created files will be 
saved.", fn=self.results_directory, button=True, width_text=self.width_text, 
width_button=self.width_button, spacer=self.spacer_horizontal)
+        self.field_results_dir = Text_ctrl(box, self, text="Results 
directory:", icon=paths.icon_16x16.open_folder, default=self.data.save_dir, 
tooltip="The directory in which all automatically created files will be 
saved.", tooltip_button="Select the results directory.", 
fn=self.results_directory, button=True, width_text=self.width_text, 
width_button=self.width_button, spacer=self.spacer_horizontal)
 
         # Add the spin GUI element.
         self.add_spin_systems(box, self)

Modified: branches/relax_disp/gui/analyses/base.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/gui/analyses/base.py?rev=19536&r1=19535&r2=19536&view=diff
==============================================================================
--- branches/relax_disp/gui/analyses/base.py (original)
+++ branches/relax_disp/gui/analyses/base.py Sun Apr 21 15:29:07 2013
@@ -215,7 +215,7 @@
         """
 
         # Add the element.
-        self.spin_systems = Text_ctrl(box, self, text="Spin systems:", 
button_text=" Spin editor", default=self.spin_count(), tooltip="The currently 
loaded molecule, residue, and spin sequence.", icon=paths.icon_16x16.spin, 
fn=self.launch_spin_editor, editable=False, button=True, 
width_text=self.width_text, width_button=self.width_button, 
spacer=self.spacer_horizontal)
+        self.spin_systems = Text_ctrl(box, self, text="Spin systems:", 
button_text=" Spin editor", default=self.spin_count(), tooltip="The currently 
loaded molecule, residue and spin sequence.", tooltip_button="Launch the spin 
editor window for modifying the molecule, residue and spin sequence.", 
icon=paths.icon_16x16.spin, fn=self.launch_spin_editor, editable=False, 
button=True, width_text=self.width_text, width_button=self.width_button, 
spacer=self.spacer_horizontal)
 
 
     def add_static_text(self, box, parent, text='', width=-1, height=-1):

Modified: branches/relax_disp/gui/analyses/elements/model_list.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/gui/analyses/elements/model_list.py?rev=19536&r1=19535&r2=19536&view=diff
==============================================================================
--- branches/relax_disp/gui/analyses/elements/model_list.py (original)
+++ branches/relax_disp/gui/analyses/elements/model_list.py Sun Apr 21 
15:29:07 2013
@@ -55,7 +55,10 @@
     """A flag which if True will cause the flag icon to turn red if the 
model list has been modified."""
 
     tooltip = None
-    """The tooltip string to add to all wx GUI elements."""
+    """The tooltip string to add to the text and field wx GUI elements."""
+
+    tooltip_button = None
+    """The separate tooltip string to add to the button wx GUI element."""
 
 
     def __init__(self, parent, box):
@@ -100,7 +103,8 @@
         if self.tooltip:
             label.SetToolTipString(self.tooltip)
             self.field.SetToolTipString(self.tooltip)
-            self.button.SetToolTipString(self.tooltip)
+        if self.tooltip_button:
+            self.button.SetToolTipString(self.tooltip_button)
 
         # Add the contents to the main box.
         box.Add(sizer, 0, wx.ALL|wx.EXPAND, 0)

Modified: branches/relax_disp/gui/analyses/elements/text_element.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/gui/analyses/elements/text_element.py?rev=19536&r1=19535&r2=19536&view=diff
==============================================================================
--- branches/relax_disp/gui/analyses/elements/text_element.py (original)
+++ branches/relax_disp/gui/analyses/elements/text_element.py Sun Apr 21 
15:29:07 2013
@@ -39,42 +39,46 @@
     This consists of three elements:  wx.StaticText, wx.TextCtrl, and 
wx.Button.
     """
 
-    def __init__(self, box, parent, text="", default="", tooltip=None, 
button_text=" Change", control=wx.TextCtrl, icon=icon_16x16.open, fn=None, 
editable=True, button=False, width_text=200, width_button=80, spacer=0):
+    def __init__(self, box, parent, text="", default="", tooltip=None, 
tooltip_button=None, button_text=" Change", control=wx.TextCtrl, 
icon=icon_16x16.open, fn=None, editable=True, button=False, width_text=200, 
width_button=80, spacer=0):
         """Create a text selection element for the frame.
 
         This consists of a horizontal layout with a static text element, a 
text control, and an optional button.
 
-        @param box:             The box element to pack the structure file 
selection GUI element into.
-        @type box:              wx.BoxSizer instance
-        @param parent:          The parent GUI element.
-        @type parent:           wx object
-        @keyword text:          The static text.
-        @type text:             str
-        @keyword default:       The default text of the control.
-        @type default:          str
-        @keyword tooltip:       The tooltip which appears on hovering over 
the text or input field.
-        @type tooltip:          str
-        @keyword button_text:   The text to display on the button.
-        @type button_text:      str
-        @keyword control:       The control class to use.
-        @type control:          wx.TextCtrl derived class
-        @keyword icon:          The path of the icon to use for the button.
-        @type icon:             str
-        @keyword fn:            The function or method to execute when 
clicking on the button.  If this is a string, then an equivalent function 
will be searched for in the control object.
-        @type fn:               func or str
-        @keyword editable:      A flag specifying if the control is editable 
or not.
-        @type editable:         bool
-        @keyword button:        A flag which if True will cause a button to 
appear.
-        @type button:           bool
-        @keyword width_text:    The width of the text element.
-        @type width_text:       int
-        @keyword width_button:  The width of the button.
-        @type width_button:     int
-        @keyword spacer:        The horizontal spacing between the elements.
-        @type spacer:           int
+        @param box:                 The box element to pack the structure 
file selection GUI element into.
+        @type box:                  wx.BoxSizer instance
+        @param parent:              The parent GUI element.
+        @type parent:               wx object
+        @keyword text:              The static text.
+        @type text:                 str
+        @keyword default:           The default text of the control.
+        @type default:              str
+        @keyword tooltip:           The tooltip which appears on hovering 
over the text or input field.
+        @type tooltip:              str
+        @keyword tooltip_button:    The separate tooltip for the button.
+        @type tooltip_button:       str
+        @keyword button_text:       The text to display on the button.
+        @type button_text:          str
+        @keyword control:           The control class to use.
+        @type control:              wx.TextCtrl derived class
+        @keyword icon:              The path of the icon to use for the 
button.
+        @type icon:                 str
+        @keyword fn:                The function or method to execute when 
clicking on the button.  If this is a string, then an equivalent function 
will be searched for in the control object.
+        @type fn:                   func or str
+        @keyword editable:          A flag specifying if the control is 
editable or not.
+        @type editable:             bool
+        @keyword button:            A flag which if True will cause a button 
to appear.
+        @type button:               bool
+        @keyword width_text:        The width of the text element.
+        @type width_text:           int
+        @keyword width_button:      The width of the button.
+        @type width_button:         int
+        @keyword spacer:            The horizontal spacing between the 
elements.
+        @type spacer:               int
         """
 
         # Horizontal packing for this element.
+        print
+        print text
         sizer = wx.BoxSizer(wx.HORIZONTAL)
 
         # The label.
@@ -129,8 +133,14 @@
         if tooltip:
             self.label.SetToolTipString(tooltip)
             self.field.SetToolTipString(tooltip)
-            if button:
-                self.button.SetToolTipString(tooltip)
+        if button and tooltip_button:
+            print "hello"
+            self.button.SetToolTipString(tooltip_button)
+        else:
+            print "no?"
+            print button
+            print tooltip
+            print tooltip_button
 
 
     def Enable(self, enable=True):




Related Messages


Powered by MHonArc, Updated Sun Apr 21 16:00:02 2013