Changeset 9513

Show
Ignore:
Timestamp:
09/06/08 21:50:35
Author:
jblum
Message:

import and @package cleanup, bug fix with hier lib dir

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/ActionHandler.py

    r9512 r9513  
    171171                """ 
    172172                #print state 
    173                 ############################################################################################## 
     173                ################################################## 
    174174                # Initalize/Quit 
    175                 ############################################################################################## 
     175                ################################################## 
    176176                if state == Actions.APPLICATION_INITIALIZE: 
    177177                        for action in Actions.ACTIONS_LIST: action.set_sensitive(False) #set all actions disabled 
     
    196196                                gtk.main_quit() 
    197197                                exit(0) 
    198                 ############################################################################################## 
     198                ################################################## 
    199199                # Selections 
    200                 ############################################################################################## 
     200                ################################################## 
    201201                elif state == Actions.ELEMENT_SELECT: 
    202202                        self.get_flow_graph().update() 
     
    204204                        self.get_flow_graph().unselect() 
    205205                        self.get_flow_graph().update() 
    206                 ############################################################################################## 
     206                ################################################## 
    207207                # Enable/Disable 
    208                 ############################################################################################## 
     208                ################################################## 
    209209                elif state == Actions.BLOCK_ENABLE: 
    210210                        if self.get_flow_graph().enable_selected(True): 
     
    217217                                self.get_page().get_state_cache().save_new_state(self.get_flow_graph().export_data()) 
    218218                                self.get_page().set_saved(False) 
    219                 ############################################################################################## 
     219                ################################################## 
    220220                # Cut/Copy/Paste 
    221                 ############################################################################################## 
     221                ################################################## 
    222222                elif state == Actions.BLOCK_CUT: 
    223223                        self.handle_states(BLOCK_COPY) 
     
    231231                                self.get_page().get_state_cache().save_new_state(self.get_flow_graph().export_data()) 
    232232                                self.get_page().set_saved(False) 
    233                 ############################################################################################## 
     233                ################################################## 
    234234                # Move/Rotate/Delete/Create 
    235                 ############################################################################################## 
     235                ################################################## 
    236236                elif state == Actions.BLOCK_MOVE: 
    237237                        self.get_page().get_state_cache().save_new_state(self.get_flow_graph().export_data()) 
     
    278278                                self.get_page().get_state_cache().save_new_state(self.get_flow_graph().export_data()) 
    279279                                self.get_page().set_saved(False) 
    280                 ############################################################################################## 
     280                ################################################## 
    281281                # Window stuff 
    282                 ############################################################################################## 
     282                ################################################## 
    283283                elif state == Actions.PREFS_WINDOW_DISPLAY: 
    284284                        PreferencesDialog() 
     
    288288                elif state == Actions.HOTKEYS_WINDOW_DISPLAY: 
    289289                        HotKeysDialog() 
    290                 ############################################################################################## 
     290                ################################################## 
    291291                # Param Modifications 
    292                 ############################################################################################## 
     292                ################################################## 
    293293                elif state == Actions.BLOCK_PARAM_MODIFY: 
    294294                        if self.get_flow_graph().param_modify_selected(): 
     
    296296                                self.get_page().get_state_cache().save_new_state(self.get_flow_graph().export_data()) 
    297297                                self.get_page().set_saved(False) 
    298                 ############################################################################################## 
     298                ################################################## 
    299299                # Undo/Redo 
    300                 ############################################################################################## 
     300                ################################################## 
    301301                elif state == Actions.FLOW_GRAPH_UNDO: 
    302302                        n = self.get_page().get_state_cache().get_prev_state() 
     
    313313                                self.get_flow_graph().update() 
    314314                                self.get_page().set_saved(False) 
    315                 ############################################################################################## 
     315                ################################################## 
    316316                # New/Open/Save/Close 
    317                 ############################################################################################## 
     317                ################################################## 
    318318                elif state == Actions.FLOW_GRAPH_NEW: 
    319319                        self.main_window.new_page() 
     
    347347                                pixbuf.get_from_drawable(pixmap, pixmap.get_colormap(), 0, 0, 0, 0, width, height) 
    348348                                pixbuf.save(file_path, IMAGE_FILE_EXTENSION[1:]) 
    349                 ############################################################################################## 
     349                ################################################## 
    350350                # Gen/Exec/Stop 
    351                 ############################################################################################## 
     351                ################################################## 
    352352                elif state == Actions.FLOW_GRAPH_GEN: 
    353353                        if not self.get_page().get_pid(): 
     
    373373                        pass 
    374374                else: print '!!! State "%s" not handled !!!'%state 
    375                 ############################################################################################## 
     375                ################################################## 
    376376                # Global Actions for all States 
    377                 ############################################################################################## 
     377                ################################################## 
    378378                #update general buttons 
    379379                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  
    1717Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA 
    1818""" 
    19 ##@package grc.gui.MainWindow 
    20 #The main window, containing all windows, tool bars, and menu bars. 
    2119 
    2220from Constants import \ 
  • gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/Colors.py

    r9379 r9513  
    1717Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA 
    1818""" 
    19 ##@package grc.gui.elements.Colors 
    20 #Global Colors for the gui 
    2119 
    2220import pygtk 
  • gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Constants.py.in

    r9378 r9513  
    1717Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA 
    1818""" 
    19 ##@package grc_gnuradio.Constants 
    20 #Global constants for grc gnuradio package 
    21 #@author Josh Blum 
    2219 
    2320import os 
  • gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Generator.py

    r9497 r9513  
    2222from Cheetah.Template import Template 
    2323from utils import expr_utils 
    24 from Constants import * 
     24from Constants import \ 
     25        TOP_BLOCK_FILE_MODE, HIER_BLOCK_FILE_MODE, \ 
     26        HIER_BLOCKS_LIB_DIR, PYEXEC, \ 
     27        FLOW_GRAPH_TEMPLATE 
    2528from utils import convert_hier 
    2629 
     
    3841                if self._generate_options == 'hb': 
    3942                        self._mode = HIER_BLOCK_FILE_MODE 
    40                         dirname = HIER_BLOCKS_LIB_PATH 
     43                        dirname = HIER_BLOCKS_LIB_DIR 
    4144                else: 
    4245                        self._mode = TOP_BLOCK_FILE_MODE 
  • gnuradio/branches/developers/jblum/grc_reorganize/grc/src/utils/converter.py

    r9512 r9513  
    1717Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA 
    1818""" 
    19 ##@package grc.converter 
    20 #convert old flow graph file format to new format 
    2119 
    2220from .. platforms.base.Constants import FLOW_GRAPH_DTD