Changeset c151afc in sasview for sansguiframe


Ignore:
Timestamp:
Apr 20, 2012 10:01:17 AM (12 years ago)
Author:
Jae Cho <jhjcho@…>
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:
41a8cb3
Parents:
9ccb7e1
Message:

fixed misleading warning msg icon

Location:
sansguiframe/src/sans/guiframe
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sansguiframe/src/sans/guiframe/data_processor.py

    r9ccb7e1 rc151afc  
    263263         
    264264        col = event.GetCol() 
     265        row = event.GetRow() 
    265266        # Ignore the index column 
    266         if col < 0: 
     267        if col < 0 or row != -1: 
    267268            return 
    268269        self.selected_cols = [] 
  • sansguiframe/src/sans/guiframe/local_perspectives/data_loader/data_loader.py

    r70ecd530 rc151afc  
    178178        output = {} 
    179179        error_message = "" 
     180        info = "info" 
    180181        for p_file in path: 
    181182            basename  = os.path.basename(p_file) 
     
    200201                    output[data.id] = data 
    201202                message = "Loading Data..." + str(p_file) + "\n" 
    202                 self.load_update(output=output, message=message) 
     203                self.load_update(output=output, message=message, info=info) 
    203204            except: 
    204205                 error = "Error while loading Data: %s\n" % str(p_file) 
     
    209210                 error_message += "When contacting the DANSE team, mention the" 
    210211                 error_message += " following:\n%s" % str(error) 
    211                  self.load_update(output=output, message=error_message) 
     212                 info = "error" 
     213                 self.load_update(output=output, message=error_message,  
     214                                  info=info) 
    212215                 
    213216        message = "Loading Data Complete! " 
    214217        message += log_msg 
     218        if error_message!= "": 
     219            info = 'error' 
    215220        self.load_complete(output=output, error_message=error_message, 
    216                        message=message, path=path) 
     221                       message=message, path=path, info=info) 
    217222             
    218     def load_update(self, output=None, message=""): 
     223    def load_update(self, output=None, message="", info="warning"): 
    219224        """ 
    220225        print update on the status bar 
    221226        """ 
    222227        if message != "": 
    223             wx.PostEvent(self.parent, StatusEvent(status=message, 
    224                                                   type="progress", 
    225                                                    info="warning")) 
    226     def load_complete(self, output, message="", error_message="", path=None): 
     228            wx.PostEvent(self.parent, StatusEvent(status=message, info=info,  
     229                                                  type="progress")) 
     230    def load_complete(self, output, message="", error_message="", path=None,  
     231                      info="warning"): 
    227232        """ 
    228233         post message to  status bar and return list of data 
    229234        """ 
    230         wx.PostEvent(self.parent, StatusEvent(status=message, 
    231                                               info="warning", 
     235        wx.PostEvent(self.parent, StatusEvent(status=message,  
     236                                              info=info, 
    232237                                              type="stop")) 
    233238        if error_message != "": 
Note: See TracChangeset for help on using the changeset viewer.