[chirp_devel] [PATCH] [vx-3] add basic settings support #1291

Jens J.
Wed Jan 8 17:02:24 PST 2014


What about using a dict/keywords to initialize a setting? The below will illustrate my lackluster python:

rsg = RadioSettingsGroup

basic = rsg.new({ name : "basic",
                  description : "basic settings" } # for tooltip over the tab

rs = RadioSetting 


foo = rs.new(
         { name : "foo",
           value : _settings.foo,
           type : "integer",
           range : (0, 100),
           description : "sets values for foo" # tooltips people!
         })


basic.append(foo)

bar = rs.new(
         { name : "bar",
           value : _settings.bar,
           type : "list",
           options : ["A","B","C"],
           description : "choose values for bar"
         })

basic.append(bar)



________________________________
 From: Dan Smith <dsmith at danplanet.com>
To: chirp_devel at intrepid.danplanet.com 
Sent: Wednesday, January 8, 2014 6:45 PM
Subject: Re: [chirp_devel] [PATCH] [vx-3] add basic settings support #1291
 

> +    def get_settings(self):
> +        _settings = self._memobj.settings
> +        basic = RadioSettingGroup("basic", "Basic")
> +        sound = RadioSettingGroup("sound", "Sound")
> +        dtmf = RadioSettingGroup("dtmf", "DTMF")
> +        arts = RadioSettingGroup("arts", "ARTS")
> +        eai = RadioSettingGroup("eai", "Emergency")
> +        msg = RadioSettingGroup("msg", "Messages")
> +        top = RadioSettingGroup("top", "All Settings",
> +                basic, sound, arts, dtmf, eai, msg)

This is a lot of work, nice job. I'd like to start splitting up these
settings methods somehow so that they're not so long. Not sure what the
best way to do that is, but I think we've got to figure out something.

--Dan

_______________________________________________
chirp_devel mailing list
chirp_devel at intrepid.danplanet.com
http://intrepid.danplanet.com/mailman/listinfo/chirp_devel
Developer docs: http://chirp.danplanet.com/projects/chirp/wiki/Developers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://intrepid.danplanet.com/pipermail/chirp_devel/attachments/20140108/a30b949f/attachment-0001.html 


More information about the chirp_devel mailing list