Mercurial > audlegacy
changeset 3686:259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
author | William Pitcock <nenolod@atheme.org> |
---|---|
date | Tue, 02 Oct 2007 21:21:50 -0500 |
parents | 0ba593887cae |
children | 12e11b15b549 |
files | src/audacious/configdb.c src/audacious/configdb.h src/audacious/main.c src/audacious/output.c src/audacious/ui_preferences.c |
diffstat | 5 files changed, 154 insertions(+), 154 deletions(-) [+] |
line wrap: on
line diff
--- a/src/audacious/configdb.c Mon Oct 01 23:39:22 2007 -0500 +++ b/src/audacious/configdb.c Tue Oct 02 21:21:50 2007 -0500 @@ -37,7 +37,7 @@ ConfigDb * -bmp_cfg_db_open() +cfg_db_open() { ConfigDb *db; @@ -55,14 +55,14 @@ } void -bmp_cfg_db_close(ConfigDb * db) +cfg_db_close(ConfigDb * db) { mcs_destroy(db->handle); g_free(db); } gboolean -bmp_cfg_db_get_string(ConfigDb * db, +cfg_db_get_string(ConfigDb * db, const gchar * section, const gchar * key, gchar ** value) @@ -74,7 +74,7 @@ } gboolean -bmp_cfg_db_get_int(ConfigDb * db, +cfg_db_get_int(ConfigDb * db, const gchar * section, const gchar * key, gint * value) { if (!section) @@ -84,7 +84,7 @@ } gboolean -bmp_cfg_db_get_bool(ConfigDb * db, +cfg_db_get_bool(ConfigDb * db, const gchar * section, const gchar * key, gboolean * value) @@ -96,7 +96,7 @@ } gboolean -bmp_cfg_db_get_float(ConfigDb * db, +cfg_db_get_float(ConfigDb * db, const gchar * section, const gchar * key, gfloat * value) @@ -108,7 +108,7 @@ } gboolean -bmp_cfg_db_get_double(ConfigDb * db, +cfg_db_get_double(ConfigDb * db, const gchar * section, const gchar * key, gdouble * value) @@ -120,7 +120,7 @@ } void -bmp_cfg_db_set_string(ConfigDb * db, +cfg_db_set_string(ConfigDb * db, const gchar * section, const gchar * key, const gchar * value) @@ -132,7 +132,7 @@ } void -bmp_cfg_db_set_int(ConfigDb * db, +cfg_db_set_int(ConfigDb * db, const gchar * section, const gchar * key, gint value) @@ -144,7 +144,7 @@ } void -bmp_cfg_db_set_bool(ConfigDb * db, +cfg_db_set_bool(ConfigDb * db, const gchar * section, const gchar * key, gboolean value) @@ -156,7 +156,7 @@ } void -bmp_cfg_db_set_float(ConfigDb * db, +cfg_db_set_float(ConfigDb * db, const gchar * section, const gchar * key, gfloat value) @@ -168,7 +168,7 @@ } void -bmp_cfg_db_set_double(ConfigDb * db, +cfg_db_set_double(ConfigDb * db, const gchar * section, const gchar * key, gdouble value) @@ -180,7 +180,7 @@ } void -bmp_cfg_db_unset_key(ConfigDb * db, +cfg_db_unset_key(ConfigDb * db, const gchar * section, const gchar * key) {
--- a/src/audacious/configdb.h Mon Oct 01 23:39:22 2007 -0500 +++ b/src/audacious/configdb.h Tue Oct 02 21:21:50 2007 -0500 @@ -6,7 +6,7 @@ /** * ConfigDb: * - * A configuration database handle, opened with bmp_cfg_db_open(). + * A configuration database handle, opened with cfg_db_open(). **/ typedef struct _ConfigDb ConfigDb; @@ -14,24 +14,24 @@ G_BEGIN_DECLS /** - * bmp_cfg_db_open: + * cfg_db_open: * * Opens the configuration database. * * Return value: A configuration database handle. **/ - ConfigDb *bmp_cfg_db_open(); + ConfigDb *cfg_db_open(); /** - * bmp_cfg_db_close: + * cfg_db_close: * @db: A configuration database handle. * * Closes the configuration database. **/ - void bmp_cfg_db_close(ConfigDb *db); + void cfg_db_close(ConfigDb *db); /** - * bmp_cfg_db_get_string: + * cfg_db_get_string: * @db: A configuration database handle. * @section: The section of the configuration database to search. * @key: The name of the field in the configuration database to look up. @@ -41,13 +41,13 @@ * * Return value: TRUE if successful, FALSE otherwise. **/ - gboolean bmp_cfg_db_get_string(ConfigDb *db, + gboolean cfg_db_get_string(ConfigDb *db, const gchar *section, const gchar *key, gchar **value); /** - * bmp_cfg_db_get_int: + * cfg_db_get_int: * @db: A configuration database handle. * @section: The section of the configuration database to search. * @key: The name of the field in the configuration database to look up. @@ -57,13 +57,13 @@ * * Return value: TRUE if successful, FALSE otherwise. **/ - gboolean bmp_cfg_db_get_int(ConfigDb *db, + gboolean cfg_db_get_int(ConfigDb *db, const gchar *section, const gchar *key, gint *value); /** - * bmp_cfg_db_get_bool: + * cfg_db_get_bool: * @db: A configuration database handle. * @section: The section of the configuration database to search. * @key: The name of the field in the configuration database to look up. @@ -73,13 +73,13 @@ * * Return value: TRUE if successful, FALSE otherwise. **/ - gboolean bmp_cfg_db_get_bool(ConfigDb *db, + gboolean cfg_db_get_bool(ConfigDb *db, const gchar *section, const gchar *key, gboolean *value); /** - * bmp_cfg_db_get_float: + * cfg_db_get_float: * @db: A configuration database handle. * @section: The section of the configuration database to search. * @key: The name of the field in the configuration database to look up. @@ -89,13 +89,13 @@ * * Return value: TRUE if successful, FALSE otherwise. **/ - gboolean bmp_cfg_db_get_float(ConfigDb *db, + gboolean cfg_db_get_float(ConfigDb *db, const gchar *section, const gchar *key, gfloat *value); /** - * bmp_cfg_db_get_double: + * cfg_db_get_double: * @db: A configuration database handle. * @section: The section of the configuration database to search. * @key: The name of the field in the configuration database to look up. @@ -105,13 +105,13 @@ * * Return value: TRUE if successful, FALSE otherwise. **/ - gboolean bmp_cfg_db_get_double(ConfigDb *db, + gboolean cfg_db_get_double(ConfigDb *db, const gchar *section, const gchar *key, gdouble *value); /** - * bmp_cfg_db_set_string: + * cfg_db_set_string: * @db: A configuration database handle. * @section: The section of the configuration database to search. * @key: The name of the field in the configuration database to set. @@ -119,13 +119,13 @@ * * Sets a value in the configuration database. **/ - void bmp_cfg_db_set_string(ConfigDb *db, + void cfg_db_set_string(ConfigDb *db, const gchar *section, const gchar *key, const gchar *value); /** - * bmp_cfg_db_set_int: + * cfg_db_set_int: * @db: A configuration database handle. * @section: The section of the configuration database to search. * @key: The name of the field in the configuration database to set. @@ -133,13 +133,13 @@ * * Sets a value in the configuration database. **/ - void bmp_cfg_db_set_int(ConfigDb *db, + void cfg_db_set_int(ConfigDb *db, const gchar *section, const gchar *key, gint value); /** - * bmp_cfg_db_set_bool: + * cfg_db_set_bool: * @db: A configuration database handle. * @section: The section of the configuration database to search. * @key: The name of the field in the configuration database to set. @@ -147,13 +147,13 @@ * * Sets a value in the configuration database. **/ - void bmp_cfg_db_set_bool(ConfigDb *db, + void cfg_db_set_bool(ConfigDb *db, const gchar *section, const gchar *key, gboolean value); /** - * bmp_cfg_db_set_float: + * cfg_db_set_float: * @db: A configuration database handle. * @section: The section of the configuration database to search. * @key: The name of the field in the configuration database to set. @@ -161,13 +161,13 @@ * * Sets a value in the configuration database. **/ - void bmp_cfg_db_set_float(ConfigDb *db, + void cfg_db_set_float(ConfigDb *db, const gchar *section, const gchar *key, gfloat value); /** - * bmp_cfg_db_set_double: + * cfg_db_set_double: * @db: A configuration database handle. * @section: The section of the configuration database to search. * @key: The name of the field in the configuration database to set. @@ -175,20 +175,20 @@ * * Sets a value in the configuration database. **/ - void bmp_cfg_db_set_double(ConfigDb *db, + void cfg_db_set_double(ConfigDb *db, const gchar *section, const gchar *key, gdouble value); /** - * bmp_cfg_db_unset_key: + * cfg_db_unset_key: * @db: A configuration database handle. * @section: The section of the configuration database to search. * @key: The name of the field in the configuration database to set. * * Removes a value from the configuration database. **/ - void bmp_cfg_db_unset_key(ConfigDb *db, + void cfg_db_unset_key(ConfigDb *db, const gchar *section, const gchar *key);
--- a/src/audacious/main.c Mon Oct 01 23:39:22 2007 -0500 +++ b/src/audacious/main.c Tue Oct 02 21:21:50 2007 -0500 @@ -579,46 +579,46 @@ memcpy(&cfg, &bmp_default_config, sizeof(BmpConfig)); - db = bmp_cfg_db_open(); + db = cfg_db_open(); for (i = 0; i < ncfgbent; ++i) { - bmp_cfg_db_get_bool(db, NULL, + cfg_db_get_bool(db, NULL, bmp_boolents[i].be_vname, bmp_boolents[i].be_vloc); } for (i = 0; i < ncfgient; ++i) { - bmp_cfg_db_get_int(db, NULL, + cfg_db_get_int(db, NULL, bmp_numents[i].ie_vname, bmp_numents[i].ie_vloc); } for (i = 0; i < ncfgsent; ++i) { - bmp_cfg_db_get_string(db, NULL, + cfg_db_get_string(db, NULL, bmp_strents[i].se_vname, bmp_strents[i].se_vloc); } /* Preset */ - bmp_cfg_db_get_float(db, NULL, "equalizer_preamp", &cfg.equalizer_preamp); + cfg_db_get_float(db, NULL, "equalizer_preamp", &cfg.equalizer_preamp); for (i = 0; i < 10; i++) { gchar eqtext[18]; g_snprintf(eqtext, sizeof(eqtext), "equalizer_band%d", i); - bmp_cfg_db_get_float(db, NULL, eqtext, &cfg.equalizer_bands[i]); + cfg_db_get_float(db, NULL, eqtext, &cfg.equalizer_bands[i]); } /* History */ - if (bmp_cfg_db_get_int(db, NULL, "url_history_length", &length)) { + if (cfg_db_get_int(db, NULL, "url_history_length", &length)) { for (i = 1; i <= length; i++) { gchar str[19], *tmp; g_snprintf(str, sizeof(str), "url_history%d", i); - if (bmp_cfg_db_get_string(db, NULL, str, &tmp)) + if (cfg_db_get_string(db, NULL, str, &tmp)) cfg.url_history = g_list_append(cfg.url_history, tmp); } } - bmp_cfg_db_close(db); + cfg_db_close(db); if (cfg.playlist_font && strlen(cfg.playlist_font) == 0) { @@ -806,23 +806,23 @@ cfg.disabled_iplugins = input_stringify_disabled_list(); - db = bmp_cfg_db_open(); + db = cfg_db_open(); for (i = 0; i < ncfgbent; ++i) if (bmp_boolents[i].be_wrt) - bmp_cfg_db_set_bool(db, NULL, + cfg_db_set_bool(db, NULL, bmp_boolents[i].be_vname, *bmp_boolents[i].be_vloc); for (i = 0; i < ncfgient; ++i) if (bmp_numents[i].ie_wrt) - bmp_cfg_db_set_int(db, NULL, + cfg_db_set_int(db, NULL, bmp_numents[i].ie_vname, *bmp_numents[i].ie_vloc); /* This is a bit lame .. it'll end up being written twice, * could do with being done a bit neater. -larne */ - bmp_cfg_db_set_int(db, NULL, "playlist_position", + cfg_db_set_int(db, NULL, "playlist_position", playlist_get_position(playlist)); /* FIXME: we're looking up SkinnedWindow::x &c ourselves here. @@ -831,98 +831,98 @@ if ( SKINNED_WINDOW(playlistwin)->x != -1 && SKINNED_WINDOW(playlistwin)->y != -1 ) { - bmp_cfg_db_set_int(db, NULL, "playlist_x", + cfg_db_set_int(db, NULL, "playlist_x", SKINNED_WINDOW(playlistwin)->x); - bmp_cfg_db_set_int(db, NULL, "playlist_y", + cfg_db_set_int(db, NULL, "playlist_y", SKINNED_WINDOW(playlistwin)->y); } if ( SKINNED_WINDOW(mainwin)->x != -1 && SKINNED_WINDOW(mainwin)->y != -1 ) { - bmp_cfg_db_set_int(db, NULL, "player_x", + cfg_db_set_int(db, NULL, "player_x", SKINNED_WINDOW(mainwin)->x); - bmp_cfg_db_set_int(db, NULL, "player_y", + cfg_db_set_int(db, NULL, "player_y", SKINNED_WINDOW(mainwin)->y); } if ( SKINNED_WINDOW(equalizerwin)->x != -1 && SKINNED_WINDOW(equalizerwin)->y != -1 ) { - bmp_cfg_db_set_int(db, NULL, "equalizer_x", + cfg_db_set_int(db, NULL, "equalizer_x", SKINNED_WINDOW(equalizerwin)->x); - bmp_cfg_db_set_int(db, NULL, "equalizer_y", + cfg_db_set_int(db, NULL, "equalizer_y", SKINNED_WINDOW(equalizerwin)->y); } - bmp_cfg_db_set_bool(db, NULL, "mainwin_use_xfont", + cfg_db_set_bool(db, NULL, "mainwin_use_xfont", cfg.mainwin_use_xfont); for (i = 0; i < ncfgsent; ++i) { if (bmp_strents[i].se_wrt) - bmp_cfg_db_set_string(db, NULL, + cfg_db_set_string(db, NULL, bmp_strents[i].se_vname, *bmp_strents[i].se_vloc); } - bmp_cfg_db_set_float(db, NULL, "equalizer_preamp", cfg.equalizer_preamp); + cfg_db_set_float(db, NULL, "equalizer_preamp", cfg.equalizer_preamp); for (i = 0; i < 10; i++) { str = g_strdup_printf("equalizer_band%d", i); - bmp_cfg_db_set_float(db, NULL, str, cfg.equalizer_bands[i]); + cfg_db_set_float(db, NULL, str, cfg.equalizer_bands[i]); g_free(str); } if (bmp_active_skin != NULL) { if (bmp_active_skin->path) - bmp_cfg_db_set_string(db, NULL, "skin", bmp_active_skin->path); + cfg_db_set_string(db, NULL, "skin", bmp_active_skin->path); else - bmp_cfg_db_unset_key(db, NULL, "skin"); + cfg_db_unset_key(db, NULL, "skin"); } if (get_current_output_plugin()) - bmp_cfg_db_set_string(db, NULL, "output_plugin", + cfg_db_set_string(db, NULL, "output_plugin", get_current_output_plugin()->filename); else - bmp_cfg_db_unset_key(db, NULL, "output_plugin"); + cfg_db_unset_key(db, NULL, "output_plugin"); str = general_stringify_enabled_list(); if (str) { - bmp_cfg_db_set_string(db, NULL, "enabled_gplugins", str); + cfg_db_set_string(db, NULL, "enabled_gplugins", str); g_free(str); } else - bmp_cfg_db_unset_key(db, NULL, "enabled_gplugins"); + cfg_db_unset_key(db, NULL, "enabled_gplugins"); str = vis_stringify_enabled_list(); if (str) { - bmp_cfg_db_set_string(db, NULL, "enabled_vplugins", str); + cfg_db_set_string(db, NULL, "enabled_vplugins", str); g_free(str); } else - bmp_cfg_db_unset_key(db, NULL, "enabled_vplugins"); + cfg_db_unset_key(db, NULL, "enabled_vplugins"); str = effect_stringify_enabled_list(); if (str) { - bmp_cfg_db_set_string(db, NULL, "enabled_eplugins", str); + cfg_db_set_string(db, NULL, "enabled_eplugins", str); g_free(str); } else - bmp_cfg_db_unset_key(db, NULL, "enabled_eplugins"); + cfg_db_unset_key(db, NULL, "enabled_eplugins"); if (cfg.filesel_path) - bmp_cfg_db_set_string(db, NULL, "filesel_path", cfg.filesel_path); + cfg_db_set_string(db, NULL, "filesel_path", cfg.filesel_path); if (cfg.playlist_path) - bmp_cfg_db_set_string(db, NULL, "playlist_path", cfg.playlist_path); + cfg_db_set_string(db, NULL, "playlist_path", cfg.playlist_path); - bmp_cfg_db_set_int(db, NULL, "url_history_length", + cfg_db_set_int(db, NULL, "url_history_length", g_list_length(cfg.url_history)); for (node = cfg.url_history, i = 1; node; node = g_list_next(node), i++) { str = g_strdup_printf("url_history%d", i); - bmp_cfg_db_set_string(db, NULL, str, node->data); + cfg_db_set_string(db, NULL, str, node->data); g_free(str); } @@ -931,10 +931,10 @@ } else cur_pb_time = -1; cfg.resume_playback_on_startup_time = cur_pb_time; - bmp_cfg_db_set_int(db, NULL, "resume_playback_on_startup_time", + cfg_db_set_int(db, NULL, "resume_playback_on_startup_time", cfg.resume_playback_on_startup_time); - bmp_cfg_db_close(db); + cfg_db_close(db); playlist_save(playlist, bmp_paths[BMP_PATH_PLAYLIST_FILE]);
--- a/src/audacious/output.c Mon Oct 01 23:39:22 2007 -0500 +++ b/src/audacious/output.c Tue Oct 02 21:21:50 2007 -0500 @@ -261,12 +261,12 @@ ConfigDb *db; gboolean src_enabled; gint src_rate, src_type; - db = bmp_cfg_db_open(); + db = cfg_db_open(); - if (bmp_cfg_db_get_bool(db, NULL, "enable_src", &src_enabled) == FALSE) + if (cfg_db_get_bool(db, NULL, "enable_src", &src_enabled) == FALSE) src_enabled = FALSE; - if (bmp_cfg_db_get_int(db, NULL, "src_rate", &src_rate) == FALSE) + if (cfg_db_get_int(db, NULL, "src_rate", &src_rate) == FALSE) overSamplingFs = 48000; else overSamplingFs = src_rate; @@ -275,12 +275,12 @@ if (rate == overSamplingFs) src_enabled = FALSE; - if (bmp_cfg_db_get_int(db, NULL, "src_type", &src_type) == FALSE) + if (cfg_db_get_int(db, NULL, "src_type", &src_type) == FALSE) converter_type = SRC_SINC_BEST_QUALITY; else converter_type = src_type; - bmp_cfg_db_close(db); + cfg_db_close(db); freeSRC();
--- a/src/audacious/ui_preferences.c Mon Oct 01 23:39:22 2007 -0500 +++ b/src/audacious/ui_preferences.c Tue Oct 02 21:21:50 2007 -0500 @@ -706,12 +706,12 @@ ConfigDb *db; gboolean ret; - db = bmp_cfg_db_open(); + db = cfg_db_open(); - if (bmp_cfg_db_get_bool(db, NULL, "use_proxy", &ret) != FALSE) + if (cfg_db_get_bool(db, NULL, "use_proxy", &ret) != FALSE) gtk_toggle_button_set_active(button, ret); - bmp_cfg_db_close(db); + cfg_db_close(db); } static void @@ -721,9 +721,9 @@ ConfigDb *db; gboolean ret = gtk_toggle_button_get_active(button); - db = bmp_cfg_db_open(); - bmp_cfg_db_set_bool(db, NULL, "use_proxy", ret); - bmp_cfg_db_close(db); + db = cfg_db_open(); + cfg_db_set_bool(db, NULL, "use_proxy", ret); + cfg_db_close(db); } static void @@ -733,12 +733,12 @@ ConfigDb *db; gboolean ret; - db = bmp_cfg_db_open(); + db = cfg_db_open(); - if (bmp_cfg_db_get_bool(db, NULL, "proxy_use_auth", &ret) != FALSE) + if (cfg_db_get_bool(db, NULL, "proxy_use_auth", &ret) != FALSE) gtk_toggle_button_set_active(button, ret); - bmp_cfg_db_close(db); + cfg_db_close(db); } static void @@ -748,9 +748,9 @@ ConfigDb *db; gboolean ret = gtk_toggle_button_get_active(button); - db = bmp_cfg_db_open(); - bmp_cfg_db_set_bool(db, NULL, "proxy_use_auth", ret); - bmp_cfg_db_close(db); + db = cfg_db_open(); + cfg_db_set_bool(db, NULL, "proxy_use_auth", ret); + cfg_db_close(db); } static void @@ -760,12 +760,12 @@ ConfigDb *db; gchar *ret; - db = bmp_cfg_db_open(); + db = cfg_db_open(); - if (bmp_cfg_db_get_string(db, NULL, "proxy_host", &ret) != FALSE) + if (cfg_db_get_string(db, NULL, "proxy_host", &ret) != FALSE) gtk_entry_set_text(entry, ret); - bmp_cfg_db_close(db); + cfg_db_close(db); } static void @@ -775,9 +775,9 @@ ConfigDb *db; gchar *ret = g_strdup(gtk_entry_get_text(entry)); - db = bmp_cfg_db_open(); - bmp_cfg_db_set_string(db, NULL, "proxy_host", ret); - bmp_cfg_db_close(db); + db = cfg_db_open(); + cfg_db_set_string(db, NULL, "proxy_host", ret); + cfg_db_close(db); g_free(ret); } @@ -789,12 +789,12 @@ ConfigDb *db; gchar *ret; - db = bmp_cfg_db_open(); + db = cfg_db_open(); - if (bmp_cfg_db_get_string(db, NULL, "proxy_port", &ret) != FALSE) + if (cfg_db_get_string(db, NULL, "proxy_port", &ret) != FALSE) gtk_entry_set_text(entry, ret); - bmp_cfg_db_close(db); + cfg_db_close(db); } static void @@ -804,9 +804,9 @@ ConfigDb *db; gchar *ret = g_strdup(gtk_entry_get_text(entry)); - db = bmp_cfg_db_open(); - bmp_cfg_db_set_string(db, NULL, "proxy_port", ret); - bmp_cfg_db_close(db); + db = cfg_db_open(); + cfg_db_set_string(db, NULL, "proxy_port", ret); + cfg_db_close(db); g_free(ret); } @@ -818,12 +818,12 @@ ConfigDb *db; gchar *ret; - db = bmp_cfg_db_open(); + db = cfg_db_open(); - if (bmp_cfg_db_get_string(db, NULL, "proxy_user", &ret) != FALSE) + if (cfg_db_get_string(db, NULL, "proxy_user", &ret) != FALSE) gtk_entry_set_text(entry, ret); - bmp_cfg_db_close(db); + cfg_db_close(db); } static void @@ -833,9 +833,9 @@ ConfigDb *db; gchar *ret = g_strdup(gtk_entry_get_text(entry)); - db = bmp_cfg_db_open(); - bmp_cfg_db_set_string(db, NULL, "proxy_user", ret); - bmp_cfg_db_close(db); + db = cfg_db_open(); + cfg_db_set_string(db, NULL, "proxy_user", ret); + cfg_db_close(db); g_free(ret); } @@ -847,12 +847,12 @@ ConfigDb *db; gchar *ret; - db = bmp_cfg_db_open(); + db = cfg_db_open(); - if (bmp_cfg_db_get_string(db, NULL, "proxy_pass", &ret) != FALSE) + if (cfg_db_get_string(db, NULL, "proxy_pass", &ret) != FALSE) gtk_entry_set_text(entry, ret); - bmp_cfg_db_close(db); + cfg_db_close(db); } static void @@ -862,9 +862,9 @@ ConfigDb *db; gchar *ret = g_strdup(gtk_entry_get_text(entry)); - db = bmp_cfg_db_open(); - bmp_cfg_db_set_string(db, NULL, "proxy_pass", ret); - bmp_cfg_db_close(db); + db = cfg_db_open(); + cfg_db_set_string(db, NULL, "proxy_pass", ret); + cfg_db_close(db); g_free(ret); } @@ -1022,12 +1022,12 @@ ConfigDb *db; gboolean ret; - db = bmp_cfg_db_open(); + db = cfg_db_open(); - if (bmp_cfg_db_get_bool(db, NULL, "enable_src", &ret) != FALSE) + if (cfg_db_get_bool(db, NULL, "enable_src", &ret) != FALSE) gtk_toggle_button_set_active(button, ret); - bmp_cfg_db_close(db); + cfg_db_close(db); #else gtk_toggle_button_set_active(button, FALSE); gtk_widget_set_sensitive(GTK_WIDGET(button), FALSE); @@ -1041,9 +1041,9 @@ ConfigDb *db; gboolean ret = gtk_toggle_button_get_active(button); - db = bmp_cfg_db_open(); - bmp_cfg_db_set_bool(db, NULL, "enable_src", ret); - bmp_cfg_db_close(db); + db = cfg_db_open(); + cfg_db_set_bool(db, NULL, "enable_src", ret); + cfg_db_close(db); } static void @@ -1054,12 +1054,12 @@ ConfigDb *db; gint value; - db = bmp_cfg_db_open(); + db = cfg_db_open(); - if (bmp_cfg_db_get_int(db, NULL, "src_rate", &value) != FALSE) + if (cfg_db_get_int(db, NULL, "src_rate", &value) != FALSE) gtk_spin_button_set_value(button, (gdouble)value); - bmp_cfg_db_close(db); + cfg_db_close(db); #else gtk_widget_set_sensitive(GTK_WIDGET(button), FALSE); #endif @@ -1072,9 +1072,9 @@ ConfigDb *db; gint value = gtk_spin_button_get_value_as_int(button); - db = bmp_cfg_db_open(); - bmp_cfg_db_set_int(db, NULL, "src_rate", value); - bmp_cfg_db_close(db); + db = cfg_db_open(); + cfg_db_set_int(db, NULL, "src_rate", value); + cfg_db_close(db); } static void @@ -1085,14 +1085,14 @@ ConfigDb *db; gint value; - db = bmp_cfg_db_open(); + db = cfg_db_open(); - if (bmp_cfg_db_get_int(db, NULL, "src_type", &value) != FALSE) + if (cfg_db_get_int(db, NULL, "src_type", &value) != FALSE) gtk_combo_box_set_active(box, value); else gtk_combo_box_set_active(box, 0); - bmp_cfg_db_close(db); + cfg_db_close(db); #else gtk_widget_set_sensitive(GTK_WIDGET(box), FALSE); #endif @@ -1105,9 +1105,9 @@ ConfigDb *db; gint value = gtk_combo_box_get_active(box); - db = bmp_cfg_db_open(); - bmp_cfg_db_set_int(db, NULL, "src_type", value); - bmp_cfg_db_close(db); + db = cfg_db_open(); + cfg_db_set_int(db, NULL, "src_type", value); + cfg_db_close(db); } static void @@ -1475,9 +1475,9 @@ widget2 = glade_xml_get_widget(xml, "skin_refresh_button"); skin_view_update(GTK_TREE_VIEW(widget), GTK_WIDGET(widget2)); /* Change skin name in the config file */ - db = bmp_cfg_db_open(); - bmp_cfg_db_set_string(db, NULL, "skin", path); - bmp_cfg_db_close(db); + db = cfg_db_open(); + cfg_db_set_string(db, NULL, "skin", path); + cfg_db_close(db); } } @@ -1491,9 +1491,9 @@ position = gtk_combo_box_get_active(GTK_COMBO_BOX(combobox)); cfg.chardet_detector = (char *)chardet_detector_presets[position]; - db = bmp_cfg_db_open(); - bmp_cfg_db_set_string(db, NULL, "chardet_detector", cfg.chardet_detector); - bmp_cfg_db_close(db); + db = cfg_db_open(); + cfg_db_set_string(db, NULL, "chardet_detector", cfg.chardet_detector); + cfg_db_close(db); if (data != NULL) gtk_widget_set_sensitive(GTK_WIDGET(data), 1); } @@ -1509,8 +1509,8 @@ gtk_combo_box_append_text(combobox, chardet_detector_presets[i]); } - db = bmp_cfg_db_open(); - if(bmp_cfg_db_get_string(db, NULL, "chardet_detector", &ret) != FALSE) { + db = cfg_db_open(); + if(cfg_db_get_string(db, NULL, "chardet_detector", &ret) != FALSE) { for(i=0; i<n_chardet_detector_presets; i++) { if(!strcmp(chardet_detector_presets[i], ret)) { cfg.chardet_detector = (char *)chardet_detector_presets[i]; @@ -1518,7 +1518,7 @@ } } } - bmp_cfg_db_close(db); + cfg_db_close(db); #ifdef USE_CHARDET gtk_combo_box_set_active(GTK_COMBO_BOX(combobox), index); @@ -1542,9 +1542,9 @@ ConfigDb *db; gchar *ret = NULL; - db = bmp_cfg_db_open(); + db = cfg_db_open(); - if (bmp_cfg_db_get_string(db, NULL, "chardet_fallback", &ret) != FALSE) { + if (cfg_db_get_string(db, NULL, "chardet_fallback", &ret) != FALSE) { if(cfg.chardet_fallback) g_free(cfg.chardet_fallback); @@ -1556,7 +1556,7 @@ gtk_entry_set_text(entry, cfg.chardet_fallback); } - bmp_cfg_db_close(db); + cfg_db_close(db); } static void @@ -1575,14 +1575,14 @@ else cfg.chardet_fallback = ret; - db = bmp_cfg_db_open(); + db = cfg_db_open(); if(cfg.chardet_fallback == NULL || !strcmp(cfg.chardet_fallback, "")) - bmp_cfg_db_set_string(db, NULL, "chardet_fallback", "None"); + cfg_db_set_string(db, NULL, "chardet_fallback", "None"); else - bmp_cfg_db_set_string(db, NULL, "chardet_fallback", cfg.chardet_fallback); + cfg_db_set_string(db, NULL, "chardet_fallback", cfg.chardet_fallback); - bmp_cfg_db_close(db); + cfg_db_close(db); } static void