~ubuntu-branches/ubuntu/wily/easytag/wily

« back to all changes in this revision

Viewing changes to src/prefs.c

  • Committer: Package Import Robot
  • Author(s): Alessio Treglia
  • Date: 2013-10-11 17:07:47 UTC
  • mto: (8.1.4 sid)
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: package-import@ubuntu.com-20131011170747-uqvgtx7uyd046j7z
Tags: upstream-2.1.8
ImportĀ upstreamĀ versionĀ 2.1.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
#include <sys/stat.h>
32
32
#include <unistd.h>
33
33
 
 
34
#include "gtk2_compat.h"
34
35
#include "prefs.h"
35
36
#include "setting.h"
36
 
#include "msgbox.h"
37
37
#include "bar.h"
38
38
#include "misc.h"
39
39
#include "scan.h"
41
41
#include "browser.h"
42
42
#include "cddb.h"
43
43
#include "charset.h"
44
 
 
45
 
//#ifdef WIN32
46
 
//#   include "win32/win32dep.h"
47
 
//#endif
48
 
 
 
44
#ifdef G_OS_WIN32
 
45
#include "win32/win32dep.h"
 
46
#endif /* G_OS_WIN32 */
49
47
 
50
48
/**************
51
49
 * Prototypes *
52
50
 **************/
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);
60
 
 
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);
69
 
 
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);
 
57
 
 
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);
 
67
 
 
68
static void DefaultPathToMp3_Combo_Add_String (void);
 
69
static void CddbLocalPath_Combo_Add_String (void);
72
70
 
73
71
 
74
72
 
77
75
 *************/
78
76
void Init_OptionsWindow (void)
79
77
{
80
 
    OptionsWindow = (GtkWidget *)NULL;
 
78
    OptionsWindow = NULL;
81
79
}
82
80
 
83
81
/*
95
93
    GtkWidget *HBox, *hbox, *id3v1v2hbox;
96
94
    GtkWidget *Separator;
97
95
    GtkWidget *EventBox;
98
 
    GtkTooltips *Tips;
99
96
    gchar temp[MAX_STRING_LEN];
100
97
    gchar *path_utf8;
101
98
    gchar *program_path;
103
100
    /* Check if already opened */
104
101
    if (OptionsWindow)
105
102
    {
106
 
        gdk_window_show(OptionsWindow->window);
 
103
        gtk_window_present(GTK_WINDOW(OptionsWindow));
107
104
        return;
108
105
    }
109
106
 
115
112
    gtk_container_set_border_width(GTK_CONTAINER(OptionsWindow), 5);
116
113
    gtk_window_set_default_size(GTK_WINDOW(OptionsWindow),OPTIONS_WINDOW_WIDTH,OPTIONS_WINDOW_HEIGHT);
117
114
    /* Title */
118
 
    gtk_window_set_title(GTK_WINDOW(OptionsWindow),_("Preferences..."));
 
115
    gtk_window_set_title(GTK_WINDOW(OptionsWindow),_("Preferencesā€¦"));
119
116
 
120
117
    /* Signals connection */
121
118
    g_signal_connect(G_OBJECT(OptionsWindow),"destroy", G_CALLBACK(OptionsWindow_Quit),NULL);
123
120
    g_signal_connect(G_OBJECT(OptionsWindow),"key_press_event",
124
121
                     G_CALLBACK(OptionsWindow_Key_Press),NULL);
125
122
 
126
 
    Tips = gtk_tooltips_new();
127
 
 
128
123
     /* Options */
129
124
     /* The vbox */
130
 
    OptionsVBox = gtk_vbox_new(FALSE,0);
 
125
    OptionsVBox = gtk_box_new(GTK_ORIENTATION_VERTICAL,0);
131
126
    gtk_box_set_spacing (GTK_BOX(OptionsVBox),5);
132
127
    gtk_container_add(GTK_CONTAINER(OptionsWindow),OptionsVBox);
133
128
 
147
142
    gtk_notebook_append_page(GTK_NOTEBOOK(OptionsNoteBook),Frame,Label);
148
143
    gtk_container_set_border_width(GTK_CONTAINER(Frame), 5);
149
144
 
150
 
    VBox = gtk_vbox_new(FALSE,4);
 
145
    VBox = gtk_box_new(GTK_ORIENTATION_VERTICAL,4);
151
146
    gtk_container_add(GTK_CONTAINER(Frame),VBox);
152
147
    gtk_container_set_border_width(GTK_CONTAINER(VBox), 4);
153
148
 
155
150
    /* File Browser frame */
156
151
    Frame = gtk_frame_new(_("File Browser"));
157
152
    gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
158
 
    vbox = gtk_vbox_new(FALSE,0);
 
153
    vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,0);
159
154
    gtk_container_add(GTK_CONTAINER(Frame),vbox);
160
155
    gtk_container_set_border_width(GTK_CONTAINER(vbox), 2);
161
156
 
162
157
    /* Default directory */
163
 
    HBox = gtk_hbox_new(FALSE,2);
 
158
    HBox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,2);
164
159
    gtk_box_pack_start(GTK_BOX(vbox),HBox,FALSE,FALSE,0);
165
160
 
166
161
    // Label
167
 
    Label = gtk_label_new(_("Default directory :"));
 
162
    Label = gtk_label_new(_("Default directory:"));
168
163
    gtk_box_pack_start(GTK_BOX(HBox),Label,FALSE,FALSE,0);
169
164
 
170
165
    // Combo
173
168
    else
174
169
        DefaultPathModel = gtk_list_store_new(MISC_COMBO_COUNT, G_TYPE_STRING);
175
170
 
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);
183
179
 
184
180
    // History list
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);
189
185
    if (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);
192
188
 
193
189
    // Button browse
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))));
198
194
 
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)."));
206
202
 
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."));
213
209
 
214
210
    /* Open the node to show subdirectories */
215
211
    OpenSelectedBrowserNode = gtk_check_button_new_with_label(_("Show subdirectories when selecting "
216
212
        "a directory"));
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."));
221
217
 
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);
226
 
#endif
 
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 '.')."));
230
226
 
231
227
 
