[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 07/18: grc: show epy_blocks and epy_module
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 07/18: grc: show epy_blocks and epy_module source in generated code preview |
Date: |
Tue, 8 Dec 2015 00:31:22 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit ad1df327929560803c8623724c025fe580c6650c
Author: Sebastian Koslowski <address@hidden>
Date: Wed Dec 2 22:54:58 2015 +0100
grc: show epy_blocks and epy_module source in generated code preview
---
grc/gui/PropsDialog.py | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/grc/gui/PropsDialog.py b/grc/gui/PropsDialog.py
index f5a136e..bf7d31d 100644
--- a/grc/gui/PropsDialog.py
+++ b/grc/gui/PropsDialog.py
@@ -210,6 +210,14 @@ class PropsDialog(gtk.Dialog):
buffer = self._code_text_display.get_buffer()
block = self._block
+ key = block.get_key()
+
+ if key == 'epy_block':
+ src = block.get_param('_source_code').get_value()
+ elif key == 'epy_module':
+ src = block.get_param('source_code').get_value()
+ else:
+ src = ''
def insert(header, text):
if not text:
@@ -219,9 +227,11 @@ class PropsDialog(gtk.Dialog):
buffer.delete(buffer.get_start_iter(), buffer.get_end_iter())
insert('# Imports\n', '\n'.join(block.get_imports()))
- if block.get_key().startswith('variable'):
+ if key.startswith('variable'):
insert('\n\n# Variables\n', block.get_var_make())
insert('\n\n# Blocks\n', block.get_make())
+ if src:
+ insert('\n\n# External Code ({}.py)\n'.format(block.get_id()), src)
def _handle_key_press(self, widget, event):
"""
- [Commit-gnuradio] [gnuradio] branch master updated (d55fde3 -> 422271f), git, 2015/12/07
- [Commit-gnuradio] [gnuradio] 08/18: grc: rename embedded python blocks, git, 2015/12/07
- [Commit-gnuradio] [gnuradio] 01/18: polar: channel construction bugfixes in Python code, git, 2015/12/07
- [Commit-gnuradio] [gnuradio] 04/18: polar: added more details in README about usage of channel construction code, git, 2015/12/07
- [Commit-gnuradio] [gnuradio] 02/18: polar: fixed channel construction naming error, git, 2015/12/07
- [Commit-gnuradio] [gnuradio] 07/18: grc: show epy_blocks and epy_module source in generated code preview,
git <=
- [Commit-gnuradio] [gnuradio] 15/18: Merge remote-tracking branch 'tom/uhd/sink_ctrlport', git, 2015/12/07
- [Commit-gnuradio] [gnuradio] 16/18: Merge remote-tracking branch 'gnuradio-wg-grc/master_grcwg', git, 2015/12/07
- [Commit-gnuradio] [gnuradio] 17/18: Merge remote-tracking branch 'jdemel/polar-bugfixes', git, 2015/12/07
- [Commit-gnuradio] [gnuradio] 13/18: Merge branch 'maint', git, 2015/12/07
- [Commit-gnuradio] [gnuradio] 18/18: Merge remote-tracking branch 'jdemel/polar-systematic', git, 2015/12/07
- [Commit-gnuradio] [gnuradio] 14/18: Merge branch 'maint', git, 2015/12/07
- [Commit-gnuradio] [gnuradio] 06/18: grc: add embedded python modules, git, 2015/12/07
- [Commit-gnuradio] [gnuradio] 09/18: uhd: Added controlport interface for UHD sink's "command" message handler., git, 2015/12/07
- [Commit-gnuradio] [gnuradio] 12/18: polar: systematic decoder added, git, 2015/12/07
- [Commit-gnuradio] [gnuradio] 03/18: polar: BEC channel construction optimized, git, 2015/12/07