summaryrefslogtreecommitdiff
path: root/grc/gui/ActionHandler.py
diff options
context:
space:
mode:
authorTom Rondeau <tom@trondeau.com>2014-07-07 12:27:52 -0400
committerTom Rondeau <tom@trondeau.com>2014-07-07 12:27:52 -0400
commit78f56e07e24e0820a73ba2b24f4b8293bb3b3393 (patch)
treef55180813bff624e0d5b8e08d104bbb816b7fbec /grc/gui/ActionHandler.py
parentbbfc759914da80214fabc70fbbed1edaf39f9e4b (diff)
Removing trailing/extra whitespaces before release (for master).
We should be more careful about letting these into the code in the future. In emacs, we can use (add-hook 'before-save-hook 'delete-trailing-whitespace).
Diffstat (limited to 'grc/gui/ActionHandler.py')
-rw-r--r--grc/gui/ActionHandler.py30
1 files changed, 15 insertions, 15 deletions
diff --git a/grc/gui/ActionHandler.py b/grc/gui/ActionHandler.py
index 6ad2d5576f..2c1c9942d7 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
"""
@@ -175,14 +175,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 = [];
@@ -201,9 +201,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
@@ -215,8 +215,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'})
@@ -242,7 +242,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
@@ -298,9 +298,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
@@ -503,7 +503,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():
@@ -571,7 +571,7 @@ class ExecFlowGraphThread(Thread):
def __init__ (self, action_handler):
"""
ExecFlowGraphThread constructor.
-
+
Args:
action_handler: an instance of an ActionHandler
"""