[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r11091 - gnuradio/trunk/gr-wxgui/src/python
From: |
jcorgan |
Subject: |
[Commit-gnuradio] r11091 - gnuradio/trunk/gr-wxgui/src/python |
Date: |
Sat, 23 May 2009 10:43:05 -0600 (MDT) |
Author: jcorgan
Date: 2009-05-23 10:43:05 -0600 (Sat, 23 May 2009)
New Revision: 11091
Modified:
gnuradio/trunk/gr-wxgui/src/python/fftsink2.py
gnuradio/trunk/gr-wxgui/src/python/scopesink2.py
gnuradio/trunk/gr-wxgui/src/python/waterfallsink2.py
Log:
Change wxgui style default now so 'auto' tries for OpenGL sinks and falls back
to non-GL sinks.
Modified: gnuradio/trunk/gr-wxgui/src/python/fftsink2.py
===================================================================
--- gnuradio/trunk/gr-wxgui/src/python/fftsink2.py 2009-05-23 15:20:14 UTC
(rev 11090)
+++ gnuradio/trunk/gr-wxgui/src/python/fftsink2.py 2009-05-23 16:43:05 UTC
(rev 11091)
@@ -1,5 +1,5 @@
#
-# Copyright 2008 Free Software Foundation, Inc.
+# Copyright 2008,2009 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -24,21 +24,18 @@
p = gr.prefs()
style = p.get_string('wxgui', 'style', 'auto')
-# In 3.2 we'll change 'auto' to mean 'gl' if possible, then fallback
-# Currently, anything other than 'gl' means 'nongl'
-
-if style == 'gl':
+if style == 'auto' or style == 'gl':
try:
import wx.glcanvas
- except ImportError:
- raise RuntimeError("wxPython doesn't support glcanvas")
-
- try:
from OpenGL.GL import *
+ from fftsink_gl import fft_sink_f, fft_sink_c
except ImportError:
- raise RuntimeError("Unable to import OpenGL. Are Python wrappers for
OpenGL installed?")
-
- from fftsink_gl import fft_sink_f, fft_sink_c
-
-else:
+ if style == 'gl':
+ raise RuntimeError("Unable to import OpenGL. Are Python wrappers
for OpenGL installed?")
+ else:
+ # Fall backto non-gl sinks
+ from fftsink_nongl import fft_sink_f, fft_sink_c
+elif style == 'nongl':
from fftsink_nongl import fft_sink_f, fft_sink_c
+else:
+ raise RuntimeError("Unknown wxgui style")
Modified: gnuradio/trunk/gr-wxgui/src/python/scopesink2.py
===================================================================
--- gnuradio/trunk/gr-wxgui/src/python/scopesink2.py 2009-05-23 15:20:14 UTC
(rev 11090)
+++ gnuradio/trunk/gr-wxgui/src/python/scopesink2.py 2009-05-23 16:43:05 UTC
(rev 11091)
@@ -1,5 +1,5 @@
#
-# Copyright 2008 Free Software Foundation, Inc.
+# Copyright 2008,2009 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -24,21 +24,18 @@
p = gr.prefs()
style = p.get_string('wxgui', 'style', 'auto')
-# In 3.2 we'll change 'auto' to mean 'gl' if possible, then fallback
-# Currently, anything other than 'gl' means 'nongl'
-
-if style == 'gl':
+if style == 'auto' or style == 'gl':
try:
import wx.glcanvas
- except ImportError:
- raise RuntimeError("wxPython doesn't support glcanvas")
-
- try:
from OpenGL.GL import *
+ from scopesink_gl import scope_sink_f, scope_sink_c
except ImportError:
- raise RuntimeError("Unable to import OpenGL. Are Python wrappers for
OpenGL installed?")
-
- from scopesink_gl import scope_sink_f, scope_sink_c
-
-else:
+ if style == 'gl':
+ raise RuntimeError("Unable to import OpenGL. Are Python wrappers
for OpenGL installed?")
+ else:
+ # Fall backto non-gl sinks
+ from scopesink_nongl import scope_sink_f, scope_sink_c
+elif style == 'nongl':
from scopesink_nongl import scope_sink_f, scope_sink_c
+else:
+ raise RuntimeError("Unknown wxgui style")
Modified: gnuradio/trunk/gr-wxgui/src/python/waterfallsink2.py
===================================================================
--- gnuradio/trunk/gr-wxgui/src/python/waterfallsink2.py 2009-05-23
15:20:14 UTC (rev 11090)
+++ gnuradio/trunk/gr-wxgui/src/python/waterfallsink2.py 2009-05-23
16:43:05 UTC (rev 11091)
@@ -1,5 +1,5 @@
#
-# Copyright 2008 Free Software Foundation, Inc.
+# Copyright 2008,2009 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -24,21 +24,18 @@
p = gr.prefs()
style = p.get_string('wxgui', 'style', 'auto')
-# In 3.2 we'll change 'auto' to mean 'gl' if possible, then fallback
-# Currently, anything other than 'gl' means 'nongl'
-
-if style == 'gl':
+if style == 'auto' or style == 'gl':
try:
import wx.glcanvas
- except ImportError:
- raise RuntimeError("wxPython doesn't support glcanvas")
-
- try:
from OpenGL.GL import *
+ from waterfallsink_gl import waterfall_sink_f, waterfall_sink_c
except ImportError:
- raise RuntimeError("Unable to import OpenGL. Are Python wrappers for
OpenGL installed?")
-
- from waterfallsink_gl import waterfall_sink_f, waterfall_sink_c
-
-else:
+ if style == 'gl':
+ raise RuntimeError("Unable to import OpenGL. Are Python wrappers
for OpenGL installed?")
+ else:
+ # Fall backto non-gl sinks
+ from waterfallsink_nongl import waterfall_sink_f, waterfall_sink_c
+elif style == 'nongl':
from waterfallsink_nongl import waterfall_sink_f, waterfall_sink_c
+else:
+ raise RuntimeError("Unknown wxgui style")
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r11091 - gnuradio/trunk/gr-wxgui/src/python,
jcorgan <=