mailr14737 - /1.3/gui/relax_gui.py


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

Header


Content

Posted by edward on September 21, 2011 - 17:22:
Author: bugman
Date: Wed Sep 21 17:22:51 2011
New Revision: 14737

URL: http://svn.gna.org/viewcvs/relax?rev=14737&view=rev
Log:
Bug fix for the toolbar and status bar - they were both being assigned to 
self.bar!!


Modified:
    1.3/gui/relax_gui.py

Modified: 1.3/gui/relax_gui.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/relax_gui.py?rev=14737&r1=14736&r2=14737&view=diff
==============================================================================
--- 1.3/gui/relax_gui.py (original)
+++ 1.3/gui/relax_gui.py Wed Sep 21 17:22:51 2011
@@ -133,10 +133,10 @@
         self.SetTitle("relax " + version)
 
         # Set up the status bar.
-        self.bar = self.CreateStatusBar(3, 0)
-        self.bar.SetStatusWidths([-4, -1, -2])
-        self.bar.SetStatusText("(C) 2001-2011 the relax development team", 0)
-        self.bar.SetStatusText("Current data pipe:", 1)
+        self.status_bar = self.CreateStatusBar(3, 0)
+        self.status_bar.SetStatusWidths([-4, -1, -2])
+        self.status_bar.SetStatusText("(C) 2001-2011 the relax development 
team", 0)
+        self.status_bar.SetStatusText("Current data pipe:", 1)
         self.update_status_bar()
 
         # Add the start screen.
@@ -637,66 +637,66 @@
         """Create the toolbar."""
 
         # Init.
-        self.bar = self.CreateToolBar(wx.TB_HORIZONTAL|wx.TB_FLAT)
+        self.toolbar = self.CreateToolBar(wx.TB_HORIZONTAL|wx.TB_FLAT)
 
         # The new analysis button.
         self.TB_FILE_NEW = wx.NewId()
-        self.bar.AddLabelTool(self.TB_FILE_NEW, "New analysis", 
wx.Bitmap(paths.icon_22x22.new, wx.BITMAP_TYPE_ANY), shortHelp="New analysis")
+        self.toolbar.AddLabelTool(self.TB_FILE_NEW, "New analysis", 
wx.Bitmap(paths.icon_22x22.new, wx.BITMAP_TYPE_ANY), shortHelp="New analysis")
         self.Bind(wx.EVT_TOOL, self.analysis.menu_new, id=self.TB_FILE_NEW)
 
         # The close analysis button.
         self.TB_FILE_CLOSE = wx.NewId()
-        self.bar.AddLabelTool(self.TB_FILE_CLOSE, "Close analysis", 
wx.Bitmap(paths.icon_22x22.document_close, wx.BITMAP_TYPE_ANY), 
shortHelp="Close analysis")
+        self.toolbar.AddLabelTool(self.TB_FILE_CLOSE, "Close analysis", 
wx.Bitmap(paths.icon_22x22.document_close, wx.BITMAP_TYPE_ANY), 
shortHelp="Close analysis")
         self.Bind(wx.EVT_TOOL, self.analysis.menu_close, 
id=self.TB_FILE_CLOSE)
 
         # The close all analyses button.
         self.TB_FILE_CLOSE_ALL = wx.NewId()
-        self.bar.AddLabelTool(self.TB_FILE_CLOSE_ALL, "Close all analyses", 
wx.Bitmap(paths.icon_22x22.dialog_close, wx.BITMAP_TYPE_ANY), 
shortHelp="Close all analyses")
+        self.toolbar.AddLabelTool(self.TB_FILE_CLOSE_ALL, "Close all 
analyses", wx.Bitmap(paths.icon_22x22.dialog_close, wx.BITMAP_TYPE_ANY), 
shortHelp="Close all analyses")
         self.Bind(wx.EVT_TOOL, self.analysis.menu_close_all, 
id=self.TB_FILE_CLOSE_ALL)
 
         # A separator.
-        self.bar.AddSeparator()
+        self.toolbar.AddSeparator()
 
         # The open state button.
         self.TB_FILE_OPEN = wx.NewId()
-        self.bar.AddLabelTool(self.TB_FILE_OPEN, "Open relax state", 
wx.Bitmap(paths.icon_22x22.document_open, wx.BITMAP_TYPE_ANY), 
shortHelp="Open relax state")
+        self.toolbar.AddLabelTool(self.TB_FILE_OPEN, "Open relax state", 
wx.Bitmap(paths.icon_22x22.document_open, wx.BITMAP_TYPE_ANY), 
shortHelp="Open relax state")
         self.Bind(wx.EVT_TOOL, self.state_load, id=self.TB_FILE_OPEN)
 
         # The save state button.
         self.TB_FILE_SAVE = wx.NewId()
-        self.bar.AddLabelTool(self.TB_FILE_SAVE, "Save relax state", 
wx.Bitmap(paths.icon_22x22.document_save, wx.BITMAP_TYPE_ANY), 
shortHelp="Save relax state")
+        self.toolbar.AddLabelTool(self.TB_FILE_SAVE, "Save relax state", 
wx.Bitmap(paths.icon_22x22.document_save, wx.BITMAP_TYPE_ANY), 
shortHelp="Save relax state")
         self.Bind(wx.EVT_TOOL, self.action_state_save, id=self.TB_FILE_SAVE)
 
         # The save as button.
         self.TB_FILE_SAVE_AS = wx.NewId()
-        self.bar.AddLabelTool(self.TB_FILE_SAVE_AS, "Save as", 
wx.Bitmap(paths.icon_22x22.document_save_as, wx.BITMAP_TYPE_ANY), 
shortHelp="Save as")
+        self.toolbar.AddLabelTool(self.TB_FILE_SAVE_AS, "Save as", 
wx.Bitmap(paths.icon_22x22.document_save_as, wx.BITMAP_TYPE_ANY), 
shortHelp="Save as")
         self.Bind(wx.EVT_TOOL, self.action_state_save_as, 
id=self.TB_FILE_SAVE_AS)
 
         # A separator.
-        self.bar.AddSeparator()
+        self.toolbar.AddSeparator()
 
         # The relax controller button.
         self.TB_VIEW_CONTROLLER = wx.NewId()
-        self.bar.AddLabelTool(self.TB_VIEW_CONTROLLER, "Controller", 
wx.Bitmap(paths.icon_22x22.preferences_system_performance, 
wx.BITMAP_TYPE_ANY), shortHelp="relax controller")
+        self.toolbar.AddLabelTool(self.TB_VIEW_CONTROLLER, "Controller", 
wx.Bitmap(paths.icon_22x22.preferences_system_performance, 
wx.BITMAP_TYPE_ANY), shortHelp="relax controller")
         self.Bind(wx.EVT_TOOL, self.show_controller, 
id=self.TB_VIEW_CONTROLLER)
 
         # The spin viewer button.
         self.TB_VIEW_SPIN_VIEW = wx.NewId()
-        self.bar.AddLabelTool(self.TB_VIEW_SPIN_VIEW, "Spin viewer", 
wx.Bitmap(paths.icon_22x22.spin, wx.BITMAP_TYPE_ANY), shortHelp="Spin viewer 
window")
+        self.toolbar.AddLabelTool(self.TB_VIEW_SPIN_VIEW, "Spin viewer", 
wx.Bitmap(paths.icon_22x22.spin, wx.BITMAP_TYPE_ANY), shortHelp="Spin viewer 
window")
         self.Bind(wx.EVT_TOOL, self.show_tree, id=self.TB_VIEW_SPIN_VIEW)
 
         # The results viewer button.
         self.TB_VIEW_RESULTS = wx.NewId()
-        self.bar.AddLabelTool(self.TB_VIEW_RESULTS, "Results viewer", 
wx.Bitmap(paths.icon_22x22.view_statistics, wx.BITMAP_TYPE_ANY), 
shortHelp="Results viewer window")
+        self.toolbar.AddLabelTool(self.TB_VIEW_RESULTS, "Results viewer", 
wx.Bitmap(paths.icon_22x22.view_statistics, wx.BITMAP_TYPE_ANY), 
shortHelp="Results viewer window")
         self.Bind(wx.EVT_TOOL, self.show_results_viewer, 
id=self.TB_VIEW_RESULTS)
 
         # The data pipe editor button.
         self.TB_VIEW_PIPE_EDIT = wx.NewId()
-        self.bar.AddLabelTool(self.TB_VIEW_PIPE_EDIT, "Data pipe editor", 
wx.Bitmap(paths.icon_22x22.pipe, wx.BITMAP_TYPE_ANY), shortHelp="Data pipe 
editor")
+        self.toolbar.AddLabelTool(self.TB_VIEW_PIPE_EDIT, "Data pipe 
editor", wx.Bitmap(paths.icon_22x22.pipe, wx.BITMAP_TYPE_ANY), 
shortHelp="Data pipe editor")
         self.Bind(wx.EVT_TOOL, self.show_pipe_editor, 
id=self.TB_VIEW_PIPE_EDIT)
 
         # Build the toolbar.
-        self.bar.Realize()
+        self.toolbar.Realize()
 
 
     def update_status_bar(self):
@@ -710,4 +710,4 @@
             pipe = ''
 
         # Set the status.
-        wx.CallAfter(self.bar.SetStatusText, pipe, 2)
+        wx.CallAfter(self.status_bar.SetStatusText, pipe, 2)




Related Messages


Powered by MHonArc, Updated Wed Sep 21 17:40:02 2011