summaryrefslogtreecommitdiff
path: root/gr-wxgui/src/python
diff options
context:
space:
mode:
authorTom Rondeau2012-01-03 16:30:59 -0500
committerTom Rondeau2012-01-03 16:30:59 -0500
commitd94c47d652d170760ffca728dc61e45d629fcc04 (patch)
tree52e93c33f5b9af0ded5718a94b4281ae5bbf21cd /gr-wxgui/src/python
parent72e8cc83d795ed49e1cb78e305e32dca892d0bed (diff)
parentab7cfce4a78dbb95a7c8871f56f4cb037e5b1bb2 (diff)
downloadgnuradio-d94c47d652d170760ffca728dc61e45d629fcc04.tar.gz
gnuradio-d94c47d652d170760ffca728dc61e45d629fcc04.tar.bz2
gnuradio-d94c47d652d170760ffca728dc61e45d629fcc04.zip
Merge branch 'master' into next
Diffstat (limited to 'gr-wxgui/src/python')
-rw-r--r--gr-wxgui/src/python/stdgui2.py20
1 files changed, 14 insertions, 6 deletions
diff --git a/gr-wxgui/src/python/stdgui2.py b/gr-wxgui/src/python/stdgui2.py
index e510f174c..f397fd01e 100644
--- a/gr-wxgui/src/python/stdgui2.py
+++ b/gr-wxgui/src/python/stdgui2.py
@@ -27,23 +27,27 @@ from gnuradio import gr
class stdapp (wx.App):
- def __init__ (self, top_block_maker, title="GNU Radio", nstatus=2):
+ def __init__ (self, top_block_maker, title="GNU Radio", nstatus=2,
+ max_noutput_items=None):
self.top_block_maker = top_block_maker
self.title = title
self._nstatus = nstatus
+ self._max_noutput_items = max_noutput_items
# All our initialization must come before calling wx.App.__init__.
# OnInit is called from somewhere in the guts of __init__.
wx.App.__init__ (self, redirect=False)
def OnInit (self):
- frame = stdframe (self.top_block_maker, self.title, self._nstatus)
+ frame = stdframe (self.top_block_maker, self.title, self._nstatus,
+ self._max_noutput_items)
frame.Show (True)
self.SetTopWindow (frame)
return True
class stdframe (wx.Frame):
- def __init__ (self, top_block_maker, title="GNU Radio", nstatus=2):
+ def __init__ (self, top_block_maker, title="GNU Radio", nstatus=2,
+ max_nouts=None):
# print "stdframe.__init__"
wx.Frame.__init__(self, None, -1, title)
@@ -57,7 +61,7 @@ class stdframe (wx.Frame):
self.SetMenuBar (mainmenu)
self.Bind (wx.EVT_CLOSE, self.OnCloseWindow)
- self.panel = stdpanel (self, self, top_block_maker)
+ self.panel = stdpanel (self, self, top_block_maker, max_nouts)
vbox = wx.BoxSizer(wx.VERTICAL)
vbox.Add(self.panel, 1, wx.EXPAND)
self.SetSizer(vbox)
@@ -72,7 +76,8 @@ class stdframe (wx.Frame):
return self.panel.top_block
class stdpanel (wx.Panel):
- def __init__ (self, parent, frame, top_block_maker):
+ def __init__ (self, parent, frame, top_block_maker,
+ max_nouts=None):
# print "stdpanel.__init__"
wx.Panel.__init__ (self, parent, -1)
self.frame = frame
@@ -83,7 +88,10 @@ class stdpanel (wx.Panel):
self.SetAutoLayout (True)
vbox.Fit (self)
- self.top_block.start ()
+ if(max_nouts is not None):
+ self.top_block.start (max_nouts)
+ else:
+ self.top_block.start ()
class std_top_block (gr.top_block):
def __init__ (self, parent, panel, vbox, argv):