Changeset 8989

Show
Ignore:
Timestamp:
07/23/08 18:03:16
Author:
jblum
Message:

changed the file extension: .grc

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • grc/trunk/notes/todo.txt

    r8986 r8989  
    1414-log slider gui control 
    1515-recursive/nested categories 
     16-internal variables (dont show up as params) 
    1617 
    1718############ Maybe: #################### 
     
    2122 
    2223############ Problems: #################### 
    23 -catch error on open non-existant files 
    2424 
    2525############ Suggestions: #################### 
  • grc/trunk/src/grc/Constants.py

    r8985 r8989  
    139139 
    140140##The default file extension for flow graphs. 
    141 FLOW_GRAPH_FILE_EXTENSION = '.grc.xml
     141FLOW_GRAPH_FILE_EXTENSION = '.grc
    142142 
    143143##The default file extension for saving flow graph snap shots. 
  • grc/trunk/src/grc/Messages.py

    r8237 r8989  
    2424import traceback 
    2525 
    26 ##      A list of functions that can receive a message.         
     26##      A list of functions that can receive a message. 
    2727MESSENGERS_LIST = list() 
    2828 
     
    3333        """ 
    3434        MESSENGERS_LIST.append(messenger) 
    35          
     35 
    3636def send(message): 
    3737        """! 
     
    4040        """ 
    4141        for messenger in MESSENGERS_LIST: messenger(message) 
    42          
     42 
    4343########################################################################### 
    4444#       Special functions for specific program functionalities 
     
    4646def send_init(): 
    4747        send("""<<< Welcome to GRC %s >>>\n"""%VERSION) 
    48                                          
     48 
    4949def send_page_switch(file_path): 
    5050        send('\nShowing: "%s"\n'%file_path) 
    5151 
    52 #################       functions for loading flow graphs       ########################################                                        
     52#################       functions for loading flow graphs       ######################################## 
    5353def send_start_load(file_path): 
    5454        send('\nLoading: "%s"'%file_path + '\n') 
    55                                                          
     55 
    5656def send_error_load(error): 
    5757        send('>>> Error: %s\n'%error) 
     
    6060def send_end_load(): 
    6161        send(">>> Done\n") 
    62          
     62 
    6363def send_fail_load(error): 
    6464        send('Parser Error: %s\n'%error) 
    65         send(">>> Failue\n")            
     65        send(">>> Failue\n") 
    6666        traceback.print_exc() 
    6767 
    68 #################       functions for generating flow graphs    ########################################        
     68#################       functions for generating flow graphs    ######################################## 
    6969def send_start_gen(file_path): 
    7070        send('\nGenerating: "%s"'%file_path + '\n') 
     
    7272def send_fail_gen(error): 
    7373        send('Generate Error: %s\n'%error) 
    74         send(">>> Failue\n")            
     74        send(">>> Failue\n") 
    7575        traceback.print_exc() 
    7676 
    77 #################       functions for executing flow graphs     ########################################        
     77#################       functions for executing flow graphs     ######################################## 
    7878def send_start_exec(file_path): 
    7979        send('\nExecuting: "%s"'%file_path + '\n') 
     
    8484def send_end_exec(): 
    8585        send("\n>>> Done\n") 
    86          
    87 #################       functions for saving flow graphs        ########################################                
     86 
     87#################       functions for saving flow graphs        ######################################## 
    8888def send_fail_save(file_path): 
    8989        send('>>> Error: Cannot save: %s\n'%file_path) 
    90                                          
    91 #################       functions for connections       ########################################                                        
     90 
     91#################       functions for connections       ######################################## 
    9292def send_fail_connection(): 
    93         send('>>> Warning: A connection can only be created between a source and an unconnected sink.\n')                                       
     93        send('>>> Warning: A connection can only be created between a source and an unconnected sink.\n') 
    9494 
    9595#################       functions for preferences       ######################################## 
    9696def send_fail_load_preferences(): 
    9797        send('>>> Error: Cannot load preferences file: "%s"\n'%PREFERENCES_FILE_PATH) 
    98          
     98 
    9999def send_fail_save_preferences(): 
    100100        send('>>> Error: Cannot save preferences file: "%s"\n'%PREFERENCES_FILE_PATH) 
  • grc/trunk/src/grc/gui/FileDialogs.py

    r8985 r8989  
    3636FLOW_GRAPH_FILE_FILTER.set_name('GRC Files') 
    3737FLOW_GRAPH_FILE_FILTER.add_pattern('*'+FLOW_GRAPH_FILE_EXTENSION) 
     38FLOW_GRAPH_FILE_FILTER.add_pattern('*.xml') #TEMP 
    3839 
    3940##the filter for image files 
  • grc/trunk/src/grc/gui/MainWindow.py

    r8983 r8989  
    251251                #set tab titles 
    252252                for page in self._get_pages(): 
    253                         title = os.path.basename(page.get_file_path()).replace(FLOW_GRAPH_FILE_EXTENSION, '') 
     253                        title = os.path.basename(page.get_file_path()) 
     254                        #strip file extension #TEMP 
     255                        if title.endswith('.xml'):  
     256                                title = title[0:-len('.xml')] 
     257                        #strip file extension 
     258                        if title.endswith(FLOW_GRAPH_FILE_EXTENSION):  
     259                                title = title[0:-len(FLOW_GRAPH_FILE_EXTENSION)] 
    254260                        page.set_text(''.join(( 
    255261                                                (title or NEW_FLOGRAPH_TITLE),