~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): James Cowgill, James Cowgill, Alessio Treglia
  • Date: 2014-02-28 15:50:09 UTC
  • mfrom: (1.3.14)
  • mto: This revision was merged to the branch mainline in revision 15.
  • Revision ID: package-import@ubuntu.com-20140228155009-4n5atwchr56bg1xn
Tags: 2.1.10-1
* Team upload.

[ James Cowgill ]
* New upstream release (Closes: #560813, #500051, #518955, #727811).
* Add myself to the list of uploaders.
* Use debhelper v9.
* debian/control:
  - Build depend on desktop-file-utils and yelp-tools.
  - Recommend on gnome-icon-theme, gvfs and yelp (thanks David King)
  - Update homepage location.
  - Bump standards to 3.9.5 (no changes required).
* debian/copyright:
  - Rewritten to use DEP-5
* debian/rules:
  - Enable all hardening flags.
  - Remove unnecessary dh overrides.
* debian/patches:
  - Remove 1001-c90_style.patch, applied upstream.
  - Add patch to remove appdata from buildsystem.
    Can't use until appdata-tools is introduced into Debian.

[ Alessio Treglia ]
* Improve package description (Closes: #691687)

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 *
16
16
 *  You should have received a copy of the GNU General Public License
17
17
 *  along with this program; if not, write to the Free Software
18
 
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
18
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
19
 */
20
20
 
21
21
#include <config.h>
25
25
#include <stdlib.h>
26
26
#include <gdk/gdkkeysyms.h>
27
27
#include <gdk/gdk.h>
28
 
#include <glib/gi18n-lib.h>
 
28
#include <glib/gi18n.h>
29
29
#include <stdio.h>
30
30
#include <string.h>
31
31
#include <sys/stat.h>
41
41
#include "browser.h"
42
42
#include "cddb.h"
43
43
#include "charset.h"
44
 
#ifdef G_OS_WIN32
45
44
#include "win32/win32dep.h"
46
 
#endif /* G_OS_WIN32 */
 
45
 
 
46
static const guint BOX_SPACING = 6;
47
47
 
48
48
/**************
49
49
 * Prototypes *
52
52
static void OptionsWindow_Quit (void);
53
53
static void OptionsWindow_Save_Button (void);
54
54
static void OptionsWindow_Cancel_Button (void);
55
 
static gboolean OptionsWindow_Key_Press (GtkWidget *window, GdkEvent *event);
56
55
static gboolean Check_Config (void);
57
56
 
58
57
static void Set_Default_Comment_Check_Button_Toggled (void);
59
58
static void Number_Track_Formatted_Toggled (void);
60
59
static void Number_Track_Formatted_Spin_Button_Changed (GtkWidget *Label,
61
60
                                                        GtkWidget *SpinButton);
 
61
static void et_prefs_on_pad_disc_number_toggled (void);
 
62
static void et_prefs_on_pad_disc_number_spinbutton_changed (GtkWidget *label,
 
63
                                                            GtkWidget *spinbutton);
 
64
 
62
65
static void Change_Id3_Settings_Toggled (void);
63
66
static void Use_Non_Standard_Id3_Reading_Character_Set_Toggled (void);
64
67
static void Scanner_Convert_Check_Button_Toggled_1 (GtkWidget *object_rec,
68
71
static void DefaultPathToMp3_Combo_Add_String (void);
69
72
static void CddbLocalPath_Combo_Add_String (void);
70
73
 
 
74
static void et_preferences_on_response (GtkDialog *dialog, gint response_id,
 
75
                                        gpointer user_data);
71
76
 
72
77
 
73
78
/*************
84
89
void Open_OptionsWindow (void)
85
90
{
86
91
    GtkWidget *OptionsVBox;
87
 
    GtkWidget *ButtonBox;
88
92
    GtkWidget *Button;
89
93
    GtkWidget *Label;
90
94
    GtkWidget *Frame;
92
96
    GtkWidget *VBox, *vbox;
93
97
    GtkWidget *HBox, *hbox, *id3v1v2hbox;
94
98
    GtkWidget *Separator;
95
 
    GtkWidget *EventBox;
96
 
    gchar temp[MAX_STRING_LEN];
97
99
    gchar *path_utf8;
98
100
    gchar *program_path;
99
101
 
105
107
    }
106
108
 
107
109
    /* The window */
108
 
    OptionsWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL);
109
 
    /* Config */
110
 
    gtk_window_set_position(GTK_WINDOW(OptionsWindow),GTK_WIN_POS_CENTER);
111
 
    gtk_window_set_transient_for(GTK_WINDOW(OptionsWindow),GTK_WINDOW(MainWindow));
112
 
    gtk_container_set_border_width(GTK_CONTAINER(OptionsWindow), 5);
113
 
    gtk_window_set_default_size(GTK_WINDOW(OptionsWindow),OPTIONS_WINDOW_WIDTH,OPTIONS_WINDOW_HEIGHT);
114
 
    /* Title */
115
 
    gtk_window_set_title(GTK_WINDOW(OptionsWindow),_("Preferences…"));
 
110
    OptionsWindow = gtk_dialog_new_with_buttons (_("Preferences"),
 
111
                                                 GTK_WINDOW (MainWindow),
 
112
                                                 GTK_DIALOG_DESTROY_WITH_PARENT,
 
113
                                                 GTK_STOCK_CANCEL,
 
114
                                                 GTK_RESPONSE_REJECT,
 
115
                                                 GTK_STOCK_OK,
 
116
                                                 GTK_RESPONSE_ACCEPT, NULL);
 
117
 
 
118
    gtk_container_set_border_width (GTK_CONTAINER (OptionsWindow), 6);
116
119
 
117
120
    /* Signals connection */
118
 
    g_signal_connect(G_OBJECT(OptionsWindow),"destroy", G_CALLBACK(OptionsWindow_Quit),NULL);
119
 
    g_signal_connect(G_OBJECT(OptionsWindow),"delete_event",G_CALLBACK(OptionsWindow_Quit),NULL);
120
 
    g_signal_connect(G_OBJECT(OptionsWindow),"key_press_event",
121
 
                     G_CALLBACK(OptionsWindow_Key_Press),NULL);
 
121
    gtk_dialog_set_default_response (GTK_DIALOG (OptionsWindow),
 
122
                                     GTK_RESPONSE_ACCEPT);
 
123
    g_signal_connect (OptionsWindow, "response",
 
124
                      G_CALLBACK (et_preferences_on_response), NULL);
122
125
 
123
126
     /* Options */
124
127
     /* The vbox */
125
 
    OptionsVBox = gtk_box_new(GTK_ORIENTATION_VERTICAL,0);
126
 
    gtk_box_set_spacing (GTK_BOX(OptionsVBox),5);
127
 
    gtk_container_add(GTK_CONTAINER(OptionsWindow),OptionsVBox);
 
128
    OptionsVBox = gtk_dialog_get_content_area (GTK_DIALOG (OptionsWindow));
 
129
    gtk_box_set_spacing (GTK_BOX (OptionsVBox), 12);
128
130
 
129
131
     /* Options NoteBook */
130
132
    OptionsNoteBook = gtk_notebook_new();
138
140
     * Browser
139
141
     */
140
142
    Label = gtk_label_new(_("Browser"));
141
 
    Frame = gtk_frame_new(_("Browser"));
142
 
    gtk_notebook_append_page(GTK_NOTEBOOK(OptionsNoteBook),Frame,Label);
143
 
    gtk_container_set_border_width(GTK_CONTAINER(Frame), 5);
144
 
 
145
 
    VBox = gtk_box_new(GTK_ORIENTATION_VERTICAL,4);
146
 
    gtk_container_add(GTK_CONTAINER(Frame),VBox);
147
 
    gtk_container_set_border_width(GTK_CONTAINER(VBox), 4);
148
 
 
149
 
 
150
 
    /* File Browser frame */
151
 
    Frame = gtk_frame_new(_("File Browser"));
152
 
    gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
153
 
    vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,0);
154
 
    gtk_container_add(GTK_CONTAINER(Frame),vbox);
155
 
    gtk_container_set_border_width(GTK_CONTAINER(vbox), 2);
 
143
    vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
 
144
    gtk_notebook_append_page (GTK_NOTEBOOK (OptionsNoteBook), vbox, Label);
 
145
    gtk_container_set_border_width (GTK_CONTAINER (vbox), BOX_SPACING);
156
146
 
157
147
    /* Default directory */
158
 
    HBox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,2);
 
148
    HBox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, BOX_SPACING);
159
149
    gtk_box_pack_start(GTK_BOX(vbox),HBox,FALSE,FALSE,0);
160
150
 
161
151
    // Label
230
220
     * Misc
231
221
     */
232
222
    Label = gtk_label_new (_("Misc"));
233
 
    Frame = gtk_frame_new (_("Misc"));
234
 
    gtk_notebook_append_page (GTK_NOTEBOOK(OptionsNoteBook),Frame,Label);
235
 
    gtk_container_set_border_width(GTK_CONTAINER(Frame), 5);
236
 
 
237
 
    VBox = gtk_box_new(GTK_ORIENTATION_VERTICAL,4);
238
 
    gtk_container_add(GTK_CONTAINER(Frame),VBox);
239
 
    gtk_container_set_border_width(GTK_CONTAINER(VBox), 4);
240
 
 
 
223
    VBox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
 
224
    gtk_notebook_append_page (GTK_NOTEBOOK (OptionsNoteBook), VBox, Label);
 
225
    gtk_container_set_border_width (GTK_CONTAINER (VBox), BOX_SPACING);
241
226
 
242
227
    /* User interface */
243
228
    Frame = gtk_frame_new (_("User Interface"));
244
229
    gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
245
 
    vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
 
230
    vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
246
231
    gtk_container_add(GTK_CONTAINER(Frame),vbox);
247
 
    gtk_container_set_border_width(GTK_CONTAINER(vbox), 2);
 
232
    gtk_container_set_border_width (GTK_CONTAINER (vbox), BOX_SPACING);
248
233
 
249
234
    // Show header infos
250
235
    ShowHeaderInfos = gtk_check_button_new_with_label(_("Show header information of file"));
254
239
        "the bitrate, the time, the size, will be displayed under the filename entry."));
255
240
 
256
241
    // Display color mode for changed files in list
257
 
    hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,2);
 
242
    hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, BOX_SPACING);
258
243
    gtk_box_pack_start(GTK_BOX(vbox),hbox,FALSE,FALSE,0);
259
 
    gtk_container_set_border_width(GTK_CONTAINER(hbox), 2);
260
244
    Label = gtk_label_new(_("Display changed files in list using:"));
261
245
    gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,0);
262
246
 
274
258
    /* Sorting List Options */
275
259
    Frame = gtk_frame_new (_("Sorting List Options"));
276
260
    gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
277
 
    vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
 
261
    vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
278
262
    gtk_container_add(GTK_CONTAINER(Frame),vbox);
279
 
    gtk_container_set_border_width(GTK_CONTAINER(vbox), 2);
 
263
    gtk_container_set_border_width (GTK_CONTAINER(vbox), BOX_SPACING);
280
264
 
281
 
    hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,2);
 
265
    hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
282
266
    gtk_box_pack_start(GTK_BOX(vbox),hbox,FALSE,FALSE,0);
283
 
    gtk_container_set_border_width(GTK_CONTAINER(hbox), 2);
284
267
    /* Sorting method */
285
268
    Label = gtk_label_new(_("Sort the file list by:"));
286
269
    gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,0);
287
270
 
288
 
    EventBox = gtk_event_box_new();
289
271
    SortingFileCombo = gtk_combo_box_text_new();
290
 
    gtk_container_add(GTK_CONTAINER(EventBox),SortingFileCombo);
291
 
    gtk_box_pack_start(GTK_BOX(hbox),EventBox,FALSE,FALSE,2);
 
272
    gtk_box_pack_start (GTK_BOX (hbox), SortingFileCombo, FALSE, FALSE, 2);
292
273
    gtk_widget_set_size_request(GTK_WIDGET(SortingFileCombo), 260, -1);
293
274
    gtk_combo_box_set_wrap_width(GTK_COMBO_BOX(SortingFileCombo),2); // Two columns
294
275
 
295
276
    // Items of option menu
296
 
    gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Ascending file name"));
297
 
    gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Descending file name"));
298
 
    gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Ascending track number"));
299
 
    gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Descending track number"));
300
 
    gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Ascending creation date"));
301
 
    gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Descending creation date"));
 
277
    gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
 
278
                                    _("Ascending filename"));
 
279
    gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
 
280
                                    _("Descending filename"));
302
281
    gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Ascending title"));
303
282
    gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Descending title"));
304
283
    gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Ascending artist"));
305
284
    gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Descending artist"));
 
285
    gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
 
286
                                    _("Ascending album artist"));
 
287
    gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
 
288
                                    _("Descending album artist"));
306
289
    gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Ascending album"));
307
290
    gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Descending album"));
308
291
    gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Ascending year"));
309
292
    gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Descending year"));
 
293
    gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
 
294
                                    _("Ascending disc number"));
 
295
    gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
 
296
                                    _("Descending disc number"));
 
297
    gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
 
298
                                    _("Ascending track number"));
 
299
    gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
 
300
                                    _("Descending track number"));
310
301
    gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Ascending genre"));
311
302
    gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Descending genre"));
312
303
    gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Ascending comment"));
313
304
    gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Descending comment"));
 
305
    gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
 
306
                                    _("Ascending composer"));
 
307
    gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
 
308
                                    _("Descending composer"));
 
309
    gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
 
310
                                    _("Ascending original artist"));
 
311
    gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
 
312
                                    _("Descending original artist"));
 
313
    gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
 
314
                                    _("Ascending copyright"));
 
315
    gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
 
316
                                    _("Descending copyright"));
 
317
    gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
 
318
                                    _("Ascending URL"));
 
319
    gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
 
320
                                    _("Descending URL"));
 
321
    gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
 
322
                                    _("Ascending encoded by"));
 
323
    gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
 
324
                                    _("Descending encoded by"));
 
325
    gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
 
326
                                    _("Ascending creation date"));
 
327
    gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
 
328
                                    _("Descending creation date"));
314
329
 
315
330
    gtk_combo_box_set_active(GTK_COMBO_BOX(SortingFileCombo), SORTING_FILE_MODE);
316
 
    gtk_widget_set_tooltip_text(EventBox,_("Select the type of file sorting "
317
 
        "when loading a directory."));
 
331
    gtk_widget_set_tooltip_text(SortingFileCombo,
 
332
                                _("Select the type of file sorting when "
 
333
                                "loading a directory."));
318
334
 
319
335
    SortingFileCaseSensitive = gtk_check_button_new_with_label(_("Case sensitive"));
320
336
#ifndef G_OS_WIN32
328
344
    gtk_widget_set_tooltip_text(SortingFileCaseSensitive,_("If activated, the "
329
345
        "sorting of the list will be dependent on the case."));
330
346
 
331
 
    /* Message Dialog Position */
332
 
    Frame = gtk_frame_new (_("Message Dialog Position"));
333
 
    gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
334
 
    Table = gtk_table_new(2,2,FALSE);
335
 
    gtk_container_add(GTK_CONTAINER(Frame),Table);
336
 
    //gtk_table_set_row_spacings(GTK_TABLE(Table),2);
337
 
    gtk_table_set_col_spacings(GTK_TABLE(Table),4);
338
 
 
339
 
 
340
 
    MessageBoxPositionNone = gtk_radio_button_new_with_label(NULL,_("No particular position"));
341
 
    gtk_table_attach(GTK_TABLE(Table),MessageBoxPositionNone,0,1,0,1,GTK_FILL,GTK_FILL,0,0);
342
 
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(MessageBoxPositionNone),
343
 
        MESSAGE_BOX_POSITION_NONE);
344
 
    gtk_widget_set_tooltip_text(MessageBoxPositionNone,_("Let the Window Manager "
345
 
        "to place the windows."));
346
 
 
347
 
    MessageBoxPositionCenterOnParent = gtk_radio_button_new_with_label(
348
 
        gtk_radio_button_get_group(GTK_RADIO_BUTTON(MessageBoxPositionNone)),
349
 
        _("Center of the main window"));
350
 
    gtk_table_attach(GTK_TABLE(Table),MessageBoxPositionCenterOnParent,1,2,0,1,GTK_FILL,GTK_FILL,0,0);
351
 
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(MessageBoxPositionCenterOnParent),
352
 
        MESSAGE_BOX_POSITION_CENTER_ON_PARENT);
353
 
    gtk_widget_set_tooltip_text(MessageBoxPositionCenterOnParent,_("Windows should "
354
 
        "be placed in the center of the main window."));
355
 
 
356
 
    MessageBoxPositionCenter = gtk_radio_button_new_with_label(
357
 
        gtk_radio_button_get_group(GTK_RADIO_BUTTON(MessageBoxPositionNone)),
358
 
        _("Center of the screen"));
359
 
    gtk_table_attach(GTK_TABLE(Table),MessageBoxPositionCenter,0,1,1,2,GTK_FILL,GTK_FILL,0,0);
360
 
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(MessageBoxPositionCenter),
361
 
        MESSAGE_BOX_POSITION_CENTER);
362
 
    gtk_widget_set_tooltip_text(MessageBoxPositionCenter,_("Windows should be placed "
363
 
        "in the center of the screen."));
364
 
 
365
 
    MessageBoxPositionMouse = gtk_radio_button_new_with_label(
366
 
        gtk_radio_button_get_group(GTK_RADIO_BUTTON(MessageBoxPositionNone)),
367
 
        _("Mouse position"));
368
 
    gtk_table_attach(GTK_TABLE(Table),MessageBoxPositionMouse,1,2,1,2,GTK_FILL,GTK_FILL,0,0);
369
 
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(MessageBoxPositionMouse),
370
 
        MESSAGE_BOX_POSITION_MOUSE);
371
 
    gtk_widget_set_tooltip_text(MessageBoxPositionMouse,_("Windows should be placed "
372
 
        "at the current mouse position."));
373
 
 
374
347
    /* File Player */
375
348
    Frame = gtk_frame_new (_("File Audio Player"));
376
349
    gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
381
354
    else
382
355
        gtk_list_store_clear(FilePlayerModel);
383
356
 
384
 
    hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,2);
 
357
    hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, BOX_SPACING);
385
358
    gtk_container_add(GTK_CONTAINER(Frame),hbox);
386
 
    gtk_container_set_border_width(GTK_CONTAINER(hbox), 4);
 
359
    gtk_container_set_border_width (GTK_CONTAINER (hbox), BOX_SPACING);
387
360
    Label = gtk_label_new (_("Player to run:"));
388
361
    gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,0);
389
362
    FilePlayerCombo = gtk_combo_box_new_with_model_and_entry(GTK_TREE_MODEL(FilePlayerModel));
410
383
    /* Log options */
411
384
    Frame = gtk_frame_new (_("Log Options"));
412
385
    gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
413
 
    vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
 
386
    vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
414
387
    gtk_container_add(GTK_CONTAINER(Frame),vbox);
415
 
    gtk_container_set_border_width(GTK_CONTAINER(vbox), 2);
 
388
    gtk_container_set_border_width (GTK_CONTAINER (vbox), BOX_SPACING);
416
389
 
417
390
    // Show / hide log view
418
391
    ShowLogView = gtk_check_button_new_with_label(_("Show log view in main window"));
422
395
                                            "visible in the main window."));
423
396
   
424
397
    // Max number of lines
425
 
    hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,2);
 
398
    hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, BOX_SPACING);
426
399
    gtk_box_pack_start(GTK_BOX(vbox),hbox,FALSE,FALSE,0);
427
 
    gtk_container_set_border_width(GTK_CONTAINER(hbox), 4);
428
400
    Label = gtk_label_new (_("Max number of lines:"));
429
401
    gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,0);
430
402
    
444
416
     * File Settings
445
417
     */
446
418
    Label = gtk_label_new (_("File Settings"));
447
 
    Frame = gtk_frame_new (_("File Settings"));
448
 
    gtk_notebook_append_page (GTK_NOTEBOOK(OptionsNoteBook),Frame,Label);
449
 
    gtk_container_set_border_width(GTK_CONTAINER(Frame),5);
450
 
 
451
 
    VBox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
452
 
    gtk_container_add(GTK_CONTAINER(Frame),VBox);
453
 
    gtk_container_set_border_width(GTK_CONTAINER(VBox),4);
454
 
 
 
419
    VBox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
 
420
    gtk_notebook_append_page (GTK_NOTEBOOK (OptionsNoteBook), VBox, Label);
 
421
    gtk_container_set_border_width (GTK_CONTAINER (VBox), BOX_SPACING);
455
422
 
456
423
    /* File (name) Options */
457
424
    Frame = gtk_frame_new (_("File Options"));
458
425
    gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
459
 
    vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
 
426
    vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
460
427
    gtk_container_add(GTK_CONTAINER(Frame),vbox);
461
 
    gtk_container_set_border_width(GTK_CONTAINER(vbox), 2);
 
428
    gtk_container_set_border_width (GTK_CONTAINER(vbox), BOX_SPACING);
462
429
 
463
430
    ReplaceIllegalCharactersInFilename = gtk_check_button_new_with_label(_("Replace illegal characters in filename (for Windows and CD-Rom)"));
464
431
    gtk_box_pack_start(GTK_BOX(vbox),ReplaceIllegalCharactersInFilename,FALSE,FALSE,0);
468
435
        "of the filename to avoid problem when renaming the file. This is useful when renaming the "
469
436
        "file from the tag with the scanner."));
470
437
 
471
 
    hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,2);
 
438
    hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, BOX_SPACING);
472
439
    gtk_box_pack_start(GTK_BOX(vbox),hbox,FALSE,FALSE,0);
473
 
    gtk_container_set_border_width(GTK_CONTAINER(hbox), 2);
474
440
    /* Extension case (lower/upper?) */
475
441
    Label = gtk_label_new(_("Convert filename extension to:"));
476
442
    gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,0);
511
477
        "file information by detecting changes of the parent directory."));
512
478
 
513
479
 
514
 
    /* Character Set for File Name */
515
 
    Frame = gtk_frame_new (_("Character Set for File Name"));
 
480
    /* Character Set for Filename */
 
481
    Frame = gtk_frame_new (_("Character Set for Filename"));
516
482
    gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
517
 
    vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
 
483
    vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
518
484
    gtk_container_add(GTK_CONTAINER(Frame),vbox);
519
 
    gtk_container_set_border_width(GTK_CONTAINER(vbox), 2);
520
 
 
521
 
    /****hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,2);
522
 
    gtk_box_pack_start(GTK_BOX(vbox),hbox,FALSE,FALSE,0);
523
 
    gtk_container_set_border_width(GTK_CONTAINER(hbox), 2);***/
524
 
 
525
 
    Table = gtk_table_new(4,2,FALSE);
 
485
    gtk_container_set_border_width (GTK_CONTAINER (vbox), BOX_SPACING);
 
486
 
 
487
    Table = et_grid_new (4, 2);
526
488
    gtk_box_pack_start(GTK_BOX(vbox),Table,FALSE,FALSE,0);
527
 
    //gtk_table_set_row_spacings(GTK_TABLE(Table),2);
528
 
    gtk_table_set_col_spacings(GTK_TABLE(Table),2);
 
489
    /*gtk_grid_set_row_spacing (GTK_GRID (Table), 2);*/
 
490
    gtk_grid_set_column_spacing (GTK_GRID (Table), 2 * BOX_SPACING);
529
491
 
530
492
    /* Rules for character set */
531
493
    Label = gtk_label_new(_("Rules to apply if some characters can't be converted to "
532
494
        "the system character encoding when writing filename:"));
533
 
    gtk_table_attach(GTK_TABLE(Table),Label,0,2,0,1,GTK_FILL,GTK_FILL,0,0);
 
495
    gtk_grid_attach (GTK_GRID (Table), Label, 0, 0, 2, 1);
534
496
    gtk_misc_set_alignment(GTK_MISC(Label),0,0.5);
535
497
 
536
 
    Label = gtk_label_new("    ");
537
 
    gtk_table_attach(GTK_TABLE(Table),Label,0,1,1,2,GTK_FILL,GTK_FILL,0,0);
538
498
 
539
499
    FilenameCharacterSetOther = gtk_radio_button_new_with_label(NULL,_("Try another "
540
500
        "character encoding"));
541
 
    gtk_table_attach(GTK_TABLE(Table),FilenameCharacterSetOther,1,2,1,2,GTK_FILL,GTK_FILL,0,0);
 
501
    gtk_grid_attach (GTK_GRID (Table), FilenameCharacterSetOther, 1, 1, 1, 1);
542
502
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FilenameCharacterSetOther),FILENAME_CHARACTER_SET_OTHER);
543
503
    gtk_widget_set_tooltip_text(FilenameCharacterSetOther,_("With this option, it will "
544
504
        "try the conversion to the encoding associated to your locale (for example: "
548
508
    FilenameCharacterSetApproximate = gtk_radio_button_new_with_label(
549
509
        gtk_radio_button_get_group(GTK_RADIO_BUTTON(FilenameCharacterSetOther)),
550
510
        _("Force using the system character encoding and activate the transliteration"));
551
 
    gtk_table_attach(GTK_TABLE(Table),FilenameCharacterSetApproximate,1,2,2,3,GTK_FILL,GTK_FILL,0,0);
 
511
    gtk_grid_attach (GTK_GRID (Table), FilenameCharacterSetApproximate, 1, 2,
 
512
                     1, 1);
552
513
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FilenameCharacterSetApproximate),FILENAME_CHARACTER_SET_APPROXIMATE);
553
514
    gtk_widget_set_tooltip_text(FilenameCharacterSetApproximate,_("With this option, when "
554
515
        "a character cannot be represented in the target character set, it can be "
557
518
    FilenameCharacterSetDiscard = gtk_radio_button_new_with_label(
558
519
        gtk_radio_button_get_group(GTK_RADIO_BUTTON(FilenameCharacterSetOther)),
559
520
        _("Force using the system character encoding and silently discard some characters"));
560
 
    gtk_table_attach(GTK_TABLE(Table),FilenameCharacterSetDiscard,1,2,3,4,GTK_FILL,GTK_FILL,0,0);
 
521
    gtk_grid_attach (GTK_GRID (Table), FilenameCharacterSetDiscard, 1, 3, 1,
 
522
                     1);
561
523
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FilenameCharacterSetDiscard),FILENAME_CHARACTER_SET_DISCARD);
562
524
    gtk_widget_set_tooltip_text(FilenameCharacterSetDiscard,_("With this option, when "
563
525
        "a character cannot be represented in the target character set, it will "
569
531
     * Tag Settings
570
532
     */
571
533
    Label = gtk_label_new (_("Tag Settings"));
572
 
    Frame = gtk_frame_new (_("Tag Settings"));
573
 
    gtk_notebook_append_page (GTK_NOTEBOOK(OptionsNoteBook),Frame,Label);
574
 
    gtk_container_set_border_width(GTK_CONTAINER(Frame),5);
575
 
 
576
 
    VBox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
577
 
    gtk_container_add(GTK_CONTAINER(Frame),VBox);
578
 
    gtk_container_set_border_width(GTK_CONTAINER(VBox),4);
 
534
    VBox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
 
535
    gtk_notebook_append_page (GTK_NOTEBOOK (OptionsNoteBook), VBox, Label);
 
536
    gtk_container_set_border_width (GTK_CONTAINER (VBox), BOX_SPACING);
579
537
 
580
538
    /* Tag Options */
581
539
    Frame = gtk_frame_new (_("Tag Options"));
582
540
    gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
583
 
    vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
 
541
    vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
584
542
    gtk_container_add(GTK_CONTAINER(Frame),vbox);
585
 
    gtk_container_set_border_width(GTK_CONTAINER(vbox), 2);
 
543
    gtk_container_set_border_width (GTK_CONTAINER (vbox), BOX_SPACING);
586
544
 
587
545
    DateAutoCompletion = gtk_check_button_new_with_label(_("Auto completion of date if not complete"));
588
546
    gtk_box_pack_start(GTK_BOX(vbox),DateAutoCompletion,FALSE,FALSE,0);
591
549
        "only the last numerals of the date (for instance, if the current year is 2005: "
592
550
        "5 => 2005, 4 => 2004, 6 => 1996, 95 => 1995…)."));
593
551
 
594
 
    hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,0);
 
552
    /* Track formatting. */
 
553
    hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, BOX_SPACING);
595
554
    gtk_box_pack_start(GTK_BOX(vbox),hbox,FALSE,FALSE,0);
596
555
 
597
556
    NumberTrackFormated = gtk_check_button_new_with_label(_("Write the track field with the following number of digits:"));
612
571
    g_signal_connect_swapped(G_OBJECT(NumberTrackFormatedSpinButton),"changed",G_CALLBACK(Number_Track_Formatted_Spin_Button_Changed),G_OBJECT(Label));
613
572
    g_signal_emit_by_name(G_OBJECT(NumberTrackFormatedSpinButton),"changed",NULL);
614
573
 
615
 
    OggTagWriteXmmsComment = gtk_check_button_new_with_label(_("Ogg Vorbis Files: write also the comment in the XMMS format"));
616
 
    gtk_box_pack_start(GTK_BOX(vbox),OggTagWriteXmmsComment,FALSE,FALSE,0);
617
 
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(OggTagWriteXmmsComment),OGG_TAG_WRITE_XMMS_COMMENT);
618
 
    gtk_widget_set_tooltip_text(OggTagWriteXmmsComment,_("XMMS doesn't make use of the right way to "
619
 
        "identify a comment in Ogg Vorbis files as other apps do. In fact, this field is usually labeled "
620
 
        "with 'comment=', whereas XMMS uses only `='. Please, uncheck this option if you don't want "
621
 
        "other apps to complain about an unknown field. Comments won't be shown in XMMS, though."));
 
574
    /* Disc formatting. */
 
575
    hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, BOX_SPACING);
 
576
    gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
 
577
 
 
578
    pad_disc_number = gtk_check_button_new_with_label (_("Write the disc field with the following number of digits:"));
 
579
    gtk_box_pack_start (GTK_BOX (hbox), pad_disc_number, FALSE, FALSE, 0);
 
580
    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (pad_disc_number),
 
581
                                  PAD_DISC_NUMBER);
 
582
    gtk_widget_set_tooltip_text (pad_disc_number,
 
583
                                 _("Whether to pad the disc field with leading zeroes"));
 
584
 
 
585
    pad_disc_number_spinbutton = gtk_spin_button_new_with_range (1.0, 6.0,
 
586
                                                                 1.0);
 
587
    gtk_box_pack_start (GTK_BOX (hbox), pad_disc_number_spinbutton, FALSE,
 
588
                        FALSE, 0);
 
589
    gtk_spin_button_set_value (GTK_SPIN_BUTTON (pad_disc_number_spinbutton),
 
590
                               (gfloat)PAD_DISC_NUMBER_DIGITS);
 
591
    g_signal_connect (G_OBJECT (pad_disc_number), "toggled",
 
592
                      G_CALLBACK (et_prefs_on_pad_disc_number_toggled), NULL);
 
593
    g_signal_emit_by_name (G_OBJECT (pad_disc_number), "toggled");
 
594
 
 
595
    /* Label to show the example. */
 
596
    Label = gtk_label_new ("");
 
597
    gtk_box_pack_start (GTK_BOX (hbox), Label, FALSE, FALSE, BOX_SPACING);
 
598
    g_signal_connect_swapped (G_OBJECT (pad_disc_number_spinbutton), "changed",
 
599
                              G_CALLBACK (et_prefs_on_pad_disc_number_spinbutton_changed),
 
600
                              Label);
 
601
    g_signal_emit_by_name (G_OBJECT (pad_disc_number_spinbutton), "changed");
622
602
 
623
603
    // Separator line
624
604
    Separator = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL);
625
605
    gtk_box_pack_start(GTK_BOX(vbox),Separator,FALSE,FALSE,0);
626
606
 
627
607
    /* Tag field focus */
628
 
    Table = gtk_table_new(2,3,FALSE);
 
608
    Table = et_grid_new (2, 3);
629
609
    gtk_box_pack_start(GTK_BOX(vbox),Table,FALSE,FALSE,0);
630
 
    //gtk_table_set_row_spacings(GTK_TABLE(Table),2);
631
 
    gtk_table_set_col_spacings(GTK_TABLE(Table),2);
 
610
    /*gtk_grid_set_row_spacing (GTK_GRID (Table), 2);*/
 
611
    gtk_grid_set_column_spacing (GTK_GRID (Table), 2 * BOX_SPACING);
632
612
 
633
613
    Label = gtk_label_new(_("Tag field focus when switching files in list with "
634
614
        "shortcuts Page Up/Page Down:"));
635
 
    gtk_table_attach(GTK_TABLE(Table),Label,0,2,0,1,GTK_FILL,GTK_FILL,0,0);
 
615
    gtk_grid_attach (GTK_GRID (Table), Label, 0, 0, 2, 1);
636
616
    gtk_misc_set_alignment(GTK_MISC(Label),0,0.5);
637
617
 
638
 
    Label = gtk_label_new("    ");
639
 
    gtk_table_attach(GTK_TABLE(Table),Label,0,1,1,2,GTK_FILL,GTK_FILL,0,0);
640
 
 
641
618
    SetFocusToSameTagField = gtk_radio_button_new_with_label(NULL,
642
619
        _("Keep focus to the same tag field"));
643
 
    gtk_table_attach(GTK_TABLE(Table),SetFocusToSameTagField,1,2,1,2,GTK_FILL,GTK_FILL,0,0);
 
620
    gtk_grid_attach (GTK_GRID (Table), SetFocusToSameTagField, 1, 1, 1, 1);
644
621
    //gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(SetFocusToSameTagField),SET_FOCUS_TO_SAME_TAG_FIELD);
645
622
 
646
623
    SetFocusToFirstTagField = gtk_radio_button_new_with_label(
647
624
        gtk_radio_button_get_group(GTK_RADIO_BUTTON(SetFocusToSameTagField)),
648
625
        _("Return focus to the first tag field (i.e. 'Title' field)"));
649
 
    gtk_table_attach(GTK_TABLE(Table),SetFocusToFirstTagField,1,2,2,3,GTK_FILL,GTK_FILL,0,0);
 
626
    gtk_grid_attach (GTK_GRID (Table), SetFocusToFirstTagField, 1, 2, 1, 1);
650
627
    //gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(SetFocusToFirstTagField),SET_FOCUS_TO_FIRST_TAG_FIELD);
651
628
    
652
629
    /* Tag Splitting */
653
630
    Frame = gtk_frame_new (_("Tag Splitting"));
654
631
    gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
655
632
 
656
 
    Table = gtk_table_new(5,2,FALSE);
 
633
    Table = et_grid_new (5, 2);
657
634
    gtk_container_add(GTK_CONTAINER(Frame),Table);
658
 
    gtk_table_set_col_spacings(GTK_TABLE(Table),2);
 
635
    gtk_container_set_border_width (GTK_CONTAINER (Table), BOX_SPACING);
 
636
    gtk_grid_set_column_spacing (GTK_GRID (Table), BOX_SPACING);
 
637
    gtk_grid_set_row_spacing (GTK_GRID (Table), BOX_SPACING);
659
638
    
660
639
    Label = gtk_label_new(_("For Vorbis tags, selected fields will be split at dashes and saved as separate tags"));
661
 
    gtk_table_attach(GTK_TABLE(Table),Label,0,2,0,1,GTK_FILL,GTK_FILL,0,1);
 
640
    gtk_grid_attach (GTK_GRID (Table), Label, 0, 0, 2, 1);
662
641
    gtk_misc_set_alignment(GTK_MISC(Label),0,0.5);
663
642
 
664
643
    VorbisSplitFieldTitle = gtk_check_button_new_with_label(_("Title"));
669
648
    VorbisSplitFieldComposer = gtk_check_button_new_with_label(_("Composer"));
670
649
    VorbisSplitFieldOrigArtist = gtk_check_button_new_with_label(_("Original artist"));
671
650
 
672
 
    gtk_table_attach(GTK_TABLE(Table),VorbisSplitFieldTitle,0,1,1,2,GTK_FILL,GTK_FILL,0,0);
673
 
    gtk_table_attach(GTK_TABLE(Table),VorbisSplitFieldArtist,0,1,2,3,GTK_FILL,GTK_FILL,0,0);
674
 
    gtk_table_attach(GTK_TABLE(Table),VorbisSplitFieldAlbum,0,1,3,4,GTK_FILL,GTK_FILL,0,0);
675
 
    gtk_table_attach(GTK_TABLE(Table),VorbisSplitFieldGenre,0,1,4,5,GTK_FILL,GTK_FILL,0,0);
676
 
    gtk_table_attach(GTK_TABLE(Table),VorbisSplitFieldComment,1,2,1,2,GTK_FILL,GTK_FILL,0,0);
677
 
    gtk_table_attach(GTK_TABLE(Table),VorbisSplitFieldComposer,1,2,2,3,GTK_FILL,GTK_FILL,0,0);
678
 
    gtk_table_attach(GTK_TABLE(Table),VorbisSplitFieldOrigArtist,1,2,3,4,GTK_FILL,GTK_FILL,0,0);
 
651
    gtk_grid_attach (GTK_GRID (Table), VorbisSplitFieldTitle, 0, 1, 1, 1);
 
652
    gtk_grid_attach (GTK_GRID (Table), VorbisSplitFieldArtist, 0, 2, 1, 1);
 
653
    gtk_grid_attach (GTK_GRID (Table), VorbisSplitFieldAlbum, 0, 3, 1, 1);
 
654
    gtk_grid_attach (GTK_GRID (Table), VorbisSplitFieldGenre, 0, 4, 1, 1);
 
655
    gtk_grid_attach (GTK_GRID (Table), VorbisSplitFieldComment, 1, 1, 1, 1);
 
656
    gtk_grid_attach (GTK_GRID (Table), VorbisSplitFieldComposer, 1, 2, 1, 1);
 
657
    gtk_grid_attach (GTK_GRID (Table), VorbisSplitFieldOrigArtist, 1, 3, 1, 1);
679
658
 
680
659
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(VorbisSplitFieldTitle), VORBIS_SPLIT_FIELD_TITLE);
681
660
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(VorbisSplitFieldArtist), VORBIS_SPLIT_FIELD_ARTIST);
689
668
     * ID3 Tag Settings
690
669
     */
691
670
    Label = gtk_label_new (_("ID3 Tag Settings"));
692
 
    Frame = gtk_frame_new (_("ID3 Tag Settings"));
 
671
    VBox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
693
672
#ifdef ENABLE_MP3
694
 
    gtk_notebook_append_page (GTK_NOTEBOOK(OptionsNoteBook),Frame,Label);
 
673
    gtk_notebook_append_page (GTK_NOTEBOOK (OptionsNoteBook), VBox, Label);
695
674
#endif
696
 
    gtk_container_set_border_width(GTK_CONTAINER(Frame),5);
697
 
 
698
 
    VBox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
699
 
    gtk_container_add(GTK_CONTAINER(Frame),VBox);
700
 
    gtk_container_set_border_width(GTK_CONTAINER(VBox),4);
 
675
    gtk_container_set_border_width (GTK_CONTAINER (VBox), BOX_SPACING);
701
676
 
702
677
 
703
678
    /* Tag Rules frame */
704
679
    Frame = gtk_frame_new (_("ID3 Tag Rules"));
705
680
    gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
706
 
    vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
 
681
    vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
707
682
    gtk_container_add(GTK_CONTAINER(Frame),vbox);
708
 
    gtk_container_set_border_width(GTK_CONTAINER(vbox),2);
 
683
    gtk_container_set_border_width (GTK_CONTAINER (vbox), BOX_SPACING);
709
684
 
710
 
    Table = gtk_table_new(3,2,FALSE);
 
685
    Table = et_grid_new (3, 2);
711
686
    gtk_box_pack_start(GTK_BOX(vbox),Table,FALSE,FALSE,0);
712
 
    gtk_table_set_row_spacings(GTK_TABLE(Table),2);
713
 
    gtk_table_set_col_spacings(GTK_TABLE(Table),2);
714
 
 
715
 
    /* Write ID3 tags in FLAC files */
716
 
    WriteId3TagsInFlacFiles = gtk_check_button_new_with_label(_("Write ID3 tags in FLAC files (in addition to FLAC tag)"));
717
 
    gtk_table_attach(GTK_TABLE(Table),WriteId3TagsInFlacFiles,0,1,0,1,GTK_FILL,GTK_FILL,0,0);
718
 
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(WriteId3TagsInFlacFiles),WRITE_ID3_TAGS_IN_FLAC_FILE);
719
 
    gtk_widget_set_tooltip_text(WriteId3TagsInFlacFiles,_("If activated, ID3 tags will be "
720
 
        "also added in the FLAC file (according the two rules above, plus the FLAC tag). "
721
 
        "Else ID3 tags will be stripped."));
 
687
    gtk_grid_set_row_spacing (GTK_GRID (Table), BOX_SPACING);
 
688
    gtk_grid_set_column_spacing (GTK_GRID (Table), BOX_SPACING);
722
689
 
723
690
    /* Strip tag when fields (managed by EasyTAG) are empty */
724
691
    StripTagWhenEmptyFields = gtk_check_button_new_with_label(_("Strip tags if all fields are set to blank"));
725
 
    gtk_table_attach(GTK_TABLE(Table),StripTagWhenEmptyFields,0,1,1,2,GTK_FILL,GTK_FILL,0,0);
 
692
    gtk_grid_attach (GTK_GRID (Table), StripTagWhenEmptyFields, 0, 0, 1, 1);
726
693
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(StripTagWhenEmptyFields),STRIP_TAG_WHEN_EMPTY_FIELDS);
727
694
    gtk_widget_set_tooltip_text(StripTagWhenEmptyFields,_("As ID3v2 tags may contain other data than "
728
 
        "Title, Artist, Album, Year, Track, Genre or Comment (as an attached picture, lyrics…), "
 
695
        "Title, Artist, Album, Year, Track, Genre or Comment (as an attached image, lyrics…), "
729
696
        "this option allows you to strip the whole tag when these seven standard data fields have "
730
697
        "been set to blank."));
731
698
 
732
699
    /* Convert old ID3v2 tag version */
733
700
    ConvertOldId3v2TagVersion = gtk_check_button_new_with_label(_("Automatically convert old ID3v2 tag versions"));
734
 
    gtk_table_attach(GTK_TABLE(Table),ConvertOldId3v2TagVersion,0,1,2,3,GTK_FILL,GTK_FILL,0,0);
 
701
    gtk_grid_attach (GTK_GRID (Table), ConvertOldId3v2TagVersion, 0, 1, 1, 1);
735
702
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ConvertOldId3v2TagVersion),CONVERT_OLD_ID3V2_TAG_VERSION);
736
703
    gtk_widget_set_tooltip_text(ConvertOldId3v2TagVersion,_("If activated, an old ID3v2 tag version (as "
737
704
        "ID3v2.2) will be updated to the ID3v2.3 version."));
738
705
 
739
706
    /* Use CRC32 */
740
707
    FileWritingId3v2UseCrc32 = gtk_check_button_new_with_label(_("Use CRC32"));
741
 
    gtk_table_attach(GTK_TABLE(Table),FileWritingId3v2UseCrc32,1,2,0,1,GTK_FILL,GTK_FILL,0,0);
 
708
    gtk_grid_attach (GTK_GRID (Table), FileWritingId3v2UseCrc32, 1, 0, 1, 1);
742
709
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FileWritingId3v2UseCrc32),FILE_WRITING_ID3V2_USE_CRC32);
743
710
    gtk_widget_set_tooltip_text(FileWritingId3v2UseCrc32,_("Set CRC32 in the ID3v2 tags"));
744
711
 
745
712
    /* Use Compression */
746
713
    FileWritingId3v2UseCompression = gtk_check_button_new_with_label(_("Use Compression"));
747
 
    gtk_table_attach(GTK_TABLE(Table),FileWritingId3v2UseCompression,1,2,1,2,GTK_FILL,GTK_FILL,0,0);
 
714
    gtk_grid_attach (GTK_GRID (Table), FileWritingId3v2UseCompression, 1, 1, 1,
 
715
                     1);
748
716
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FileWritingId3v2UseCompression),FILE_WRITING_ID3V2_USE_COMPRESSION);
749
717
    gtk_widget_set_tooltip_text(FileWritingId3v2UseCompression,_("Set Compression in the ID3v2 tags"));
750
718
        
751
719
    /* Write Genre in text */
752
720
    FileWritingId3v2TextOnlyGenre = gtk_check_button_new_with_label(_("Write Genre in text only"));
753
 
    gtk_table_attach(GTK_TABLE(Table),FileWritingId3v2TextOnlyGenre,1,2,2,3,GTK_FILL,GTK_FILL,0,0);
 
721
    gtk_grid_attach (GTK_GRID (Table), FileWritingId3v2TextOnlyGenre, 0, 2, 1,
 
722
                     1);
754
723
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FileWritingId3v2TextOnlyGenre),FILE_WRITING_ID3V2_TEXT_ONLY_GENRE);
755
724
    gtk_widget_set_tooltip_text(FileWritingId3v2TextOnlyGenre,_("Don't use ID3v1 number references in genre tag. Enable this if you see numbers as genre in your music player."));      
756
725
 
757
726
    /* Character Set for writing ID3 tag */
758
727
    Frame = gtk_frame_new (_("Character Set for writing ID3 tags"));
759
728
    gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
760
 
    id3v1v2hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,3);
 
729
    id3v1v2hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, BOX_SPACING);
761
730
    gtk_container_add(GTK_CONTAINER(Frame),id3v1v2hbox);
762
 
    gtk_container_set_border_width(GTK_CONTAINER(id3v1v2hbox), 2);
 
731
    gtk_container_set_border_width (GTK_CONTAINER (id3v1v2hbox), BOX_SPACING);
763
732
 
764
733
    // ID3v2 tags
765
734
    Frame = gtk_frame_new (_("ID3v2 tags"));
766
735
    gtk_box_pack_start(GTK_BOX(id3v1v2hbox),Frame,FALSE,FALSE,2);
767
736
 
768
 
    vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
 
737
    vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
769
738
    gtk_container_add(GTK_CONTAINER(Frame),vbox);
770
 
    gtk_container_set_border_width(GTK_CONTAINER(vbox),2);
 
739
    gtk_container_set_border_width (GTK_CONTAINER (vbox), BOX_SPACING);
771
740
 
772
 
    Table = gtk_table_new(8,6,FALSE);
 
741
    Table = et_grid_new (8, 6);
773
742
    gtk_box_pack_start(GTK_BOX(vbox),Table,FALSE,FALSE,0);
774
 
    gtk_table_set_row_spacings(GTK_TABLE(Table),2);
775
 
    gtk_table_set_col_spacings(GTK_TABLE(Table),2);
 
743
    gtk_grid_set_row_spacing (GTK_GRID (Table), BOX_SPACING);
 
744
    gtk_grid_set_column_spacing (GTK_GRID (Table), BOX_SPACING);
776
745
 
777
746
    /* Write ID3v2 tag */
778
747
    FileWritingId3v2WriteTag = gtk_check_button_new_with_label(_("Write ID3v2 tag"));
779
 
    gtk_table_attach(GTK_TABLE(Table),FileWritingId3v2WriteTag,0,5,0,1,GTK_FILL,GTK_FILL,0,0);
 
748
    gtk_grid_attach (GTK_GRID (Table), FileWritingId3v2WriteTag, 0, 0, 5, 1);
780
749
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FileWritingId3v2WriteTag),FILE_WRITING_ID3V2_WRITE_TAG);
781
750
    gtk_widget_set_tooltip_text(FileWritingId3v2WriteTag,_("If activated, an ID3v2.4 tag will be added or "
782
751
        "updated at the beginning of the MP3 files. Else it will be stripped."));
786
755
#ifdef ENABLE_ID3LIB
787
756
    /* ID3v2 tag version */
788
757
    LabelId3v2Version = gtk_label_new(_("Version:"));
789
 
    gtk_table_attach(GTK_TABLE(Table),LabelId3v2Version,0,2,1,2,GTK_FILL,GTK_FILL,0,0);
 
758
    gtk_grid_attach (GTK_GRID (Table), LabelId3v2Version, 0, 1, 2, 1);
790
759
    gtk_misc_set_alignment(GTK_MISC(LabelId3v2Version),0,0.5);
791
760
 
792
 
    EventBox = gtk_event_box_new();
793
761
    FileWritingId3v2VersionCombo = gtk_combo_box_text_new();
794
 
    gtk_container_add(GTK_CONTAINER(EventBox),FileWritingId3v2VersionCombo);
795
 
    gtk_widget_set_tooltip_text(EventBox,_("Select the ID3v2 tag version to write:\n"
796
 
        " - ID3v2.3 is written using id3lib,\n"
797
 
        " - ID3v2.4 is written using libid3tag (recommended)."));
 
762
    gtk_widget_set_tooltip_text (FileWritingId3v2VersionCombo,
 
763
                                 _("Select the ID3v2 tag version to write:\n"
 
764
                                   " - ID3v2.3 is written using id3lib,\n"
 
765
                                   " - ID3v2.4 is written using libid3tag (recommended)."));
798
766
    gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(FileWritingId3v2VersionCombo), "ID3v2.4");
799
767
    gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(FileWritingId3v2VersionCombo), "ID3v2.3");
800
768
    gtk_combo_box_set_active(GTK_COMBO_BOX(FileWritingId3v2VersionCombo),
801
769
        FILE_WRITING_ID3V2_VERSION_4 ? 0 : 1);
802
 
    gtk_table_attach(GTK_TABLE(Table),EventBox,2,4,1,2,GTK_FILL,GTK_FILL,0,0);
 
770
    gtk_grid_attach (GTK_GRID (Table), FileWritingId3v2VersionCombo, 2, 1, 2,
 
771
                     1);
803
772
    g_signal_connect_after(G_OBJECT(FileWritingId3v2VersionCombo),"changed",
804
773
        G_CALLBACK(Change_Id3_Settings_Toggled),NULL);
805
774
#endif
807
776
 
808
777
    /* Charset */
809
778
    LabelId3v2Charset = gtk_label_new(_("Charset:"));
810
 
    gtk_table_attach(GTK_TABLE(Table),LabelId3v2Charset,0,5,2,3,GTK_FILL,GTK_FILL,0,0);
 
779
    gtk_grid_attach (GTK_GRID (Table), LabelId3v2Charset, 0, 2, 5, 1);
811
780
    gtk_misc_set_alignment(GTK_MISC(LabelId3v2Charset),0,0.5);
812
781
 
813
 
    Label = gtk_label_new("        ");
814
 
    gtk_table_attach(GTK_TABLE(Table),Label,0,1,3,4,GTK_FILL,GTK_FILL,0,0);
815
 
 
816
782
    // Unicode
817
783
    FileWritingId3v2UseUnicodeCharacterSet = gtk_radio_button_new_with_label(NULL, _("Unicode "));
818
784
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FileWritingId3v2UseUnicodeCharacterSet),
819
785
        FILE_WRITING_ID3V2_USE_UNICODE_CHARACTER_SET);
820
 
    gtk_table_attach(GTK_TABLE(Table),FileWritingId3v2UseUnicodeCharacterSet,1,2,3,4,GTK_FILL,GTK_FILL,0,0);
 
786
    gtk_grid_attach (GTK_GRID (Table), FileWritingId3v2UseUnicodeCharacterSet,
 
787
                     1, 3, 1, 1);
821
788
 
822
 
    EventBox = gtk_event_box_new();
823
789
    FileWritingId3v2UnicodeCharacterSetCombo = gtk_combo_box_text_new();
824
 
    gtk_container_add(GTK_CONTAINER(EventBox),FileWritingId3v2UnicodeCharacterSetCombo);
825
 
    gtk_widget_set_tooltip_text(EventBox,_("Unicode type to use"));
 
790
    gtk_widget_set_tooltip_text(FileWritingId3v2UnicodeCharacterSetCombo,
 
791
                                _("Unicode type to use"));
826
792
    gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(FileWritingId3v2UnicodeCharacterSetCombo), "UTF-8");
827
793
    gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(FileWritingId3v2UnicodeCharacterSetCombo), "UTF-16");
828
794
    if ( FILE_WRITING_ID3V2_UNICODE_CHARACTER_SET == NULL )
830
796
    else
831
797
        gtk_combo_box_set_active(GTK_COMBO_BOX(FileWritingId3v2UnicodeCharacterSetCombo),
832
798
            strcmp(FILE_WRITING_ID3V2_UNICODE_CHARACTER_SET, "UTF-8") ? 1 : 0);
833
 
    gtk_table_attach(GTK_TABLE(Table),EventBox,2,4,3,4,GTK_FILL,GTK_FILL,0,0);
 
799
    gtk_grid_attach (GTK_GRID (Table),
 
800
                     FileWritingId3v2UnicodeCharacterSetCombo, 2, 3, 2, 1);
834
801
    g_signal_connect_after(G_OBJECT(FileWritingId3v2UseUnicodeCharacterSet),"toggled",
835
802
        G_CALLBACK(Change_Id3_Settings_Toggled),NULL);
836
803
 
838
805
    FileWritingId3v2UseNoUnicodeCharacterSet = gtk_radio_button_new_with_label(
839
806
        gtk_radio_button_get_group(GTK_RADIO_BUTTON(FileWritingId3v2UseUnicodeCharacterSet)),
840
807
        _("Other"));
841
 
    gtk_table_attach(GTK_TABLE(Table),FileWritingId3v2UseNoUnicodeCharacterSet,1,2,4,5,GTK_FILL,GTK_FILL,0,0);
 
808
    gtk_grid_attach (GTK_GRID (Table),
 
809
                     FileWritingId3v2UseNoUnicodeCharacterSet, 1, 4, 1, 1);
842
810
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FileWritingId3v2UseNoUnicodeCharacterSet),
843
811
        !FILE_WRITING_ID3V2_USE_UNICODE_CHARACTER_SET);
844
812
 
845
 
    EventBox = gtk_event_box_new();
846
813
    FileWritingId3v2NoUnicodeCharacterSetCombo = gtk_combo_box_text_new();
847
 
    gtk_container_add(GTK_CONTAINER(EventBox),FileWritingId3v2NoUnicodeCharacterSetCombo);
848
 
    gtk_widget_set_tooltip_text(EventBox,_("Character set used to write the tag "
849
 
        "data in the file."));
 
814
    gtk_widget_set_tooltip_text (FileWritingId3v2NoUnicodeCharacterSetCombo,
 
815
                                 _("Character set used to write the tag data in the file."));
850
816
 
851
817
    Charset_Populate_Combobox(GTK_COMBO_BOX(FileWritingId3v2NoUnicodeCharacterSetCombo), 
852
818
        FILE_WRITING_ID3V2_NO_UNICODE_CHARACTER_SET);
853
 
    gtk_table_attach(GTK_TABLE(Table),EventBox,2,5,4,5,GTK_FILL,GTK_FILL,0,0);
 
819
    gtk_grid_attach (GTK_GRID (Table),
 
820
                     FileWritingId3v2NoUnicodeCharacterSetCombo, 2, 4, 3, 1);
854
821
    g_signal_connect_after(G_OBJECT(FileWritingId3v2UseNoUnicodeCharacterSet),"toggled",
855
822
        G_CALLBACK(Change_Id3_Settings_Toggled),NULL);
856
823
    
857
824
    // ID3v2 Additional iconv() options
858
825
    LabelAdditionalId3v2IconvOptions = gtk_label_new(_("Additional settings for iconv():"));
859
 
    gtk_table_attach(GTK_TABLE(Table),LabelAdditionalId3v2IconvOptions,2,5,5,6,GTK_FILL,GTK_FILL,0,0);
 
826
    gtk_grid_attach (GTK_GRID (Table), LabelAdditionalId3v2IconvOptions, 2, 5,
 
827
                     3, 1);
860
828
    gtk_misc_set_alignment(GTK_MISC(LabelAdditionalId3v2IconvOptions),0,0.5);
861
829
 
862
830
    FileWritingId3v2IconvOptionsNo = gtk_radio_button_new_with_label(NULL,
863
831
        _("No"));
864
 
    gtk_table_attach(GTK_TABLE(Table),FileWritingId3v2IconvOptionsNo,2,3,6,7,GTK_FILL,GTK_FILL,0,0);
 
832
    gtk_grid_attach (GTK_GRID (Table), FileWritingId3v2IconvOptionsNo, 2, 6, 1,
 
833
                     1);
865
834
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FileWritingId3v2IconvOptionsNo),FILE_WRITING_ID3V2_ICONV_OPTIONS_NO);
866
835
    gtk_widget_set_tooltip_text(FileWritingId3v2IconvOptionsNo,_("With this option, when "
867
836
        "a character cannot be represented in the target character set, it isn't changed. "
869
838
    FileWritingId3v2IconvOptionsTranslit = gtk_radio_button_new_with_label(
870
839
        gtk_radio_button_get_group(GTK_RADIO_BUTTON(FileWritingId3v2IconvOptionsNo)),
871
840
        _("//TRANSLIT"));
872
 
    gtk_table_attach(GTK_TABLE(Table),FileWritingId3v2IconvOptionsTranslit,3,4,6,7,GTK_FILL,GTK_FILL,0,0);
 
841
    gtk_grid_attach (GTK_GRID (Table), FileWritingId3v2IconvOptionsTranslit, 3,
 
842
                     6, 1, 1);
873
843
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FileWritingId3v2IconvOptionsTranslit),FILE_WRITING_ID3V2_ICONV_OPTIONS_TRANSLIT);
874
844
    gtk_widget_set_tooltip_text(FileWritingId3v2IconvOptionsTranslit,_("With this option, when "
875
845
        "a character cannot be represented in the target character set, it can be "
878
848
    FileWritingId3v2IconvOptionsIgnore = gtk_radio_button_new_with_label(
879
849
        gtk_radio_button_get_group(GTK_RADIO_BUTTON(FileWritingId3v2IconvOptionsNo)),
880
850
        _("//IGNORE"));
881
 
    gtk_table_attach(GTK_TABLE(Table),FileWritingId3v2IconvOptionsIgnore,4,5,6,7,GTK_FILL,GTK_FILL,0,0);
 
851
    gtk_grid_attach (GTK_GRID (Table), FileWritingId3v2IconvOptionsIgnore, 4,
 
852
                     6, 1, 1);
882
853
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FileWritingId3v2IconvOptionsIgnore),FILE_WRITING_ID3V2_ICONV_OPTIONS_IGNORE);
883
854
    gtk_widget_set_tooltip_text(FileWritingId3v2IconvOptionsIgnore,_("With this option, when "
884
855
        "a character cannot be represented in the target character set, it will "
888
859
    Frame = gtk_frame_new (_("ID3v1 tags"));
889
860
    gtk_box_pack_start(GTK_BOX(id3v1v2hbox),Frame,FALSE,FALSE,2);
890
861
 
891
 
    vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
 
862
    vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
892
863
    gtk_container_add(GTK_CONTAINER(Frame),vbox);
893
 
    gtk_container_set_border_width(GTK_CONTAINER(vbox),2);
 
864
    gtk_container_set_border_width (GTK_CONTAINER (vbox), BOX_SPACING);
894
865
 
895
 
    Table = gtk_table_new(6,5,FALSE);
 
866
    Table = et_grid_new (6, 5);
896
867
    gtk_box_pack_start(GTK_BOX(vbox),Table,FALSE,FALSE,0);
897
 
    gtk_table_set_row_spacings(GTK_TABLE(Table),2);
898
 
    gtk_table_set_col_spacings(GTK_TABLE(Table),2);
 
868
    gtk_grid_set_row_spacing (GTK_GRID (Table), BOX_SPACING);
 
869
    gtk_grid_set_column_spacing (GTK_GRID (Table), BOX_SPACING);
899
870
 
900
871
 
901
872
    /* Write ID3v1 tag */
902
873
    FileWritingId3v1WriteTag = gtk_check_button_new_with_label(_("Write ID3v1.x tag"));
903
 
    gtk_table_attach(GTK_TABLE(Table),FileWritingId3v1WriteTag,0,4,0,1,GTK_FILL,GTK_FILL,0,0);
 
874
    gtk_grid_attach (GTK_GRID (Table), FileWritingId3v1WriteTag, 0, 0, 4, 1);
904
875
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FileWritingId3v1WriteTag),FILE_WRITING_ID3V1_WRITE_TAG);
905
876
    gtk_widget_set_tooltip_text(FileWritingId3v1WriteTag,_("If activated, an ID3v1 tag will be added or "
906
877
        "updated at the end of the MP3 files. Else it will be stripped."));
909
880
 
910
881
    /* Id3V1 writing character set */
911
882
    LabelId3v1Charset = gtk_label_new(_("Charset:"));
912
 
    gtk_table_attach(GTK_TABLE(Table),LabelId3v1Charset,0,4,1,2,GTK_FILL,GTK_FILL,0,0);
 
883
    gtk_grid_attach (GTK_GRID (Table), LabelId3v1Charset, 0, 1, 4, 1);
913
884
    gtk_misc_set_alignment(GTK_MISC(LabelId3v1Charset),0,0.5);
914
885
 
915
 
    Label = gtk_label_new("        ");
916
 
    gtk_table_attach(GTK_TABLE(Table),Label,0,1,2,3,GTK_FILL,GTK_FILL,0,0);
917
 
 
918
 
    EventBox = gtk_event_box_new();
919
886
    FileWritingId3v1CharacterSetCombo = gtk_combo_box_text_new();
920
 
    gtk_container_add(GTK_CONTAINER(EventBox),FileWritingId3v1CharacterSetCombo);
921
 
    gtk_table_attach(GTK_TABLE(Table),EventBox,1,4,2,3,GTK_FILL,GTK_FILL,0,0);
922
 
    gtk_widget_set_tooltip_text(EventBox,_("Character set used to write ID3v1 tag data "
923
 
        "in the file."));
 
887
    gtk_grid_attach (GTK_GRID (Table), FileWritingId3v1CharacterSetCombo, 1, 2,
 
888
                     3, 1);
 
889
    gtk_widget_set_tooltip_text (FileWritingId3v1CharacterSetCombo,
 
890
                                 _("Character set used to write ID3v1 tag data in the file."));
924
891
    Charset_Populate_Combobox(GTK_COMBO_BOX(FileWritingId3v1CharacterSetCombo), FILE_WRITING_ID3V1_CHARACTER_SET);
925
892
 
926
893
    /* ID3V1 Additional iconv() options*/
927
894
    LabelAdditionalId3v1IconvOptions = gtk_label_new(_("Additional settings for iconv():"));
928
 
    gtk_table_attach(GTK_TABLE(Table),LabelAdditionalId3v1IconvOptions,1,4,3,4,GTK_FILL,GTK_FILL,0,0);
 
895
    gtk_grid_attach (GTK_GRID (Table), LabelAdditionalId3v1IconvOptions, 1, 3,
 
896
                     3, 1);
929
897
    gtk_misc_set_alignment(GTK_MISC(LabelAdditionalId3v1IconvOptions),0,0.5);
930
898
 
931
899
    FileWritingId3v1IconvOptionsNo = gtk_radio_button_new_with_label(NULL,
932
900
        _("No"));
933
 
    gtk_table_attach(GTK_TABLE(Table),FileWritingId3v1IconvOptionsNo,1,2,4,5,GTK_FILL,GTK_FILL,0,0);
 
901
    gtk_grid_attach (GTK_GRID (Table), FileWritingId3v1IconvOptionsNo, 1, 4, 1,
 
902
                     1);
934
903
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FileWritingId3v1IconvOptionsNo),FILE_WRITING_ID3V1_ICONV_OPTIONS_NO);
935
904
    gtk_widget_set_tooltip_text(FileWritingId3v1IconvOptionsNo,_("With this option, when "
936
905
        "a character cannot be represented in the target character set, it isn't changed. "
938
907
    FileWritingId3v1IconvOptionsTranslit = gtk_radio_button_new_with_label(
939
908
        gtk_radio_button_get_group(GTK_RADIO_BUTTON(FileWritingId3v1IconvOptionsNo)),
940
909
        _("//TRANSLIT"));
941
 
    gtk_table_attach(GTK_TABLE(Table),FileWritingId3v1IconvOptionsTranslit,2,3,4,5,GTK_FILL,GTK_FILL,0,0);
 
910
    gtk_grid_attach (GTK_GRID (Table), FileWritingId3v1IconvOptionsTranslit, 2,
 
911
                     4, 1, 1);
942
912
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FileWritingId3v1IconvOptionsTranslit),FILE_WRITING_ID3V1_ICONV_OPTIONS_TRANSLIT);
943
913
    gtk_widget_set_tooltip_text(FileWritingId3v1IconvOptionsTranslit,_("With this option, when "
944
914
        "a character cannot be represented in the target character set, it can be "
947
917
    FileWritingId3v1IconvOptionsIgnore = gtk_radio_button_new_with_label(
948
918
        gtk_radio_button_get_group(GTK_RADIO_BUTTON(FileWritingId3v1IconvOptionsNo)),
949
919
        _("//IGNORE"));
950
 
    gtk_table_attach(GTK_TABLE(Table),FileWritingId3v1IconvOptionsIgnore,3,4,4,5,GTK_FILL,GTK_FILL,0,0);
 
920
    gtk_grid_attach (GTK_GRID (Table), FileWritingId3v1IconvOptionsIgnore, 3,
 
921
                     4, 1, 1);
951
922
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FileWritingId3v1IconvOptionsIgnore),FILE_WRITING_ID3V1_ICONV_OPTIONS_IGNORE);
952
923
    gtk_widget_set_tooltip_text(FileWritingId3v1IconvOptionsIgnore,_("With this option, when "
953
924
        "a character cannot be represented in the target character set, it will "
956
927
    /* Character Set for reading tag */
957
928
    Frame = gtk_frame_new (_("Character Set for reading ID3 tags"));
958
929
    gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
959
 
    vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
 
930
    vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
960
931
    gtk_container_add(GTK_CONTAINER(Frame),vbox);
961
 
    gtk_container_set_border_width(GTK_CONTAINER(vbox), 2);
 
932
    gtk_container_set_border_width (GTK_CONTAINER (vbox), BOX_SPACING);
962
933
 
963
 
    Table = gtk_table_new(4,2,FALSE);
 
934
    Table = et_grid_new(4,2);
964
935
    gtk_box_pack_start(GTK_BOX(vbox),Table,FALSE,FALSE,0);
965
936
    //gtk_container_set_border_width(GTK_CONTAINER(Table), 2);
966
 
    //gtk_table_set_row_spacings(GTK_TABLE(Table),2);
967
 
    gtk_table_set_col_spacings(GTK_TABLE(Table),2);
 
937
    /*gtk_grid_set_row_spacing (GTK_GRID (Table), 2);*/
 
938
    gtk_grid_set_column_spacing (GTK_GRID (Table), BOX_SPACING);
968
939
 
969
940
    // "File Reading Charset" Check Button + Combo
970
941
    UseNonStandardId3ReadingCharacterSet = gtk_check_button_new_with_label(_(
971
942
        "Non-standard:"));
972
943
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(UseNonStandardId3ReadingCharacterSet),
973
944
        USE_NON_STANDARD_ID3_READING_CHARACTER_SET);
974
 
    gtk_table_attach(GTK_TABLE(Table),UseNonStandardId3ReadingCharacterSet,0,1,0,1,GTK_FILL,GTK_FILL,0,0);
 
945
    gtk_grid_attach (GTK_GRID (Table), UseNonStandardId3ReadingCharacterSet, 0,
 
946
                     0, 1, 1);
975
947
    gtk_widget_set_tooltip_text(UseNonStandardId3ReadingCharacterSet,
976
948
        _("This character set will be used when reading the tag data, to convert "
977
949
        "each string found in an ISO-8859-1 field in the tag (for ID3v2 or/and ID3v1 tag).\n"
986
958
        "'Windows-1251' to load tags written under Windows. And 'KOI8-R' to load tags "
987
959
        "written under Unix systems."));
988
960
 
989
 
    EventBox = gtk_event_box_new();
990
961
    FileReadingId3v1v2CharacterSetCombo = gtk_combo_box_text_new();
991
 
    gtk_container_add(GTK_CONTAINER(EventBox),FileReadingId3v1v2CharacterSetCombo);
992
 
    gtk_table_attach(GTK_TABLE(Table),EventBox,2,3,0,1,GTK_FILL,GTK_FILL,0,0);
 
962
    gtk_grid_attach (GTK_GRID (Table), FileReadingId3v1v2CharacterSetCombo, 2,
 
963
                     0, 1, 1);
993
964
 
994
 
    gtk_widget_set_tooltip_text(EventBox,_("Character set used to read tag data "
995
 
        "in the file."));
 
965
    gtk_widget_set_tooltip_text (FileReadingId3v1v2CharacterSetCombo,
 
966
                                 _("Character set used to read tag data in the file."));
996
967
 
997
968
    Charset_Populate_Combobox(GTK_COMBO_BOX(FileReadingId3v1v2CharacterSetCombo), 
998
969
        FILE_READING_ID3V1V2_CHARACTER_SET);
1007
978
     * Scanner
1008
979
     */
1009
980
    Label = gtk_label_new (_("Scanner"));
1010
 
    Frame = gtk_frame_new (_("Scanner"));
1011
 
    gtk_notebook_append_page (GTK_NOTEBOOK(OptionsNoteBook),Frame,Label);
1012
 
    gtk_container_set_border_width(GTK_CONTAINER(Frame), 5);
 
981
    VBox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
 
982
    gtk_notebook_append_page (GTK_NOTEBOOK(OptionsNoteBook), VBox, Label);
 
983
    gtk_container_set_border_width (GTK_CONTAINER (VBox), BOX_SPACING);
1013
984
 
1014
985
    /* Save the number of the page. Asked in Scanner window */
1015
 
    OptionsNoteBook_Scanner_Page_Num = gtk_notebook_page_num(GTK_NOTEBOOK(OptionsNoteBook),Frame);
1016
 
 
1017
 
    VBox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
1018
 
    gtk_container_add(GTK_CONTAINER(Frame),VBox);
1019
 
    gtk_container_set_border_width(GTK_CONTAINER(VBox), 4);
 
986
    OptionsNoteBook_Scanner_Page_Num = gtk_notebook_page_num (GTK_NOTEBOOK (OptionsNoteBook),
 
987
                                                              VBox);
1020
988
 
1021
989
    /* Character conversion for the 'Fill Tag' scanner (=> FTS...) */
1022
990
    Frame = gtk_frame_new (_("Fill Tag Scanner - Character Conversion"));
1023
991
    gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
1024
 
    vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
 
992
    vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
1025
993
    gtk_container_add(GTK_CONTAINER(Frame),vbox);
1026
 
    gtk_container_set_border_width(GTK_CONTAINER(vbox), 2);
 
994
    gtk_container_set_border_width (GTK_CONTAINER (vbox), BOX_SPACING);
1027
995
 
1028
996
    FTSConvertUnderscoreAndP20IntoSpace = gtk_check_button_new_with_label(_("Convert underscore "
1029
997
        "character '_' and string '%20' to space ' '"));
1047
1015
    /* Character conversion for the 'Rename File' scanner (=> RFS...) */
1048
1016
    Frame = gtk_frame_new (_("Rename File Scanner - Character Conversion"));
1049
1017
    gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
1050
 
    vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
 
1018
    vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
1051
1019
    gtk_container_add(GTK_CONTAINER(Frame),vbox);
1052
 
    gtk_container_set_border_width(GTK_CONTAINER(vbox),2);
 
1020
    gtk_container_set_border_width (GTK_CONTAINER (vbox), BOX_SPACING);
1053
1021
    RFSConvertUnderscoreAndP20IntoSpace = gtk_radio_button_new_with_label(NULL, _("Convert underscore " "character '_' and string '%20' to space ' '"));
1054
1022
    RFSConvertSpaceIntoUnderscore = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(RFSConvertUnderscoreAndP20IntoSpace), _("Convert space ' ' to underscore '_'"));
1055
1023
                RFSRemoveSpaces = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(RFSConvertUnderscoreAndP20IntoSpace), _("Remove spaces"));
1056
1024
    gtk_box_pack_start(GTK_BOX(vbox),RFSConvertUnderscoreAndP20IntoSpace,FALSE,FALSE,0);
1057
1025
    gtk_box_pack_start(GTK_BOX(vbox),RFSConvertSpaceIntoUnderscore,      FALSE,FALSE,0);
1058
 
                 gtk_box_pack_start(GTK_BOX(vbox),RFSRemoveSpaces,                    FALSE,FALSE,0);
 
1026
    gtk_box_pack_start (GTK_BOX (vbox), RFSRemoveSpaces, FALSE, FALSE, 0);
1059
1027
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(RFSConvertUnderscoreAndP20IntoSpace),
1060
1028
        RFS_CONVERT_UNDERSCORE_AND_P20_INTO_SPACE);
1061
1029
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(RFSConvertSpaceIntoUnderscore),
1071
1039
    /* Character conversion for the 'Process Fields' scanner (=> PFS...) */
1072
1040
    Frame = gtk_frame_new (_("Process Fields Scanner - Character Conversion"));
1073
1041
    gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
1074
 
    vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
 
1042
    vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
1075
1043
    gtk_container_add(GTK_CONTAINER(Frame),vbox);
1076
 
    gtk_container_set_border_width(GTK_CONTAINER(vbox),2);
 
1044
    gtk_container_set_border_width (GTK_CONTAINER (vbox), BOX_SPACING);
1077
1045
 
1078
1046
    // Don't convert some words like to, feat. first letter uppercase.
1079
1047
    PFSDontUpperSomeWords = gtk_check_button_new_with_label(_("Don't uppercase "
1088
1056
    /* Properties of the scanner window */
1089
1057
    Frame = gtk_frame_new (_("Scanner Window"));
1090
1058
    gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
1091
 
    vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
 
1059
    vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
1092
1060
    gtk_container_add(GTK_CONTAINER(Frame),vbox);
1093
 
    gtk_container_set_border_width(GTK_CONTAINER(vbox), 2);
 
1061
    gtk_container_set_border_width (GTK_CONTAINER (vbox), BOX_SPACING);
1094
1062
 
1095
1063
    OpenScannerWindowOnStartup = gtk_check_button_new_with_label(_("Open the Scanner Window on startup"));
1096
1064
    gtk_box_pack_start(GTK_BOX(vbox),OpenScannerWindowOnStartup,FALSE,FALSE,0);
1098
1066
    gtk_widget_set_tooltip_text(OpenScannerWindowOnStartup,_("Activate this option to open automatically "
1099
1067
        "the scanner window when EasyTAG starts."));
1100
1068
 
1101
 
    ScannerWindowOnTop = gtk_check_button_new_with_label(_("Scanner window always on top"));
1102
 
    gtk_box_pack_start(GTK_BOX(vbox),ScannerWindowOnTop,FALSE,FALSE,0);
1103
 
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ScannerWindowOnTop),SCANNER_WINDOW_ON_TOP);
1104
 
    gtk_widget_set_tooltip_text(ScannerWindowOnTop,_("If activated, the window which contains the masks "
1105
 
                        "will stay always over the main window."));
1106
 
 
1107
1069
 
1108
1070
    /* Other options */
1109
1071
    Frame = gtk_frame_new (_("Fields"));
1110
1072
    gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
1111
 
    vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
 
1073
    vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
1112
1074
    gtk_container_add(GTK_CONTAINER(Frame),vbox);
1113
 
    gtk_container_set_border_width(GTK_CONTAINER(vbox), 2);
 
1075
    gtk_container_set_border_width (GTK_CONTAINER (vbox), BOX_SPACING);
1114
1076
 
1115
1077
    // Overwrite text into tag fields
1116
1078
    OverwriteTagField = gtk_check_button_new_with_label(_("Overwrite fields when scanning tags"));
1125
1087
    else
1126
1088
        gtk_list_store_clear(DefaultCommentModel);
1127
1089
 
1128
 
    hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,2);
 
1090
    hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, BOX_SPACING);
1129
1091
    gtk_box_pack_start(GTK_BOX(vbox),hbox,FALSE,FALSE,0);
1130
1092
    SetDefaultComment = gtk_check_button_new_with_label(_("Set this text as default comment:"));
1131
1093
    gtk_box_pack_start(GTK_BOX(hbox),SetDefaultComment,FALSE,FALSE,0);
1163
1125
    /*
1164
1126
     * CDDB
1165
1127
     */
1166
 
    Label = gtk_label_new (_("CD Data Base"));
1167
 
    Frame = gtk_frame_new (_("CD Data Base"));
1168
 
    gtk_notebook_append_page (GTK_NOTEBOOK(OptionsNoteBook),Frame,Label);
1169
 
    gtk_container_set_border_width(GTK_CONTAINER(Frame), 5);
1170
 
 
1171
 
    VBox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
1172
 
    gtk_container_add(GTK_CONTAINER(Frame),VBox);
1173
 
    gtk_container_set_border_width(GTK_CONTAINER(VBox), 4);
 
1128
    Label = gtk_label_new (_("CDDB"));
 
1129
    VBox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
 
1130
    gtk_notebook_append_page (GTK_NOTEBOOK (OptionsNoteBook), VBox, Label);
 
1131
    gtk_container_set_border_width (GTK_CONTAINER (VBox), BOX_SPACING);
1174
1132
 
1175
1133
    // CDDB Server Settings (Automatic Search)
1176
1134
    Frame = gtk_frame_new (_("Server Settings for Automatic Search"));
1177
1135
    gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE, 0);
1178
 
    vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
 
1136
    vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
1179
1137
    gtk_container_add(GTK_CONTAINER(Frame),vbox);
1180
 
    gtk_container_set_border_width(GTK_CONTAINER(vbox), 4);
 
1138
    gtk_container_set_border_width (GTK_CONTAINER (vbox), BOX_SPACING);
1181
1139
 
1182
1140
    // 1rst automatic search server
1183
 
    hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,2);
 
1141
    hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, BOX_SPACING);
1184
1142
    gtk_container_add(GTK_CONTAINER(vbox),hbox);
1185
1143
    Label = gtk_label_new(_("Name:"));
1186
1144
    gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,2);
1203
1161
 
1204
1162
    Label = gtk_label_new (_("Port:"));
1205
1163
    gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,2);
1206
 
    CddbServerPortAutomaticSearch = gtk_entry_new();
 
1164
    CddbServerPortAutomaticSearch = gtk_spin_button_new_with_range (0.0,
 
1165
                                                                    65535.0,
 
1166
                                                                    1.0);
1207
1167
    gtk_widget_set_size_request(GTK_WIDGET(CddbServerPortAutomaticSearch), 45, -1);
