changeset 1071:592ef16386aa trunk

[svn] - use global proxy configuration instead of individual configurations (chainsaw)
author nenolod
date Tue, 16 May 2006 21:52:56 -0700
parents 6e7d0b545473
children 43718511bd0f
files Plugins/Input/flac/configure.c Plugins/Input/flac/plugin.c Plugins/Input/mpg123/configure.c Plugins/Input/mpg123/mpg123.c Plugins/Input/vorbis/configure.c Plugins/Input/vorbis/vorbis.c
diffstat 6 files changed, 27 insertions(+), 531 deletions(-) [+]
line wrap: on
line diff
--- a/Plugins/Input/flac/configure.c	Tue May 16 21:52:31 2006 -0700
+++ b/Plugins/Input/flac/configure.c	Tue May 16 21:52:56 2006 -0700
@@ -110,15 +110,11 @@
 static GtkWidget *resolution_replaygain_bps_out_radio_24bps;
 
 static GtkObject *streaming_size_adj, *streaming_pre_adj;
-static GtkWidget *streaming_proxy_use, *streaming_proxy_host_entry;
-static GtkWidget *streaming_proxy_port_entry, *streaming_save_use, *streaming_save_entry;
-static GtkWidget *streaming_proxy_auth_use;
-static GtkWidget *streaming_proxy_auth_pass_entry, *streaming_proxy_auth_user_entry;
-static GtkWidget *streaming_proxy_auth_user_label, *streaming_proxy_auth_pass_label;
+static GtkWidget *streaming_save_use, *streaming_save_entry;
 #ifdef FLAC_ICECAST
 static GtkWidget *streaming_cast_title, *streaming_udp_title;
 #endif
-static GtkWidget *streaming_proxy_hbox, *streaming_proxy_auth_hbox, *streaming_save_dirbrowser;
+static GtkWidget *streaming_save_dirbrowser;
 static GtkWidget *streaming_save_hbox;
 
 static const gchar *gtk_entry_get_text_1 (GtkWidget *widget);
@@ -153,37 +149,6 @@
 	flac_cfg.stream.http_buffer_size = (gint) GTK_ADJUSTMENT(streaming_size_adj)->value;
 	flac_cfg.stream.http_prebuffer = (gint) GTK_ADJUSTMENT(streaming_pre_adj)->value;
 
-	flac_cfg.stream.use_proxy = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_proxy_use));
-
-#if 0
-	if (flac_cfg.stream.proxy_host != NULL)
-		g_free(flac_cfg.stream.proxy_host);
-#endif
-
-	flac_cfg.stream.proxy_host = g_strdup(gtk_entry_get_text(GTK_ENTRY(streaming_proxy_host_entry)));
-	flac_cfg.stream.proxy_port = atoi(gtk_entry_get_text(GTK_ENTRY(streaming_proxy_port_entry)));
-
-	flac_cfg.stream.proxy_use_auth = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_proxy_auth_use));
-
-#if 0
-	if(flac_cfg.stream.proxy_user != NULL)
-		g_free(flac_cfg.stream.proxy_user);
-#endif
-
-	flac_cfg.stream.proxy_user = NULL;
-	if(strlen(gtk_entry_get_text(GTK_ENTRY(streaming_proxy_auth_user_entry))) > 0)
-		flac_cfg.stream.proxy_user = g_strdup(gtk_entry_get_text(GTK_ENTRY(streaming_proxy_auth_user_entry)));
-
-#if 0
-	if(flac_cfg.stream.proxy_pass != NULL)
-		g_free(flac_cfg.stream.proxy_pass);
-#endif
-
-	flac_cfg.stream.proxy_pass = NULL;
-	if(strlen(gtk_entry_get_text(GTK_ENTRY(streaming_proxy_auth_pass_entry))) > 0)
-		flac_cfg.stream.proxy_pass = g_strdup(gtk_entry_get_text(GTK_ENTRY(streaming_proxy_auth_pass_entry)));
-
-
 	flac_cfg.stream.save_http_stream = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_save_use));
 
 	if (flac_cfg.stream.save_http_path != NULL)
@@ -198,18 +163,6 @@
 
 	bmp_cfg_db_set_int(db, "flac", "stream.http_buffer_size", flac_cfg.stream.http_buffer_size);
 	bmp_cfg_db_set_int(db, "flac", "stream.http_prebuffer", flac_cfg.stream.http_prebuffer);
-	bmp_cfg_db_set_bool(db, "flac", "stream.use_proxy", flac_cfg.stream.use_proxy);
-	bmp_cfg_db_set_string(db, "flac", "stream.proxy_host", flac_cfg.stream.proxy_host);
-	bmp_cfg_db_set_int(db, "flac", "stream.proxy_port", flac_cfg.stream.proxy_port);
-	bmp_cfg_db_set_bool(db, "flac", "stream.proxy_use_auth", flac_cfg.stream.proxy_use_auth);
-	if(flac_cfg.stream.proxy_user)
-		bmp_cfg_db_set_string(db, "flac", "stream.proxy_user", flac_cfg.stream.proxy_user);
-	else
-		bmp_cfg_db_unset_key(db, "flac", "stream.proxy_user");
-	if(flac_cfg.stream.proxy_pass)
-		bmp_cfg_db_set_string(db, "flac", "stream.proxy_pass", flac_cfg.stream.proxy_pass);
-	else
-		bmp_cfg_db_unset_key(db, "flac", "stream.proxy_pass");
 	bmp_cfg_db_set_bool(db, "flac", "stream.save_http_stream", flac_cfg.stream.save_http_stream);
 	bmp_cfg_db_set_string(db, "flac", "stream.save_http_path", flac_cfg.stream.save_http_path);
 #ifdef FLAC_ICECAST
@@ -313,32 +266,6 @@
 	;
 }
 