232
228
 
238
234
    gtk_notebook_append_page (GTK_NOTEBOOK(OptionsNoteBook),Frame,Label);
239
235
    gtk_container_set_border_width(GTK_CONTAINER(Frame), 5);
240
236
 
241
 
    VBox = gtk_vbox_new(FALSE,4);
 
237
    VBox = gtk_box_new(GTK_ORIENTATION_VERTICAL,4);
242
238
    gtk_container_add(GTK_CONTAINER(Frame),VBox);
243
239
    gtk_container_set_border_width(GTK_CONTAINER(VBox), 4);
244
240
 
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);
252
248
 
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."));
259
255
 
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);
266
262
 
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);
284
280
 
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);
291
287
 
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
298
294
 
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"));
318
314
 
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."));
322
318
 
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() */
 
320
#ifndef G_OS_WIN32
 
321
    /* Always true and not user modifiable on win32, as strncasecmp() does not
 
322
     * work correctly with g_utf8_collate_key().
 
323
     */
325
324
    gtk_box_pack_start(GTK_BOX(hbox),SortingFileCaseSensitive,FALSE,FALSE,0);
326
 
#endif
 
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."));
331
330
 
332
331
    /* Message Dialog Position */
333
332
    Frame = gtk_frame_new (_("Message Dialog Position"));
342
341
    gtk_table_attach(GTK_TABLE(Table),MessageBoxPositionNone,0,1,0,1,GTK_FILL,GTK_FILL,0,0);
343
342
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(MessageBoxPositionNone),
344
343
        MESSAGE_BOX_POSITION_NONE);
345
 
    gtk_tooltips_set_tip(Tips,MessageBoxPositionNone,_("Let the Window Manager "
346
 
        "to place the windows."),NULL);
 
344
    gtk_widget_set_tooltip_text(MessageBoxPositionNone,_("Let the Window Manager "
 
345
        "to place the windows."));
347
346
 
348
347
    MessageBoxPositionCenterOnParent = gtk_radio_button_new_with_label(
349
348
        gtk_radio_button_get_group(GTK_RADIO_BUTTON(MessageBoxPositionNone)),
351
350
    gtk_table_attach(GTK_TABLE(Table),MessageBoxPositionCenterOnParent,1,2,0,1,GTK_FILL,GTK_FILL,0,0);
352
351
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(MessageBoxPositionCenterOnParent),
353
352
        MESSAGE_BOX_POSITION_CENTER_ON_PARENT);
354
 
    gtk_tooltips_set_tip(Tips,MessageBoxPositionCenterOnParent,_("Windows should "
355
 
        "be placed in the center of the main window."),NULL);
 
353
    gtk_widget_set_tooltip_text(MessageBoxPositionCenterOnParent,_("Windows should "
 
354
        "be placed in the center of the main window."));
356
355
 
357
356
    MessageBoxPositionCenter = gtk_radio_button_new_with_label(
358
357
        gtk_radio_button_get_group(GTK_RADIO_BUTTON(MessageBoxPositionNone)),
360
359
    gtk_table_attach(GTK_TABLE(Table),MessageBoxPositionCenter,0,1,1,2,GTK_FILL,GTK_FILL,0,0);
361
360
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(MessageBoxPositionCenter),
362
361
        MESSAGE_BOX_POSITION_CENTER);
363
 
    gtk_tooltips_set_tip(Tips,MessageBoxPositionCenter,_("Windows should be placed "
364
 
        "in the center of the screen."),NULL);
 
362
    gtk_widget_set_tooltip_text(MessageBoxPositionCenter,_("Windows should be placed "
 
363
        "in the center of the screen."));
365
364
 
366
365
    MessageBoxPositionMouse = gtk_radio_button_new_with_label(
367
366
        gtk_radio_button_get_group(GTK_RADIO_BUTTON(MessageBoxPositionNone)),
369
368
    gtk_table_attach(GTK_TABLE(Table),MessageBoxPositionMouse,1,2,1,2,GTK_FILL,GTK_FILL,0,0);
370
369
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(MessageBoxPositionMouse),
371
370
        MESSAGE_BOX_POSITION_MOUSE);
372
 
    gtk_tooltips_set_tip(Tips,MessageBoxPositionMouse,_("Windows should be placed "
373
 
        "at the current mouse position."),NULL);
 
371
    gtk_widget_set_tooltip_text(MessageBoxPositionMouse,_("Windows should be placed "
 
372
        "at the current mouse position."));
374
373
 
375
374
    /* File Player */
376
375
    Frame = gtk_frame_new (_("File Audio Player"));
382
381
    else
383
382
        gtk_list_store_clear(FilePlayerModel);
384
383
 
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."));
396
396
    // History List
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);
403
403
 
404
404
    // Button browse
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))));
409
409
 
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);
416
416
 
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."));
423
423
   
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);
430
430
    
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);
440
439
*/
449
448
    gtk_notebook_append_page (GTK_NOTEBOOK(OptionsNoteBook),Frame,Label);
450
449
    gtk_container_set_border_width(GTK_CONTAINER(Frame),5);
451
450
 
452
 
    VBox = gtk_vbox_new(FALSE,2);
 
451
    VBox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
453
452
    gtk_container_add(GTK_CONTAINER(Frame),VBox);
454
453
    gtk_container_set_border_width(GTK_CONTAINER(VBox),4);
455
454
 
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);
463
462
 
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."));
471
470
 
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);
478
477
 
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'"));
483
482
 
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'"));
489
488
 
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"));
495
494
 
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."));
502
501
 
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."));
513
512
 
514
513
 
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);
521
520
 
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);***/
525
524
 
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);
539
538
 
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."));
548
547
 
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."));
557
556
 
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."));
566
565
 
567
566
 
568
567
 
574
573
    gtk_notebook_append_page (GTK_NOTEBOOK(OptionsNoteBook),Frame,Label);
575
574
    gtk_container_set_border_width(GTK_CONTAINER(Frame),5);
576
575
 
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);
580
579
 
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);
587
586
 
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ā€¦)."));
594
593
 
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);
597
596
 
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."));
604
603
 
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");
610
609
 
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);
615
614
 
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."));
623
622
 
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);
627
626
 
