GNOME Bugzilla – Bug 633191
xsettings: Port GTK+ Modules loading to GSettings
Last modified: 2010-10-26 14:55:44 UTC
As discussed
Created attachment 173256 [details] [review] xsettings: Port GTK+ Modules loading to GSettings Adds the "disabled-gtk-modules" and "enabled-gtk-modules" GSettings keys, for admins to lockdown loading (or not) particular GTK+ modules. The modules that need it will install a .desktop file in $(libdir)/gnome-settings-daemon-3.0/gtk-modules/
Created attachment 173257 [details] [review] xsettings: Port GTK+ Modules loading to GSettings Adds the "disabled-gtk-modules" and "enabled-gtk-modules" GSettings keys, for admins to lockdown loading (or not) particular GTK+ modules. The modules that need it will install a .desktop file in $(libdir)/gnome-settings-daemon-3.0/gtk-modules/
Created attachment 173258 [details] [review] xsettings: Port GTK+ Modules loading to GSettings Adds the "disabled-gtk-modules" and "enabled-gtk-modules" GSettings keys, for admins to lockdown loading (or not) particular GTK+ modules. The modules that need it will install a .desktop file in $(libdir)/gnome-settings-daemon-3.0/gtk-modules/
First patch was missing new files, and the second one was missing handling for non-conditional module loading.
Review of attachment 173258 [details] [review]: ::: plugins/xsettings/gsd-xsettings-gtk.c @@ +211,3 @@ + g_string_append (str, key); + else + g_string_append_printf (str, ":%s", (const char *) key); Could just do if (str->len > 0) g_string_append_c (str, ':'); and avoid the printf here, but no big deal. @@ +246,3 @@ + str = g_string_new (NULL); + g_hash_table_foreach (ht, (GHFunc) stringify_gtk_modules, str); + g_hash_table_destroy (ht); I'm concerned about ordering here. At least the a11y modules have some constraints about the order in which they are loaded. @@ +282,3 @@ + g_source_remove (gtk->priv->timeout); + + gtk->priv->timeout = g_timeout_add (1000, (GSourceFunc) gtk_modules_dir_timeout, gtk); GFileMonitor already has a timeout. You can just set that, instead of doing it manually.
Created attachment 173261 [details] [review] xsettings: Port GTK+ Modules loading to GSettings Adds the "disabled-gtk-modules" and "enabled-gtk-modules" GSettings keys, for admins to lockdown loading (or not) particular GTK+ modules. The modules that need it will install a .desktop file in $(libdir)/gnome-settings-daemon-3.0/gtk-modules/
Comment on attachment 173258 [details] [review] xsettings: Port GTK+ Modules loading to GSettings Fixed the mispelling of "explicitly", removed the use of a timeout as GFileMonitor already does rate limiting. The order problem is solved by loading both modules in the same .desktop file.
Attachment 173261 [details] pushed as 1f51464 - xsettings: Port GTK+ Modules loading to GSettings