[easytag/wip/application-window: 33/34] Store scan space conversion options in GSettings



commit b4fefed61401834cbaebaf3575757c5a339c7d2a
Author: David King <amigadave amigadave com>
Date:   Sat May 10 18:01:09 2014 +0100

    Store scan space conversion options in GSettings

 data/org.gnome.EasyTAG.gschema.xml |    6 --
 src/playlist_dialog.c              |   31 +++++++-----
 src/preferences_dialog.c           |   99 +++++++++++++++++++++--------------
 src/preferences_dialog.h           |    7 ---
 src/scan_dialog.c                  |   61 +++++++++++++---------
 src/setting.c                      |   22 --------
 src/setting.h                      |   16 +++---
 7 files changed, 123 insertions(+), 119 deletions(-)
---
diff --git a/data/org.gnome.EasyTAG.gschema.xml b/data/org.gnome.EasyTAG.gschema.xml
index f31d873..07b3570 100644
--- a/data/org.gnome.EasyTAG.gschema.xml
+++ b/data/org.gnome.EasyTAG.gschema.xml
@@ -413,14 +413,12 @@
       <default>'xdg-open'</default>
     </key>
 
-    <!-- TODO: Generate enums with glib-mkenums.
     <key name="fill-convert-spaces" enum="org.gnome.EasyTAG.EtConvertSpaces">
       <summary>Convert spaces and underscores when filling tag fields</summary>
       <description>Whether to convert to spaces (and %20) or underscores when
       filling tag fields from filenames</description>
       <default>'spaces'</default>
     </key>
-    -->
 
     <key name="fill-overwrite-tag-fields" type="b">
       <summary>Overwrite tag field</summary>
@@ -507,14 +505,12 @@
       
<default>['title','artist','album-artist','album','genre','comment','composer','original-artist','copyright','url','encoded-by']</default>
     </key>
 
-    <!-- TODO: Generate enums and flags with glib-mkenums.
     <key name="process-convert-spaces" enum="org.gnome.EasyTAG.EtConvertSpaces">
       <summary>Convert spaces and underscores in tags</summary>
       <description>Whether to convert to spaces (and %20) or underscores when
       processing tag fields</description>
       <default>'spaces'</default>
     </key>
-    -->
 
     <key name="process-convert-characters" type="b">
       <summary>Convert characters in tags</summary>
@@ -702,14 +698,12 @@
       <default>true</default>
     </key>
 
-    <!-- TODO: Generate enums with glib-mkenums.
     <key name="rename-convert-spaces" enum="org.gnome.EasyTAG.EtConvertSpaces">
       <summary>Convert spaces and underscores when renaming files</summary>
       <description>Whether to convert to spaces or underscores when renaming
       files</description>
       <default>'spaces'</default>
     </key>
-    -->
 
     <key name="rename-extension-mode" enum="org.gnome.EasyTAG.EtFilenameExtensionMode">
       <summary>How to modify filename extensions when renaming</summary>