-static void proxy_use_cb(GtkWidget * w, gpointer data)
-{
-	gboolean use_proxy, use_proxy_auth;
-	(void) w;
-	(void) data;
-
-	use_proxy = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_proxy_use));
-	use_proxy_auth = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_proxy_auth_use));
-
-	gtk_widget_set_sensitive(streaming_proxy_hbox, use_proxy);
-	gtk_widget_set_sensitive(streaming_proxy_auth_use, use_proxy);
-	gtk_widget_set_sensitive(streaming_proxy_auth_hbox, use_proxy && use_proxy_auth);
-}
-
-static void proxy_auth_use_cb(GtkWidget *w, gpointer data)
-{
-	gboolean use_proxy, use_proxy_auth;
-	(void) w;
-	(void) data;
-
-	use_proxy = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_proxy_use));
-	use_proxy_auth = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_proxy_auth_use));
-
-	gtk_widget_set_sensitive(streaming_proxy_auth_hbox, use_proxy && use_proxy_auth);
-}
-
 static void streaming_save_dirbrowser_cb(gchar * dir)
 {
 	gtk_entry_set_text(GTK_ENTRY(streaming_save_entry), dir);
@@ -385,14 +312,11 @@
 	GtkWidget *streaming_buf_frame, *streaming_buf_hbox;
 	GtkWidget *streaming_size_box, *streaming_size_label, *streaming_size_spin;
 	GtkWidget *streaming_pre_box, *streaming_pre_label, *streaming_pre_spin;
-	GtkWidget *streaming_proxy_frame, *streaming_proxy_vbox;
-	GtkWidget *streaming_proxy_port_label, 	*streaming_proxy_host_label;
 	GtkWidget *streaming_save_frame, *streaming_save_vbox;
 	GtkWidget *streaming_save_label, *streaming_save_browse;
 #ifdef FLAC_ICECAST
 	GtkWidget *streaming_cast_frame, *streaming_cast_vbox;
 #endif
-	char *temp;
 
 	if (flac_configurewin != NULL) {
 		gdk_window_raise(flac_configurewin->window);
@@ -648,71 +572,6 @@
 	gtk_widget_set_usize(streaming_pre_spin, 60, -1);
 	gtk_box_pack_start(GTK_BOX(streaming_pre_box), streaming_pre_spin, FALSE, FALSE, 0);
 
- 	/*
- 	 * Proxy config.
- 	 */
-	streaming_proxy_frame = gtk_frame_new(_("Proxy:"));
-	gtk_container_set_border_width(GTK_CONTAINER(streaming_proxy_frame), 5);
-	gtk_box_pack_start(GTK_BOX(streaming_vbox), streaming_proxy_frame, FALSE, FALSE, 0);
-
-	streaming_proxy_vbox = gtk_vbox_new(FALSE, 5);
-	gtk_container_set_border_width(GTK_CONTAINER(streaming_proxy_vbox), 5);
-	gtk_container_add(GTK_CONTAINER(streaming_proxy_frame), streaming_proxy_vbox);
-
-	streaming_proxy_use = gtk_check_button_new_with_label(_("Use proxy"));
-	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(streaming_proxy_use), flac_cfg.stream.use_proxy);
-	gtk_signal_connect(GTK_OBJECT(streaming_proxy_use), "clicked", GTK_SIGNAL_FUNC(proxy_use_cb), NULL);
-	gtk_box_pack_start(GTK_BOX(streaming_proxy_vbox), streaming_proxy_use, FALSE, FALSE, 0);
-
-	streaming_proxy_hbox = gtk_hbox_new(FALSE, 5);
-	gtk_widget_set_sensitive(streaming_proxy_hbox, flac_cfg.stream.use_proxy);
-	gtk_box_pack_start(GTK_BOX(streaming_proxy_vbox), streaming_proxy_hbox, FALSE, FALSE, 0);
-
-	streaming_proxy_host_label = gtk_label_new(_("Host:"));
-	gtk_box_pack_start(GTK_BOX(streaming_proxy_hbox), streaming_proxy_host_label, FALSE, FALSE, 0);
-
-	streaming_proxy_host_entry = gtk_entry_new();
-	gtk_entry_set_text(GTK_ENTRY(streaming_proxy_host_entry), flac_cfg.stream.proxy_host);
-	gtk_box_pack_start(GTK_BOX(streaming_proxy_hbox), streaming_proxy_host_entry, TRUE, TRUE, 0);
-
-	streaming_proxy_port_label = gtk_label_new(_("Port:"));
-	gtk_box_pack_start(GTK_BOX(streaming_proxy_hbox), streaming_proxy_port_label, FALSE, FALSE, 0);
-
-	streaming_proxy_port_entry = gtk_entry_new();
-	gtk_widget_set_usize(streaming_proxy_port_entry, 50, -1);
-	temp = g_strdup_printf("%d", flac_cfg.stream.proxy_port);
-	gtk_entry_set_text(GTK_ENTRY(streaming_proxy_port_entry), temp);
-	g_free(temp);
-	gtk_box_pack_start(GTK_BOX(streaming_proxy_hbox), streaming_proxy_port_entry, FALSE, FALSE, 0);
-
-	streaming_proxy_auth_use = gtk_check_button_new_with_label(_("Use authentication"));
-	gtk_widget_set_sensitive(streaming_proxy_auth_use, flac_cfg.stream.use_proxy);
-	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(streaming_proxy_auth_use), flac_cfg.stream.proxy_use_auth);
-	gtk_signal_connect(GTK_OBJECT(streaming_proxy_auth_use), "clicked", GTK_SIGNAL_FUNC(proxy_auth_use_cb), NULL);
-	gtk_box_pack_start(GTK_BOX(streaming_proxy_vbox), streaming_proxy_auth_use, FALSE, FALSE, 0);
-
-	streaming_proxy_auth_hbox = gtk_hbox_new(FALSE, 5);
-	gtk_widget_set_sensitive(streaming_proxy_auth_hbox, flac_cfg.stream.use_proxy && flac_cfg.stream.proxy_use_auth);
-	gtk_box_pack_start(GTK_BOX(streaming_proxy_vbox), streaming_proxy_auth_hbox, FALSE, FALSE, 0);
-
-	streaming_proxy_auth_user_label = gtk_label_new(_("Username:"));
-	gtk_box_pack_start(GTK_BOX(streaming_proxy_auth_hbox), streaming_proxy_auth_user_label, FALSE, FALSE, 0);
-
-	streaming_proxy_auth_user_entry = gtk_entry_new();
-	if(flac_cfg.stream.proxy_user)
-		gtk_entry_set_text(GTK_ENTRY(streaming_proxy_auth_user_entry), flac_cfg.stream.proxy_user);
-	gtk_box_pack_start(GTK_BOX(streaming_proxy_auth_hbox), streaming_proxy_auth_user_entry, TRUE, TRUE, 0);
-
-	streaming_proxy_auth_pass_label = gtk_label_new(_("Password:"));
-	gtk_box_pack_start(GTK_BOX(streaming_proxy_auth_hbox), streaming_proxy_auth_pass_label, FALSE, FALSE, 0);
-
-	streaming_proxy_auth_pass_entry = gtk_entry_new();
-	if(flac_cfg.stream.proxy_pass)
-		gtk_entry_set_text(GTK_ENTRY(streaming_proxy_auth_pass_entry), flac_cfg.stream.proxy_pass);
-	gtk_entry_set_visibility(GTK_ENTRY(streaming_proxy_auth_pass_entry), FALSE);
-	gtk_box_pack_start(GTK_BOX(streaming_proxy_auth_hbox), streaming_proxy_auth_pass_entry, TRUE, TRUE, 0);
-
-
 	/*
 	 * Save to disk config.
 	 */
