diff options
author | jcorgan | 2008-08-18 20:44:41 +0000 |
---|---|---|
committer | jcorgan | 2008-08-18 20:44:41 +0000 |
commit | e92e82dd65a5c91a6b3a9e098e8f58948c779fa5 (patch) | |
tree | 671690b2369cbabc7e5c4ab7ed9dca5333d425f9 /gr-wxgui | |
parent | 8e7ddfa7b1c31da92fd6489ba79c7be71d26024e (diff) | |
download | gnuradio-e92e82dd65a5c91a6b3a9e098e8f58948c779fa5.tar.gz gnuradio-e92e82dd65a5c91a6b3a9e098e8f58948c779fa5.tar.bz2 gnuradio-e92e82dd65a5c91a6b3a9e098e8f58948c779fa5.zip |
Make gl selection more robust for testing
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9315 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gr-wxgui')
-rw-r--r-- | gr-wxgui/src/python/fftsink2.py | 10 | ||||
-rw-r--r-- | gr-wxgui/src/python/scopesink2.py | 10 | ||||
-rw-r--r-- | gr-wxgui/src/python/waterfallsink2.py | 10 |
3 files changed, 15 insertions, 15 deletions
diff --git a/gr-wxgui/src/python/fftsink2.py b/gr-wxgui/src/python/fftsink2.py index 2d8364aaa..ecc60834b 100644 --- a/gr-wxgui/src/python/fftsink2.py +++ b/gr-wxgui/src/python/fftsink2.py @@ -25,12 +25,9 @@ p = gr.prefs() style = p.get_string('wxgui', 'style', 'auto') # In 3.2 we'll change 'auto' to mean 'gl' if possible, then fallback -if style == 'auto': - style = 'nongl' +# Currently, anything other than 'gl' means 'nongl' -if style == 'nongl': - from fftsink_nongl import fft_sink_f, fft_sink_c -elif style == 'gl': +if style == 'gl': try: import wx.glcanvas except ImportError: @@ -42,3 +39,6 @@ elif style == 'gl': raise RuntimeError("Unable to import OpenGL. Are Python wrappers for OpenGL installed?") from fftsink_gl import fft_sink_f, fft_sink_c + +else: + from fftsink_nongl import fft_sink_f, fft_sink_c diff --git a/gr-wxgui/src/python/scopesink2.py b/gr-wxgui/src/python/scopesink2.py index 8888b6f3a..40f9f3886 100644 --- a/gr-wxgui/src/python/scopesink2.py +++ b/gr-wxgui/src/python/scopesink2.py @@ -25,12 +25,9 @@ p = gr.prefs() style = p.get_string('wxgui', 'style', 'auto') # In 3.2 we'll change 'auto' to mean 'gl' if possible, then fallback -if style == 'auto': - style = 'nongl' +# Currently, anything other than 'gl' means 'nongl' -if style == 'nongl': - from scopesink_nongl import scope_sink_f, scope_sink_c, constellation_sink -elif style == 'gl': +if style == 'gl': try: import wx.glcanvas except ImportError: @@ -42,3 +39,6 @@ elif style == 'gl': raise RuntimeError("Unable to import OpenGL. Are Python wrappers for OpenGL installed?") from scopesink_gl import scope_sink_f, scope_sink_c, constellation_sink + +else: + from scopesink_nongl import scope_sink_f, scope_sink_c, constellation_sink diff --git a/gr-wxgui/src/python/waterfallsink2.py b/gr-wxgui/src/python/waterfallsink2.py index c8a4436c7..08e96105d 100644 --- a/gr-wxgui/src/python/waterfallsink2.py +++ b/gr-wxgui/src/python/waterfallsink2.py @@ -25,12 +25,9 @@ p = gr.prefs() style = p.get_string('wxgui', 'style', 'auto') # In 3.2 we'll change 'auto' to mean 'gl' if possible, then fallback -if style == 'auto': - style = 'nongl' +# Currently, anything other than 'gl' means 'nongl' -if style == 'nongl': - from waterfallsink_nongl import waterfall_sink_f, waterfall_sink_c -elif style == 'gl': +if style == 'gl': try: import wx.glcanvas except ImportError: @@ -42,3 +39,6 @@ elif style == 'gl': raise RuntimeError("Unable to import OpenGL. Are Python wrappers for OpenGL installed?") from waterfallsink_gl import waterfall_sink_f, waterfall_sink_c + +else: + from waterfallsink_nongl import waterfall_sink_f, waterfall_sink_c |