Make gl selection more robust for testing
authorjcorgan <jcorgan@221aa14e-8319-0410-a670-987f0aec2ac5>
Mon, 18 Aug 2008 20:44:41 +0000 (20:44 +0000)
committerjcorgan <jcorgan@221aa14e-8319-0410-a670-987f0aec2ac5>
Mon, 18 Aug 2008 20:44:41 +0000 (20:44 +0000)
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9315 221aa14e-8319-0410-a670-987f0aec2ac5

gr-wxgui/src/python/fftsink2.py
gr-wxgui/src/python/scopesink2.py
gr-wxgui/src/python/waterfallsink2.py

index 2d8364aaad571759614a597d14d90eb987696a89..ecc60834bc8ecbfaa2ad83e4c3abb5d3ed8d0b08 100644 (file)
@@ -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
index 8888b6f3adf50c2e0752927d5bd7d973e8364932..40f9f3886c00da67d090b480211392e24d56609b 100644 (file)
@@ -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
index c8a4436c73d06f70097bd37fd761800e75a0602b..08e96105de1dc288ae0516d8cfd78678745a2ec6 100644 (file)
@@ -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