--- a/Plugins/Input/flac/plugin.c	Tue May 16 21:52:31 2006 -0700
+++ b/Plugins/Input/flac/plugin.c	Tue May 16 21:52:56 2006 -0700
@@ -260,12 +260,6 @@
 
 	bmp_cfg_db_get_int(db, "flac", "stream.http_buffer_size", &flac_cfg.stream.http_buffer_size);
 	bmp_cfg_db_get_int(db, "flac", "stream.http_prebuffer", &flac_cfg.stream.http_prebuffer);
-	bmp_cfg_db_get_bool(db, "flac", "stream.use_proxy", &flac_cfg.stream.use_proxy);
-	bmp_cfg_db_get_string(db, "flac", "stream.proxy_host", &flac_cfg.stream.proxy_host);
-	bmp_cfg_db_get_int(db, "flac", "stream.proxy_port", &flac_cfg.stream.proxy_port);
-	bmp_cfg_db_get_bool(db, "flac", "stream.proxy_use_auth", &flac_cfg.stream.proxy_use_auth);
-	bmp_cfg_db_get_string(db, "flac", "stream.proxy_user", &flac_cfg.stream.proxy_user);
-	bmp_cfg_db_get_string(db, "flac", "stream.proxy_pass", &flac_cfg.stream.proxy_pass);
 	bmp_cfg_db_get_bool(db, "flac", "stream.save_http_stream", &flac_cfg.stream.save_http_stream);
 	if (!bmp_cfg_db_get_string(db, "flac", "stream.save_http_path", &flac_cfg.stream.save_http_path) ||
 		 ! *flac_cfg.stream.save_http_path) {
@@ -283,6 +277,13 @@
  	decoder_func_table_ = DECODER_FUNCS [DECODER_FILE];
 	decoder_ = decoder_func_table_ -> new_decoder();
 
+	bmp_cfg_db_get_bool(db, NULL, "use_proxy", &flac_cfg.stream.use_proxy);
+	bmp_cfg_db_get_string(db, NULL, "proxy_host", &flac_cfg.stream.proxy_host);
+	bmp_cfg_db_get_int(db, NULL, "proxy_port", &flac_cfg.stream.proxy_port);
+	bmp_cfg_db_get_bool(db, NULL, "proxy_use_auth", &flac_cfg.stream.proxy_use_auth);
+	bmp_cfg_db_get_string(db, NULL, "proxy_user", &flac_cfg.stream.proxy_user);
+	bmp_cfg_db_get_string(db, NULL, "proxy_pass", &flac_cfg.stream.proxy_pass);
+
 	bmp_cfg_db_close(db);
 }
 
--- a/Plugins/Input/mpg123/configure.c	Tue May 16 21:52:31 2006 -0700
+++ b/Plugins/Input/mpg123/configure.c	Tue May 16 21:52:56 2006 -0700
@@ -24,17 +24,9 @@
     *decode_freq_1to2, *decode_freq_1to4;
 
 static GtkObject *streaming_size_adj, *streaming_pre_adj;
-static GtkWidget *streaming_proxy_use, *streaming_proxy_host_entry;
-static GtkWidget *streaming_proxy_port_entry, *streaming_save_use,
-    *streaming_save_entry;
-static GtkWidget *streaming_proxy_auth_use;
-static GtkWidget *streaming_proxy_auth_pass_entry,
-    *streaming_proxy_auth_user_entry;
-static GtkWidget *streaming_proxy_auth_user_label,
-    *streaming_proxy_auth_pass_label;
+static GtkWidget *streaming_save_use, *streaming_save_entry;
 static GtkWidget *streaming_cast_title, *streaming_udp_title;
-static GtkWidget *streaming_proxy_hbox, *streaming_proxy_auth_hbox,
-    *streaming_save_dirbrowser;
+static GtkWidget *streaming_save_dirbrowser;
 static GtkWidget *streaming_save_hbox, *title_id3_box, *title_tag_desc;
 static GtkWidget *title_override, *title_id3_entry, *title_id3v2_disable;
 
