summaryrefslogtreecommitdiff
path: root/grc/gui/Param.py
diff options
context:
space:
mode:
authorGlenn Richardson <glenn.richardson@live.com>2015-08-31 23:13:04 -0400
committerSebastian Koslowski <koslowski@kit.edu>2015-10-01 21:51:52 +0200
commitbd97903e06da8a4f7fee8d9cd7a7644f55f46215 (patch)
treeead16fb7faac82f6fdbf8bb029c346c011d108b9 /grc/gui/Param.py
parent5b3a80d03a890492e1e219ec91d5275e6b5dafd1 (diff)
grc: added param to set per-flow-graph QT-theme file
Diffstat (limited to 'grc/gui/Param.py')
-rw-r--r--grc/gui/Param.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/grc/gui/Param.py b/grc/gui/Param.py
index b9436ab06e..ca0a8c60e5 100644
--- a/grc/gui/Param.py
+++ b/grc/gui/Param.py
@@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
import Utils
from Element import Element
-from . Constants import PARAM_FONT
+from . Constants import PARAM_FONT, GR_PREFIX
import pygtk
pygtk.require('2.0')
import gtk
@@ -233,7 +233,14 @@ class FileParam(EntryParam):
#get the paths
file_path = self.param.is_valid() and self.param.get_evaluated() or ''
(dirname, basename) = os.path.isfile(file_path) and os.path.split(file_path) or (file_path, '')
- if not os.path.exists(dirname): dirname = os.getcwd() #fix bad paths
+ # check for qss theme default directory
+ if self.param.get_key() == 'qt_qss_theme':
+ dirname = os.path.dirname(dirname) # trim filename
+ if not os.path.exists(dirname):
+ dirname = os.path.join(GR_PREFIX, '/share/gnuradio/themes')
+ if not os.path.exists(dirname):
+ dirname = os.getcwd() # fix bad paths
+
#build the dialog
if self.param.get_type() == 'file_open':
file_dialog = gtk.FileChooserDialog('Open a Data File...', None,