57 Commits

Author SHA1 Message Date
Daniel Estévez
f7b371a4e0 grc: add option to show properties field colors
In #6888 the colors that indicate the type of each field in the
block properties were replaced by labels, because colors can give
contrast problems, specially in dark mode. I personally find colors
useful, because they help me to identify quickly the field that I
want to edit (perhaps I'm just too used to having colors).

This commit adds the field colors back, but only as an optional
feature controlled by an entry in the View menu. This setting is
saved to the GRC preferences, and it defaults to colors disabled.
Users that prefer colors can simply enable the old behavior in this
menu entry.

The new labels to the right of each field that indicate the field
type are always shown, regardless of whether field colors are enabled.
Even when colors are shown, the labels can be a useful reminder of
what type each color stands for, and they don't use too much screen
real state.

Signed-off-by: Daniel Estévez <daniel@destevez.net>
2024-03-21 07:51:25 -04:00
Clayton Smith
e2483a8070 grc: Only bussify blocks that have ports
Signed-off-by: Clayton Smith <argilo@gmail.com>
2024-01-11 08:48:10 -05:00
Martin Braun
486e7a5edb grc: Add edge (connection) properties
This allows connections (graph edges) to have properties associated with
them. In order to do so, the edge types must have parameters associated
with them in the *.domain.yml file.

For edges that have properties/parameters associated with them,
a property dialog can be summoned by right-clicking a connector arrow.

Signed-off-by: Martin Braun <martin.braun@ettus.com>
2023-11-13 09:29:49 -05:00
Clayton Smith
5866a07601 grc: Fix way-over-backslashing in file paths
Each time File -> Open Recent is used on Windows, the number of
backslashes in the filename doubles. This happens because a GLib.Variant
object is passed through str(), which produces a quoted (and escaped)
string. The quotes are then removed, but the escaping remains. The
underlying string can instead be accessed using the get_string() method.

See https://xkcd.com/1638/ for further details. ;)

Signed-off-by: Clayton Smith <argilo@gmail.com>
2023-10-16 14:19:09 -04:00
Bjoern Kerler
68e23ce9d4 grc: Fix create hier / missing top_block error
Signed-off-by: Bjoern Kerler <info@revskills.de>
2022-04-05 13:52:45 -04:00
Josh Morman
d61a0258aa grc: don't blacklist default fg id
Signed-off-by: Josh Morman <jmorman@gnuradio.org>
2022-01-06 06:22:13 -05:00
Josh Morman
b7828c950c grc: pep8 formatting
Signed-off-by: Josh Morman <jmorman@gnuradio.org>
2021-11-24 14:41:53 -05:00
Volker Schroer
edb6bc8628 grc: Dependent variables sometimes fail to evaluate
fixes #4788
fixes #5100
fixes #5108

Tested with the coresponding examples.

Now disabling or deleting the symbol_rate block in #4788 correctly
updates the depending blocks

Signed-off-by: Volker Schroer <3470424+dl1ksv@users.noreply.github.com>
2021-10-27 14:29:53 -04:00
Mark Pentler
fbd26a733f grc: Move menu init debug log to MainWindow.py
This code belongs in MainWindow and not Application since the menu is
created in there. Additionally the commented-out code block below it
can also come out.

Signed-off-by: Mark Pentler <tehhustler@hotmail.com>
2021-10-22 15:22:32 -04:00
Jeff Dumps
5cd0e1275b grc: added shortcuts zoom in/out/reset
Co-authored-by: Jeff Dumps <jeffdumps@gmail.com>
Co-authored-by: Derek Kozel <derek@bitstovolts.com>
Signed-off-by: Derek Kozel <derek@bitstovolts.com>
2021-10-11 21:30:25 +01:00
Volker Schroer
9ff3579267 grc: fix the evaluation of interdependent variables
The gr-digital/examples/tx_ofdm.grc fails to evaluate the
header_formater variable.

This pr fixes #4937

Signed-off-by: Volker Schroer <3470424+dl1ksv@users.noreply.github.com>
2021-08-07 07:23:23 -04:00
Solomon Tan
1a4b37132f grc: Update flowgraph vars controlled by vars
Fixes #4781. When a variable is controlled by another variable,
updating the latter does not update the former in the flowgraph when
`Ok` is pressed. Caused by commit c4f46bf. This commit patches the bug.

Signed-off-by: Solomon Tan <solomonbstoner@yahoo.com.au>
2021-06-19 19:33:19 -04:00
Solomon Tan
5717f7ebc6 grc: Fix vector length bug
Make all ports follow the `vlen` of their master port the same way it is
for `dtype`. Fixes #4634.

Signed-off-by: Solomon Tan <solomonbstoner@yahoo.com.au>
2021-05-24 08:02:04 -04:00
Jason Uher
3d08af346d grc: optionally show variable names in graph #4109 (#4279)
1. Add option to show variable name only
2. Add option to show variable name and value
3. default to traditional behavior

Signed-off-by: Jason Uher <jason.uher@jhuapl.edu>
2021-03-16 06:39:20 -04:00
luz paz
ff1a7c848f Fix typos
Found via `codespell v2.1.dev0`
`codespell -q 3 -L ans,fo,hist,inout,ist,ith,nd,sinc,uint -S ./volk`

Signed-off-by: luz paz <luzpaz@users.noreply.github.com>
Signed-off-by: Josh Morman <jmorman@perspectalabs.com>
2021-02-08 17:40:25 +01:00
David Pi
962db23572 grc: Save config before execution and update recent file sub-menu.
Saves the grc prefs before executing a flowgraph to avoid losing them if
anything goes wrong and grc needs to be forcibly closed.

Also fixes recent files sub-menu refresh. When a file is opened, opened
from recent, or saved as, the recent files sub-menu is now updated.
2021-01-12 02:49:06 -08:00
David Pi
e5ae38e42c grc: Fix multiple 'Apply' in modify block parameters dialog box
When the modify parameters dialog block is constructed, the instance of
the block to be modified, is passed in. When the apply button is clicked
there is an extraenous flowgraph.import_data() call that re-creates all
blocks in the flowgraph. The consequence is that the block instance
passed to the dialog box is no longer the one in the flowgraph, and so
subsequent Applies have no effect. This change simply removes this call.
2020-12-17 07:53:24 -05:00
Clayton Smith
c5c9a0c32c grc: fix pylint C0326: wrong number of spaces 2020-10-20 15:16:48 +02:00
Clayton Smith
d07416e123 grc: fix pylint C0303: Trailing whitespace 2020-10-20 15:16:48 +02:00
Clayton Smith
88e70ae3a1 Revert "grc: Unselect all on Ctrl+F"
This reverts commit 2ff628894b645d22325db6569fdccb265f57fbe1.
2020-08-19 08:52:46 -07:00
Josh Morman
0472f0393f grc: do not run stale flowgraph 2020-08-14 06:07:28 -07:00
Oleksandr Kravchuk
43e6a43e3d python: Remove unnecessary 'from __future__ import'
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
2020-08-03 11:40:27 +02:00
alekhgupta1441
47da4bc2d2 grc: Updated Application 2020-05-06 07:47:36 -04:00
japm48
c53cc44257 grc: disable save prompt on new blank pages 2020-03-30 08:59:29 -04:00
alekhgupta1441
7a29b54b4a grc: Added a new menu option under Help for Keyboard-Shortcuts 2020-03-28 07:52:20 -04:00
Chris Donohue
0880f74465 grc: ctrl+a now selects all text if search box in focus 2020-02-09 09:39:25 -08:00
Chris Donohue
6483652849 grc: fix ctrl+s keyboard shortcut on new flowgraphs 2020-02-07 11:08:44 -05:00
devnulling
9a453c2ca6 Update license header to SPDX format 2020-01-27 19:56:21 -08:00
Chris
2459267a00 Save the new duplicate page to the cache so it can be loaded from the cache in the future 2019-10-19 23:30:35 +02:00
Josh Morman
0b4f462c71 grc: option toggle the show id on all blocks
Addresses the issue of losing access to the block id on many/most blocks
though there are scenarios where you may need to see them in GRC

Added a menu item tied into the grc prefs that will show the block ids

Fixes #2780
2019-09-17 14:30:50 -05:00
Håkon Vågsether
5f99155685 grc: Rename _options_block to options_block 2019-07-28 17:38:54 +02:00
Håkon Vågsether
6b8c1e1f72 grc: Add sensible defaults to Options block 2019-07-28 17:38:54 +02:00
Josh Morman
914cacfebd grc: add busports back into 3.8
Bus ports had not been added back in since the refactor of grc
Hopefully this fully enables busports though there are still some
issues with the gr-fec flowgraphs

Fixes #2277
2019-07-15 21:48:10 +02:00
Håkon Vågsether
6917be6caa grc: Unselect all on Ctrl+F
Fixes the bug mentioned in https://github.com/gnuradio/gnuradio/issues/2551
2019-06-29 13:41:50 +02:00
Bastian Bloessl
d085fbffdf grc: better qt flowgraph shutdown 2019-06-19 13:00:00 -07:00
aru31
e5bf7ddfd7 grc: Fix save as for existing grc file 2019-02-22 14:05:38 -08:00
Håkon Vågsether
3dddafbf44 GRC: Fix right-click "Create hier" 2019-02-01 12:19:40 +01:00
Ron Economos
7cdaf82192 grc: Suppress annoying Gtk message on exit from command line.
GTK event loops are nested. You need to "bubble" your way up when you
want to quit.
2019-01-04 19:02:50 +01:00
Martin Braun
fc12918926 grc: Remove ParseXML module
This has been disabled since the addition of Mako, and has not been used
in years.
2018-12-28 20:36:49 -08:00
Martin Braun
d038abb42a grc: Fix some whitespace, remove ;
No functional changes.
2018-12-19 18:02:44 +01:00
Volker Schroer
e81d9663ea Remove doubled line 2018-11-17 20:06:53 +01:00
Volker Schroer
0c1013fcc0 grc: Correctly toggle the visibility of blocks
grc does not initialize the visibility of disabled blocks.
This  sometimes leads to stranges effects.

Toggling the visibility does not update the flowgraph. So this take effect not until a change
to the flowgraph is made that forces an update of the flowgraph.
2018-11-17 20:06:53 +01:00
Brennan Ashton
bd8b3e2498 grc: Fix flow graph kill
Previously, GRC was calling a non-existant term_proc() method. Now, we
call kill() on the Popen object.
2018-11-12 16:27:02 -08:00
Volker Schroer
018b6bb94c Make grc opening hierachal block source
grc fails to open the source of an grc generated block with object has no attribute 'grc_source' due to an parameter error.
This is fixed here.
2018-11-01 15:54:06 +01:00
Håkon Vågsether
d018f12af3 Fixed a bug where GRC's Create New button and Ctrl+N were greyed out/didn't work.
The Create New dropdown list is now assigned to its own action, separate
from Ctrl+N and the Create New button.
2018-10-06 19:04:42 +02:00
Volker Schroer
fcb8dc2731 Adding Action Open Recent to grc 2018-08-28 18:59:42 +02:00
Volker Schroer
1e6a5c8eed Force to update all affected elements
On a parameter change of block , the block will not be updated correctly.

Example:
    Open a new Flowgraph tab.
    Add an  math add block. The default of the io ports is complex.
    Open the property dialog and change the type of the io ports from complex to float and select OK.
    Only the first input and the output port change from 'complex' to 'float'. The second input port remains 'complex'.
    The only way to change the type of the second input port is to reopen the property dialog and select quit !!!!
    Now the second port has the correct type.

The proposed change fixes this issue. But I'm not sure if there isn't a more elegant way to handle this issue.
2018-08-24 21:03:55 +02:00
Volker Schroer
a8d0619295 Update Application.py
Fixing 
     NameError: name 'SaveScreenShotDialog' is not defined
in Application.py

and removing unneeded call to set xterm .

See issue https://github.com/gnuradio/gnuradio/issues/1937
2018-08-17 18:56:24 +02:00
Sebastian Koslowski
ef906748f3 Merge branch 'merges/next' into merges/python3 2017-10-26 21:21:54 +02:00
Håkon Vågsether
d74fd48b7c Fixing the generate options chooser from the new flowgraph menu.
Without this change, the single quotes will be part of the string, like "'no_gui'"
(And it will always default to "qt_gui")
2017-08-05 15:22:12 +02:00