Changeset 8989
- Timestamp:
- 07/23/08 18:03:16
- Files:
-
- grc/trunk/examples/audio/dial_tone.grc (moved) (moved from grc/trunk/examples/audio/dial_tone.grc.xml)
- grc/trunk/examples/simple/ber_simulation.grc (moved) (moved from grc/trunk/examples/simple/ber_simulation.grc.xml)
- grc/trunk/examples/usrp/usrp_two_tone_loopback.grc (moved) (moved from grc/trunk/examples/usrp/usrp_two_tone_loopback.grc.xml)
- grc/trunk/examples/usrp/usrp_wbfm_receive.grc (moved) (moved from grc/trunk/examples/usrp/usrp_wbfm_receive.grc.xml)
- grc/trunk/examples/xmlrpc/xmlrpc_client.grc (moved) (moved from grc/trunk/examples/xmlrpc/xmlrpc_client.grc.xml)
- grc/trunk/examples/xmlrpc/xmlrpc_server.grc (moved) (moved from grc/trunk/examples/xmlrpc/xmlrpc_server.grc.xml)
- grc/trunk/notes/todo.txt (modified) (2 diffs)
- grc/trunk/src/grc/Constants.py (modified) (1 diff)
- grc/trunk/src/grc/Messages.py (modified) (7 diffs)
- grc/trunk/src/grc/gui/FileDialogs.py (modified) (1 diff)
- grc/trunk/src/grc/gui/MainWindow.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
grc/trunk/notes/todo.txt
r8986 r8989 14 14 -log slider gui control 15 15 -recursive/nested categories 16 -internal variables (dont show up as params) 16 17 17 18 ############ Maybe: #################### … … 21 22 22 23 ############ Problems: #################### 23 -catch error on open non-existant files24 24 25 25 ############ Suggestions: #################### grc/trunk/src/grc/Constants.py
r8985 r8989 139 139 140 140 ##The default file extension for flow graphs. 141 FLOW_GRAPH_FILE_EXTENSION = '.grc .xml'141 FLOW_GRAPH_FILE_EXTENSION = '.grc' 142 142 143 143 ##The default file extension for saving flow graph snap shots. grc/trunk/src/grc/Messages.py
r8237 r8989 24 24 import traceback 25 25 26 ## A list of functions that can receive a message. 26 ## A list of functions that can receive a message. 27 27 MESSENGERS_LIST = list() 28 28 … … 33 33 """ 34 34 MESSENGERS_LIST.append(messenger) 35 35 36 36 def send(message): 37 37 """! … … 40 40 """ 41 41 for messenger in MESSENGERS_LIST: messenger(message) 42 42 43 43 ########################################################################### 44 44 # Special functions for specific program functionalities … … 46 46 def send_init(): 47 47 send("""<<< Welcome to GRC %s >>>\n"""%VERSION) 48 48 49 49 def send_page_switch(file_path): 50 50 send('\nShowing: "%s"\n'%file_path) 51 51 52 ################# functions for loading flow graphs ######################################## 52 ################# functions for loading flow graphs ######################################## 53 53 def send_start_load(file_path): 54 54 send('\nLoading: "%s"'%file_path + '\n') 55 55 56 56 def send_error_load(error): 57 57 send('>>> Error: %s\n'%error) … … 60 60 def send_end_load(): 61 61 send(">>> Done\n") 62 62 63 63 def send_fail_load(error): 64 64 send('Parser Error: %s\n'%error) 65 send(">>> Failue\n") 65 send(">>> Failue\n") 66 66 traceback.print_exc() 67 67 68 ################# functions for generating flow graphs ######################################## 68 ################# functions for generating flow graphs ######################################## 69 69 def send_start_gen(file_path): 70 70 send('\nGenerating: "%s"'%file_path + '\n') … … 72 72 def send_fail_gen(error): 73 73 send('Generate Error: %s\n'%error) 74 send(">>> Failue\n") 74 send(">>> Failue\n") 75 75 traceback.print_exc() 76 76 77 ################# functions for executing flow graphs ######################################## 77 ################# functions for executing flow graphs ######################################## 78 78 def send_start_exec(file_path): 79 79 send('\nExecuting: "%s"'%file_path + '\n') … … 84 84 def send_end_exec(): 85 85 send("\n>>> Done\n") 86 87 ################# functions for saving flow graphs ######################################## 86 87 ################# functions for saving flow graphs ######################################## 88 88 def send_fail_save(file_path): 89 89 send('>>> Error: Cannot save: %s\n'%file_path) 90 91 ################# functions for connections ######################################## 90 91 ################# functions for connections ######################################## 92 92 def 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') 94 94 95 95 ################# functions for preferences ######################################## 96 96 def send_fail_load_preferences(): 97 97 send('>>> Error: Cannot load preferences file: "%s"\n'%PREFERENCES_FILE_PATH) 98 98 99 99 def send_fail_save_preferences(): 100 100 send('>>> Error: Cannot save preferences file: "%s"\n'%PREFERENCES_FILE_PATH) grc/trunk/src/grc/gui/FileDialogs.py
r8985 r8989 36 36 FLOW_GRAPH_FILE_FILTER.set_name('GRC Files') 37 37 FLOW_GRAPH_FILE_FILTER.add_pattern('*'+FLOW_GRAPH_FILE_EXTENSION) 38 FLOW_GRAPH_FILE_FILTER.add_pattern('*.xml') #TEMP 38 39 39 40 ##the filter for image files grc/trunk/src/grc/gui/MainWindow.py
r8983 r8989 251 251 #set tab titles 252 252 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)] 254 260 page.set_text(''.join(( 255 261 (title or NEW_FLOGRAPH_TITLE),
