[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 01/07: wx: Only call XInitThreads for linux
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 01/07: wx: Only call XInitThreads for linux |
Date: |
Sat, 18 Jan 2014 20:31:58 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
trondeau pushed a commit to branch master
in repository gnuradio.
commit 95dcf8024229e6584045da217c7afc84905f221a
Author: Sylvain Munaut <address@hidden>
Date: Sat Dec 14 19:05:44 2013 +0100
wx: Only call XInitThreads for linux
Turns out OSX also returns 'posix' for os.name. This limits it to
linux only. Note that it's purely cosmetic because on OSX it would
just print a warning but not prevent anything from working.
Signed-off-by: Sylvain Munaut <address@hidden>
---
gr-wxgui/python/wxgui/stdgui2.py | 3 +--
grc/python/flow_graph.tmpl | 4 ++--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/gr-wxgui/python/wxgui/stdgui2.py b/gr-wxgui/python/wxgui/stdgui2.py
index d983dd5..53b389d 100644
--- a/gr-wxgui/python/wxgui/stdgui2.py
+++ b/gr-wxgui/python/wxgui/stdgui2.py
@@ -22,7 +22,6 @@
'''A simple wx gui for GNU Radio applications'''
import ctypes
-import os
import wx
import sys
from gnuradio import gr
@@ -36,7 +35,7 @@ class stdapp (wx.App):
self._nstatus = nstatus
self._max_noutput_items = max_noutput_items
# If we're on Linux, also enable multi-threading Xlib access
- if os.name == 'posix':
+ if sys.platform.startswith('linux'):
try:
x11 = ctypes.cdll.LoadLibrary('libX11.so')
x11.XInitThreads()
diff --git a/grc/python/flow_graph.tmpl b/grc/python/flow_graph.tmpl
index c18245e..fe1155b 100644
--- a/grc/python/flow_graph.tmpl
+++ b/grc/python/flow_graph.tmpl
@@ -280,8 +280,8 @@ $short_id#slurp
if __name__ == '__main__':
#if $generate_options in ('wx_gui', 'qt_gui')
import ctypes
- import os
- if os.name == 'posix':
+ import sys
+ if sys.platform.startswith('linux'):
try:
x11 = ctypes.cdll.LoadLibrary('libX11.so')
x11.XInitThreads()
- [Commit-gnuradio] [gnuradio] branch master updated (67aa043 -> 213f244), git, 2014/01/18
- [Commit-gnuradio] [gnuradio] 05/07: qtgui: switched from using fft::malloc to volk_malloc., git, 2014/01/18
- [Commit-gnuradio] [gnuradio] 06/07: Merge branch 'maint', git, 2014/01/18
- [Commit-gnuradio] [gnuradio] 03/07: volk: adding volk_malloc and volk_free functions to handle allocation of aligned memory., git, 2014/01/18
- [Commit-gnuradio] [gnuradio] 02/07: wxgui: Make sure to only start the flow graph once all init is done, git, 2014/01/18
- [Commit-gnuradio] [gnuradio] 01/07: wx: Only call XInitThreads for linux,
git <=
- [Commit-gnuradio] [gnuradio] 04/07: filter: switched from using fft::malloc to volk_malloc., git, 2014/01/18
- [Commit-gnuradio] [gnuradio] 07/07: Merge branch 'volk_malloc', git, 2014/01/18