41
41
#include "browser.h"
43
43
#include "charset.h"
46
//# include "win32/win32dep.h"
45
#include "win32/win32dep.h"
46
#endif /* G_OS_WIN32 */
53
51
/* Options window */
54
void OptionsWindow_Quit (void);
55
void OptionsWindow_Apply_Button (void);
56
void OptionsWindow_Save_Button (void);
57
void OptionsWindow_Cancel_Button (void);
58
gboolean OptionsWindow_Key_Press (GtkWidget *window, GdkEvent *event);
59
gint Check_Config (void);
61
void Set_Default_Comment_Check_Button_Toggled (void);
62
void Number_Track_Formated_Toggled (void);
63
void Number_Track_Formated_Spin_Button_Changed (GtkObject *Label, GtkObject *SpinButton);
64
void Change_Id3_Settings_Toggled (void);
65
void File_Writing_Id3v2_Write_Tag_Toggled (void);
66
void Use_Non_Standard_Id3_Reading_Character_Set_Toggled (void);
67
void Scanner_Convert_Check_Button_Toggled_1 (GtkObject *object_rec, GtkObject *object_emi);
68
void Cddb_Use_Proxy_Toggled (void);
70
void DefaultPathToMp3_Combo_Add_String (void);
71
void CddbLocalPath_Combo_Add_String (void);
52
static void OptionsWindow_Quit (void);
53
static void OptionsWindow_Save_Button (void);
54
static void OptionsWindow_Cancel_Button (void);
55
static gboolean OptionsWindow_Key_Press (GtkWidget *window, GdkEvent *event);
56
static gboolean Check_Config (void);
58
static void Set_Default_Comment_Check_Button_Toggled (void);
59
static void Number_Track_Formatted_Toggled (void);
60
static void Number_Track_Formatted_Spin_Button_Changed (GtkWidget *Label,
61
GtkWidget *SpinButton);
62
static void Change_Id3_Settings_Toggled (void);
63
static void Use_Non_Standard_Id3_Reading_Character_Set_Toggled (void);
64
static void Scanner_Convert_Check_Button_Toggled_1 (GtkWidget *object_rec,
65
GtkWidget *object_emi);
66
static void Cddb_Use_Proxy_Toggled (void);
68
static void DefaultPathToMp3_Combo_Add_String (void);
69
static void CddbLocalPath_Combo_Add_String (void);
174
169
DefaultPathModel = gtk_list_store_new(MISC_COMBO_COUNT, G_TYPE_STRING);
176
DefaultPathToMp3 = gtk_combo_box_entry_new_with_model(GTK_TREE_MODEL(DefaultPathModel), MISC_COMBO_TEXT);
171
DefaultPathToMp3 = gtk_combo_box_new_with_model_and_entry(GTK_TREE_MODEL(DefaultPathModel));
172
gtk_combo_box_set_entry_text_column(GTK_COMBO_BOX(DefaultPathToMp3), MISC_COMBO_TEXT);
177
173
gtk_box_pack_start(GTK_BOX(HBox),DefaultPathToMp3,TRUE,TRUE,0);
178
174
gtk_widget_set_size_request(DefaultPathToMp3, 400, -1);
179
gtk_tooltips_set_tip(Tips,GTK_BIN(DefaultPathToMp3)->child,_("Specify the directory where "
180
"your files are located. This path will be loaded when EasyTAG starts without parameter."),NULL);
181
g_signal_connect(G_OBJECT(GTK_ENTRY(GTK_BIN(DefaultPathToMp3)->child)),"activate",G_CALLBACK(DefaultPathToMp3_Combo_Add_String),NULL);
182
//g_signal_connect(G_OBJECT(GTK_ENTRY(GTK_BIN(DefaultPathToMp3)->child)),"focus_out_event",G_CALLBACK(DefaultPathToMp3_Combo_Add_String),NULL);
175
gtk_widget_set_tooltip_text(gtk_bin_get_child(GTK_BIN(DefaultPathToMp3)),_("Specify the directory where "
176
"your files are located. This path will be loaded when EasyTAG starts without parameter."));
177
g_signal_connect(G_OBJECT(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(DefaultPathToMp3)))),"activate",G_CALLBACK(DefaultPathToMp3_Combo_Add_String),NULL);
178
//g_signal_connect(G_OBJECT(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(DefaultPathToMp3)))),"focus_out_event",G_CALLBACK(DefaultPathToMp3_Combo_Add_String),NULL);
185
181
Load_Default_Path_To_MP3_List(DefaultPathModel, MISC_COMBO_TEXT);
187
183
path_utf8 = filename_to_display(DEFAULT_PATH_TO_MP3);
188
184
Add_String_To_Combo_List(DefaultPathModel, path_utf8);
190
gtk_entry_set_text(GTK_ENTRY(GTK_BIN(DefaultPathToMp3)->child), path_utf8);
186
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(DefaultPathToMp3))), path_utf8);
191
187
g_free(path_utf8);
194
190
Button = gtk_button_new_from_stock(GTK_STOCK_OPEN);
195
191
gtk_box_pack_start(GTK_BOX(HBox),Button,FALSE,FALSE,0);
196
192
g_signal_connect_swapped(G_OBJECT(Button),"clicked",
197
G_CALLBACK(File_Selection_Window_For_Directory),G_OBJECT(GTK_BIN(DefaultPathToMp3)->child));
193
G_CALLBACK(File_Selection_Window_For_Directory),G_OBJECT(gtk_bin_get_child(GTK_BIN(DefaultPathToMp3))));
199
195
/* Load directory on startup */
200
196
LoadOnStartup = gtk_check_button_new_with_label(_("Load on startup the default directory or the directory passed as argument"));
201
197
gtk_box_pack_start(GTK_BOX(vbox),LoadOnStartup,FALSE,FALSE,0);
202
198
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(LoadOnStartup),LOAD_ON_STARTUP);
203
gtk_tooltips_set_tip(Tips,LoadOnStartup,_("Automatically search files, when EasyTAG starts, "
204
"into the default directory. Note that this path may be overriden by the parameter "
205
"passed to easytag (easytag /path_to/mp3_files)."),NULL);
199
gtk_widget_set_tooltip_text(LoadOnStartup,_("Automatically search files, when EasyTAG starts, "
200
"into the default directory. Note that this path may be overridden by the parameter "
201
"passed to easytag (easytag /path_to/mp3_files)."));
207
203
/* Browse subdirectories */
208
204
BrowseSubdir = gtk_check_button_new_with_label(_("Search subdirectories"));
209
205
gtk_box_pack_start(GTK_BOX(vbox),BrowseSubdir,FALSE,FALSE,0);
210
206
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(BrowseSubdir),BROWSE_SUBDIR);
211
gtk_tooltips_set_tip(Tips,BrowseSubdir,_("Search subdirectories for files when reading "
212
"a directory into the tree."),NULL);
207
gtk_widget_set_tooltip_text(BrowseSubdir,_("Search subdirectories for files when reading "
208
"a directory into the tree."));
214
210
/* Open the node to show subdirectories */
215
211
OpenSelectedBrowserNode = gtk_check_button_new_with_label(_("Show subdirectories when selecting "
217
213
gtk_box_pack_start(GTK_BOX(vbox),OpenSelectedBrowserNode,FALSE,FALSE,0);
218
214
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(OpenSelectedBrowserNode),OPEN_SELECTED_BROWSER_NODE);
219
gtk_tooltips_set_tip(Tips,OpenSelectedBrowserNode,_("This expands the selected node into the file "
220
"browser to display the sub-directories."),NULL);
215
gtk_widget_set_tooltip_text(OpenSelectedBrowserNode,_("This expands the selected node into the file "
216
"browser to display the sub-directories."));
222
218
/* Browse hidden directories */
223
219
BrowseHiddendir = gtk_check_button_new_with_label(_("Search hidden directories"));
224
#ifndef WIN32 /* Always true and not user modifiable on win32 */
220
#ifndef G_OS_WIN32 /* Always true and not user modifiable on win32 */
225
221
gtk_box_pack_start(GTK_BOX(vbox),BrowseHiddendir,FALSE,FALSE,0);
222
#endif /* !G_OS_WIN32 */
227
223
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(BrowseHiddendir),BROWSE_HIDDEN_DIR);
228
gtk_tooltips_set_tip(Tips,BrowseHiddendir,_("Search hidden directories for files "
229
"(directories starting by a '.')."),NULL);
224
gtk_widget_set_tooltip_text(BrowseHiddendir,_("Search hidden directories for files "
225
"(directories starting by a '.')."));
246
242
/* User interface */
247
243
Frame = gtk_frame_new (_("User Interface"));
248
244
gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
249
vbox = gtk_vbox_new(FALSE,2);
245
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
250
246
gtk_container_add(GTK_CONTAINER(Frame),vbox);
251
247
gtk_container_set_border_width(GTK_CONTAINER(vbox), 2);
253
249
// Show header infos
254
ShowHeaderInfos = gtk_check_button_new_with_label(_("Show header informations of file"));
250
ShowHeaderInfos = gtk_check_button_new_with_label(_("Show header information of file"));
255
251
gtk_box_pack_start(GTK_BOX(vbox),ShowHeaderInfos,FALSE,FALSE,0);
256
252
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ShowHeaderInfos),SHOW_HEADER_INFO);
257
gtk_tooltips_set_tip(Tips,ShowHeaderInfos,_("If activated, informations about the file as "
258
"the bitrate, the time, the size, will be displayed under the filename entry."),NULL);
253
gtk_widget_set_tooltip_text(ShowHeaderInfos,_("If activated, information about the file as "
254
"the bitrate, the time, the size, will be displayed under the filename entry."));
260
256
// Display color mode for changed files in list
261
hbox = gtk_hbox_new(FALSE,2);
257
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,2);
262
258
gtk_box_pack_start(GTK_BOX(vbox),hbox,FALSE,FALSE,0);
263
259
gtk_container_set_border_width(GTK_CONTAINER(hbox), 2);
264
Label = gtk_label_new(_("Display changed files in list using :"));
260
Label = gtk_label_new(_("Display changed files in list using:"));
265
261
gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,0);
267
263
ChangedFilesDisplayedToRed = gtk_radio_button_new_with_label(NULL,_("Red color"));
278
274
/* Sorting List Options */
279
275
Frame = gtk_frame_new (_("Sorting List Options"));
280
276
gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
281
vbox = gtk_vbox_new(FALSE,2);
277
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
282
278
gtk_container_add(GTK_CONTAINER(Frame),vbox);
283
279
gtk_container_set_border_width(GTK_CONTAINER(vbox), 2);
285
hbox = gtk_hbox_new(FALSE,2);
281
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,2);
286
282
gtk_box_pack_start(GTK_BOX(vbox),hbox,FALSE,FALSE,0);
287
283
gtk_container_set_border_width(GTK_CONTAINER(hbox), 2);
288
284
/* Sorting method */
289
Label = gtk_label_new(_("Sort the file list by :"));
285
Label = gtk_label_new(_("Sort the file list by:"));
290
286
gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,0);
292
288
EventBox = gtk_event_box_new();
293
SortingFileCombo = gtk_combo_box_new_text();
289
SortingFileCombo = gtk_combo_box_text_new();
294
290
gtk_container_add(GTK_CONTAINER(EventBox),SortingFileCombo);
295
291
gtk_box_pack_start(GTK_BOX(hbox),EventBox,FALSE,FALSE,2);
296
292
gtk_widget_set_size_request(GTK_WIDGET(SortingFileCombo), 260, -1);
297
293
gtk_combo_box_set_wrap_width(GTK_COMBO_BOX(SortingFileCombo),2); // Two columns
299
295
// Items of option menu
300
gtk_combo_box_append_text(GTK_COMBO_BOX(SortingFileCombo), _("Ascending file name"));
301
gtk_combo_box_append_text(GTK_COMBO_BOX(SortingFileCombo), _("Descending file name"));
302
gtk_combo_box_append_text(GTK_COMBO_BOX(SortingFileCombo), _("Ascending track number"));
303
gtk_combo_box_append_text(GTK_COMBO_BOX(SortingFileCombo), _("Descending track number"));
304
gtk_combo_box_append_text(GTK_COMBO_BOX(SortingFileCombo), _("Ascending creation date"));
305
gtk_combo_box_append_text(GTK_COMBO_BOX(SortingFileCombo), _("Descending creation date"));
306
gtk_combo_box_append_text(GTK_COMBO_BOX(SortingFileCombo), _("Ascending title"));
307
gtk_combo_box_append_text(GTK_COMBO_BOX(SortingFileCombo), _("Descending title"));
308
gtk_combo_box_append_text(GTK_COMBO_BOX(SortingFileCombo), _("Ascending artist"));
309
gtk_combo_box_append_text(GTK_COMBO_BOX(SortingFileCombo), _("Descending artist"));
310
gtk_combo_box_append_text(GTK_COMBO_BOX(SortingFileCombo), _("Ascending album"));
311
gtk_combo_box_append_text(GTK_COMBO_BOX(SortingFileCombo), _("Descending album"));
312
gtk_combo_box_append_text(GTK_COMBO_BOX(SortingFileCombo), _("Ascending year"));
313
gtk_combo_box_append_text(GTK_COMBO_BOX(SortingFileCombo), _("Descending year"));
314
gtk_combo_box_append_text(GTK_COMBO_BOX(SortingFileCombo), _("Ascending genre"));
315
gtk_combo_box_append_text(GTK_COMBO_BOX(SortingFileCombo), _("Descending genre"));
316
gtk_combo_box_append_text(GTK_COMBO_BOX(SortingFileCombo), _("Ascending comment"));
317
gtk_combo_box_append_text(GTK_COMBO_BOX(SortingFileCombo), _("Descending comment"));
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"));
302
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Ascending title"));
303
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Descending title"));
304
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Ascending artist"));
305
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Descending artist"));
306
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Ascending album"));
307
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Descending album"));
308
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Ascending year"));
309
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Descending year"));
310
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Ascending genre"));
311
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Descending genre"));
312
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Ascending comment"));
313
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Descending comment"));
319
315
gtk_combo_box_set_active(GTK_COMBO_BOX(SortingFileCombo), SORTING_FILE_MODE);
320
gtk_tooltips_set_tip(Tips,EventBox,_("Select the type of file sorting "
321
"when loading a directory."),NULL);
316
gtk_widget_set_tooltip_text(EventBox,_("Select the type of file sorting "
317
"when loading a directory."));
323
319
SortingFileCaseSensitive = gtk_check_button_new_with_label(_("Case sensitive"));
324
#ifndef WIN32 /* Always true and not user modifiable on win32, as strncasecmp() doesn't work correctly with g_utf8_collate_key() */
321
/* Always true and not user modifiable on win32, as strncasecmp() does not
322
* work correctly with g_utf8_collate_key().
325
324
gtk_box_pack_start(GTK_BOX(hbox),SortingFileCaseSensitive,FALSE,FALSE,0);
325
#endif /* !G_OS_WIN32 */
327
326
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(SortingFileCaseSensitive),
328
327
SORTING_FILE_CASE_SENSITIVE);
329
gtk_tooltips_set_tip(Tips,SortingFileCaseSensitive,_("If activated, the "
330
"sorting of the list will be dependent on the case."),NULL);
328
gtk_widget_set_tooltip_text(SortingFileCaseSensitive,_("If activated, the "
329
"sorting of the list will be dependent on the case."));
332
331
/* Message Dialog Position */
333
332
Frame = gtk_frame_new (_("Message Dialog Position"));
383
382
gtk_list_store_clear(FilePlayerModel);
385
hbox = gtk_hbox_new(FALSE,2);
384
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,2);
386
385
gtk_container_add(GTK_CONTAINER(Frame),hbox);
387
386
gtk_container_set_border_width(GTK_CONTAINER(hbox), 4);
388
Label = gtk_label_new (_("Player to run :"));
387
Label = gtk_label_new (_("Player to run:"));
389
388
gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,0);
390
FilePlayerCombo = gtk_combo_box_entry_new_with_model(GTK_TREE_MODEL(FilePlayerModel), MISC_COMBO_TEXT);
389
FilePlayerCombo = gtk_combo_box_new_with_model_and_entry(GTK_TREE_MODEL(FilePlayerModel));
390
gtk_combo_box_set_entry_text_column(GTK_COMBO_BOX(FilePlayerCombo),MISC_COMBO_TEXT);
391
391
gtk_widget_set_size_request(GTK_WIDGET(FilePlayerCombo), 300, -1);
392
392
gtk_box_pack_start(GTK_BOX(hbox),FilePlayerCombo,FALSE,FALSE,0);
393
gtk_tooltips_set_tip(Tips,GTK_BIN(FilePlayerCombo)->child,_("Enter the program used to "
393
gtk_widget_set_tooltip_text(gtk_bin_get_child(GTK_BIN(FilePlayerCombo)),_("Enter the program used to "
394
394
"play the files. Some arguments can be passed for the program (as 'xmms -p') before "
395
"to receive files as other arguments."),NULL);
395
"to receive files as other arguments."));
397
397
Load_Audio_File_Player_List(FilePlayerModel, MISC_COMBO_TEXT);
398
398
Add_String_To_Combo_List(FilePlayerModel, AUDIO_FILE_PLAYER);
399
399
// Don't load the parameter if XMMS not found, else user can't save the preference
400
400
if ( (program_path=Check_If_Executable_Exists(AUDIO_FILE_PLAYER)))
401
gtk_entry_set_text(GTK_ENTRY(GTK_BIN(FilePlayerCombo)->child), AUDIO_FILE_PLAYER);
401
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(FilePlayerCombo))), AUDIO_FILE_PLAYER);
402
402
g_free(program_path);
405
405
Button = gtk_button_new_from_stock(GTK_STOCK_OPEN);
406
406
gtk_box_pack_start(GTK_BOX(hbox),Button,FALSE,FALSE,0);
407
407
g_signal_connect_swapped(G_OBJECT(Button),"clicked",
408
G_CALLBACK(File_Selection_Window_For_File), G_OBJECT(GTK_BIN(FilePlayerCombo)->child));
408
G_CALLBACK(File_Selection_Window_For_File), G_OBJECT(gtk_bin_get_child(GTK_BIN(FilePlayerCombo))));
410
410
/* Log options */
411
411
Frame = gtk_frame_new (_("Log Options"));
412
412
gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
413
vbox = gtk_vbox_new(FALSE,2);
413
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
414
414
gtk_container_add(GTK_CONTAINER(Frame),vbox);
415
415
gtk_container_set_border_width(GTK_CONTAINER(vbox), 2);
418
418
ShowLogView = gtk_check_button_new_with_label(_("Show log view in main window"));
419
419
gtk_box_pack_start(GTK_BOX(vbox),ShowLogView,FALSE,FALSE,0);
420
420
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ShowLogView),SHOW_LOG_VIEW);
421
gtk_tooltips_set_tip(Tips,ShowLogView,_("If activated, the log view would be "
422
"visible in the main window."),NULL);
421
gtk_widget_set_tooltip_text(ShowLogView,_("If activated, the log view would be "
422
"visible in the main window."));
424
424
// Max number of lines
425
hbox = gtk_hbox_new(FALSE,2);
425
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,2);
426
426
gtk_box_pack_start(GTK_BOX(vbox),hbox,FALSE,FALSE,0);
427
427
gtk_container_set_border_width(GTK_CONTAINER(hbox), 4);
428
Label = gtk_label_new (_("Max number of lines :"));
428
Label = gtk_label_new (_("Max number of lines:"));
429
429
gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,0);
431
LogMaxLinesSpinButton = gtk_spin_button_new((GtkAdjustment *)gtk_adjustment_new(2.0,2.0,6.0,1.0,1.0,1.0),1.0,0);
432
431
LogMaxLinesSpinButton = gtk_spin_button_new_with_range(10.0,1500.0,10.0);
433
432
gtk_box_pack_start(GTK_BOX(hbox),LogMaxLinesSpinButton,FALSE,FALSE,0);
434
433
gtk_spin_button_set_value(GTK_SPIN_BUTTON(LogMaxLinesSpinButton),(gfloat)LOG_MAX_LINES);
435
//g_signal_connect(G_OBJECT(NumberTrackFormated),"toggled",G_CALLBACK(Number_Track_Formated_Toggled),NULL);
436
//g_signal_emit_by_name(G_OBJECT(NumberTrackFormated),"toggled");
437
/* gtk_tooltips_set_tip(Tips,GTK_BIN(FilePlayerCombo)->child,_("Enter the program used to "
434
/* g_signal_connect(G_OBJECT(NumberTrackFormated),"toggled",G_CALLBACK(Number_Track_Formatted_Toggled),NULL);
435
* g_signal_emit_by_name(G_OBJECT(NumberTrackFormated),"toggled");
436
gtk_tooltips_set_tip(Tips,GTK_BIN(FilePlayerCombo)->child,_("Enter the program used to "
438
437
"play the files. Some arguments can be passed for the program (as 'xmms -p') before "
439
438
"to receive files as other arguments."),NULL);
457
456
/* File (name) Options */
458
457
Frame = gtk_frame_new (_("File Options"));
459
458
gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
460
vbox = gtk_vbox_new(FALSE,2);
459
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
461
460
gtk_container_add(GTK_CONTAINER(Frame),vbox);
462
461
gtk_container_set_border_width(GTK_CONTAINER(vbox), 2);
464
463
ReplaceIllegalCharactersInFilename = gtk_check_button_new_with_label(_("Replace illegal characters in filename (for Windows and CD-Rom)"));
465
464
gtk_box_pack_start(GTK_BOX(vbox),ReplaceIllegalCharactersInFilename,FALSE,FALSE,0);
466
465
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ReplaceIllegalCharactersInFilename),REPLACE_ILLEGAL_CHARACTERS_IN_FILENAME);
467
gtk_tooltips_set_tip(Tips,ReplaceIllegalCharactersInFilename,_("Convert illegal characters for "
466
gtk_widget_set_tooltip_text(ReplaceIllegalCharactersInFilename,_("Convert illegal characters for "
468
467
"FAT32/16 and ISO9660 + Joliet filesystems ('\\', ':', ';', '*', '?', '\"', '<', '>', '|') "
469
"of the filename to avoid problem when renaming the file. This is usefull when renaming the "
470
"file from the tag with the scanner."),NULL);
468
"of the filename to avoid problem when renaming the file. This is useful when renaming the "
469
"file from the tag with the scanner."));
472
hbox = gtk_hbox_new(FALSE,2);
471
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,2);
473
472
gtk_box_pack_start(GTK_BOX(vbox),hbox,FALSE,FALSE,0);
474
473
gtk_container_set_border_width(GTK_CONTAINER(hbox), 2);
475
474
/* Extension case (lower/upper?) */
476
Label = gtk_label_new(_("Convert filename extension to :"));
475
Label = gtk_label_new(_("Convert filename extension to:"));
477
476
gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,0);
479
478
FilenameExtensionLowerCase = gtk_radio_button_new_with_label(NULL,_("Lower Case"));
480
479
gtk_box_pack_start(GTK_BOX(hbox),FilenameExtensionLowerCase,FALSE,FALSE,2);
481
480
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FilenameExtensionLowerCase),FILENAME_EXTENSION_LOWER_CASE);
482
gtk_tooltips_set_tip(Tips,FilenameExtensionLowerCase,_("For example, the extension will be converted to '.mp3'"),NULL);
481
gtk_widget_set_tooltip_text(FilenameExtensionLowerCase,_("For example, the extension will be converted to '.mp3'"));
484
483
FilenameExtensionUpperCase = gtk_radio_button_new_with_label(
485
484
gtk_radio_button_get_group(GTK_RADIO_BUTTON(FilenameExtensionLowerCase)),_("Upper Case"));
486
485
gtk_box_pack_start(GTK_BOX(hbox),FilenameExtensionUpperCase,FALSE,FALSE,2);
487
486
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FilenameExtensionUpperCase),FILENAME_EXTENSION_UPPER_CASE);
488
gtk_tooltips_set_tip(Tips,FilenameExtensionUpperCase,_("For example, the extension will be converted to '.MP3'"),NULL);
487
gtk_widget_set_tooltip_text(FilenameExtensionUpperCase,_("For example, the extension will be converted to '.MP3'"));
490
489
FilenameExtensionNoChange = gtk_radio_button_new_with_label(
491
490
gtk_radio_button_get_group(GTK_RADIO_BUTTON(FilenameExtensionLowerCase)),_("No Change"));
492
491
gtk_box_pack_start(GTK_BOX(hbox),FilenameExtensionNoChange,FALSE,FALSE,2);
493
492
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FilenameExtensionNoChange),FILENAME_EXTENSION_NO_CHANGE);
494
gtk_tooltips_set_tip(Tips,FilenameExtensionNoChange,_("The extension will not be converted"),NULL);
493
gtk_widget_set_tooltip_text(FilenameExtensionNoChange,_("The extension will not be converted"));
496
495
/* Preserve modification time */
497
496
PreserveModificationTime = gtk_check_button_new_with_label(_("Preserve modification time of the file"));
498
497
gtk_box_pack_start(GTK_BOX(vbox),PreserveModificationTime,FALSE,FALSE,0);
499
498
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(PreserveModificationTime),PRESERVE_MODIFICATION_TIME);
500
gtk_tooltips_set_tip(Tips,PreserveModificationTime,_("Preserve the modification time "
501
"(in file properties) when saving the file."),NULL);
499
gtk_widget_set_tooltip_text(PreserveModificationTime,_("Preserve the modification time "
500
"(in file properties) when saving the file."));
503
502
/* Change directory modification time */
504
503
UpdateParentDirectoryModificationTime = gtk_check_button_new_with_label(_("Update modification time "
505
504
"of the parent directory of the file (recommended when using Amarok)"));
506
505
gtk_box_pack_start(GTK_BOX(vbox),UpdateParentDirectoryModificationTime,FALSE,FALSE,0);
507
506
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(UpdateParentDirectoryModificationTime),UPDATE_PARENT_DIRECTORY_MODIFICATION_TIME);
508
gtk_tooltips_set_tip(Tips,UpdateParentDirectoryModificationTime,_("The modification time "
507
gtk_widget_set_tooltip_text(UpdateParentDirectoryModificationTime,_("The modification time "
509
508
"of the parent directory of the file will be updated when saving tag the file. At the "
510
509
"present time it is automatically done only when renaming a file.\nThis feature is "
511
510
"interesting when using applications like Amarok. For performance reasons, they refresh "
512
"file informations by detecting changes of the parent directory."),NULL);
511
"file information by detecting changes of the parent directory."));
515
514
/* Character Set for File Name */
516
515
Frame = gtk_frame_new (_("Character Set for File Name"));
517
516
gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
518
vbox = gtk_vbox_new(FALSE,2);
517
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
519
518
gtk_container_add(GTK_CONTAINER(Frame),vbox);
520
519
gtk_container_set_border_width(GTK_CONTAINER(vbox), 2);
522
/****hbox = gtk_hbox_new(FALSE,2);
521
/****hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,2);
523
522
gtk_box_pack_start(GTK_BOX(vbox),hbox,FALSE,FALSE,0);
524
523
gtk_container_set_border_width(GTK_CONTAINER(hbox), 2);***/
537
536
Label = gtk_label_new(" ");
538
537
gtk_table_attach(GTK_TABLE(Table),Label,0,1,1,2,GTK_FILL,GTK_FILL,0,0);
540
FilenameCharacterSetOther = gtk_radio_button_new_with_label(NULL,_("Try an other "
539
FilenameCharacterSetOther = gtk_radio_button_new_with_label(NULL,_("Try another "
541
540
"character encoding"));
542
541
gtk_table_attach(GTK_TABLE(Table),FilenameCharacterSetOther,1,2,1,2,GTK_FILL,GTK_FILL,0,0);
543
542
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FilenameCharacterSetOther),FILENAME_CHARACTER_SET_OTHER);
544
gtk_tooltips_set_tip(Tips,FilenameCharacterSetOther,_("With this option, it will "
545
"try the conversion to the encoding associated to your locale (for example : "
543
gtk_widget_set_tooltip_text(FilenameCharacterSetOther,_("With this option, it will "
544
"try the conversion to the encoding associated to your locale (for example: "
546
545
"ISO-8859-1 for 'fr', KOI8-R for 'ru', ISO-8859-2 for 'ro'). If it fails, it "
547
"will try the character encoding ISO-8859-1."),NULL);
546
"will try the character encoding ISO-8859-1."));
549
548
FilenameCharacterSetApproximate = gtk_radio_button_new_with_label(
550
549
gtk_radio_button_get_group(GTK_RADIO_BUTTON(FilenameCharacterSetOther)),
551
550
_("Force using the system character encoding and activate the transliteration"));
552
551
gtk_table_attach(GTK_TABLE(Table),FilenameCharacterSetApproximate,1,2,2,3,GTK_FILL,GTK_FILL,0,0);
553
552
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FilenameCharacterSetApproximate),FILENAME_CHARACTER_SET_APPROXIMATE);
554
gtk_tooltips_set_tip(Tips,FilenameCharacterSetApproximate,_("With this option, when "
553
gtk_widget_set_tooltip_text(FilenameCharacterSetApproximate,_("With this option, when "
555
554
"a character cannot be represented in the target character set, it can be "
556
"approximated through one or several similarly looking characters."),NULL);
555
"approximated through one or several similarly looking characters."));
558
557
FilenameCharacterSetDiscard = gtk_radio_button_new_with_label(
559
558
gtk_radio_button_get_group(GTK_RADIO_BUTTON(FilenameCharacterSetOther)),
560
559
_("Force using the system character encoding and silently discard some characters"));
561
560
gtk_table_attach(GTK_TABLE(Table),FilenameCharacterSetDiscard,1,2,3,4,GTK_FILL,GTK_FILL,0,0);
562
561
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FilenameCharacterSetDiscard),FILENAME_CHARACTER_SET_DISCARD);
563
gtk_tooltips_set_tip(Tips,FilenameCharacterSetDiscard,_("With this option, when "
564
"a characters cannot be represented in the target character set, it will "
565
"be silently discarded."),NULL);
562
gtk_widget_set_tooltip_text(FilenameCharacterSetDiscard,_("With this option, when "
563
"a character cannot be represented in the target character set, it will "
564
"be silently discarded."));
574
573
gtk_notebook_append_page (GTK_NOTEBOOK(OptionsNoteBook),Frame,Label);
575
574
gtk_container_set_border_width(GTK_CONTAINER(Frame),5);
577
VBox = gtk_vbox_new(FALSE,2);
576
VBox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
578
577
gtk_container_add(GTK_CONTAINER(Frame),VBox);
579
578
gtk_container_set_border_width(GTK_CONTAINER(VBox),4);
581
580
/* Tag Options */
582
581
Frame = gtk_frame_new (_("Tag Options"));
583
582
gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
584
vbox = gtk_vbox_new(FALSE,2);
583
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
585
584
gtk_container_add(GTK_CONTAINER(Frame),vbox);
586
585
gtk_container_set_border_width(GTK_CONTAINER(vbox), 2);
588
587
DateAutoCompletion = gtk_check_button_new_with_label(_("Auto completion of date if not complete"));
589
588
gtk_box_pack_start(GTK_BOX(vbox),DateAutoCompletion,FALSE,FALSE,0);
590
589
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(DateAutoCompletion),DATE_AUTO_COMPLETION);
591
gtk_tooltips_set_tip(Tips,DateAutoCompletion,_("Try to complete the year field if you enter "
590
gtk_widget_set_tooltip_text(DateAutoCompletion,_("Try to complete the year field if you enter "
592
591
"only the last numerals of the date (for instance, if the current year is 2005: "
593
"5 => 2005, 4 => 2004, 6 => 1996, 95 => 1995, ...)."),NULL);
592
"5 => 2005, 4 => 2004, 6 => 1996, 95 => 1995…)."));
595
hbox = gtk_hbox_new(FALSE,0);
594
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,0);
596
595
gtk_box_pack_start(GTK_BOX(vbox),hbox,FALSE,FALSE,0);
598
NumberTrackFormated = gtk_check_button_new_with_label(_("Write the track field with the following number of digits :"));
597
NumberTrackFormated = gtk_check_button_new_with_label(_("Write the track field with the following number of digits:"));
599
598
gtk_box_pack_start(GTK_BOX(hbox),NumberTrackFormated,FALSE,FALSE,0);
600
599
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(NumberTrackFormated),NUMBER_TRACK_FORMATED);
601
gtk_tooltips_set_tip(Tips,NumberTrackFormated,_("If activated, the track field is written using "
602
"the number '0' as padding to obtain a number with 'n' digits (Ex. with two digits : '05', "
603
"'09', '10',...). Else it keeps the 'raw' track value."),NULL);
600
gtk_widget_set_tooltip_text(NumberTrackFormated,_("If activated, the track field is written using "
601
"the number '0' as padding to obtain a number with 'n' digits (for example, with two digits: '05', "
602
"'09', '10'…). Else it keeps the 'raw' track value."));
605
NumberTrackFormatedSpinButton = gtk_spin_button_new((GtkAdjustment *)gtk_adjustment_new(2.0,2.0,6.0,1.0,1.0,1.0),1.0,0);
604
NumberTrackFormatedSpinButton = gtk_spin_button_new_with_range(2.0,6.0,1.0);
606
605
gtk_box_pack_start(GTK_BOX(hbox),NumberTrackFormatedSpinButton,FALSE,FALSE,0);
607
606
gtk_spin_button_set_value(GTK_SPIN_BUTTON(NumberTrackFormatedSpinButton),(gfloat)NUMBER_TRACK_FORMATED_SPIN_BUTTON);
608
g_signal_connect(G_OBJECT(NumberTrackFormated),"toggled",G_CALLBACK(Number_Track_Formated_Toggled),NULL);
607
g_signal_connect(G_OBJECT(NumberTrackFormated),"toggled",G_CALLBACK(Number_Track_Formatted_Toggled),NULL);
609
608
g_signal_emit_by_name(G_OBJECT(NumberTrackFormated),"toggled");
611
610
Label = gtk_label_new(""); // Label to show the example
612
611
gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,4);
613
g_signal_connect_swapped(G_OBJECT(NumberTrackFormatedSpinButton),"changed",G_CALLBACK(Number_Track_Formated_Spin_Button_Changed),G_OBJECT(Label));
612
g_signal_connect_swapped(G_OBJECT(NumberTrackFormatedSpinButton),"changed",G_CALLBACK(Number_Track_Formatted_Spin_Button_Changed),G_OBJECT(Label));
614
613
g_signal_emit_by_name(G_OBJECT(NumberTrackFormatedSpinButton),"changed",NULL);
616
OggTagWriteXmmsComment = gtk_check_button_new_with_label(_("Ogg Vorbis Files : Write also the comment to the XMMS format"));
615
OggTagWriteXmmsComment = gtk_check_button_new_with_label(_("Ogg Vorbis Files: write also the comment in the XMMS format"));
617
616
gtk_box_pack_start(GTK_BOX(vbox),OggTagWriteXmmsComment,FALSE,FALSE,0);
618
617
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(OggTagWriteXmmsComment),OGG_TAG_WRITE_XMMS_COMMENT);
619
gtk_tooltips_set_tip(Tips,OggTagWriteXmmsComment,_("XMMS doesn't make use of the right way to "
618
gtk_widget_set_tooltip_text(OggTagWriteXmmsComment,_("XMMS doesn't make use of the right way to "
620
619
"identify a comment in Ogg Vorbis files as other apps do. In fact, this field is usually labeled "
621
620
"with 'comment=', whereas XMMS uses only `='. Please, uncheck this option if you don't want "
622
"other apps to complain about an unknown field. Comments won't be shown in XMMS, though."),NULL);
621
"other apps to complain about an unknown field. Comments won't be shown in XMMS, though."));
624
623
// Separator line
625
Separator = gtk_hseparator_new();
624
Separator = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL);
626
625
gtk_box_pack_start(GTK_BOX(vbox),Separator,FALSE,FALSE,0);
628
627
/* Tag field focus */
647
646
SetFocusToFirstTagField = gtk_radio_button_new_with_label(
648
647
gtk_radio_button_get_group(GTK_RADIO_BUTTON(SetFocusToSameTagField)),
649
_("Return focus to the first tag field (ie 'Title' field)"));
648
_("Return focus to the first tag field (i.e. 'Title' field)"));
650
649
gtk_table_attach(GTK_TABLE(Table),SetFocusToFirstTagField,1,2,2,3,GTK_FILL,GTK_FILL,0,0);
651
650
//gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(SetFocusToFirstTagField),SET_FOCUS_TO_FIRST_TAG_FIELD);
653
Frame = gtk_frame_new (_("Tag Splitting"));
654
gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
656
Table = gtk_table_new(5,2,FALSE);
657
gtk_container_add(GTK_CONTAINER(Frame),Table);
658
gtk_table_set_col_spacings(GTK_TABLE(Table),2);
660
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);
662
gtk_misc_set_alignment(GTK_MISC(Label),0,0.5);
664
VorbisSplitFieldTitle = gtk_check_button_new_with_label(_("Title"));
665
VorbisSplitFieldArtist = gtk_check_button_new_with_label(_("Artist"));
666
VorbisSplitFieldAlbum = gtk_check_button_new_with_label(_("Album"));
667
VorbisSplitFieldGenre = gtk_check_button_new_with_label(_("Genre"));
668
VorbisSplitFieldComment = gtk_check_button_new_with_label(_("Comment"));
669
VorbisSplitFieldComposer = gtk_check_button_new_with_label(_("Composer"));
670
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);
680
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(VorbisSplitFieldTitle), VORBIS_SPLIT_FIELD_TITLE);
681
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(VorbisSplitFieldArtist), VORBIS_SPLIT_FIELD_ARTIST);
682
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(VorbisSplitFieldAlbum), VORBIS_SPLIT_FIELD_ALBUM);
683
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(VorbisSplitFieldGenre), VORBIS_SPLIT_FIELD_GENRE);
684
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(VorbisSplitFieldComment), VORBIS_SPLIT_FIELD_COMMENT);
685
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(VorbisSplitFieldComposer), VORBIS_SPLIT_FIELD_COMPOSER);
686
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(VorbisSplitFieldOrigArtist), VORBIS_SPLIT_FIELD_ORIG_ARTIST);
655
689
* ID3 Tag Settings
682
716
WriteId3TagsInFlacFiles = gtk_check_button_new_with_label(_("Write ID3 tags in FLAC files (in addition to FLAC tag)"));
683
717
gtk_table_attach(GTK_TABLE(Table),WriteId3TagsInFlacFiles,0,1,0,1,GTK_FILL,GTK_FILL,0,0);
684
718
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(WriteId3TagsInFlacFiles),WRITE_ID3_TAGS_IN_FLAC_FILE);
685
gtk_tooltips_set_tip(Tips,WriteId3TagsInFlacFiles,_("If activated, ID3 tags will be "
719
gtk_widget_set_tooltip_text(WriteId3TagsInFlacFiles,_("If activated, ID3 tags will be "
686
720
"also added in the FLAC file (according the two rules above, plus the FLAC tag). "
687
"Else ID3 tags will be stripped."),NULL);
721
"Else ID3 tags will be stripped."));
689
723
/* Strip tag when fields (managed by EasyTAG) are empty */
690
724
StripTagWhenEmptyFields = gtk_check_button_new_with_label(_("Strip tags if all fields are set to blank"));
691
725
gtk_table_attach(GTK_TABLE(Table),StripTagWhenEmptyFields,0,1,1,2,GTK_FILL,GTK_FILL,0,0);
692
726
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(StripTagWhenEmptyFields),STRIP_TAG_WHEN_EMPTY_FIELDS);
693
gtk_tooltips_set_tip(Tips,StripTagWhenEmptyFields,_("As ID3v2 tags may contain other data than "
694
"Title, Artist, Album, Year, Track, Genre or Comment (as an attached picture, lyrics, ...), "
727
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
729
"this option allows you to strip the whole tag when these seven standard data fields have "
696
"been set to blank."),NULL);
730
"been set to blank."));
698
732
/* Convert old ID3v2 tag version */
699
733
ConvertOldId3v2TagVersion = gtk_check_button_new_with_label(_("Automatically convert old ID3v2 tag versions"));
700
734
gtk_table_attach(GTK_TABLE(Table),ConvertOldId3v2TagVersion,0,1,2,3,GTK_FILL,GTK_FILL,0,0);
701
735
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ConvertOldId3v2TagVersion),CONVERT_OLD_ID3V2_TAG_VERSION);
702
gtk_tooltips_set_tip(Tips,ConvertOldId3v2TagVersion,_("If activated, an old ID3v2 tag version (as "
703
"ID3v2.2) will be updated to the ID3v2.3 version."),NULL);
736
gtk_widget_set_tooltip_text(ConvertOldId3v2TagVersion,_("If activated, an old ID3v2 tag version (as "
737
"ID3v2.2) will be updated to the ID3v2.3 version."));
706
740
FileWritingId3v2UseCrc32 = gtk_check_button_new_with_label(_("Use CRC32"));
707
741
gtk_table_attach(GTK_TABLE(Table),FileWritingId3v2UseCrc32,1,2,0,1,GTK_FILL,GTK_FILL,0,0);
708
742
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FileWritingId3v2UseCrc32),FILE_WRITING_ID3V2_USE_CRC32);
709
gtk_tooltips_set_tip(Tips,FileWritingId3v2UseCrc32,_("Set CRC32 in the ID3v2 tags"),NULL);
743
gtk_widget_set_tooltip_text(FileWritingId3v2UseCrc32,_("Set CRC32 in the ID3v2 tags"));
711
745
/* Use Compression */
712
746
FileWritingId3v2UseCompression = gtk_check_button_new_with_label(_("Use Compression"));
713
747
gtk_table_attach(GTK_TABLE(Table),FileWritingId3v2UseCompression,1,2,1,2,GTK_FILL,GTK_FILL,0,0);
714
748
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FileWritingId3v2UseCompression),FILE_WRITING_ID3V2_USE_COMPRESSION);
715
gtk_tooltips_set_tip(Tips,FileWritingId3v2UseCompression,_("Set Compression in the ID3v2 tags"),NULL);
749
gtk_widget_set_tooltip_text(FileWritingId3v2UseCompression,_("Set Compression in the ID3v2 tags"));
717
751
/* Write Genre in text */
718
752
FileWritingId3v2TextOnlyGenre = gtk_check_button_new_with_label(_("Write Genre in text only"));
719
753
gtk_table_attach(GTK_TABLE(Table),FileWritingId3v2TextOnlyGenre,1,2,2,3,GTK_FILL,GTK_FILL,0,0);
720
754
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FileWritingId3v2TextOnlyGenre),FILE_WRITING_ID3V2_TEXT_ONLY_GENRE);
721
gtk_tooltips_set_tip(Tips,FileWritingId3v2TextOnlyGenre,_("Don't use ID3v1 number references in genre tag. Enable this if you see numbers as genre in your music player."),NULL);
755
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."));
723
757
/* Character Set for writing ID3 tag */
724
758
Frame = gtk_frame_new (_("Character Set for writing ID3 tags"));
725
759
gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
726
id3v1v2hbox = gtk_hbox_new(FALSE,3);
760
id3v1v2hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,3);
727
761
gtk_container_add(GTK_CONTAINER(Frame),id3v1v2hbox);
728
762
gtk_container_set_border_width(GTK_CONTAINER(id3v1v2hbox), 2);
756
790
gtk_misc_set_alignment(GTK_MISC(LabelId3v2Version),0,0.5);
758
792
EventBox = gtk_event_box_new();
759
FileWritingId3v2VersionCombo = gtk_combo_box_new_text();
793
FileWritingId3v2VersionCombo = gtk_combo_box_text_new();
760
794
gtk_container_add(GTK_CONTAINER(EventBox),FileWritingId3v2VersionCombo);
761
gtk_tooltips_set_tip(Tips,EventBox,_("Select the ID3v2 tag version to write:\n"
795
gtk_widget_set_tooltip_text(EventBox,_("Select the ID3v2 tag version to write:\n"
762
796
" - ID3v2.3 is written using id3lib,\n"
763
" - ID3v2.4 is written using libid3tag (recommended)."),NULL);
764
gtk_combo_box_append_text(GTK_COMBO_BOX(FileWritingId3v2VersionCombo), "ID3v2.4");
765
gtk_combo_box_append_text(GTK_COMBO_BOX(FileWritingId3v2VersionCombo), "ID3v2.3");
797
" - ID3v2.4 is written using libid3tag (recommended)."));
798
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(FileWritingId3v2VersionCombo), "ID3v2.4");
799
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(FileWritingId3v2VersionCombo), "ID3v2.3");
766
800
gtk_combo_box_set_active(GTK_COMBO_BOX(FileWritingId3v2VersionCombo),
767
801
FILE_WRITING_ID3V2_VERSION_4 ? 0 : 1);
768
802
gtk_table_attach(GTK_TABLE(Table),EventBox,2,4,1,2,GTK_FILL,GTK_FILL,0,0);
786
820
gtk_table_attach(GTK_TABLE(Table),FileWritingId3v2UseUnicodeCharacterSet,1,2,3,4,GTK_FILL,GTK_FILL,0,0);
788
822
EventBox = gtk_event_box_new();
789
FileWritingId3v2UnicodeCharacterSetCombo = gtk_combo_box_new_text();
823
FileWritingId3v2UnicodeCharacterSetCombo = gtk_combo_box_text_new();
790
824
gtk_container_add(GTK_CONTAINER(EventBox),FileWritingId3v2UnicodeCharacterSetCombo);
791
gtk_tooltips_set_tip(Tips,EventBox,_("Unicode type to use"),NULL);
792
gtk_combo_box_append_text(GTK_COMBO_BOX(FileWritingId3v2UnicodeCharacterSetCombo), "UTF-8");
793
gtk_combo_box_append_text(GTK_COMBO_BOX(FileWritingId3v2UnicodeCharacterSetCombo), "UTF-16");
825
gtk_widget_set_tooltip_text(EventBox,_("Unicode type to use"));
826
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(FileWritingId3v2UnicodeCharacterSetCombo), "UTF-8");
827
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(FileWritingId3v2UnicodeCharacterSetCombo), "UTF-16");
794
828
if ( FILE_WRITING_ID3V2_UNICODE_CHARACTER_SET == NULL )
795
829
gtk_combo_box_set_active(GTK_COMBO_BOX(FileWritingId3v2UnicodeCharacterSetCombo), 0); // Set UTF-8 by default
830
864
gtk_table_attach(GTK_TABLE(Table),FileWritingId3v2IconvOptionsNo,2,3,6,7,GTK_FILL,GTK_FILL,0,0);
831
865
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FileWritingId3v2IconvOptionsNo),FILE_WRITING_ID3V2_ICONV_OPTIONS_NO);
832
gtk_tooltips_set_tip(Tips,FileWritingId3v2IconvOptionsNo,_("With this option, when "
866
gtk_widget_set_tooltip_text(FileWritingId3v2IconvOptionsNo,_("With this option, when "
833
867
"a character cannot be represented in the target character set, it isn't changed. "
834
"But note that an error message will be displayed for information."),NULL);
868
"But note that an error message will be displayed for information."));
835
869
FileWritingId3v2IconvOptionsTranslit = gtk_radio_button_new_with_label(
836
870
gtk_radio_button_get_group(GTK_RADIO_BUTTON(FileWritingId3v2IconvOptionsNo)),
837
871
_("//TRANSLIT"));
838
872
gtk_table_attach(GTK_TABLE(Table),FileWritingId3v2IconvOptionsTranslit,3,4,6,7,GTK_FILL,GTK_FILL,0,0);
839
873
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FileWritingId3v2IconvOptionsTranslit),FILE_WRITING_ID3V2_ICONV_OPTIONS_TRANSLIT);
840
gtk_tooltips_set_tip(Tips,FileWritingId3v2IconvOptionsTranslit,_("With this option, when "
874
gtk_widget_set_tooltip_text(FileWritingId3v2IconvOptionsTranslit,_("With this option, when "
841
875
"a character cannot be represented in the target character set, it can be "
842
"approximated through one or several similarly looking characters."),NULL);
876
"approximated through one or several similarly looking characters."));
844
878
FileWritingId3v2IconvOptionsIgnore = gtk_radio_button_new_with_label(
845
879
gtk_radio_button_get_group(GTK_RADIO_BUTTON(FileWritingId3v2IconvOptionsNo)),
847
881
gtk_table_attach(GTK_TABLE(Table),FileWritingId3v2IconvOptionsIgnore,4,5,6,7,GTK_FILL,GTK_FILL,0,0);
848
882
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FileWritingId3v2IconvOptionsIgnore),FILE_WRITING_ID3V2_ICONV_OPTIONS_IGNORE);
849
gtk_tooltips_set_tip(Tips,FileWritingId3v2IconvOptionsIgnore,_("With this option, when "
850
"a characters cannot be represented in the target character set, it will "
851
"be silently discarded."),NULL);
883
gtk_widget_set_tooltip_text(FileWritingId3v2IconvOptionsIgnore,_("With this option, when "
884
"a character cannot be represented in the target character set, it will "
885
"be silently discarded."));
854
888
Frame = gtk_frame_new (_("ID3v1 tags"));
855
889
gtk_box_pack_start(GTK_BOX(id3v1v2hbox),Frame,FALSE,FALSE,2);
857
vbox = gtk_vbox_new(FALSE,2);
891
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
858
892
gtk_container_add(GTK_CONTAINER(Frame),vbox);
859
893
gtk_container_set_border_width(GTK_CONTAINER(vbox),2);
899
933
gtk_table_attach(GTK_TABLE(Table),FileWritingId3v1IconvOptionsNo,1,2,4,5,GTK_FILL,GTK_FILL,0,0);
900
934
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FileWritingId3v1IconvOptionsNo),FILE_WRITING_ID3V1_ICONV_OPTIONS_NO);
901
gtk_tooltips_set_tip(Tips,FileWritingId3v1IconvOptionsNo,_("With this option, when "
935
gtk_widget_set_tooltip_text(FileWritingId3v1IconvOptionsNo,_("With this option, when "
902
936
"a character cannot be represented in the target character set, it isn't changed. "
903
"But note that an error message will be displayed for information."),NULL);
937
"But note that an error message will be displayed for information."));
904
938
FileWritingId3v1IconvOptionsTranslit = gtk_radio_button_new_with_label(
905
939
gtk_radio_button_get_group(GTK_RADIO_BUTTON(FileWritingId3v1IconvOptionsNo)),
906
940
_("//TRANSLIT"));
907
941
gtk_table_attach(GTK_TABLE(Table),FileWritingId3v1IconvOptionsTranslit,2,3,4,5,GTK_FILL,GTK_FILL,0,0);
908
942
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FileWritingId3v1IconvOptionsTranslit),FILE_WRITING_ID3V1_ICONV_OPTIONS_TRANSLIT);
909
gtk_tooltips_set_tip(Tips,FileWritingId3v1IconvOptionsTranslit,_("With this option, when "
943
gtk_widget_set_tooltip_text(FileWritingId3v1IconvOptionsTranslit,_("With this option, when "
910
944
"a character cannot be represented in the target character set, it can be "
911
"approximated through one or several similarly looking characters."),NULL);
945
"approximated through one or several similarly looking characters."));
913
947
FileWritingId3v1IconvOptionsIgnore = gtk_radio_button_new_with_label(
914
948
gtk_radio_button_get_group(GTK_RADIO_BUTTON(FileWritingId3v1IconvOptionsNo)),
916
950
gtk_table_attach(GTK_TABLE(Table),FileWritingId3v1IconvOptionsIgnore,3,4,4,5,GTK_FILL,GTK_FILL,0,0);
917
951
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FileWritingId3v1IconvOptionsIgnore),FILE_WRITING_ID3V1_ICONV_OPTIONS_IGNORE);
918
gtk_tooltips_set_tip(Tips,FileWritingId3v1IconvOptionsIgnore,_("With this option, when "
919
"a characters cannot be represented in the target character set, it will "
920
"be silently discarded."),NULL);
952
gtk_widget_set_tooltip_text(FileWritingId3v1IconvOptionsIgnore,_("With this option, when "
953
"a character cannot be represented in the target character set, it will "
954
"be silently discarded."));
922
956
/* Character Set for reading tag */
923
957
Frame = gtk_frame_new (_("Character Set for reading ID3 tags"));
924
958
gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
925
vbox = gtk_vbox_new(FALSE,2);
959
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
926
960
gtk_container_add(GTK_CONTAINER(Frame),vbox);
927
961
gtk_container_set_border_width(GTK_CONTAINER(vbox), 2);
935
969
// "File Reading Charset" Check Button + Combo
936
970
UseNonStandardId3ReadingCharacterSet = gtk_check_button_new_with_label(_(
938
972
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(UseNonStandardId3ReadingCharacterSet),
939
973
USE_NON_STANDARD_ID3_READING_CHARACTER_SET);
940
974
gtk_table_attach(GTK_TABLE(Table),UseNonStandardId3ReadingCharacterSet,0,1,0,1,GTK_FILL,GTK_FILL,0,0);
941
gtk_tooltips_set_tip(Tips,UseNonStandardId3ReadingCharacterSet,
975
gtk_widget_set_tooltip_text(UseNonStandardId3ReadingCharacterSet,
942
976
_("This character set will be used when reading the tag data, to convert "
943
977
"each string found in an ISO-8859-1 field in the tag (for ID3v2 or/and ID3v1 tag).\n"
946
" - in previous versions of EasyTAG, you can save UTF-8 strings in an ISO-8859-1 "
947
"field. This is not correct! To convert these tags to Unicode: activate this option "
980
" - In previous versions of EasyTAG, you could save UTF-8 strings in an ISO-8859-1 "
981
"field. This is not correct. To convert these tags to Unicode: activate this option "
948
982
"and select UTF-8. You must also activate above the option 'Try to save tags to "
949
983
"ISO-8859-1. If it isn't possible then use UNICODE (recommended)' or 'Always save "
950
984
"tags to UNICODE character set'.\n"
951
" - If unicode was not used, Russian people can select the character set "
985
" - If Unicode was not used, Russian people can select the character set "
952
986
"'Windows-1251' to load tags written under Windows. And 'KOI8-R' to load tags "
953
"written under Unix systems."),NULL);
987
"written under Unix systems."));
955
989
EventBox = gtk_event_box_new();
956
FileReadingId3v1v2CharacterSetCombo = gtk_combo_box_new_text();
990
FileReadingId3v1v2CharacterSetCombo = gtk_combo_box_text_new();
957
991
gtk_container_add(GTK_CONTAINER(EventBox),FileReadingId3v1v2CharacterSetCombo);
958
992
gtk_table_attach(GTK_TABLE(Table),EventBox,2,3,0,1,GTK_FILL,GTK_FILL,0,0);
960
gtk_tooltips_set_tip(Tips,EventBox,_("Character set used to read tag data "
961
"in the file."),NULL);
994
gtk_widget_set_tooltip_text(EventBox,_("Character set used to read tag data "
963
997
Charset_Populate_Combobox(GTK_COMBO_BOX(FileReadingId3v1v2CharacterSetCombo),
964
998
FILE_READING_ID3V1V2_CHARACTER_SET);
1005
1039
FTS_CONVERT_UNDERSCORE_AND_P20_INTO_SPACE);
1006
1040
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FTSConvertSpaceIntoUnderscore),
1007
1041
FTS_CONVERT_SPACE_INTO_UNDERSCORE);
1008
gtk_tooltips_set_tip(Tips,FTSConvertUnderscoreAndP20IntoSpace,_("If activated, this conversion "
1009
"will be used when applying a mask from the scanner for tags."),NULL);
1010
gtk_tooltips_set_tip(Tips,FTSConvertSpaceIntoUnderscore,_("If activated, this conversion "
1011
"will be used when applying a mask from the scanner for tags."),NULL);
1042
gtk_widget_set_tooltip_text(FTSConvertUnderscoreAndP20IntoSpace,_("If activated, this conversion "
1043
"will be used when applying a mask from the scanner for tags."));
1044
gtk_widget_set_tooltip_text(FTSConvertSpaceIntoUnderscore,_("If activated, this conversion "
1045
"will be used when applying a mask from the scanner for tags."));
1013
1047
/* Character conversion for the 'Rename File' scanner (=> RFS...) */
1014
1048
Frame = gtk_frame_new (_("Rename File Scanner - Character Conversion"));
1015
1049
gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
1016
vbox = gtk_vbox_new(FALSE,2);
1050
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
1017
1051
gtk_container_add(GTK_CONTAINER(Frame),vbox);
1018
1052
gtk_container_set_border_width(GTK_CONTAINER(vbox),2);
1020
RFSConvertUnderscoreAndP20IntoSpace = gtk_check_button_new_with_label(_("Convert underscore "
1021
"character '_' and string '%20' to space ' '"));
1022
RFSConvertSpaceIntoUnderscore = gtk_check_button_new_with_label(_("Convert space ' ' to underscore '_'"));
1053
RFSConvertUnderscoreAndP20IntoSpace = gtk_radio_button_new_with_label(NULL, _("Convert underscore " "character '_' and string '%20' to space ' '"));
1054
RFSConvertSpaceIntoUnderscore = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(RFSConvertUnderscoreAndP20IntoSpace), _("Convert space ' ' to underscore '_'"));
1055
RFSRemoveSpaces = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(RFSConvertUnderscoreAndP20IntoSpace), _("Remove spaces"));
1023
1056
gtk_box_pack_start(GTK_BOX(vbox),RFSConvertUnderscoreAndP20IntoSpace,FALSE,FALSE,0);
1024
1057
gtk_box_pack_start(GTK_BOX(vbox),RFSConvertSpaceIntoUnderscore, FALSE,FALSE,0);
1025
g_signal_connect_swapped(G_OBJECT(RFSConvertUnderscoreAndP20IntoSpace),"toggled",
1026
G_CALLBACK(Scanner_Convert_Check_Button_Toggled_1),G_OBJECT(RFSConvertSpaceIntoUnderscore));
1027
g_signal_connect_swapped(G_OBJECT(RFSConvertSpaceIntoUnderscore),"toggled",
1028
G_CALLBACK(Scanner_Convert_Check_Button_Toggled_1),G_OBJECT(RFSConvertUnderscoreAndP20IntoSpace));
1058
gtk_box_pack_start(GTK_BOX(vbox),RFSRemoveSpaces, FALSE,FALSE,0);
1030
1059
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(RFSConvertUnderscoreAndP20IntoSpace),
1031
1060
RFS_CONVERT_UNDERSCORE_AND_P20_INTO_SPACE);
1032
1061
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(RFSConvertSpaceIntoUnderscore),
1033
1062
RFS_CONVERT_SPACE_INTO_UNDERSCORE);
1034
gtk_tooltips_set_tip(Tips,RFSConvertUnderscoreAndP20IntoSpace,_("If activated, this conversion "
1035
"will be used when applying a mask from the scanner for filenames."),NULL);
1036
gtk_tooltips_set_tip(Tips,RFSConvertSpaceIntoUnderscore,_("If activated, this conversion "
1037
"will be used when applying a mask from the scanner for filenames."),NULL);
1063
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(RFSRemoveSpaces),
1065
gtk_widget_set_tooltip_text(RFSConvertUnderscoreAndP20IntoSpace,_("If activated, this conversion "
1066
"will be used when applying a mask from the scanner for filenames."));
1067
gtk_widget_set_tooltip_text(RFSConvertSpaceIntoUnderscore,_("If activated, this conversion "
1068
"will be used when applying a mask from the scanner for filenames."));
1069
gtk_widget_set_tooltip_text(RFSRemoveSpaces,_("If activated, this conversion " "will be used when applying a mask from the scanner for filenames."));
1039
1071
/* Character conversion for the 'Process Fields' scanner (=> PFS...) */
1040
1072
Frame = gtk_frame_new (_("Process Fields Scanner - Character Conversion"));
1041
1073
gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
1042
vbox = gtk_vbox_new(FALSE,2);
1074
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
1043
1075
gtk_container_add(GTK_CONTAINER(Frame),vbox);
1044
1076
gtk_container_set_border_width(GTK_CONTAINER(vbox),2);
1048
1080
"first letter of words for some prepositions and articles."));
1049
1081
gtk_box_pack_start(GTK_BOX(vbox),PFSDontUpperSomeWords, FALSE, FALSE, 0);
1050
1082
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(PFSDontUpperSomeWords), PFS_DONT_UPPER_SOME_WORDS);
1051
gtk_tooltips_set_tip(Tips, PFSDontUpperSomeWords, _("Don't convert first "
1052
"letter of the words like prepositions, articles and words like feat., "
1083
gtk_widget_set_tooltip_text(PFSDontUpperSomeWords, _("Don't convert first "
1084
"letter of words like prepositions, articles and words like feat., "
1053
1085
"when using the scanner 'First letter uppercase of each word' (for "
1054
"example, you will obtain 'Text in an Entry' instead of 'Text In An Entry')."), NULL);
1086
"example, you will obtain 'Text in an Entry' instead of 'Text In An Entry')."));
1056
1088
/* Properties of the scanner window */
1057
1089
Frame = gtk_frame_new (_("Scanner Window"));
1058
1090
gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
1059
vbox = gtk_vbox_new(FALSE,2);
1091
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
1060
1092
gtk_container_add(GTK_CONTAINER(Frame),vbox);
1061
1093
gtk_container_set_border_width(GTK_CONTAINER(vbox), 2);
1063
1095
OpenScannerWindowOnStartup = gtk_check_button_new_with_label(_("Open the Scanner Window on startup"));
1064
1096
gtk_box_pack_start(GTK_BOX(vbox),OpenScannerWindowOnStartup,FALSE,FALSE,0);
1065
1097
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(OpenScannerWindowOnStartup),OPEN_SCANNER_WINDOW_ON_STARTUP);
1066
gtk_tooltips_set_tip(Tips,OpenScannerWindowOnStartup,_("Activate this option to open automatically "
1067
"the scanner window when EasyTAG starts."),NULL);
1098
gtk_widget_set_tooltip_text(OpenScannerWindowOnStartup,_("Activate this option to open automatically "
1099
"the scanner window when EasyTAG starts."));
1069
1101
ScannerWindowOnTop = gtk_check_button_new_with_label(_("Scanner window always on top"));
1070
1102
gtk_box_pack_start(GTK_BOX(vbox),ScannerWindowOnTop,FALSE,FALSE,0);
1071
1103
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ScannerWindowOnTop),SCANNER_WINDOW_ON_TOP);
1072
gtk_tooltips_set_tip(Tips,ScannerWindowOnTop,_("If activated, the window which contains the masks "
1073
"will stay always over the main window."),NULL);
1104
gtk_widget_set_tooltip_text(ScannerWindowOnTop,_("If activated, the window which contains the masks "
1105
"will stay always over the main window."));
1076
1108
/* Other options */
1077
1109
Frame = gtk_frame_new (_("Fields"));
1078
1110
gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
1079
vbox = gtk_vbox_new(FALSE,2);
1111
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
1080
1112
gtk_container_add(GTK_CONTAINER(Frame),vbox);
1081
1113
gtk_container_set_border_width(GTK_CONTAINER(vbox), 2);
1083
1115
// Overwrite text into tag fields
1084
OverwriteTagField = gtk_check_button_new_with_label(_("Overwrite fields when scanning tag"));
1116
OverwriteTagField = gtk_check_button_new_with_label(_("Overwrite fields when scanning tags"));
1085
1117
gtk_box_pack_start(GTK_BOX(vbox),OverwriteTagField,FALSE,FALSE,0);
1086
1118
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(OverwriteTagField),OVERWRITE_TAG_FIELD);
1087
gtk_tooltips_set_tip(Tips,OverwriteTagField,_("If activated, the scanner will replace existing text "
1088
"in fields by the new one. If deactivated, only blank fields of the tag will be filled."),NULL);
1119
gtk_widget_set_tooltip_text(OverwriteTagField,_("If activated, the scanner will replace existing text "
1120
"in fields by the new one. If deactivated, only blank fields of the tag will be filled."));
1090
1122
// Set a default comment text or CRC-32 checksum
1091
1123
if (!DefaultCommentModel)
1094
1126
gtk_list_store_clear(DefaultCommentModel);
1096
hbox = gtk_hbox_new(FALSE,2);
1128
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,2);
1097
1129
gtk_box_pack_start(GTK_BOX(vbox),hbox,FALSE,FALSE,0);
1098
SetDefaultComment = gtk_check_button_new_with_label(_("Set this text as default comment :"));
1130
SetDefaultComment = gtk_check_button_new_with_label(_("Set this text as default comment:"));
1099
1131
gtk_box_pack_start(GTK_BOX(hbox),SetDefaultComment,FALSE,FALSE,0);
1100
1132
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(SetDefaultComment),SET_DEFAULT_COMMENT);
1101
gtk_tooltips_set_tip(Tips,SetDefaultComment,_("Activate this option if you want to put the "
1102
"following string into the comment field when using the 'Fill Tag' scanner."),NULL);
1103
DefaultComment = gtk_combo_box_entry_new_with_model(GTK_TREE_MODEL(DefaultCommentModel), MISC_COMBO_TEXT);
1133
gtk_widget_set_tooltip_text(SetDefaultComment,_("Activate this option if you want to put the "
1134
"following string into the comment field when using the 'Fill Tag' scanner."));
1135
DefaultComment = gtk_combo_box_new_with_model_and_entry(GTK_TREE_MODEL(DefaultCommentModel));
1136
gtk_combo_box_set_entry_text_column(GTK_COMBO_BOX(DefaultComment),MISC_COMBO_TEXT);
1104
1137
gtk_box_pack_start(GTK_BOX(hbox),DefaultComment,FALSE,FALSE,0);
1105
1138
gtk_widget_set_size_request(GTK_WIDGET(DefaultComment), 250, -1);
1106
1139
g_signal_connect(G_OBJECT(SetDefaultComment),"toggled",
1112
1145
Load_Default_Tag_Comment_Text_List(DefaultCommentModel, MISC_COMBO_TEXT);
1113
1146
Add_String_To_Combo_List(DefaultCommentModel, DEFAULT_COMMENT);
1114
1147
if (DEFAULT_COMMENT)
1115
gtk_entry_set_text(GTK_ENTRY(GTK_BIN(DefaultComment)->child), DEFAULT_COMMENT);
1148
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(DefaultComment))), DEFAULT_COMMENT);
1117
1150
// CRC32 comment
1118
1151
Crc32Comment = gtk_check_button_new_with_label(_("Use CRC32 as the default "
1119
1152
"comment (for files with ID3 tags only)."));
1120
1153
gtk_box_pack_start(GTK_BOX(vbox),Crc32Comment,FALSE,FALSE,0);
1121
1154
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(Crc32Comment),SET_CRC32_COMMENT);
1122
gtk_tooltips_set_tip(Tips,Crc32Comment,_("Calculates the CRC-32 value of the file "
1123
"and writes it into the comment field when using the 'Fill Tag' scanner."),NULL);
1155
gtk_widget_set_tooltip_text(Crc32Comment,_("Calculates the CRC-32 value of the file "
1156
"and writes it into the comment field when using the 'Fill Tag' scanner."));
1124
1157
g_signal_connect_swapped(G_OBJECT(SetDefaultComment), "toggled",
1125
1158
G_CALLBACK(Scanner_Convert_Check_Button_Toggled_1),G_OBJECT(Crc32Comment));
1126
1159
g_signal_connect_swapped(G_OBJECT(Crc32Comment), "toggled",
1135
1168
gtk_notebook_append_page (GTK_NOTEBOOK(OptionsNoteBook),Frame,Label);
1136
1169
gtk_container_set_border_width(GTK_CONTAINER(Frame), 5);
1138
VBox = gtk_vbox_new(FALSE,2);
1171
VBox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
1139
1172
gtk_container_add(GTK_CONTAINER(Frame),VBox);
1140
1173
gtk_container_set_border_width(GTK_CONTAINER(VBox), 4);
1142
1175
// CDDB Server Settings (Automatic Search)
1143
1176
Frame = gtk_frame_new (_("Server Settings for Automatic Search"));
1144
1177
gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE, 0);
1145
vbox = gtk_vbox_new(FALSE,2);
1178
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
1146
1179
gtk_container_add(GTK_CONTAINER(Frame),vbox);
1147
1180
gtk_container_set_border_width(GTK_CONTAINER(vbox), 4);
1149
1182
// 1rst automatic search server
1150
hbox = gtk_hbox_new(FALSE,2);
1183
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,2);
1151
1184
gtk_container_add(GTK_CONTAINER(vbox),hbox);
1152
Label = gtk_label_new(_("Name :"));
1185
Label = gtk_label_new(_("Name:"));
1153
1186
gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,2);
1154
CddbServerNameAutomaticSearch = gtk_combo_box_entry_new_text();
1187
CddbServerNameAutomaticSearch = gtk_combo_box_text_new_with_entry();
1155
1188
gtk_box_pack_start(GTK_BOX(hbox),CddbServerNameAutomaticSearch,FALSE,FALSE,0);
1156
gtk_combo_box_append_text(GTK_COMBO_BOX(CddbServerNameAutomaticSearch), "freedb.freedb.org");
1157
gtk_combo_box_append_text(GTK_COMBO_BOX(CddbServerNameAutomaticSearch), "www.gnudb.org");
1158
gtk_combo_box_append_text(GTK_COMBO_BOX(CddbServerNameAutomaticSearch), "at.freedb.org");
1159
gtk_combo_box_append_text(GTK_COMBO_BOX(CddbServerNameAutomaticSearch), "au.freedb.org");
1160
gtk_combo_box_append_text(GTK_COMBO_BOX(CddbServerNameAutomaticSearch), "ca.freedb.org");
1161
//gtk_combo_box_append_text(GTK_COMBO_BOX(CddbServerNameAutomaticSearch), "ca2.freedb.org");
1162
//gtk_combo_box_append_text(GTK_COMBO_BOX(CddbServerNameAutomaticSearch), "de.freedb.org");
1163
gtk_combo_box_append_text(GTK_COMBO_BOX(CddbServerNameAutomaticSearch), "es.freedb.org");
1164
gtk_combo_box_append_text(GTK_COMBO_BOX(CddbServerNameAutomaticSearch), "fi.freedb.org");
1165
gtk_combo_box_append_text(GTK_COMBO_BOX(CddbServerNameAutomaticSearch), "ru.freedb.org");
1166
gtk_combo_box_append_text(GTK_COMBO_BOX(CddbServerNameAutomaticSearch), "uk.freedb.org");
1167
gtk_combo_box_append_text(GTK_COMBO_BOX(CddbServerNameAutomaticSearch), "us.freedb.org");
1189
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(CddbServerNameAutomaticSearch), "freedb.freedb.org");
1190
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(CddbServerNameAutomaticSearch), "www.gnudb.org");
1191
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(CddbServerNameAutomaticSearch), "at.freedb.org");
1192
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(CddbServerNameAutomaticSearch), "au.freedb.org");
1193
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(CddbServerNameAutomaticSearch), "ca.freedb.org");
1194
//gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(CddbServerNameAutomaticSearch), "ca2.freedb.org");
1195
//gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(CddbServerNameAutomaticSearch), "de.freedb.org");
1196
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(CddbServerNameAutomaticSearch), "es.freedb.org");
1197
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(CddbServerNameAutomaticSearch), "fi.freedb.org");
1198
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(CddbServerNameAutomaticSearch), "ru.freedb.org");
1199
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(CddbServerNameAutomaticSearch), "uk.freedb.org");
1200
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(CddbServerNameAutomaticSearch), "us.freedb.org");
1168
1201
if (CDDB_SERVER_NAME_AUTOMATIC_SEARCH)
1169
gtk_entry_set_text(GTK_ENTRY(GTK_BIN(CddbServerNameAutomaticSearch)->child),CDDB_SERVER_NAME_AUTOMATIC_SEARCH);
1202
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(CddbServerNameAutomaticSearch))),CDDB_SERVER_NAME_AUTOMATIC_SEARCH);
1171
Label = gtk_label_new (_("Port :"));
1204
Label = gtk_label_new (_("Port:"));
1172
1205
gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,2);
1173
1206
CddbServerPortAutomaticSearch = gtk_entry_new();
1174
1207
gtk_widget_set_size_request(GTK_WIDGET(CddbServerPortAutomaticSearch), 45, -1);
1186
1219
gtk_entry_set_text(GTK_ENTRY(CddbServerCgiPathAutomaticSearch),CDDB_SERVER_CGI_PATH_AUTOMATIC_SEARCH);
1188
1221
// 2sd automatic search server
1189
hbox = gtk_hbox_new(FALSE,2);
1222
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,2);
1190
1223
gtk_container_add(GTK_CONTAINER(vbox),hbox);
1191
Label = gtk_label_new(_("Name :"));
1224
Label = gtk_label_new(_("Name:"));
1192
1225
gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,2);
1193
CddbServerNameAutomaticSearch2 = gtk_combo_box_entry_new_text();
1226
CddbServerNameAutomaticSearch2 = gtk_combo_box_text_new_with_entry();
1194
1227
gtk_box_pack_start(GTK_BOX(hbox),CddbServerNameAutomaticSearch2,FALSE,FALSE,0);
1195
gtk_combo_box_append_text(GTK_COMBO_BOX(CddbServerNameAutomaticSearch2), "freedb.musicbrainz.org");
1228
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(CddbServerNameAutomaticSearch2), "freedb.musicbrainz.org");
1196
1229
if (CDDB_SERVER_NAME_AUTOMATIC_SEARCH2)
1197
gtk_entry_set_text(GTK_ENTRY(GTK_BIN(CddbServerNameAutomaticSearch2)->child),CDDB_SERVER_NAME_AUTOMATIC_SEARCH2);
1230
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(CddbServerNameAutomaticSearch2))),CDDB_SERVER_NAME_AUTOMATIC_SEARCH2);
1199
Label = gtk_label_new (_("Port :"));
1232
Label = gtk_label_new (_("Port:"));
1200
1233
gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,2);
1201
1234
CddbServerPortAutomaticSearch2 = gtk_entry_new();
1202
1235
gtk_widget_set_size_request(GTK_WIDGET(CddbServerPortAutomaticSearch2), 45, -1);
1216
1249
// CDDB Server Settings (Manual Search)
1217
1250
Frame = gtk_frame_new (_("Server Settings for Manual Search"));
1218
1251
gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
1219
vbox = gtk_vbox_new(FALSE,2);
1252
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
1220
1253
gtk_container_add(GTK_CONTAINER(Frame),vbox);
1221
1254
gtk_container_set_border_width(GTK_CONTAINER(vbox), 4);
1223
hbox = gtk_hbox_new(FALSE,2);
1256
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,2);
1224
1257
gtk_container_add(GTK_CONTAINER(vbox),hbox);
1225
Label = gtk_label_new(_("Name :"));
1258
Label = gtk_label_new(_("Name:"));
1226
1259
gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,2);
1227
CddbServerNameManualSearch = gtk_combo_box_entry_new_text();
1260
CddbServerNameManualSearch = gtk_combo_box_text_new_with_entry();
1228
1261
gtk_box_pack_start(GTK_BOX(hbox),CddbServerNameManualSearch,FALSE,FALSE,0);
1229
gtk_combo_box_append_text(GTK_COMBO_BOX(CddbServerNameManualSearch), "www.freedb.org");
1230
gtk_combo_box_append_text(GTK_COMBO_BOX(CddbServerNameManualSearch), "www.gnudb.org");
1262
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(CddbServerNameManualSearch), "www.freedb.org");
1263
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(CddbServerNameManualSearch), "www.gnudb.org");
1231
1264
if (CDDB_SERVER_NAME_MANUAL_SEARCH)
1232
gtk_entry_set_text(GTK_ENTRY(GTK_BIN(CddbServerNameManualSearch)->child),CDDB_SERVER_NAME_MANUAL_SEARCH);
1265
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(CddbServerNameManualSearch))),CDDB_SERVER_NAME_MANUAL_SEARCH);
1234
Label = gtk_label_new (_("Port :"));
1267
Label = gtk_label_new (_("Port:"));
1235
1268
gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,2);
1236
1269
CddbServerPortManualSearch = gtk_entry_new();
1237
1270
gtk_widget_set_size_request(GTK_WIDGET(CddbServerPortManualSearch), 45, -1);
1266
1299
CddbLocalPathModel = gtk_list_store_new(MISC_COMBO_COUNT, G_TYPE_STRING);
1268
CddbLocalPath = gtk_combo_box_entry_new_with_model(GTK_TREE_MODEL(CddbLocalPathModel), MISC_COMBO_TEXT);
1301
CddbLocalPath = gtk_combo_box_new_with_model_and_entry(GTK_TREE_MODEL(CddbLocalPathModel));
1302
gtk_combo_box_set_entry_text_column(GTK_COMBO_BOX(CddbLocalPath),MISC_COMBO_TEXT);
1269
1303
gtk_box_pack_start(GTK_BOX(hbox),CddbLocalPath,FALSE,FALSE,0);
1270
1304
gtk_widget_set_size_request(GTK_WIDGET(CddbLocalPath), 450, -1);
1271
gtk_tooltips_set_tip(Tips,GTK_BIN(CddbLocalPath)->child,_("Specify the directory "
1272
"where are located the local cd data base. The local cd data base contains the eleven following "
1305
gtk_widget_set_tooltip_text(gtk_bin_get_child(GTK_BIN(CddbLocalPath)),_("Specify the directory "
1306
"where the local CD database is located. The local CD data base contains the eleven following "
1273
1307
"directories 'blues', 'classical', 'country', 'data', 'folk', 'jazz', 'newage', 'reggae', "
1274
"'rock', 'soundtrack' and 'misc'."),NULL);
1275
g_signal_connect(G_OBJECT(GTK_ENTRY(GTK_BIN(CddbLocalPath)->child)),"activate",G_CALLBACK(CddbLocalPath_Combo_Add_String),NULL);
1308
"'rock', 'soundtrack' and 'misc'."));
1309
g_signal_connect(G_OBJECT(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(CddbLocalPath)))),"activate",G_CALLBACK(CddbLocalPath_Combo_Add_String),NULL);
1276
1310
//g_signal_connect(G_OBJECT(GTK_ENTRY(GTK_BIN(CddbLocalPath)->child)),"focus_out_event",G_CALLBACK(CddbLocalPath_Combo_Add_String),NULL);
1278
1312
// History list
1306
1340
CddbUseProxy = gtk_check_button_new_with_label(_("Use a proxy"));
1307
1341
gtk_table_attach(GTK_TABLE(Table),CddbUseProxy,0,5,0,1,GTK_FILL,GTK_FILL,0,0);
1308
1342
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(CddbUseProxy),CDDB_USE_PROXY);
1309
gtk_tooltips_set_tip(Tips,CddbUseProxy,_("Set active the settings of the proxy server."),NULL);
1343
gtk_widget_set_tooltip_text(CddbUseProxy,_("Set active the settings of the proxy server."));
1311
1345
Label = gtk_label_new(" ");
1312
1346
gtk_table_attach(GTK_TABLE(Table),Label,0,1,1,2,GTK_FILL,GTK_FILL,0,0);
1314
Label = gtk_label_new(_("Host Name :"));
1348
Label = gtk_label_new(_("Host Name:"));
1315
1349
gtk_table_attach(GTK_TABLE(Table),Label,1,2,1,2,GTK_FILL,GTK_FILL,0,0);
1316
1350
gtk_misc_set_alignment(GTK_MISC(Label),1,0.5);
1317
1351
CddbProxyName = gtk_entry_new();
1318
1352
gtk_table_attach(GTK_TABLE(Table),CddbProxyName,2,3,1,2,GTK_FILL,GTK_FILL,0,0);
1319
1353
if (CDDB_PROXY_NAME)
1320
1354
gtk_entry_set_text(GTK_ENTRY(CddbProxyName),CDDB_PROXY_NAME);
1321
gtk_tooltips_set_tip(Tips,CddbProxyName,_("Name of the proxy server."),NULL);
1322
Label = gtk_label_new (_("Port :"));
1355
gtk_widget_set_tooltip_text(CddbProxyName,_("Name of the proxy server."));
1356
Label = gtk_label_new (_("Port:"));
1323
1357
gtk_table_attach(GTK_TABLE(Table),Label,3,4,1,2,GTK_FILL,GTK_FILL,0,0);
1324
1358
gtk_misc_set_alignment(GTK_MISC(Label),1,0.5);
1325
1359
CddbProxyPort = gtk_entry_new();
1326
1360
gtk_widget_set_size_request(GTK_WIDGET(CddbProxyPort), 45, -1);
1327
1361
gtk_entry_set_max_length(GTK_ENTRY(CddbProxyPort),5);
1328
1362
gtk_table_attach(GTK_TABLE(Table),CddbProxyPort,4,5,1,2,GTK_FILL,GTK_FILL,0,0);
1329
gtk_tooltips_set_tip(Tips,CddbProxyPort,_("Port of the proxy server."),NULL);
1363
gtk_widget_set_tooltip_text(CddbProxyPort,_("Port of the proxy server."));
1330
1364
sprintf(temp,"%i",CDDB_PROXY_PORT);
1331
1365
gtk_entry_set_text(GTK_ENTRY(CddbProxyPort),temp);
1332
1366
g_signal_connect(G_OBJECT(CddbProxyPort),"insert_text",G_CALLBACK(Insert_Only_Digit),NULL);
1333
1367
g_signal_connect(G_OBJECT(CddbUseProxy),"toggled",G_CALLBACK(Cddb_Use_Proxy_Toggled),NULL);
1334
Label = gtk_label_new(_("User Name :"));
1368
Label = gtk_label_new(_("User Name:"));
1335
1369
gtk_table_attach(GTK_TABLE(Table),Label,1,2,2,3,GTK_FILL,GTK_FILL,0,0);
1336
1370
gtk_misc_set_alignment(GTK_MISC(Label),1,0.5);
1337
1371
CddbProxyUserName = gtk_entry_new();
1338
1372
if (CDDB_PROXY_USER_NAME)
1339
1373
gtk_entry_set_text(GTK_ENTRY(CddbProxyUserName),CDDB_PROXY_USER_NAME);
1340
1374
gtk_table_attach(GTK_TABLE(Table),CddbProxyUserName,2,3,2,3,GTK_FILL,GTK_FILL,0,0);
1341
gtk_tooltips_set_tip(Tips,CddbProxyUserName,_("Name of user for the the proxy server."),NULL);
1342
Label = gtk_label_new(_("User Password :"));
1375
gtk_widget_set_tooltip_text(CddbProxyUserName,_("Name of user for the the proxy server."));
1376
Label = gtk_label_new(_("User Password:"));
1343
1377
gtk_table_attach(GTK_TABLE(Table),Label,3,4,2,3,GTK_FILL,GTK_FILL,0,0);
1344
1378
gtk_misc_set_alignment(GTK_MISC(Label),1,0.5);
1345
1379
CddbProxyUserPassword = gtk_entry_new();
1363
1397
"file (according position or DLM if activated below)"));
1364
1398
gtk_box_pack_start(GTK_BOX(vbox),CddbFollowFile,FALSE,FALSE,0);
1365
1399
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(CddbFollowFile),CDDB_FOLLOW_FILE);
1366
gtk_tooltips_set_tip(Tips,CddbFollowFile,_("If activated, when selecting a "
1400
gtk_widget_set_tooltip_text(CddbFollowFile,_("If activated, when selecting a "
1367
1401
"line in the list of tracks name, the corresponding audio file in the "
1368
"main list will be also selected."),NULL);
1402
"main list will be also selected."));
1370
1404
// Check box to use DLM (also used in the cddb window)
1371
1405
CddbUseDLM = gtk_check_button_new_with_label(_("Use the Levenshtein algorithm "
1372
1406
"(DLM) to match lines (using title) with audio files (using filename)"));
1373
1407
gtk_box_pack_start(GTK_BOX(vbox),CddbUseDLM,FALSE,FALSE,0);
1374
1408
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(CddbUseDLM),CDDB_USE_DLM);
1375
gtk_tooltips_set_tip(Tips,CddbUseDLM,_("When activating this option, the "
1376
"Levenshtein algorithm (DLM : Damerau-Levenshtein Metric) will be used "
1409
gtk_widget_set_tooltip_text(CddbUseDLM,_("When activating this option, the "
1410
"Levenshtein algorithm (DLM: Damerau-Levenshtein Metric) will be used "
1377
1411
"to match the CDDB title against every file name in the current folder, "
1378
1412
"and to select the best match. This will be used when selecting the "
1379
"corresponding audio file, or applying cddb results, instead of using "
1380
"directly the position order."),NULL);
1413
"corresponding audio file, or applying CDDB results, instead of using "
1414
"directly the position order."));
1388
1422
gtk_notebook_append_page (GTK_NOTEBOOK(OptionsNoteBook),Frame,Label);
1389
1423
gtk_container_set_border_width(GTK_CONTAINER(Frame), 5);
1391
VBox = gtk_vbox_new(FALSE,2);
1425
VBox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
1392
1426
gtk_container_add(GTK_CONTAINER(Frame),VBox);
1393
1427
gtk_container_set_border_width(GTK_CONTAINER(VBox), 2);
1395
1429
ConfirmBeforeExit = gtk_check_button_new_with_label(_("Confirm exit from program"));
1396
1430
gtk_box_pack_start(GTK_BOX(VBox),ConfirmBeforeExit,FALSE,FALSE,0);
1397
1431
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ConfirmBeforeExit),CONFIRM_BEFORE_EXIT);
1398
gtk_tooltips_set_tip(Tips,ConfirmBeforeExit,_("If activated, opens a dialog box to ask "
1399
"confirmation before exiting the program."),NULL);
1432
gtk_widget_set_tooltip_text(ConfirmBeforeExit,_("If activated, opens a dialog box to ask "
1433
"confirmation before exiting the program."));
1401
1435
ConfirmWriteTag = gtk_check_button_new_with_label(_("Confirm writing of file tag"));
1402
1436
gtk_box_pack_start(GTK_BOX(VBox),ConfirmWriteTag,FALSE,FALSE,0);
1432
1466
/* Apply Button */
1433
1467
Button = gtk_button_new_from_stock(GTK_STOCK_APPLY);
1434
// Disable temporarily the apply button
1435
////gtk_container_add(GTK_CONTAINER(ButtonBox),Button);
1436
////g_signal_connect(G_OBJECT(Button),"clicked",G_CALLBACK(OptionsWindow_Apply_Button),NULL);
1437
////GTK_WIDGET_SET_FLAGS(Button, GTK_CAN_DEFAULT);
1438
gtk_tooltips_set_tip(Tips,Button,_("Apply changes (but don't save) and close this window"),NULL);
1468
gtk_widget_set_tooltip_text(Button,_("Apply changes (but don't save) and close this window"));
1441
1471
/* Cancel Button */
1442
1472
Button = gtk_button_new_from_stock(GTK_STOCK_CANCEL);
1443
1473
gtk_container_add(GTK_CONTAINER(ButtonBox), Button);
1444
1474
g_signal_connect(G_OBJECT(Button),"clicked", G_CALLBACK(OptionsWindow_Cancel_Button),NULL);
1445
GTK_WIDGET_SET_FLAGS(Button, GTK_CAN_DEFAULT);
1475
gtk_widget_set_can_default(Button,TRUE);
1446
1476
gtk_widget_grab_default(Button);
1447
gtk_tooltips_set_tip(Tips,Button,_("Close this window without saving"),NULL);
1477
gtk_widget_set_tooltip_text(Button,_("Close this window without saving"));
1450
1480
/* Save Button */
1451
1481
Button = gtk_button_new_from_stock(GTK_STOCK_OK);
1452
1482
gtk_container_add(GTK_CONTAINER(ButtonBox), Button);
1453
1483
g_signal_connect(G_OBJECT(Button),"clicked", G_CALLBACK(OptionsWindow_Save_Button),NULL);
1454
GTK_WIDGET_SET_FLAGS(Button, GTK_CAN_DEFAULT);
1455
gtk_tooltips_set_tip(Tips,Button,_("Save changes and close this window"),NULL);
1484
gtk_widget_set_can_default(Button,TRUE);
1485
gtk_widget_set_tooltip_text(Button,_("Save changes and close this window"));
1457
1487
/* Show all in the options window */
1458
1488
gtk_widget_show_all(OptionsWindow);
1465
void Set_Default_Comment_Check_Button_Toggled (void)
1495
static void Set_Default_Comment_Check_Button_Toggled (void)
1467
gtk_widget_set_sensitive(DefaultComment,GTK_TOGGLE_BUTTON(SetDefaultComment)->active);
1497
gtk_widget_set_sensitive(DefaultComment,gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(SetDefaultComment)));
1470
void Number_Track_Formated_Toggled (void)
1500
void Number_Track_Formatted_Toggled (void)
1472
gtk_widget_set_sensitive(NumberTrackFormatedSpinButton,GTK_TOGGLE_BUTTON(NumberTrackFormated)->active);
1502
gtk_widget_set_sensitive(NumberTrackFormatedSpinButton,gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(NumberTrackFormated)));
1473
1503
// To update the example...
1474
1504
g_signal_emit_by_name(G_OBJECT(NumberTrackFormatedSpinButton),"changed",NULL);
1477
void Number_Track_Formated_Spin_Button_Changed (GtkObject *Label, GtkObject *SpinButton)
1508
Number_Track_Formatted_Spin_Button_Changed (GtkWidget *Label,
1509
GtkWidget *SpinButton)
1482
if (GTK_TOGGLE_BUTTON(NumberTrackFormated)->active)
1514
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(NumberTrackFormated)))
1483
1515
val = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(SpinButton));
1487
1519
// For translators : be aware to NOT translate '%.*d' in this string
1488
tmp = g_strdup_printf(_("(Example : %.*d_-_Track_name_1.mp3)"),val,1);
1520
tmp = g_strdup_printf(_("(Example: %.*d_-_Track_name_1.mp3)"),val,1);
1490
1522
gtk_label_set_text(GTK_LABEL(Label),tmp);
1494
void Use_Non_Standard_Id3_Reading_Character_Set_Toggled (void)
1527
Use_Non_Standard_Id3_Reading_Character_Set_Toggled (void)
1496
1529
gtk_widget_set_sensitive(FileReadingId3v1v2CharacterSetCombo,
1497
GTK_TOGGLE_BUTTON(UseNonStandardId3ReadingCharacterSet)->active);
1530
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(UseNonStandardId3ReadingCharacterSet)));
1500
void Change_Id3_Settings_Toggled (void)
1534
Change_Id3_Settings_Toggled (void)
1628
1665
/* Callback from Open_OptionsWindow */
1629
void OptionsWindow_Apply_Button(void)
1631
if (!Check_Config()) return;
1634
/* FIXME : make gtk crash on win32 */
1635
Add_String_To_Combo_List(DefaultPathModel, (gchar*) gtk_entry_get_text(GTK_ENTRY(GTK_BIN(DefaultPathToMp3)->child)));
1636
Add_String_To_Combo_List(FilePlayerModel, (gchar*) gtk_entry_get_text(GTK_ENTRY(GTK_BIN(FilePlayerCombo)->child)));
1637
Add_String_To_Combo_List(DefaultCommentModel, (gchar*) gtk_entry_get_text(GTK_ENTRY(GTK_BIN(DefaultComment)->child)));
1638
Add_String_To_Combo_List(CddbLocalPathModel, (gchar*) gtk_entry_get_text(GTK_ENTRY(GTK_BIN(CddbLocalPath)->child)));
1641
Apply_Changes_Of_Preferences_Window();
1643
OptionsWindow_Quit();
1644
Statusbar_Message(_("Changes applied"),TRUE);
1647
/* Callback from Open_OptionsWindow */
1648
void OptionsWindow_Save_Button(void)
1650
if (!Check_Config()) return;
1653
/* FIXME : make gtk crash on win32 */
1654
Add_String_To_Combo_List(DefaultPathModel, (gchar*) gtk_entry_get_text(GTK_ENTRY(GTK_BIN(DefaultPathToMp3)->child)));
1655
Add_String_To_Combo_List(FilePlayerModel, (gchar*) gtk_entry_get_text(GTK_ENTRY(GTK_BIN(FilePlayerCombo)->child)));
1656
Add_String_To_Combo_List(DefaultCommentModel, (gchar*) gtk_entry_get_text(GTK_ENTRY(GTK_BIN(DefaultComment)->child)));
1657
Add_String_To_Combo_List(CddbLocalPathModel, (gchar*) gtk_entry_get_text(GTK_ENTRY(GTK_BIN(CddbLocalPath)->child)));
1667
OptionsWindow_Save_Button (void)
1669
if (!Check_Config()) return;
1672
/* FIXME : make gtk crash on win32 */
1673
Add_String_To_Combo_List(DefaultPathModel, gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(DefaultPathToMp3)))));
1674
Add_String_To_Combo_List(FilePlayerModel, gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(FilePlayerCombo)))));
1675
Add_String_To_Combo_List(DefaultCommentModel, gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(DefaultComment)))));
1676
Add_String_To_Combo_List(CddbLocalPathModel, gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(CddbLocalPath)))));
1677
#endif /* !G_OS_WIN32 */
1660
1679
Save_Changes_Of_Preferences_Window();
1732
1756
* - converted to UTF-8 (path_utf8) : Céline DION - D'eux (1995)
1733
1757
* - try to convert to system encoding (path_real) : ?????
1735
gint Check_DefaultPathToMp3 (void)
1760
Check_DefaultPathToMp3 (void)
1737
1762
gchar *path_utf8;
1738
1763
gchar *path_real;
1739
1764
struct stat stbuf;
1741
path_utf8 = g_strdup(gtk_entry_get_text(GTK_ENTRY(GTK_BIN(DefaultPathToMp3)->child)));
1766
path_utf8 = g_strdup(gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(DefaultPathToMp3)))));
1742
1767
if (!path_utf8 || g_utf8_strlen(path_utf8, -1) < 1)
1744
1769
g_free(path_utf8);
1748
1773
path_real = filename_from_display(path_utf8);
1751
/* On win32 : stat("c:\path\to\dir") succeed, while stat("c:\path\to\dir\") fails */
1776
/* On win32 : stat("c:\path\to\dir") succeed, while stat("c:\path\to\dir\")
1752
1779
ET_Win32_Path_Remove_Trailing_Backslash(path_real);
1780
#endif /* G_OS_WIN32 */
1755
1782
if ( stat(path_real,&stbuf)==0 && S_ISDIR(stbuf.st_mode) )
1757
1784
g_free(path_real);
1758
1785
g_free(path_utf8);
1759
return 1; /* Path is good */
1786
return TRUE; /* Path is good */
1762
gchar *msg = g_strdup_printf(_(" The selected path for 'Default path to "
1763
"files' isn't valid!\n'%s'\n(%s) "),path_utf8,
1764
(stat(path_real,&stbuf)==0)?_("Not a directory"):g_strerror(errno) );
1765
GtkWidget *msgbox = msg_box_new(_("Error..."),
1766
GTK_WINDOW(OptionsWindow),
1768
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
1770
GTK_STOCK_DIALOG_ERROR,
1771
GTK_STOCK_OK, GTK_RESPONSE_OK,
1773
gtk_dialog_run(GTK_DIALOG(msgbox));
1774
gtk_widget_destroy(msgbox);
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);
1776
1800
g_free(path_real);
1777
1801
g_free(path_utf8);
1847
gint Check_DefaultComment (void)
1872
Check_DefaultComment (void)
1849
1874
const gchar *file;
1851
file = gtk_entry_get_text(GTK_ENTRY(GTK_BIN(DefaultComment)->child));
1876
file = gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(DefaultComment))));
1852
1877
if (!file || g_utf8_strlen(file, -1) < 1)
1853
1878
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(SetDefaultComment),FALSE);
1855
return 1; /* A blank entry is ignored */
1880
return TRUE; /* A blank entry is ignored */
1859
1884
* Check if player binary is found
1861
gint Check_FilePlayerCombo (void)
1887
Check_FilePlayerCombo (void)
1863
1889
gchar *program_path = NULL;
1864
1890
gchar *program_path_validated = NULL;
1867
return 1; /* FIXME see Check_If_Executable_Exists */
1893
return TRUE; /* FIXME see Check_If_Executable_Exists */
1868
1894
/* Note : Check_If_Executable_Exists crashes when player is 'winamp.exe' with g_find_program_in_path */
1895
#endif /* G_OS_WIN32 */
1871
1897
// The program typed
1872
program_path = g_strdup(gtk_entry_get_text(GTK_ENTRY(GTK_BIN(FilePlayerCombo)->child)));
1898
program_path = g_strdup(gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(FilePlayerCombo)))));
1873
1899
g_strstrip(program_path);
1874
1900
// The program file validated
1875
1901
if (program_path && strlen(program_path)>0)
1878
1904
if ( program_path && strlen(program_path)>0 && !program_path_validated ) // A file is typed but it is invalid!
1880
gchar *msg = g_strdup_printf(_("The audio file player '%s' can't be found!"),
1881
gtk_entry_get_text(GTK_ENTRY(GTK_BIN(FilePlayerCombo)->child)));
1882
GtkWidget *msgbox = msg_box_new(_("Error..."),
1883
GTK_WINDOW(OptionsWindow),
1885
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
1887
GTK_STOCK_DIALOG_ERROR,
1888
GTK_STOCK_OK, GTK_RESPONSE_OK,
1890
gtk_dialog_run(GTK_DIALOG(msgbox));
1891
gtk_widget_destroy(msgbox);
1906
GtkWidget *msgdialog = gtk_message_dialog_new(GTK_WINDOW(OptionsWindow),
1907
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
1910
_("The audio file player '%s' cannot be found"),
1912
gtk_window_set_title(GTK_WINDOW(msgdialog),_("Audio Player Error"));
1914
gtk_dialog_run(GTK_DIALOG(msgdialog));
1915
gtk_widget_destroy(msgdialog);
1894
1917
g_free(program_path);
1898
1921
g_free(program_path);
1899
1922
g_free(program_path_validated);
1904
gint Check_Config (void)
1906
if ( Check_DefaultPathToMp3()
1907
//&& Check_CharacterSetTranslation()
1908
&& Check_DefaultComment()
1909
&& Check_FilePlayerCombo() )
1910
return 1; /* No problem detected */
1930
if (Check_DefaultPathToMp3 ()
1931
&& Check_DefaultComment ()
1932
&& Check_FilePlayerCombo ())
1933
return TRUE; /* No problem detected */
1912
return 0; /* Oups! */
1935
return FALSE; /* Oops! */
1918
1941
* Manage Check buttons into Scanner tab: conversion group
1919
1942
* This reproduces "something" like the behaviour of radio buttons with check buttons
1921
void Scanner_Convert_Check_Button_Toggled_1 (GtkObject *object_rec, GtkObject *object_emi)
1923
if (!object_rec || !object_emi) return;
1925
if (GTK_TOGGLE_BUTTON(object_emi)->active == TRUE)
1926
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(object_rec),!GTK_TOGGLE_BUTTON(object_emi)->active);
1931
void DefaultPathToMp3_Combo_Add_String (void)
1935
path = gtk_entry_get_text(GTK_ENTRY(GTK_BIN(DefaultPathToMp3)->child));
1936
Add_String_To_Combo_List(GTK_LIST_STORE(DefaultPathModel), (gchar *)path);
1939
void CddbLocalPath_Combo_Add_String (void)
1943
path = gtk_entry_get_text(GTK_ENTRY(GTK_BIN(CddbLocalPath)->child));
1944
Add_String_To_Combo_List(GTK_LIST_STORE(CddbLocalPath), (gchar *)path);
1945
Scanner_Convert_Check_Button_Toggled_1 (GtkWidget *object_rec,
1946
GtkWidget *object_emi)
1948
g_return_if_fail (object_rec != NULL || object_emi != NULL);
1950
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(object_emi)) == TRUE)
1951
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(object_rec),!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(object_emi)));
1955
DefaultPathToMp3_Combo_Add_String (void)
1959
path = gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(DefaultPathToMp3))));
1960
Add_String_To_Combo_List(GTK_LIST_STORE(DefaultPathModel), path);
1964
CddbLocalPath_Combo_Add_String (void)
1968
path = gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(CddbLocalPath))));
1969
Add_String_To_Combo_List(GTK_LIST_STORE(CddbLocalPath), path);