annotate src/flac112/configure.c @ 436:a668576342e0 trunk

[svn] - make amidi-plug use audacious_get_localdir()
author giacomo
date Mon, 15 Jan 2007 12:46:38 -0800
parents 1a82af4f13cf
children be4cde738a73
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
104
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
1 /* libxmms-flac - XMMS FLAC input plugin
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
2 * Copyright (C) 2002,2003,2004,2005 Daisuke Shimamura
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
3 *
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
4 * Based on mpg123 plugin
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
5 * and prefs.c - 2000/05/06
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
6 * EasyTAG - Tag editor for MP3 and OGG files
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
7 * Copyright (C) 2000-2002 Jerome Couderc <j.couderc@ifrance.com>
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
8 *
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
9 * This program is free software; you can redistribute it and/or
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
10 * modify it under the terms of the GNU General Public License
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
11 * as published by the Free Software Foundation; either version 2
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
12 * of the License, or (at your option) any later version.
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
13 *
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful,
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
17 * GNU General Public License for more details.
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
18 *
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
20 * along with this program; if not, write to the Free Software
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
22 */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
23
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
24 #include <stdlib.h>
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
25 #include <string.h>
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
26 #include <glib.h>
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
27 #include <gtk/gtk.h>
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
28 #include <math.h>
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
29
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
30 #include <audacious/configdb.h>
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
31 #include <audacious/titlestring.h>
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
32 #include <audacious/util.h>
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
33 #include <audacious/plugin.h>
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
34
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
35 #include "plugin_common/locale_hack.h"
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
36 #include "replaygain_synthesis.h" /* for NOISE_SHAPING_LOW */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
37 #include "charset.h"
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
38 #include "configure.h"
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
39
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
40 /*
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
41 * Initialize Global Valueable
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
42 */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
43 flac_config_t flac_cfg = {
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
44 /* title */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
45 {
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
46 FALSE, /* tag_override */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
47 NULL, /* tag_format */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
48 FALSE, /* convert_char_set */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
49 NULL /* user_char_set */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
50 },
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
51 /* stream */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
52 {
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
53 100 /* KB */, /* http_buffer_size */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
54 50, /* http_prebuffer */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
55 FALSE, /* use_proxy */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
56 "", /* proxy_host */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
57 0, /* proxy_port */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
58 FALSE, /* proxy_use_auth */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
59 "", /* proxy_user */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
60 "", /* proxy_pass */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
61 FALSE, /* save_http_stream */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
62 "", /* save_http_path */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
63 FALSE, /* cast_title_streaming */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
64 FALSE /* use_udp_channel */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
65 },
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
66 /* output */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
67 {
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
68 /* replaygain */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
69 {
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
70 FALSE, /* enable */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
71 TRUE, /* album_mode */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
72 0, /* preamp */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
73 FALSE /* hard_limit */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
74 },
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
75 /* resolution */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
76 {
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
77 /* normal */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
78 {
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
79 TRUE /* dither_24_to_16 */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
80 },
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
81 /* replaygain */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
82 {
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
83 TRUE, /* dither */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
84 NOISE_SHAPING_LOW, /* noise_shaping */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
85 16 /* bps_out */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
86 }
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
87 }
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
88 }
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
89 };
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
90
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
91
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
92 static GtkWidget *flac_configurewin = NULL;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
93 static GtkWidget *vbox, *notebook;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
94
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
95 static GtkWidget *title_tag_override, *title_tag_box, *title_tag_entry, *title_desc;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
96 static GtkWidget *convert_char_set, *fileCharacterSetEntry, *userCharacterSetEntry;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
97 static GtkWidget *replaygain_enable, *replaygain_album_mode;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
98 static GtkWidget *replaygain_preamp_hscale, *replaygain_preamp_label, *replaygain_hard_limit;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
99 static GtkObject *replaygain_preamp;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
100 static GtkWidget *resolution_normal_dither_24_to_16;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
101 static GtkWidget *resolution_replaygain_dither;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
102 static GtkWidget *resolution_replaygain_noise_shaping_frame;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
103 static GtkWidget *resolution_replaygain_noise_shaping_radio_none;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
104 static GtkWidget *resolution_replaygain_noise_shaping_radio_low;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
105 static GtkWidget *resolution_replaygain_noise_shaping_radio_medium;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
106 static GtkWidget *resolution_replaygain_noise_shaping_radio_high;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
107 static GtkWidget *resolution_replaygain_bps_out_frame;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
108 static GtkWidget *resolution_replaygain_bps_out_radio_16bps;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
109 static GtkWidget *resolution_replaygain_bps_out_radio_24bps;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
110
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
111 static GtkObject *streaming_size_adj, *streaming_pre_adj;
420
810787dce408 [svn] Replaced xmms_create_dir_browser
mf0102
parents: 104
diff changeset
112 static GtkWidget *streaming_save_use;
104
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
113 #ifdef FLAC_ICECAST
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
114 static GtkWidget *streaming_cast_title, *streaming_udp_title;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
115 #endif
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
116 static GtkWidget *streaming_save_dirbrowser;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
117 static GtkWidget *streaming_save_hbox;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
118
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
119 static const gchar *gtk_entry_get_text_1 (GtkWidget *widget);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
120 static void flac_configurewin_ok(GtkWidget * widget, gpointer data);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
121 static void configure_destroy(GtkWidget * w, gpointer data);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
122
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
123 static void flac_configurewin_ok(GtkWidget * widget, gpointer data)
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
124 {
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
125 ConfigDb *db;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
126
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
127 (void)widget, (void)data; /* unused arguments */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
128 g_free(flac_cfg.title.tag_format);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
129 flac_cfg.title.tag_format = g_strdup(gtk_entry_get_text(GTK_ENTRY(title_tag_entry)));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
130 flac_cfg.title.user_char_set = Charset_Get_Name_From_Title(gtk_entry_get_text_1(userCharacterSetEntry));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
131
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
132 db = bmp_cfg_db_open();
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
133 /* title */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
134 bmp_cfg_db_set_bool(db, "flac", "title.tag_override", flac_cfg.title.tag_override);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
135 bmp_cfg_db_set_string(db, "flac", "title.tag_format", flac_cfg.title.tag_format);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
136 bmp_cfg_db_set_bool(db, "flac", "title.convert_char_set", flac_cfg.title.convert_char_set);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
137 bmp_cfg_db_set_string(db, "flac", "title.user_char_set", flac_cfg.title.user_char_set);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
138 /* output */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
139 bmp_cfg_db_set_bool(db, "flac", "output.replaygain.enable", flac_cfg.output.replaygain.enable);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
140 bmp_cfg_db_set_bool(db, "flac", "output.replaygain.album_mode", flac_cfg.output.replaygain.album_mode);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
141 bmp_cfg_db_set_int(db, "flac", "output.replaygain.preamp", flac_cfg.output.replaygain.preamp);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
142 bmp_cfg_db_set_bool(db, "flac", "output.replaygain.hard_limit", flac_cfg.output.replaygain.hard_limit);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
143 bmp_cfg_db_set_bool(db, "flac", "output.resolution.normal.dither_24_to_16", flac_cfg.output.resolution.normal.dither_24_to_16);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
144 bmp_cfg_db_set_bool(db, "flac", "output.resolution.replaygain.dither", flac_cfg.output.resolution.replaygain.dither);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
145 bmp_cfg_db_set_int(db, "flac", "output.resolution.replaygain.noise_shaping", flac_cfg.output.resolution.replaygain.noise_shaping);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
146 bmp_cfg_db_set_int(db, "flac", "output.resolution.replaygain.bps_out", flac_cfg.output.resolution.replaygain.bps_out);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
147 /* streaming */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
148 flac_cfg.stream.http_buffer_size = (gint) GTK_ADJUSTMENT(streaming_size_adj)->value;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
149 flac_cfg.stream.http_prebuffer = (gint) GTK_ADJUSTMENT(streaming_pre_adj)->value;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
150
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
151 flac_cfg.stream.save_http_stream = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_save_use));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
152
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
153 if (flac_cfg.stream.save_http_path != NULL)
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
154 g_free(flac_cfg.stream.save_http_path);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
155
420
810787dce408 [svn] Replaced xmms_create_dir_browser
mf0102
parents: 104
diff changeset
156 flac_cfg.stream.save_http_path =
810787dce408 [svn] Replaced xmms_create_dir_browser
mf0102
parents: 104
diff changeset
157 g_strdup(gtk_file_chooser_get_current_folder(GTK_FILE_CHOOSER(streaming_save_dirbrowser)));
104
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
158
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
159 #ifdef FLAC_ICECAST
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
160 flac_cfg.stream.cast_title_streaming = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_cast_title));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
161 flac_cfg.stream.use_udp_channel = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_udp_title));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
162 #endif
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
163
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
164 bmp_cfg_db_set_int(db, "flac", "stream.http_buffer_size", flac_cfg.stream.http_buffer_size);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
165 bmp_cfg_db_set_int(db, "flac", "stream.http_prebuffer", flac_cfg.stream.http_prebuffer);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
166 bmp_cfg_db_set_bool(db, "flac", "stream.save_http_stream", flac_cfg.stream.save_http_stream);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
167 bmp_cfg_db_set_string(db, "flac", "stream.save_http_path", flac_cfg.stream.save_http_path);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
168 #ifdef FLAC_ICECAST
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
169 bmp_cfg_db_set_bool(db, "flac", "stream.cast_title_streaming", flac_cfg.stream.cast_title_streaming);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
170 bmp_cfg_db_set_bool(db, "flac", "stream.use_udp_channel", flac_cfg.stream.use_udp_channel);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
171 #endif
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
172
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
173 bmp_cfg_db_close(db);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
174 gtk_widget_destroy(flac_configurewin);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
175 }
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
176
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
177 static void configure_destroy(GtkWidget *widget, gpointer data)
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
178 {
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
179 (void)widget, (void)data; /* unused arguments */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
180 }
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
181
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
182 static void title_tag_override_cb(GtkWidget *widget, gpointer data)
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
183 {
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
184 (void)widget, (void)data; /* unused arguments */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
185 flac_cfg.title.tag_override = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(title_tag_override));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
186
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
187 gtk_widget_set_sensitive(title_tag_box, flac_cfg.title.tag_override);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
188 gtk_widget_set_sensitive(title_desc, flac_cfg.title.tag_override);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
189
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
190 }
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
191
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
192 static void convert_char_set_cb(GtkWidget *widget, gpointer data)
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
193 {
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
194 (void)widget, (void)data; /* unused arguments */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
195 flac_cfg.title.convert_char_set = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(convert_char_set));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
196
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
197 gtk_widget_set_sensitive(fileCharacterSetEntry, FALSE);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
198 gtk_widget_set_sensitive(userCharacterSetEntry, flac_cfg.title.convert_char_set);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
199 }
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
200
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
201 static void replaygain_enable_cb(GtkWidget *widget, gpointer data)
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
202 {
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
203 (void)widget, (void)data; /* unused arguments */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
204 flac_cfg.output.replaygain.enable = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(replaygain_enable));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
205
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
206 gtk_widget_set_sensitive(replaygain_album_mode, flac_cfg.output.replaygain.enable);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
207 gtk_widget_set_sensitive(replaygain_preamp_hscale, flac_cfg.output.replaygain.enable);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
208 gtk_widget_set_sensitive(replaygain_hard_limit, flac_cfg.output.replaygain.enable);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
209 }
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
210
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
211 static void replaygain_album_mode_cb(GtkWidget *widget, gpointer data)
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
212 {
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
213 (void)widget, (void)data; /* unused arguments */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
214 flac_cfg.output.replaygain.album_mode = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(replaygain_album_mode));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
215 }
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
216
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
217 static void replaygain_hard_limit_cb(GtkWidget *widget, gpointer data)
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
218 {
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
219 (void)widget, (void)data; /* unused arguments */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
220 flac_cfg.output.replaygain.hard_limit = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(replaygain_hard_limit));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
221 }
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
222
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
223 static void replaygain_preamp_cb(GtkWidget *widget, gpointer data)
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
224 {
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
225 GString *gstring = g_string_new("");
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
226 (void)widget, (void)data; /* unused arguments */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
227 flac_cfg.output.replaygain.preamp = (int) floor(GTK_ADJUSTMENT(replaygain_preamp)->value + 0.5);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
228
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
229 g_string_sprintf(gstring, "%i dB", flac_cfg.output.replaygain.preamp);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
230 gtk_label_set_text(GTK_LABEL(replaygain_preamp_label), _(gstring->str));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
231 }
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
232
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
233 static void resolution_normal_dither_24_to_16_cb(GtkWidget *widget, gpointer data)
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
234 {
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
235 (void)widget, (void)data; /* unused arguments */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
236 flac_cfg.output.resolution.normal.dither_24_to_16 = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(resolution_normal_dither_24_to_16));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
237 }
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
238
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
239 static void resolution_replaygain_dither_cb(GtkWidget *widget, gpointer data)
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
240 {
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
241 (void)widget, (void)data; /* unused arguments */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
242 flac_cfg.output.resolution.replaygain.dither = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(resolution_replaygain_dither));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
243
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
244 gtk_widget_set_sensitive(resolution_replaygain_noise_shaping_frame, flac_cfg.output.resolution.replaygain.dither);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
245 }
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
246
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
247 static void resolution_replaygain_noise_shaping_cb(GtkWidget *widget, gpointer data)
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
248 {
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
249 (void)widget, (void)data; /* unused arguments */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
250 flac_cfg.output.resolution.replaygain.noise_shaping =
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
251 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(resolution_replaygain_noise_shaping_radio_none))? 0 :
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
252 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(resolution_replaygain_noise_shaping_radio_low))? 1 :
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
253 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(resolution_replaygain_noise_shaping_radio_medium))? 2 :
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
254 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(resolution_replaygain_noise_shaping_radio_high))? 3 :
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
255 0
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
256 ;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
257 }
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
258
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
259 static void resolution_replaygain_bps_out_cb(GtkWidget *widget, gpointer data)
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
260 {
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
261 (void)widget, (void)data; /* unused arguments */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
262 flac_cfg.output.resolution.replaygain.bps_out =
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
263 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(resolution_replaygain_bps_out_radio_16bps))? 16 :
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
264 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(resolution_replaygain_bps_out_radio_24bps))? 24 :
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
265 16
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
266 ;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
267 }
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
268
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
269 static void streaming_save_use_cb(GtkWidget * w, gpointer data)
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
270 {
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
271 gboolean save_stream;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
272 (void) w;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
273 (void) data;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
274
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
275 save_stream = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_save_use));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
276
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
277 gtk_widget_set_sensitive(streaming_save_hbox, save_stream);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
278 }
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
279
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
280
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
281 void FLAC_XMMS__configure(void)
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
282 {
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
283 GtkWidget *title_frame, *title_tag_vbox, *title_tag_label;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
284 GtkWidget *replaygain_frame, *resolution_frame, *output_vbox, *resolution_normal_frame, *resolution_replaygain_frame;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
285 GtkWidget *replaygain_vbox, *resolution_hbox, *resolution_normal_vbox, *resolution_replaygain_vbox;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
286 GtkWidget *resolution_replaygain_noise_shaping_vbox;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
287 GtkWidget *resolution_replaygain_bps_out_vbox;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
288 GtkWidget *label, *hbox;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
289 GtkWidget *bbox, *ok, *cancel;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
290 GList *list;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
291
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
292 GtkWidget *streaming_vbox;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
293 GtkWidget *streaming_buf_frame, *streaming_buf_hbox;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
294 GtkWidget *streaming_size_box, *streaming_size_label, *streaming_size_spin;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
295 GtkWidget *streaming_pre_box, *streaming_pre_label, *streaming_pre_spin;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
296 GtkWidget *streaming_save_frame, *streaming_save_vbox;
421
1a82af4f13cf [svn] More xmms_create_dirbrowser cleanup
mf0102
parents: 420
diff changeset
297 GtkWidget *streaming_save_label;
104
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
298 #ifdef FLAC_ICECAST
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
299 GtkWidget *streaming_cast_frame, *streaming_cast_vbox;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
300 #endif
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
301
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
302 if (flac_configurewin != NULL) {
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
303 gdk_window_raise(flac_configurewin->window);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
304 return;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
305 }
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
306 flac_configurewin = gtk_window_new(GTK_WINDOW_TOPLEVEL);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
307 gtk_signal_connect(GTK_OBJECT(flac_configurewin), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &flac_configurewin);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
308 gtk_signal_connect(GTK_OBJECT(flac_configurewin), "destroy", GTK_SIGNAL_FUNC(configure_destroy), &flac_configurewin);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
309 gtk_window_set_title(GTK_WINDOW(flac_configurewin), _("Flac Configuration"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
310 gtk_window_set_policy(GTK_WINDOW(flac_configurewin), FALSE, FALSE, FALSE);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
311 gtk_container_border_width(GTK_CONTAINER(flac_configurewin), 10);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
312
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
313 vbox = gtk_vbox_new(FALSE, 10);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
314 gtk_container_add(GTK_CONTAINER(flac_configurewin), vbox);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
315
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
316 notebook = gtk_notebook_new();
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
317 gtk_box_pack_start(GTK_BOX(vbox), notebook, TRUE, TRUE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
318
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
319 /* Title config.. */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
320
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
321 title_frame = gtk_frame_new(_("Tag Handling"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
322 gtk_container_border_width(GTK_CONTAINER(title_frame), 5);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
323
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
324 title_tag_vbox = gtk_vbox_new(FALSE, 10);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
325 gtk_container_border_width(GTK_CONTAINER(title_tag_vbox), 5);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
326 gtk_container_add(GTK_CONTAINER(title_frame), title_tag_vbox);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
327
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
328 /* Convert Char Set */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
329
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
330 convert_char_set = gtk_check_button_new_with_label(_("Convert Character Set"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
331 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(convert_char_set), flac_cfg.title.convert_char_set);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
332 gtk_signal_connect(GTK_OBJECT(convert_char_set), "clicked", (GCallback)convert_char_set_cb, NULL);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
333 gtk_box_pack_start(GTK_BOX(title_tag_vbox), convert_char_set, FALSE, FALSE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
334 /* Combo boxes... */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
335 hbox = gtk_hbox_new(FALSE,4);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
336 gtk_container_add(GTK_CONTAINER(title_tag_vbox),hbox);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
337 label = gtk_label_new(_("Convert character set from :"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
338 gtk_box_pack_start(GTK_BOX(hbox),label,FALSE,FALSE,0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
339 fileCharacterSetEntry = gtk_combo_new();
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
340 gtk_box_pack_start(GTK_BOX(hbox),fileCharacterSetEntry,TRUE,TRUE,0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
341
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
342 label = gtk_label_new (_("to :"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
343 gtk_box_pack_start(GTK_BOX(hbox),label,FALSE,FALSE,0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
344 userCharacterSetEntry = gtk_combo_new();
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
345 gtk_box_pack_start(GTK_BOX(hbox),userCharacterSetEntry,TRUE,TRUE,0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
346
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
347 gtk_entry_set_editable(GTK_ENTRY(GTK_COMBO(fileCharacterSetEntry)->entry),FALSE);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
348 gtk_entry_set_editable(GTK_ENTRY(GTK_COMBO(userCharacterSetEntry)->entry),FALSE);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
349 gtk_combo_set_value_in_list(GTK_COMBO(fileCharacterSetEntry),TRUE,FALSE);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
350 gtk_combo_set_value_in_list(GTK_COMBO(userCharacterSetEntry),TRUE,FALSE);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
351
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
352 list = Charset_Create_List();
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
353 gtk_combo_set_popdown_strings(GTK_COMBO(fileCharacterSetEntry),Charset_Create_List_UTF8_Only());
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
354 gtk_combo_set_popdown_strings(GTK_COMBO(userCharacterSetEntry),list);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
355 gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(userCharacterSetEntry)->entry),Charset_Get_Title_From_Name(flac_cfg.title.user_char_set));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
356 gtk_widget_set_sensitive(fileCharacterSetEntry, FALSE);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
357 gtk_widget_set_sensitive(userCharacterSetEntry, flac_cfg.title.convert_char_set);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
358
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
359 /* Override Tagging Format */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
360
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
361 title_tag_override = gtk_check_button_new_with_label(_("Override generic titles"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
362 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(title_tag_override), flac_cfg.title.tag_override);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
363 gtk_signal_connect(GTK_OBJECT(title_tag_override), "clicked", (GCallback)title_tag_override_cb, NULL);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
364 gtk_box_pack_start(GTK_BOX(title_tag_vbox), title_tag_override, FALSE, FALSE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
365
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
366 title_tag_box = gtk_hbox_new(FALSE, 5);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
367 gtk_widget_set_sensitive(title_tag_box, flac_cfg.title.tag_override);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
368 gtk_box_pack_start(GTK_BOX(title_tag_vbox), title_tag_box, FALSE, FALSE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
369
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
370 title_tag_label = gtk_label_new(_("Title format:"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
371 gtk_box_pack_start(GTK_BOX(title_tag_box), title_tag_label, FALSE, FALSE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
372
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
373 title_tag_entry = gtk_entry_new();
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
374 gtk_entry_set_text(GTK_ENTRY(title_tag_entry), flac_cfg.title.tag_format);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
375 gtk_box_pack_start(GTK_BOX(title_tag_box), title_tag_entry, TRUE, TRUE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
376
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
377 title_desc = xmms_titlestring_descriptions("pafFetnygc", 2);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
378 gtk_widget_set_sensitive(title_desc, flac_cfg.title.tag_override);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
379 gtk_box_pack_start(GTK_BOX(title_tag_vbox), title_desc, FALSE, FALSE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
380
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
381 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), title_frame, gtk_label_new(_("Title")));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
382
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
383 /* Output config.. */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
384
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
385 output_vbox = gtk_vbox_new(FALSE, 10);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
386 gtk_container_border_width(GTK_CONTAINER(output_vbox), 5);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
387
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
388 /* replaygain */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
389
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
390 replaygain_frame = gtk_frame_new(_("ReplayGain"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
391 gtk_container_border_width(GTK_CONTAINER(replaygain_frame), 5);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
392 gtk_box_pack_start(GTK_BOX(output_vbox), replaygain_frame, TRUE, TRUE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
393
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
394 replaygain_vbox = gtk_vbox_new(FALSE, 10);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
395 gtk_container_border_width(GTK_CONTAINER(replaygain_vbox), 5);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
396 gtk_container_add(GTK_CONTAINER(replaygain_frame), replaygain_vbox);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
397
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
398 replaygain_enable = gtk_check_button_new_with_label(_("Enable ReplayGain processing"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
399 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(replaygain_enable), flac_cfg.output.replaygain.enable);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
400 gtk_signal_connect(GTK_OBJECT(replaygain_enable), "clicked", (GCallback)replaygain_enable_cb, NULL);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
401 gtk_box_pack_start(GTK_BOX(replaygain_vbox), replaygain_enable, FALSE, FALSE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
402
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
403 replaygain_album_mode = gtk_check_button_new_with_label(_("Album mode"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
404 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(replaygain_album_mode), flac_cfg.output.replaygain.album_mode);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
405 gtk_signal_connect(GTK_OBJECT(replaygain_album_mode), "clicked", (GCallback)replaygain_album_mode_cb, NULL);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
406 gtk_box_pack_start(GTK_BOX(replaygain_vbox), replaygain_album_mode, FALSE, FALSE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
407
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
408 hbox = gtk_hbox_new(FALSE,3);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
409 gtk_container_add(GTK_CONTAINER(replaygain_vbox),hbox);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
410 label = gtk_label_new(_("Preamp:"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
411 gtk_box_pack_start(GTK_BOX(hbox),label,FALSE,FALSE,0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
412 replaygain_preamp = gtk_adjustment_new(flac_cfg.output.replaygain.preamp, -24.0, +24.0, 1.0, 6.0, 0.0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
413 gtk_signal_connect(GTK_OBJECT(replaygain_preamp), "value-changed", (GCallback)replaygain_preamp_cb, NULL);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
414 replaygain_preamp_hscale = gtk_hscale_new(GTK_ADJUSTMENT(replaygain_preamp));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
415 gtk_scale_set_draw_value(GTK_SCALE(replaygain_preamp_hscale), FALSE);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
416 gtk_box_pack_start(GTK_BOX(hbox),replaygain_preamp_hscale,TRUE,TRUE,0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
417 replaygain_preamp_label = gtk_label_new(_("0 dB"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
418 gtk_box_pack_start(GTK_BOX(hbox),replaygain_preamp_label,FALSE,FALSE,0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
419 gtk_adjustment_value_changed(GTK_ADJUSTMENT(replaygain_preamp));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
420
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
421 replaygain_hard_limit = gtk_check_button_new_with_label(_("6dB hard limiting"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
422 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(replaygain_hard_limit), flac_cfg.output.replaygain.hard_limit);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
423 gtk_signal_connect(GTK_OBJECT(replaygain_hard_limit), "clicked", (GCallback)replaygain_hard_limit_cb, NULL);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
424 gtk_box_pack_start(GTK_BOX(replaygain_vbox), replaygain_hard_limit, FALSE, FALSE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
425
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
426 replaygain_enable_cb(replaygain_enable, NULL);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
427
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
428 /* resolution */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
429
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
430 resolution_frame = gtk_frame_new(_("Resolution"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
431 gtk_container_border_width(GTK_CONTAINER(resolution_frame), 5);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
432 gtk_box_pack_start(GTK_BOX(output_vbox), resolution_frame, TRUE, TRUE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
433
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
434 resolution_hbox = gtk_hbox_new(FALSE, 10);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
435 gtk_container_border_width(GTK_CONTAINER(resolution_hbox), 5);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
436 gtk_container_add(GTK_CONTAINER(resolution_frame), resolution_hbox);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
437
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
438 resolution_normal_frame = gtk_frame_new(_("Without ReplayGain"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
439 gtk_container_border_width(GTK_CONTAINER(resolution_normal_frame), 5);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
440 gtk_box_pack_start(GTK_BOX(resolution_hbox), resolution_normal_frame, TRUE, TRUE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
441
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
442 resolution_normal_vbox = gtk_vbox_new(FALSE, 10);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
443 gtk_container_border_width(GTK_CONTAINER(resolution_normal_vbox), 5);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
444 gtk_container_add(GTK_CONTAINER(resolution_normal_frame), resolution_normal_vbox);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
445
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
446 resolution_normal_dither_24_to_16 = gtk_check_button_new_with_label(_("Dither 24bps to 16bps"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
447 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(resolution_normal_dither_24_to_16), flac_cfg.output.resolution.normal.dither_24_to_16);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
448 gtk_signal_connect(GTK_OBJECT(resolution_normal_dither_24_to_16), "clicked", (GCallback)resolution_normal_dither_24_to_16_cb, NULL);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
449 gtk_box_pack_start(GTK_BOX(resolution_normal_vbox), resolution_normal_dither_24_to_16, FALSE, FALSE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
450
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
451 resolution_replaygain_frame = gtk_frame_new(_("With ReplayGain"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
452 gtk_container_border_width(GTK_CONTAINER(resolution_replaygain_frame), 5);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
453 gtk_box_pack_start(GTK_BOX(resolution_hbox), resolution_replaygain_frame, TRUE, TRUE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
454
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
455 resolution_replaygain_vbox = gtk_vbox_new(FALSE, 10);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
456 gtk_container_border_width(GTK_CONTAINER(resolution_replaygain_vbox), 5);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
457 gtk_container_add(GTK_CONTAINER(resolution_replaygain_frame), resolution_replaygain_vbox);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
458
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
459 resolution_replaygain_dither = gtk_check_button_new_with_label(_("Enable dithering"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
460 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(resolution_replaygain_dither), flac_cfg.output.resolution.replaygain.dither);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
461 gtk_signal_connect(GTK_OBJECT(resolution_replaygain_dither), "clicked", (GCallback)resolution_replaygain_dither_cb, NULL);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
462 gtk_box_pack_start(GTK_BOX(resolution_replaygain_vbox), resolution_replaygain_dither, FALSE, FALSE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
463
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
464 hbox = gtk_hbox_new(FALSE, 10);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
465 gtk_container_border_width(GTK_CONTAINER(hbox), 5);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
466 gtk_box_pack_start(GTK_BOX(resolution_replaygain_vbox), hbox, TRUE, TRUE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
467
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
468 resolution_replaygain_noise_shaping_frame = gtk_frame_new(_("Noise shaping"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
469 gtk_container_border_width(GTK_CONTAINER(resolution_replaygain_noise_shaping_frame), 5);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
470 gtk_box_pack_start(GTK_BOX(hbox), resolution_replaygain_noise_shaping_frame, TRUE, TRUE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
471
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
472 resolution_replaygain_noise_shaping_vbox = gtk_vbutton_box_new();
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
473 gtk_container_border_width(GTK_CONTAINER(resolution_replaygain_noise_shaping_vbox), 5);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
474 gtk_container_add(GTK_CONTAINER(resolution_replaygain_noise_shaping_frame), resolution_replaygain_noise_shaping_vbox);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
475
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
476 resolution_replaygain_noise_shaping_radio_none = gtk_radio_button_new_with_label(NULL, _("none"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
477 if(flac_cfg.output.resolution.replaygain.noise_shaping == 0)
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
478 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(resolution_replaygain_noise_shaping_radio_none), TRUE);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
479 gtk_signal_connect(GTK_OBJECT(resolution_replaygain_noise_shaping_radio_none), "clicked", (GCallback)resolution_replaygain_noise_shaping_cb, NULL);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
480 gtk_container_add(GTK_CONTAINER(resolution_replaygain_noise_shaping_vbox), resolution_replaygain_noise_shaping_radio_none);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
481
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
482 resolution_replaygain_noise_shaping_radio_low = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(resolution_replaygain_noise_shaping_radio_none), _("low"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
483 if(flac_cfg.output.resolution.replaygain.noise_shaping == 1)
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
484 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(resolution_replaygain_noise_shaping_radio_low), TRUE);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
485 gtk_signal_connect(GTK_OBJECT(resolution_replaygain_noise_shaping_radio_low), "clicked", (GCallback)resolution_replaygain_noise_shaping_cb, NULL);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
486 gtk_container_add(GTK_CONTAINER(resolution_replaygain_noise_shaping_vbox), resolution_replaygain_noise_shaping_radio_low);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
487
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
488 resolution_replaygain_noise_shaping_radio_medium = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(resolution_replaygain_noise_shaping_radio_none), _("medium"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
489 if(flac_cfg.output.resolution.replaygain.noise_shaping == 2)
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
490 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(resolution_replaygain_noise_shaping_radio_medium), TRUE);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
491 gtk_signal_connect(GTK_OBJECT(resolution_replaygain_noise_shaping_radio_medium), "clicked", (GCallback)resolution_replaygain_noise_shaping_cb, NULL);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
492 gtk_container_add(GTK_CONTAINER(resolution_replaygain_noise_shaping_vbox), resolution_replaygain_noise_shaping_radio_medium);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
493
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
494 resolution_replaygain_noise_shaping_radio_high = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(resolution_replaygain_noise_shaping_radio_none), _("high"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
495 if(flac_cfg.output.resolution.replaygain.noise_shaping == 3)
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
496 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(resolution_replaygain_noise_shaping_radio_high), TRUE);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
497 gtk_signal_connect(GTK_OBJECT(resolution_replaygain_noise_shaping_radio_high), "clicked", (GCallback)resolution_replaygain_noise_shaping_cb, NULL);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
498 gtk_container_add(GTK_CONTAINER(resolution_replaygain_noise_shaping_vbox), resolution_replaygain_noise_shaping_radio_high);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
499
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
500 resolution_replaygain_bps_out_frame = gtk_frame_new(_("Dither to"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
501 gtk_container_border_width(GTK_CONTAINER(resolution_replaygain_bps_out_frame), 5);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
502 gtk_box_pack_start(GTK_BOX(hbox), resolution_replaygain_bps_out_frame, FALSE, FALSE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
503
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
504 resolution_replaygain_bps_out_vbox = gtk_vbutton_box_new();
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
505 gtk_container_border_width(GTK_CONTAINER(resolution_replaygain_bps_out_vbox), 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
506 gtk_container_add(GTK_CONTAINER(resolution_replaygain_bps_out_frame), resolution_replaygain_bps_out_vbox);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
507
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
508 resolution_replaygain_bps_out_radio_16bps = gtk_radio_button_new_with_label(NULL, _("16 bps"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
509 if(flac_cfg.output.resolution.replaygain.bps_out == 16)
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
510 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(resolution_replaygain_bps_out_radio_16bps), TRUE);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
511 gtk_signal_connect(GTK_OBJECT(resolution_replaygain_bps_out_radio_16bps), "clicked", (GCallback)resolution_replaygain_bps_out_cb, NULL);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
512 gtk_container_add(GTK_CONTAINER(resolution_replaygain_bps_out_vbox), resolution_replaygain_bps_out_radio_16bps);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
513
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
514 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"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
515 if(flac_cfg.output.resolution.replaygain.bps_out == 24)
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
516 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(resolution_replaygain_bps_out_radio_24bps), TRUE);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
517 gtk_signal_connect(GTK_OBJECT(resolution_replaygain_bps_out_radio_24bps), "clicked", (GCallback)resolution_replaygain_bps_out_cb, NULL);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
518 gtk_container_add(GTK_CONTAINER(resolution_replaygain_bps_out_vbox), resolution_replaygain_bps_out_radio_24bps);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
519
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
520 resolution_replaygain_dither_cb(resolution_replaygain_dither, NULL);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
521
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
522 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), output_vbox, gtk_label_new(_("Output")));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
523
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
524 /* Streaming */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
525
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
526 streaming_vbox = gtk_vbox_new(FALSE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
527
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
528 streaming_buf_frame = gtk_frame_new(_("Buffering:"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
529 gtk_container_set_border_width(GTK_CONTAINER(streaming_buf_frame), 5);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
530 gtk_box_pack_start(GTK_BOX(streaming_vbox), streaming_buf_frame, FALSE, FALSE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
531
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
532 streaming_buf_hbox = gtk_hbox_new(TRUE, 5);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
533 gtk_container_set_border_width(GTK_CONTAINER(streaming_buf_hbox), 5);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
534 gtk_container_add(GTK_CONTAINER(streaming_buf_frame), streaming_buf_hbox);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
535
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
536 streaming_size_box = gtk_hbox_new(FALSE, 5);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
537 /*gtk_table_attach_defaults(GTK_TABLE(streaming_buf_table),streaming_size_box,0,1,0,1); */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
538 gtk_box_pack_start(GTK_BOX(streaming_buf_hbox), streaming_size_box, TRUE, TRUE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
539 streaming_size_label = gtk_label_new(_("Buffer size (kb):"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
540 gtk_box_pack_start(GTK_BOX(streaming_size_box), streaming_size_label, FALSE, FALSE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
541 streaming_size_adj = gtk_adjustment_new(flac_cfg.stream.http_buffer_size, 4, 4096, 4, 4, 4);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
542 streaming_size_spin = gtk_spin_button_new(GTK_ADJUSTMENT(streaming_size_adj), 8, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
543 gtk_widget_set_usize(streaming_size_spin, 60, -1);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
544 gtk_box_pack_start(GTK_BOX(streaming_size_box), streaming_size_spin, FALSE, FALSE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
545
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
546 streaming_pre_box = gtk_hbox_new(FALSE, 5);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
547 /*gtk_table_attach_defaults(GTK_TABLE(streaming_buf_table),streaming_pre_box,1,2,0,1); */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
548 gtk_box_pack_start(GTK_BOX(streaming_buf_hbox), streaming_pre_box, TRUE, TRUE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
549 streaming_pre_label = gtk_label_new(_("Pre-buffer (percent):"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
550 gtk_box_pack_start(GTK_BOX(streaming_pre_box), streaming_pre_label, FALSE, FALSE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
551 streaming_pre_adj = gtk_adjustment_new(flac_cfg.stream.http_prebuffer, 0, 90, 1, 1, 1);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
552 streaming_pre_spin = gtk_spin_button_new(GTK_ADJUSTMENT(streaming_pre_adj), 1, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
553 gtk_widget_set_usize(streaming_pre_spin, 60, -1);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
554 gtk_box_pack_start(GTK_BOX(streaming_pre_box), streaming_pre_spin, FALSE, FALSE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
555
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
556 /*
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
557 * Save to disk config.
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
558 */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
559 streaming_save_frame = gtk_frame_new(_("Save stream to disk:"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
560 gtk_container_set_border_width(GTK_CONTAINER(streaming_save_frame), 5);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
561 gtk_box_pack_start(GTK_BOX(streaming_vbox), streaming_save_frame, FALSE, FALSE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
562
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
563 streaming_save_vbox = gtk_vbox_new(FALSE, 5);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
564 gtk_container_set_border_width(GTK_CONTAINER(streaming_save_vbox), 5);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
565 gtk_container_add(GTK_CONTAINER(streaming_save_frame), streaming_save_vbox);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
566
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
567 streaming_save_use = gtk_check_button_new_with_label(_("Save stream to disk"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
568 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(streaming_save_use), flac_cfg.stream.save_http_stream);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
569 gtk_signal_connect(GTK_OBJECT(streaming_save_use), "clicked", GTK_SIGNAL_FUNC(streaming_save_use_cb), NULL);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
570 gtk_box_pack_start(GTK_BOX(streaming_save_vbox), streaming_save_use, FALSE, FALSE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
571
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
572 streaming_save_hbox = gtk_hbox_new(FALSE, 5);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
573 gtk_widget_set_sensitive(streaming_save_hbox, flac_cfg.stream.save_http_stream);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
574 gtk_box_pack_start(GTK_BOX(streaming_save_vbox), streaming_save_hbox, FALSE, FALSE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
575
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
576 streaming_save_label = gtk_label_new(_("Path:"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
577 gtk_box_pack_start(GTK_BOX(streaming_save_hbox), streaming_save_label, FALSE, FALSE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
578
420
810787dce408 [svn] Replaced xmms_create_dir_browser
mf0102
parents: 104
diff changeset
579 streaming_save_dirbrowser =
810787dce408 [svn] Replaced xmms_create_dir_browser
mf0102
parents: 104
diff changeset
580 gtk_file_chooser_button_new (_("Pick a folder"), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
810787dce408 [svn] Replaced xmms_create_dir_browser
mf0102
parents: 104
diff changeset
581 gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(streaming_save_dirbrowser),
810787dce408 [svn] Replaced xmms_create_dir_browser
mf0102
parents: 104
diff changeset
582 flac_cfg.stream.save_http_path);
810787dce408 [svn] Replaced xmms_create_dir_browser
mf0102
parents: 104
diff changeset
583 gtk_box_pack_start(GTK_BOX(streaming_save_hbox), streaming_save_dirbrowser, TRUE, TRUE, 0);
104
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
584
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
585 #ifdef FLAC_ICECAST
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
586 streaming_cast_frame = gtk_frame_new(_("SHOUT/Icecast:"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
587 gtk_container_set_border_width(GTK_CONTAINER(streaming_cast_frame), 5);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
588 gtk_box_pack_start(GTK_BOX(streaming_vbox), streaming_cast_frame, FALSE, FALSE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
589
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
590 streaming_cast_vbox = gtk_vbox_new(5, FALSE);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
591 gtk_container_add(GTK_CONTAINER(streaming_cast_frame), streaming_cast_vbox);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
592
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
593 streaming_cast_title = gtk_check_button_new_with_label(_("Enable SHOUT/Icecast title streaming"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
594 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(streaming_cast_title), flac_cfg.stream.cast_title_streaming);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
595 gtk_box_pack_start(GTK_BOX(streaming_cast_vbox), streaming_cast_title, FALSE, FALSE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
596
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
597 streaming_udp_title = gtk_check_button_new_with_label(_("Enable Icecast Metadata UDP Channel"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
598 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(streaming_udp_title), flac_cfg.stream.use_udp_channel);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
599 gtk_box_pack_start(GTK_BOX(streaming_cast_vbox), streaming_udp_title, FALSE, FALSE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
600 #endif
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
601
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
602 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), streaming_vbox, gtk_label_new(_("Streaming")));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
603
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
604 /* Buttons */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
605
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
606 bbox = gtk_hbutton_box_new();
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
607 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
608 gtk_button_box_set_spacing(GTK_BUTTON_BOX(bbox), 5);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
609 gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
610
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
611 ok = gtk_button_new_with_label(_("Ok"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
612 gtk_signal_connect(GTK_OBJECT(ok), "clicked", GTK_SIGNAL_FUNC(flac_configurewin_ok), NULL);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
613 GTK_WIDGET_SET_FLAGS(ok, GTK_CAN_DEFAULT);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
614 gtk_box_pack_start(GTK_BOX(bbox), ok, TRUE, TRUE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
615 gtk_widget_grab_default(ok);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
616
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
617 cancel = gtk_button_new_with_label(_("Cancel"));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
618 gtk_signal_connect_object(GTK_OBJECT(cancel), "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy), GTK_OBJECT(flac_configurewin));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
619 GTK_WIDGET_SET_FLAGS(cancel, GTK_CAN_DEFAULT);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
620 gtk_box_pack_start(GTK_BOX(bbox), cancel, TRUE, TRUE, 0);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
621
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
622 gtk_widget_show_all(flac_configurewin);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
623 }
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
624
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
625 void FLAC_XMMS__aboutbox()
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
626 {
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
627 static GtkWidget *about_window;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
628
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
629 if (about_window)
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
630 gdk_window_raise(about_window->window);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
631 else
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
632 {
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
633 about_window = xmms_show_message(
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
634 _("About Flac Plugin"),
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
635 _("Flac Plugin by Josh Coalson\n"
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
636 "contributions by\n"
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
637 "......\n"
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
638 "......\n"
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
639 "and\n"
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
640 "Daisuke Shimamura\n"
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
641 "Visit http://flac.sourceforge.net/"),
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
642 _("Ok"), FALSE, NULL, NULL);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
643 gtk_signal_connect(GTK_OBJECT(about_window), "destroy",
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
644 GTK_SIGNAL_FUNC(gtk_widget_destroyed),
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
645 &about_window);
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
646 }
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
647 }
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
648
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
649 /*
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
650 * Get text of an Entry or a ComboBox
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
651 */
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
652 static const gchar *gtk_entry_get_text_1 (GtkWidget *widget)
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
653 {
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
654 if (GTK_IS_COMBO(widget))
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
655 {
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
656 return gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(widget)->entry));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
657 }else if (GTK_IS_ENTRY(widget))
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
658 {
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
659 return gtk_entry_get_text(GTK_ENTRY(widget));
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
660 }else
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
661 {
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
662 return NULL;
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
663 }
4b31176c198a [svn] - 1.1.2 compatible plugin (I HATE YOU FLAC PEOPLE)
nenolod
parents:
diff changeset
664 }