@@ -71,37 +63,6 @@
     mpg123_cfg.http_prebuffer =
         (gint) GTK_ADJUSTMENT(streaming_pre_adj)->value;
 
-    mpg123_cfg.use_proxy =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_proxy_use));
-    g_free(mpg123_cfg.proxy_host);
-    mpg123_cfg.proxy_host =
-        g_strdup(gtk_entry_get_text(GTK_ENTRY(streaming_proxy_host_entry)));
-    mpg123_cfg.proxy_port =
-        atoi(gtk_entry_get_text(GTK_ENTRY(streaming_proxy_port_entry)));
-
-    mpg123_cfg.proxy_use_auth =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
-                                     (streaming_proxy_auth_use));
-
-    if (mpg123_cfg.proxy_user)
-        g_free(mpg123_cfg.proxy_user);
-    mpg123_cfg.proxy_user = NULL;
-    if (strlen
-        (gtk_entry_get_text(GTK_ENTRY(streaming_proxy_auth_user_entry))) > 0)
-        mpg123_cfg.proxy_user =
-            g_strdup(gtk_entry_get_text
-                     (GTK_ENTRY(streaming_proxy_auth_user_entry)));
-
-    if (mpg123_cfg.proxy_pass)
-        g_free(mpg123_cfg.proxy_pass);
-    mpg123_cfg.proxy_pass = NULL;
-    if (strlen
-        (gtk_entry_get_text(GTK_ENTRY(streaming_proxy_auth_pass_entry))) > 0)
-        mpg123_cfg.proxy_pass =
-            g_strdup(gtk_entry_get_text
-                     (GTK_ENTRY(streaming_proxy_auth_pass_entry)));
-
-
     mpg123_cfg.save_http_stream =
         gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_save_use));
     if (mpg123_cfg.save_http_path)
@@ -132,21 +93,6 @@
                        mpg123_cfg.http_buffer_size);
     bmp_cfg_db_set_int(db, "MPG123", "http_prebuffer",
                        mpg123_cfg.http_prebuffer);
-    bmp_cfg_db_set_bool(db, "MPG123", "use_proxy", mpg123_cfg.use_proxy);
-    bmp_cfg_db_set_string(db, "MPG123", "proxy_host", mpg123_cfg.proxy_host);
-    bmp_cfg_db_set_int(db, "MPG123", "proxy_port", mpg123_cfg.proxy_port);
-    bmp_cfg_db_set_bool(db, "MPG123", "proxy_use_auth",
-                        mpg123_cfg.proxy_use_auth);
-    if (mpg123_cfg.proxy_user)
-        bmp_cfg_db_set_string(db, "MPG123", "proxy_user",
-                              mpg123_cfg.proxy_user);
-    else
-        bmp_cfg_db_unset_key(db, "MPG123", "proxy_user");
-    if (mpg123_cfg.proxy_pass)
-        bmp_cfg_db_set_string(db, "MPG123", "proxy_pass",
-                              mpg123_cfg.proxy_pass);
-    else
-        bmp_cfg_db_unset_key(db, "MPG123", "proxy_pass");
     bmp_cfg_db_set_bool(db, "MPG123", "save_http_stream",
                         mpg123_cfg.save_http_stream);
     bmp_cfg_db_set_string(db, "MPG123", "save_http_path",
@@ -169,38 +115,6 @@
 }
 
 static void
