How can I add an item to the paroli settings sublist?
neuman.ben at gmail.com
Sat Jul 18 05:15:50 CEST 2009
Laszlo KREKACS wrote:
> On Fri, Jul 17, 2009 at 4:47 AM, Ben Neuman<neuman.ben at gmail.com> wrote:
>> Can a paroli guru tell me the proper way to add my item to the paroli
>> "Settings" list of items? So, for example, I'd like to go into Settings
>> and see my "Hello World Setup" item in the settings sublist.
> Glad, when somebody want to get his/her hands dirty with paroli code!
> Just reading the source (didnt try it out):
> import tichy
> self.mysetting = tichy.settings.Setting(
> 'Network', # name of the group to appear
> 'Call Identification', # name of your setting
> tichy.Text, # type of setting. If unsure tichy.Text is fine.
> value=self.GetCallIdentification(), # to retrieve the setting value,
> define a method
> setter=self.SetCallIdentifaction, # when you set the value of the
> setting, define a method
> options=["on","off","network"]) # predefined options
> The Setting object is defined in paroli-core/tichy/settings.py:
> I suggest you, to read other mini-programs source. Just search for
> in the source, for example:
> paroli-service/phone/gsm.py:295, line 303, line 316
> There are many setting types: normal, number, list, toggle, etc
> Sorry if it looks complicated, Im just trying to help you here;)
I was (mistakenly) assuming that code like what you've posted relied on
the "Network" item being added independently prior to defining the
actual network settings (e.g. "Call Identification"). I see now that we
are "killing two birds with one stone".
More information about the devel