X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=gr-wxgui%2Fsrc%2Fpython%2Fform.py;h=b55b04d73ea44b1ede798d41f0d5dc8beff60b41;hb=ea29b08aeb54227e6628f655ccfdb96fe4d8c378;hp=ea9a8dc9a0086a1bd870589cf66f2d1258171cc7;hpb=18a684bf3dc144c48fc4cc6cc72f5070febd8074;p=debian%2Fgnuradio diff --git a/gr-wxgui/src/python/form.py b/gr-wxgui/src/python/form.py old mode 100755 new mode 100644 index ea9a8dc9..b55b04d7 --- a/gr-wxgui/src/python/form.py +++ b/gr-wxgui/src/python/form.py @@ -6,7 +6,7 @@ # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) +# the Free Software Foundation; either version 3, or (at your option) # any later version. # # GNU Radio is distributed in the hope that it will be useful, @@ -263,7 +263,7 @@ class checkbox_field(field): class radiobox_field(field): - def __init__(self, parent=None, sizer=None, label="", value=None, + def __init__(self, parent=None, sizer=None, label=None, value=None, converter=identity_converter(), callback=None, weight=1, choices=None, major_dimension=1, specify_rows=False): new_id = wx.NewId() @@ -273,9 +273,9 @@ class radiobox_field(field): else: style=wx.RA_SPECIFY_COLS | wx.RA_HORIZONTAL - w = wx.RadioBox(parent, new_id, label, style=style, majorDimension=major_dimension, + w = wx.RadioBox(parent, new_id, label=label, style=style, majorDimension=major_dimension, choices=choices) - self.f = self._pair_with_label(w, parent=parent, sizer=sizer, label=label, weight=weight) + self.f = self._pair_with_label(w, parent=parent, sizer=sizer, label=None, weight=weight) if callback: wx.EVT_RADIOBOX(w, new_id, lambda evt: callback(evt.GetString())) field.__init__(self, converter, value) @@ -338,11 +338,11 @@ class form(dict): # ---------------------------------------------------------------- import sys -from gnuradio.wxgui import stdgui +from gnuradio.wxgui import stdgui2 -class demo_app_flow_graph (stdgui.gui_flow_graph): +class demo_app_flow_graph (stdgui2.std_top_block): def __init__(self, frame, panel, vbox, argv): - stdgui.gui_flow_graph.__init__ (self, frame, panel, vbox, argv) + stdgui2.std_top_block.__init__ (self, frame, panel, vbox, argv) self.frame = frame self.panel = panel @@ -384,7 +384,7 @@ class demo_app_flow_graph (stdgui.gui_flow_graph): def main (): - app = stdgui.stdapp (demo_app_flow_graph, "wxgui form demo", nstatus=1) + app = stdgui2.stdapp(demo_app_flow_graph, "wxgui form demo", nstatus=1) app.MainLoop () if __name__ == '__main__':