Laszlo KREKACS wrote: > On Fri, Jul 17, 2009 at 4:47 AM, Ben Neuman<[email protected]> 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. >> >> > Hi! > > 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: > http://git.paroli-project.org/?p=paroli.git;a=blob;f=paroli-core/tichy/settings.py;h=18bd57b54456f48e7f9086de1f4609cde6caa74a;hb=HEAD > > I suggest you, to read other mini-programs source. Just search for > tichy.settings.Setting > in the source, for example: > paroli-service/phone/gsm.py:295, line 303, line 316 > > http://git.paroli-project.org/?p=paroli.git;a=blob;f=paroli-services/phone/gsm.py;h=664a8dc9dba33ae5e2688a01ef3742c3f203d9b1;hb=HEAD > > There are many setting types: normal, number, list, toggle, etc > > Sorry if it looks complicated, Im just trying to help you here;) > > Laszlo > > Thanks, Laszlo! 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".
Thanks again. -Ben _______________________________________________ devel mailing list [email protected] https://lists.openmoko.org/mailman/listinfo/devel