1208
 
    gtk_entry_set_max_length(GTK_ENTRY(CddbServerPortAutomaticSearch),5);
1209
1168
    gtk_box_pack_start(GTK_BOX(hbox),CddbServerPortAutomaticSearch,FALSE,FALSE,0);
1210
 
    sprintf(temp,"%i",CDDB_SERVER_PORT_AUTOMATIC_SEARCH);
1211
 
    gtk_entry_set_text(GTK_ENTRY(CddbServerPortAutomaticSearch),temp);
1212
 
    g_signal_connect(G_OBJECT(CddbServerPortAutomaticSearch),"insert_text",G_CALLBACK(Insert_Only_Digit),NULL);
 
1169
    gtk_spin_button_set_value (GTK_SPIN_BUTTON (CddbServerPortAutomaticSearch),
 
1170
                               CDDB_SERVER_PORT_AUTOMATIC_SEARCH);
1213
1171
 
1214
1172
    Label = gtk_label_new (_("CGI Path:"));
1215
1173
    gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,2);
1219
1177
        gtk_entry_set_text(GTK_ENTRY(CddbServerCgiPathAutomaticSearch),CDDB_SERVER_CGI_PATH_AUTOMATIC_SEARCH);
1220
1178
 
1221
1179
    // 2sd automatic search server
1222
 
    hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,2);
 
1180
    hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, BOX_SPACING);
1223
1181
    gtk_container_add(GTK_CONTAINER(vbox),hbox);
1224
1182
    Label = gtk_label_new(_("Name:"));
1225
1183
    gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,2);
1231
1189
 
1232
1190
    Label = gtk_label_new (_("Port:"));
1233
1191
    gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,2);
1234
 
    CddbServerPortAutomaticSearch2 = gtk_entry_new();
 
1192
    CddbServerPortAutomaticSearch2 = gtk_spin_button_new_with_range (0.0,
 
1193
                                                                     65535.0,
 
1194
                                                                     1.0);
1235
1195
    gtk_widget_set_size_request(GTK_WIDGET(CddbServerPortAutomaticSearch2), 45, -1);
1236
 
    gtk_entry_set_max_length(GTK_ENTRY(CddbServerPortAutomaticSearch2),5);
1237
1196
    gtk_box_pack_start(GTK_BOX(hbox),CddbServerPortAutomaticSearch2,FALSE,FALSE,0);
1238
 
    sprintf(temp,"%i",CDDB_SERVER_PORT_AUTOMATIC_SEARCH2);
1239
 
    gtk_entry_set_text(GTK_ENTRY(CddbServerPortAutomaticSearch2),temp);
1240
 
    g_signal_connect(G_OBJECT(CddbServerPortAutomaticSearch2),"insert_text",G_CALLBACK(Insert_Only_Digit),NULL);
 
1197
    gtk_spin_button_set_value (GTK_SPIN_BUTTON (CddbServerPortAutomaticSearch2),
 
1198
                               CDDB_SERVER_PORT_AUTOMATIC_SEARCH2);
1241
1199
 
1242
1200
    Label = gtk_label_new (_("CGI Path:"));
1243
1201
    gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,2);
1249
1207
    // CDDB Server Settings (Manual Search)
1250
1208
    Frame = gtk_frame_new (_("Server Settings for Manual Search"));
1251
1209
    gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
1252
 
    vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
 
1210
    vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
1253
1211
    gtk_container_add(GTK_CONTAINER(Frame),vbox);
1254
1212
    gtk_container_set_border_width(GTK_CONTAINER(vbox), 4);
1255
1213
 
1256
 
    hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,2);
 
1214
    hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, BOX_SPACING);
1257
1215
    gtk_container_add(GTK_CONTAINER(vbox),hbox);
1258
1216
    Label = gtk_label_new(_("Name:"));
1259
1217
    gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,2);
1266
1224
 
1267
1225
    Label = gtk_label_new (_("Port:"));
1268
1226
    gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,2);
1269
 
    CddbServerPortManualSearch = gtk_entry_new();
 
1227
    CddbServerPortManualSearch = gtk_spin_button_new_with_range (0.0, 65535.0,
 
1228
                                                                 1.0);
1270
1229
    gtk_widget_set_size_request(GTK_WIDGET(CddbServerPortManualSearch), 45, -1);
1271
 
    gtk_entry_set_max_length(GTK_ENTRY(CddbServerPortManualSearch),5);
1272
1230
    gtk_box_pack_start(GTK_BOX(hbox),CddbServerPortManualSearch,FALSE,FALSE,0);
1273
 
    sprintf(temp,"%i",CDDB_SERVER_PORT_MANUAL_SEARCH);
1274
 
    gtk_entry_set_text(GTK_ENTRY(CddbServerPortManualSearch),temp);
1275
 
    g_signal_connect(G_OBJECT(CddbServerPortManualSearch),"insert_text",G_CALLBACK(Insert_Only_Digit),NULL);
 
1231
    gtk_spin_button_set_value (GTK_SPIN_BUTTON (CddbServerPortManualSearch),
 
1232
                               CDDB_SERVER_PORT_MANUAL_SEARCH);
1276
1233
 
1277
1234
    Label = gtk_label_new (_("CGI Path:"));
1278
1235
    gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,2);
1282
1239
        gtk_entry_set_text(GTK_ENTRY(CddbServerCgiPathManualSearch) ,CDDB_SERVER_CGI_PATH_MANUAL_SEARCH);
1283
1240
 
1284
1241
    // Local access for CDDB (Automatic Search)
1285
 
    Frame = gtk_frame_new (_("Local CD Data Base"));
 
1242
    Frame = gtk_frame_new (_("Local CDDB"));
1286
1243
    gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
1287
 
    vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
 
1244
    vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
1288
1245
    gtk_container_add(GTK_CONTAINER(Frame),vbox);
1289
 
    gtk_container_set_border_width(GTK_CONTAINER(vbox), 4);
 
1246
    gtk_container_set_border_width (GTK_CONTAINER (vbox), BOX_SPACING);
1290
1247
 
1291
 
    hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,2);
 
1248
    hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, BOX_SPACING);
1292
1249
    gtk_container_add(GTK_CONTAINER(vbox),hbox);
1293
1250
    Label = gtk_label_new(_("Path:"));
1294
1251
    gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,2);
1303
1260
    gtk_box_pack_start(GTK_BOX(hbox),CddbLocalPath,FALSE,FALSE,0);
1304
1261
    gtk_widget_set_size_request(GTK_WIDGET(CddbLocalPath), 450, -1);
1305
1262
    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 "
 
1263
        "where the local CD database is located. The local CD database contains the eleven following "
1307
1264
        "directories 'blues', 'classical', 'country', 'data', 'folk', 'jazz', 'newage', 'reggae', "
1308
1265
        "'rock', 'soundtrack' and 'misc'."));
1309
1266
    g_signal_connect(G_OBJECT(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(CddbLocalPath)))),"activate",G_CALLBACK(CddbLocalPath_Combo_Add_String),NULL);
1331
1288
    Frame = gtk_frame_new (_("Proxy Settings"));
1332
1289
    gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
1333
1290
 
1334
 
    Table = gtk_table_new(3,5,FALSE);
 
1291
    Table = et_grid_new (3, 5);
1335
1292
    gtk_container_add(GTK_CONTAINER(Frame),Table);
1336
 
    gtk_table_set_row_spacings(GTK_TABLE(Table),2);
1337
 
    gtk_table_set_col_spacings(GTK_TABLE(Table),4);
1338
 
    gtk_container_set_border_width(GTK_CONTAINER(Table), 2);
 
1293
    gtk_grid_set_row_spacing (GTK_GRID (Table), BOX_SPACING);
 
1294
    gtk_grid_set_column_spacing (GTK_GRID (Table), BOX_SPACING);
 
1295
    gtk_container_set_border_width(GTK_CONTAINER(Table), BOX_SPACING);
1339
1296
 
1340
1297
    CddbUseProxy = gtk_check_button_new_with_label(_("Use a proxy"));
1341
 
    gtk_table_attach(GTK_TABLE(Table),CddbUseProxy,0,5,0,1,GTK_FILL,GTK_FILL,0,0);
 
1298
    gtk_grid_attach (GTK_GRID (Table), CddbUseProxy, 0, 0, 5, 1);
1342
1299
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(CddbUseProxy),CDDB_USE_PROXY);
1343
1300
    gtk_widget_set_tooltip_text(CddbUseProxy,_("Set active the settings of the proxy server."));
1344
1301
 
1345
 
    Label = gtk_label_new("     ");
1346
 
    gtk_table_attach(GTK_TABLE(Table),Label,0,1,1,2,GTK_FILL,GTK_FILL,0,0);
1347
 
 
1348
1302
    Label = gtk_label_new(_("Host Name:"));
1349
 
    gtk_table_attach(GTK_TABLE(Table),Label,1,2,1,2,GTK_FILL,GTK_FILL,0,0);
 
1303
    gtk_grid_attach (GTK_GRID (Table), Label, 1, 1, 1, 1);
1350
1304
    gtk_misc_set_alignment(GTK_MISC(Label),1,0.5);
1351
1305
    CddbProxyName = gtk_entry_new();
1352
 
    gtk_table_attach(GTK_TABLE(Table),CddbProxyName,2,3,1,2,GTK_FILL,GTK_FILL,0,0);
 
1306
    gtk_grid_attach (GTK_GRID (Table), CddbProxyName, 2, 1, 1, 1);
1353
1307
    if (CDDB_PROXY_NAME)
1354
1308
        gtk_entry_set_text(GTK_ENTRY(CddbProxyName),CDDB_PROXY_NAME);
1355
1309
    gtk_widget_set_tooltip_text(CddbProxyName,_("Name of the proxy server."));
1356
1310
    Label = gtk_label_new (_("Port:"));
1357
 
    gtk_table_attach(GTK_TABLE(Table),Label,3,4,1,2,GTK_FILL,GTK_FILL,0,0);
 
1311
    gtk_grid_attach (GTK_GRID (Table), Label, 3, 1, 1, 1);
1358
1312
    gtk_misc_set_alignment(GTK_MISC(Label),1,0.5);
1359
1313
    CddbProxyPort = gtk_entry_new();
 
1314
    CddbProxyPort = gtk_spin_button_new_with_range (0.0, 65535.0, 1.0);
1360
1315
    gtk_widget_set_size_request(GTK_WIDGET(CddbProxyPort), 45, -1);
1361
 
    gtk_entry_set_max_length(GTK_ENTRY(CddbProxyPort),5);
1362
 
    gtk_table_attach(GTK_TABLE(Table),CddbProxyPort,4,5,1,2,GTK_FILL,GTK_FILL,0,0);
 
1316
    gtk_grid_attach (GTK_GRID (Table), CddbProxyPort, 4, 1, 1, 1);
1363
1317
    gtk_widget_set_tooltip_text(CddbProxyPort,_("Port of the proxy server."));
1364
 
    sprintf(temp,"%i",CDDB_PROXY_PORT);
1365
 
    gtk_entry_set_text(GTK_ENTRY(CddbProxyPort),temp);
1366
 
    g_signal_connect(G_OBJECT(CddbProxyPort),"insert_text",G_CALLBACK(Insert_Only_Digit),NULL);
 
1318
    gtk_spin_button_set_value (GTK_SPIN_BUTTON (CddbProxyPort),
 
1319
                               CDDB_PROXY_PORT);
1367
1320
    g_signal_connect(G_OBJECT(CddbUseProxy),"toggled",G_CALLBACK(Cddb_Use_Proxy_Toggled),NULL);
1368
1321
    Label = gtk_label_new(_("User Name:"));
1369
 
    gtk_table_attach(GTK_TABLE(Table),Label,1,2,2,3,GTK_FILL,GTK_FILL,0,0);
 
1322
    gtk_grid_attach (GTK_GRID (Table), Label, 1, 2, 1, 1);
1370
1323
    gtk_misc_set_alignment(GTK_MISC(Label),1,0.5);
1371
1324
    CddbProxyUserName = gtk_entry_new();
1372
1325
    if (CDDB_PROXY_USER_NAME)
1373
1326
        gtk_entry_set_text(GTK_ENTRY(CddbProxyUserName),CDDB_PROXY_USER_NAME);
1374
 
    gtk_table_attach(GTK_TABLE(Table),CddbProxyUserName,2,3,2,3,GTK_FILL,GTK_FILL,0,0);
 
1327
    gtk_grid_attach (GTK_GRID (Table), CddbProxyUserName, 2, 2, 1, 1);
1375
1328
    gtk_widget_set_tooltip_text(CddbProxyUserName,_("Name of user for the the proxy server."));
1376
1329
    Label = gtk_label_new(_("User Password:"));
1377
 
    gtk_table_attach(GTK_TABLE(Table),Label,3,4,2,3,GTK_FILL,GTK_FILL,0,0);
 
1330
    gtk_grid_attach (GTK_GRID (Table), Label, 3, 2, 1, 1);
1378
1331
    gtk_misc_set_alignment(GTK_MISC(Label),1,0.5);
1379
1332
    CddbProxyUserPassword = gtk_entry_new();
1380
1333
    if (CDDB_PROXY_USER_PASSWORD)
1381
1334
        gtk_entry_set_text(GTK_ENTRY(CddbProxyUserPassword),CDDB_PROXY_USER_PASSWORD);
