On Tue, 1 Jan 2013 23:30:49 +0400 Igor Murzov <intergalactic.anonym...@gmail.com> said:
> Happy new year everyone! > > While i was playing with eweather, i found out that when its gadget > is removed and module is unloaded, configuration gets lost. > At first i thought that this issue is specific to eweather and > that's some stupid bug, that went unnoticed. > But it looks like configs are handled this way intentionally. > If some gadget can have multiple instances, every instance gets > its own id. When user adds a new instance, NULL is passed to > _gc_init() as id. The same happens, if user unloaded a module in the > past for some reason, then changed his mind and loaded the module once > again. And you may expect that the last configuration is loaded in > this case, but NO... id gets incremented and you'll get the default > settings. That's very strange -- configurations are stored and never > reused again. > That doesn't feel like an expected behaviour to me. I would > expect GADCON_CLIENT_CONFIG_GET() to load the last available > configuration if id is NULL. Or maybe even last id but one when the > gadget that has the last id already exists. So some smart solution > may be required to fix the issue. Any ideas? > hmm module unload SHOULD be separate to the gadcon client config. i designed them to be separate so u can "unload" and "load" a module and magically the gadget appears where it was configured for before. of course each module is in charge of remembering its OWN list of "instances" and names/id's for them and corresponding config for that instance. the gadcon entry is separate and when the gadcon inits it asks for a provider of that name/class - and if it finds one (the module provides it) it asks it to init the gadget... the point was that we could ship default config FULLY populated with every gadget and then only the modules u want provide the gadgets and non-provided modules are just left out with the user non-the-wiser. something has gone wrong here. what you think should work... should. -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) ras...@rasterman.com ------------------------------------------------------------------------------ Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and much more. Get web development skills now with LearnDevNow - 350+ hours of step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122812 _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel