diff options
Diffstat (limited to 'gr-wxgui/src/python/common.py')
-rw-r--r-- | gr-wxgui/src/python/common.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/gr-wxgui/src/python/common.py b/gr-wxgui/src/python/common.py index e54f4dbf15..f31e1a7085 100644 --- a/gr-wxgui/src/python/common.py +++ b/gr-wxgui/src/python/common.py @@ -24,12 +24,6 @@ import numpy import math import wx -EVT_DATA = wx.NewEventType() -class DataEvent(wx.PyEvent): - def __init__(self, data): - wx.PyEvent.__init__(self, wx.NewId(), EVT_DATA) - self.data = data - class prop_setter(object): def _register_set_prop(self, controller, control_key, *args): def set_method(value): controller[control_key] = value @@ -37,6 +31,15 @@ class prop_setter(object): setattr(self, 'set_%s'%control_key, set_method) ################################################## +# Custom Data Event +################################################## +EVT_DATA = wx.PyEventBinder(wx.NewEventType()) +class DataEvent(wx.PyEvent): + def __init__(self, data): + wx.PyEvent.__init__(self, wx.NewId(), EVT_DATA.typeId) + self.data = data + +################################################## # Input Watcher Thread ################################################## class input_watcher(threading.Thread): |