1382
 
    gtk_table_attach(GTK_TABLE(Table),CddbProxyUserPassword,4,5,2,3,GTK_FILL,GTK_FILL,0,0);
 
1335
    gtk_grid_attach (GTK_GRID (Table), CddbProxyUserPassword, 4, 2, 1, 1);
1383
1336
    gtk_entry_set_visibility(GTK_ENTRY(CddbProxyUserPassword),FALSE);
1384
1337
    gtk_widget_set_tooltip_text(CddbProxyUserPassword,_("Password of user for the the proxy server."));
1385
1338
    Cddb_Use_Proxy_Toggled();
1389
1342
    Frame = gtk_frame_new (_("Track Name List"));
1390
1343
    gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
1391
1344
 
1392
 
    vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
 
1345
    vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
1393
1346
    gtk_container_add(GTK_CONTAINER(Frame),vbox);
1394
 
    gtk_container_set_border_width(GTK_CONTAINER(vbox), 2);
 
1347
    gtk_container_set_border_width (GTK_CONTAINER (vbox), BOX_SPACING);
1395
1348
 
1396
1349
    CddbFollowFile = gtk_check_button_new_with_label(_("Select corresponding audio "
1397
1350
        "file (according position or DLM if activated below)"));
1408
1361
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(CddbUseDLM),CDDB_USE_DLM);
1409
1362
    gtk_widget_set_tooltip_text(CddbUseDLM,_("When activating this option, the "
1410
1363
        "Levenshtein algorithm (DLM: Damerau-Levenshtein Metric) will be used "
1411
 
        "to match the CDDB title against every file name in the current folder, "
 
1364
        "to match the CDDB title against every filename in the current folder, "
1412
1365
        "and to select the best match. This will be used when selecting the "
1413
1366
        "corresponding audio file, or applying CDDB results, instead of using "
1414
1367
        "directly the position order."));
1418
1371
     * Confirmation
1419
1372
     */
1420
1373
    Label = gtk_label_new (_("Confirmation"));
1421
 
    Frame = gtk_frame_new (_("Confirmation"));
1422
 
    gtk_notebook_append_page (GTK_NOTEBOOK(OptionsNoteBook),Frame,Label);
1423
 
    gtk_container_set_border_width(GTK_CONTAINER(Frame), 5);
1424
 
 
1425
 
    VBox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
1426
 
    gtk_container_add(GTK_CONTAINER(Frame),VBox);
1427
 
    gtk_container_set_border_width(GTK_CONTAINER(VBox), 2);
 
1374
    VBox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BOX_SPACING);
 
1375
    gtk_notebook_append_page (GTK_NOTEBOOK(OptionsNoteBook), VBox, Label);
 
1376
    gtk_container_set_border_width (GTK_CONTAINER (VBox), BOX_SPACING);
1428
1377
 
1429
1378
    ConfirmBeforeExit = gtk_check_button_new_with_label(_("Confirm exit from program"));
1430
1379
    gtk_box_pack_start(GTK_BOX(VBox),ConfirmBeforeExit,FALSE,FALSE,0);
1453
1402
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ConfirmWhenUnsavedFiles),CONFIRM_WHEN_UNSAVED_FILES);
1454
1403
 
1455
1404
 
1456
 
    /*
1457
 
     * Buttons box of Option Window
1458
 
     */
1459
 
    ButtonBox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
1460
 
    gtk_box_pack_start(GTK_BOX(OptionsVBox), ButtonBox, FALSE, FALSE, 4);
1461
 
 
1462
 
    gtk_button_box_set_layout (GTK_BUTTON_BOX (ButtonBox), GTK_BUTTONBOX_END);
1463
 
    gtk_box_set_spacing (GTK_BOX(ButtonBox), 15);
1464
 
 
1465
 
 
1466
 
    /* Apply Button */
1467
 
    Button = gtk_button_new_from_stock(GTK_STOCK_APPLY);
1468
 
    gtk_widget_set_tooltip_text(Button,_("Apply changes (but don't save) and close this window"));
1469
 
 
1470
 
 
1471
 
    /* Cancel Button */
1472
 
    Button = gtk_button_new_from_stock(GTK_STOCK_CANCEL);
1473
 
    gtk_container_add(GTK_CONTAINER(ButtonBox), Button);
1474
 
    g_signal_connect(G_OBJECT(Button),"clicked", G_CALLBACK(OptionsWindow_Cancel_Button),NULL);
1475
 
    gtk_widget_set_can_default(Button,TRUE);
1476
 
    gtk_widget_grab_default(Button);
1477
 
    gtk_widget_set_tooltip_text(Button,_("Close this window without saving"));
1478
 
 
1479
 
 
1480
 
    /* Save Button */
1481
 
    Button = gtk_button_new_from_stock(GTK_STOCK_OK);
1482
 
    gtk_container_add(GTK_CONTAINER(ButtonBox), Button);
1483
 
    g_signal_connect(G_OBJECT(Button),"clicked", G_CALLBACK(OptionsWindow_Save_Button),NULL);
1484
 
    gtk_widget_set_can_default(Button,TRUE);
1485
 
    gtk_widget_set_tooltip_text(Button,_("Save changes and close this window"));
1486
 
 
1487
1405
    /* Show all in the options window */
1488
1406
    gtk_widget_show_all(OptionsWindow);
1489
1407
 
1524
1442
}
1525
1443
 
1526
1444
static void
 
1445
et_prefs_on_pad_disc_number_toggled (void)
 
1446
{
 
1447
    gtk_widget_set_sensitive (pad_disc_number_spinbutton,
 
1448
                              gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (pad_disc_number)));
 
1449
    /* Update the example. */
 
1450
    g_signal_emit_by_name (G_OBJECT (pad_disc_number_spinbutton), "changed",
 
1451
                           NULL);
 
1452
}
 
1453
 
 
1454
static void
 
1455
et_prefs_on_pad_disc_number_spinbutton_changed (GtkWidget *label,
 
1456
                                                GtkWidget *spinbutton)
 
1457
{
 
1458
    gchar *tmp;
 
1459
    guint val;
 
1460
 
 
1461
    if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (pad_disc_number)))
 
1462
    {
 
1463
        val = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spinbutton));
 
1464
    }
 
1465
    else
 
1466
    {
 
1467
        val = 1;
 
1468
    }
 
1469
 
 
1470
    /* Translators: please do NOT translate '%.*d' in this string. */
 
1471
    tmp = g_strdup_printf (_("(Example: disc_%.*d_of_10/Track_name_1.mp3)"),
 
1472
                           val, 1);
 
1473
 
 
1474
    gtk_label_set_text (GTK_LABEL (label), tmp);
 
1475
    g_free (tmp);
 
1476
}
 
1477
 
 
1478
static void
1527
1479
Use_Non_Standard_Id3_Reading_Character_Set_Toggled (void)
1528
1480
{
1529
1481
    gtk_widget_set_sensitive(FileReadingId3v1v2CharacterSetCombo,
1642
1594
}
1643
1595
 
1644
1596
/* Callback from Open_OptionsWindow */
1645
 
static gboolean
1646
 
OptionsWindow_Key_Press (GtkWidget *window, GdkEvent *event)
1647
 
{
1648
 
    GdkEventKey *kevent;
1649
 
 
1650
 
    if (event && event->type == GDK_KEY_PRESS)
1651
 
    {
1652
 
        kevent = (GdkEventKey *)event;
1653
 
        switch(kevent->keyval)
1654
 
        {
1655
 
            case GDK_KEY_Escape:
1656
 
            {
1657
 
                OptionsWindow_Quit();
1658
 
                break;
1659
 
            }
1660
 
        }
1661
 
    }
1662
 
    return FALSE;
1663
 
}
1664
 
 
1665
 
/* Callback from Open_OptionsWindow */
1666
1597
static void
1667
1598
OptionsWindow_Save_Button (void)
1668
1599
{
1712
1643
{
1713
1644
    if (OptionsWindow)
1714
1645
    {
1715
 
        //gint x, y;
1716
 
        gint width, height;
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 )
1722
 
        {
1723
 
            // Position and Origin of the preferences window
1724
 
            //gdk_window_get_root_origin(OptionsWindow->window,&x,&y);
1725
 
            //OPTIONS_WINDOW_X = x;
1726
 
            //OPTIONS_WINDOW_Y = y;
1727
 
            width = gdk_window_get_width(window);
1728
 
            height = gdk_window_get_height(window);
1729
 
            OPTIONS_WINDOW_WIDTH  = width;
1730
 
            OPTIONS_WINDOW_HEIGHT = height;
1731
 
        }
1732
 
 
1733
1646
        /* Get the last visible notebook page */
1734
1647
        OPTIONS_NOTEBOOK_PAGE = gtk_notebook_get_current_page(GTK_NOTEBOOK(OptionsNoteBook));
1735
1648
 
1761
1674
{
1762
1675
    gchar *path_utf8;
1763
1676
    gchar *path_real;
1764
 
    struct stat stbuf;
 
1677
    GFile *file;
 
1678
    GFileInfo *fileinfo;
 
1679
    GtkWidget *msgdialog;
1765
1680
 
1766
1681
    path_utf8 = g_strdup(gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(DefaultPathToMp3)))));
1767
1682
    if (!path_utf8 || g_utf8_strlen(path_utf8, -1) < 1)
1770
1685
        return TRUE;
1771
1686
    }
1772
1687
 
1773
 
    path_real = filename_from_display(path_utf8);
1774
 
 
1775
 
#ifdef G_OS_WIN32
1776
 
    /* On win32 : stat("c:\path\to\dir") succeed, while stat("c:\path\to\dir\")
1777
 
     * fails.
1778
 
     */
1779
 
    ET_Win32_Path_Remove_Trailing_Backslash(path_real);
1780
 
#endif /* G_OS_WIN32 */
1781
 
 
1782
 
    if ( stat(path_real,&stbuf)==0 && S_ISDIR(stbuf.st_mode) )
1783
 
    {
1784
 
        g_free(path_real);
1785
 
        g_free(path_utf8);
1786
 
        return TRUE; /* Path is good */
1787
 
    }else
1788
 
    {
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);
1800
 
        g_free(path_real);
1801
 
        g_free(path_utf8);
1802
 
        return FALSE;
 
1688
    path_real = filename_from_display (path_utf8);
 
1689
    file = g_file_new_for_path (path_real);
 
1690
    fileinfo = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_TYPE,
 
1691
                                  G_FILE_QUERY_INFO_NONE, NULL, NULL);
 
1692
    g_object_unref (file);
 
1693
 
 
1694
    if (fileinfo)
 
1695
    {
 
1696
        if (g_file_info_get_file_type (fileinfo) == G_FILE_TYPE_DIRECTORY)
 
1697
        {
 
1698
            g_free (path_real);
 
1699
            g_free (path_utf8);
 
1700
            g_object_unref (fileinfo);
 
1701
            return TRUE; /* Path is good */
 
1702
        }
 
1703
 
 
1704
        g_object_unref (fileinfo);
1803
1705
    }
 
1706
 
 
1707
    msgdialog = gtk_message_dialog_new (GTK_WINDOW (OptionsWindow),
 
1708
                                        GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
 
1709
                                        GTK_MESSAGE_ERROR,
 
1710
                                        GTK_BUTTONS_CLOSE,
 
1711
                                        "%s",
 
1712
                                        _("The selected path for 'Default path to files' is invalid"));
 
1713
    gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (msgdialog),
 
1714
                                              _("Path: '%s'\nError: %s"),
 
1715
                                              path_utf8, g_strerror (errno));
 
1716
    gtk_window_set_title (GTK_WINDOW (msgdialog), _("Invalid Path Error"));
 
1717
 
 
1718
    gtk_dialog_run (GTK_DIALOG (msgdialog));
 
1719
    gtk_widget_destroy (msgdialog);
 
1720
    g_free (path_real);
 
1721
    g_free (path_utf8);
 
1722
 
 
1723
    return FALSE;
1804
1724
}
1805
1725
 
1806
1726
/*
1969
1889
    Add_String_To_Combo_List(GTK_LIST_STORE(CddbLocalPath), path);
1970
1890
}
1971
1891
 
1972
 
 
 
1892
/*
 
1893
 * et_preferences_on_response:
 
1894
 * @dialog: the dialog which trigerred the response signal
 
1895
 * @response_id: the response which was triggered
 
1896
 * @user_data: user data set when the signal was connected
 
1897
 *
 
1898
 * Signal handler for the response signal, to check whether the OK or cancel
 
1899
 * button was clicked, or if a delete event was received.
 
1900
 */
 
1901
static void
 
1902
et_preferences_on_response (GtkDialog *dialog, gint response_id,
 
1903
                            gpointer user_data)
 
1904
{
 
1905
    switch (response_id)
 
1906
    {
 
1907
        case GTK_RESPONSE_ACCEPT:
 
1908
            OptionsWindow_Save_Button ();
 
1909
            break;
 
1910
        case GTK_RESPONSE_DELETE_EVENT:
 
1911
            OptionsWindow_Quit ();
 
1912
        case GTK_RESPONSE_REJECT:
 
1913
            OptionsWindow_Cancel_Button ();
 
1914
            break;
 
1915
        default:
 
1916
            g_assert_not_reached ();
 
1917
    }
 
1918
}