+}
+
+void
+on_css_filechooser_file_set(GtkFileChooserButton *button, ChimaraGlk *glk)
+{
+ GError *error = NULL;
+ extern GSettings *prefs_settings;
+ char *filename = gtk_file_chooser_get_filename( GTK_FILE_CHOOSER(button) );
+ if(!chimara_glk_set_css_from_file(glk, filename, &error)) {
+ error_dialog(NULL, error, "There was a problem reading the CSS file: ");
+ g_settings_set(prefs_settings, "css-file", "ms", NULL);
+ } else {
+ g_settings_set(prefs_settings, "css-file", "ms", filename);
+ }
+ g_free(filename);