108
OptionsWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL);
110
gtk_window_set_position(GTK_WINDOW(OptionsWindow),GTK_WIN_POS_CENTER);
111
gtk_window_set_transient_for(GTK_WINDOW(OptionsWindow),GTK_WINDOW(MainWindow));
112
gtk_container_set_border_width(GTK_CONTAINER(OptionsWindow), 5);
113
gtk_window_set_default_size(GTK_WINDOW(OptionsWindow),OPTIONS_WINDOW_WIDTH,OPTIONS_WINDOW_HEIGHT);
115
gtk_window_set_title(GTK_WINDOW(OptionsWindow),_("Preferences…"));
110
OptionsWindow = gtk_dialog_new_with_buttons (_("Preferences"),
111
GTK_WINDOW (MainWindow),
112
GTK_DIALOG_DESTROY_WITH_PARENT,
116
GTK_RESPONSE_ACCEPT, NULL);
118
gtk_container_set_border_width (GTK_CONTAINER (OptionsWindow), 6);
117
120
/* Signals connection */
118
g_signal_connect(G_OBJECT(OptionsWindow),"destroy", G_CALLBACK(OptionsWindow_Quit),NULL);
119
g_signal_connect(G_OBJECT(OptionsWindow),"delete_event",G_CALLBACK(OptionsWindow_Quit),NULL);
120
g_signal_connect(G_OBJECT(OptionsWindow),"key_press_event",
121
G_CALLBACK(OptionsWindow_Key_Press),NULL);
121
gtk_dialog_set_default_response (GTK_DIALOG (OptionsWindow),
122
GTK_RESPONSE_ACCEPT);
123
g_signal_connect (OptionsWindow, "response",
124
G_CALLBACK (et_preferences_on_response), NULL);
125
OptionsVBox = gtk_box_new(GTK_ORIENTATION_VERTICAL,0);
126
gtk_box_set_spacing (GTK_BOX(OptionsVBox),5);
127
gtk_container_add(GTK_CONTAINER(OptionsWindow),OptionsVBox);
128
OptionsVBox = gtk_dialog_get_content_area (GTK_DIALOG (OptionsWindow));
129
gtk_box_set_spacing (GTK_BOX (OptionsVBox), 12);
129
131
/* Options NoteBook */
130
132
OptionsNoteBook = gtk_notebook_new();
274
258
/* Sorting List Options */
275
259
Frame = gtk_frame_new (_("Sorting List Options"));
276
260
gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
277
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
261
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
278
262
gtk_container_add(GTK_CONTAINER(Frame),vbox);
279
gtk_container_set_border_width(GTK_CONTAINER(vbox), 2);
263
gtk_container_set_border_width (GTK_CONTAINER(vbox), BOX_SPACING);
281
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,2);
265
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
282
266
gtk_box_pack_start(GTK_BOX(vbox),hbox,FALSE,FALSE,0);
283
gtk_container_set_border_width(GTK_CONTAINER(hbox), 2);
284
267
/* Sorting method */
285
268
Label = gtk_label_new(_("Sort the file list by:"));
286
269
gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,0);
288
EventBox = gtk_event_box_new();
289
271
SortingFileCombo = gtk_combo_box_text_new();
290
gtk_container_add(GTK_CONTAINER(EventBox),SortingFileCombo);
291
gtk_box_pack_start(GTK_BOX(hbox),EventBox,FALSE,FALSE,2);
272
gtk_box_pack_start (GTK_BOX (hbox), SortingFileCombo, FALSE, FALSE, 2);
292
273
gtk_widget_set_size_request(GTK_WIDGET(SortingFileCombo), 260, -1);
293
274
gtk_combo_box_set_wrap_width(GTK_COMBO_BOX(SortingFileCombo),2); // Two columns
295
276
// Items of option menu
296
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Ascending file name"));
297
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Descending file name"));
298
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Ascending track number"));
299
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Descending track number"));
300
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Ascending creation date"));
301
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Descending creation date"));
277
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
278
_("Ascending filename"));
279
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
280
_("Descending filename"));
302
281
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Ascending title"));
303
282
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Descending title"));
304
283
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Ascending artist"));
305
284
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Descending artist"));
285
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
286
_("Ascending album artist"));
287
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
288
_("Descending album artist"));
306
289
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Ascending album"));
307
290
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Descending album"));
308
291
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Ascending year"));
309
292
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Descending year"));
293
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
294
_("Ascending disc number"));
295
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
296
_("Descending disc number"));
297
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
298
_("Ascending track number"));
299
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
300
_("Descending track number"));
310
301
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Ascending genre"));
311
302
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Descending genre"));
312
303
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Ascending comment"));
313
304
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Descending comment"));
305
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
306
_("Ascending composer"));
307
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
308
_("Descending composer"));
309
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
310
_("Ascending original artist"));
311
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
312
_("Descending original artist"));
313
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
314
_("Ascending copyright"));
315
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
316
_("Descending copyright"));
317
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
319
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
320
_("Descending URL"));
321
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
322
_("Ascending encoded by"));
323
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
324
_("Descending encoded by"));
325
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
326
_("Ascending creation date"));
327
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
328
_("Descending creation date"));
315
330
gtk_combo_box_set_active(GTK_COMBO_BOX(SortingFileCombo), SORTING_FILE_MODE);
316
gtk_widget_set_tooltip_text(EventBox,_("Select the type of file sorting "
317
"when loading a directory."));
331
gtk_widget_set_tooltip_text(SortingFileCombo,
332
_("Select the type of file sorting when "
333
"loading a directory."));
319
335
SortingFileCaseSensitive = gtk_check_button_new_with_label(_("Case sensitive"));
320
336
#ifndef G_OS_WIN32
328
344
gtk_widget_set_tooltip_text(SortingFileCaseSensitive,_("If activated, the "
329
345
"sorting of the list will be dependent on the case."));
331
/* Message Dialog Position */
332
Frame = gtk_frame_new (_("Message Dialog Position"));
333
gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
334
Table = gtk_table_new(2,2,FALSE);
335
gtk_container_add(GTK_CONTAINER(Frame),Table);
336
//gtk_table_set_row_spacings(GTK_TABLE(Table),2);
337
gtk_table_set_col_spacings(GTK_TABLE(Table),4);
340
MessageBoxPositionNone = gtk_radio_button_new_with_label(NULL,_("No particular position"));
341
gtk_table_attach(GTK_TABLE(Table),MessageBoxPositionNone,0,1,0,1,GTK_FILL,GTK_FILL,0,0);
342
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(MessageBoxPositionNone),
343
MESSAGE_BOX_POSITION_NONE);
344
gtk_widget_set_tooltip_text(MessageBoxPositionNone,_("Let the Window Manager "
345
"to place the windows."));
347
MessageBoxPositionCenterOnParent = gtk_radio_button_new_with_label(
348
gtk_radio_button_get_group(GTK_RADIO_BUTTON(MessageBoxPositionNone)),
349
_("Center of the main window"));
350
gtk_table_attach(GTK_TABLE(Table),MessageBoxPositionCenterOnParent,1,2,0,1,GTK_FILL,GTK_FILL,0,0);
351
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(MessageBoxPositionCenterOnParent),
352
MESSAGE_BOX_POSITION_CENTER_ON_PARENT);
353
gtk_widget_set_tooltip_text(MessageBoxPositionCenterOnParent,_("Windows should "
354
"be placed in the center of the main window."));
356
MessageBoxPositionCenter = gtk_radio_button_new_with_label(
357
gtk_radio_button_get_group(GTK_RADIO_BUTTON(MessageBoxPositionNone)),
358
_("Center of the screen"));
359
gtk_table_attach(GTK_TABLE(Table),MessageBoxPositionCenter,0,1,1,2,GTK_FILL,GTK_FILL,0,0);
360
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(MessageBoxPositionCenter),
361
MESSAGE_BOX_POSITION_CENTER);
362
gtk_widget_set_tooltip_text(MessageBoxPositionCenter,_("Windows should be placed "
363
"in the center of the screen."));
365
MessageBoxPositionMouse = gtk_radio_button_new_with_label(
366
gtk_radio_button_get_group(GTK_RADIO_BUTTON(MessageBoxPositionNone)),
367
_("Mouse position"));
368
gtk_table_attach(GTK_TABLE(Table),MessageBoxPositionMouse,1,2,1,2,GTK_FILL,GTK_FILL,0,0);
369
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(MessageBoxPositionMouse),
370
MESSAGE_BOX_POSITION_MOUSE);
371
gtk_widget_set_tooltip_text(MessageBoxPositionMouse,_("Windows should be placed "
372
"at the current mouse position."));
374
347
/* File Player */
375
348
Frame = gtk_frame_new (_("File Audio Player"));
376
349
gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
511
477
"file information by detecting changes of the parent directory."));
514
/* Character Set for File Name */
515
Frame = gtk_frame_new (_("Character Set for File Name"));
480
/* Character Set for Filename */
481
Frame = gtk_frame_new (_("Character Set for Filename"));
516
482
gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
517
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
483
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
518
484
gtk_container_add(GTK_CONTAINER(Frame),vbox);
519
gtk_container_set_border_width(GTK_CONTAINER(vbox), 2);
521
/****hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,2);
522
gtk_box_pack_start(GTK_BOX(vbox),hbox,FALSE,FALSE,0);
523
gtk_container_set_border_width(GTK_CONTAINER(hbox), 2);***/
525
Table = gtk_table_new(4,2,FALSE);
485
gtk_container_set_border_width (GTK_CONTAINER (vbox), BOX_SPACING);
487
Table = et_grid_new (4, 2);
526
488
gtk_box_pack_start(GTK_BOX(vbox),Table,FALSE,FALSE,0);
527
//gtk_table_set_row_spacings(GTK_TABLE(Table),2);
528
gtk_table_set_col_spacings(GTK_TABLE(Table),2);
489
/*gtk_grid_set_row_spacing (GTK_GRID (Table), 2);*/
490
gtk_grid_set_column_spacing (GTK_GRID (Table), 2 * BOX_SPACING);
530
492
/* Rules for character set */
531
493
Label = gtk_label_new(_("Rules to apply if some characters can't be converted to "
532
494
"the system character encoding when writing filename:"));
533
gtk_table_attach(GTK_TABLE(Table),Label,0,2,0,1,GTK_FILL,GTK_FILL,0,0);
495
gtk_grid_attach (GTK_GRID (Table), Label, 0, 0, 2, 1);
534
496
gtk_misc_set_alignment(GTK_MISC(Label),0,0.5);
536
Label = gtk_label_new(" ");
537
gtk_table_attach(GTK_TABLE(Table),Label,0,1,1,2,GTK_FILL,GTK_FILL,0,0);
539
499
FilenameCharacterSetOther = gtk_radio_button_new_with_label(NULL,_("Try another "
540
500
"character encoding"));
541
gtk_table_attach(GTK_TABLE(Table),FilenameCharacterSetOther,1,2,1,2,GTK_FILL,GTK_FILL,0,0);
501
gtk_grid_attach (GTK_GRID (Table), FilenameCharacterSetOther, 1, 1, 1, 1);
542
502
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FilenameCharacterSetOther),FILENAME_CHARACTER_SET_OTHER);
543
503
gtk_widget_set_tooltip_text(FilenameCharacterSetOther,_("With this option, it will "
544
504
"try the conversion to the encoding associated to your locale (for example: "
612
571
g_signal_connect_swapped(G_OBJECT(NumberTrackFormatedSpinButton),"changed",G_CALLBACK(Number_Track_Formatted_Spin_Button_Changed),G_OBJECT(Label));
613
572
g_signal_emit_by_name(G_OBJECT(NumberTrackFormatedSpinButton),"changed",NULL);
615
OggTagWriteXmmsComment = gtk_check_button_new_with_label(_("Ogg Vorbis Files: write also the comment in the XMMS format"));
616
gtk_box_pack_start(GTK_BOX(vbox),OggTagWriteXmmsComment,FALSE,FALSE,0);
617
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(OggTagWriteXmmsComment),OGG_TAG_WRITE_XMMS_COMMENT);
618
gtk_widget_set_tooltip_text(OggTagWriteXmmsComment,_("XMMS doesn't make use of the right way to "
619
"identify a comment in Ogg Vorbis files as other apps do. In fact, this field is usually labeled "
620
"with 'comment=', whereas XMMS uses only `='. Please, uncheck this option if you don't want "
621
"other apps to complain about an unknown field. Comments won't be shown in XMMS, though."));
574
/* Disc formatting. */
575
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, BOX_SPACING);
576
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
578
pad_disc_number = gtk_check_button_new_with_label (_("Write the disc field with the following number of digits:"));
579
gtk_box_pack_start (GTK_BOX (hbox), pad_disc_number, FALSE, FALSE, 0);
580
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (pad_disc_number),
582
gtk_widget_set_tooltip_text (pad_disc_number,
583
_("Whether to pad the disc field with leading zeroes"));
585
pad_disc_number_spinbutton = gtk_spin_button_new_with_range (1.0, 6.0,
587
gtk_box_pack_start (GTK_BOX (hbox), pad_disc_number_spinbutton, FALSE,
589
gtk_spin_button_set_value (GTK_SPIN_BUTTON (pad_disc_number_spinbutton),
590
(gfloat)PAD_DISC_NUMBER_DIGITS);
591
g_signal_connect (G_OBJECT (pad_disc_number), "toggled",
592
G_CALLBACK (et_prefs_on_pad_disc_number_toggled), NULL);
593
g_signal_emit_by_name (G_OBJECT (pad_disc_number), "toggled");
595
/* Label to show the example. */
596
Label = gtk_label_new ("");
597
gtk_box_pack_start (GTK_BOX (hbox), Label, FALSE, FALSE, BOX_SPACING);
598
g_signal_connect_swapped (G_OBJECT (pad_disc_number_spinbutton), "changed",
599
G_CALLBACK (et_prefs_on_pad_disc_number_spinbutton_changed),
601
g_signal_emit_by_name (G_OBJECT (pad_disc_number_spinbutton), "changed");
623
603
// Separator line
624
604
Separator = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL);
625
605
gtk_box_pack_start(GTK_BOX(vbox),Separator,FALSE,FALSE,0);
627
607
/* Tag field focus */
628
Table = gtk_table_new(2,3,FALSE);
608
Table = et_grid_new (2, 3);
629
609
gtk_box_pack_start(GTK_BOX(vbox),Table,FALSE,FALSE,0);
630
//gtk_table_set_row_spacings(GTK_TABLE(Table),2);
631
gtk_table_set_col_spacings(GTK_TABLE(Table),2);
610
/*gtk_grid_set_row_spacing (GTK_GRID (Table), 2);*/
611
gtk_grid_set_column_spacing (GTK_GRID (Table), 2 * BOX_SPACING);
633
613
Label = gtk_label_new(_("Tag field focus when switching files in list with "
634
614
"shortcuts Page Up/Page Down:"));
635
gtk_table_attach(GTK_TABLE(Table),Label,0,2,0,1,GTK_FILL,GTK_FILL,0,0);
615
gtk_grid_attach (GTK_GRID (Table), Label, 0, 0, 2, 1);
636
616
gtk_misc_set_alignment(GTK_MISC(Label),0,0.5);
638
Label = gtk_label_new(" ");
639
gtk_table_attach(GTK_TABLE(Table),Label,0,1,1,2,GTK_FILL,GTK_FILL,0,0);
641
618
SetFocusToSameTagField = gtk_radio_button_new_with_label(NULL,
642
619
_("Keep focus to the same tag field"));
643
gtk_table_attach(GTK_TABLE(Table),SetFocusToSameTagField,1,2,1,2,GTK_FILL,GTK_FILL,0,0);
620
gtk_grid_attach (GTK_GRID (Table), SetFocusToSameTagField, 1, 1, 1, 1);
644
621
//gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(SetFocusToSameTagField),SET_FOCUS_TO_SAME_TAG_FIELD);
646
623
SetFocusToFirstTagField = gtk_radio_button_new_with_label(
647
624
gtk_radio_button_get_group(GTK_RADIO_BUTTON(SetFocusToSameTagField)),
648
625
_("Return focus to the first tag field (i.e. 'Title' field)"));
649
gtk_table_attach(GTK_TABLE(Table),SetFocusToFirstTagField,1,2,2,3,GTK_FILL,GTK_FILL,0,0);
626
gtk_grid_attach (GTK_GRID (Table), SetFocusToFirstTagField, 1, 2, 1, 1);
650
627
//gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(SetFocusToFirstTagField),SET_FOCUS_TO_FIRST_TAG_FIELD);
652
629
/* Tag Splitting */
653
630
Frame = gtk_frame_new (_("Tag Splitting"));
654
631
gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
656
Table = gtk_table_new(5,2,FALSE);
633
Table = et_grid_new (5, 2);
657
634
gtk_container_add(GTK_CONTAINER(Frame),Table);
658
gtk_table_set_col_spacings(GTK_TABLE(Table),2);
635
gtk_container_set_border_width (GTK_CONTAINER (Table), BOX_SPACING);
636
gtk_grid_set_column_spacing (GTK_GRID (Table), BOX_SPACING);
637
gtk_grid_set_row_spacing (GTK_GRID (Table), BOX_SPACING);
660
639
Label = gtk_label_new(_("For Vorbis tags, selected fields will be split at dashes and saved as separate tags"));
661
gtk_table_attach(GTK_TABLE(Table),Label,0,2,0,1,GTK_FILL,GTK_FILL,0,1);
640
gtk_grid_attach (GTK_GRID (Table), Label, 0, 0, 2, 1);
662
641
gtk_misc_set_alignment(GTK_MISC(Label),0,0.5);
664
643
VorbisSplitFieldTitle = gtk_check_button_new_with_label(_("Title"));
669
648
VorbisSplitFieldComposer = gtk_check_button_new_with_label(_("Composer"));
670
649
VorbisSplitFieldOrigArtist = gtk_check_button_new_with_label(_("Original artist"));
672
gtk_table_attach(GTK_TABLE(Table),VorbisSplitFieldTitle,0,1,1,2,GTK_FILL,GTK_FILL,0,0);
673
gtk_table_attach(GTK_TABLE(Table),VorbisSplitFieldArtist,0,1,2,3,GTK_FILL,GTK_FILL,0,0);
674
gtk_table_attach(GTK_TABLE(Table),VorbisSplitFieldAlbum,0,1,3,4,GTK_FILL,GTK_FILL,0,0);
675
gtk_table_attach(GTK_TABLE(Table),VorbisSplitFieldGenre,0,1,4,5,GTK_FILL,GTK_FILL,0,0);
676
gtk_table_attach(GTK_TABLE(Table),VorbisSplitFieldComment,1,2,1,2,GTK_FILL,GTK_FILL,0,0);
677
gtk_table_attach(GTK_TABLE(Table),VorbisSplitFieldComposer,1,2,2,3,GTK_FILL,GTK_FILL,0,0);
678
gtk_table_attach(GTK_TABLE(Table),VorbisSplitFieldOrigArtist,1,2,3,4,GTK_FILL,GTK_FILL,0,0);
651
gtk_grid_attach (GTK_GRID (Table), VorbisSplitFieldTitle, 0, 1, 1, 1);
652
gtk_grid_attach (GTK_GRID (Table), VorbisSplitFieldArtist, 0, 2, 1, 1);
653
gtk_grid_attach (GTK_GRID (Table), VorbisSplitFieldAlbum, 0, 3, 1, 1);
654
gtk_grid_attach (GTK_GRID (Table), VorbisSplitFieldGenre, 0, 4, 1, 1);
655
gtk_grid_attach (GTK_GRID (Table), VorbisSplitFieldComment, 1, 1, 1, 1);
656
gtk_grid_attach (GTK_GRID (Table), VorbisSplitFieldComposer, 1, 2, 1, 1);
657
gtk_grid_attach (GTK_GRID (Table), VorbisSplitFieldOrigArtist, 1, 3, 1, 1);
680
659
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(VorbisSplitFieldTitle), VORBIS_SPLIT_FIELD_TITLE);
681
660
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(VorbisSplitFieldArtist), VORBIS_SPLIT_FIELD_ARTIST);
689
668
* ID3 Tag Settings
691
670
Label = gtk_label_new (_("ID3 Tag Settings"));
692
Frame = gtk_frame_new (_("ID3 Tag Settings"));
671
VBox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
693
672
#ifdef ENABLE_MP3
694
gtk_notebook_append_page (GTK_NOTEBOOK(OptionsNoteBook),Frame,Label);
673
gtk_notebook_append_page (GTK_NOTEBOOK (OptionsNoteBook), VBox, Label);
696
gtk_container_set_border_width(GTK_CONTAINER(Frame),5);
698
VBox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
699
gtk_container_add(GTK_CONTAINER(Frame),VBox);
700
gtk_container_set_border_width(GTK_CONTAINER(VBox),4);
675
gtk_container_set_border_width (GTK_CONTAINER (VBox), BOX_SPACING);
703
678
/* Tag Rules frame */
704
679
Frame = gtk_frame_new (_("ID3 Tag Rules"));
705
680
gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
706
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
681
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
707
682
gtk_container_add(GTK_CONTAINER(Frame),vbox);
708
gtk_container_set_border_width(GTK_CONTAINER(vbox),2);
683
gtk_container_set_border_width (GTK_CONTAINER (vbox), BOX_SPACING);
710
Table = gtk_table_new(3,2,FALSE);
685
Table = et_grid_new (3, 2);
711
686
gtk_box_pack_start(GTK_BOX(vbox),Table,FALSE,FALSE,0);
712
gtk_table_set_row_spacings(GTK_TABLE(Table),2);
713
gtk_table_set_col_spacings(GTK_TABLE(Table),2);
715
/* Write ID3 tags in FLAC files */
716
WriteId3TagsInFlacFiles = gtk_check_button_new_with_label(_("Write ID3 tags in FLAC files (in addition to FLAC tag)"));
717
gtk_table_attach(GTK_TABLE(Table),WriteId3TagsInFlacFiles,0,1,0,1,GTK_FILL,GTK_FILL,0,0);
718
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(WriteId3TagsInFlacFiles),WRITE_ID3_TAGS_IN_FLAC_FILE);
719
gtk_widget_set_tooltip_text(WriteId3TagsInFlacFiles,_("If activated, ID3 tags will be "
720
"also added in the FLAC file (according the two rules above, plus the FLAC tag). "
721
"Else ID3 tags will be stripped."));
687
gtk_grid_set_row_spacing (GTK_GRID (Table), BOX_SPACING);
688
gtk_grid_set_column_spacing (GTK_GRID (Table), BOX_SPACING);
723
690
/* Strip tag when fields (managed by EasyTAG) are empty */
724
691
StripTagWhenEmptyFields = gtk_check_button_new_with_label(_("Strip tags if all fields are set to blank"));
725
gtk_table_attach(GTK_TABLE(Table),StripTagWhenEmptyFields,0,1,1,2,GTK_FILL,GTK_FILL,0,0);
692
gtk_grid_attach (GTK_GRID (Table), StripTagWhenEmptyFields, 0, 0, 1, 1);
726
693
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(StripTagWhenEmptyFields),STRIP_TAG_WHEN_EMPTY_FIELDS);
727
694
gtk_widget_set_tooltip_text(StripTagWhenEmptyFields,_("As ID3v2 tags may contain other data than "
728
"Title, Artist, Album, Year, Track, Genre or Comment (as an attached picture, lyrics…), "
695
"Title, Artist, Album, Year, Track, Genre or Comment (as an attached image, lyrics…), "
729
696
"this option allows you to strip the whole tag when these seven standard data fields have "
730
697
"been set to blank."));
732
699
/* Convert old ID3v2 tag version */
733
700
ConvertOldId3v2TagVersion = gtk_check_button_new_with_label(_("Automatically convert old ID3v2 tag versions"));
734
gtk_table_attach(GTK_TABLE(Table),ConvertOldId3v2TagVersion,0,1,2,3,GTK_FILL,GTK_FILL,0,0);
701
gtk_grid_attach (GTK_GRID (Table), ConvertOldId3v2TagVersion, 0, 1, 1, 1);
735
702
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ConvertOldId3v2TagVersion),CONVERT_OLD_ID3V2_TAG_VERSION);
736
703
gtk_widget_set_tooltip_text(ConvertOldId3v2TagVersion,_("If activated, an old ID3v2 tag version (as "
737
704
"ID3v2.2) will be updated to the ID3v2.3 version."));
740
707
FileWritingId3v2UseCrc32 = gtk_check_button_new_with_label(_("Use CRC32"));
741
gtk_table_attach(GTK_TABLE(Table),FileWritingId3v2UseCrc32,1,2,0,1,GTK_FILL,GTK_FILL,0,0);
708
gtk_grid_attach (GTK_GRID (Table), FileWritingId3v2UseCrc32, 1, 0, 1, 1);
742
709
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FileWritingId3v2UseCrc32),FILE_WRITING_ID3V2_USE_CRC32);
743
710
gtk_widget_set_tooltip_text(FileWritingId3v2UseCrc32,_("Set CRC32 in the ID3v2 tags"));
745
712
/* Use Compression */
746
713
FileWritingId3v2UseCompression = gtk_check_button_new_with_label(_("Use Compression"));
747
gtk_table_attach(GTK_TABLE(Table),FileWritingId3v2UseCompression,1,2,1,2,GTK_FILL,GTK_FILL,0,0);
714
gtk_grid_attach (GTK_GRID (Table), FileWritingId3v2UseCompression, 1, 1, 1,
748
716
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FileWritingId3v2UseCompression),FILE_WRITING_ID3V2_USE_COMPRESSION);
749
717
gtk_widget_set_tooltip_text(FileWritingId3v2UseCompression,_("Set Compression in the ID3v2 tags"));
751
719
/* Write Genre in text */
752
720
FileWritingId3v2TextOnlyGenre = gtk_check_button_new_with_label(_("Write Genre in text only"));
753
gtk_table_attach(GTK_TABLE(Table),FileWritingId3v2TextOnlyGenre,1,2,2,3,GTK_FILL,GTK_FILL,0,0);
721
gtk_grid_attach (GTK_GRID (Table), FileWritingId3v2TextOnlyGenre, 0, 2, 1,
754
723
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FileWritingId3v2TextOnlyGenre),FILE_WRITING_ID3V2_TEXT_ONLY_GENRE);
755
724
gtk_widget_set_tooltip_text(FileWritingId3v2TextOnlyGenre,_("Don't use ID3v1 number references in genre tag. Enable this if you see numbers as genre in your music player."));
757
726
/* Character Set for writing ID3 tag */
758
727
Frame = gtk_frame_new (_("Character Set for writing ID3 tags"));
759
728
gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
760
id3v1v2hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,3);
729
id3v1v2hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, BOX_SPACING);
761
730
gtk_container_add(GTK_CONTAINER(Frame),id3v1v2hbox);
762
gtk_container_set_border_width(GTK_CONTAINER(id3v1v2hbox), 2);
731
gtk_container_set_border_width (GTK_CONTAINER (id3v1v2hbox), BOX_SPACING);
765
734
Frame = gtk_frame_new (_("ID3v2 tags"));
766
735
gtk_box_pack_start(GTK_BOX(id3v1v2hbox),Frame,FALSE,FALSE,2);
768
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
737
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
769
738
gtk_container_add(GTK_CONTAINER(Frame),vbox);
770
gtk_container_set_border_width(GTK_CONTAINER(vbox),2);
739
gtk_container_set_border_width (GTK_CONTAINER (vbox), BOX_SPACING);
772
Table = gtk_table_new(8,6,FALSE);
741
Table = et_grid_new (8, 6);
773
742
gtk_box_pack_start(GTK_BOX(vbox),Table,FALSE,FALSE,0);
774
gtk_table_set_row_spacings(GTK_TABLE(Table),2);
775
gtk_table_set_col_spacings(GTK_TABLE(Table),2);
743
gtk_grid_set_row_spacing (GTK_GRID (Table), BOX_SPACING);
744
gtk_grid_set_column_spacing (GTK_GRID (Table), BOX_SPACING);
777
746
/* Write ID3v2 tag */
778
747
FileWritingId3v2WriteTag = gtk_check_button_new_with_label(_("Write ID3v2 tag"));
779
gtk_table_attach(GTK_TABLE(Table),FileWritingId3v2WriteTag,0,5,0,1,GTK_FILL,GTK_FILL,0,0);
748
gtk_grid_attach (GTK_GRID (Table), FileWritingId3v2WriteTag, 0, 0, 5, 1);
780
749
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FileWritingId3v2WriteTag),FILE_WRITING_ID3V2_WRITE_TAG);
781
750
gtk_widget_set_tooltip_text(FileWritingId3v2WriteTag,_("If activated, an ID3v2.4 tag will be added or "
782
751
"updated at the beginning of the MP3 files. Else it will be stripped."));
786
755
#ifdef ENABLE_ID3LIB
787
756
/* ID3v2 tag version */
788
757
LabelId3v2Version = gtk_label_new(_("Version:"));
789
gtk_table_attach(GTK_TABLE(Table),LabelId3v2Version,0,2,1,2,GTK_FILL,GTK_FILL,0,0);
758
gtk_grid_attach (GTK_GRID (Table), LabelId3v2Version, 0, 1, 2, 1);
790
759
gtk_misc_set_alignment(GTK_MISC(LabelId3v2Version),0,0.5);
792
EventBox = gtk_event_box_new();
793
761
FileWritingId3v2VersionCombo = gtk_combo_box_text_new();
794
gtk_container_add(GTK_CONTAINER(EventBox),FileWritingId3v2VersionCombo);
795
gtk_widget_set_tooltip_text(EventBox,_("Select the ID3v2 tag version to write:\n"
796
" - ID3v2.3 is written using id3lib,\n"
797
" - ID3v2.4 is written using libid3tag (recommended)."));
762
gtk_widget_set_tooltip_text (FileWritingId3v2VersionCombo,
763
_("Select the ID3v2 tag version to write:\n"
764
" - ID3v2.3 is written using id3lib,\n"
765
" - ID3v2.4 is written using libid3tag (recommended)."));
798
766
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(FileWritingId3v2VersionCombo), "ID3v2.4");
799
767
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(FileWritingId3v2VersionCombo), "ID3v2.3");
800
768
gtk_combo_box_set_active(GTK_COMBO_BOX(FileWritingId3v2VersionCombo),
801
769
FILE_WRITING_ID3V2_VERSION_4 ? 0 : 1);
802
gtk_table_attach(GTK_TABLE(Table),EventBox,2,4,1,2,GTK_FILL,GTK_FILL,0,0);
770
gtk_grid_attach (GTK_GRID (Table), FileWritingId3v2VersionCombo, 2, 1, 2,
803
772
g_signal_connect_after(G_OBJECT(FileWritingId3v2VersionCombo),"changed",
804
773
G_CALLBACK(Change_Id3_Settings_Toggled),NULL);
809
778
LabelId3v2Charset = gtk_label_new(_("Charset:"));
810
gtk_table_attach(GTK_TABLE(Table),LabelId3v2Charset,0,5,2,3,GTK_FILL,GTK_FILL,0,0);
779
gtk_grid_attach (GTK_GRID (Table), LabelId3v2Charset, 0, 2, 5, 1);
811
780
gtk_misc_set_alignment(GTK_MISC(LabelId3v2Charset),0,0.5);
813
Label = gtk_label_new(" ");
814
gtk_table_attach(GTK_TABLE(Table),Label,0,1,3,4,GTK_FILL,GTK_FILL,0,0);
817
783
FileWritingId3v2UseUnicodeCharacterSet = gtk_radio_button_new_with_label(NULL, _("Unicode "));
818
784
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FileWritingId3v2UseUnicodeCharacterSet),
819
785
FILE_WRITING_ID3V2_USE_UNICODE_CHARACTER_SET);
820
gtk_table_attach(GTK_TABLE(Table),FileWritingId3v2UseUnicodeCharacterSet,1,2,3,4,GTK_FILL,GTK_FILL,0,0);
786
gtk_grid_attach (GTK_GRID (Table), FileWritingId3v2UseUnicodeCharacterSet,
822
EventBox = gtk_event_box_new();
823
789
FileWritingId3v2UnicodeCharacterSetCombo = gtk_combo_box_text_new();
824
gtk_container_add(GTK_CONTAINER(EventBox),FileWritingId3v2UnicodeCharacterSetCombo);
825
gtk_widget_set_tooltip_text(EventBox,_("Unicode type to use"));
790
gtk_widget_set_tooltip_text(FileWritingId3v2UnicodeCharacterSetCombo,
791
_("Unicode type to use"));
826
792
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(FileWritingId3v2UnicodeCharacterSetCombo), "UTF-8");
827
793
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(FileWritingId3v2UnicodeCharacterSetCombo), "UTF-16");
828
794
if ( FILE_WRITING_ID3V2_UNICODE_CHARACTER_SET == NULL )
838
805
FileWritingId3v2UseNoUnicodeCharacterSet = gtk_radio_button_new_with_label(
839
806
gtk_radio_button_get_group(GTK_RADIO_BUTTON(FileWritingId3v2UseUnicodeCharacterSet)),
841
gtk_table_attach(GTK_TABLE(Table),FileWritingId3v2UseNoUnicodeCharacterSet,1,2,4,5,GTK_FILL,GTK_FILL,0,0);
808
gtk_grid_attach (GTK_GRID (Table),
809
FileWritingId3v2UseNoUnicodeCharacterSet, 1, 4, 1, 1);
842
810
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FileWritingId3v2UseNoUnicodeCharacterSet),
843
811
!FILE_WRITING_ID3V2_USE_UNICODE_CHARACTER_SET);
845
EventBox = gtk_event_box_new();
846
813
FileWritingId3v2NoUnicodeCharacterSetCombo = gtk_combo_box_text_new();
847
gtk_container_add(GTK_CONTAINER(EventBox),FileWritingId3v2NoUnicodeCharacterSetCombo);
848
gtk_widget_set_tooltip_text(EventBox,_("Character set used to write the tag "
849
"data in the file."));
814
gtk_widget_set_tooltip_text (FileWritingId3v2NoUnicodeCharacterSetCombo,
815
_("Character set used to write the tag data in the file."));
851
817
Charset_Populate_Combobox(GTK_COMBO_BOX(FileWritingId3v2NoUnicodeCharacterSetCombo),
852
818
FILE_WRITING_ID3V2_NO_UNICODE_CHARACTER_SET);
853
gtk_table_attach(GTK_TABLE(Table),EventBox,2,5,4,5,GTK_FILL,GTK_FILL,0,0);
819
gtk_grid_attach (GTK_GRID (Table),
820
FileWritingId3v2NoUnicodeCharacterSetCombo, 2, 4, 3, 1);
854
821
g_signal_connect_after(G_OBJECT(FileWritingId3v2UseNoUnicodeCharacterSet),"toggled",
855
822
G_CALLBACK(Change_Id3_Settings_Toggled),NULL);
857
824
// ID3v2 Additional iconv() options
858
825
LabelAdditionalId3v2IconvOptions = gtk_label_new(_("Additional settings for iconv():"));
859
gtk_table_attach(GTK_TABLE(Table),LabelAdditionalId3v2IconvOptions,2,5,5,6,GTK_FILL,GTK_FILL,0,0);
826
gtk_grid_attach (GTK_GRID (Table), LabelAdditionalId3v2IconvOptions, 2, 5,
860
828
gtk_misc_set_alignment(GTK_MISC(LabelAdditionalId3v2IconvOptions),0,0.5);
862
830
FileWritingId3v2IconvOptionsNo = gtk_radio_button_new_with_label(NULL,
864
gtk_table_attach(GTK_TABLE(Table),FileWritingId3v2IconvOptionsNo,2,3,6,7,GTK_FILL,GTK_FILL,0,0);
832
gtk_grid_attach (GTK_GRID (Table), FileWritingId3v2IconvOptionsNo, 2, 6, 1,
865
834
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FileWritingId3v2IconvOptionsNo),FILE_WRITING_ID3V2_ICONV_OPTIONS_NO);
866
835
gtk_widget_set_tooltip_text(FileWritingId3v2IconvOptionsNo,_("With this option, when "
867
836
"a character cannot be represented in the target character set, it isn't changed. "
888
859
Frame = gtk_frame_new (_("ID3v1 tags"));
889
860
gtk_box_pack_start(GTK_BOX(id3v1v2hbox),Frame,FALSE,FALSE,2);
891
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
862
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
892
863
gtk_container_add(GTK_CONTAINER(Frame),vbox);
893
gtk_container_set_border_width(GTK_CONTAINER(vbox),2);
864
gtk_container_set_border_width (GTK_CONTAINER (vbox), BOX_SPACING);
895
Table = gtk_table_new(6,5,FALSE);
866
Table = et_grid_new (6, 5);
896
867
gtk_box_pack_start(GTK_BOX(vbox),Table,FALSE,FALSE,0);
897
gtk_table_set_row_spacings(GTK_TABLE(Table),2);
898
gtk_table_set_col_spacings(GTK_TABLE(Table),2);
868
gtk_grid_set_row_spacing (GTK_GRID (Table), BOX_SPACING);
869
gtk_grid_set_column_spacing (GTK_GRID (Table), BOX_SPACING);
901
872
/* Write ID3v1 tag */
902
873
FileWritingId3v1WriteTag = gtk_check_button_new_with_label(_("Write ID3v1.x tag"));
903
gtk_table_attach(GTK_TABLE(Table),FileWritingId3v1WriteTag,0,4,0,1,GTK_FILL,GTK_FILL,0,0);
874
gtk_grid_attach (GTK_GRID (Table), FileWritingId3v1WriteTag, 0, 0, 4, 1);
904
875
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FileWritingId3v1WriteTag),FILE_WRITING_ID3V1_WRITE_TAG);
905
876
gtk_widget_set_tooltip_text(FileWritingId3v1WriteTag,_("If activated, an ID3v1 tag will be added or "
906
877
"updated at the end of the MP3 files. Else it will be stripped."));
910
881
/* Id3V1 writing character set */
911
882
LabelId3v1Charset = gtk_label_new(_("Charset:"));
912
gtk_table_attach(GTK_TABLE(Table),LabelId3v1Charset,0,4,1,2,GTK_FILL,GTK_FILL,0,0);
883
gtk_grid_attach (GTK_GRID (Table), LabelId3v1Charset, 0, 1, 4, 1);
913
884
gtk_misc_set_alignment(GTK_MISC(LabelId3v1Charset),0,0.5);
915
Label = gtk_label_new(" ");
916
gtk_table_attach(GTK_TABLE(Table),Label,0,1,2,3,GTK_FILL,GTK_FILL,0,0);
918
EventBox = gtk_event_box_new();
919
886
FileWritingId3v1CharacterSetCombo = gtk_combo_box_text_new();
920
gtk_container_add(GTK_CONTAINER(EventBox),FileWritingId3v1CharacterSetCombo);
921
gtk_table_attach(GTK_TABLE(Table),EventBox,1,4,2,3,GTK_FILL,GTK_FILL,0,0);
922
gtk_widget_set_tooltip_text(EventBox,_("Character set used to write ID3v1 tag data "
887
gtk_grid_attach (GTK_GRID (Table), FileWritingId3v1CharacterSetCombo, 1, 2,
889
gtk_widget_set_tooltip_text (FileWritingId3v1CharacterSetCombo,
890
_("Character set used to write ID3v1 tag data in the file."));
924
891
Charset_Populate_Combobox(GTK_COMBO_BOX(FileWritingId3v1CharacterSetCombo), FILE_WRITING_ID3V1_CHARACTER_SET);
926
893
/* ID3V1 Additional iconv() options*/
927
894
LabelAdditionalId3v1IconvOptions = gtk_label_new(_("Additional settings for iconv():"));
928
gtk_table_attach(GTK_TABLE(Table),LabelAdditionalId3v1IconvOptions,1,4,3,4,GTK_FILL,GTK_FILL,0,0);
895
gtk_grid_attach (GTK_GRID (Table), LabelAdditionalId3v1IconvOptions, 1, 3,
929
897
gtk_misc_set_alignment(GTK_MISC(LabelAdditionalId3v1IconvOptions),0,0.5);
931
899
FileWritingId3v1IconvOptionsNo = gtk_radio_button_new_with_label(NULL,
933
gtk_table_attach(GTK_TABLE(Table),FileWritingId3v1IconvOptionsNo,1,2,4,5,GTK_FILL,GTK_FILL,0,0);
901
gtk_grid_attach (GTK_GRID (Table), FileWritingId3v1IconvOptionsNo, 1, 4, 1,
934
903
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FileWritingId3v1IconvOptionsNo),FILE_WRITING_ID3V1_ICONV_OPTIONS_NO);
935
904
gtk_widget_set_tooltip_text(FileWritingId3v1IconvOptionsNo,_("With this option, when "
936
905
"a character cannot be represented in the target character set, it isn't changed. "
956
927
/* Character Set for reading tag */
957
928
Frame = gtk_frame_new (_("Character Set for reading ID3 tags"));
958
929
gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
959
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
930
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
960
931
gtk_container_add(GTK_CONTAINER(Frame),vbox);
961
gtk_container_set_border_width(GTK_CONTAINER(vbox), 2);
932
gtk_container_set_border_width (GTK_CONTAINER (vbox), BOX_SPACING);
963
Table = gtk_table_new(4,2,FALSE);
934
Table = et_grid_new(4,2);
964
935
gtk_box_pack_start(GTK_BOX(vbox),Table,FALSE,FALSE,0);
965
936
//gtk_container_set_border_width(GTK_CONTAINER(Table), 2);
966
//gtk_table_set_row_spacings(GTK_TABLE(Table),2);
967
gtk_table_set_col_spacings(GTK_TABLE(Table),2);
937
/*gtk_grid_set_row_spacing (GTK_GRID (Table), 2);*/
938
gtk_grid_set_column_spacing (GTK_GRID (Table), BOX_SPACING);
969
940
// "File Reading Charset" Check Button + Combo
970
941
UseNonStandardId3ReadingCharacterSet = gtk_check_button_new_with_label(_(
971
942
"Non-standard:"));
972
943
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(UseNonStandardId3ReadingCharacterSet),
973
944
USE_NON_STANDARD_ID3_READING_CHARACTER_SET);
974
gtk_table_attach(GTK_TABLE(Table),UseNonStandardId3ReadingCharacterSet,0,1,0,1,GTK_FILL,GTK_FILL,0,0);
945
gtk_grid_attach (GTK_GRID (Table), UseNonStandardId3ReadingCharacterSet, 0,
975
947
gtk_widget_set_tooltip_text(UseNonStandardId3ReadingCharacterSet,
976
948
_("This character set will be used when reading the tag data, to convert "
977
949
"each string found in an ISO-8859-1 field in the tag (for ID3v2 or/and ID3v1 tag).\n"
1009
980
Label = gtk_label_new (_("Scanner"));
1010
Frame = gtk_frame_new (_("Scanner"));
1011
gtk_notebook_append_page (GTK_NOTEBOOK(OptionsNoteBook),Frame,Label);
1012
gtk_container_set_border_width(GTK_CONTAINER(Frame), 5);
981
VBox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
982
gtk_notebook_append_page (GTK_NOTEBOOK(OptionsNoteBook), VBox, Label);
983
gtk_container_set_border_width (GTK_CONTAINER (VBox), BOX_SPACING);
1014
985
/* Save the number of the page. Asked in Scanner window */
1015
OptionsNoteBook_Scanner_Page_Num = gtk_notebook_page_num(GTK_NOTEBOOK(OptionsNoteBook),Frame);
1017
VBox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
1018
gtk_container_add(GTK_CONTAINER(Frame),VBox);
1019
gtk_container_set_border_width(GTK_CONTAINER(VBox), 4);
986
OptionsNoteBook_Scanner_Page_Num = gtk_notebook_page_num (GTK_NOTEBOOK (OptionsNoteBook),
1021
989
/* Character conversion for the 'Fill Tag' scanner (=> FTS...) */
1022
990
Frame = gtk_frame_new (_("Fill Tag Scanner - Character Conversion"));
1023
991
gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
1024
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
992
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
1025
993
gtk_container_add(GTK_CONTAINER(Frame),vbox);
1026
gtk_container_set_border_width(GTK_CONTAINER(vbox), 2);
994
gtk_container_set_border_width (GTK_CONTAINER (vbox), BOX_SPACING);
1028
996
FTSConvertUnderscoreAndP20IntoSpace = gtk_check_button_new_with_label(_("Convert underscore "
1029
997
"character '_' and string '%20' to space ' '"));
1047
1015
/* Character conversion for the 'Rename File' scanner (=> RFS...) */
1048
1016
Frame = gtk_frame_new (_("Rename File Scanner - Character Conversion"));
1049
1017
gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
1050
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
1018
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
1051
1019
gtk_container_add(GTK_CONTAINER(Frame),vbox);
1052
gtk_container_set_border_width(GTK_CONTAINER(vbox),2);
1020
gtk_container_set_border_width (GTK_CONTAINER (vbox), BOX_SPACING);
1053
1021
RFSConvertUnderscoreAndP20IntoSpace = gtk_radio_button_new_with_label(NULL, _("Convert underscore " "character '_' and string '%20' to space ' '"));
1054
1022
RFSConvertSpaceIntoUnderscore = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(RFSConvertUnderscoreAndP20IntoSpace), _("Convert space ' ' to underscore '_'"));
1055
1023
RFSRemoveSpaces = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(RFSConvertUnderscoreAndP20IntoSpace), _("Remove spaces"));
1056
1024
gtk_box_pack_start(GTK_BOX(vbox),RFSConvertUnderscoreAndP20IntoSpace,FALSE,FALSE,0);
1057
1025
gtk_box_pack_start(GTK_BOX(vbox),RFSConvertSpaceIntoUnderscore, FALSE,FALSE,0);
1058
gtk_box_pack_start(GTK_BOX(vbox),RFSRemoveSpaces, FALSE,FALSE,0);
1026
gtk_box_pack_start (GTK_BOX (vbox), RFSRemoveSpaces, FALSE, FALSE, 0);
1059
1027
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(RFSConvertUnderscoreAndP20IntoSpace),
1060
1028
RFS_CONVERT_UNDERSCORE_AND_P20_INTO_SPACE);
1061
1029
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(RFSConvertSpaceIntoUnderscore),
1166
Label = gtk_label_new (_("CD Data Base"));
1167
Frame = gtk_frame_new (_("CD Data Base"));
1168
gtk_notebook_append_page (GTK_NOTEBOOK(OptionsNoteBook),Frame,Label);
1169
gtk_container_set_border_width(GTK_CONTAINER(Frame), 5);
1171
VBox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
1172
gtk_container_add(GTK_CONTAINER(Frame),VBox);
1173
gtk_container_set_border_width(GTK_CONTAINER(VBox), 4);
1128
Label = gtk_label_new (_("CDDB"));
1129
VBox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
1130
gtk_notebook_append_page (GTK_NOTEBOOK (OptionsNoteBook), VBox, Label);
1131
gtk_container_set_border_width (GTK_CONTAINER (VBox), BOX_SPACING);
1175
1133
// CDDB Server Settings (Automatic Search)
1176
1134
Frame = gtk_frame_new (_("Server Settings for Automatic Search"));
1177
1135
gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE, 0);
1178
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
1136
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
1179
1137
gtk_container_add(GTK_CONTAINER(Frame),vbox);
1180
gtk_container_set_border_width(GTK_CONTAINER(vbox), 4);
1138
gtk_container_set_border_width (GTK_CONTAINER (vbox), BOX_SPACING);
1182
1140
// 1rst automatic search server
1183
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,2);
1141
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, BOX_SPACING);
1184
1142
gtk_container_add(GTK_CONTAINER(vbox),hbox);
1185
1143
Label = gtk_label_new(_("Name:"));
1186
1144
gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,2);
1331
1288
Frame = gtk_frame_new (_("Proxy Settings"));
1332
1289
gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
1334
Table = gtk_table_new(3,5,FALSE);
1291
Table = et_grid_new (3, 5);
1335
1292
gtk_container_add(GTK_CONTAINER(Frame),Table);
1336
gtk_table_set_row_spacings(GTK_TABLE(Table),2);
1337
gtk_table_set_col_spacings(GTK_TABLE(Table),4);
1338
gtk_container_set_border_width(GTK_CONTAINER(Table), 2);
1293
gtk_grid_set_row_spacing (GTK_GRID (Table), BOX_SPACING);
1294
gtk_grid_set_column_spacing (GTK_GRID (Table), BOX_SPACING);
1295
gtk_container_set_border_width(GTK_CONTAINER(Table), BOX_SPACING);
1340
1297
CddbUseProxy = gtk_check_button_new_with_label(_("Use a proxy"));
1341
gtk_table_attach(GTK_TABLE(Table),CddbUseProxy,0,5,0,1,GTK_FILL,GTK_FILL,0,0);
1298
gtk_grid_attach (GTK_GRID (Table), CddbUseProxy, 0, 0, 5, 1);
1342
1299
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(CddbUseProxy),CDDB_USE_PROXY);
1343
1300
gtk_widget_set_tooltip_text(CddbUseProxy,_("Set active the settings of the proxy server."));
1345
Label = gtk_label_new(" ");
1346
gtk_table_attach(GTK_TABLE(Table),Label,0,1,1,2,GTK_FILL,GTK_FILL,0,0);
1348
1302
Label = gtk_label_new(_("Host Name:"));
1349
gtk_table_attach(GTK_TABLE(Table),Label,1,2,1,2,GTK_FILL,GTK_FILL,0,0);
1303
gtk_grid_attach (GTK_GRID (Table), Label, 1, 1, 1, 1);
1350
1304
gtk_misc_set_alignment(GTK_MISC(Label),1,0.5);
1351
1305
CddbProxyName = gtk_entry_new();
1352
gtk_table_attach(GTK_TABLE(Table),CddbProxyName,2,3,1,2,GTK_FILL,GTK_FILL,0,0);
1306
gtk_grid_attach (GTK_GRID (Table), CddbProxyName, 2, 1, 1, 1);
1353
1307
if (CDDB_PROXY_NAME)
1354
1308
gtk_entry_set_text(GTK_ENTRY(CddbProxyName),CDDB_PROXY_NAME);
1355
1309
gtk_widget_set_tooltip_text(CddbProxyName,_("Name of the proxy server."));
1356
1310
Label = gtk_label_new (_("Port:"));
1357
gtk_table_attach(GTK_TABLE(Table),Label,3,4,1,2,GTK_FILL,GTK_FILL,0,0);
1311
gtk_grid_attach (GTK_GRID (Table), Label, 3, 1, 1, 1);
1358
1312
gtk_misc_set_alignment(GTK_MISC(Label),1,0.5);
1359
1313
CddbProxyPort = gtk_entry_new();
1314
CddbProxyPort = gtk_spin_button_new_with_range (0.0, 65535.0, 1.0);
1360
1315
gtk_widget_set_size_request(GTK_WIDGET(CddbProxyPort), 45, -1);
1361
gtk_entry_set_max_length(GTK_ENTRY(CddbProxyPort),5);
1362
gtk_table_attach(GTK_TABLE(Table),CddbProxyPort,4,5,1,2,GTK_FILL,GTK_FILL,0,0);
1316
gtk_grid_attach (GTK_GRID (Table), CddbProxyPort, 4, 1, 1, 1);
1363
1317
gtk_widget_set_tooltip_text(CddbProxyPort,_("Port of the proxy server."));
1364
sprintf(temp,"%i",CDDB_PROXY_PORT);
1365
gtk_entry_set_text(GTK_ENTRY(CddbProxyPort),temp);
1366
g_signal_connect(G_OBJECT(CddbProxyPort),"insert_text",G_CALLBACK(Insert_Only_Digit),NULL);
1318
gtk_spin_button_set_value (GTK_SPIN_BUTTON (CddbProxyPort),
1367
1320
g_signal_connect(G_OBJECT(CddbUseProxy),"toggled",G_CALLBACK(Cddb_Use_Proxy_Toggled),NULL);
1368
1321
Label = gtk_label_new(_("User Name:"));
1369
gtk_table_attach(GTK_TABLE(Table),Label,1,2,2,3,GTK_FILL,GTK_FILL,0,0);
1322
gtk_grid_attach (GTK_GRID (Table), Label, 1, 2, 1, 1);
1370
1323
gtk_misc_set_alignment(GTK_MISC(Label),1,0.5);
1371
1324
CddbProxyUserName = gtk_entry_new();
1372
1325
if (CDDB_PROXY_USER_NAME)
1373
1326
gtk_entry_set_text(GTK_ENTRY(CddbProxyUserName),CDDB_PROXY_USER_NAME);
1374
gtk_table_attach(GTK_TABLE(Table),CddbProxyUserName,2,3,2,3,GTK_FILL,GTK_FILL,0,0);
1327
gtk_grid_attach (GTK_GRID (Table), CddbProxyUserName, 2, 2, 1, 1);
1375
1328
gtk_widget_set_tooltip_text(CddbProxyUserName,_("Name of user for the the proxy server."));
1376
1329
Label = gtk_label_new(_("User Password:"));
1377
gtk_table_attach(GTK_TABLE(Table),Label,3,4,2,3,GTK_FILL,GTK_FILL,0,0);
1330
gtk_grid_attach (GTK_GRID (Table), Label, 3, 2, 1, 1);
1378
1331
gtk_misc_set_alignment(GTK_MISC(Label),1,0.5);
1379
1332
CddbProxyUserPassword = gtk_entry_new();
1380
1333
if (CDDB_PROXY_USER_PASSWORD)
1381
1334
gtk_entry_set_text(GTK_ENTRY(CddbProxyUserPassword),CDDB_PROXY_USER_PASSWORD);
1382
gtk_table_attach(GTK_TABLE(Table),CddbProxyUserPassword,4,5,2,3,GTK_FILL,GTK_FILL,0,0);
1335
gtk_grid_attach (GTK_GRID (Table), CddbProxyUserPassword, 4, 2, 1, 1);
1383
1336
gtk_entry_set_visibility(GTK_ENTRY(CddbProxyUserPassword),FALSE);
1384
1337
gtk_widget_set_tooltip_text(CddbProxyUserPassword,_("Password of user for the the proxy server."));
1385
1338
Cddb_Use_Proxy_Toggled();
1773
path_real = filename_from_display(path_utf8);
1776
/* On win32 : stat("c:\path\to\dir") succeed, while stat("c:\path\to\dir\")
1779
ET_Win32_Path_Remove_Trailing_Backslash(path_real);
1780
#endif /* G_OS_WIN32 */
1782
if ( stat(path_real,&stbuf)==0 && S_ISDIR(stbuf.st_mode) )
1786
return TRUE; /* Path is good */
1789
GtkWidget *msgdialog = gtk_message_dialog_new(GTK_WINDOW(OptionsWindow),
1790
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
1794
_("The selected path for 'Default path to files' is invalid"));
1795
gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(msgdialog),_("Path: '%s'\nError: %s"),path_utf8,g_strerror(errno));
1796
gtk_window_set_title(GTK_WINDOW(msgdialog),_("Invalid Path Error"));
1798
gtk_dialog_run(GTK_DIALOG(msgdialog));
1799
gtk_widget_destroy(msgdialog);
1688
path_real = filename_from_display (path_utf8);
1689
file = g_file_new_for_path (path_real);
1690
fileinfo = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_TYPE,
1691
G_FILE_QUERY_INFO_NONE, NULL, NULL);
1692
g_object_unref (file);
1696
if (g_file_info_get_file_type (fileinfo) == G_FILE_TYPE_DIRECTORY)
1700
g_object_unref (fileinfo);
1701
return TRUE; /* Path is good */
1704
g_object_unref (fileinfo);
1707
msgdialog = gtk_message_dialog_new (GTK_WINDOW (OptionsWindow),
1708
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
1712
_("The selected path for 'Default path to files' is invalid"));
1713
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (msgdialog),
1714
_("Path: '%s'\nError: %s"),
1715
path_utf8, g_strerror (errno));
1716
gtk_window_set_title (GTK_WINDOW (msgdialog), _("Invalid Path Error"));
1718
gtk_dialog_run (GTK_DIALOG (msgdialog));
1719
gtk_widget_destroy (msgdialog);