annotate Plugins/Input/flac/configure.c @ 798:09577dc4629f trunk

[svn] - blah, #if 0 out these g_free's until we get to 0.2.3
author nenolod
date Fri, 03 Mar 2006 23:39:17 -0800
parents 632e797d9509
children 86e8224baa0e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
1 /* libxmms-flac - XMMS FLAC input plugin
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
2 * Copyright (C) 2002,2003,2004,2005 Daisuke Shimamura
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
3 *
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
4 * Based on mpg123 plugin
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
5 * and prefs.c - 2000/05/06
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
6 * EasyTAG - Tag editor for MP3 and OGG files
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
7 * Copyright (C) 2000-2002 Jerome Couderc <j.couderc@ifrance.com>
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
8 *
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
9 * This program is free software; you can redistribute it and/or
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
10 * modify it under the terms of the GNU General Public License
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
11 * as published by the Free Software Foundation; either version 2
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
12 * of the License, or (at your option) any later version.
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
13 *
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
17 * GNU General Public License for more details.
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
18 *
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
20 * along with this program; if not, write to the Free Software
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
22 */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
23
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
24 #include <stdlib.h>
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
25 #include <string.h>
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
26 #include <glib.h>
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
27 #include <gtk/gtk.h>
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
28 #include <math.h>
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
29
303
57d01c5bd39f [svn] Convert to configdb usage.
chainsaw
parents: 301
diff changeset
30 #include <libaudacious/configdb.h>
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
31 #include <libaudacious/dirbrowser.h>
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
32 #include <libaudacious/titlestring.h>
188
6bdc6841b0a9 [svn] Fix includes to avoid implicit declaration warnings.
chainsaw
parents: 181
diff changeset
33 #include <libaudacious/util.h>
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
34 #include <audacious/plugin.h>
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
35
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
36 #include "plugin_common/locale_hack.h"
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
37 #include "replaygain_synthesis.h" /* for NOISE_SHAPING_LOW */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
38 #include "charset.h"
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
39 #include "configure.h"
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
40
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
41 /*
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
42 * Initialize Global Valueable
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
43 */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
44 flac_config_t flac_cfg = {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
45 /* title */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
46 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
47 FALSE, /* tag_override */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
48 NULL, /* tag_format */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
49 FALSE, /* convert_char_set */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
50 NULL /* user_char_set */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
51 },
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
52 /* stream */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
53 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
54 100 /* KB */, /* http_buffer_size */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
55 50, /* http_prebuffer */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
56 FALSE, /* use_proxy */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
57 "", /* proxy_host */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
58 0, /* proxy_port */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
59 FALSE, /* proxy_use_auth */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
60 "", /* proxy_user */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
61 "", /* proxy_pass */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
62 FALSE, /* save_http_stream */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
63 "", /* save_http_path */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
64 FALSE, /* cast_title_streaming */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
65 FALSE /* use_udp_channel */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
66 },
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
67 /* output */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
68 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
69 /* replaygain */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
70 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
71 FALSE, /* enable */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
72 TRUE, /* album_mode */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
73 0, /* preamp */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
74 FALSE /* hard_limit */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
75 },
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
76 /* resolution */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
77 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
78 /* normal */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
79 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
80 TRUE /* dither_24_to_16 */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
81 },
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
82 /* replaygain */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
83 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
84 TRUE, /* dither */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
85 NOISE_SHAPING_LOW, /* noise_shaping */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
86 16 /* bps_out */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
87 }
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
88 }
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
89 }
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
90 };
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
91
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
92
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
93 static GtkWidget *flac_configurewin = NULL;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
94 static GtkWidget *vbox, *notebook;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
95
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
96 static GtkWidget *title_tag_override, *title_tag_box, *title_tag_entry, *title_desc;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
97 static GtkWidget *convert_char_set, *fileCharacterSetEntry, *userCharacterSetEntry;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
98 static GtkWidget *replaygain_enable, *replaygain_album_mode;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
99 static GtkWidget *replaygain_preamp_hscale, *replaygain_preamp_label, *replaygain_hard_limit;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
100 static GtkObject *replaygain_preamp;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
101 static GtkWidget *resolution_normal_dither_24_to_16;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
102 static GtkWidget *resolution_replaygain_dither;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
103 static GtkWidget *resolution_replaygain_noise_shaping_frame;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
104 static GtkWidget *resolution_replaygain_noise_shaping_radio_none;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
105 static GtkWidget *resolution_replaygain_noise_shaping_radio_low;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
106 static GtkWidget *resolution_replaygain_noise_shaping_radio_medium;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
107 static GtkWidget *resolution_replaygain_noise_shaping_radio_high;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
108 static GtkWidget *resolution_replaygain_bps_out_frame;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
109 static GtkWidget *resolution_replaygain_bps_out_radio_16bps;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
110 static GtkWidget *resolution_replaygain_bps_out_radio_24bps;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
111
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
112 static GtkObject *streaming_size_adj, *streaming_pre_adj;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
113 static GtkWidget *streaming_proxy_use, *streaming_proxy_host_entry;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
114 static GtkWidget *streaming_proxy_port_entry, *streaming_save_use, *streaming_save_entry;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
115 static GtkWidget *streaming_proxy_auth_use;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
116 static GtkWidget *streaming_proxy_auth_pass_entry, *streaming_proxy_auth_user_entry;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
117 static GtkWidget *streaming_proxy_auth_user_label, *streaming_proxy_auth_pass_label;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
118 #ifdef FLAC_ICECAST
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
119 static GtkWidget *streaming_cast_title, *streaming_udp_title;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
120 #endif
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
121 static GtkWidget *streaming_proxy_hbox, *streaming_proxy_auth_hbox, *streaming_save_dirbrowser;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
122 static GtkWidget *streaming_save_hbox;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
123
248
e557fce67f47 [svn] Avoid discarding pointer type qualifiers.
chainsaw
parents: 209
diff changeset
124 static const gchar *gtk_entry_get_text_1 (GtkWidget *widget);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
125 static void flac_configurewin_ok(GtkWidget * widget, gpointer data);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
126 static void configure_destroy(GtkWidget * w, gpointer data);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
127
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
128 static void flac_configurewin_ok(GtkWidget * widget, gpointer data)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
129 {
303
57d01c5bd39f [svn] Convert to configdb usage.
chainsaw
parents: 301
diff changeset
130 ConfigDb *db;
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
131
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
132 (void)widget, (void)data; /* unused arguments */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
133 g_free(flac_cfg.title.tag_format);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
134 flac_cfg.title.tag_format = g_strdup(gtk_entry_get_text(GTK_ENTRY(title_tag_entry)));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
135 flac_cfg.title.user_char_set = Charset_Get_Name_From_Title(gtk_entry_get_text_1(userCharacterSetEntry));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
136
303
57d01c5bd39f [svn] Convert to configdb usage.
chainsaw
parents: 301
diff changeset
137 db = bmp_cfg_db_open();
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
138 /* title */
303
57d01c5bd39f [svn] Convert to configdb usage.
chainsaw
parents: 301
diff changeset
139 bmp_cfg_db_set_bool(db, "flac", "title.tag_override", flac_cfg.title.tag_override);
57d01c5bd39f [svn] Convert to configdb usage.
chainsaw
parents: 301
diff changeset
140 bmp_cfg_db_set_string(db, "flac", "title.tag_format", flac_cfg.title.tag_format);
57d01c5bd39f [svn] Convert to configdb usage.
chainsaw
parents: 301
diff changeset
141 bmp_cfg_db_set_bool(db, "flac", "title.convert_char_set", flac_cfg.title.convert_char_set);
57d01c5bd39f [svn] Convert to configdb usage.
chainsaw
parents: 301
diff changeset
142 bmp_cfg_db_set_string(db, "flac", "title.user_char_set", flac_cfg.title.user_char_set);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
143 /* output */
303
57d01c5bd39f [svn] Convert to configdb usage.
chainsaw
parents: 301
diff changeset
144 bmp_cfg_db_set_bool(db, "flac", "output.replaygain.enable", flac_cfg.output.replaygain.enable);
57d01c5bd39f [svn] Convert to configdb usage.
chainsaw
parents: 301
diff changeset
145 bmp_cfg_db_set_bool(db, "flac", "output.replaygain.album_mode", flac_cfg.output.replaygain.album_mode);
57d01c5bd39f [svn] Convert to configdb usage.
chainsaw
parents: 301
diff changeset
146 bmp_cfg_db_set_int(db, "flac", "output.replaygain.preamp", flac_cfg.output.replaygain.preamp);
57d01c5bd39f [svn] Convert to configdb usage.
chainsaw
parents: 301
diff changeset
147 bmp_cfg_db_set_bool(db, "flac", "output.replaygain.hard_limit", flac_cfg.output.replaygain.hard_limit);
57d01c5bd39f [svn] Convert to configdb usage.
chainsaw
parents: 301
diff changeset
148 bmp_cfg_db_set_bool(db, "flac", "output.resolution.normal.dither_24_to_16", flac_cfg.output.resolution.normal.dither_24_to_16);
57d01c5bd39f [svn] Convert to configdb usage.
chainsaw
parents: 301
diff changeset
149 bmp_cfg_db_set_bool(db, "flac", "output.resolution.replaygain.dither", flac_cfg.output.resolution.replaygain.dither);
57d01c5bd39f [svn] Convert to configdb usage.
chainsaw
parents: 301
diff changeset
150 bmp_cfg_db_set_int(db, "flac", "output.resolution.replaygain.noise_shaping", flac_cfg.output.resolution.replaygain.noise_shaping);
57d01c5bd39f [svn] Convert to configdb usage.
chainsaw
parents: 301
diff changeset
151 bmp_cfg_db_set_int(db, "flac", "output.resolution.replaygain.bps_out", flac_cfg.output.resolution.replaygain.bps_out);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
152 /* streaming */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
153 flac_cfg.stream.http_buffer_size = (gint) GTK_ADJUSTMENT(streaming_size_adj)->value;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
154 flac_cfg.stream.http_prebuffer = (gint) GTK_ADJUSTMENT(streaming_pre_adj)->value;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
155
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
156 flac_cfg.stream.use_proxy = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_proxy_use));
675
632e797d9509 [svn] - Fix a crash relating to changing FLAC plugin settings. Closes bug #412.
nenolod
parents: 303
diff changeset
157
798
09577dc4629f [svn] - blah, #if 0 out these g_free's until we get to 0.2.3
nenolod
parents: 675
diff changeset
158 #if 0
675
632e797d9509 [svn] - Fix a crash relating to changing FLAC plugin settings. Closes bug #412.
nenolod
parents: 303
diff changeset
159 if (flac_cfg.stream.proxy_host != NULL)
632e797d9509 [svn] - Fix a crash relating to changing FLAC plugin settings. Closes bug #412.
nenolod
parents: 303
diff changeset
160 g_free(flac_cfg.stream.proxy_host);
798
09577dc4629f [svn] - blah, #if 0 out these g_free's until we get to 0.2.3
nenolod
parents: 675
diff changeset
161 #endif
675
632e797d9509 [svn] - Fix a crash relating to changing FLAC plugin settings. Closes bug #412.
nenolod
parents: 303
diff changeset
162
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
163 flac_cfg.stream.proxy_host = g_strdup(gtk_entry_get_text(GTK_ENTRY(streaming_proxy_host_entry)));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
164 flac_cfg.stream.proxy_port = atoi(gtk_entry_get_text(GTK_ENTRY(streaming_proxy_port_entry)));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
165
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
166 flac_cfg.stream.proxy_use_auth = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_proxy_auth_use));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
167
798
09577dc4629f [svn] - blah, #if 0 out these g_free's until we get to 0.2.3
nenolod
parents: 675
diff changeset
168 #if 0
675
632e797d9509 [svn] - Fix a crash relating to changing FLAC plugin settings. Closes bug #412.
nenolod
parents: 303
diff changeset
169 if(flac_cfg.stream.proxy_user != NULL)
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
170 g_free(flac_cfg.stream.proxy_user);
798
09577dc4629f [svn] - blah, #if 0 out these g_free's until we get to 0.2.3
nenolod
parents: 675
diff changeset
171 #endif
675
632e797d9509 [svn] - Fix a crash relating to changing FLAC plugin settings. Closes bug #412.
nenolod
parents: 303
diff changeset
172
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
173 flac_cfg.stream.proxy_user = NULL;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
174 if(strlen(gtk_entry_get_text(GTK_ENTRY(streaming_proxy_auth_user_entry))) > 0)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
175 flac_cfg.stream.proxy_user = g_strdup(gtk_entry_get_text(GTK_ENTRY(streaming_proxy_auth_user_entry)));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
176
798
09577dc4629f [svn] - blah, #if 0 out these g_free's until we get to 0.2.3
nenolod
parents: 675
diff changeset
177 #if 0
675
632e797d9509 [svn] - Fix a crash relating to changing FLAC plugin settings. Closes bug #412.
nenolod
parents: 303
diff changeset
178 if(flac_cfg.stream.proxy_pass != NULL)
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
179 g_free(flac_cfg.stream.proxy_pass);
798
09577dc4629f [svn] - blah, #if 0 out these g_free's until we get to 0.2.3
nenolod
parents: 675
diff changeset
180 #endif
675
632e797d9509 [svn] - Fix a crash relating to changing FLAC plugin settings. Closes bug #412.
nenolod
parents: 303
diff changeset
181
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
182 flac_cfg.stream.proxy_pass = NULL;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
183 if(strlen(gtk_entry_get_text(GTK_ENTRY(streaming_proxy_auth_pass_entry))) > 0)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
184 flac_cfg.stream.proxy_pass = g_strdup(gtk_entry_get_text(GTK_ENTRY(streaming_proxy_auth_pass_entry)));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
185
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
186
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
187 flac_cfg.stream.save_http_stream = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_save_use));
675
632e797d9509 [svn] - Fix a crash relating to changing FLAC plugin settings. Closes bug #412.
nenolod
parents: 303
diff changeset
188
632e797d9509 [svn] - Fix a crash relating to changing FLAC plugin settings. Closes bug #412.
nenolod
parents: 303
diff changeset
189 if (flac_cfg.stream.save_http_path != NULL)
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
190 g_free(flac_cfg.stream.save_http_path);
675
632e797d9509 [svn] - Fix a crash relating to changing FLAC plugin settings. Closes bug #412.
nenolod
parents: 303
diff changeset
191
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
192 flac_cfg.stream.save_http_path = g_strdup(gtk_entry_get_text(GTK_ENTRY(streaming_save_entry)));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
193
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
194 #ifdef FLAC_ICECAST
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
195 flac_cfg.stream.cast_title_streaming = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_cast_title));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
196 flac_cfg.stream.use_udp_channel = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_udp_title));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
197 #endif
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
198
303
57d01c5bd39f [svn] Convert to configdb usage.
chainsaw
parents: 301
diff changeset
199 bmp_cfg_db_set_int(db, "flac", "stream.http_buffer_size", flac_cfg.stream.http_buffer_size);
57d01c5bd39f [svn] Convert to configdb usage.
chainsaw
parents: 301
diff changeset
200 bmp_cfg_db_set_int(db, "flac", "stream.http_prebuffer", flac_cfg.stream.http_prebuffer);
57d01c5bd39f [svn] Convert to configdb usage.
chainsaw
parents: 301
diff changeset
201 bmp_cfg_db_set_bool(db, "flac", "stream.use_proxy", flac_cfg.stream.use_proxy);
57d01c5bd39f [svn] Convert to configdb usage.
chainsaw
parents: 301
diff changeset
202 bmp_cfg_db_set_string(db, "flac", "stream.proxy_host", flac_cfg.stream.proxy_host);
57d01c5bd39f [svn] Convert to configdb usage.
chainsaw
parents: 301
diff changeset
203 bmp_cfg_db_set_int(db, "flac", "stream.proxy_port", flac_cfg.stream.proxy_port);
57d01c5bd39f [svn] Convert to configdb usage.
chainsaw
parents: 301
diff changeset
204 bmp_cfg_db_set_bool(db, "flac", "stream.proxy_use_auth", flac_cfg.stream.proxy_use_auth);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
205 if(flac_cfg.stream.proxy_user)
303
57d01c5bd39f [svn] Convert to configdb usage.
chainsaw
parents: 301
diff changeset
206 bmp_cfg_db_set_string(db, "flac", "stream.proxy_user", flac_cfg.stream.proxy_user);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
207 else
303
57d01c5bd39f [svn] Convert to configdb usage.
chainsaw
parents: 301
diff changeset
208 bmp_cfg_db_unset_key(db, "flac", "stream.proxy_user");
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
209 if(flac_cfg.stream.proxy_pass)
303
57d01c5bd39f [svn] Convert to configdb usage.
chainsaw
parents: 301
diff changeset
210 bmp_cfg_db_set_string(db, "flac", "stream.proxy_pass", flac_cfg.stream.proxy_pass);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
211 else
303
57d01c5bd39f [svn] Convert to configdb usage.
chainsaw
parents: 301
diff changeset
212 bmp_cfg_db_unset_key(db, "flac", "stream.proxy_pass");
57d01c5bd39f [svn] Convert to configdb usage.
chainsaw
parents: 301
diff changeset
213 bmp_cfg_db_set_bool(db, "flac", "stream.save_http_stream", flac_cfg.stream.save_http_stream);
57d01c5bd39f [svn] Convert to configdb usage.
chainsaw
parents: 301
diff changeset
214 bmp_cfg_db_set_string(db, "flac", "stream.save_http_path", flac_cfg.stream.save_http_path);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
215 #ifdef FLAC_ICECAST
303
57d01c5bd39f [svn] Convert to configdb usage.
chainsaw
parents: 301
diff changeset
216 bmp_cfg_db_set_bool(db, "flac", "stream.cast_title_streaming", flac_cfg.stream.cast_title_streaming);
57d01c5bd39f [svn] Convert to configdb usage.
chainsaw
parents: 301
diff changeset
217 bmp_cfg_db_set_bool(db, "flac", "stream.use_udp_channel", flac_cfg.stream.use_udp_channel);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
218 #endif
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
219
303
57d01c5bd39f [svn] Convert to configdb usage.
chainsaw
parents: 301
diff changeset
220 bmp_cfg_db_close(db);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
221 gtk_widget_destroy(flac_configurewin);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
222 }
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
223
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
224 static void configure_destroy(GtkWidget *widget, gpointer data)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
225 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
226 (void)widget, (void)data; /* unused arguments */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
227 }
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
228
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
229 static void title_tag_override_cb(GtkWidget *widget, gpointer data)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
230 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
231 (void)widget, (void)data; /* unused arguments */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
232 flac_cfg.title.tag_override = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(title_tag_override));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
233
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
234 gtk_widget_set_sensitive(title_tag_box, flac_cfg.title.tag_override);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
235 gtk_widget_set_sensitive(title_desc, flac_cfg.title.tag_override);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
236
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
237 }
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
238
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
239 static void convert_char_set_cb(GtkWidget *widget, gpointer data)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
240 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
241 (void)widget, (void)data; /* unused arguments */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
242 flac_cfg.title.convert_char_set = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(convert_char_set));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
243
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
244 gtk_widget_set_sensitive(fileCharacterSetEntry, FALSE);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
245 gtk_widget_set_sensitive(userCharacterSetEntry, flac_cfg.title.convert_char_set);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
246 }
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
247
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
248 static void replaygain_enable_cb(GtkWidget *widget, gpointer data)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
249 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
250 (void)widget, (void)data; /* unused arguments */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
251 flac_cfg.output.replaygain.enable = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(replaygain_enable));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
252
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
253 gtk_widget_set_sensitive(replaygain_album_mode, flac_cfg.output.replaygain.enable);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
254 gtk_widget_set_sensitive(replaygain_preamp_hscale, flac_cfg.output.replaygain.enable);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
255 gtk_widget_set_sensitive(replaygain_hard_limit, flac_cfg.output.replaygain.enable);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
256 }
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
257
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
258 static void replaygain_album_mode_cb(GtkWidget *widget, gpointer data)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
259 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
260 (void)widget, (void)data; /* unused arguments */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
261 flac_cfg.output.replaygain.album_mode = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(replaygain_album_mode));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
262 }
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
263
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
264 static void replaygain_hard_limit_cb(GtkWidget *widget, gpointer data)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
265 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
266 (void)widget, (void)data; /* unused arguments */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
267 flac_cfg.output.replaygain.hard_limit = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(replaygain_hard_limit));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
268 }
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
269
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
270 static void replaygain_preamp_cb(GtkWidget *widget, gpointer data)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
271 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
272 GString *gstring = g_string_new("");
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
273 (void)widget, (void)data; /* unused arguments */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
274 flac_cfg.output.replaygain.preamp = (int) floor(GTK_ADJUSTMENT(replaygain_preamp)->value + 0.5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
275
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
276 g_string_sprintf(gstring, "%i dB", flac_cfg.output.replaygain.preamp);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
277 gtk_label_set_text(GTK_LABEL(replaygain_preamp_label), _(gstring->str));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
278 }
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
279
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
280 static void resolution_normal_dither_24_to_16_cb(GtkWidget *widget, gpointer data)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
281 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
282 (void)widget, (void)data; /* unused arguments */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
283 flac_cfg.output.resolution.normal.dither_24_to_16 = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(resolution_normal_dither_24_to_16));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
284 }
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
285
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
286 static void resolution_replaygain_dither_cb(GtkWidget *widget, gpointer data)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
287 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
288 (void)widget, (void)data; /* unused arguments */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
289 flac_cfg.output.resolution.replaygain.dither = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(resolution_replaygain_dither));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
290
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
291 gtk_widget_set_sensitive(resolution_replaygain_noise_shaping_frame, flac_cfg.output.resolution.replaygain.dither);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
292 }
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
293
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
294 static void resolution_replaygain_noise_shaping_cb(GtkWidget *widget, gpointer data)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
295 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
296 (void)widget, (void)data; /* unused arguments */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
297 flac_cfg.output.resolution.replaygain.noise_shaping =
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
298 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(resolution_replaygain_noise_shaping_radio_none))? 0 :
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
299 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(resolution_replaygain_noise_shaping_radio_low))? 1 :
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
300 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(resolution_replaygain_noise_shaping_radio_medium))? 2 :
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
301 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(resolution_replaygain_noise_shaping_radio_high))? 3 :
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
302 0
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
303 ;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
304 }
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
305
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
306 static void resolution_replaygain_bps_out_cb(GtkWidget *widget, gpointer data)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
307 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
308 (void)widget, (void)data; /* unused arguments */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
309 flac_cfg.output.resolution.replaygain.bps_out =
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
310 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(resolution_replaygain_bps_out_radio_16bps))? 16 :
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
311 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(resolution_replaygain_bps_out_radio_24bps))? 24 :
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
312 16
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
313 ;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
314 }
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
315
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
316 static void proxy_use_cb(GtkWidget * w, gpointer data)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
317 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
318 gboolean use_proxy, use_proxy_auth;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
319 (void) w;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
320 (void) data;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
321
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
322 use_proxy = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_proxy_use));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
323 use_proxy_auth = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_proxy_auth_use));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
324
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
325 gtk_widget_set_sensitive(streaming_proxy_hbox, use_proxy);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
326 gtk_widget_set_sensitive(streaming_proxy_auth_use, use_proxy);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
327 gtk_widget_set_sensitive(streaming_proxy_auth_hbox, use_proxy && use_proxy_auth);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
328 }
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
329
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
330 static void proxy_auth_use_cb(GtkWidget *w, gpointer data)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
331 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
332 gboolean use_proxy, use_proxy_auth;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
333 (void) w;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
334 (void) data;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
335
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
336 use_proxy = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_proxy_use));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
337 use_proxy_auth = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_proxy_auth_use));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
338
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
339 gtk_widget_set_sensitive(streaming_proxy_auth_hbox, use_proxy && use_proxy_auth);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
340 }
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
341
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
342 static void streaming_save_dirbrowser_cb(gchar * dir)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
343 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
344 gtk_entry_set_text(GTK_ENTRY(streaming_save_entry), dir);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
345 }
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
346
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
347 static void streaming_save_browse_cb(GtkWidget * w, gpointer data)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
348 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
349 (void) w;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
350 (void) data;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
351 if (!streaming_save_dirbrowser)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
352 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
353 streaming_save_dirbrowser = xmms_create_dir_browser(_("Select the directory where you want to store the MPEG streams:"),
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
354 flac_cfg.stream.save_http_path, GTK_SELECTION_SINGLE, streaming_save_dirbrowser_cb);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
355 gtk_signal_connect(GTK_OBJECT(streaming_save_dirbrowser), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &streaming_save_dirbrowser);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
356 gtk_window_set_transient_for(GTK_WINDOW(streaming_save_dirbrowser), GTK_WINDOW(flac_configurewin));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
357 gtk_widget_show(streaming_save_dirbrowser);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
358 }
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
359 }
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
360
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
361 static void streaming_save_use_cb(GtkWidget * w, gpointer data)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
362 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
363 gboolean save_stream;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
364 (void) w;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
365 (void) data;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
366
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
367 save_stream = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_save_use));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
368
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
369 gtk_widget_set_sensitive(streaming_save_hbox, save_stream);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
370 }
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
371
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
372
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
373 void FLAC_XMMS__configure(void)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
374 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
375 GtkWidget *title_frame, *title_tag_vbox, *title_tag_label;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
376 GtkWidget *replaygain_frame, *resolution_frame, *output_vbox, *resolution_normal_frame, *resolution_replaygain_frame;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
377 GtkWidget *replaygain_vbox, *resolution_hbox, *resolution_normal_vbox, *resolution_replaygain_vbox;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
378 GtkWidget *resolution_replaygain_noise_shaping_vbox;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
379 GtkWidget *resolution_replaygain_bps_out_vbox;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
380 GtkWidget *label, *hbox;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
381 GtkWidget *bbox, *ok, *cancel;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
382 GList *list;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
383
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
384 GtkWidget *streaming_vbox;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
385 GtkWidget *streaming_buf_frame, *streaming_buf_hbox;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
386 GtkWidget *streaming_size_box, *streaming_size_label, *streaming_size_spin;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
387 GtkWidget *streaming_pre_box, *streaming_pre_label, *streaming_pre_spin;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
388 GtkWidget *streaming_proxy_frame, *streaming_proxy_vbox;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
389 GtkWidget *streaming_proxy_port_label, *streaming_proxy_host_label;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
390 GtkWidget *streaming_save_frame, *streaming_save_vbox;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
391 GtkWidget *streaming_save_label, *streaming_save_browse;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
392 #ifdef FLAC_ICECAST
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
393 GtkWidget *streaming_cast_frame, *streaming_cast_vbox;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
394 #endif
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
395 char *temp;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
396
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
397 if (flac_configurewin != NULL) {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
398 gdk_window_raise(flac_configurewin->window);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
399 return;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
400 }
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
401 flac_configurewin = gtk_window_new(GTK_WINDOW_TOPLEVEL);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
402 gtk_signal_connect(GTK_OBJECT(flac_configurewin), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &flac_configurewin);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
403 gtk_signal_connect(GTK_OBJECT(flac_configurewin), "destroy", GTK_SIGNAL_FUNC(configure_destroy), &flac_configurewin);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
404 gtk_window_set_title(GTK_WINDOW(flac_configurewin), _("Flac Configuration"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
405 gtk_window_set_policy(GTK_WINDOW(flac_configurewin), FALSE, FALSE, FALSE);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
406 gtk_container_border_width(GTK_CONTAINER(flac_configurewin), 10);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
407
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
408 vbox = gtk_vbox_new(FALSE, 10);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
409 gtk_container_add(GTK_CONTAINER(flac_configurewin), vbox);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
410
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
411 notebook = gtk_notebook_new();
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
412 gtk_box_pack_start(GTK_BOX(vbox), notebook, TRUE, TRUE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
413
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
414 /* Title config.. */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
415
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
416 title_frame = gtk_frame_new(_("Tag Handling"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
417 gtk_container_border_width(GTK_CONTAINER(title_frame), 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
418
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
419 title_tag_vbox = gtk_vbox_new(FALSE, 10);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
420 gtk_container_border_width(GTK_CONTAINER(title_tag_vbox), 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
421 gtk_container_add(GTK_CONTAINER(title_frame), title_tag_vbox);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
422
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
423 /* Convert Char Set */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
424
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
425 convert_char_set = gtk_check_button_new_with_label(_("Convert Character Set"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
426 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(convert_char_set), flac_cfg.title.convert_char_set);
209
bd8457b077cf [svn] Add casts to callbacks in signal handlers to avoid warning. Remove stale pause handler declaration from wav-sndfile.h
chainsaw
parents: 188
diff changeset
427 gtk_signal_connect(GTK_OBJECT(convert_char_set), "clicked", (GCallback)convert_char_set_cb, NULL);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
428 gtk_box_pack_start(GTK_BOX(title_tag_vbox), convert_char_set, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
429 /* Combo boxes... */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
430 hbox = gtk_hbox_new(FALSE,4);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
431 gtk_container_add(GTK_CONTAINER(title_tag_vbox),hbox);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
432 label = gtk_label_new(_("Convert character set from :"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
433 gtk_box_pack_start(GTK_BOX(hbox),label,FALSE,FALSE,0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
434 fileCharacterSetEntry = gtk_combo_new();
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
435 gtk_box_pack_start(GTK_BOX(hbox),fileCharacterSetEntry,TRUE,TRUE,0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
436
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
437 label = gtk_label_new (_("to :"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
438 gtk_box_pack_start(GTK_BOX(hbox),label,FALSE,FALSE,0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
439 userCharacterSetEntry = gtk_combo_new();
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
440 gtk_box_pack_start(GTK_BOX(hbox),userCharacterSetEntry,TRUE,TRUE,0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
441
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
442 gtk_entry_set_editable(GTK_ENTRY(GTK_COMBO(fileCharacterSetEntry)->entry),FALSE);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
443 gtk_entry_set_editable(GTK_ENTRY(GTK_COMBO(userCharacterSetEntry)->entry),FALSE);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
444 gtk_combo_set_value_in_list(GTK_COMBO(fileCharacterSetEntry),TRUE,FALSE);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
445 gtk_combo_set_value_in_list(GTK_COMBO(userCharacterSetEntry),TRUE,FALSE);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
446
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
447 list = Charset_Create_List();
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
448 gtk_combo_set_popdown_strings(GTK_COMBO(fileCharacterSetEntry),Charset_Create_List_UTF8_Only());
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
449 gtk_combo_set_popdown_strings(GTK_COMBO(userCharacterSetEntry),list);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
450 gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(userCharacterSetEntry)->entry),Charset_Get_Title_From_Name(flac_cfg.title.user_char_set));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
451 gtk_widget_set_sensitive(fileCharacterSetEntry, FALSE);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
452 gtk_widget_set_sensitive(userCharacterSetEntry, flac_cfg.title.convert_char_set);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
453
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
454 /* Override Tagging Format */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
455
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
456 title_tag_override = gtk_check_button_new_with_label(_("Override generic titles"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
457 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(title_tag_override), flac_cfg.title.tag_override);
209
bd8457b077cf [svn] Add casts to callbacks in signal handlers to avoid warning. Remove stale pause handler declaration from wav-sndfile.h
chainsaw
parents: 188
diff changeset
458 gtk_signal_connect(GTK_OBJECT(title_tag_override), "clicked", (GCallback)title_tag_override_cb, NULL);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
459 gtk_box_pack_start(GTK_BOX(title_tag_vbox), title_tag_override, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
460
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
461 title_tag_box = gtk_hbox_new(FALSE, 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
462 gtk_widget_set_sensitive(title_tag_box, flac_cfg.title.tag_override);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
463 gtk_box_pack_start(GTK_BOX(title_tag_vbox), title_tag_box, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
464
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
465 title_tag_label = gtk_label_new(_("Title format:"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
466 gtk_box_pack_start(GTK_BOX(title_tag_box), title_tag_label, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
467
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
468 title_tag_entry = gtk_entry_new();
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
469 gtk_entry_set_text(GTK_ENTRY(title_tag_entry), flac_cfg.title.tag_format);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
470 gtk_box_pack_start(GTK_BOX(title_tag_box), title_tag_entry, TRUE, TRUE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
471
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
472 title_desc = xmms_titlestring_descriptions("pafFetnygc", 2);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
473 gtk_widget_set_sensitive(title_desc, flac_cfg.title.tag_override);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
474 gtk_box_pack_start(GTK_BOX(title_tag_vbox), title_desc, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
475
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
476 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), title_frame, gtk_label_new(_("Title")));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
477
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
478 /* Output config.. */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
479
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
480 output_vbox = gtk_vbox_new(FALSE, 10);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
481 gtk_container_border_width(GTK_CONTAINER(output_vbox), 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
482
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
483 /* replaygain */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
484
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
485 replaygain_frame = gtk_frame_new(_("ReplayGain"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
486 gtk_container_border_width(GTK_CONTAINER(replaygain_frame), 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
487 gtk_box_pack_start(GTK_BOX(output_vbox), replaygain_frame, TRUE, TRUE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
488
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
489 replaygain_vbox = gtk_vbox_new(FALSE, 10);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
490 gtk_container_border_width(GTK_CONTAINER(replaygain_vbox), 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
491 gtk_container_add(GTK_CONTAINER(replaygain_frame), replaygain_vbox);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
492
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
493 replaygain_enable = gtk_check_button_new_with_label(_("Enable ReplayGain processing"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
494 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(replaygain_enable), flac_cfg.output.replaygain.enable);
209
bd8457b077cf [svn] Add casts to callbacks in signal handlers to avoid warning. Remove stale pause handler declaration from wav-sndfile.h
chainsaw
parents: 188
diff changeset
495 gtk_signal_connect(GTK_OBJECT(replaygain_enable), "clicked", (GCallback)replaygain_enable_cb, NULL);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
496 gtk_box_pack_start(GTK_BOX(replaygain_vbox), replaygain_enable, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
497
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
498 replaygain_album_mode = gtk_check_button_new_with_label(_("Album mode"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
499 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(replaygain_album_mode), flac_cfg.output.replaygain.album_mode);
209
bd8457b077cf [svn] Add casts to callbacks in signal handlers to avoid warning. Remove stale pause handler declaration from wav-sndfile.h
chainsaw
parents: 188
diff changeset
500 gtk_signal_connect(GTK_OBJECT(replaygain_album_mode), "clicked", (GCallback)replaygain_album_mode_cb, NULL);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
501 gtk_box_pack_start(GTK_BOX(replaygain_vbox), replaygain_album_mode, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
502
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
503 hbox = gtk_hbox_new(FALSE,3);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
504 gtk_container_add(GTK_CONTAINER(replaygain_vbox),hbox);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
505 label = gtk_label_new(_("Preamp:"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
506 gtk_box_pack_start(GTK_BOX(hbox),label,FALSE,FALSE,0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
507 replaygain_preamp = gtk_adjustment_new(flac_cfg.output.replaygain.preamp, -24.0, +24.0, 1.0, 6.0, 0.0);
209
bd8457b077cf [svn] Add casts to callbacks in signal handlers to avoid warning. Remove stale pause handler declaration from wav-sndfile.h
chainsaw
parents: 188
diff changeset
508 gtk_signal_connect(GTK_OBJECT(replaygain_preamp), "value-changed", (GCallback)replaygain_preamp_cb, NULL);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
509 replaygain_preamp_hscale = gtk_hscale_new(GTK_ADJUSTMENT(replaygain_preamp));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
510 gtk_scale_set_draw_value(GTK_SCALE(replaygain_preamp_hscale), FALSE);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
511 gtk_box_pack_start(GTK_BOX(hbox),replaygain_preamp_hscale,TRUE,TRUE,0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
512 replaygain_preamp_label = gtk_label_new(_("0 dB"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
513 gtk_box_pack_start(GTK_BOX(hbox),replaygain_preamp_label,FALSE,FALSE,0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
514 gtk_adjustment_value_changed(GTK_ADJUSTMENT(replaygain_preamp));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
515
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
516 replaygain_hard_limit = gtk_check_button_new_with_label(_("6dB hard limiting"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
517 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(replaygain_hard_limit), flac_cfg.output.replaygain.hard_limit);
209
bd8457b077cf [svn] Add casts to callbacks in signal handlers to avoid warning. Remove stale pause handler declaration from wav-sndfile.h
chainsaw
parents: 188
diff changeset
518 gtk_signal_connect(GTK_OBJECT(replaygain_hard_limit), "clicked", (GCallback)replaygain_hard_limit_cb, NULL);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
519 gtk_box_pack_start(GTK_BOX(replaygain_vbox), replaygain_hard_limit, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
520
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
521 replaygain_enable_cb(replaygain_enable, NULL);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
522
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
523 /* resolution */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
524
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
525 resolution_frame = gtk_frame_new(_("Resolution"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
526 gtk_container_border_width(GTK_CONTAINER(resolution_frame), 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
527 gtk_box_pack_start(GTK_BOX(output_vbox), resolution_frame, TRUE, TRUE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
528
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
529 resolution_hbox = gtk_hbox_new(FALSE, 10);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
530 gtk_container_border_width(GTK_CONTAINER(resolution_hbox), 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
531 gtk_container_add(GTK_CONTAINER(resolution_frame), resolution_hbox);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
532
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
533 resolution_normal_frame = gtk_frame_new(_("Without ReplayGain"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
534 gtk_container_border_width(GTK_CONTAINER(resolution_normal_frame), 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
535 gtk_box_pack_start(GTK_BOX(resolution_hbox), resolution_normal_frame, TRUE, TRUE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
536
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
537 resolution_normal_vbox = gtk_vbox_new(FALSE, 10);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
538 gtk_container_border_width(GTK_CONTAINER(resolution_normal_vbox), 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
539 gtk_container_add(GTK_CONTAINER(resolution_normal_frame), resolution_normal_vbox);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
540
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
541 resolution_normal_dither_24_to_16 = gtk_check_button_new_with_label(_("Dither 24bps to 16bps"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
542 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(resolution_normal_dither_24_to_16), flac_cfg.output.resolution.normal.dither_24_to_16);
209
bd8457b077cf [svn] Add casts to callbacks in signal handlers to avoid warning. Remove stale pause handler declaration from wav-sndfile.h
chainsaw
parents: 188
diff changeset
543 gtk_signal_connect(GTK_OBJECT(resolution_normal_dither_24_to_16), "clicked", (GCallback)resolution_normal_dither_24_to_16_cb, NULL);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
544 gtk_box_pack_start(GTK_BOX(resolution_normal_vbox), resolution_normal_dither_24_to_16, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
545
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
546 resolution_replaygain_frame = gtk_frame_new(_("With ReplayGain"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
547 gtk_container_border_width(GTK_CONTAINER(resolution_replaygain_frame), 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
548 gtk_box_pack_start(GTK_BOX(resolution_hbox), resolution_replaygain_frame, TRUE, TRUE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
549
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
550 resolution_replaygain_vbox = gtk_vbox_new(FALSE, 10);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
551 gtk_container_border_width(GTK_CONTAINER(resolution_replaygain_vbox), 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
552 gtk_container_add(GTK_CONTAINER(resolution_replaygain_frame), resolution_replaygain_vbox);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
553
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
554 resolution_replaygain_dither = gtk_check_button_new_with_label(_("Enable dithering"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
555 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(resolution_replaygain_dither), flac_cfg.output.resolution.replaygain.dither);
209
bd8457b077cf [svn] Add casts to callbacks in signal handlers to avoid warning. Remove stale pause handler declaration from wav-sndfile.h
chainsaw
parents: 188
diff changeset
556 gtk_signal_connect(GTK_OBJECT(resolution_replaygain_dither), "clicked", (GCallback)resolution_replaygain_dither_cb, NULL);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
557 gtk_box_pack_start(GTK_BOX(resolution_replaygain_vbox), resolution_replaygain_dither, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
558
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
559 hbox = gtk_hbox_new(FALSE, 10);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
560 gtk_container_border_width(GTK_CONTAINER(hbox), 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
561 gtk_box_pack_start(GTK_BOX(resolution_replaygain_vbox), hbox, TRUE, TRUE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
562
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
563 resolution_replaygain_noise_shaping_frame = gtk_frame_new(_("Noise shaping"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
564 gtk_container_border_width(GTK_CONTAINER(resolution_replaygain_noise_shaping_frame), 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
565 gtk_box_pack_start(GTK_BOX(hbox), resolution_replaygain_noise_shaping_frame, TRUE, TRUE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
566
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
567 resolution_replaygain_noise_shaping_vbox = gtk_vbutton_box_new();
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
568 gtk_container_border_width(GTK_CONTAINER(resolution_replaygain_noise_shaping_vbox), 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
569 gtk_container_add(GTK_CONTAINER(resolution_replaygain_noise_shaping_frame), resolution_replaygain_noise_shaping_vbox);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
570
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
571 resolution_replaygain_noise_shaping_radio_none = gtk_radio_button_new_with_label(NULL, _("none"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
572 if(flac_cfg.output.resolution.replaygain.noise_shaping == 0)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
573 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(resolution_replaygain_noise_shaping_radio_none), TRUE);
209
bd8457b077cf [svn] Add casts to callbacks in signal handlers to avoid warning. Remove stale pause handler declaration from wav-sndfile.h
chainsaw
parents: 188
diff changeset
574 gtk_signal_connect(GTK_OBJECT(resolution_replaygain_noise_shaping_radio_none), "clicked", (GCallback)resolution_replaygain_noise_shaping_cb, NULL);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
575 gtk_container_add(GTK_CONTAINER(resolution_replaygain_noise_shaping_vbox), resolution_replaygain_noise_shaping_radio_none);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
576
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
577 resolution_replaygain_noise_shaping_radio_low = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(resolution_replaygain_noise_shaping_radio_none), _("low"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
578 if(flac_cfg.output.resolution.replaygain.noise_shaping == 1)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
579 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(resolution_replaygain_noise_shaping_radio_low), TRUE);
209
bd8457b077cf [svn] Add casts to callbacks in signal handlers to avoid warning. Remove stale pause handler declaration from wav-sndfile.h
chainsaw
parents: 188
diff changeset
580 gtk_signal_connect(GTK_OBJECT(resolution_replaygain_noise_shaping_radio_low), "clicked", (GCallback)resolution_replaygain_noise_shaping_cb, NULL);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
581 gtk_container_add(GTK_CONTAINER(resolution_replaygain_noise_shaping_vbox), resolution_replaygain_noise_shaping_radio_low);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
582
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
583 resolution_replaygain_noise_shaping_radio_medium = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(resolution_replaygain_noise_shaping_radio_none), _("medium"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
584 if(flac_cfg.output.resolution.replaygain.noise_shaping == 2)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
585 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(resolution_replaygain_noise_shaping_radio_medium), TRUE);
209
bd8457b077cf [svn] Add casts to callbacks in signal handlers to avoid warning. Remove stale pause handler declaration from wav-sndfile.h
chainsaw
parents: 188
diff changeset
586 gtk_signal_connect(GTK_OBJECT(resolution_replaygain_noise_shaping_radio_medium), "clicked", (GCallback)resolution_replaygain_noise_shaping_cb, NULL);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
587 gtk_container_add(GTK_CONTAINER(resolution_replaygain_noise_shaping_vbox), resolution_replaygain_noise_shaping_radio_medium);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
588
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
589 resolution_replaygain_noise_shaping_radio_high = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(resolution_replaygain_noise_shaping_radio_none), _("high"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
590 if(flac_cfg.output.resolution.replaygain.noise_shaping == 3)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
591 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(resolution_replaygain_noise_shaping_radio_high), TRUE);
209
bd8457b077cf [svn] Add casts to callbacks in signal handlers to avoid warning. Remove stale pause handler declaration from wav-sndfile.h
chainsaw
parents: 188
diff changeset
592 gtk_signal_connect(GTK_OBJECT(resolution_replaygain_noise_shaping_radio_high), "clicked", (GCallback)resolution_replaygain_noise_shaping_cb, NULL);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
593 gtk_container_add(GTK_CONTAINER(resolution_replaygain_noise_shaping_vbox), resolution_replaygain_noise_shaping_radio_high);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
594
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
595 resolution_replaygain_bps_out_frame = gtk_frame_new(_("Dither to"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
596 gtk_container_border_width(GTK_CONTAINER(resolution_replaygain_bps_out_frame), 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
597 gtk_box_pack_start(GTK_BOX(hbox), resolution_replaygain_bps_out_frame, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
598
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
599 resolution_replaygain_bps_out_vbox = gtk_vbutton_box_new();
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
600 gtk_container_border_width(GTK_CONTAINER(resolution_replaygain_bps_out_vbox), 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
601 gtk_container_add(GTK_CONTAINER(resolution_replaygain_bps_out_frame), resolution_replaygain_bps_out_vbox);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
602
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
603 resolution_replaygain_bps_out_radio_16bps = gtk_radio_button_new_with_label(NULL, _("16 bps"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
604 if(flac_cfg.output.resolution.replaygain.bps_out == 16)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
605 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(resolution_replaygain_bps_out_radio_16bps), TRUE);
209
bd8457b077cf [svn] Add casts to callbacks in signal handlers to avoid warning. Remove stale pause handler declaration from wav-sndfile.h
chainsaw
parents: 188
diff changeset
606 gtk_signal_connect(GTK_OBJECT(resolution_replaygain_bps_out_radio_16bps), "clicked", (GCallback)resolution_replaygain_bps_out_cb, NULL);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
607 gtk_container_add(GTK_CONTAINER(resolution_replaygain_bps_out_vbox), resolution_replaygain_bps_out_radio_16bps);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
608
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
609 resolution_replaygain_bps_out_radio_24bps = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(resolution_replaygain_bps_out_radio_16bps), _("24 bps"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
610 if(flac_cfg.output.resolution.replaygain.bps_out == 24)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
611 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(resolution_replaygain_bps_out_radio_24bps), TRUE);
209
bd8457b077cf [svn] Add casts to callbacks in signal handlers to avoid warning. Remove stale pause handler declaration from wav-sndfile.h
chainsaw
parents: 188
diff changeset
612 gtk_signal_connect(GTK_OBJECT(resolution_replaygain_bps_out_radio_24bps), "clicked", (GCallback)resolution_replaygain_bps_out_cb, NULL);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
613 gtk_container_add(GTK_CONTAINER(resolution_replaygain_bps_out_vbox), resolution_replaygain_bps_out_radio_24bps);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
614
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
615 resolution_replaygain_dither_cb(resolution_replaygain_dither, NULL);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
616
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
617 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), output_vbox, gtk_label_new(_("Output")));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
618
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
619 /* Streaming */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
620
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
621 streaming_vbox = gtk_vbox_new(FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
622
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
623 streaming_buf_frame = gtk_frame_new(_("Buffering:"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
624 gtk_container_set_border_width(GTK_CONTAINER(streaming_buf_frame), 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
625 gtk_box_pack_start(GTK_BOX(streaming_vbox), streaming_buf_frame, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
626
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
627 streaming_buf_hbox = gtk_hbox_new(TRUE, 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
628 gtk_container_set_border_width(GTK_CONTAINER(streaming_buf_hbox), 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
629 gtk_container_add(GTK_CONTAINER(streaming_buf_frame), streaming_buf_hbox);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
630
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
631 streaming_size_box = gtk_hbox_new(FALSE, 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
632 /*gtk_table_attach_defaults(GTK_TABLE(streaming_buf_table),streaming_size_box,0,1,0,1); */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
633 gtk_box_pack_start(GTK_BOX(streaming_buf_hbox), streaming_size_box, TRUE, TRUE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
634 streaming_size_label = gtk_label_new(_("Buffer size (kb):"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
635 gtk_box_pack_start(GTK_BOX(streaming_size_box), streaming_size_label, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
636 streaming_size_adj = gtk_adjustment_new(flac_cfg.stream.http_buffer_size, 4, 4096, 4, 4, 4);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
637 streaming_size_spin = gtk_spin_button_new(GTK_ADJUSTMENT(streaming_size_adj), 8, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
638 gtk_widget_set_usize(streaming_size_spin, 60, -1);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
639 gtk_box_pack_start(GTK_BOX(streaming_size_box), streaming_size_spin, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
640
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
641 streaming_pre_box = gtk_hbox_new(FALSE, 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
642 /*gtk_table_attach_defaults(GTK_TABLE(streaming_buf_table),streaming_pre_box,1,2,0,1); */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
643 gtk_box_pack_start(GTK_BOX(streaming_buf_hbox), streaming_pre_box, TRUE, TRUE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
644 streaming_pre_label = gtk_label_new(_("Pre-buffer (percent):"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
645 gtk_box_pack_start(GTK_BOX(streaming_pre_box), streaming_pre_label, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
646 streaming_pre_adj = gtk_adjustment_new(flac_cfg.stream.http_prebuffer, 0, 90, 1, 1, 1);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
647 streaming_pre_spin = gtk_spin_button_new(GTK_ADJUSTMENT(streaming_pre_adj), 1, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
648 gtk_widget_set_usize(streaming_pre_spin, 60, -1);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
649 gtk_box_pack_start(GTK_BOX(streaming_pre_box), streaming_pre_spin, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
650
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
651 /*
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
652 * Proxy config.
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
653 */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
654 streaming_proxy_frame = gtk_frame_new(_("Proxy:"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
655 gtk_container_set_border_width(GTK_CONTAINER(streaming_proxy_frame), 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
656 gtk_box_pack_start(GTK_BOX(streaming_vbox), streaming_proxy_frame, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
657
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
658 streaming_proxy_vbox = gtk_vbox_new(FALSE, 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
659 gtk_container_set_border_width(GTK_CONTAINER(streaming_proxy_vbox), 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
660 gtk_container_add(GTK_CONTAINER(streaming_proxy_frame), streaming_proxy_vbox);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
661
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
662 streaming_proxy_use = gtk_check_button_new_with_label(_("Use proxy"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
663 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(streaming_proxy_use), flac_cfg.stream.use_proxy);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
664 gtk_signal_connect(GTK_OBJECT(streaming_proxy_use), "clicked", GTK_SIGNAL_FUNC(proxy_use_cb), NULL);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
665 gtk_box_pack_start(GTK_BOX(streaming_proxy_vbox), streaming_proxy_use, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
666
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
667 streaming_proxy_hbox = gtk_hbox_new(FALSE, 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
668 gtk_widget_set_sensitive(streaming_proxy_hbox, flac_cfg.stream.use_proxy);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
669 gtk_box_pack_start(GTK_BOX(streaming_proxy_vbox), streaming_proxy_hbox, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
670
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
671 streaming_proxy_host_label = gtk_label_new(_("Host:"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
672 gtk_box_pack_start(GTK_BOX(streaming_proxy_hbox), streaming_proxy_host_label, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
673
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
674 streaming_proxy_host_entry = gtk_entry_new();
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
675 gtk_entry_set_text(GTK_ENTRY(streaming_proxy_host_entry), flac_cfg.stream.proxy_host);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
676 gtk_box_pack_start(GTK_BOX(streaming_proxy_hbox), streaming_proxy_host_entry, TRUE, TRUE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
677
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
678 streaming_proxy_port_label = gtk_label_new(_("Port:"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
679 gtk_box_pack_start(GTK_BOX(streaming_proxy_hbox), streaming_proxy_port_label, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
680
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
681 streaming_proxy_port_entry = gtk_entry_new();
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
682 gtk_widget_set_usize(streaming_proxy_port_entry, 50, -1);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
683 temp = g_strdup_printf("%d", flac_cfg.stream.proxy_port);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
684 gtk_entry_set_text(GTK_ENTRY(streaming_proxy_port_entry), temp);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
685 g_free(temp);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
686 gtk_box_pack_start(GTK_BOX(streaming_proxy_hbox), streaming_proxy_port_entry, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
687
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
688 streaming_proxy_auth_use = gtk_check_button_new_with_label(_("Use authentication"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
689 gtk_widget_set_sensitive(streaming_proxy_auth_use, flac_cfg.stream.use_proxy);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
690 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(streaming_proxy_auth_use), flac_cfg.stream.proxy_use_auth);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
691 gtk_signal_connect(GTK_OBJECT(streaming_proxy_auth_use), "clicked", GTK_SIGNAL_FUNC(proxy_auth_use_cb), NULL);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
692 gtk_box_pack_start(GTK_BOX(streaming_proxy_vbox), streaming_proxy_auth_use, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
693
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
694 streaming_proxy_auth_hbox = gtk_hbox_new(FALSE, 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
695 gtk_widget_set_sensitive(streaming_proxy_auth_hbox, flac_cfg.stream.use_proxy && flac_cfg.stream.proxy_use_auth);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
696 gtk_box_pack_start(GTK_BOX(streaming_proxy_vbox), streaming_proxy_auth_hbox, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
697
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
698 streaming_proxy_auth_user_label = gtk_label_new(_("Username:"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
699 gtk_box_pack_start(GTK_BOX(streaming_proxy_auth_hbox), streaming_proxy_auth_user_label, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
700
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
701 streaming_proxy_auth_user_entry = gtk_entry_new();
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
702 if(flac_cfg.stream.proxy_user)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
703 gtk_entry_set_text(GTK_ENTRY(streaming_proxy_auth_user_entry), flac_cfg.stream.proxy_user);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
704 gtk_box_pack_start(GTK_BOX(streaming_proxy_auth_hbox), streaming_proxy_auth_user_entry, TRUE, TRUE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
705
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
706 streaming_proxy_auth_pass_label = gtk_label_new(_("Password:"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
707 gtk_box_pack_start(GTK_BOX(streaming_proxy_auth_hbox), streaming_proxy_auth_pass_label, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
708
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
709 streaming_proxy_auth_pass_entry = gtk_entry_new();
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
710 if(flac_cfg.stream.proxy_pass)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
711 gtk_entry_set_text(GTK_ENTRY(streaming_proxy_auth_pass_entry), flac_cfg.stream.proxy_pass);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
712 gtk_entry_set_visibility(GTK_ENTRY(streaming_proxy_auth_pass_entry), FALSE);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
713 gtk_box_pack_start(GTK_BOX(streaming_proxy_auth_hbox), streaming_proxy_auth_pass_entry, TRUE, TRUE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
714
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
715
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
716 /*
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
717 * Save to disk config.
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
718 */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
719 streaming_save_frame = gtk_frame_new(_("Save stream to disk:"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
720 gtk_container_set_border_width(GTK_CONTAINER(streaming_save_frame), 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
721 gtk_box_pack_start(GTK_BOX(streaming_vbox), streaming_save_frame, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
722
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
723 streaming_save_vbox = gtk_vbox_new(FALSE, 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
724 gtk_container_set_border_width(GTK_CONTAINER(streaming_save_vbox), 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
725 gtk_container_add(GTK_CONTAINER(streaming_save_frame), streaming_save_vbox);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
726
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
727 streaming_save_use = gtk_check_button_new_with_label(_("Save stream to disk"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
728 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(streaming_save_use), flac_cfg.stream.save_http_stream);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
729 gtk_signal_connect(GTK_OBJECT(streaming_save_use), "clicked", GTK_SIGNAL_FUNC(streaming_save_use_cb), NULL);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
730 gtk_box_pack_start(GTK_BOX(streaming_save_vbox), streaming_save_use, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
731
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
732 streaming_save_hbox = gtk_hbox_new(FALSE, 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
733 gtk_widget_set_sensitive(streaming_save_hbox, flac_cfg.stream.save_http_stream);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
734 gtk_box_pack_start(GTK_BOX(streaming_save_vbox), streaming_save_hbox, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
735
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
736 streaming_save_label = gtk_label_new(_("Path:"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
737 gtk_box_pack_start(GTK_BOX(streaming_save_hbox), streaming_save_label, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
738
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
739 streaming_save_entry = gtk_entry_new();
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
740 gtk_entry_set_text(GTK_ENTRY(streaming_save_entry), flac_cfg.stream.save_http_path);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
741 gtk_box_pack_start(GTK_BOX(streaming_save_hbox), streaming_save_entry, TRUE, TRUE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
742
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
743 streaming_save_browse = gtk_button_new_with_label(_("Browse"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
744 gtk_signal_connect(GTK_OBJECT(streaming_save_browse), "clicked", GTK_SIGNAL_FUNC(streaming_save_browse_cb), NULL);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
745 gtk_box_pack_start(GTK_BOX(streaming_save_hbox), streaming_save_browse, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
746
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
747 #ifdef FLAC_ICECAST
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
748 streaming_cast_frame = gtk_frame_new(_("SHOUT/Icecast:"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
749 gtk_container_set_border_width(GTK_CONTAINER(streaming_cast_frame), 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
750 gtk_box_pack_start(GTK_BOX(streaming_vbox), streaming_cast_frame, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
751
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
752 streaming_cast_vbox = gtk_vbox_new(5, FALSE);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
753 gtk_container_add(GTK_CONTAINER(streaming_cast_frame), streaming_cast_vbox);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
754
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
755 streaming_cast_title = gtk_check_button_new_with_label(_("Enable SHOUT/Icecast title streaming"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
756 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(streaming_cast_title), flac_cfg.stream.cast_title_streaming);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
757 gtk_box_pack_start(GTK_BOX(streaming_cast_vbox), streaming_cast_title, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
758
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
759 streaming_udp_title = gtk_check_button_new_with_label(_("Enable Icecast Metadata UDP Channel"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
760 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(streaming_udp_title), flac_cfg.stream.use_udp_channel);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
761 gtk_box_pack_start(GTK_BOX(streaming_cast_vbox), streaming_udp_title, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
762 #endif
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
763
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
764 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), streaming_vbox, gtk_label_new(_("Streaming")));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
765
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
766 /* Buttons */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
767
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
768 bbox = gtk_hbutton_box_new();
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
769 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
770 gtk_button_box_set_spacing(GTK_BUTTON_BOX(bbox), 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
771 gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
772
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
773 ok = gtk_button_new_with_label(_("Ok"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
774 gtk_signal_connect(GTK_OBJECT(ok), "clicked", GTK_SIGNAL_FUNC(flac_configurewin_ok), NULL);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
775 GTK_WIDGET_SET_FLAGS(ok, GTK_CAN_DEFAULT);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
776 gtk_box_pack_start(GTK_BOX(bbox), ok, TRUE, TRUE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
777 gtk_widget_grab_default(ok);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
778
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
779 cancel = gtk_button_new_with_label(_("Cancel"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
780 gtk_signal_connect_object(GTK_OBJECT(cancel), "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy), GTK_OBJECT(flac_configurewin));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
781 GTK_WIDGET_SET_FLAGS(cancel, GTK_CAN_DEFAULT);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
782 gtk_box_pack_start(GTK_BOX(bbox), cancel, TRUE, TRUE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
783
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
784 gtk_widget_show_all(flac_configurewin);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
785 }
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
786
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
787 void FLAC_XMMS__aboutbox()
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
788 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
789 static GtkWidget *about_window;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
790
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
791 if (about_window)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
792 gdk_window_raise(about_window->window);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
793
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
794 about_window = xmms_show_message(
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
795 _("About Flac Plugin"),
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
796 _("Flac Plugin by Josh Coalson\n"
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
797 "contributions by\n"
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
798 "......\n"
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
799 "......\n"
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
800 "and\n"
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
801 "Daisuke Shimamura\n"
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
802 "Visit http://flac.sourceforge.net/"),
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
803 _("Ok"), FALSE, NULL, NULL);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
804 gtk_signal_connect(GTK_OBJECT(about_window), "destroy",
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
805 GTK_SIGNAL_FUNC(gtk_widget_destroyed),
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
806 &about_window);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
807 }
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
808
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
809 /*
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
810 * Get text of an Entry or a ComboBox
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
811 */
248
e557fce67f47 [svn] Avoid discarding pointer type qualifiers.
chainsaw
parents: 209
diff changeset
812 static const gchar *gtk_entry_get_text_1 (GtkWidget *widget)
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
813 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
814 if (GTK_IS_COMBO(widget))
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
815 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
816 return gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(widget)->entry));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
817 }else if (GTK_IS_ENTRY(widget))
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
818 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
819 return gtk_entry_get_text(GTK_ENTRY(widget));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
820 }else
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
821 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
822 return NULL;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
823 }
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
824 }