Index: src/sas/guiframe/plugin_base.py
===================================================================
--- src/sas/guiframe/plugin_base.py	(revision 794922220f2fb3b23dd08c648aabf87b4850596c)
+++ src/sas/guiframe/plugin_base.py	(revision 0fa825ca15a5d51759fc3bbcd6281549c01117bf)
@@ -1,6 +1,10 @@
+"""
+Defines the interface for a Plugin class that can be used by the gui_manager.
+"""
+
 ################################################################################
 #This software was developed by the University of Tennessee as part of the
 #Distributed Data Analysis of Neutron Scattering Experiments (DANSE)
-#project funded by the US National Science Foundation. 
+#project funded by the US National Science Foundation.
 #
 #See the license text in license.txt
@@ -8,10 +12,10 @@
 #copyright 2008, University of Tennessee
 ################################################################################
- 
+
 class PluginBase:
     """
     This class defines the interface for a Plugin class
     that can be used by the gui_manager.
-    
+
     Plug-ins should be placed in a sub-directory called "perspectives".
     For example, a plug-in called Foo should be place in "perspectives/Foo".
@@ -19,15 +23,15 @@
 
     1. perspectives/Foo/__init__.py contains two lines: ::
-        
+
         PLUGIN_ID = "Foo plug-in 1.0"
         from Foo import *
-            
+
     2. perspectives/Foo/Foo.py contains the definition of the Plugin
        class for the Foo plug-in. The interface of that Plugin class
        should follow the interface of the class you are looking at.
-        
+
     See dummyapp.py for a plugin example.
     """
-    
+
     def __init__(self, name="Test_plugin", standalone=True):
         """
@@ -37,5 +41,5 @@
         self._always_active = False
         ## Plug-in name. It will appear on the application menu.
-        self.sub_menu = name     
+        self.sub_menu = name
         #standalone flag
         self.standalone = standalone
@@ -44,5 +48,5 @@
         self.frame = None
         #plugin state reader
-        self.state_reader = None 
+        self.state_reader = None
         self._extensions = ''
         ## List of panels that you would like to open in AUI windows
@@ -55,5 +59,5 @@
         self.id = -1
         self.batch_capable = self.get_batch_capable()
-    
+
     def get_batch_capable(self):
         """
@@ -61,14 +65,15 @@
         """
         return False
-         
+
     def add_color(self, color, id):
         """
         Adds color to a plugin
         """
-        
+
     def clear_panel(self):
         """
         clear all related panels
         """
+
     def get_extensions(self):
         """
@@ -76,5 +81,5 @@
         """
         return self.state_reader, self._extensions
-    
+
     def can_load_data(self):
         """
@@ -82,5 +87,5 @@
         """
         return False
-    
+
     def use_data(self):
         """
@@ -88,10 +93,10 @@
         """
         return True
-    
+
     def is_in_use(self, data_id):
         """
         get a  data id a list of data name if data data is
          currently used by the plugin and the name of the plugin
-        
+
         data_name = 'None'
         in_use = False
@@ -99,10 +104,10 @@
         """
         return []
-    
+
     def delete_data(self, data_id):
         """
         Delete all references of data which id are in data_list. 
         """
-        
+
     def load_data(self, event):
         """
@@ -110,5 +115,5 @@
         """
         raise NotImplementedError
- 
+
     def load_folder(self, event):
         """
@@ -116,10 +121,11 @@
         """
         raise NotImplementedError
-    
+
     def set_is_active(self, active=False):
         """
+        Set if the perspective is always active
         """
         self._always_active = active
-        
+
     def is_always_active(self):
         """
@@ -128,5 +134,5 @@
         """
         return self._always_active
-    
+
     def populate_file_menu(self):
         """
@@ -134,17 +140,17 @@
         """
         return []
-    
+
     def populate_menu(self, parent):
         """
         Create and return the list of application menu
         items for the plug-in. 
-        
+
         :param parent: parent window
