#7940 NORM 9.1.0: sugar-control-panel needs a 'startup' hook.
Zarro Boogs per Child
bugtracker at laptop.org
Wed Aug 13 12:29:05 EDT 2008
#7940: sugar-control-panel needs a 'startup' hook.
---------------------------+------------------------------------------------
Reporter: cscott | Owner: marco
Type: enhancement | Status: new
Priority: normal | Milestone: 9.1.0
Component: sugar | Version: not specified
Resolution: | Keywords:
Next_action: design | Verified: 0
Blockedby: | Blocking:
---------------------------+------------------------------------------------
Comment(by cscott):
From irc discussion with cjb:
cjb::
What do you think about:
"When Sugar starts up and populates its profile from the config file, it
should call set_* on each of the preferences it finds, as if they'd been
set that way by hand in the CP"?
i.e. I don't need a startup method as much as I need the methods I've
already described to be run at startup.
cscott::
i think a startup hook is more general, and less hacky
there's already enough magic in the s-c-p spec: "if a method named get_*
exists", "uses the doc string from the corresponding set_* method" etc.
i'd prefer "if a method named 'module_init' exists in the module, it
will be called." and perhaps a default implementation you could use, which
does what you want if you just 'from controlpanel.xyz import module_init'
if we're fixing the interface, i'd prefer moving the "does an option
exist" check to the 'set' method, so that there's only one magic method
name, and then i don't have to implement get for set-only options (like
reset buttons)
--
Ticket URL: <http://dev.laptop.org/ticket/7940#comment:2>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system
More information about the Bugs
mailing list