annotate Plugins/Input/mpg123/configure.c @ 1260:bf0664762d4a trunk

[svn] - remove unused code (causes a crash on some GTKs, eww!)
author nenolod
date Thu, 15 Jun 2006 19:06:40 -0700
parents b5ae09a6c2f1
children c7b3996a123f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
1
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
2 #include "mpg123.h"
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
3
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
4 #include <glib.h>
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
5 #include <glib/gi18n.h>
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
6 #include <gtk/gtk.h>
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
7 #include <stdlib.h>
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
8 #include <string.h>
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
9 #include <math.h>
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
10
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
11 #include <libaudacious/configdb.h>
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
12 #include <libaudacious/dirbrowser.h>
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
13 #include <libaudacious/titlestring.h>
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
14
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
15
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
16 static GtkWidget *mpgdec_configurewin = NULL;
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
17 static GtkWidget *vbox, *notebook;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
18 static GtkWidget *decode_vbox, *decode_hbox1;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
19 static GtkWidget *decode_res_frame, *decode_res_vbox, *decode_res_16,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
20 *decode_res_8;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
21 static GtkWidget *decode_ch_frame, *decode_ch_vbox, *decode_ch_stereo,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
22 *decode_ch_mono;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
23 static GtkWidget *decode_freq_frame, *decode_freq_vbox, *decode_freq_1to1,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
24 *decode_freq_1to2, *decode_freq_1to4;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
25
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
26 static GtkObject *streaming_size_adj, *streaming_pre_adj;
1071
592ef16386aa [svn] - use global proxy configuration instead of individual configurations (chainsaw)
nenolod
parents: 651
diff changeset
27 static GtkWidget *streaming_save_use, *streaming_save_entry;
1260
bf0664762d4a [svn] - remove unused code (causes a crash on some GTKs, eww!)
nenolod
parents: 1098
diff changeset
28 static GtkWidget *streaming_udp_title;
1071
592ef16386aa [svn] - use global proxy configuration instead of individual configurations (chainsaw)
nenolod
parents: 651
diff changeset
29 static GtkWidget *streaming_save_dirbrowser;
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
30 static GtkWidget *streaming_save_hbox, *title_id3_box, *title_tag_desc;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
31 static GtkWidget *title_override, *title_id3_entry, *title_id3v2_disable;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
32
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
33 /* Encoding patch */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
34 static GtkWidget *title_encoding_hbox, *title_encoding_enabled, *title_encoding, *title_encoding_label;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
35 /* Encoding patch */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
36
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
37 MPG123Config mpgdec_cfg;
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
38
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
39 static void
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
40 mpgdec_configurewin_ok(GtkWidget * widget, gpointer data)
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
41 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
42 ConfigDb *db;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
43
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
44 if (GTK_TOGGLE_BUTTON(decode_res_16)->active)
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
45 mpgdec_cfg.resolution = 16;
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
46 else if (GTK_TOGGLE_BUTTON(decode_res_8)->active)
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
47 mpgdec_cfg.resolution = 8;
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
48
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
49 if (GTK_TOGGLE_BUTTON(decode_ch_stereo)->active)
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
50 mpgdec_cfg.channels = 2;
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
51 else if (GTK_TOGGLE_BUTTON(decode_ch_mono)->active)
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
52 mpgdec_cfg.channels = 1;
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
53
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
54 if (GTK_TOGGLE_BUTTON(decode_freq_1to1)->active)
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
55 mpgdec_cfg.downsample = 0;
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
56 else if (GTK_TOGGLE_BUTTON(decode_freq_1to2)->active)
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
57 mpgdec_cfg.downsample = 1;
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
58 if (GTK_TOGGLE_BUTTON(decode_freq_1to4)->active)
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
59 mpgdec_cfg.downsample = 2;
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
60
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
61 mpgdec_cfg.http_buffer_size =
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
62 (gint) GTK_ADJUSTMENT(streaming_size_adj)->value;
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
63 mpgdec_cfg.http_prebuffer =
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
64 (gint) GTK_ADJUSTMENT(streaming_pre_adj)->value;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
65
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
66 mpgdec_cfg.save_http_stream =
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
67 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_save_use));
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
68 if (mpgdec_cfg.save_http_path)
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
69 g_free(mpgdec_cfg.save_http_path);
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
70 mpgdec_cfg.save_http_path =
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
71 g_strdup(gtk_entry_get_text(GTK_ENTRY(streaming_save_entry)));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
72
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
73 mpgdec_cfg.use_udp_channel =
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
74 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_udp_title));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
75
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
76 mpgdec_cfg.title_override =
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
77 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(title_override));
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
78 mpgdec_cfg.disable_id3v2 =
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
79 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(title_id3v2_disable));
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
80 g_free(mpgdec_cfg.id3_format);
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
81 mpgdec_cfg.id3_format =
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
82 g_strdup(gtk_entry_get_text(GTK_ENTRY(title_id3_entry)));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
83
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
84 mpgdec_cfg.title_encoding_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(title_encoding_enabled));
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
85 mpgdec_cfg.title_encoding = g_strdup(gtk_entry_get_text(GTK_ENTRY(title_encoding)));
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
86 if (mpgdec_cfg.title_encoding_enabled)
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
87 mpgdec_id3_encoding_list = g_strsplit_set(mpgdec_cfg.title_encoding, ENCODING_SEPARATOR, 0);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
88 db = bmp_cfg_db_open();
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
89 bmp_cfg_db_set_int(db, "MPG123", "resolution", mpgdec_cfg.resolution);
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
90 bmp_cfg_db_set_int(db, "MPG123", "channels", mpgdec_cfg.channels);
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
91 bmp_cfg_db_set_int(db, "MPG123", "downsample", mpgdec_cfg.downsample);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
92 bmp_cfg_db_set_int(db, "MPG123", "http_buffer_size",
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
93 mpgdec_cfg.http_buffer_size);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
94 bmp_cfg_db_set_int(db, "MPG123", "http_prebuffer",
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
95 mpgdec_cfg.http_prebuffer);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
96 bmp_cfg_db_set_bool(db, "MPG123", "save_http_stream",
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
97 mpgdec_cfg.save_http_stream);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
98 bmp_cfg_db_set_string(db, "MPG123", "save_http_path",
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
99 mpgdec_cfg.save_http_path);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
100 bmp_cfg_db_set_bool(db, "MPG123", "use_udp_channel",
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
101 mpgdec_cfg.use_udp_channel);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
102 bmp_cfg_db_set_bool(db, "MPG123", "title_override",
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
103 mpgdec_cfg.title_override);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
104 bmp_cfg_db_set_bool(db, "MPG123", "disable_id3v2",
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
105 mpgdec_cfg.disable_id3v2);
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
106 bmp_cfg_db_set_string(db, "MPG123", "id3_format", mpgdec_cfg.id3_format);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
107
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
108 /* Encoding patch */
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
109 bmp_cfg_db_set_bool(db, "MPG123", "title_encoding_enabled", mpgdec_cfg.title_encoding_enabled);
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
110 bmp_cfg_db_set_string(db, "MPG123", "title_encoding", mpgdec_cfg.title_encoding);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
111 /* Encoding patch */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
112
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
113 bmp_cfg_db_close(db);
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
114 gtk_widget_destroy(mpgdec_configurewin);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
115 }
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
116
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
117 static void
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
118 streaming_save_dirbrowser_cb(gchar * dir)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
119 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
120 gtk_entry_set_text(GTK_ENTRY(streaming_save_entry), dir);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
121 }
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
122
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
123 static void
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
124 streaming_save_browse_cb(GtkWidget * w, gpointer data)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
125 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
126 if (!streaming_save_dirbrowser) {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
127 streaming_save_dirbrowser =
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
128 xmms_create_dir_browser(_
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
129 ("Select the directory where you want to store the MPEG streams:"),
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
130 mpgdec_cfg.save_http_path,
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
131 GTK_SELECTION_SINGLE,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
132 streaming_save_dirbrowser_cb);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
133 g_signal_connect(G_OBJECT(streaming_save_dirbrowser), "destroy",
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
134 G_CALLBACK(gtk_widget_destroyed),
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
135 &streaming_save_dirbrowser);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
136 gtk_window_set_transient_for(GTK_WINDOW(streaming_save_dirbrowser),
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
137 GTK_WINDOW(mpgdec_configurewin));
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
138 gtk_widget_show(streaming_save_dirbrowser);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
139 }
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
140 }
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
141
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
142 static void
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
143 streaming_save_use_cb(GtkWidget * w, gpointer data)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
144 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
145 gboolean save_stream;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
146
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
147 save_stream =
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
148 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_save_use));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
149
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
150 gtk_widget_set_sensitive(streaming_save_hbox, save_stream);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
151 }
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
152
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
153 static void
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
154 title_override_cb(GtkWidget * w, gpointer data)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
155 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
156 gboolean override;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
157 override =
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
158 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(title_override));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
159 gtk_widget_set_sensitive(title_id3_box, override);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
160 gtk_widget_set_sensitive(title_tag_desc, override);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
161 }
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
162
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
163 /* Encoding patch */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
164 static void
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
165 title_encoding_enabled_cb(GtkWidget * w, gpointer data)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
166 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
167 gboolean encoding_enabled;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
168 encoding_enabled =
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
169 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(title_encoding_enabled));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
170 gtk_widget_set_sensitive(title_encoding_hbox, encoding_enabled);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
171 }
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
172 /* Encoding patch */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
173
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
174 static void
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
175 configure_destroy(GtkWidget * w, gpointer data)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
176 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
177 if (streaming_save_dirbrowser)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
178 gtk_widget_destroy(streaming_save_dirbrowser);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
179 }
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
180
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
181 void
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
182 mpgdec_configure(void)
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
183 {
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
184 GtkWidget *streaming_vbox;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
185 GtkWidget *streaming_buf_frame, *streaming_buf_hbox;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
186 GtkWidget *streaming_size_box, *streaming_size_label,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
187 *streaming_size_spin;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
188 GtkWidget *streaming_pre_box, *streaming_pre_label, *streaming_pre_spin;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
189 GtkWidget *streaming_save_frame, *streaming_save_vbox;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
190 GtkWidget *streaming_save_label, *streaming_save_browse;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
191 GtkWidget *streaming_cast_frame, *streaming_cast_vbox;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
192 GtkWidget *title_frame, *title_id3_vbox, *title_id3_label;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
193 GtkWidget *bbox, *ok, *cancel;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
194
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
195 if (mpgdec_configurewin != NULL) {
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
196 gtk_window_present(GTK_WINDOW(mpgdec_configurewin));
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
197 return;
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
198 }
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
199 mpgdec_configurewin = gtk_window_new(GTK_WINDOW_TOPLEVEL);
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
200 gtk_window_set_type_hint(GTK_WINDOW(mpgdec_configurewin),
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
201 GDK_WINDOW_TYPE_HINT_DIALOG);
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
202 gtk_window_set_position(GTK_WINDOW(mpgdec_configurewin),
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
203 GTK_WIN_POS_CENTER);
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
204 g_signal_connect(G_OBJECT(mpgdec_configurewin), "destroy",
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
205 G_CALLBACK(gtk_widget_destroyed), &mpgdec_configurewin);
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
206 g_signal_connect(G_OBJECT(mpgdec_configurewin), "destroy",
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
207 G_CALLBACK(configure_destroy), &mpgdec_configurewin);
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
208 gtk_window_set_title(GTK_WINDOW(mpgdec_configurewin),
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
209 _("MPEG Audio Plugin Configuration"));
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
210 gtk_window_set_resizable(GTK_WINDOW(mpgdec_configurewin), FALSE);
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
211 /* gtk_window_set_position(GTK_WINDOW(mpgdec_configurewin), GTK_WIN_POS_MOUSE); */
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
212 gtk_container_border_width(GTK_CONTAINER(mpgdec_configurewin), 10);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
213
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
214 vbox = gtk_vbox_new(FALSE, 10);
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
215 gtk_container_add(GTK_CONTAINER(mpgdec_configurewin), vbox);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
216
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
217 notebook = gtk_notebook_new();
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
218 gtk_box_pack_start(GTK_BOX(vbox), notebook, TRUE, TRUE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
219
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
220 decode_vbox = gtk_vbox_new(FALSE, 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
221 gtk_container_set_border_width(GTK_CONTAINER(decode_vbox), 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
222
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
223 decode_hbox1 = gtk_hbox_new(TRUE, 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
224 gtk_box_pack_start(GTK_BOX(decode_vbox), decode_hbox1, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
225
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
226 decode_res_frame = gtk_frame_new(_("Resolution:"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
227 gtk_box_pack_start(GTK_BOX(decode_hbox1), decode_res_frame, TRUE, TRUE,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
228 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
229
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
230 decode_res_vbox = gtk_vbox_new(FALSE, 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
231 gtk_container_set_border_width(GTK_CONTAINER(decode_res_vbox), 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
232 gtk_container_add(GTK_CONTAINER(decode_res_frame), decode_res_vbox);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
233
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
234 decode_res_16 = gtk_radio_button_new_with_label(NULL, _("16 bit"));
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
235 if (mpgdec_cfg.resolution == 16)
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
236 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(decode_res_16), TRUE);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
237 gtk_box_pack_start(GTK_BOX(decode_res_vbox), decode_res_16, FALSE,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
238 FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
239
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
240 decode_res_8 =
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
241 gtk_radio_button_new_with_label(gtk_radio_button_group
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
242 (GTK_RADIO_BUTTON(decode_res_16)),
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
243 _("8 bit"));
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
244 if (mpgdec_cfg.resolution == 8)
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
245 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(decode_res_8), TRUE);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
246
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
247 gtk_box_pack_start(GTK_BOX(decode_res_vbox), decode_res_8, FALSE,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
248 FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
249
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
250 decode_ch_frame = gtk_frame_new(_("Channels:"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
251 gtk_box_pack_start(GTK_BOX(decode_hbox1), decode_ch_frame, TRUE, TRUE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
252
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
253 decode_ch_vbox = gtk_vbox_new(FALSE, 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
254 gtk_container_set_border_width(GTK_CONTAINER(decode_ch_vbox), 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
255 gtk_container_add(GTK_CONTAINER(decode_ch_frame), decode_ch_vbox);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
256
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
257 decode_ch_stereo =
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
258 gtk_radio_button_new_with_label(NULL, _("Stereo (if available)"));
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
259 if (mpgdec_cfg.channels == 2)
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
260 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(decode_ch_stereo),
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
261 TRUE);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
262
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
263 gtk_box_pack_start(GTK_BOX(decode_ch_vbox), decode_ch_stereo, FALSE,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
264 FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
265
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
266 decode_ch_mono =
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
267 gtk_radio_button_new_with_label(gtk_radio_button_group
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
268 (GTK_RADIO_BUTTON
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
269 (decode_ch_stereo)), _("Mono"));
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
270 if (mpgdec_cfg.channels == 1)
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
271 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(decode_ch_mono), TRUE);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
272
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
273 gtk_box_pack_start(GTK_BOX(decode_ch_vbox), decode_ch_mono, FALSE,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
274 FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
275
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
276 decode_freq_frame = gtk_frame_new(_("Down sample:"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
277 gtk_box_pack_start(GTK_BOX(decode_vbox), decode_freq_frame, FALSE,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
278 FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
279
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
280 decode_freq_vbox = gtk_vbox_new(FALSE, 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
281 gtk_container_set_border_width(GTK_CONTAINER(decode_freq_vbox), 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
282 gtk_container_add(GTK_CONTAINER(decode_freq_frame), decode_freq_vbox);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
283
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
284 decode_freq_1to1 =
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
285 gtk_radio_button_new_with_label(NULL, _("1:1 (44 kHz)"));
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
286 if (mpgdec_cfg.downsample == 0)
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
287 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(decode_freq_1to1),
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
288 TRUE);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
289 gtk_box_pack_start(GTK_BOX(decode_freq_vbox), decode_freq_1to1, FALSE,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
290 FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
291
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
292 decode_freq_1to2 =
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
293 gtk_radio_button_new_with_label(gtk_radio_button_group
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
294 (GTK_RADIO_BUTTON
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
295 (decode_freq_1to1)),
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
296 _("1:2 (22 kHz)"));
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
297 if (mpgdec_cfg.downsample == 1)
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
298 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(decode_freq_1to2),
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
299 TRUE);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
300 gtk_box_pack_start(GTK_BOX(decode_freq_vbox), decode_freq_1to2, FALSE,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
301 FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
302
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
303 decode_freq_1to4 =
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
304 gtk_radio_button_new_with_label(gtk_radio_button_group
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
305 (GTK_RADIO_BUTTON
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
306 (decode_freq_1to1)),
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
307 _("1:4 (11 kHz)"));
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
308 if (mpgdec_cfg.downsample == 2)
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
309 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(decode_freq_1to4),
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
310 TRUE);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
311
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
312 gtk_box_pack_start(GTK_BOX(decode_freq_vbox), decode_freq_1to4, FALSE,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
313 FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
314
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
315 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), decode_vbox,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
316 gtk_label_new(_("Decoder")));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
317
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
318 streaming_vbox = gtk_vbox_new(FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
319
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
320 streaming_buf_frame = gtk_frame_new(_("Buffering:"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
321 gtk_container_set_border_width(GTK_CONTAINER(streaming_buf_frame), 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
322 gtk_box_pack_start(GTK_BOX(streaming_vbox), streaming_buf_frame, FALSE,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
323 FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
324
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
325 streaming_buf_hbox = gtk_hbox_new(TRUE, 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
326 gtk_container_set_border_width(GTK_CONTAINER(streaming_buf_hbox), 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
327 gtk_container_add(GTK_CONTAINER(streaming_buf_frame), streaming_buf_hbox);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
328
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
329 streaming_size_box = gtk_hbox_new(FALSE, 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
330 /*gtk_table_attach_defaults(GTK_TABLE(streaming_buf_table),streaming_size_box,0,1,0,1); */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
331 gtk_box_pack_start(GTK_BOX(streaming_buf_hbox), streaming_size_box,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
332 TRUE, TRUE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
333 streaming_size_label = gtk_label_new(_("Buffer size (kb):"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
334 gtk_box_pack_start(GTK_BOX(streaming_size_box), streaming_size_label,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
335 FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
336 streaming_size_adj =
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
337 gtk_adjustment_new(mpgdec_cfg.http_buffer_size, 4, 4096, 4, 4, 4);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
338 streaming_size_spin =
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
339 gtk_spin_button_new(GTK_ADJUSTMENT(streaming_size_adj), 8, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
340 gtk_widget_set_usize(streaming_size_spin, 60, -1);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
341 gtk_box_pack_start(GTK_BOX(streaming_size_box), streaming_size_spin,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
342 FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
343
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
344 streaming_pre_box = gtk_hbox_new(FALSE, 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
345 /*gtk_table_attach_defaults(GTK_TABLE(streaming_buf_table),streaming_pre_box,1,2,0,1); */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
346 gtk_box_pack_start(GTK_BOX(streaming_buf_hbox), streaming_pre_box,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
347 TRUE, TRUE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
348 streaming_pre_label = gtk_label_new(_("Pre-buffer (percent):"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
349 gtk_box_pack_start(GTK_BOX(streaming_pre_box), streaming_pre_label,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
350 FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
351 streaming_pre_adj =
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
352 gtk_adjustment_new(mpgdec_cfg.http_prebuffer, 0, 90, 1, 1, 1);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
353 streaming_pre_spin =
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
354 gtk_spin_button_new(GTK_ADJUSTMENT(streaming_pre_adj), 1, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
355 gtk_widget_set_usize(streaming_pre_spin, 60, -1);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
356 gtk_box_pack_start(GTK_BOX(streaming_pre_box), streaming_pre_spin,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
357 FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
358
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
359 /*
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
360 * Save to disk config.
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
361 */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
362 streaming_save_frame = gtk_frame_new(_("Save stream to disk:"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
363 gtk_container_set_border_width(GTK_CONTAINER(streaming_save_frame), 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
364 gtk_box_pack_start(GTK_BOX(streaming_vbox), streaming_save_frame,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
365 FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
366
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
367 streaming_save_vbox = gtk_vbox_new(FALSE, 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
368 gtk_container_set_border_width(GTK_CONTAINER(streaming_save_vbox), 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
369 gtk_container_add(GTK_CONTAINER(streaming_save_frame),
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
370 streaming_save_vbox);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
371
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
372 streaming_save_use =
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
373 gtk_check_button_new_with_label(_("Save stream to disk"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
374 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(streaming_save_use),
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
375 mpgdec_cfg.save_http_stream);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
376 g_signal_connect(G_OBJECT(streaming_save_use), "clicked",
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
377 G_CALLBACK(streaming_save_use_cb), NULL);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
378 gtk_box_pack_start(GTK_BOX(streaming_save_vbox), streaming_save_use,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
379 FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
380
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
381 streaming_save_hbox = gtk_hbox_new(FALSE, 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
382 gtk_widget_set_sensitive(streaming_save_hbox,
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
383 mpgdec_cfg.save_http_stream);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
384 gtk_box_pack_start(GTK_BOX(streaming_save_vbox), streaming_save_hbox,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
385 FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
386
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
387 streaming_save_label = gtk_label_new(_("Path:"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
388 gtk_box_pack_start(GTK_BOX(streaming_save_hbox), streaming_save_label,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
389 FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
390
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
391 streaming_save_entry = gtk_entry_new();
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
392 gtk_entry_set_text(GTK_ENTRY(streaming_save_entry),
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
393 mpgdec_cfg.save_http_path);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
394 gtk_box_pack_start(GTK_BOX(streaming_save_hbox), streaming_save_entry,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
395 TRUE, TRUE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
396
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
397 streaming_save_browse = gtk_button_new_with_label(_("Browse"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
398 g_signal_connect(G_OBJECT(streaming_save_browse), "clicked",
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
399 G_CALLBACK(streaming_save_browse_cb), NULL);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
400 gtk_box_pack_start(GTK_BOX(streaming_save_hbox), streaming_save_browse,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
401 FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
402
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
403 streaming_cast_frame = gtk_frame_new(_("SHOUT/Icecast:"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
404 gtk_container_set_border_width(GTK_CONTAINER(streaming_cast_frame), 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
405 gtk_box_pack_start(GTK_BOX(streaming_vbox), streaming_cast_frame,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
406 FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
407
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
408 streaming_cast_vbox = gtk_vbox_new(5, FALSE);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
409 gtk_container_add(GTK_CONTAINER(streaming_cast_frame),
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
410 streaming_cast_vbox);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
411
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
412 streaming_udp_title =
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
413 gtk_check_button_new_with_label(_
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
414 ("Enable Icecast Metadata UDP Channel"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
415 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(streaming_udp_title),
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
416 mpgdec_cfg.use_udp_channel);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
417 gtk_box_pack_start(GTK_BOX(streaming_cast_vbox), streaming_udp_title,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
418 FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
419
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
420 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), streaming_vbox,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
421 gtk_label_new(_("Streaming")));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
422
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
423 title_frame = gtk_frame_new(_("ID3 Tags:"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
424 gtk_container_border_width(GTK_CONTAINER(title_frame), 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
425
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
426 title_id3_vbox = gtk_vbox_new(FALSE, 10);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
427 gtk_container_border_width(GTK_CONTAINER(title_id3_vbox), 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
428 gtk_container_add(GTK_CONTAINER(title_frame), title_id3_vbox);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
429
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
430 title_id3v2_disable =
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
431 gtk_check_button_new_with_label(_("Disable ID3V2 tags"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
432 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(title_id3v2_disable),
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
433 mpgdec_cfg.disable_id3v2);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
434 gtk_box_pack_start(GTK_BOX(title_id3_vbox), title_id3v2_disable, FALSE,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
435 FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
436
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
437
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
438 /* Encoding patch */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
439 title_encoding_enabled =
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
440 gtk_check_button_new_with_label(_("Convert non-UTF8 ID3 tags to UTF8"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
441 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(title_encoding_enabled),
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
442 mpgdec_cfg.title_encoding_enabled);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
443 g_signal_connect(G_OBJECT(title_encoding_enabled), "clicked",
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
444 G_CALLBACK(title_encoding_enabled_cb), NULL);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
445 gtk_box_pack_start(GTK_BOX(title_id3_vbox), title_encoding_enabled, FALSE,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
446 FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
447
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
448 title_encoding_hbox = gtk_hbox_new(FALSE, 5);
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
449 gtk_widget_set_sensitive(title_encoding_hbox, mpgdec_cfg.title_encoding_enabled);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
450 gtk_box_pack_start(GTK_BOX(title_id3_vbox), title_encoding_hbox, FALSE,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
451 FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
452
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
453 title_encoding_label = gtk_label_new(_("ID3 encoding:"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
454 gtk_box_pack_start(GTK_BOX(title_encoding_hbox), title_encoding_label, FALSE,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
455 FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
456
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
457 title_encoding = gtk_entry_new();
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
458 gtk_entry_set_text(GTK_ENTRY(title_encoding), mpgdec_cfg.title_encoding);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
459 gtk_box_pack_start(GTK_BOX(title_encoding_hbox), title_encoding, TRUE, TRUE,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
460 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
461 /* Encoding patch */
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
462
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
463
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
464 title_override =
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
465 gtk_check_button_new_with_label(_("Override generic titles"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
466 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(title_override),
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
467 mpgdec_cfg.title_override);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
468 g_signal_connect(G_OBJECT(title_override), "clicked",
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
469 G_CALLBACK(title_override_cb), NULL);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
470 gtk_box_pack_start(GTK_BOX(title_id3_vbox), title_override, FALSE,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
471 FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
472
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
473 title_id3_box = gtk_hbox_new(FALSE, 5);
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
474 gtk_widget_set_sensitive(title_id3_box, mpgdec_cfg.title_override);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
475 gtk_box_pack_start(GTK_BOX(title_id3_vbox), title_id3_box, FALSE,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
476 FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
477
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
478 title_id3_label = gtk_label_new(_("ID3 format:"));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
479 gtk_box_pack_start(GTK_BOX(title_id3_box), title_id3_label, FALSE,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
480 FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
481
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
482 title_id3_entry = gtk_entry_new();
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
483 gtk_entry_set_text(GTK_ENTRY(title_id3_entry), mpgdec_cfg.id3_format);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
484 gtk_box_pack_start(GTK_BOX(title_id3_box), title_id3_entry, TRUE, TRUE,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
485 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
486
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
487 title_tag_desc = xmms_titlestring_descriptions("pafFetnygc", 2);
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
488 gtk_widget_set_sensitive(title_tag_desc, mpgdec_cfg.title_override);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
489 gtk_box_pack_start(GTK_BOX(title_id3_vbox), title_tag_desc, FALSE,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
490 FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
491 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), title_frame,
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
492 gtk_label_new(_("Title")));
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
493
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
494 bbox = gtk_hbutton_box_new();
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
495 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
496 gtk_button_box_set_spacing(GTK_BUTTON_BOX(bbox), 5);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
497 gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
498
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
499 cancel = gtk_button_new_from_stock(GTK_STOCK_CANCEL);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
500 g_signal_connect_swapped(G_OBJECT(cancel), "clicked",
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
501 G_CALLBACK(gtk_widget_destroy),
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
502 GTK_OBJECT(mpgdec_configurewin));
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
503 GTK_WIDGET_SET_FLAGS(cancel, GTK_CAN_DEFAULT);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
504 gtk_box_pack_start(GTK_BOX(bbox), cancel, TRUE, TRUE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
505
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
506
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
507 ok = gtk_button_new_from_stock(GTK_STOCK_OK);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
508 g_signal_connect(G_OBJECT(ok), "clicked",
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
509 G_CALLBACK(mpgdec_configurewin_ok), NULL);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
510 GTK_WIDGET_SET_FLAGS(ok, GTK_CAN_DEFAULT);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
511 gtk_box_pack_start(GTK_BOX(bbox), ok, TRUE, TRUE, 0);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
512 gtk_widget_grab_default(ok);
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
513
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1071
diff changeset
514 gtk_widget_show_all(mpgdec_configurewin);
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
515 }