From 00613b260a36923509eab1811256815269dcd99c Mon Sep 17 00:00:00 2001 From: Johnathan Corgan Date: Thu, 15 Oct 2009 11:00:30 -0700 Subject: [PATCH] Add placeholder panel for console, use old style window size --- gr-wxgui/src/python/term_window.py | 25 +++++++++++++++++++++++-- gr-wxgui/src/python/termsink.py | 7 +++++-- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/gr-wxgui/src/python/term_window.py b/gr-wxgui/src/python/term_window.py index cae19c07..8658e54a 100644 --- a/gr-wxgui/src/python/term_window.py +++ b/gr-wxgui/src/python/term_window.py @@ -22,7 +22,28 @@ import wx import pubsub +DEFAULT_WIN_SIZE = (600, 300) + class term_window(wx.Panel, pubsub.pubsub): - def __init__(self, parent): + def __init__(self, + parent, + size, + ): + pubsub.pubsub.__init__(self) - wx.Panel.__init__(self, parent, style=wx.SIMPLE_BORDER) + wx.Panel.__init__(self, + parent, + size=size, + style=wx.SIMPLE_BORDER, + ) + + self.text_ctrl = wx.TextCtrl(self, + wx.ID_ANY, + value="BOO", + size=size, + style=wx.TE_MULTILINE|wx.TE_READONLY, + ) + + main_sizer = wx.BoxSizer(wx.VERTICAL) + main_sizer.Add(self.text_ctrl, 1, wx.EXPAND) + self.SetSizerAndFit(main_sizer) diff --git a/gr-wxgui/src/python/termsink.py b/gr-wxgui/src/python/termsink.py index 92aba47f..2c583b11 100644 --- a/gr-wxgui/src/python/termsink.py +++ b/gr-wxgui/src/python/termsink.py @@ -24,7 +24,10 @@ import common from gnuradio import gr class termsink(gr.hier_block2, common.wxgui_hb): - def __init__(self,parent): + def __init__(self, + parent, + ): + gr.hier_block2.__init__( self, "termsink", @@ -34,5 +37,5 @@ class termsink(gr.hier_block2, common.wxgui_hb): self.win = term_window.term_window( parent=parent, + size=term_window.DEFAULT_WIN_SIZE, ) - -- 2.30.2