+static void
+settings_notify (GConfClient * client, guint cnxn_id, GConfEntry * entry, gpointer user_data)
+{
+ AppData * appdata = (AppData *) user_data;
+
+ g_debug ("%s changed", gconf_entry_get_key (entry));
+
+ if (strcmp (gconf_entry_get_key (entry), GCONF_KEY_ALGORITHM) == 0) {
+ if (gconf_entry_get_value (entry) != NULL && gconf_entry_get_value (entry)->type == GCONF_VALUE_INT) {
+ g_object_set (G_OBJECT (appdata->pitch),
+ "algorithm", gconf_value_get_int (gconf_entry_get_value (entry)),
+ NULL);
+ }
+ }
+ else if (strcmp (gconf_entry_get_key (entry), GCONF_KEY_CALIBRATION) == 0) {
+ /* TODO */
+ }
+ else if (strcmp (gconf_entry_get_key (entry), GCONF_KEY_DISPLAY_KEEPALIVE) == 0) {
+ if (gconf_entry_get_value (entry) != NULL && gconf_entry_get_value (entry)->type == GCONF_VALUE_BOOL) {
+ appdata->display_keepalive = gconf_value_get_bool (gconf_entry_get_value (entry));
+
+ if (appdata->display_keepalive && appdata->display_timer_id == 0)
+ display_keepalive (user_data);
+ else
+ display_keepalive_stop (appdata);
+ }
+ }
+ else {
+ g_warning ("unknown GConf key `%s'", gconf_entry_get_key (entry));
+ }
+}
+