-        
+
         :return: plug-in menu
-        
-        """
-        return []
-    
+
+        """
+        return []
+
     def get_frame(self):
         """
@@ -160,26 +166,25 @@
             self.frame.EnableCloseButton(False)
             self.frame.Show(False)
-    
+
     def get_panels(self, parent):
         """
         Create and return the list of wx.Panels for your plug-in.
         Define the plug-in perspective.
-        
+
         Panels should inherit from DefaultPanel defined below,
         or should present the same interface. They must define
         "window_caption" and "window_name".
-        
+
         :param parent: parent window
-        
+
         :return: list of panels
-        
+
         """
         ## Save a reference to the parent
         self.parent = parent
-        
+
         # Return the list of panels
         return []
-    
- 
+
     def get_tools(self):
         """
@@ -187,30 +192,28 @@
         """
         return []
-        
-    
+
     def get_context_menu(self, plotpanel=None):
         """
         This method is optional.
-    
-        When the context menu of a plot is rendered, the 
-        get_context_menu method will be called to give you a 
+
+        When the context menu of a plot is rendered, the
+        get_context_menu method will be called to give you a
         chance to add a menu item to the context menu.
-        
+
         A ref to a plotpanel object is passed so that you can
         investigate the plot content and decide whether you
-        need to add items to the context menu.  
-        
+        need to add items to the context menu.
+
         This method returns a list of menu items.
-        Each item is itself a list defining the text to 
+        Each item is itself a list defining the text to
         appear in the menu, a tool-tip help text, and a
         call-back method.
-        
+
         :param graph: the Graph object to which we attach the context menu
-        
+
         :return: a list of menu items with call-back function
-        
-        """
-        return []
-    
+        """
+        return []
+
     def get_perspective(self):
         """
@@ -218,5 +221,5 @@
         """
         return self.perspective
-    
+
     def on_perspective(self, event=None):
         """
@@ -224,10 +227,8 @@
         We notify the parent window that the perspective
         has changed.
-        
+
         :param event: menu event
-        
         """
         old_frame = None
-        tool_height = self.parent.get_toolbar_height()
         old_persp = self.parent.get_current_perspective()
         if old_persp != None:
@@ -236,13 +237,12 @@
         self.parent.set_current_perspective(self)
         self.parent.set_perspective(self.perspective)
-        
+
         if self.frame != None:
             if old_frame != None:
                 pos_x, pos_y = old_frame.GetPositionTuple()
-                self.frame.SetPosition((pos_x, pos_y - tool_height))
+                self.frame.SetPosition((pos_x, pos_y))
             if not self.frame.IsShown():
                 self.frame.Show(True)
-        
-        
+
     def set_batch_selection(self, flag):
         """
@@ -250,6 +250,6 @@
         """
         self.batch_on = flag
-        self.on_batch_selection(self.batch_on)    
-    
+        self.on_batch_selection(self.batch_on)
+
     def on_batch_selection(self, flag):
         """
@@ -262,10 +262,10 @@
         """
         pass
-    
+
     def set_default_perspective(self):
         """
        Call back method that True to notify the parent that the current plug-in
        can be set as default  perspective.
-       when returning False, the plug-in is not candidate for an automatic 
+       when returning False, the plug-in is not candidate for an automatic
        default perspective setting
         """
@@ -273,25 +273,26 @@
             return True
         return False
-    
+
     def set_state(self, state=None, datainfo=None):    
         """
         update state
         """
+
     def set_data(self, data_list=None):
         """
         receive a list of data and use it in the current perspective
-       
-        """
+        """
+
     def set_theory(self, theory_list=None):
         """
-        :param theory_list: list of information 
+        :param theory_list: list of information
             related to available theory state
         """
         msg = "%s plugin: does not support import theory" % str(self.sub_menu)
-        raise ValueError, msg 
-    
+        raise ValueError, msg
+
     def on_set_state_helper(self, event):
         """
         update state
         """
-    
+
