diff options
author | Kartik Patel <kartikpatel1995@gmail.com> | 2017-06-14 02:37:06 +0530 |
---|---|---|
committer | Kartik Patel <kartikpatel1995@gmail.com> | 2017-08-22 00:37:30 -0500 |
commit | 3c989f90c1991195b793b53a28aa4c1f9c4d2d9c (patch) | |
tree | da70a5c67472591aa8f72b4e9bbf85a7afbbfd86 /grc/core/utils | |
parent | efcfde0e92e8fae886754436e6ad82d58831d194 (diff) |
grc: Modifications in GRC to allow BokehGUI
grc: Updated template for bokehgui
grc: Removed import from template file
grc: Added a condition to load bokeh based on installed library
grc: Allowed display from remote PC
grc: Added default layout option
grc: Added WidgetPlacement, Sizing Mode options in Options block
grc: Add terminate handler in main function
grc: default rowspan, colspan = 1
grc: Updated Document title and session id from the parameters of Options block
grc: Layout indexing starts from 0
grc: Allowed dynamic port selection
grc: Added a URL path for flow_graph
grc: Reviews incorporated
Diffstat (limited to 'grc/core/utils')
-rw-r--r-- | grc/core/utils/__init__.py | 1 | ||||
-rw-r--r-- | grc/core/utils/hide_bokeh_gui_options_if_not_installed.py | 28 |
2 files changed, 29 insertions, 0 deletions
diff --git a/grc/core/utils/__init__.py b/grc/core/utils/__init__.py index 6b23da2723..2aed42d762 100644 --- a/grc/core/utils/__init__.py +++ b/grc/core/utils/__init__.py @@ -20,3 +20,4 @@ import epy_block_io import extract_docs from odict import odict +from hide_bokeh_gui_options_if_not_installed import hide_bokeh_gui_options_if_not_installed diff --git a/grc/core/utils/hide_bokeh_gui_options_if_not_installed.py b/grc/core/utils/hide_bokeh_gui_options_if_not_installed.py new file mode 100644 index 0000000000..fc0141851a --- /dev/null +++ b/grc/core/utils/hide_bokeh_gui_options_if_not_installed.py @@ -0,0 +1,28 @@ +# Copyright 2008-2017 Free Software Foundation, Inc. +# This file is part of GNU Radio +# +# GNU Radio Companion is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# GNU Radio Companion is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + + +def hide_bokeh_gui_options_if_not_installed(options): + try: + import bokehgui + except ImportError: + generate_option = options.get_param('generate_options') + list_generate_option = generate_option.get_options() + for option in list_generate_option: + if option.get_key() == 'bokeh_gui': + list_generate_option.remove(option) + return |