Mercurial > audlegacy-plugins
comparison src/wavpack/ui.cxx @ 1325:a33da9237bed
Several "i18n" improvements.
author | Stany HENRY <StrassBoy@gmail.com> |
---|---|
date | Sat, 21 Jul 2007 17:55:46 +0200 |
parents | b1128efde471 |
children | 0ff7d08693f6 |
comparison
equal
deleted
inserted
replaced
1324:f7b7dfaf1e33 | 1325:a33da9237bed |
---|---|
8 #include <wavpack/wavpack.h> | 8 #include <wavpack/wavpack.h> |
9 #include <audacious/plugin.h> | 9 #include <audacious/plugin.h> |
10 #include <audacious/configdb.h> | 10 #include <audacious/configdb.h> |
11 #include <audacious/titlestring.h> | 11 #include <audacious/titlestring.h> |
12 #include <audacious/util.h> | 12 #include <audacious/util.h> |
13 #include <audacious/i18n.h> | |
13 } | 14 } |
14 #include <glib.h> | 15 #include <glib.h> |
15 #include <gtk/gtk.h> | 16 #include <gtk/gtk.h> |
16 #include <iconv.h> | 17 #include <iconv.h> |
17 #include <math.h> | 18 #include <math.h> |
47 if (about_window) | 48 if (about_window) |
48 gdk_window_raise(about_window->window); | 49 gdk_window_raise(about_window->window); |
49 | 50 |
50 about_window = | 51 about_window = |
51 xmms_show_message(g_strdup_printf | 52 xmms_show_message(g_strdup_printf |
52 ("Wavpack Decoder Plugin %s", VERSION), | 53 (_("Wavpack Decoder Plugin %s"), VERSION), |
53 ("Copyright (c) 2006 William Pitcock <nenolod -at- nenolod.net>\n\n" | 54 (_("Copyright (c) 2006 William Pitcock <nenolod -at- nenolod.net>\n\n" |
54 "Some of the plugin code was by Miles Egan\n" | 55 "Some of the plugin code was by Miles Egan\n" |
55 "Visit the Wavpack site at http://www.wavpack.com/\n"), | 56 "Visit the Wavpack site at http://www.wavpack.com/\n")), |
56 ("Ok"), FALSE, NULL, NULL); | 57 (_("Ok")), FALSE, NULL, NULL); |
57 gtk_signal_connect(GTK_OBJECT(about_window), "destroy", | 58 gtk_signal_connect(GTK_OBJECT(about_window), "destroy", |
58 GTK_SIGNAL_FUNC(gtk_widget_destroyed), &about_window); | 59 GTK_SIGNAL_FUNC(gtk_widget_destroyed), &about_window); |
59 } | 60 } |
60 | 61 |
61 static void | 62 static void |
145 gtk_container_add(GTK_CONTAINER(window), vbox); | 146 gtk_container_add(GTK_CONTAINER(window), vbox); |
146 | 147 |
147 filename_hbox = gtk_hbox_new(FALSE, 5); | 148 filename_hbox = gtk_hbox_new(FALSE, 5); |
148 gtk_box_pack_start(GTK_BOX(vbox), filename_hbox, FALSE, TRUE, 0); | 149 gtk_box_pack_start(GTK_BOX(vbox), filename_hbox, FALSE, TRUE, 0); |
149 | 150 |
150 label = gtk_label_new("Filename:"); | 151 label = gtk_label_new(_("Filename:")); |
151 gtk_box_pack_start(GTK_BOX(filename_hbox), label, FALSE, TRUE, 0); | 152 gtk_box_pack_start(GTK_BOX(filename_hbox), label, FALSE, TRUE, 0); |
152 filename_entry = gtk_entry_new(); | 153 filename_entry = gtk_entry_new(); |
153 gtk_editable_set_editable(GTK_EDITABLE(filename_entry), FALSE); | 154 gtk_editable_set_editable(GTK_EDITABLE(filename_entry), FALSE); |
154 gtk_box_pack_start(GTK_BOX(filename_hbox), filename_entry, | 155 gtk_box_pack_start(GTK_BOX(filename_hbox), filename_entry, |
155 TRUE, TRUE, 0); | 156 TRUE, TRUE, 0); |
158 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, TRUE, 0); | 159 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, TRUE, 0); |
159 | 160 |
160 left_vbox = gtk_vbox_new(FALSE, 10); | 161 left_vbox = gtk_vbox_new(FALSE, 10); |
161 gtk_box_pack_start(GTK_BOX(hbox), left_vbox, FALSE, FALSE, 0); | 162 gtk_box_pack_start(GTK_BOX(hbox), left_vbox, FALSE, FALSE, 0); |
162 | 163 |
163 tag_frame = gtk_frame_new("Ape2 Tag"); | 164 tag_frame = gtk_frame_new(_("Ape2 Tag")); |
164 gtk_box_pack_start(GTK_BOX(left_vbox), tag_frame, FALSE, FALSE, 0); | 165 gtk_box_pack_start(GTK_BOX(left_vbox), tag_frame, FALSE, FALSE, 0); |
165 | 166 |
166 table = gtk_table_new(5, 5, FALSE); | 167 table = gtk_table_new(5, 5, FALSE); |
167 gtk_container_set_border_width(GTK_CONTAINER(table), 5); | 168 gtk_container_set_border_width(GTK_CONTAINER(table), 5); |
168 gtk_container_add(GTK_CONTAINER(tag_frame), table); | 169 gtk_container_add(GTK_CONTAINER(tag_frame), table); |
169 | 170 |
170 label = gtk_label_new("Title:"); | 171 label = gtk_label_new(_("Title:")); |
171 gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5); | 172 gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5); |
172 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, | 173 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, |
173 GTK_FILL, GTK_FILL, 5, 5); | 174 GTK_FILL, GTK_FILL, 5, 5); |
174 | 175 |
175 title_entry = gtk_entry_new(); | 176 title_entry = gtk_entry_new(); |
177 (GtkAttachOptions) (GTK_FILL | GTK_EXPAND | | 178 (GtkAttachOptions) (GTK_FILL | GTK_EXPAND | |
178 GTK_SHRINK), | 179 GTK_SHRINK), |
179 (GtkAttachOptions) (GTK_FILL | GTK_EXPAND | | 180 (GtkAttachOptions) (GTK_FILL | GTK_EXPAND | |
180 GTK_SHRINK), 0, 5); | 181 GTK_SHRINK), 0, 5); |
181 | 182 |
182 label = gtk_label_new("Artist:"); | 183 label = gtk_label_new(_("Artist:")); |
183 gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5); | 184 gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5); |
184 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2, | 185 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2, |
185 GTK_FILL, GTK_FILL, 5, 5); | 186 GTK_FILL, GTK_FILL, 5, 5); |
186 | 187 |
187 performer_entry = gtk_entry_new(); | 188 performer_entry = gtk_entry_new(); |
189 (GtkAttachOptions) (GTK_FILL | GTK_EXPAND | | 190 (GtkAttachOptions) (GTK_FILL | GTK_EXPAND | |
190 GTK_SHRINK), | 191 GTK_SHRINK), |
191 (GtkAttachOptions) (GTK_FILL | GTK_EXPAND | | 192 (GtkAttachOptions) (GTK_FILL | GTK_EXPAND | |
192 GTK_SHRINK), 0, 5); | 193 GTK_SHRINK), 0, 5); |
193 | 194 |
194 label = gtk_label_new("Album:"); | 195 label = gtk_label_new(_("Album:")); |
195 gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5); | 196 gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5); |
196 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 2, 3, | 197 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 2, 3, |
197 GTK_FILL, GTK_FILL, 5, 5); | 198 GTK_FILL, GTK_FILL, 5, 5); |
198 | 199 |
199 album_entry = gtk_entry_new(); | 200 album_entry = gtk_entry_new(); |
201 (GtkAttachOptions) (GTK_FILL | GTK_EXPAND | | 202 (GtkAttachOptions) (GTK_FILL | GTK_EXPAND | |
202 GTK_SHRINK), | 203 GTK_SHRINK), |
203 (GtkAttachOptions) (GTK_FILL | GTK_EXPAND | | 204 (GtkAttachOptions) (GTK_FILL | GTK_EXPAND | |
204 GTK_SHRINK), 0, 5); | 205 GTK_SHRINK), 0, 5); |
205 | 206 |
206 label = gtk_label_new("Comment:"); | 207 label = gtk_label_new(_("Comment:")); |
207 gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5); | 208 gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5); |
208 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 3, 4, | 209 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 3, 4, |
209 GTK_FILL, GTK_FILL, 5, 5); | 210 GTK_FILL, GTK_FILL, 5, 5); |
210 | 211 |
211 user_comment_entry = gtk_entry_new(); | 212 user_comment_entry = gtk_entry_new(); |
214 (GtkAttachOptions) (GTK_FILL | GTK_EXPAND | | 215 (GtkAttachOptions) (GTK_FILL | GTK_EXPAND | |
215 GTK_SHRINK), | 216 GTK_SHRINK), |
216 (GtkAttachOptions) (GTK_FILL | GTK_EXPAND | | 217 (GtkAttachOptions) (GTK_FILL | GTK_EXPAND | |
217 GTK_SHRINK), 0, 5); | 218 GTK_SHRINK), 0, 5); |
218 | 219 |
219 label = gtk_label_new("Year:"); | 220 label = gtk_label_new(_("Year:")); |
220 gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5); | 221 gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5); |
221 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 4, 5, | 222 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 4, 5, |
222 GTK_FILL, GTK_FILL, 5, 5); | 223 GTK_FILL, GTK_FILL, 5, 5); |
223 | 224 |
224 date_entry = gtk_entry_new(); | 225 date_entry = gtk_entry_new(); |
227 (GtkAttachOptions) (GTK_FILL | GTK_EXPAND | | 228 (GtkAttachOptions) (GTK_FILL | GTK_EXPAND | |
228 GTK_SHRINK), | 229 GTK_SHRINK), |
229 (GtkAttachOptions) (GTK_FILL | GTK_EXPAND | | 230 (GtkAttachOptions) (GTK_FILL | GTK_EXPAND | |
230 GTK_SHRINK), 0, 5); | 231 GTK_SHRINK), 0, 5); |
231 | 232 |
232 label = gtk_label_new("Track number:"); | 233 label = gtk_label_new(_("Track number:")); |
233 gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5); | 234 gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5); |
234 gtk_table_attach(GTK_TABLE(table), label, 2, 3, 4, 5, | 235 gtk_table_attach(GTK_TABLE(table), label, 2, 3, 4, 5, |
235 GTK_FILL, GTK_FILL, 5, 5); | 236 GTK_FILL, GTK_FILL, 5, 5); |
236 | 237 |
237 tracknumber_entry = gtk_entry_new_with_max_length(4); | 238 tracknumber_entry = gtk_entry_new_with_max_length(4); |
241 (GtkAttachOptions) (GTK_FILL | GTK_EXPAND | | 242 (GtkAttachOptions) (GTK_FILL | GTK_EXPAND | |
242 GTK_SHRINK), | 243 GTK_SHRINK), |
243 (GtkAttachOptions) (GTK_FILL | GTK_EXPAND | | 244 (GtkAttachOptions) (GTK_FILL | GTK_EXPAND | |
244 GTK_SHRINK), 0, 5); | 245 GTK_SHRINK), 0, 5); |
245 | 246 |
246 label = gtk_label_new("Genre:"); | 247 label = gtk_label_new(_("Genre:")); |
247 gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5); | 248 gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5); |
248 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 5, 6, | 249 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 5, 6, |
249 GTK_FILL, GTK_FILL, 5, 5); | 250 GTK_FILL, GTK_FILL, 5, 5); |
250 | 251 |
251 genre_entry = gtk_entry_new(); | 252 genre_entry = gtk_entry_new(); |
260 bbox = gtk_hbutton_box_new(); | 261 bbox = gtk_hbutton_box_new(); |
261 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END); | 262 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END); |
262 gtk_button_box_set_spacing(GTK_BUTTON_BOX(bbox), 5); | 263 gtk_button_box_set_spacing(GTK_BUTTON_BOX(bbox), 5); |
263 gtk_box_pack_start(GTK_BOX(left_vbox), bbox, FALSE, FALSE, 0); | 264 gtk_box_pack_start(GTK_BOX(left_vbox), bbox, FALSE, FALSE, 0); |
264 | 265 |
265 save_button = gtk_button_new_with_label("Save"); | 266 save_button = gtk_button_new_with_label(_("Save")); |
266 gtk_signal_connect(GTK_OBJECT(save_button), "clicked", | 267 gtk_signal_connect(GTK_OBJECT(save_button), "clicked", |
267 GTK_SIGNAL_FUNC(save_cb), NULL); | 268 GTK_SIGNAL_FUNC(save_cb), NULL); |
268 GTK_WIDGET_SET_FLAGS(save_button, GTK_CAN_DEFAULT); | 269 GTK_WIDGET_SET_FLAGS(save_button, GTK_CAN_DEFAULT); |
269 gtk_box_pack_start(GTK_BOX(bbox), save_button, TRUE, TRUE, 0); | 270 gtk_box_pack_start(GTK_BOX(bbox), save_button, TRUE, TRUE, 0); |
270 | 271 |
271 remove_button = gtk_button_new_with_label("Remove Tag"); | 272 remove_button = gtk_button_new_with_label(_("Remove Tag")); |
272 gtk_signal_connect_object(GTK_OBJECT(remove_button), | 273 gtk_signal_connect_object(GTK_OBJECT(remove_button), |
273 "clicked", | 274 "clicked", |
274 GTK_SIGNAL_FUNC(remove_cb), NULL); | 275 GTK_SIGNAL_FUNC(remove_cb), NULL); |
275 GTK_WIDGET_SET_FLAGS(remove_button, GTK_CAN_DEFAULT); | 276 GTK_WIDGET_SET_FLAGS(remove_button, GTK_CAN_DEFAULT); |
276 gtk_box_pack_start(GTK_BOX(bbox), remove_button, TRUE, TRUE, 0); | 277 gtk_box_pack_start(GTK_BOX(bbox), remove_button, TRUE, TRUE, 0); |
277 | 278 |
278 cancel_button = gtk_button_new_with_label("Cancel"); | 279 cancel_button = gtk_button_new_with_label(_("Cancel")); |
279 gtk_signal_connect_object(GTK_OBJECT(cancel_button), | 280 gtk_signal_connect_object(GTK_OBJECT(cancel_button), |
280 "clicked", | 281 "clicked", |
281 GTK_SIGNAL_FUNC(close_window), NULL); | 282 GTK_SIGNAL_FUNC(close_window), NULL); |
282 GTK_WIDGET_SET_FLAGS(cancel_button, GTK_CAN_DEFAULT); | 283 GTK_WIDGET_SET_FLAGS(cancel_button, GTK_CAN_DEFAULT); |
283 gtk_box_pack_start(GTK_BOX(bbox), cancel_button, TRUE, TRUE, 0); | 284 gtk_box_pack_start(GTK_BOX(bbox), cancel_button, TRUE, TRUE, 0); |
284 gtk_widget_grab_default(cancel_button); | 285 gtk_widget_grab_default(cancel_button); |
285 | 286 |
286 info_frame = gtk_frame_new("Wavpack Info:"); | 287 info_frame = gtk_frame_new(_("Wavpack Info:")); |
287 gtk_box_pack_start(GTK_BOX(hbox), info_frame, FALSE, FALSE, 0); | 288 gtk_box_pack_start(GTK_BOX(hbox), info_frame, FALSE, FALSE, 0); |
288 | 289 |
289 info_box = gtk_vbox_new(FALSE, 5); | 290 info_box = gtk_vbox_new(FALSE, 5); |
290 gtk_container_add(GTK_CONTAINER(info_frame), info_box); | 291 gtk_container_add(GTK_CONTAINER(info_frame), info_box); |
291 gtk_container_set_border_width(GTK_CONTAINER(info_box), 10); | 292 gtk_container_set_border_width(GTK_CONTAINER(info_box), 10); |
374 | 375 |
375 time = WavpackGetNumSamples(ctx) / WavpackGetSampleRate(ctx); | 376 time = WavpackGetNumSamples(ctx) / WavpackGetSampleRate(ctx); |
376 minutes = time / 60; | 377 minutes = time / 60; |
377 seconds = time % 60; | 378 seconds = time % 60; |
378 | 379 |
379 label_set_text(version_label, "version %d", WavpackGetVersion(ctx)); | 380 label_set_text(version_label, _("version %d"), WavpackGetVersion(ctx)); |
380 label_set_text(bitrate_label, "average bitrate: %6.1f kbps", WavpackGetAverageBitrate(ctx, 0) / 1000); | 381 label_set_text(bitrate_label, _("average bitrate: %6.1f kbps"), WavpackGetAverageBitrate(ctx, 0) / 1000); |
381 label_set_text(rate_label, "samplerate: %d Hz", WavpackGetSampleRate(ctx)); | 382 label_set_text(rate_label, _("samplerate: %d Hz"), WavpackGetSampleRate(ctx)); |
382 label_set_text(bits_per_sample_label, "bits per sample: %d", WavpackGetBitsPerSample(ctx)); | 383 label_set_text(bits_per_sample_label, _("bits per sample: %d"), WavpackGetBitsPerSample(ctx)); |
383 label_set_text(channel_label, "channels: %d", WavpackGetNumChannels(ctx)); | 384 label_set_text(channel_label, _("channels: %d"), WavpackGetNumChannels(ctx)); |
384 label_set_text(length_label, "length: %d:%.2d", minutes, seconds); | 385 label_set_text(length_label, _("length: %d:%.2d"), minutes, seconds); |
385 label_set_text(filesize_label, "file size: %d Bytes", WavpackGetFileSize(ctx)); | 386 label_set_text(filesize_label, _("file size: %d Bytes"), WavpackGetFileSize(ctx)); |
386 /* | 387 /* |
387 label_set_text(peakTitle_label, "Title Peak: %5u", 100); | 388 label_set_text(peakTitle_label, _("Title Peak: %5u"), 100); |
388 label_set_text(peakAlbum_label, "Album Peak: %5u", 100); | 389 label_set_text(peakAlbum_label, _("Album Peak: %5u"), 100); |
389 label_set_text(gainTitle_label, "Title Gain: %-+5.2f dB", 100.0); | 390 label_set_text(gainTitle_label, _("Title Gain: %-+5.2f dB"), 100.0); |
390 label_set_text(gainAlbum_label, "Album Gain: %-+5.2f dB", 100.0); | 391 label_set_text(gainAlbum_label, _("Album Gain: %-+5.2f dB"), 100.0); |
391 */ | 392 */ |
392 label_set_text(peakTitle_label, "Title Peak: ?"); | 393 label_set_text(peakTitle_label, _("Title Peak: ?")); |
393 label_set_text(peakAlbum_label, "Album Peak: ?"); | 394 label_set_text(peakAlbum_label, _("Album Peak: ?")); |
394 label_set_text(gainTitle_label, "Title Gain: ?"); | 395 label_set_text(gainTitle_label, _("Title Gain: ?")); |
395 label_set_text(gainAlbum_label, "Album Gain: ?"); | 396 label_set_text(gainAlbum_label, _("Album Gain: ?")); |
396 | 397 |
397 gtk_entry_set_text(GTK_ENTRY(title_entry), tag.title); | 398 gtk_entry_set_text(GTK_ENTRY(title_entry), tag.title); |
398 gtk_entry_set_text(GTK_ENTRY(performer_entry), tag.artist); | 399 gtk_entry_set_text(GTK_ENTRY(performer_entry), tag.artist); |
399 gtk_entry_set_text(GTK_ENTRY(album_entry), tag.album); | 400 gtk_entry_set_text(GTK_ENTRY(album_entry), tag.album); |
400 gtk_entry_set_text(GTK_ENTRY(user_comment_entry), tag.comment); | 401 gtk_entry_set_text(GTK_ENTRY(user_comment_entry), tag.comment); |
402 gtk_entry_set_text(GTK_ENTRY(tracknumber_entry), tag.track); | 403 gtk_entry_set_text(GTK_ENTRY(tracknumber_entry), tag.track); |
403 gtk_entry_set_text(GTK_ENTRY(date_entry), tag.year); | 404 gtk_entry_set_text(GTK_ENTRY(date_entry), tag.year); |
404 gtk_entry_set_text(GTK_ENTRY(filename_entry), fn); | 405 gtk_entry_set_text(GTK_ENTRY(filename_entry), fn); |
405 gtk_editable_set_position(GTK_EDITABLE(filename_entry), -1); | 406 gtk_editable_set_position(GTK_EDITABLE(filename_entry), -1); |
406 | 407 |
407 tmp = g_strdup_printf("File Info - %s", g_basename(fn)); | 408 tmp = g_strdup_printf(_("File Info - %s"), g_basename(fn)); |
408 gtk_window_set_title(GTK_WINDOW(window), tmp); | 409 gtk_window_set_title(GTK_WINDOW(window), tmp); |
409 g_free(tmp); | 410 g_free(tmp); |
410 } | 411 } |
411 | 412 |
412 static GtkWidget *wv_configurewin = NULL; | 413 static GtkWidget *wv_configurewin = NULL; |
464 wv_configurewin = gtk_window_new(GTK_WINDOW_TOPLEVEL); | 465 wv_configurewin = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
465 gtk_signal_connect(GTK_OBJECT(wv_configurewin), "destroy", | 466 gtk_signal_connect(GTK_OBJECT(wv_configurewin), "destroy", |
466 GTK_SIGNAL_FUNC(gtk_widget_destroyed), | 467 GTK_SIGNAL_FUNC(gtk_widget_destroyed), |
467 &wv_configurewin); | 468 &wv_configurewin); |
468 gtk_window_set_title(GTK_WINDOW(wv_configurewin), | 469 gtk_window_set_title(GTK_WINDOW(wv_configurewin), |
469 "Musepack Configuration"); | 470 _("Wavpack Configuration")); |
470 gtk_window_set_policy(GTK_WINDOW(wv_configurewin), FALSE, FALSE, FALSE); | 471 gtk_window_set_policy(GTK_WINDOW(wv_configurewin), FALSE, FALSE, FALSE); |
471 gtk_container_border_width(GTK_CONTAINER(wv_configurewin), 10); | 472 gtk_container_border_width(GTK_CONTAINER(wv_configurewin), 10); |
472 | 473 |
473 vbox = gtk_vbox_new(FALSE, 10); | 474 vbox = gtk_vbox_new(FALSE, 10); |
474 gtk_container_add(GTK_CONTAINER(wv_configurewin), vbox); | 475 gtk_container_add(GTK_CONTAINER(wv_configurewin), vbox); |
477 gtk_box_pack_start(GTK_BOX(vbox), notebook, TRUE, TRUE, 0); | 478 gtk_box_pack_start(GTK_BOX(vbox), notebook, TRUE, TRUE, 0); |
478 | 479 |
479 | 480 |
480 /* Plugin Settings */ | 481 /* Plugin Settings */ |
481 | 482 |
482 rg_frame = gtk_frame_new("General Plugin Settings:"); | 483 rg_frame = gtk_frame_new(_("General Plugin Settings:")); |
483 gtk_container_border_width(GTK_CONTAINER(rg_frame), 5); | 484 gtk_container_border_width(GTK_CONTAINER(rg_frame), 5); |
484 | 485 |
485 rg_vbox = gtk_vbox_new(FALSE, 10); | 486 rg_vbox = gtk_vbox_new(FALSE, 10); |
486 gtk_container_border_width(GTK_CONTAINER(rg_vbox), 5); | 487 gtk_container_border_width(GTK_CONTAINER(rg_vbox), 5); |
487 gtk_container_add(GTK_CONTAINER(rg_frame), rg_vbox); | 488 gtk_container_add(GTK_CONTAINER(rg_frame), rg_vbox); |
488 | 489 |
489 rg_dyn_bitrate = | 490 rg_dyn_bitrate = |
490 gtk_check_button_new_with_label("Enable Dynamic Bitrate Display"); | 491 gtk_check_button_new_with_label(_("Enable Dynamic Bitrate Display")); |
491 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(rg_dyn_bitrate), | 492 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(rg_dyn_bitrate), |
492 dynBitrateEnabled); | 493 dynBitrateEnabled); |
493 gtk_box_pack_start(GTK_BOX(rg_vbox), rg_dyn_bitrate, FALSE, FALSE, 0); | 494 gtk_box_pack_start(GTK_BOX(rg_vbox), rg_dyn_bitrate, FALSE, FALSE, 0); |
494 | 495 |
495 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), rg_frame, | 496 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), rg_frame, |
496 gtk_label_new("Plugin")); | 497 gtk_label_new(_("Plugin"))); |
497 | 498 |
498 /* Replay Gain.. */ | 499 /* Replay Gain.. */ |
499 | 500 |
500 rg_frame = gtk_frame_new("ReplayGain Settings:"); | 501 rg_frame = gtk_frame_new(_("ReplayGain Settings:")); |
501 gtk_container_border_width(GTK_CONTAINER(rg_frame), 5); | 502 gtk_container_border_width(GTK_CONTAINER(rg_frame), 5); |
502 | 503 |
503 rg_vbox = gtk_vbox_new(FALSE, 10); | 504 rg_vbox = gtk_vbox_new(FALSE, 10); |
504 gtk_container_border_width(GTK_CONTAINER(rg_vbox), 5); | 505 gtk_container_border_width(GTK_CONTAINER(rg_vbox), 5); |
505 gtk_container_add(GTK_CONTAINER(rg_frame), rg_vbox); | 506 gtk_container_add(GTK_CONTAINER(rg_frame), rg_vbox); |
506 | 507 |
507 rg_clip_switch = | 508 rg_clip_switch = |
508 gtk_check_button_new_with_label("Enable Clipping Prevention"); | 509 gtk_check_button_new_with_label(_("Enable Clipping Prevention")); |
509 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(rg_clip_switch), | 510 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(rg_clip_switch), |
510 clipPreventionEnabled); | 511 clipPreventionEnabled); |
511 gtk_box_pack_start(GTK_BOX(rg_vbox), rg_clip_switch, FALSE, FALSE, 0); | 512 gtk_box_pack_start(GTK_BOX(rg_vbox), rg_clip_switch, FALSE, FALSE, 0); |
512 | 513 |
513 rg_switch = gtk_check_button_new_with_label("Enable ReplayGain"); | 514 rg_switch = gtk_check_button_new_with_label(_("Enable ReplayGain")); |
514 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(rg_switch), | 515 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(rg_switch), |
515 replaygainEnabled); | 516 replaygainEnabled); |
516 gtk_box_pack_start(GTK_BOX(rg_vbox), rg_switch, FALSE, FALSE, 0); | 517 gtk_box_pack_start(GTK_BOX(rg_vbox), rg_switch, FALSE, FALSE, 0); |
517 | 518 |
518 rg_type_frame = gtk_frame_new("ReplayGain Type:"); | 519 rg_type_frame = gtk_frame_new(_("ReplayGain Type:")); |
519 gtk_box_pack_start(GTK_BOX(rg_vbox), rg_type_frame, FALSE, FALSE, 0); | 520 gtk_box_pack_start(GTK_BOX(rg_vbox), rg_type_frame, FALSE, FALSE, 0); |
520 | 521 |
521 gtk_signal_connect(GTK_OBJECT(rg_switch), "toggled", | 522 gtk_signal_connect(GTK_OBJECT(rg_switch), "toggled", |
522 GTK_SIGNAL_FUNC(rg_switch_cb), rg_type_frame); | 523 GTK_SIGNAL_FUNC(rg_switch_cb), rg_type_frame); |
523 | 524 |
524 rg_type_vbox = gtk_vbox_new(FALSE, 5); | 525 rg_type_vbox = gtk_vbox_new(FALSE, 5); |
525 gtk_container_set_border_width(GTK_CONTAINER(rg_type_vbox), 5); | 526 gtk_container_set_border_width(GTK_CONTAINER(rg_type_vbox), 5); |
526 gtk_container_add(GTK_CONTAINER(rg_type_frame), rg_type_vbox); | 527 gtk_container_add(GTK_CONTAINER(rg_type_frame), rg_type_vbox); |
527 | 528 |
528 rg_track_gain = | 529 rg_track_gain = |
529 gtk_radio_button_new_with_label(NULL, "use Track Gain/Peak"); | 530 gtk_radio_button_new_with_label(NULL, _("use Track Gain/Peak")); |
530 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(rg_track_gain), | 531 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(rg_track_gain), |
531 !albumReplaygainEnabled); | 532 !albumReplaygainEnabled); |
532 gtk_box_pack_start(GTK_BOX(rg_type_vbox), rg_track_gain, FALSE, FALSE, 0); | 533 gtk_box_pack_start(GTK_BOX(rg_type_vbox), rg_track_gain, FALSE, FALSE, 0); |
533 | 534 |
534 rg_album_gain = | 535 rg_album_gain = |
535 gtk_radio_button_new_with_label(gtk_radio_button_group | 536 gtk_radio_button_new_with_label(gtk_radio_button_group |
536 (GTK_RADIO_BUTTON(rg_track_gain)), | 537 (GTK_RADIO_BUTTON(rg_track_gain)), |
537 "use Album Gain/Peak"); | 538 _("use Album Gain/Peak")); |
538 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(rg_album_gain), | 539 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(rg_album_gain), |
539 albumReplaygainEnabled); | 540 albumReplaygainEnabled); |
540 gtk_box_pack_start(GTK_BOX(rg_type_vbox), rg_album_gain, FALSE, FALSE, 0); | 541 gtk_box_pack_start(GTK_BOX(rg_type_vbox), rg_album_gain, FALSE, FALSE, 0); |
541 | 542 |
542 gtk_widget_set_sensitive(rg_type_frame, replaygainEnabled); | 543 gtk_widget_set_sensitive(rg_type_frame, replaygainEnabled); |
543 | 544 |
544 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), rg_frame, | 545 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), rg_frame, |
545 gtk_label_new("ReplayGain")); | 546 gtk_label_new(_("ReplayGain"))); |
546 | 547 |
547 /* Buttons */ | 548 /* Buttons */ |
548 | 549 |
549 bbox = gtk_hbutton_box_new(); | 550 bbox = gtk_hbutton_box_new(); |
550 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END); | 551 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END); |
551 gtk_button_box_set_spacing(GTK_BUTTON_BOX(bbox), 5); | 552 gtk_button_box_set_spacing(GTK_BUTTON_BOX(bbox), 5); |
552 gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0); | 553 gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0); |
553 | 554 |
554 ok = gtk_button_new_with_label("Ok"); | 555 ok = gtk_button_new_with_label(_("Ok")); |
555 gtk_signal_connect(GTK_OBJECT(ok), "clicked", | 556 gtk_signal_connect(GTK_OBJECT(ok), "clicked", |
556 GTK_SIGNAL_FUNC(wv_configurewin_ok), NULL); | 557 GTK_SIGNAL_FUNC(wv_configurewin_ok), NULL); |
557 GTK_WIDGET_SET_FLAGS(ok, GTK_CAN_DEFAULT); | 558 GTK_WIDGET_SET_FLAGS(ok, GTK_CAN_DEFAULT); |
558 gtk_box_pack_start(GTK_BOX(bbox), ok, TRUE, TRUE, 0); | 559 gtk_box_pack_start(GTK_BOX(bbox), ok, TRUE, TRUE, 0); |
559 gtk_widget_grab_default(ok); | 560 gtk_widget_grab_default(ok); |
560 | 561 |
561 cancel = gtk_button_new_with_label("Cancel"); | 562 cancel = gtk_button_new_with_label(_("Cancel")); |
562 gtk_signal_connect_object(GTK_OBJECT(cancel), "clicked", | 563 gtk_signal_connect_object(GTK_OBJECT(cancel), "clicked", |
563 GTK_SIGNAL_FUNC(gtk_widget_destroy), | 564 GTK_SIGNAL_FUNC(gtk_widget_destroy), |
564 GTK_OBJECT(wv_configurewin)); | 565 GTK_OBJECT(wv_configurewin)); |
565 GTK_WIDGET_SET_FLAGS(cancel, GTK_CAN_DEFAULT); | 566 GTK_WIDGET_SET_FLAGS(cancel, GTK_CAN_DEFAULT); |
566 gtk_box_pack_start(GTK_BOX(bbox), cancel, TRUE, TRUE, 0); | 567 gtk_box_pack_start(GTK_BOX(bbox), cancel, TRUE, TRUE, 0); |