Mercurial > audlegacy-plugins
comparison src/audiocompress/audacious-glue.c @ 1287:a499d5b63eba
"Audiocompress" is now translatable.
author | Stany HENRY <StrassBoy@gmail.com> |
---|---|
date | Wed, 18 Jul 2007 22:08:38 +0200 |
parents | cd1cb9e3dd68 |
children | 761e17b23e0c |
comparison
equal
deleted
inserted
replaced
1286:4462de7be194 | 1287:a499d5b63eba |
---|---|
253 | 253 |
254 GtkWidget *look; | 254 GtkWidget *look; |
255 | 255 |
256 look = lookup_widget(prefs->dialog, "anticlip"); | 256 look = lookup_widget(prefs->dialog, "anticlip"); |
257 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(look), FALSE); | 257 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(look), FALSE); |
258 | 258 |
259 look = lookup_widget(prefs->dialog, "target"); | 259 look = lookup_widget(prefs->dialog, "target"); |
260 gtk_spin_button_set_value(GTK_SPIN_BUTTON(look),(gfloat)TARGET); | 260 gtk_spin_button_set_value(GTK_SPIN_BUTTON(look),(gfloat)TARGET); |
261 | 261 |
262 look = lookup_widget(prefs->dialog, "gainmax"); | 262 look = lookup_widget(prefs->dialog, "gainmax"); |
263 gtk_spin_button_set_value(GTK_SPIN_BUTTON(look),(gfloat)GAINMAX); | 263 gtk_spin_button_set_value(GTK_SPIN_BUTTON(look),(gfloat)GAINMAX); |
287 void showPrefs(CompressorPrefs * prefs) | 287 void showPrefs(CompressorPrefs * prefs) |
288 { | 288 { |
289 | 289 |
290 GtkWidget *look; | 290 GtkWidget *look; |
291 | 291 |
292 /* Set values */ | 292 /* Set values */ |
293 | 293 |
294 look = lookup_widget(prefs->dialog, "anticlip"); | 294 look = lookup_widget(prefs->dialog, "anticlip"); |
295 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(look), | 295 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(look), |
296 prefs->anticlip); | 296 prefs->anticlip); |
297 | 297 |
298 look = lookup_widget(prefs->dialog, "target"); | 298 look = lookup_widget(prefs->dialog, "target"); |
319 { | 319 { |
320 | 320 |
321 /* Preferences dialog */ | 321 /* Preferences dialog */ |
322 | 322 |
323 gchar *clip_tip = | 323 gchar *clip_tip = |
324 "If checked, when the sound peaks the volume will be " | 324 _("If checked, when the sound peaks the volume will be " |
325 "cut instantly; otherwise, it will ramp down just in time " | 325 "cut instantly; otherwise, it will ramp down just in time " |
326 "for the peak (but some minor clipping may still occur)."; | 326 "for the peak (but some minor clipping may still occur)."); |
327 gchar *gainmax_tip = | 327 gchar *gainmax_tip = |
328 "The maximum amount to amplify the audio by"; | 328 _("The maximum amount to amplify the audio by"); |
329 gchar *gainsmooth_tip = | 329 gchar *gainsmooth_tip = |
330 "Defines how smoothly the volume will ramp up"; | 330 _("Defines how smoothly the volume will ramp up"); |
331 gchar *target_tip = | 331 gchar *target_tip = |
332 "The target audio level for ramping up. Lowering the " | 332 _("The target audio level for ramping up. Lowering the " |
333 "value gives a bit more dynamic range for peaks, but " | 333 "value gives a bit more dynamic range for peaks, but " |
334 "will make the overall sound quieter."; | 334 "will make the overall sound quieter."); |
335 gchar *hist_text = "How long of a window to maintain"; | 335 gchar *hist_text = _("How long of a window to maintain"); |
336 | 336 |
337 GtkWidget *preferences; | 337 GtkWidget *preferences; |
338 GtkWidget *vbox2; | 338 GtkWidget *vbox2; |
339 GtkWidget *notebook1; | 339 GtkWidget *notebook1; |
340 GtkWidget *vbox5; | 340 GtkWidget *vbox5; |
371 preferences = gtk_window_new(GTK_WINDOW_TOPLEVEL); | 371 preferences = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
372 g_object_set_data(G_OBJECT(preferences), "preferences", | 372 g_object_set_data(G_OBJECT(preferences), "preferences", |
373 preferences); | 373 preferences); |
374 gtk_container_set_border_width(GTK_CONTAINER(preferences), 10); | 374 gtk_container_set_border_width(GTK_CONTAINER(preferences), 10); |
375 gtk_window_set_title(GTK_WINDOW(preferences), | 375 gtk_window_set_title(GTK_WINDOW(preferences), |
376 "AudioCompress preferences"); | 376 _("AudioCompress preferences")); |
377 gtk_window_set_policy(GTK_WINDOW(preferences), TRUE, TRUE, FALSE); | 377 gtk_window_set_policy(GTK_WINDOW(preferences), TRUE, TRUE, FALSE); |
378 gtk_window_set_wmclass(GTK_WINDOW(preferences), "prefs", "xmms"); | 378 gtk_window_set_wmclass(GTK_WINDOW(preferences), "prefs", "xmms"); |
379 | 379 |
380 vbox2 = gtk_vbox_new(FALSE, 5); | 380 vbox2 = gtk_vbox_new(FALSE, 5); |
381 gtk_widget_show(vbox2); | 381 gtk_widget_show(vbox2); |
388 vbox5 = gtk_vbox_new(FALSE, 5); | 388 vbox5 = gtk_vbox_new(FALSE, 5); |
389 gtk_widget_show(vbox5); | 389 gtk_widget_show(vbox5); |
390 gtk_container_add(GTK_CONTAINER(notebook1), vbox5); | 390 gtk_container_add(GTK_CONTAINER(notebook1), vbox5); |
391 gtk_container_set_border_width(GTK_CONTAINER(vbox5), 5); | 391 gtk_container_set_border_width(GTK_CONTAINER(vbox5), 5); |
392 | 392 |
393 frame1 = gtk_frame_new(" Quality Options "); | 393 frame1 = gtk_frame_new(_(" Quality Options ")); |
394 gtk_widget_show(frame1); | 394 gtk_widget_show(frame1); |
395 gtk_box_pack_start(GTK_BOX(vbox5), frame1, FALSE, FALSE, 0); | 395 gtk_box_pack_start(GTK_BOX(vbox5), frame1, FALSE, FALSE, 0); |
396 | 396 |
397 clipping = gtk_check_button_new_with_label | 397 clipping = gtk_check_button_new_with_label |
398 (" Aggressively prevent clipping"); | 398 (_(" Aggressively prevent clipping")); |
399 gtk_widget_ref(clipping); | 399 gtk_widget_ref(clipping); |
400 g_object_set_data_full(G_OBJECT(preferences), "anticlip", | 400 g_object_set_data_full(G_OBJECT(preferences), "anticlip", |
401 clipping, | 401 clipping, |
402 (GtkDestroyNotify)gtk_widget_unref); | 402 (GtkDestroyNotify)gtk_widget_unref); |
403 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(clipping), | 403 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(clipping), |
405 gtk_widget_show(clipping); | 405 gtk_widget_show(clipping); |
406 gtk_container_add(GTK_CONTAINER(frame1), clipping); | 406 gtk_container_add(GTK_CONTAINER(frame1), clipping); |
407 gtk_container_set_border_width(GTK_CONTAINER(clipping), 5); | 407 gtk_container_set_border_width(GTK_CONTAINER(clipping), 5); |
408 gtk_tooltips_set_tip(tooltips, clipping, clip_tip, NULL); | 408 gtk_tooltips_set_tip(tooltips, clipping, clip_tip, NULL); |
409 | 409 |
410 frame2 = gtk_frame_new(" Target & gain"); | 410 frame2 = gtk_frame_new(_(" Target & gain")); |
411 gtk_widget_show(frame2); | 411 gtk_widget_show(frame2); |
412 gtk_box_pack_start(GTK_BOX(vbox5), frame2, TRUE, TRUE, 0); | 412 gtk_box_pack_start(GTK_BOX(vbox5), frame2, TRUE, TRUE, 0); |
413 | 413 |
414 table1 = gtk_table_new(4, 2, TRUE); | 414 table1 = gtk_table_new(4, 2, TRUE); |
415 gtk_widget_show(table1); | 415 gtk_widget_show(table1); |
416 gtk_container_add(GTK_CONTAINER(frame2), table1); | 416 gtk_container_add(GTK_CONTAINER(frame2), table1); |
417 gtk_container_set_border_width(GTK_CONTAINER(table1), 5); | 417 gtk_container_set_border_width(GTK_CONTAINER(table1), 5); |
418 gtk_table_set_row_spacings(GTK_TABLE(table1), 5); | 418 gtk_table_set_row_spacings(GTK_TABLE(table1), 5); |
419 gtk_table_set_col_spacings(GTK_TABLE(table1), 5); | 419 gtk_table_set_col_spacings(GTK_TABLE(table1), 5); |
420 | 420 |
421 label5 = gtk_label_new("Target audio level:"); | 421 label5 = gtk_label_new(_("Target audio level:")); |
422 gtk_widget_show(label5); | 422 gtk_widget_show(label5); |
423 gtk_table_attach(GTK_TABLE(table1), label5, 0, 1, 0, 1, | 423 gtk_table_attach(GTK_TABLE(table1), label5, 0, 1, 0, 1, |
424 (GtkAttachOptions)(GTK_FILL), | 424 (GtkAttachOptions)(GTK_FILL), |
425 (GtkAttachOptions)(0), 0, 0); | 425 (GtkAttachOptions)(0), 0, 0); |
426 gtk_label_set_justify(GTK_LABEL(label5), GTK_JUSTIFY_RIGHT); | 426 gtk_label_set_justify(GTK_LABEL(label5), GTK_JUSTIFY_RIGHT); |
427 gtk_misc_set_alignment(GTK_MISC(label5), 0, 0.5); | 427 gtk_misc_set_alignment(GTK_MISC(label5), 0, 0.5); |
428 | 428 |
429 label6 = gtk_label_new("Maximum gain:"); | 429 label6 = gtk_label_new(_("Maximum gain:")); |
430 gtk_widget_show(label6); | 430 gtk_widget_show(label6); |
431 gtk_table_attach(GTK_TABLE(table1), label6, 0, 1, 1, 2, | 431 gtk_table_attach(GTK_TABLE(table1), label6, 0, 1, 1, 2, |
432 (GtkAttachOptions)(GTK_FILL), | 432 (GtkAttachOptions)(GTK_FILL), |
433 (GtkAttachOptions)(0), 0, 0); | 433 (GtkAttachOptions)(0), 0, 0); |
434 gtk_label_set_justify(GTK_LABEL(label6), GTK_JUSTIFY_LEFT); | 434 gtk_label_set_justify(GTK_LABEL(label6), GTK_JUSTIFY_LEFT); |
435 gtk_misc_set_alignment(GTK_MISC(label6), 0, 0.5); | 435 gtk_misc_set_alignment(GTK_MISC(label6), 0, 0.5); |
436 | 436 |
437 label7 = gtk_label_new("Gain smooth:"); | 437 label7 = gtk_label_new(_("Gain smooth:")); |
438 gtk_widget_show(label7); | 438 gtk_widget_show(label7); |
439 gtk_table_attach(GTK_TABLE(table1), label7, 0, 1, 2, 3, | 439 gtk_table_attach(GTK_TABLE(table1), label7, 0, 1, 2, 3, |
440 (GtkAttachOptions)(GTK_FILL), | 440 (GtkAttachOptions)(GTK_FILL), |
441 (GtkAttachOptions)(0), 0, 0); | 441 (GtkAttachOptions)(0), 0, 0); |
442 gtk_label_set_justify(GTK_LABEL(label7), GTK_JUSTIFY_LEFT); | 442 gtk_label_set_justify(GTK_LABEL(label7), GTK_JUSTIFY_LEFT); |
484 (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), | 484 (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), |
485 (GtkAttachOptions)(GTK_FILL), 0, 0); | 485 (GtkAttachOptions)(GTK_FILL), 0, 0); |
486 gtk_tooltips_set_tip(tooltips, target_sp, target_tip, NULL); | 486 gtk_tooltips_set_tip(tooltips, target_sp, target_tip, NULL); |
487 gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(target_sp), TRUE); | 487 gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(target_sp), TRUE); |
488 | 488 |
489 frame3 = gtk_frame_new(" History "); | 489 frame3 = gtk_frame_new(_(" History ")); |
490 gtk_widget_show(frame3); | 490 gtk_widget_show(frame3); |
491 gtk_box_pack_start(GTK_BOX(vbox5), frame3, TRUE, TRUE, 0); | 491 gtk_box_pack_start(GTK_BOX(vbox5), frame3, TRUE, TRUE, 0); |
492 | 492 |
493 table3 = gtk_table_new(1, 2, TRUE); | 493 table3 = gtk_table_new(1, 2, TRUE); |
494 gtk_widget_show(table3); | 494 gtk_widget_show(table3); |
516 gtk_table_attach(GTK_TABLE(table3), buckets_sp, 1, 2, 0, 1, | 516 gtk_table_attach(GTK_TABLE(table3), buckets_sp, 1, 2, 0, 1, |
517 (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), | 517 (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), |
518 (GtkAttachOptions)(0), 0, 0); | 518 (GtkAttachOptions)(0), 0, 0); |
519 | 519 |
520 gtk_tooltips_set_tip(tooltips, buckets_sp, | 520 gtk_tooltips_set_tip(tooltips, buckets_sp, |
521 "How long of a history to maintain. " | 521 _("How long of a history to maintain. " |
522 "A higher number will make the volume changes " | 522 "A higher number will make the volume changes " |
523 "less responsive.", | 523 "less responsive."), |
524 NULL); | 524 NULL); |
525 | 525 |
526 hbuttonbox7 = gtk_hbutton_box_new(); | 526 hbuttonbox7 = gtk_hbutton_box_new(); |
527 gtk_widget_show(hbuttonbox7); | 527 gtk_widget_show(hbuttonbox7); |
528 gtk_box_pack_start(GTK_BOX(vbox5), hbuttonbox7, FALSE, FALSE, 0); | 528 gtk_box_pack_start(GTK_BOX(vbox5), hbuttonbox7, FALSE, FALSE, 0); |
529 gtk_button_box_set_layout(GTK_BUTTON_BOX(hbuttonbox7), | 529 gtk_button_box_set_layout(GTK_BUTTON_BOX(hbuttonbox7), |
530 GTK_BUTTONBOX_END); | 530 GTK_BUTTONBOX_END); |
531 | 531 |
532 button8 = gtk_button_new_with_label("Load default values"); | 532 button8 = gtk_button_new_with_label(_("Load default values")); |
533 gtk_widget_show(button8); | 533 gtk_widget_show(button8); |
534 gtk_container_add(GTK_CONTAINER(hbuttonbox7), button8); | 534 gtk_container_add(GTK_CONTAINER(hbuttonbox7), button8); |
535 GTK_WIDGET_SET_FLAGS(button8, GTK_CAN_DEFAULT); | 535 GTK_WIDGET_SET_FLAGS(button8, GTK_CAN_DEFAULT); |
536 | 536 |
537 label4 = gtk_label_new("Audio values"); | 537 label4 = gtk_label_new(_("Audio values")); |
538 gtk_widget_show(label4); | 538 gtk_widget_show(label4); |
539 gtk_notebook_set_tab_label(GTK_NOTEBOOK(notebook1), | 539 gtk_notebook_set_tab_label(GTK_NOTEBOOK(notebook1), |
540 gtk_notebook_get_nth_page(GTK_NOTEBOOK | 540 gtk_notebook_get_nth_page(GTK_NOTEBOOK |
541 (notebook1), | 541 (notebook1), |
542 0), label4); | 542 0), label4); |
551 gtk_button_box_set_spacing(GTK_BUTTON_BOX(hbuttonbox2), 5); | 551 gtk_button_box_set_spacing(GTK_BUTTON_BOX(hbuttonbox2), 5); |
552 gtk_button_box_set_child_size(GTK_BUTTON_BOX(hbuttonbox2), 80, 0); | 552 gtk_button_box_set_child_size(GTK_BUTTON_BOX(hbuttonbox2), 80, 0); |
553 gtk_button_box_set_child_ipadding(GTK_BUTTON_BOX(hbuttonbox2), 0, | 553 gtk_button_box_set_child_ipadding(GTK_BUTTON_BOX(hbuttonbox2), 0, |
554 0); | 554 0); |
555 | 555 |
556 button3 = gtk_button_new_with_label("Ok"); | 556 button3 = gtk_button_new_with_label(_("Ok")); |
557 gtk_widget_show(button3); | 557 gtk_widget_show(button3); |
558 gtk_container_add(GTK_CONTAINER(hbuttonbox2), button3); | 558 gtk_container_add(GTK_CONTAINER(hbuttonbox2), button3); |
559 GTK_WIDGET_SET_FLAGS(button3, GTK_CAN_DEFAULT); | 559 GTK_WIDGET_SET_FLAGS(button3, GTK_CAN_DEFAULT); |
560 | 560 |
561 button4 = gtk_button_new_with_label("Cancel"); | 561 button4 = gtk_button_new_with_label(_("Cancel")); |
562 gtk_widget_show(button4); | 562 gtk_widget_show(button4); |
563 gtk_container_add(GTK_CONTAINER(hbuttonbox2), button4); | 563 gtk_container_add(GTK_CONTAINER(hbuttonbox2), button4); |
564 GTK_WIDGET_SET_FLAGS(button4, GTK_CAN_DEFAULT); | 564 GTK_WIDGET_SET_FLAGS(button4, GTK_CAN_DEFAULT); |
565 | 565 |
566 button7 = gtk_button_new_with_label("Apply"); | 566 button7 = gtk_button_new_with_label(_("Apply")); |
567 gtk_widget_show(button7); | 567 gtk_widget_show(button7); |
568 gtk_container_add(GTK_CONTAINER(hbuttonbox2), button7); | 568 gtk_container_add(GTK_CONTAINER(hbuttonbox2), button7); |
569 GTK_WIDGET_SET_FLAGS(button7, GTK_CAN_DEFAULT); | 569 GTK_WIDGET_SET_FLAGS(button7, GTK_CAN_DEFAULT); |
570 | 570 |
571 gtk_widget_grab_default(button4); | 571 gtk_widget_grab_default(button4); |