-proxy_use_cb(GtkWidget * w, gpointer data)
-{
-    gboolean use_proxy, use_proxy_auth;
-
-    use_proxy =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_proxy_use));
-    use_proxy_auth =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
-                                     (streaming_proxy_auth_use));
-
-    gtk_widget_set_sensitive(streaming_proxy_hbox, use_proxy);
-    gtk_widget_set_sensitive(streaming_proxy_auth_use, use_proxy);
-    gtk_widget_set_sensitive(streaming_proxy_auth_hbox, use_proxy
-                             && use_proxy_auth);
-}
-
-static void
-proxy_auth_use_cb(GtkWidget * w, gpointer data)
-{
-    gboolean use_proxy, use_proxy_auth;
-
-    use_proxy =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_proxy_use));
-    use_proxy_auth =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
-                                     (streaming_proxy_auth_use));
-
-    gtk_widget_set_sensitive(streaming_proxy_auth_hbox, use_proxy
-                             && use_proxy_auth);
-}
-
-static void
 streaming_save_dirbrowser_cb(gchar * dir)
 {
     gtk_entry_set_text(GTK_ENTRY(streaming_save_entry), dir);
@@ -272,16 +186,12 @@
     GtkWidget *streaming_size_box, *streaming_size_label,
         *streaming_size_spin;
     GtkWidget *streaming_pre_box, *streaming_pre_label, *streaming_pre_spin;
-    GtkWidget *streaming_proxy_frame, *streaming_proxy_vbox;
-    GtkWidget *streaming_proxy_port_label, *streaming_proxy_host_label;
     GtkWidget *streaming_save_frame, *streaming_save_vbox;
     GtkWidget *streaming_save_label, *streaming_save_browse;
     GtkWidget *streaming_cast_frame, *streaming_cast_vbox;
     GtkWidget *title_frame, *title_id3_vbox, *title_id3_label;
     GtkWidget *bbox, *ok, *cancel;
 
-    char *temp;
-
     if (mpg123_configurewin != NULL) {
         gtk_window_present(GTK_WINDOW(mpg123_configurewin));
         return;
@@ -447,97 +357,6 @@
                        FALSE, FALSE, 0);
 
     /*
-     * Proxy config.
-     */
-    streaming_proxy_frame = gtk_frame_new(_("Proxy:"));
-    gtk_container_set_border_width(GTK_CONTAINER(streaming_proxy_frame), 5);
-    gtk_box_pack_start(GTK_BOX(streaming_vbox), streaming_proxy_frame,
-                       FALSE, FALSE, 0);
-
-    streaming_proxy_vbox = gtk_vbox_new(FALSE, 5);
-    gtk_container_set_border_width(GTK_CONTAINER(streaming_proxy_vbox), 5);
-    gtk_container_add(GTK_CONTAINER(streaming_proxy_frame),
-                      streaming_proxy_vbox);
-
-    streaming_proxy_use = gtk_check_button_new_with_label(_("Use proxy"));
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(streaming_proxy_use),
-                                 mpg123_cfg.use_proxy);
-    g_signal_connect(G_OBJECT(streaming_proxy_use), "clicked",
-                     G_CALLBACK(proxy_use_cb), NULL);
-    gtk_box_pack_start(GTK_BOX(streaming_proxy_vbox), streaming_proxy_use,
-                       FALSE, FALSE, 0);
-
-    streaming_proxy_hbox = gtk_hbox_new(FALSE, 5);
-    gtk_widget_set_sensitive(streaming_proxy_hbox, mpg123_cfg.use_proxy);
-    gtk_box_pack_start(GTK_BOX(streaming_proxy_vbox), streaming_proxy_hbox,
-                       FALSE, FALSE, 0);
-
-    streaming_proxy_host_label = gtk_label_new(_("Host:"));
-    gtk_box_pack_start(GTK_BOX(streaming_proxy_hbox),
-                       streaming_proxy_host_label, FALSE, FALSE, 0);
-
-    streaming_proxy_host_entry = gtk_entry_new();
-    gtk_entry_set_text(GTK_ENTRY(streaming_proxy_host_entry),
-                       mpg123_cfg.proxy_host);
-    gtk_box_pack_start(GTK_BOX(streaming_proxy_hbox),
-                       streaming_proxy_host_entry, TRUE, TRUE, 0);
-
-    streaming_proxy_port_label = gtk_label_new(_("Port:"));
-    gtk_box_pack_start(GTK_BOX(streaming_proxy_hbox),
-                       streaming_proxy_port_label, FALSE, FALSE, 0);
-
-    streaming_proxy_port_entry = gtk_entry_new();
-    gtk_widget_set_usize(streaming_proxy_port_entry, 50, -1);
-    temp = g_strdup_printf("%d", mpg123_cfg.proxy_port);
-    gtk_entry_set_text(GTK_ENTRY(streaming_proxy_port_entry), temp);
-    g_free(temp);
-    gtk_box_pack_start(GTK_BOX(streaming_proxy_hbox),
-                       streaming_proxy_port_entry, FALSE, FALSE, 0);
-
-    streaming_proxy_auth_use =
-        gtk_check_button_new_with_label(_("Use authentication"));
-    gtk_widget_set_sensitive(streaming_proxy_auth_use, mpg123_cfg.use_proxy);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
-                                 (streaming_proxy_auth_use),
-                                 mpg123_cfg.proxy_use_auth);
-    g_signal_connect(G_OBJECT(streaming_proxy_auth_use), "clicked",
-                     G_CALLBACK(proxy_auth_use_cb), NULL);
-    gtk_box_pack_start(GTK_BOX(streaming_proxy_vbox),
-                       streaming_proxy_auth_use, FALSE, FALSE, 0);
-
-    streaming_proxy_auth_hbox = gtk_hbox_new(FALSE, 5);
-    gtk_widget_set_sensitive(streaming_proxy_auth_hbox,
-                             mpg123_cfg.use_proxy
-                             && mpg123_cfg.proxy_use_auth);
-    gtk_box_pack_start(GTK_BOX(streaming_proxy_vbox),
-                       streaming_proxy_auth_hbox, FALSE, FALSE, 0);
-
-    streaming_proxy_auth_user_label = gtk_label_new(_("Username:"));
-    gtk_box_pack_start(GTK_BOX(streaming_proxy_auth_hbox),
-                       streaming_proxy_auth_user_label, FALSE, FALSE, 0);
-
-    streaming_proxy_auth_user_entry = gtk_entry_new();
-    if (mpg123_cfg.proxy_user)
-        gtk_entry_set_text(GTK_ENTRY(streaming_proxy_auth_user_entry),
-                           mpg123_cfg.proxy_user);
-    gtk_box_pack_start(GTK_BOX(streaming_proxy_auth_hbox),
-                       streaming_proxy_auth_user_entry, TRUE, TRUE, 0);
-
-    streaming_proxy_auth_pass_label = gtk_label_new(_("Password:"));
-    gtk_box_pack_start(GTK_BOX(streaming_proxy_auth_hbox),
-                       streaming_proxy_auth_pass_label, FALSE, FALSE, 0);
-
-    streaming_proxy_auth_pass_entry = gtk_entry_new();
-    if (mpg123_cfg.proxy_pass)
-        gtk_entry_set_text(GTK_ENTRY(streaming_proxy_auth_pass_entry),
-                           mpg123_cfg.proxy_pass);
-    gtk_entry_set_visibility(GTK_ENTRY(streaming_proxy_auth_pass_entry),
-                             FALSE);
-    gtk_box_pack_start(GTK_BOX(streaming_proxy_auth_hbox),
-                       streaming_proxy_auth_pass_entry, TRUE, TRUE, 0);
-
-
-    /*
      * Save to disk config.
      */
     streaming_save_frame = gtk_frame_new(_("Save stream to disk:"));
--- a/Plugins/Input/mpg123/mpg123.c	Tue May 16 21:52:31 2006 -0700
+++ b/Plugins/Input/mpg123/mpg123.c	Tue May 16 21:52:56 2006 -0700
@@ -189,16 +189,6 @@
     bmp_cfg_db_get_bool(db, "MPG123", "use_udp_channel",
                         &mpg123_cfg.use_udp_channel);
 
