From 114b39a434c13a239f33ff65cebce10fcebd26ec Mon Sep 17 00:00:00 2001
From: Sebastian Koslowski <koslowski@kit.edu>
Date: Wed, 22 Mar 2017 13:28:25 +0100
Subject: grc: fix regressions from gtk3 merge

---
 grc/core/Port.py             | 2 +-
 grc/gui/Actions.py           | 8 ++++----
 grc/gui/canvas/connection.py | 3 +++
 3 files changed, 8 insertions(+), 5 deletions(-)

(limited to 'grc')

diff --git a/grc/core/Port.py b/grc/core/Port.py
index 14dd9cd09f..9ca443efa1 100644
--- a/grc/core/Port.py
+++ b/grc/core/Port.py
@@ -67,7 +67,7 @@ def _sources_from_virtual_source_port(source_port, _traversed=None):
     if not block.is_virtual_source():
         return [source_port]  # nothing to resolve, we're done
 
-    stream_id = block.get_parqam('stream_id').get_value()
+    stream_id = block.get_param('stream_id').get_value()
 
     # currently the validation does not allow multiple virtual sinks and one virtual source
     # but in the future it may...
diff --git a/grc/gui/Actions.py b/grc/gui/Actions.py
index 096584731e..97162065a6 100644
--- a/grc/gui/Actions.py
+++ b/grc/gui/Actions.py
@@ -210,13 +210,13 @@ FLOW_GRAPH_SAVE_AS = Action(
 )
 FLOW_GRAPH_SAVE_A_COPY = Action(
     label='Save A Copy',
-    tooltip='Save the copy of current flowgraph',
+    tooltip='Save the copy of current flow graph',
 )
 FLOW_GRAPH_DUPLICATE = Action(
     label='_Duplicate',
-    tooltip='Create a duplicate of current flowgraph',
-    stock_id=gtk.STOCK_COPY,
-    keypresses=(gtk.keysyms.d, gtk.gdk.CONTROL_MASK | gtk.gdk.SHIFT_MASK),
+    tooltip='Create a duplicate of current flow graph',
+    stock_id=Gtk.STOCK_COPY,
+    keypresses=(Gdk.KEY_d, Gdk.ModifierType.CONTROL_MASK | Gdk.ModifierType.SHIFT_MASK),
 )
 FLOW_GRAPH_CLOSE = Action(
     label='_Close',
diff --git a/grc/gui/canvas/connection.py b/grc/gui/canvas/connection.py
index 7de41a85b8..ff790503ef 100644
--- a/grc/gui/canvas/connection.py
+++ b/grc/gui/canvas/connection.py
@@ -204,6 +204,9 @@ class Connection(CoreConnection, Drawable):
         x, y = [a - b for a, b in zip(coor, self.coordinate)]
 
         cr = self._current_cr
+
+        if cr is None:
+            return
         cr.save()
         cr.new_path()
         cr.append_path(self._line_path)
-- 
cgit v1.2.3