628
627
    /* Tag field focus */
646
645
 
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);
652
 
 
 
651
    
 
652
    /* Tag Splitting */
 
653
    Frame = gtk_frame_new (_("Tag Splitting"));
 
654
    gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
 
655
 
 
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);
 
659
    
 
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);
 
663
 
 
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"));
 
671
 
 
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);
 
679
 
 
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);
653
687
 
654
688
    /*
655
689
     * ID3 Tag Settings
661
695
#endif
662
696
    gtk_container_set_border_width(GTK_CONTAINER(Frame),5);
663
697
 
664
 
    VBox = gtk_vbox_new(FALSE,2);
 
698
    VBox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
665
699
    gtk_container_add(GTK_CONTAINER(Frame),VBox);
666
700
    gtk_container_set_border_width(GTK_CONTAINER(VBox),4);
667
701
 
669
703
    /* Tag Rules frame */
670
704
    Frame = gtk_frame_new (_("ID3 Tag Rules"));
671
705
    gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
672
 
    vbox = gtk_vbox_new(FALSE,2);
 
706
    vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
673
707
    gtk_container_add(GTK_CONTAINER(Frame),vbox);
674
708
    gtk_container_set_border_width(GTK_CONTAINER(vbox),2);
675
709
 
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."));
688
722
 
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."));
697
731
 
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."));
704
738
 
705
739
    /* Use CRC32 */
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"));
710
744
 
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"));
716
750
        
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."));      
722
756
 
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);
729
763
 
731
765
    Frame = gtk_frame_new (_("ID3v2 tags"));
732
766
    gtk_box_pack_start(GTK_BOX(id3v1v2hbox),Frame,FALSE,FALSE,2);
733
767
 
734
 
    vbox = gtk_vbox_new(FALSE,2);
 
768
    vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
735
769
    gtk_container_add(GTK_CONTAINER(Frame),vbox);
736
770
    gtk_container_set_border_width(GTK_CONTAINER(vbox),2);
737
771
 
744
778
    FileWritingId3v2WriteTag = gtk_check_button_new_with_label(_("Write ID3v2 tag"));
745
779
    gtk_table_attach(GTK_TABLE(Table),FileWritingId3v2WriteTag,0,5,0,1,GTK_FILL,GTK_FILL,0,0);
746
780
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FileWritingId3v2WriteTag),FILE_WRITING_ID3V2_WRITE_TAG);
747
 
    gtk_tooltips_set_tip(Tips,FileWritingId3v2WriteTag,_("If activated, an ID3v2.4 tag will be added or "
748
 
        "updated at the beginning of the MP3 files. Else it will be stripped."),NULL);
 
781
    gtk_widget_set_tooltip_text(FileWritingId3v2WriteTag,_("If activated, an ID3v2.4 tag will be added or "
 
782
        "updated at the beginning of the MP3 files. Else it will be stripped."));
749
783
    g_signal_connect_after(G_OBJECT(FileWritingId3v2WriteTag),"toggled",
750
784
        G_CALLBACK(Change_Id3_Settings_Toggled),NULL);
751
785
 
756
790
    gtk_misc_set_alignment(GTK_MISC(LabelId3v2Version),0,0.5);
757
791
 
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);
787
821
 
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
796
830
    else
809
843
        !FILE_WRITING_ID3V2_USE_UNICODE_CHARACTER_SET);
810
844
 
811
845
    EventBox = gtk_event_box_new();
812
 
    FileWritingId3v2NoUnicodeCharacterSetCombo = gtk_combo_box_new_text();
 
846
    FileWritingId3v2NoUnicodeCharacterSetCombo = gtk_combo_box_text_new();
813
847
    gtk_container_add(GTK_CONTAINER(EventBox),FileWritingId3v2NoUnicodeCharacterSetCombo);
814
 
    gtk_tooltips_set_tip(Tips,EventBox,_("Character set used to write the tag "
815
 
        "data in the file."),NULL);
 
848
    gtk_widget_set_tooltip_text(EventBox,_("Character set used to write the tag "
 
849
        "data in the file."));
816
850
 
817
851
    Charset_Populate_Combobox(GTK_COMBO_BOX(FileWritingId3v2NoUnicodeCharacterSetCombo), 
818
852
        FILE_WRITING_ID3V2_NO_UNICODE_CHARACTER_SET);
829
863
        _("No"));
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."));
843
877
 
844
878
    FileWritingId3v2IconvOptionsIgnore = gtk_radio_button_new_with_label(
845
879
        gtk_radio_button_get_group(GTK_RADIO_BUTTON(FileWritingId3v2IconvOptionsNo)),
846
880
        _("//IGNORE"));
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."));
852
886
 
853
887
    // ID3v1 tags
854
888
    Frame = gtk_frame_new (_("ID3v1 tags"));
855
889
    gtk_box_pack_start(GTK_BOX(id3v1v2hbox),Frame,FALSE,FALSE,2);
856
890
 
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);
860
894
 
868
902
    FileWritingId3v1WriteTag = gtk_check_button_new_with_label(_("Write ID3v1.x tag"));
869
903
    gtk_table_attach(GTK_TABLE(Table),FileWritingId3v1WriteTag,0,4,0,1,GTK_FILL,GTK_FILL,0,0);
870
904
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FileWritingId3v1WriteTag),FILE_WRITING_ID3V1_WRITE_TAG);
871
 
    gtk_tooltips_set_tip(Tips,FileWritingId3v1WriteTag,_("If activated, an ID3v1 tag will be added or "
872
 
        "updated at the end of the MP3 files. Else it will be stripped."),NULL);
 
905
    gtk_widget_set_tooltip_text(FileWritingId3v1WriteTag,_("If activated, an ID3v1 tag will be added or "
 
906
        "updated at the end of the MP3 files. Else it will be stripped."));
873
907
    g_signal_connect_after(G_OBJECT(FileWritingId3v1WriteTag),"toggled",
874
908
        G_CALLBACK(Change_Id3_Settings_Toggled),NULL);
875
909
 
