diff options
Diffstat (limited to 'grc/gui/ActionHandler.py')
-rw-r--r-- | grc/gui/ActionHandler.py | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/grc/gui/ActionHandler.py b/grc/gui/ActionHandler.py index 65969e0d6f..1db333fc5a 100644 --- a/grc/gui/ActionHandler.py +++ b/grc/gui/ActionHandler.py @@ -49,7 +49,7 @@ class ActionHandler: ActionHandler constructor. Create the main window, setup the message handler, import the preferences, and connect all of the action handlers. Finally, enter the gtk main loop and block. - + Args: file_paths: a list of flow graph file passed from command line platform: platform module @@ -81,7 +81,7 @@ class ActionHandler: * some keys are ignored by the accelerators like the direction keys, * some keys are not registered to any accelerators but are still used. When not in focus, gtk and the accelerators handle the the key press. - + Returns: false to let gtk handle the key action """ @@ -95,7 +95,7 @@ class ActionHandler: Handle the delete event from the main window. Generated by pressing X to close, alt+f4, or right click+close. This method in turns calls the state handler to quit. - + Returns: true """ @@ -174,14 +174,14 @@ class ActionHandler: self.get_page().get_state_cache().save_new_state(self.get_flow_graph().export_data()) self.get_page().set_saved(False) ################################################## - # Create heir block + # Create heir block ################################################## elif action == Actions.BLOCK_CREATE_HIER: # keeping track of coordinates for pasting later coords = self.get_flow_graph().get_selected_blocks()[0].get_coordinate() x,y = coords - x_min = x + x_min = x y_min = y pads = []; @@ -200,9 +200,9 @@ class ActionHandler: # If a block parameter exists that is a parameter, create a parameter for it if param.get_value() == flow_param.get_id(): params.append(param.get_value()) - - - # keep track of x,y mins for pasting later + + + # keep track of x,y mins for pasting later (x,y) = block.get_coordinate() if x < x_min: x_min = x @@ -214,8 +214,8 @@ class ActionHandler: # Get id of connected blocks source_id = connection.get_source().get_parent().get_id() sink_id = connection.get_sink().get_parent().get_id() - - # If connected block is not in the list of selected blocks create a pad for it + + # If connected block is not in the list of selected blocks create a pad for it if self.get_flow_graph().get_block(source_id) not in self.get_flow_graph().get_selected_blocks(): pads.append({'key': connection.get_sink().get_key(), 'coord': connection.get_source().get_coordinate(), 'block_id' : block.get_id(), 'direction': 'source'}) @@ -241,7 +241,7 @@ class ActionHandler: # Remove the default samp_rate variable block that is created remove_me = self.get_flow_graph().get_block("samp_rate") - self.get_flow_graph().remove_element(remove_me) + self.get_flow_graph().remove_element(remove_me) # Add the param blocks along the top of the window @@ -297,9 +297,9 @@ class ActionHandler: # Connect the pad to the proper sinks new_connection = self.get_flow_graph().connect(pad_source,sink) - # update the new heir block flow graph + # update the new heir block flow graph self.get_flow_graph().update() - + ################################################## # Move/Rotate/Delete/Create @@ -495,7 +495,7 @@ class ActionHandler: self.get_flow_graph()._old_selected_port = None self.get_flow_graph()._new_selected_port = None Actions.ELEMENT_CREATE() - + elif action == Actions.BUSSIFY_SINKS: n = {'name':'bus', 'type':'bus'} for b in self.get_flow_graph().get_selected_blocks(): @@ -563,7 +563,7 @@ class ExecFlowGraphThread(Thread): def __init__ (self, action_handler): """ ExecFlowGraphThread constructor. - + Args: action_handler: an instance of an ActionHandler """ |