summaryrefslogtreecommitdiff
path: root/src/plugin_xmms/configure.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugin_xmms/configure.c')
-rw-r--r--src/plugin_xmms/configure.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/plugin_xmms/configure.c b/src/plugin_xmms/configure.c
index 7d5bf20b..9e1d77f4 100644
--- a/src/plugin_xmms/configure.c
+++ b/src/plugin_xmms/configure.c
@@ -55,13 +55,13 @@ flac_config_t flac_cfg = {
100 /* KB */, /* http_buffer_size */
50, /* http_prebuffer */
FALSE, /* use_proxy */
- "", /* proxy_host */
+ NULL, /* proxy_host */
0, /* proxy_port */
FALSE, /* proxy_use_auth */
- "", /* proxy_user */
- "", /* proxy_pass */
+ NULL, /* proxy_user */
+ NULL, /* proxy_pass */
FALSE, /* save_http_stream */
- FALSE, /* save_http_path */
+ NULL, /* save_http_path */
FALSE, /* cast_title_streaming */
FALSE /* use_udp_channel */
},
@@ -159,7 +159,8 @@ static void flac_configurewin_ok(GtkWidget * widget, gpointer data)
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));
- g_free(flac_cfg.stream.proxy_host);
+ if(flac_cfg.stream.proxy_host)
+ g_free(flac_cfg.stream.proxy_host);
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)));
@@ -380,7 +381,7 @@ void FLAC_XMMS__configure(void)
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_proxy_port_label, *streaming_proxy_host_label;
GtkWidget *streaming_save_frame, *streaming_save_vbox;
GtkWidget *streaming_save_label, *streaming_save_browse;
#ifdef FLAC_ICECAST
@@ -666,7 +667,7 @@ void FLAC_XMMS__configure(void)
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_entry_set_text(GTK_ENTRY(streaming_proxy_host_entry), flac_cfg.stream.proxy_host? 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:"));
@@ -731,7 +732,7 @@ void FLAC_XMMS__configure(void)
gtk_box_pack_start(GTK_BOX(streaming_save_hbox), streaming_save_label, FALSE, FALSE, 0);
streaming_save_entry = gtk_entry_new();
- gtk_entry_set_text(GTK_ENTRY(streaming_save_entry), flac_cfg.stream.save_http_path);
+ gtk_entry_set_text(GTK_ENTRY(streaming_save_entry), flac_cfg.stream.save_http_path? flac_cfg.stream.save_http_path : "");
gtk_box_pack_start(GTK_BOX(streaming_save_hbox), streaming_save_entry, TRUE, TRUE, 0);
streaming_save_browse = gtk_button_new_with_label(_("Browse"));