882
916
    gtk_table_attach(GTK_TABLE(Table),Label,0,1,2,3,GTK_FILL,GTK_FILL,0,0);
883
917
 
884
918
    EventBox = gtk_event_box_new();
885
 
    FileWritingId3v1CharacterSetCombo = gtk_combo_box_new_text();
 
919
    FileWritingId3v1CharacterSetCombo = gtk_combo_box_text_new();
886
920
    gtk_container_add(GTK_CONTAINER(EventBox),FileWritingId3v1CharacterSetCombo);
887
921
    gtk_table_attach(GTK_TABLE(Table),EventBox,1,4,2,3,GTK_FILL,GTK_FILL,0,0);
888
 
    gtk_tooltips_set_tip(Tips,EventBox,_("Character set used to write ID3v1 tag data "
889
 
        "in the file."),NULL);
 
922
    gtk_widget_set_tooltip_text(EventBox,_("Character set used to write ID3v1 tag data "
 
923
        "in the file."));
890
924
    Charset_Populate_Combobox(GTK_COMBO_BOX(FileWritingId3v1CharacterSetCombo), FILE_WRITING_ID3V1_CHARACTER_SET);
891
925
 
892
926
    /* ID3V1 Additional iconv() options*/
898
932
        _("No"));
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."));
912
946
 
913
947
    FileWritingId3v1IconvOptionsIgnore = gtk_radio_button_new_with_label(
914
948
        gtk_radio_button_get_group(GTK_RADIO_BUTTON(FileWritingId3v1IconvOptionsNo)),
915
949
        _("//IGNORE"));
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."));
921
955
 
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);
928
962
 
934
968
 
935
969
    // "File Reading Charset" Check Button + Combo
936
970
    UseNonStandardId3ReadingCharacterSet = gtk_check_button_new_with_label(_(
937
 
        "Non-standart:"));
 
971
        "Non-standard:"));
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"
944
978
        "\n"
945
 
        "For example :\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 "
 
979
        "For example:\n"
 
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."));
954
988
 
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);
959
993
 
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 "
 
995
        "in the file."));
962
996
 
963
997
    Charset_Populate_Combobox(GTK_COMBO_BOX(FileReadingId3v1v2CharacterSetCombo), 
964
998
        FILE_READING_ID3V1V2_CHARACTER_SET);
980
1014
    /* Save the number of the page. Asked in Scanner window */
981
1015
    OptionsNoteBook_Scanner_Page_Num = gtk_notebook_page_num(GTK_NOTEBOOK(OptionsNoteBook),Frame);
982
1016
 
983
 
    VBox = gtk_vbox_new(FALSE,2);
 
1017
    VBox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
984
1018
    gtk_container_add(GTK_CONTAINER(Frame),VBox);
985
1019
    gtk_container_set_border_width(GTK_CONTAINER(VBox), 4);
986
1020
 
987
1021
    /* Character conversion for the 'Fill Tag' scanner (=> FTS...) */
988
1022
    Frame = gtk_frame_new (_("Fill Tag Scanner - Character Conversion"));
989
1023
    gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
990
 
    vbox = gtk_vbox_new(FALSE,2);
 
1024
    vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
991
1025
    gtk_container_add(GTK_CONTAINER(Frame),vbox);
992
1026
    gtk_container_set_border_width(GTK_CONTAINER(vbox), 2);
993
1027
 
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."));
1012
1046
 
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);
1019
 
 
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));
1029
 
 
 
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),
 
1064
        RFS_REMOVE_SPACES);
 
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."));
1038
1070
 
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);
1045
1077
 
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')."));
1055
1087
 
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);
1062
1094
 
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."));
1068
1100
 
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."));
1074
1106
 
1075
1107
 
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);
1082
1114
 
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."));
1089
1121
 
1090
1122
    // Set a default comment text or CRC-32 checksum
1091
1123
    if (!DefaultCommentModel)
1093
1125
    else
1094
1126
        gtk_list_store_clear(DefaultCommentModel);
1095
1127
 
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);
1116
1149
 
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);
1137
1170
 
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);
1141
1174
 
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);
1148
1181
 
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);
1170
1203
 
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);
1178
1211
    gtk_entry_set_text(GTK_ENTRY(CddbServerPortAutomaticSearch),temp);
1179
1212
    g_signal_connect(G_OBJECT(CddbServerPortAutomaticSearch),"insert_text",G_CALLBACK(Insert_Only_Digit),NULL);
1180
1213
 
1181
 
    Label = gtk_label_new (_("CGI Path :"));
 
1214
    Label = gtk_label_new (_("CGI Path:"));
1182
1215
    gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,2);
1183
1216
    CddbServerCgiPathAutomaticSearch = gtk_entry_new();
1184
1217
    gtk_box_pack_start(GTK_BOX(hbox),CddbServerCgiPathAutomaticSearch,FALSE,FALSE,0);
1186
1219
        gtk_entry_set_text(GTK_ENTRY(CddbServerCgiPathAutomaticSearch),CDDB_SERVER_CGI_PATH_AUTOMATIC_SEARCH);
1187
1220
 
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);
1198
1231
 
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);
1206
1239
    gtk_entry_set_text(GTK_ENTRY(CddbServerPortAutomaticSearch2),temp);
1207
1240
    g_signal_connect(G_OBJECT(CddbServerPortAutomaticSearch2),"insert_text",G_CALLBACK(Insert_Only_Digit),NULL);
1208
1241
 
1209
 
    Label = gtk_label_new (_("CGI Path :"));
 
1242
    Label = gtk_label_new (_("CGI Path:"));
1210
1243
    gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,2);
1211
1244
    CddbServerCgiPathAutomaticSearch2 = gtk_entry_new();
1212
1245
    gtk_box_pack_start(GTK_BOX(hbox),CddbServerCgiPathAutomaticSearch2,FALSE,FALSE,0);
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);
1222
1255
 
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);
1233
1266
 
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);
1241
1274
    gtk_entry_set_text(GTK_ENTRY(CddbServerPortManualSearch),temp);
1242
1275
    g_signal_connect(G_OBJECT(CddbServerPortManualSearch),"insert_text",G_CALLBACK(Insert_Only_Digit),NULL);