diff --git a/src/playlist_dialog.c b/src/playlist_dialog.c
index 394b641..5bc8ace 100644
--- a/src/playlist_dialog.c
+++ b/src/playlist_dialog.c
@@ -438,6 +438,7 @@ write_button_clicked (EtPlaylistDialog *self)
     /* Build the playlist filename. */
     if (g_settings_get_boolean (MainSettings, "playlist-use-mask"))
     {
+        EtConvertSpaces convert_mode;
 
         if (!ETCore->ETFileList)
             return;
@@ -449,21 +450,25 @@ write_button_clicked (EtPlaylistDialog *self)
         playlist_basename_utf8 = Scan_Generate_New_Filename_From_Mask(ETCore->ETFileDisplayed,temp,FALSE);
         g_free(temp);
 
-        // Replace Characters (with scanner)
-        if (RFS_CONVERT_UNDERSCORE_AND_P20_INTO_SPACE)
-        {
-            Scan_Convert_Underscore_Into_Space(playlist_basename_utf8);
-            Scan_Convert_P20_Into_Space(playlist_basename_utf8);
-        }
-        if (RFS_CONVERT_SPACE_INTO_UNDERSCORE)
+        /* Replace Characters (with scanner). */
+        convert_mode = g_settings_get_flags (MainSettings,
+                                             "rename-convert-spaces");
+
+        switch (convert_mode)
         {
-            Scan_Convert_Space_Into_Underscore (playlist_basename_utf8);
+            case ET_CONVERT_SPACES_SPACES:
+                Scan_Convert_Underscore_Into_Space (playlist_basename_utf8);
+                Scan_Convert_P20_Into_Space (playlist_basename_utf8);
+                break;
+            case ET_CONVERT_SPACES_UNDERSCORES:
+                Scan_Convert_Space_Into_Underscore (playlist_basename_utf8);
+                break;
+            case ET_CONVERT_SPACES_REMOVE:
+                Scan_Remove_Spaces (playlist_basename_utf8);
+                break;
+            default:
+                g_assert_not_reached ();
         }
-        if (RFS_REMOVE_SPACES)
-                                {
-                                   Scan_Remove_Spaces(playlist_basename_utf8);
-                                }
-
     }else // PLAYLIST_USE_DIR_NAME
     {
 
diff --git a/src/preferences_dialog.c b/src/preferences_dialog.c
index 7efcc63..9af16dc 100644
--- a/src/preferences_dialog.c
+++ b/src/preferences_dialog.c
@@ -90,8 +90,6 @@ static void et_prefs_on_pad_disc_number_spinbutton_changed (GtkWidget *label,
                                                             GtkWidget *spinbutton);
 
 static void Change_Id3_Settings_Toggled (GtkWidget *blah, EtPreferencesDialog *self);
-static void Scanner_Convert_Check_Button_Toggled_1 (GtkWidget *object_rec,
-                                                    GtkWidget *object_emi);
 static void CddbLocalPath_Combo_Add_String (void);
 
 static void et_preferences_on_response (GtkDialog *dialog, gint response_id,
@@ -211,6 +209,12 @@ create_preferences_dialog (EtPreferencesDialog *self)
     GtkWidget *FileWritingId3v2WriteTag;
     GtkWidget *FileWritingId3v1WriteTag;
     GtkWidget *UseNonStandardId3ReadingCharacterSet;
+    GtkWidget *FTSConvertUnderscoreAndP20IntoSpace;
+    GtkWidget *FTSConvertSpaceIntoUnderscore;
+    GtkWidget *FTSConvertSpaceNoChange;
+    GtkWidget *RFSConvertUnderscoreAndP20IntoSpace;
+    GtkWidget *RFSConvertSpaceIntoUnderscore;
+    GtkWidget *RFSRemoveSpaces;
     GtkWidget *PFSDontUpperSomeWords;
     GtkWidget *OpenScannerWindowOnStartup;
     GtkWidget *OverwriteTagField;
@@ -1223,24 +1227,42 @@ create_preferences_dialog (EtPreferencesDialog *self)
     gtk_container_add(GTK_CONTAINER(Frame),vbox);
     gtk_container_set_border_width (GTK_CONTAINER (vbox), BOX_SPACING);
 
-    FTSConvertUnderscoreAndP20IntoSpace = gtk_check_button_new_with_label(_("Convert underscore "
-        "character '_' and string '%20' to space ' '"));
-    FTSConvertSpaceIntoUnderscore = gtk_check_button_new_with_label(_("Convert space ' ' to underscore 
'_'"));
+    FTSConvertUnderscoreAndP20IntoSpace = gtk_radio_button_new_with_label_from_widget (NULL,
+       _("Convert underscore character '_' and string '%20' to space ' '"));
+    gtk_widget_set_name (FTSConvertUnderscoreAndP20IntoSpace, "spaces");
+    FTSConvertSpaceIntoUnderscore = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON 
(FTSConvertUnderscoreAndP20IntoSpace),
+                                                                                 _("Convert space ' ' to 
underscore '_'"));
+    gtk_widget_set_name (FTSConvertSpaceIntoUnderscore, "underscores");
+    FTSConvertSpaceNoChange = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON 
(FTSConvertUnderscoreAndP20IntoSpace),
+                                                                           _("No conversion"));
+    gtk_widget_set_name (FTSConvertSpaceNoChange, "no-change");
     gtk_box_pack_start(GTK_BOX(vbox),FTSConvertUnderscoreAndP20IntoSpace,FALSE,FALSE,0);
     gtk_box_pack_start(GTK_BOX(vbox),FTSConvertSpaceIntoUnderscore,      FALSE,FALSE,0);
-    g_signal_connect_swapped(G_OBJECT(FTSConvertUnderscoreAndP20IntoSpace),"toggled",
-        G_CALLBACK(Scanner_Convert_Check_Button_Toggled_1),G_OBJECT(FTSConvertSpaceIntoUnderscore));
-    g_signal_connect_swapped(G_OBJECT(FTSConvertSpaceIntoUnderscore),"toggled",
-        G_CALLBACK(Scanner_Convert_Check_Button_Toggled_1),G_OBJECT(FTSConvertUnderscoreAndP20IntoSpace));
-
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FTSConvertUnderscoreAndP20IntoSpace),
-        FTS_CONVERT_UNDERSCORE_AND_P20_INTO_SPACE);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FTSConvertSpaceIntoUnderscore),
-        FTS_CONVERT_SPACE_INTO_UNDERSCORE);
+    gtk_box_pack_start (GTK_BOX (vbox), FTSConvertSpaceNoChange, FALSE, FALSE,
+                        0);
+    g_settings_bind_with_mapping (MainSettings, "fill-convert-spaces",
+                                  FTSConvertUnderscoreAndP20IntoSpace,
+                                  "active", G_SETTINGS_BIND_DEFAULT,
+                                  et_settings_enum_radio_get,
+                                  et_settings_enum_radio_set,
+                                  FTSConvertUnderscoreAndP20IntoSpace, NULL);
+    g_settings_bind_with_mapping (MainSettings, "fill-convert-spaces",
+                                  FTSConvertSpaceIntoUnderscore, "active",
+                                  G_SETTINGS_BIND_DEFAULT,
+                                  et_settings_enum_radio_get,
+                                  et_settings_enum_radio_set,
+                                  FTSConvertSpaceIntoUnderscore, NULL);
+    g_settings_bind_with_mapping (MainSettings, "fill-convert-spaces",
+                                  FTSConvertSpaceNoChange, "active",
+                                  G_SETTINGS_BIND_DEFAULT,
+                                  et_settings_enum_radio_get,
+                                  et_settings_enum_radio_set,
+                                  FTSConvertSpaceNoChange, NULL);
     gtk_widget_set_tooltip_text(FTSConvertUnderscoreAndP20IntoSpace,_("If activated, this conversion "
         "will be used when applying a mask from the scanner for tags."));
     gtk_widget_set_tooltip_text(FTSConvertSpaceIntoUnderscore,_("If activated, this conversion "
         "will be used when applying a mask from the scanner for tags."));
+    /* TODO: No change tooltip. */
 
     /* Character conversion for the 'Rename File' scanner (=> RFS...) */
     Frame = gtk_frame_new (_("Rename File Scanner - Character Conversion"));
@@ -1250,16 +1272,32 @@ create_preferences_dialog (EtPreferencesDialog *self)
     gtk_container_set_border_width (GTK_CONTAINER (vbox), BOX_SPACING);
     RFSConvertUnderscoreAndP20IntoSpace = gtk_radio_button_new_with_label(NULL, _("Convert underscore " 
"character '_' and string '%20' to space ' '"));
     RFSConvertSpaceIntoUnderscore = 
gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(RFSConvertUnderscoreAndP20IntoSpace), _("Convert 
space ' ' to underscore '_'"));
-               RFSRemoveSpaces = 
gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(RFSConvertUnderscoreAndP20IntoSpace), _("Remove 
spaces"));
+    RFSRemoveSpaces = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON 
(RFSConvertUnderscoreAndP20IntoSpace),
+                                                                   _("Remove spaces"));
+    gtk_widget_set_name (RFSConvertUnderscoreAndP20IntoSpace, "spaces");
+    gtk_widget_set_name (RFSConvertSpaceIntoUnderscore, "underscores");
+    gtk_widget_set_name (RFSRemoveSpaces, "remove");
     gtk_box_pack_start(GTK_BOX(vbox),RFSConvertUnderscoreAndP20IntoSpace,FALSE,FALSE,0);
     gtk_box_pack_start(GTK_BOX(vbox),RFSConvertSpaceIntoUnderscore,      FALSE,FALSE,0);
     gtk_box_pack_start (GTK_BOX (vbox), RFSRemoveSpaces, FALSE, FALSE, 0);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(RFSConvertUnderscoreAndP20IntoSpace),
-        RFS_CONVERT_UNDERSCORE_AND_P20_INTO_SPACE);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(RFSConvertSpaceIntoUnderscore),
-        RFS_CONVERT_SPACE_INTO_UNDERSCORE);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(RFSRemoveSpaces),
-        RFS_REMOVE_SPACES);
+    g_settings_bind_with_mapping (MainSettings, "rename-convert-spaces",
+                                  RFSConvertUnderscoreAndP20IntoSpace,
+                                  "active", G_SETTINGS_BIND_DEFAULT,
+                                  et_settings_enum_radio_get,
+                                  et_settings_enum_radio_set,
+                                  RFSConvertUnderscoreAndP20IntoSpace, NULL);
+    g_settings_bind_with_mapping (MainSettings, "rename-convert-spaces",
+                                  RFSConvertSpaceIntoUnderscore, "active",
+                                  G_SETTINGS_BIND_DEFAULT,
+                                  et_settings_enum_radio_get,
+                                  et_settings_enum_radio_set,
+                                  RFSConvertSpaceIntoUnderscore, NULL);
+    g_settings_bind_with_mapping (MainSettings, "rename-convert-spaces",
+                                  RFSRemoveSpaces, "active",
+                                  G_SETTINGS_BIND_DEFAULT,
+                                  et_settings_enum_radio_get,
+                                  et_settings_enum_radio_set, RFSRemoveSpaces,
+                                  NULL);
     gtk_widget_set_tooltip_text(RFSConvertUnderscoreAndP20IntoSpace,_("If activated, this conversion "
         "will be used when applying a mask from the scanner for filenames."));
     gtk_widget_set_tooltip_text(RFSConvertSpaceIntoUnderscore,_("If activated, this conversion "
@@ -1353,11 +1391,6 @@ create_preferences_dialog (EtPreferencesDialog *self)
                      G_SETTINGS_BIND_DEFAULT);
     gtk_widget_set_tooltip_text(Crc32Comment,_("Calculates the CRC-32 value of the file "
         "and writes it into the comment field when using the 'Fill Tag' scanner."));
-    g_signal_connect_swapped(G_OBJECT(SetDefaultComment), "toggled",
-        G_CALLBACK(Scanner_Convert_Check_Button_Toggled_1),G_OBJECT(Crc32Comment));
-    g_signal_connect_swapped(G_OBJECT(Crc32Comment), "toggled",
-        G_CALLBACK(Scanner_Convert_Check_Button_Toggled_1),G_OBJECT(SetDefaultComment));
-
 
     /*
      * CDDB
@@ -2037,20 +2070,6 @@ et_preferences_dialog_show_scanner (EtPreferencesDialog *self)
     gtk_window_present (GTK_WINDOW (self));
 }
 
-/*
- * Manage Check buttons into Scanner tab: conversion group
- * This reproduces "something" like the behaviour of radio buttons with check buttons
- */
-static void
-Scanner_Convert_Check_Button_Toggled_1 (GtkWidget *object_rec,
-                                        GtkWidget *object_emi)
-{
-    g_return_if_fail (object_rec != NULL || object_emi != NULL);
-
-    if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(object_emi)) == TRUE)
-        
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(object_rec),!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(object_emi)));
-}
-
 static void
 CddbLocalPath_Combo_Add_String (void)
 {
diff --git a/src/preferences_dialog.h b/src/preferences_dialog.h
index 4ef9e0b..12c4d6b 100644
--- a/src/preferences_dialog.h
+++ b/src/preferences_dialog.h
@@ -68,13 +68,6 @@ GtkWidget *FileWritingId3v2NoUnicodeCharacterSetCombo;
 GtkWidget *FileWritingId3v1CharacterSetCombo;
 GtkWidget *FileReadingId3v1v2CharacterSetCombo;
 
-/* Scanner */
-GtkWidget *FTSConvertUnderscoreAndP20IntoSpace;
-GtkWidget *FTSConvertSpaceIntoUnderscore;
-GtkWidget *RFSConvertUnderscoreAndP20IntoSpace;
-GtkWidget *RFSConvertSpaceIntoUnderscore;
-GtkWidget *RFSRemoveSpaces;
-
 /* CDDB */
 GtkWidget *CddbLocalPath;
 
diff --git a/src/scan_dialog.c b/src/scan_dialog.c
index ccf8d73..b61c5a7 100644
--- a/src/scan_dialog.c
+++ b/src/scan_dialog.c
@@ -353,6 +353,7 @@ Scan_Generate_New_Tag_From_Mask (ET_File *ETFile, gchar *mask)
     guint mask_splitted_index;
     guint file_splitted_index;
     Scan_Mask_Item *mask_item;
+    EtConvertSpaces convert_mode;
 
     g_return_val_if_fail (ETFile != NULL && mask != NULL, NULL);
 
@@ -377,21 +378,27 @@ Scan_Generate_New_Tag_From_Mask (ET_File *ETFile, gchar *mask)
         g_free(tmp1);
     }
 
