mailr16744 - /branches/uf_redesign/gui/components/citations.py


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

Header


Content

Posted by edward on June 08, 2012 - 09:08:
Author: bugman
Date: Fri Jun  8 09:08:07 2012
New Revision: 16744

URL: http://svn.gna.org/viewcvs/relax?rev=16744&view=rev
Log:
Created a GUI element for listing and setting the citations relevant for the 
analysis.

This will be used in the BMRB export window.


Added:
    branches/uf_redesign/gui/components/citations.py
      - copied, changed from r16742, 
branches/uf_redesign/gui/components/software.py

Copied: branches/uf_redesign/gui/components/citations.py (from r16742, 
branches/uf_redesign/gui/components/software.py)
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/gui/components/citations.py?p2=branches/uf_redesign/gui/components/citations.py&p1=branches/uf_redesign/gui/components/software.py&r1=16742&r2=16744&rev=16744&view=diff
==============================================================================
--- branches/uf_redesign/gui/components/software.py (original)
+++ branches/uf_redesign/gui/components/citations.py Fri Jun  8 09:08:07 2012
@@ -22,7 +22,7 @@
 
###############################################################################
 
 # Module docstring.
-"""Module containing the software GUI element for listing the software used 
in the analysis."""
+"""Module containing the citations GUI element for listing the citations 
relevant for the analysis."""
 
 # relax module imports.
 from graphics import fetch_icon
@@ -33,42 +33,31 @@
 from gui.uf_objects import Uf_storage; uf_store = Uf_storage()
 
 
-class Software(Base_list):
-    """The GUI element for listing the software used in the analysis."""
+class Citations(Base_list):
+    """The GUI element for listing the citations relevant for the 
analysis."""
 
-    def action_bmrb_software(self, event):
-        """Launch the bmrb.software user function.
+    def action_bmrb_citation(self, event):
+        """Launch the bmrb.citation user function.
 
         @param event:   The wx event.
         @type event:    wx event
         """
 
         # Launch the dialog.
-        uf_store['bmrb.software'](wx_parent=self.parent)
-
-
-    def action_bmrb_software_select(self, event):
-        """Launch the bmrb.software_select user function.
-
-        @param event:   The wx event.
-        @type event:    wx event
-        """
-
-        # Launch the dialog.
-        uf_store['bmrb.software_select'](wx_parent=self.parent)
+        uf_store['bmrb.citation'](wx_parent=self.parent)
 
 
     def setup(self):
         """Override the base variables."""
 
         # GUI variables.
-        self.title = "Software used"
-        self.observer_base_name = "software"
+        self.title = "Citations"
+        self.observer_base_name = "citations"
         self.button_placement = 'bottom'
 
         # The column titles.
         self.columns = [
-            "Program name"
+            "Citation ID"
         ]
 
         # Button set up.
@@ -77,14 +66,8 @@
                 'object': 'button_add',
                 'label': ' Add',
                 'icon': fetch_icon('oxygen.actions.list-add-relax-blue', 
"22x22"),
-                'method': self.action_bmrb_software,
-                'tooltip': "Specify the software used in the analysis."
-            }, {
-                'object': 'button_select',
-                'label': ' Select',
-                'icon': fetch_icon('oxygen.actions.edit-select', "22x22"),
-                'method': self.action_bmrb_software_select,
-                'tooltip': "Select the software used in the analysis."
+                'method': self.action_bmrb_citation,
+                'tooltip': "Specify a citation to be added the BMRB data 
file."
             }
         ]
 
@@ -94,8 +77,8 @@
 
         # Expand the number of rows to match the number of entries, and add 
the data.
         n = 0
-        if hasattr(cdp, 'exp_info') and hasattr(cdp.exp_info, 'software'):
-            n = len(cdp.exp_info.software)
+        if hasattr(cdp, 'exp_info') and hasattr(cdp.exp_info, 'citations'):
+            n = len(cdp.exp_info.citations)
             for i in range(n):
-                # Set the software name.
-                self.element.InsertStringItem(i, 
str_to_gui(cdp.exp_info.software[i].name))
+                # Set the citation ID.
+                self.element.InsertStringItem(i, 
str_to_gui(cdp.exp_info.citations[i].cite_id))




Related Messages


Powered by MHonArc, Updated Fri Jun 08 09:20:01 2012