-    bmp_cfg_db_get_bool(db, "MPG123", "use_proxy", &mpg123_cfg.use_proxy);
-    if (!bmp_cfg_db_get_string
-        (db, "MPG123", "proxy_host", &mpg123_cfg.proxy_host))
-        mpg123_cfg.proxy_host = g_strdup("localhost");
-    bmp_cfg_db_get_int(db, "MPG123", "proxy_port", &mpg123_cfg.proxy_port);
-    bmp_cfg_db_get_bool(db, "MPG123", "proxy_use_auth",
-                        &mpg123_cfg.proxy_use_auth);
-    bmp_cfg_db_get_string(db, "MPG123", "proxy_user", &mpg123_cfg.proxy_user);
-    bmp_cfg_db_get_string(db, "MPG123", "proxy_pass", &mpg123_cfg.proxy_pass);
-
     bmp_cfg_db_get_bool(db, "MPG123", "title_override",
                         &mpg123_cfg.title_override);
     bmp_cfg_db_get_bool(db, "MPG123", "disable_id3v2",
@@ -214,6 +204,13 @@
     if (mpg123_cfg.title_encoding_enabled)
         mpg123_id3_encoding_list = g_strsplit_set(mpg123_cfg.title_encoding, ENCODING_SEPARATOR, 0);
 
+    bmp_cfg_db_get_bool(db, NULL, "use_proxy", &mpg123_cfg.use_proxy);
+    bmp_cfg_db_get_string(db, NULL, "proxy_host", &mpg123_cfg.proxy_host);
+    bmp_cfg_db_get_int(db, NULL, "proxy_port", &mpg123_cfg.proxy_port);
+    bmp_cfg_db_get_bool(db, NULL, "proxy_use_auth", &mpg123_cfg.proxy_use_auth);
+    bmp_cfg_db_get_string(db, NULL, "proxy_user", &mpg123_cfg.proxy_user);
+    bmp_cfg_db_get_string(db, NULL, "proxy_pass", &mpg123_cfg.proxy_pass);
+
     bmp_cfg_db_close(db);
 
     if (mpg123_cfg.resolution != 16 && mpg123_cfg.resolution != 8)
--- a/Plugins/Input/vorbis/configure.c	Tue May 16 21:52:31 2006 -0700
+++ b/Plugins/Input/vorbis/configure.c	Tue May 16 21:52:56 2006 -0700
@@ -21,16 +21,9 @@
 static GtkWidget *vorbis_configurewin = NULL;
 static GtkWidget *vbox, *notebook;
 
-static GtkWidget *streaming_proxy_use, *streaming_proxy_host_entry;
-static GtkWidget *streaming_proxy_port_entry, *streaming_save_entry;
+static GtkWidget *streaming_save_entry;
 static GtkWidget *streaming_save_use, *streaming_size_spin,
     *streaming_pre_spin;
-static GtkWidget *streaming_proxy_auth_use;
-static GtkWidget *streaming_proxy_auth_pass_entry,
-    *streaming_proxy_auth_user_entry;
-static GtkWidget *streaming_proxy_auth_user_label,
-    *streaming_proxy_auth_pass_label;
-static GtkWidget *streaming_proxy_hbox, *streaming_proxy_auth_hbox;
 static GtkWidget *streaming_save_dirbrowser, *streaming_save_hbox;
 static GtkWidget *title_tag_override, *title_tag_box, *title_tag_entry,
     *title_desc;
@@ -54,35 +47,6 @@
     vorbis_cfg.http_prebuffer =
         gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(streaming_pre_spin));
 
-    vorbis_cfg.use_proxy =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_proxy_use));
-    g_free(vorbis_cfg.proxy_host);
-    vorbis_cfg.proxy_host =
-        g_strdup(gtk_entry_get_text(GTK_ENTRY(streaming_proxy_host_entry)));
-    vorbis_cfg.proxy_port =
-        atoi(gtk_entry_get_text(GTK_ENTRY(streaming_proxy_port_entry)));
-
-    vorbis_cfg.proxy_use_auth =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
-                                     (streaming_proxy_auth_use));
-
-    g_free(vorbis_cfg.proxy_user);
-    vorbis_cfg.proxy_user = NULL;
-    if (strlen
-        (gtk_entry_get_text(GTK_ENTRY(streaming_proxy_auth_user_entry))) > 0)
-        vorbis_cfg.proxy_user =
-            g_strdup(gtk_entry_get_text
-                     (GTK_ENTRY(streaming_proxy_auth_user_entry)));
-
-    g_free(vorbis_cfg.proxy_pass);
-    vorbis_cfg.proxy_pass = NULL;
-    if (strlen
-        (gtk_entry_get_text(GTK_ENTRY(streaming_proxy_auth_pass_entry))) > 0)
-        vorbis_cfg.proxy_pass =
-            g_strdup(gtk_entry_get_text
-                     (GTK_ENTRY(streaming_proxy_auth_pass_entry)));
-
-
     vorbis_cfg.save_http_stream =
         gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_save_use));
     g_free(vorbis_cfg.save_http_path);
@@ -116,8 +80,6 @@
                        vorbis_cfg.http_buffer_size);
     bmp_cfg_db_set_int(db, "vorbis", "http_prebuffer",
                        vorbis_cfg.http_prebuffer);