1243
1276
 
1244
 
    Label = gtk_label_new (_("CGI Path :"));
 
1277
    Label = gtk_label_new (_("CGI Path:"));
1245
1278
    gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,2);
1246
1279
    CddbServerCgiPathManualSearch = gtk_entry_new();
1247
1280
    gtk_box_pack_start(GTK_BOX(hbox),CddbServerCgiPathManualSearch,FALSE,FALSE,0);
1251
1284
    // Local access for CDDB (Automatic Search)
1252
1285
    Frame = gtk_frame_new (_("Local CD Data Base"));
1253
1286
    gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
1254
 
    vbox = gtk_vbox_new(FALSE,2);
 
1287
    vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
1255
1288
    gtk_container_add(GTK_CONTAINER(Frame),vbox);
1256
1289
    gtk_container_set_border_width(GTK_CONTAINER(vbox), 4);
1257
1290
 
1258
 
    hbox = gtk_hbox_new(FALSE,2);
 
1291
    hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,2);
1259
1292
    gtk_container_add(GTK_CONTAINER(vbox),hbox);
1260
 
    Label = gtk_label_new(_("Path :"));
 
1293
    Label = gtk_label_new(_("Path:"));
1261
1294
    gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,2);
1262
1295
 
1263
1296
    if (CddbLocalPathModel != NULL)
1265
1298
    else
1266
1299
        CddbLocalPathModel = gtk_list_store_new(MISC_COMBO_COUNT, G_TYPE_STRING);
1267
1300
 
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);
1277
1311
 
1278
1312
    // History list
1284
1318
        path_utf8 = filename_to_display(CDDB_LOCAL_PATH);
1285
1319
        Add_String_To_Combo_List(CddbLocalPathModel, path_utf8);
1286
1320
        if (path_utf8)
1287
 
            gtk_entry_set_text(GTK_ENTRY(GTK_BIN(CddbLocalPath)->child), path_utf8);
 
1321
            gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(CddbLocalPath))), path_utf8);
1288
1322
        g_free(path_utf8);
1289
1323
    }
1290
1324
 
1291
1325
    Button = gtk_button_new_from_stock(GTK_STOCK_OPEN);
1292
1326
    gtk_box_pack_start(GTK_BOX(hbox),Button,FALSE,FALSE,0);
1293
1327
    g_signal_connect_swapped(G_OBJECT(Button),"clicked",
1294
 
                             G_CALLBACK(File_Selection_Window_For_Directory),G_OBJECT(GTK_BIN(CddbLocalPath)->child));
 
1328
                             G_CALLBACK(File_Selection_Window_For_Directory),G_OBJECT(gtk_bin_get_child(GTK_BIN(CddbLocalPath))));
1295
1329
 
1296
1330
    // CDDB Proxy Settings
1297
1331
    Frame = gtk_frame_new (_("Proxy Settings"));
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."));
1310
1344
 
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);
1313
1347
 
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();
1347
1381
        gtk_entry_set_text(GTK_ENTRY(CddbProxyUserPassword),CDDB_PROXY_USER_PASSWORD);
1348
1382
    gtk_table_attach(GTK_TABLE(Table),CddbProxyUserPassword,4,5,2,3,GTK_FILL,GTK_FILL,0,0);
1349
1383
    gtk_entry_set_visibility(GTK_ENTRY(CddbProxyUserPassword),FALSE);
1350
 
    gtk_tooltips_set_tip(Tips,CddbProxyUserPassword,_("Password of user for the the proxy server."),NULL);
 
1384
    gtk_widget_set_tooltip_text(CddbProxyUserPassword,_("Password of user for the the proxy server."));
1351
1385
    Cddb_Use_Proxy_Toggled();
1352
1386
 
1353
1387
 
1355
1389
    Frame = gtk_frame_new (_("Track Name List"));
1356
1390
    gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
1357
1391
 
1358
 
    vbox = gtk_vbox_new(FALSE,2);
 
1392
    vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
1359
1393
    gtk_container_add(GTK_CONTAINER(Frame),vbox);
1360
1394
    gtk_container_set_border_width(GTK_CONTAINER(vbox), 2);
1361
1395
 
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."));
1369
1403
 
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."));
1381
1415
 
1382
1416
 
1383
1417
    /*
1388
1422
    gtk_notebook_append_page (GTK_NOTEBOOK(OptionsNoteBook),Frame,Label);
1389
1423
    gtk_container_set_border_width(GTK_CONTAINER(Frame), 5);
1390
1424
 
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);
1394
1428
 
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."));
1400
1434
 
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);
1422
1456
    /*
1423
1457
     * Buttons box of Option Window
1424
1458
     */
1425
 
    ButtonBox = gtk_hbutton_box_new ();
 
1459
    ButtonBox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
1426
1460
    gtk_box_pack_start(GTK_BOX(OptionsVBox), ButtonBox, FALSE, FALSE, 4);
1427
1461
 
1428
1462
    gtk_button_box_set_layout (GTK_BUTTON_BOX (ButtonBox), GTK_BUTTONBOX_END);
1431
1465
 
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"));
1439
1469
 
1440
1470
 
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"));
1448
1478
 
1449
1479
 
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"));
1456
1486
 
1457
1487
    /* Show all in the options window */
1458
1488
    gtk_widget_show_all(OptionsWindow);
1462
1492
}
1463
1493
 
1464
1494
 
1465
 
void Set_Default_Comment_Check_Button_Toggled (void)
 
1495
static void Set_Default_Comment_Check_Button_Toggled (void)
1466
1496
{
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)));
1468
1498
}
1469
1499
 
1470
 
void Number_Track_Formated_Toggled (void)
 
1500
void Number_Track_Formatted_Toggled (void)
1471
1501
{
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);
1475
1505
}
1476
1506
 
1477
 
void Number_Track_Formated_Spin_Button_Changed (GtkObject *Label, GtkObject *SpinButton)
 
1507
static void
 
1508
Number_Track_Formatted_Spin_Button_Changed (GtkWidget *Label,
 
1509
                                            GtkWidget *SpinButton)
