+static void
+on_css_changed(GSettings *prefs_settings, char *key, ChimaraPlayer *self)
+{
+ char *user_css;
+ g_settings_get(prefs_settings, "css-file", "ms", &user_css);
+ if(user_css) {
+ if(!chimara_glk_set_css_from_file(CHIMARA_GLK(self->glk), user_css, NULL)) {
+ /* If the setting didn't point to a CSS file, fail silently and
+ null the setting */
+ g_settings_set(prefs_settings, "css-file", "ms", NULL);
+ }
+ g_free(user_css);
+ }
+}
+