summaryrefslogtreecommitdiff
path: root/grc/gui/VariableEditor.py
Commit message (Collapse)AuthorAgeFilesLines
* grc: pep8 formattingJosh Morman2021-11-241-25/+47
| | | | Signed-off-by: Josh Morman <jmorman@gnuradio.org>
* grc: Write "ID", not "Id"Håkon Vågsether2021-10-111-1/+1
| | | | Signed-off-by: Håkon Vågsether <hauk142@gmail.com>
* grc: handle variables of type raw correctlyVolker Schroer2021-06-011-15/+1
| | | | | | | | | | | | | | | | | | At the moment grc does not validate variables, as they are of type raw. So they are always treated as valid, which leads to some problems, see: #4519. A approach to fix #4519 is #4531. This approach improves the situation, but has still some problems. param.py provides a validator function for dtype raw, but this is not used, as dtypes.py provides no validator function for dtype raw. This fix clears the error messages in base.rewrite not in base.elements.validate, so the error messages are kept. In addition this makes it possible, to make the code in VariableEditor.py smoother. The error messages are kept on switching the different tabs in VariableEditor. Signed-off-by: Volker Schroer <3470424+dl1ksv@users.noreply.github.com>
* grc: ensure that strings are valid utf8 when evaluating parametersDaniel Estévez2021-01-291-0/+3
| | | | | | | | | | | | | | | | | | | | | Some objects, notably PMTs can produce non-UTF-8 strings when their __str__() method is called. For instance >>> str(pmt.init_u8vector(1, [203])) '#[\udccb]' These kinds of strings eventually give a UnicodeEncodeError, for instance when calling print() or displaying them with GTK. Python3 strings are supposed to be valid UTF-8. When these objects are used inside block parameters in GRC, it will produce several tracebacks and hang up. This commit fixes the problem by sanitizing the strings to convert them to valid UTF-8. The sanitization uses the 'backslashreplace' error response from Python. Issue #3398 is caused by this problem. Signed-off-by: Martin Braun <martin@gnuradio.org>
* grc: fix pylint C0326: wrong number of spacesClayton Smith2020-10-201-2/+2
|
* python: Remove unnecessary 'from __future__ import'Oleksandr Kravchuk2020-08-031-1/+0
| | | | | | | | | | | | | | | | All of the removed `from __future__ import` were needed in older versions of Python (mostly 2.5.x and below) but later became mandatory in most versions of Python 3 hence are not necessary anymore. More specifically, according to __future__.py[1]: - unicode_literals is part of Python since versions 2.6.0 and 3.0.0; - print_function is part of Python since versions 2.6.0 and 3.0.0; - absolute_import is part of Python since versions 2.5.0 and 3.0.0; - division is part of Python since versions 2.2.0 and 3.0.0; Get rid of those unnecessary imports to slightly clean up the codebase. [1] https://github.com/python/cpython/blob/master/Lib/__future__.py
* Update license header to SPDX formatdevnulling2020-01-271-13/+2
|
* Fix KeyError 'value' in variable blocksVolker Schroer2019-07-251-2/+13
| | | | Variable blocks must not have a param named value. But grc always trys to evaluate this params. This leads to errors
* grc: introduce flag 'show_id' to show block idBastian Bloessl2019-06-291-1/+1
| | | | useful for variable and parameter blocks, but maybe others too
* Widen the id column in the variable editor.Clayton Smith2018-11-011-1/+1
|
* grc: fix renaming of import -> imports in YAML syntaxAndrej Rode2018-07-301-1/+1
|
* grc: added yaml/mako supportSebastian Koslowski2017-06-291-11/+11
| | | | Includes basic converter from XML/Cheetah to YAML/Mako based block format.
* grc: gtk3: Converted actions to Gio.Action instead of Gtk.ActionSeth Hitefield2017-05-031-1/+3
|
* Merge remote-tracking branch 'upstream/next' into gtk3Sebastian Koslowski2016-11-171-5/+5
|\
| * Merge branch 'master' into nextJohnathan Corgan2016-11-121-4/+5
| |\
| | * grc: fix column widths on dpi scalings != 1Sebastian Müller2016-11-021-4/+5
| | |
| | * Backport GRC Python code for Python-2.6.6+Ben Hilburn2016-10-171-1/+1
| |/
* | grc: refactor: Moved preferences to Config.pySeth Hitefield2016-09-231-2/+4
| |
* | grc: gtk3: update various deprecated gtk callsSebastian Koslowski2016-08-031-19/+13
| |
* | grc: refactor: replace get_enabled by propSebastian Koslowski2016-07-291-6/+6
| |
* | grc-refactor: Block: remove key gettersSebastian Koslowski2016-07-131-4/+4
| |
* | grc: py3k compat using python-modernizeSebastian Koslowski2016-06-091-3/+3
| |
* | grc: gtk3: remove some deprecated warningsSebastian Koslowski2016-06-011-6/+2
| |
* | grc-refactor: replace some unnecessary gettersSebastian Koslowski2016-06-011-16/+15
| |
* | gtk3: add flowgraph draw code and other gtk3 fixes (WIP)Sebastian Koslowski2016-05-241-47/+48
|/
* grc: Variable editor tweaks.Seth Hitefield2016-05-191-26/+51
|
* grc: Added context menu to variable editorGlenn Richardson2016-05-181-0/+46
|
* grc: Added the variable editor panelSeth Hitefield2016-05-181-0/+283