-    bmp_cfg_db_set_bool(db, "vorbis", "use_proxy", vorbis_cfg.use_proxy);
-    bmp_cfg_db_set_string(db, "vorbis", "proxy_host", vorbis_cfg.proxy_host);
     bmp_cfg_db_set_bool(db, "vorbis", "save_http_stream",
                         vorbis_cfg.save_http_stream);
     bmp_cfg_db_set_string(db, "vorbis", "save_http_path",
@@ -125,20 +87,6 @@
     bmp_cfg_db_set_bool(db, "vorbis", "tag_override",
                         vorbis_cfg.tag_override);
     bmp_cfg_db_set_string(db, "vorbis", "tag_format", vorbis_cfg.tag_format);
-    bmp_cfg_db_set_int(db, "vorbis", "proxy_port", vorbis_cfg.proxy_port);
-    bmp_cfg_db_set_bool(db, "vorbis", "proxy_use_auth",
-                        vorbis_cfg.proxy_use_auth);
-    if (vorbis_cfg.proxy_user)
-        bmp_cfg_db_set_string(db, "vorbis", "proxy_user",
-                              vorbis_cfg.proxy_user);
-    else
-        bmp_cfg_db_unset_key(db, "vorbis", "proxy_user");
-
-    if (vorbis_cfg.proxy_pass)
-        bmp_cfg_db_set_string(db, "vorbis", "proxy_pass",
-                              vorbis_cfg.proxy_pass);
-    else
-        bmp_cfg_db_unset_key(db, "vorbis", "proxy_pass");
     bmp_cfg_db_set_bool(db, "vorbis", "use_anticlip",
                         vorbis_cfg.use_anticlip);
     bmp_cfg_db_set_bool(db, "vorbis", "use_replaygain",
@@ -155,38 +103,6 @@
 }
 
 static void
-proxy_use_cb(GtkWidget * w, gpointer data)
-{
-    gboolean use_proxy, use_proxy_auth;
-
-    use_proxy =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_proxy_use));
-    use_proxy_auth =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
-                                     (streaming_proxy_auth_use));
-
-    gtk_widget_set_sensitive(streaming_proxy_hbox, use_proxy);
-    gtk_widget_set_sensitive(streaming_proxy_auth_use, use_proxy);
-    gtk_widget_set_sensitive(streaming_proxy_auth_hbox, use_proxy
-                             && use_proxy_auth);
-}
-
-static void
-proxy_auth_use_cb(GtkWidget * w, gpointer data)
-{
-    gboolean use_proxy, use_proxy_auth;
-
-    use_proxy =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_proxy_use));
-    use_proxy_auth =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
-                                     (streaming_proxy_auth_use));
-
-    gtk_widget_set_sensitive(streaming_proxy_auth_hbox, use_proxy
-                             && use_proxy_auth);
-}
-
-static void
 streaming_save_dirbrowser_cb(gchar * dir)
 {
     gtk_entry_set_text(GTK_ENTRY(streaming_save_entry), dir);
@@ -266,8 +182,6 @@
     GtkWidget *streaming_buf_frame, *streaming_buf_hbox;
     GtkWidget *streaming_size_box, *streaming_size_label;
     GtkWidget *streaming_pre_box, *streaming_pre_label;
-    GtkWidget *streaming_proxy_frame, *streaming_proxy_vbox;
-    GtkWidget *streaming_proxy_port_label, *streaming_proxy_host_label;
     GtkWidget *streaming_save_frame, *streaming_save_vbox;
     GtkWidget *streaming_save_label, *streaming_save_browse;
     GtkWidget *title_frame, *title_tag_vbox, *title_tag_label;
@@ -276,8 +190,6 @@
     GtkWidget *rg_type_frame, *rg_type_vbox, *rg_album_gain;
     GtkObject *streaming_size_adj, *streaming_pre_adj;
 
-    char *temp;
-
     if (vorbis_configurewin != NULL) {
         gtk_window_present(GTK_WINDOW(vorbis_configurewin));
         return;
@@ -343,97 +255,6 @@
                        FALSE, FALSE, 0);
 
     /*
-     * Proxy config.
-     */
-    streaming_proxy_frame = gtk_frame_new(_("Proxy:"));
-    gtk_container_set_border_width(GTK_CONTAINER(streaming_proxy_frame), 5);
-    gtk_box_pack_start(GTK_BOX(streaming_vbox), streaming_proxy_frame,
-                       FALSE, FALSE, 0);
-
-    streaming_proxy_vbox = gtk_vbox_new(FALSE, 5);
-    gtk_container_set_border_width(GTK_CONTAINER(streaming_proxy_vbox), 5);
-    gtk_container_add(GTK_CONTAINER(streaming_proxy_frame),
-                      streaming_proxy_vbox);
-
-    streaming_proxy_use = gtk_check_button_new_with_label(_("Use proxy"));
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(streaming_proxy_use),
-                                 vorbis_cfg.use_proxy);
-    g_signal_connect(G_OBJECT(streaming_proxy_use), "clicked",
-                     G_CALLBACK(proxy_use_cb), NULL);
-    gtk_box_pack_start(GTK_BOX(streaming_proxy_vbox), streaming_proxy_use,
-                       FALSE, FALSE, 0);
-
-    streaming_proxy_hbox = gtk_hbox_new(FALSE, 5);
-    gtk_widget_set_sensitive(streaming_proxy_hbox, vorbis_cfg.use_proxy);
-    gtk_box_pack_start(GTK_BOX(streaming_proxy_vbox), streaming_proxy_hbox,
-                       FALSE, FALSE, 0);
-
-    streaming_proxy_host_label = gtk_label_new(_("Host:"));
-    gtk_box_pack_start(GTK_BOX(streaming_proxy_hbox),
-                       streaming_proxy_host_label, FALSE, FALSE, 0);
-
-    streaming_proxy_host_entry = gtk_entry_new();
-    gtk_entry_set_text(GTK_ENTRY(streaming_proxy_host_entry),
-                       vorbis_cfg.proxy_host);
-    gtk_box_pack_start(GTK_BOX(streaming_proxy_hbox),
-                       streaming_proxy_host_entry, TRUE, TRUE, 0);
-
-    streaming_proxy_port_label = gtk_label_new(_("Port:"));
-    gtk_box_pack_start(GTK_BOX(streaming_proxy_hbox),
-                       streaming_proxy_port_label, FALSE, FALSE, 0);
-
-    streaming_proxy_port_entry = gtk_entry_new();
-    gtk_widget_set_usize(streaming_proxy_port_entry, 50, -1);
-    temp = g_strdup_printf("%d", vorbis_cfg.proxy_port);
-    gtk_entry_set_text(GTK_ENTRY(streaming_proxy_port_entry), temp);
-    g_free(temp);
-    gtk_box_pack_start(GTK_BOX(streaming_proxy_hbox),
-                       streaming_proxy_port_entry, FALSE, FALSE, 0);
-
-    streaming_proxy_auth_use =
-        gtk_check_button_new_with_label(_("Use authentication"));
-    gtk_widget_set_sensitive(streaming_proxy_auth_use, vorbis_cfg.use_proxy);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
-                                 (streaming_proxy_auth_use),
-                                 vorbis_cfg.proxy_use_auth);
-    g_signal_connect(G_OBJECT(streaming_proxy_auth_use), "clicked",
-                     G_CALLBACK(proxy_auth_use_cb), NULL);
-    gtk_box_pack_start(GTK_BOX(streaming_proxy_vbox),
-                       streaming_proxy_auth_use, FALSE, FALSE, 0);
-
-    streaming_proxy_auth_hbox = gtk_hbox_new(FALSE, 5);
-    gtk_widget_set_sensitive(streaming_proxy_auth_hbox,
-                             vorbis_cfg.use_proxy
-                             && vorbis_cfg.proxy_use_auth);
-    gtk_box_pack_start(GTK_BOX(streaming_proxy_vbox),
-                       streaming_proxy_auth_hbox, FALSE, FALSE, 0);
-
-    streaming_proxy_auth_user_label = gtk_label_new(_("Username:"));
-    gtk_box_pack_start(GTK_BOX(streaming_proxy_auth_hbox),
-                       streaming_proxy_auth_user_label, FALSE, FALSE, 0);
-
-    streaming_proxy_auth_user_entry = gtk_entry_new();
-    if (vorbis_cfg.proxy_user)
-        gtk_entry_set_text(GTK_ENTRY(streaming_proxy_auth_user_entry),
-                           vorbis_cfg.proxy_user);
-    gtk_box_pack_start(GTK_BOX(streaming_proxy_auth_hbox),
-                       streaming_proxy_auth_user_entry, TRUE, TRUE, 0);
-
-    streaming_proxy_auth_pass_label = gtk_label_new(_("Password:"));
-    gtk_box_pack_start(GTK_BOX(streaming_proxy_auth_hbox),
-                       streaming_proxy_auth_pass_label, FALSE, FALSE, 0);
-
-    streaming_proxy_auth_pass_entry = gtk_entry_new();
-    if (vorbis_cfg.proxy_pass)
-        gtk_entry_set_text(GTK_ENTRY(streaming_proxy_auth_pass_entry),
-                           vorbis_cfg.proxy_pass);
-    gtk_entry_set_visibility(GTK_ENTRY(streaming_proxy_auth_pass_entry),
-                             FALSE);
-    gtk_box_pack_start(GTK_BOX(streaming_proxy_auth_hbox),
-                       streaming_proxy_auth_pass_entry, TRUE, TRUE, 0);
-
-
-    /*
      * Save to disk config.
      */
     streaming_save_frame = gtk_frame_new(_("Save stream to disk:"));
