GNOME Bugzilla – Bug 629615
Plugin Preference value save problem
Last modified: 2010-09-14 08:09:18 UTC
Hi, Our poky SDK get an improvement request in poky bugzilla, that the preference settings should be project specific instead of global. We are using anjuta_preferences registration and get methods, so it is global. So now I have a question, does anjuta itself has some support interface for this? So that I can save each project's preference settings into project related files. Thanks a lot for your help! criping
There is the AnjutaSession interface that allows you to save values to the project (project = session). But that requires you to listen to the "save-session" and "load-session". In theorie, there is a flag in the preferences definition that makes preferences project-wide but it isn't used until now. I plan to add support for this with the GSettings migration in the next cycle. As this is not a bug (strictly speaking) I would like to continue that discussion on the mailing list. Thanks!
Hi, John Thanks a lot for the information! So you mean if the flag is used, we can then save the settings into project-wide preferences storage (save-session) and get the project-specific settings from the project-wide preferences storage (save-session)? More question, and if we want to have a default global settings as well as session settings, during session load, if I did not find session specific settings, I will use global settings. Else, use session(project) specific preference storage data. Is this your anticipated behavior? Thanks a lot! criping
Hi! > So you mean if the flag is used, we can then save the settings into > project-wide preferences storage (save-session) and get the project-specific > settings from the project-wide preferences storage (save-session)? That's the plan for now, yes. > More question, and if we want to have a default global settings as well as > session settings, during session load, if I did not find session specific > settings, I will use global settings. Else, use session(project) specific > preference storage data. Is this your anticipated behavior? I haven't thought about it too much yet but in general having a fallback might be a nice idea.