-    // Replace characters into mask and filename before parsing
-    if (FTS_CONVERT_UNDERSCORE_AND_P20_INTO_SPACE)
-    {
-        Scan_Convert_Underscore_Into_Space(mask);
-        Scan_Convert_Underscore_Into_Space(filename_utf8);
-        Scan_Convert_P20_Into_Space(mask);
-        Scan_Convert_P20_Into_Space(filename_utf8);
-    }
-    if (FTS_CONVERT_SPACE_INTO_UNDERSCORE)
+    /* Replace characters into mask and filename before parsing. */
+    convert_mode = g_settings_get_enum (MainSettings, "fill-convert-spaces");
+
+    switch (convert_mode)
     {
-        Scan_Convert_Space_Into_Underscore (mask);
-        Scan_Convert_Space_Into_Underscore (filename_utf8);
+        case ET_CONVERT_SPACES_SPACES:
+            Scan_Convert_Underscore_Into_Space (mask);
+            Scan_Convert_Underscore_Into_Space (filename_utf8);
+            Scan_Convert_P20_Into_Space (mask);
+            Scan_Convert_P20_Into_Space (filename_utf8);
+            break;
+        case ET_CONVERT_SPACES_UNDERSCORES:
+            Scan_Convert_Space_Into_Underscore (mask);
+            Scan_Convert_Space_Into_Underscore (filename_utf8);
+            break;
+        case ET_CONVERT_SPACES_NO_CHANGE:
+            break;
+        default:
+            g_assert_not_reached ();
     }
 
