Changeset 3450e7f in sasview


Ignore:
Timestamp:
Mar 30, 2011 3:33:33 PM (14 years ago)
Author:
Gervaise Alina <gervyh@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
e030625
Parents:
1c95d15
Message:

make all derivative of guiframe being able to load from command line

File:
1 edited

Legend:

Unmodified
Added
Removed
  • guiframe/gui_manager.py

    r1c95d15 r3450e7f  
    217217            self.load_from_cmd(self._input_file) 
    218218        except: 
    219             raise 
    220219            msg = "%s Cannot load file %s\n" %(str(APPLICATION_NAME),  
    221220                                             str(self._input_file)) 
     
    616615        application_name = 'No Selected Application' 
    617616        panel_name = 'No Panel on Focus' 
    618         if self._toolbar is not None: 
    619             self._toolbar.update_toolbar(self.panel_on_focus) 
     617        if self._toolbar is  None: 
     618            return 
     619        self._toolbar.update_toolbar(self.panel_on_focus) 
    620620        if self._current_perspective is not None: 
    621621            application_name = self._current_perspective.sub_menu 
     
    19891989            if os.path.isfile(cmd): 
    19901990                basename  = os.path.basename(cmd) 
    1991                 if basename in ['sansview.py', 'sansview.exe']: 
     1991                app_py = str(APPLICATION_NAME).lower() + '.py' 
     1992                app_exe = str(APPLICATION_NAME).lower() + '.exe' 
     1993                if basename.lower() in [app_py, app_exe]: 
    19921994                    input_file = sys.argv[1] 
    19931995        if input_file is None: 
     
    19951997        if self.frame is not None: 
    19961998            self.frame.set_input_file(input_file=input_file) 
    1997           
    1998              
     1999           
    19992000    def set_manager(self, manager): 
    20002001        """ 
Note: See TracChangeset for help on using the changeset viewer.