1478
1510
{
1479
1511
    gchar *tmp;
1480
1512
    gint val;
1481
1513
 
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));
1484
1516
    else
1485
1517
        val = 1;
1486
1518
 
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);
1489
1521
 
1490
1522
    gtk_label_set_text(GTK_LABEL(Label),tmp);
1491
1523
    g_free(tmp);
1492
1524
}
1493
1525
 
1494
 
void Use_Non_Standard_Id3_Reading_Character_Set_Toggled (void)
 
1526
static void
 
1527
Use_Non_Standard_Id3_Reading_Character_Set_Toggled (void)
1495
1528
{
1496
1529
    gtk_widget_set_sensitive(FileReadingId3v1v2CharacterSetCombo,
1497
 
        GTK_TOGGLE_BUTTON(UseNonStandardId3ReadingCharacterSet)->active);
 
1530
        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(UseNonStandardId3ReadingCharacterSet)));
1498
1531
}
1499
1532
 
1500
 
void Change_Id3_Settings_Toggled (void)
 
1533
static void
 
1534
Change_Id3_Settings_Toggled (void)
1501
1535
{
1502
1536
    int active;
1503
1537
 
1510
1544
#endif
1511
1545
    ||   !FileWritingId3v1WriteTag
1512
1546
    ||   !LabelId3v2Charset
1513
 
    ||   !FileWritingId3v2UseUnicodeCharacterSet
1514
 
    ||   !FileWritingId3v2UseNoUnicodeCharacterSet
1515
1547
    ||   !FileWritingId3v2UnicodeCharacterSetCombo
1516
1548
    ||   !FileWritingId3v2NoUnicodeCharacterSetCombo
1517
1549
    ||   !LabelAdditionalId3v2IconvOptions
1531
1563
       )
1532
1564
        return;
1533
1565
 
1534
 
    active = (GTK_TOGGLE_BUTTON(FileWritingId3v2UseUnicodeCharacterSet)->active != 0);
 
1566
    active = (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(FileWritingId3v2UseUnicodeCharacterSet)) != 0);
1535
1567
 
1536
 
    if (GTK_TOGGLE_BUTTON(FileWritingId3v2WriteTag)->active)
 
1568
    if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(FileWritingId3v2WriteTag)))
1537
1569
    {
1538
1570
        gtk_widget_set_sensitive(LabelId3v2Charset, TRUE);
1539
1571
 
1587
1619
        gtk_widget_set_sensitive(ConvertOldId3v2TagVersion, 0);
1588
1620
    }
1589
1621
 
1590
 
    active = GTK_TOGGLE_BUTTON(FileWritingId3v1WriteTag)->active;
 
1622
    active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(FileWritingId3v1WriteTag));
1591
1623
 
1592
1624
    gtk_widget_set_sensitive(LabelId3v1Charset, active);
1593
1625
    gtk_widget_set_sensitive(FileWritingId3v1CharacterSetCombo, active);
1597
1629
    gtk_widget_set_sensitive(FileWritingId3v1IconvOptionsIgnore, active);
1598
1630
}
1599
1631
 
1600
 
void Cddb_Use_Proxy_Toggled (void)
 
1632
static void
 
1633
Cddb_Use_Proxy_Toggled (void)
1601
1634
{
1602
 
    gtk_widget_set_sensitive(CddbProxyName,GTK_TOGGLE_BUTTON(CddbUseProxy)->active);
1603
 
    gtk_widget_set_sensitive(CddbProxyPort,GTK_TOGGLE_BUTTON(CddbUseProxy)->active);
1604
 
    gtk_widget_set_sensitive(CddbProxyUserName,GTK_TOGGLE_BUTTON(CddbUseProxy)->active);
1605
 
    gtk_widget_set_sensitive(CddbProxyUserPassword,GTK_TOGGLE_BUTTON(CddbUseProxy)->active);
 
1635
    gboolean active;
 
1636
 
 
1637
    active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(CddbUseProxy));
 
1638
    gtk_widget_set_sensitive(CddbProxyName,active);
 
1639
    gtk_widget_set_sensitive(CddbProxyPort,active);
 
1640
    gtk_widget_set_sensitive(CddbProxyUserName,active);
 
1641
    gtk_widget_set_sensitive(CddbProxyUserPassword,active);
1606
1642
}
1607
1643
 
1608
1644
/* Callback from Open_OptionsWindow */
1609
 
gboolean OptionsWindow_Key_Press (GtkWidget *window, GdkEvent *event)
 
1645
static gboolean
 
1646
OptionsWindow_Key_Press (GtkWidget *window, GdkEvent *event)
1610
1647
{
1611
1648
    GdkEventKey *kevent;
1612
1649
 
1615
1652
        kevent = (GdkEventKey *)event;
1616
1653
        switch(kevent->keyval)
1617
1654
        {
1618
 
            case GDK_Escape:
 
1655
            case GDK_KEY_Escape:
1619
1656
            {
1620
1657
                OptionsWindow_Quit();
1621
1658
                break;
1626
1663
}
1627
1664
 
1628
1665
/* Callback from Open_OptionsWindow */
1629
 
void OptionsWindow_Apply_Button(void)
1630
 
{
1631
 
    if (!Check_Config()) return;
1632
 
 
1633
 
#ifndef WIN32
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)));
1639
 
#endif
1640
 
 
1641
 
    Apply_Changes_Of_Preferences_Window();
1642
 
 
1643
 
    OptionsWindow_Quit();
1644
 
    Statusbar_Message(_("Changes applied"),TRUE);
1645
 
}
1646
 
 
1647
 
/* Callback from Open_OptionsWindow */
1648
 
void OptionsWindow_Save_Button(void)
1649
 
{
1650
 
    if (!Check_Config()) return;
1651
 
 
1652
 
#ifndef WIN32
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)));
1658
 
#endif
 
1666
static void
 
1667
OptionsWindow_Save_Button (void)
 
1668
{
 
1669
    if (!Check_Config()) return;
 
1670
 
 
1671
#ifndef G_OS_WIN32
 
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 */
1659
1678
 
1660
1679
    Save_Changes_Of_Preferences_Window();
1661
1680
 
1664
1683
}
1665
1684
 