-
     // Split the Scanner mask
     mask_splitted = g_strsplit(mask,G_DIR_SEPARATOR_S,0);
     // Get number of arguments into 'mask_splitted'
@@ -818,20 +825,26 @@ gchar *Scan_Generate_New_Filename_From_Mask (ET_File *ETFile, gchar *mask, gbool
             /* Do not replace characters in a playlist information field. */
             if (!no_dir_check_or_conversion)
             {
-                ET_File_Name_Convert_Character(mask_item->string);
+                EtConvertSpaces convert_mode;
 
-                if (RFS_CONVERT_UNDERSCORE_AND_P20_INTO_SPACE)
-                {
-                    Scan_Convert_Underscore_Into_Space(mask_item->string);
-                    Scan_Convert_P20_Into_Space(mask_item->string);
-                }
-                if (RFS_CONVERT_SPACE_INTO_UNDERSCORE)
-                {
-                    Scan_Convert_Space_Into_Underscore (mask_item->string);
-                }
-                if (RFS_REMOVE_SPACES)
+                ET_File_Name_Convert_Character (mask_item->string);
+                convert_mode = g_settings_get_enum (MainSettings,
+                                                    "rename-convert-spaces");
+
+                switch (convert_mode)
                 {
-                    Scan_Remove_Spaces(mask_item->string);
+                    case ET_CONVERT_SPACES_SPACES:
+                        Scan_Convert_Underscore_Into_Space (mask_item->string);
+                        Scan_Convert_P20_Into_Space (mask_item->string);
+                        break;
+                    case ET_CONVERT_SPACES_UNDERSCORES:
+                        Scan_Convert_Space_Into_Underscore (mask_item->string);
+                        break;
+                    case ET_CONVERT_SPACES_REMOVE:
+                        Scan_Remove_Spaces (mask_item->string);
+                        break;
+                    default:
+                        g_assert_not_reached ();
                 }
             }
         }else
diff --git a/src/setting.c b/src/setting.c
index 1bffd89..9fa9a67 100644
--- a/src/setting.c
+++ b/src/setting.c
@@ -122,12 +122,6 @@ static const tConfigVariable Config_Variables[] =
 
     {"audio_file_player",                       CV_TYPE_STRING,&AUDIO_FILE_PLAYER                        },
 
