Changeset 9513
- Timestamp:
- 09/06/08 21:50:35
- Files:
-
- gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/ActionHandler.py (modified) (11 diffs)
- gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/MainWindow.py (modified) (1 diff)
- gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/Colors.py (modified) (1 diff)
- gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Constants.py.in (modified) (1 diff)
- gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Generator.py (modified) (2 diffs)
- gnuradio/branches/developers/jblum/grc_reorganize/grc/src/utils/converter.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/ActionHandler.py
r9512 r9513 171 171 """ 172 172 #print state 173 ################################################## ############################################173 ################################################## 174 174 # Initalize/Quit 175 ################################################## ############################################175 ################################################## 176 176 if state == Actions.APPLICATION_INITIALIZE: 177 177 for action in Actions.ACTIONS_LIST: action.set_sensitive(False) #set all actions disabled … … 196 196 gtk.main_quit() 197 197 exit(0) 198 ################################################## ############################################198 ################################################## 199 199 # Selections 200 ################################################## ############################################200 ################################################## 201 201 elif state == Actions.ELEMENT_SELECT: 202 202 self.get_flow_graph().update() … … 204 204 self.get_flow_graph().unselect() 205 205 self.get_flow_graph().update() 206 ################################################## ############################################206 ################################################## 207 207 # Enable/Disable 208 ################################################## ############################################208 ################################################## 209 209 elif state == Actions.BLOCK_ENABLE: 210 210 if self.get_flow_graph().enable_selected(True): … … 217 217 self.get_page().get_state_cache().save_new_state(self.get_flow_graph().export_data()) 218 218 self.get_page().set_saved(False) 219 ################################################## ############################################219 ################################################## 220 220 # Cut/Copy/Paste 221 ################################################## ############################################221 ################################################## 222 222 elif state == Actions.BLOCK_CUT: 223 223 self.handle_states(BLOCK_COPY) … … 231 231 self.get_page().get_state_cache().save_new_state(self.get_flow_graph().export_data()) 232 232 self.get_page().set_saved(False) 233 ################################################## ############################################233 ################################################## 234 234 # Move/Rotate/Delete/Create 235 ################################################## ############################################235 ################################################## 236 236 elif state == Actions.BLOCK_MOVE: 237 237 self.get_page().get_state_cache().save_new_state(self.get_flow_graph().export_data()) … … 278 278 self.get_page().get_state_cache().save_new_state(self.get_flow_graph().export_data()) 279 279 self.get_page().set_saved(False) 280 ################################################## ############################################280 ################################################## 281 281 # Window stuff 282 ################################################## ############################################282 ################################################## 283 283 elif state == Actions.PREFS_WINDOW_DISPLAY: 284 284 PreferencesDialog() … … 288 288 elif state == Actions.HOTKEYS_WINDOW_DISPLAY: 289 289 HotKeysDialog() 290 ################################################## ############################################290 ################################################## 291 291 # Param Modifications 292 ################################################## ############################################292 ################################################## 293 293 elif state == Actions.BLOCK_PARAM_MODIFY: 294 294 if self.get_flow_graph().param_modify_selected(): … … 296 296 self.get_page().get_state_cache().save_new_state(self.get_flow_graph().export_data()) 297 297 self.get_page().set_saved(False) 298 ################################################## ############################################298 ################################################## 299 299 # Undo/Redo 300 ################################################## ############################################300 ################################################## 301 301 elif state == Actions.FLOW_GRAPH_UNDO: 302 302 n = self.get_page().get_state_cache().get_prev_state() … … 313 313 self.get_flow_graph().update() 314 314 self.get_page().set_saved(False) 315 ################################################## ############################################315 ################################################## 316 316 # New/Open/Save/Close 317 ################################################## ############################################317 ################################################## 318 318 elif state == Actions.FLOW_GRAPH_NEW: 319 319 self.main_window.new_page() … … 347 347 pixbuf.get_from_drawable(pixmap, pixmap.get_colormap(), 0, 0, 0, 0, width, height) 348 348 pixbuf.save(file_path, IMAGE_FILE_EXTENSION[1:]) 349 ################################################## ############################################349 ################################################## 350 350 # Gen/Exec/Stop 351 ################################################## ############################################351 ################################################## 352 352 elif state == Actions.FLOW_GRAPH_GEN: 353 353 if not self.get_page().get_pid(): … … 373 373 pass 374 374 else: print '!!! State "%s" not handled !!!'%state 375 ################################################## ############################################375 ################################################## 376 376 # Global Actions for all States 377 ################################################## ############################################377 ################################################## 378 378 #update general buttons 379 379 Actions.get_action_from_name(Actions.ELEMENT_DELETE).set_sensitive(bool(self.get_flow_graph().get_selected_elements())) gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/MainWindow.py
r9512 r9513 17 17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA 18 18 """ 19 ##@package grc.gui.MainWindow20 #The main window, containing all windows, tool bars, and menu bars.21 19 22 20 from Constants import \ gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/Colors.py
r9379 r9513 17 17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA 18 18 """ 19 ##@package grc.gui.elements.Colors20 #Global Colors for the gui21 19 22 20 import pygtk gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Constants.py.in
r9378 r9513 17 17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA 18 18 """ 19 ##@package grc_gnuradio.Constants20 #Global constants for grc gnuradio package21 #@author Josh Blum22 19 23 20 import os gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Generator.py
r9497 r9513 22 22 from Cheetah.Template import Template 23 23 from utils import expr_utils 24 from Constants import * 24 from Constants import \ 25 TOP_BLOCK_FILE_MODE, HIER_BLOCK_FILE_MODE, \ 26 HIER_BLOCKS_LIB_DIR, PYEXEC, \ 27 FLOW_GRAPH_TEMPLATE 25 28 from utils import convert_hier 26 29 … … 38 41 if self._generate_options == 'hb': 39 42 self._mode = HIER_BLOCK_FILE_MODE 40 dirname = HIER_BLOCKS_LIB_ PATH43 dirname = HIER_BLOCKS_LIB_DIR 41 44 else: 42 45 self._mode = TOP_BLOCK_FILE_MODE gnuradio/branches/developers/jblum/grc_reorganize/grc/src/utils/converter.py
r9512 r9513 17 17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA 18 18 """ 19 ##@package grc.converter20 #convert old flow graph file format to new format21 19 22 20 from .. platforms.base.Constants import FLOW_GRAPH_DTD
