summaryrefslogtreecommitdiff
path: root/grc/gui/FlowGraph.py
diff options
context:
space:
mode:
authorSebastian Koslowski <koslowski@kit.edu>2015-04-02 13:20:19 +0200
committerSebastian Koslowski <koslowski@kit.edu>2015-04-02 13:20:19 +0200
commita601b909daabe84c1a3c31ba13456e48c3871e46 (patch)
tree27003ad191368168e0ae15ec05c2ff79f6a5b47c /grc/gui/FlowGraph.py
parentffb28308cefc7cf588da745508670122319c690f (diff)
grc: move context def into Bars.py and add submenu
Diffstat (limited to 'grc/gui/FlowGraph.py')
-rw-r--r--grc/gui/FlowGraph.py21
1 files changed, 2 insertions, 19 deletions
diff --git a/grc/gui/FlowGraph.py b/grc/gui/FlowGraph.py
index 794d992e4e..f8be2f6cc3 100644
--- a/grc/gui/FlowGraph.py
+++ b/grc/gui/FlowGraph.py
@@ -27,6 +27,7 @@ pygtk.require('2.0')
import gtk
import random
import Messages
+import Bars
class FlowGraph(Element):
"""
@@ -54,25 +55,7 @@ class FlowGraph(Element):
# current mouse hover element
self.element_under_mouse = None
#context menu
- self._context_menu = gtk.Menu()
- for action in [
- Actions.BLOCK_CUT,
- Actions.BLOCK_COPY,
- Actions.BLOCK_PASTE,
- Actions.ELEMENT_DELETE,
- None,
- Actions.BLOCK_ROTATE_CCW,
- Actions.BLOCK_ROTATE_CW,
- Actions.BLOCK_ENABLE,
- Actions.BLOCK_DISABLE,
- None,
- Actions.BLOCK_CREATE_HIER,
- Actions.OPEN_HIER,
- Actions.BUSSIFY_SOURCES,
- Actions.BUSSIFY_SINKS,
- None,
- Actions.BLOCK_PARAM_MODIFY
- ]: self._context_menu.append(action.create_menu_item() if action else gtk.SeparatorMenuItem())
+ self._context_menu = Bars.ContextMenu()
self.get_context_menu = lambda: self._context_menu
###########################################################################