static void gth_png_saver_save_options (GthPixbufSaver *base) { GthPngSaver *self = GTH_PNG_SAVER (base); eel_gconf_set_integer (PREF_PNG_COMPRESSION_LEVEL, (int) gtk_adjustment_get_value (GTK_ADJUSTMENT (_gtk_builder_get_widget (self->priv->builder, "png_compression_adjustment")))); }
/** * Migrate the old cookie lifetime preferences to the * new ones (changed in 1.3.19) */ static void migrate_cookie_prefs (void) { int new_val = 0; if (eel_gconf_key_exists (CONF_PERSISTENT_COOKIES_LIFETIME)) { return; } if (eel_gconf_get_boolean (CONF_OLD_COOKIE_WARN)) { new_val = 1; } if (eel_gconf_get_boolean (CONF_OLD_SESSION_LIFETIME)) { new_val = 2; } if (new_val) { eel_gconf_set_integer (CONF_PERSISTENT_COOKIES_LIFETIME, new_val); } }
static void rb_podcast_main_source_cb_interval_changed_cb (GtkComboBox *box, gpointer cb_data) { RBPodcastManager *podcast_mgr; guint index = gtk_combo_box_get_active (box); eel_gconf_set_integer (CONF_STATE_PODCAST_DOWNLOAD_INTERVAL, index); g_object_get (cb_data, "podcast-manager", &podcast_mgr, NULL); rb_podcast_manager_start_sync (podcast_mgr); g_object_unref (podcast_mgr); }
static void mozilla_migrate_font_gconf_key (const char *pixel_key, const char *point_key) { int size; size = eel_gconf_get_integer (pixel_key); if (size > 0) { /* Use doubles to get more accurate arithmetic */ double dpi = (double)mozilla_get_dpi (); double value = (double)eel_gconf_get_integer (pixel_key); gint point = INT_ROUND ((value * 72) / dpi); eel_gconf_set_integer (point_key, point); } }
/* * Work out what settings need migrating, and migrate them */ void migrate_gconf_settings (void) { int conf_version = 0; int i, num_migrate_funcs; if (eel_gconf_key_exists (GALEON_CONFIG_VERSION)) { conf_version = eel_gconf_get_integer (GALEON_CONFIG_VERSION); } num_migrate_funcs = G_N_ELEMENTS(migrate_funcs); if (conf_version >= num_migrate_funcs) return; for (i = conf_version ; i < num_migrate_funcs ; i++ ) { if (migrate_funcs[i]) (migrate_funcs[i])(); } eel_gconf_set_integer (GALEON_CONFIG_VERSION, num_migrate_funcs); }