Add meta_prefs_override_preference_location()

Allow a plugin to redirect preferences from one GConf location
to another GConf location. This is useful for keys that need to be
set differently in a plugin-managed environment (like GNOME Shell)
as compared to in standalone Metacity.

Overriding is implemented by overwriting the keys in the arrays
of preferences; a list of the current overrides is stored to allow
proper memory management when an override is itself overriden.
(we need to know whether to free the old keys or not)

This patch cleans up the comments in prefs.c a bit as well; some ideas
about less-exciting potential improvements were removed to make the
comments explaining the structure easier to figure out.

https://bugzilla.gnome.org/show_bug.cgi?id=615586
This commit is contained in:
Owen W. Taylor
2010-04-12 17:39:27 -04:00
parent 97a9726845
commit 95b260f3a9
2 changed files with 194 additions and 29 deletions

View File

@ -74,6 +74,10 @@ void meta_prefs_remove_listener (MetaPrefsChangedFunc func,
gpointer data);
void meta_prefs_init (void);
void meta_prefs_override_preference_location (const char *original_key,
const char *new_key);
const char* meta_preference_to_string (MetaPreference pref);
MetaVirtualModifier meta_prefs_get_mouse_button_mods (void);