--- a/Plugins/Input/vorbis/vorbis.c	Tue May 16 21:52:31 2006 -0700
+++ b/Plugins/Input/vorbis/vorbis.c	Tue May 16 21:52:56 2006 -0700
@@ -873,15 +873,6 @@
                                &vorbis_cfg.save_http_path))
         vorbis_cfg.save_http_path = g_strdup(g_get_home_dir());
 
-    bmp_cfg_db_get_bool(db, "vorbis", "use_proxy", &vorbis_cfg.use_proxy);
-    if (!bmp_cfg_db_get_string
-        (db, "vorbis", "proxy_host", &vorbis_cfg.proxy_host))
-        vorbis_cfg.proxy_host = g_strdup("localhost");
-    bmp_cfg_db_get_int(db, "vorbis", "proxy_port", &vorbis_cfg.proxy_port);
-    bmp_cfg_db_get_bool(db, "vorbis", "proxy_use_auth",
-                        &vorbis_cfg.proxy_use_auth);
-    bmp_cfg_db_get_string(db, "vorbis", "proxy_user", &vorbis_cfg.proxy_user);
-    bmp_cfg_db_get_string(db, "vorbis", "proxy_pass", &vorbis_cfg.proxy_pass);
     bmp_cfg_db_get_bool(db, "vorbis", "tag_override",
                         &vorbis_cfg.tag_override);
     if (!bmp_cfg_db_get_string(db, "vorbis", "tag_format",
@@ -901,6 +892,14 @@
         vorbis_tag_encoding_list = g_strsplit_set(vorbis_cfg.title_encoding, ENCODING_SEPARATOR, 0);
     
     /* Encoding patch */
+
+    bmp_cfg_db_get_bool(db, NULL, "use_proxy", &vorbis_cfg.use_proxy);
+    bmp_cfg_db_get_string(db, NULL, "proxy_host", &vorbis_cfg.proxy_host);
+    bmp_cfg_db_get_int(db, NULL, "proxy_port", &vorbis_cfg.proxy_port);
+    bmp_cfg_db_get_bool(db, NULL, "proxy_use_auth", &vorbis_cfg.proxy_use_auth);
+    bmp_cfg_db_get_string(db, NULL, "proxy_user", &vorbis_cfg.proxy_user);
+    bmp_cfg_db_get_string(db, NULL, "proxy_pass", &vorbis_cfg.proxy_pass);
+
     bmp_cfg_db_close(db);
 
     vf_mutex = g_mutex_new();