1666
1685
/* Callback from Open_OptionsWindow */
1667
 
void OptionsWindow_Cancel_Button(void)
 
1686
static void
 
1687
OptionsWindow_Cancel_Button (void)
1668
1688
{
1669
1689
    OptionsWindow_Quit();
1670
1690
    Statusbar_Message(_("Configuration unchanged"),TRUE);
1671
1691
}
1672
1692
 
1673
1693
/* Callback from Open_OptionsWindow */
1674
 
void OptionsWindow_Quit(void)
 
1694
static void
 
1695
OptionsWindow_Quit (void)
1675
1696
{
1676
1697
    if (OptionsWindow)
1677
1698
    {
1679
1700
 
1680
1701
        /* Now quit */
1681
1702
        gtk_widget_destroy(OptionsWindow);
1682
 
        OptionsWindow = (GtkWidget *)NULL;
 
1703
        OptionsWindow = NULL;
1683
1704
        gtk_widget_set_sensitive(MainWindow, TRUE);
1684
1705
    }
1685
1706
}
1693
1714
    {
1694
1715
        //gint x, y;
1695
1716
        gint width, height;
1696
 
 
1697
 
        if ( OptionsWindow->window!=NULL && gdk_window_is_visible(OptionsWindow->window)
1698
 
        &&   gdk_window_get_state(OptionsWindow->window)!=GDK_WINDOW_STATE_MAXIMIZED )
 
1717
        GdkWindow *window;
 
1718
 
 
1719
        window = gtk_widget_get_window(OptionsWindow);
 
1720
 
 
1721
        if ( window && gdk_window_is_visible(window) && gdk_window_get_state(window)!=GDK_WINDOW_STATE_MAXIMIZED )
1699
1722
        {
1700
1723
            // Position and Origin of the preferences window
1701
1724
            //gdk_window_get_root_origin(OptionsWindow->window,&x,&y);
1702
1725
            //OPTIONS_WINDOW_X = x;
1703
1726
            //OPTIONS_WINDOW_Y = y;
1704
 
            gdk_window_get_size(OptionsWindow->window,&width,&height);
 
1727
            width = gdk_window_get_width(window);
 
1728
            height = gdk_window_get_height(window);
1705
1729
            OPTIONS_WINDOW_WIDTH  = width;
1706
1730
            OPTIONS_WINDOW_HEIGHT = height;
1707
1731
        }
1720
1744
 
1721
1745
 
1722
1746
/*
1723
 
 * Check_Config: Check if config informations are correct
 
1747
 * Check_Config: Check if config information are correct
1724
1748
 * dsd: Check this... going from utf8 to raw is dodgy stuff
1725
1749
 *
1726
1750
 * Problem noted : if a character is escaped (like : 'C\351line DION') in
1732
1756
 *  - converted to UTF-8 (path_utf8)                : CĆ©line DION - D'eux (1995)
1733
1757
 *  - try to convert to system encoding (path_real) : ?????
1734
1758
 */
1735
 
gint Check_DefaultPathToMp3 (void)
 
1759
static gboolean
 
1760
Check_DefaultPathToMp3 (void)
1736
1761
{
1737
1762
    gchar *path_utf8;
1738
1763
    gchar *path_real;
1739
1764
    struct stat stbuf;
1740
1765
 
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)
1743
1768
    {
1744
1769
        g_free(path_utf8);
1745
 
        return 1;
 
1770
        return TRUE;
1746
1771
    }
1747
1772
 
1748
1773
    path_real = filename_from_display(path_utf8);
1749
1774
 
1750
 
#ifdef WIN32
1751
 
    /* On win32 : stat("c:\path\to\dir") succeed, while stat("c:\path\to\dir\") fails */
 
1775
#ifdef G_OS_WIN32
 
1776
    /* On win32 : stat("c:\path\to\dir") succeed, while stat("c:\path\to\dir\")
 
1777
     * fails.
 
1778
     */
1752
1779
    ET_Win32_Path_Remove_Trailing_Backslash(path_real);
1753
 
#endif
 
1780
#endif /* G_OS_WIN32 */
1754
1781
 
1755
1782
    if ( stat(path_real,&stbuf)==0 && S_ISDIR(stbuf.st_mode) )
1756
1783
    {
1757
1784
        g_free(path_real);
1758
1785
        g_free(path_utf8);
1759
 
        return 1;    /* Path is good */
 
1786
        return TRUE; /* Path is good */
1760
1787
    }else
1761
1788
    {
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),
1767
 
                                        NULL,
1768
 
                                        GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
1769
 
                                        msg,
1770
 
                                        GTK_STOCK_DIALOG_ERROR,
1771
 
                                        GTK_STOCK_OK, GTK_RESPONSE_OK,
1772
 
                                        NULL);
1773
 
        gtk_dialog_run(GTK_DIALOG(msgbox));
1774
 
        gtk_widget_destroy(msgbox);
1775
 
        g_free(msg);
 
1789
        GtkWidget *msgdialog = gtk_message_dialog_new(GTK_WINDOW(OptionsWindow),
 
1790
                                                      GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
 
1791
                                                      GTK_MESSAGE_ERROR,
 
1792
                                                      GTK_BUTTONS_CLOSE,
 
1793
                                                      "%s",
 
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"));
 
1797
 
 
1798
        gtk_dialog_run(GTK_DIALOG(msgdialog));
 
1799
        gtk_widget_destroy(msgdialog);
1776
1800
        g_free(path_real);
1777
1801
        g_free(path_utf8);
1778
 
        return 0;
 
1802
        return FALSE;
1779
1803
    }
1780
1804
}
1781
1805
 
1804
1828
    && (test_conversion_charset(reading_character,"UTF-8")!=TRUE) )
1805
1829
    {
1806
1830
        gchar *msg = g_strdup_printf(_("The character set translation from '%s'\n"
1807
 
                                       "to '%s' isn't supported!"),reading_character,"UTF-8");
1808
 
        GtkWidget *msgbox = msg_box_new(_("Error..."),
 
1831
                                       "to '%s' is not supported"),reading_character,"UTF-8");
 