-    {"fts_convert_underscore_and_p20_into_space",CV_TYPE_BOOL,&FTS_CONVERT_UNDERSCORE_AND_P20_INTO_SPACE },
-    {"fts_convert_space_into_underscore",        CV_TYPE_BOOL,&FTS_CONVERT_SPACE_INTO_UNDERSCORE         },
-    {"rfs_convert_underscore_and_p20_into_space",CV_TYPE_BOOL,&RFS_CONVERT_UNDERSCORE_AND_P20_INTO_SPACE },
-    {"rfs_convert_space_into_underscore",        CV_TYPE_BOOL,&RFS_CONVERT_SPACE_INTO_UNDERSCORE         },
-    {"rfs_remove_spaces",                        CV_TYPE_BOOL,&RFS_REMOVE_SPACES                         },
-
     {"pf_convert_into_space",                   CV_TYPE_BOOL,    &PF_CONVERT_INTO_SPACE                  },
     {"pf_convert_space",                        CV_TYPE_BOOL,    &PF_CONVERT_SPACE                       },
 
@@ -234,13 +228,6 @@ void Init_Config_Variables (void)
     FILE_WRITING_ID3V1_CHARACTER_SET                = g_strdup("ISO-8859-1");
 
     /*
-     * Scanner
-     */
-    FTS_CONVERT_UNDERSCORE_AND_P20_INTO_SPACE = 1;
-    FTS_CONVERT_SPACE_INTO_UNDERSCORE         = 0;
-    RFS_CONVERT_UNDERSCORE_AND_P20_INTO_SPACE = 1;
-
-    /*
      * Scanner window
      */
     PF_CONVERT_INTO_SPACE              = 1;
@@ -361,15 +348,6 @@ Apply_Changes_Of_Preferences_Window (void)
         FILE_WRITING_ID3V1_CHARACTER_SET             = Charset_Get_Name_From_Title(temp);
         g_free(temp);
 
-        /* Scanner */
-        // Fill Tag Scanner
-        FTS_CONVERT_UNDERSCORE_AND_P20_INTO_SPACE = 
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(FTSConvertUnderscoreAndP20IntoSpace));
-        FTS_CONVERT_SPACE_INTO_UNDERSCORE         = 
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(FTSConvertSpaceIntoUnderscore));
-        // Rename File Scanner
-        RFS_CONVERT_UNDERSCORE_AND_P20_INTO_SPACE = 
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(RFSConvertUnderscoreAndP20IntoSpace));
-        RFS_CONVERT_SPACE_INTO_UNDERSCORE         = 
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(RFSConvertSpaceIntoUnderscore));
-                               RFS_REMOVE_SPACES                         = 
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(RFSRemoveSpaces));
-
         /* CDDB */
         if (CDDB_LOCAL_PATH) g_free(CDDB_LOCAL_PATH);
         CDDB_LOCAL_PATH = g_strdup(gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(CddbLocalPath)))));
diff --git a/src/setting.h b/src/setting.h
index 24fe5a2..e9a7082 100644
--- a/src/setting.h
+++ b/src/setting.h
@@ -43,6 +43,15 @@ struct _tConfigVariable
     void *pointer;              /* Pointer to our variable */
 };
 
+/* Method for processing spaces when updating tags. */
+typedef enum
+{
+    ET_CONVERT_SPACES_SPACES,
+    ET_CONVERT_SPACES_UNDERSCORES,
+    ET_CONVERT_SPACES_REMOVE,
+    ET_CONVERT_SPACES_NO_CHANGE
+} EtConvertSpaces;
+
 typedef enum
 {
     ET_FILENAME_EXTENSION_LOWER_CASE,
@@ -168,13 +177,6 @@ gchar  *FILE_WRITING_ID3V2_NO_UNICODE_CHARACTER_SET;
 
 gchar  *FILE_WRITING_ID3V1_CHARACTER_SET;
 
-/* Scanner */
-gint    FTS_CONVERT_UNDERSCORE_AND_P20_INTO_SPACE;
-gint    FTS_CONVERT_SPACE_INTO_UNDERSCORE;
-gint    RFS_CONVERT_UNDERSCORE_AND_P20_INTO_SPACE;
-gint    RFS_CONVERT_SPACE_INTO_UNDERSCORE;
-gint    RFS_REMOVE_SPACES;
-
 /* Scanner window */
 gint    PF_CONVERT_INTO_SPACE;
 gint    PF_CONVERT_SPACE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]