1832
        GtkWidget *msgbox = msg_box_new(_("Error"),
1809
1833
                                        GTK_WINDOW(OptionsWindow),
1810
1834
                                        NULL,
1811
1835
                                        GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
1824
1848
    && (test_conversion_charset("UTF-8",writing_character)!=TRUE) )
1825
1849
    {
1826
1850
        gchar *msg = g_strdup_printf(_("The character set translation from '%s'\n"
1827
 
                                       "to '%s' isn't supported!"),"UTF-8",writing_character);
1828
 
        GtkWidget *msgbox = msg_box_new(_("Error..."),
 
1851
                                       "to '%s' is not supported"),"UTF-8",writing_character);
 
1852
        GtkWidget *msgbox = msg_box_new(_("Error"),
1829
1853
                                        GTK_WINDOW(OptionsWindow),
1830
1854
                                        NULL,
1831
1855
                                        GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
1844
1868
}
1845
1869
*************/
1846
1870
 
1847
 
gint Check_DefaultComment (void)
 
1871
static gboolean
 
1872
Check_DefaultComment (void)
1848
1873
{
1849
1874
    const gchar *file;
1850
1875
 
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);
1854
1879
 
1855
 
    return 1;    /* A blank entry is ignored */
 
1880
    return TRUE;    /* A blank entry is ignored */
1856
1881
}
1857
1882
 
1858
1883
/*
1859
1884
 * Check if player binary is found
1860
1885
 */
1861
 
gint Check_FilePlayerCombo (void)
 
1886
static gboolean
 
1887
Check_FilePlayerCombo (void)
1862
1888
{
1863
1889
    gchar *program_path = NULL;
1864
1890
    gchar *program_path_validated = NULL;
1865
1891
 
1866
 
#ifdef WIN32
1867
 
    return 1; /* FIXME see Check_If_Executable_Exists */
 
1892
#ifdef G_OS_WIN32
 
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 */
1869
 
#endif
 
1895
#endif /* G_OS_WIN32 */
1870
1896
 
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)
1877
1903
 
1878
1904
    if ( program_path && strlen(program_path)>0 && !program_path_validated ) // A file is typed but it is invalid!
1879
1905
    {
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),
1884
 
                                        NULL,
1885
 
                                        GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
1886
 
                                        msg,
1887
 
                                        GTK_STOCK_DIALOG_ERROR,
1888
 
                                        GTK_STOCK_OK, GTK_RESPONSE_OK,
1889
 
                                        NULL);
1890
 
        gtk_dialog_run(GTK_DIALOG(msgbox));
1891
 
        gtk_widget_destroy(msgbox);
1892
 
        g_free(msg);
 
1906
        GtkWidget *msgdialog = gtk_message_dialog_new(GTK_WINDOW(OptionsWindow),
 
1907
                                                      GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
 
1908
                                                      GTK_MESSAGE_ERROR,
 
1909
                                                      GTK_BUTTONS_CLOSE,
 
1910
                                                      _("The audio file player '%s' cannot be found"),
 
1911
                                                      program_path);
 
1912
        gtk_window_set_title(GTK_WINDOW(msgdialog),_("Audio Player Error"));
 
1913
 
 
1914
        gtk_dialog_run(GTK_DIALOG(msgdialog));
 
1915
        gtk_widget_destroy(msgdialog);
1893
1916
 
1894
1917
        g_free(program_path);
1895
 
        return 0;
 
1918
        return FALSE;
1896
1919
    } else
1897
1920
    {
1898
1921
        g_free(program_path);
1899
1922
        g_free(program_path_validated);
1900
 
        return 1;
 
1923
        return TRUE;
1901
1924
    }
1902
1925
}
1903
1926
 
1904
 
gint Check_Config (void)
 
1927
static gboolean
 
1928
Check_Config (void)
1905
1929
{
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 */
1911
1934
    else
1912
 
        return 0;    /* Oups! */
 
1935
        return FALSE; /* Oops! */
1913
1936
}
1914
1937
 
1915
1938
 
1918
1941
 * Manage Check buttons into Scanner tab: conversion group
1919
1942
 * This reproduces "something" like the behaviour of radio buttons with check buttons
1920
1943
 */
1921
 
void Scanner_Convert_Check_Button_Toggled_1 (GtkObject *object_rec, GtkObject *object_emi)
1922
 
{
1923
 
    if (!object_rec || !object_emi) return;
1924
 
 
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);
1927
 
 
1928
 
}
1929
 
 
1930
 
 
1931
 
void DefaultPathToMp3_Combo_Add_String (void)
1932
 
{
1933
 
    const gchar *path;
1934
 
 
1935
 
    path = gtk_entry_get_text(GTK_ENTRY(GTK_BIN(DefaultPathToMp3)->child));
1936
 
    Add_String_To_Combo_List(GTK_LIST_STORE(DefaultPathModel), (gchar *)path);
1937
 
}
1938
 
 
1939
 
void CddbLocalPath_Combo_Add_String (void)
1940
 
{
1941
 
    const gchar *path;
1942
 
 
1943
 
    path = gtk_entry_get_text(GTK_ENTRY(GTK_BIN(CddbLocalPath)->child));
1944
 
    Add_String_To_Combo_List(GTK_LIST_STORE(CddbLocalPath), (gchar *)path);
 
1944
static void
 
1945
Scanner_Convert_Check_Button_Toggled_1 (GtkWidget *object_rec,
 
1946
                                        GtkWidget *object_emi)
 
1947
{
 
1948
    g_return_if_fail (object_rec != NULL || object_emi != NULL);
 
1949
 
 
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)));
 
1952
}
 
1953
 
 
1954
static void
 
1955
DefaultPathToMp3_Combo_Add_String (void)
 
1956
{
 
1957
    const gchar *path;
 
1958
 
 
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);
 
1961
}
 
1962
 
 
1963
static void
 
1964
CddbLocalPath_Combo_Add_String (void)
 
1965
{
 
1966
    const gchar *path;
 
1967
 
 
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);
1945
1970
}
1946
1971
 
1947
1972