[easytag/wip/unstable] Consistently use "filename" instead of "file name"



commit 180a4713d3942373b68b76c70d6a4c1dc7ad3195
Author: David King <amigadave amigadave com>
Date:   Tue Apr 9 21:24:35 2013 +0100

    Consistently use "filename" instead of "file name"
    
    For UI strings especially, the single word "filename" is favoured by the
    GNOME HIG and documentation style guide.

 README                  |    2 +-
 help/C/rename-file.page |    4 ++--
 help/C/tag-image.page   |    2 +-
 src/browser.c           |   21 +++++++++++++--------
 src/cddb.c              |    6 +++---
 src/easytag.c           |    4 ++--
 src/et_core.c           |   19 ++++++++++---------
 src/et_core.h           |    2 +-
 src/misc.c              |    8 ++++----
 src/prefs.c             |   12 +++++++-----
 src/scan.c              |   14 ++++++++------
 src/win32/win_easytag.c |    2 +-
 12 files changed, 53 insertions(+), 43 deletions(-)
---
diff --git a/README b/README
index 31c553b..356bfaa 100644
--- a/README
+++ b/README
@@ -34,7 +34,7 @@ Currently EasyTAG supports the following:
 * read file header information (bitrate, time, …) and display them
 * auto completion of the date if a partial is entered
 * undo and redo last changes
-* ability to process fields of tag and file name (convert letters into
+* ability to process fields of tag and filename (convert letters into
   upper case, lower case, …)
 * ability to open a directory or a file with an external program
 * remote and local CDDB support for manual or automatic search
diff --git a/help/C/rename-file.page b/help/C/rename-file.page
index 7cd9a6e..0f3a9e9 100644
--- a/help/C/rename-file.page
+++ b/help/C/rename-file.page
@@ -36,7 +36,7 @@
       <p>Using the <gui>Legend</gui>, type in the structure<!--find better
       word--> that you would like to use for the file naming. For example, if
       you wish your files to be named
-      <file>[artist] - [title].[extention]</file>, enter <gui>%a - %t</gui> into
+      <file>[artist] - [title].[extension]</file>, enter <gui>%a - %t</gui> into
       the renaming field.</p>
     </item>
     <item>
@@ -45,7 +45,7 @@
       <gui style="menuitem">Scan Files…</gui></guiseq>.</p>
     </item>
     <item>
-      <p>Close the <gui style="dialog">Tag and File Name scan</gui> dialog.</p>
+      <p>Close the <gui style="dialog">Tag and Filename scan</gui> dialog.</p>
     </item>
     <item>
       <p>To save the applied changes, select
diff --git a/help/C/tag-image.page b/help/C/tag-image.page
index bda3e09..d852fbf 100644
--- a/help/C/tag-image.page
+++ b/help/C/tag-image.page
@@ -52,7 +52,7 @@
 
   <p>If the file if already tagged with an image, you can export the image by
   selecting it and pressing <gui style="button">Save the selected images to
-  files</gui> button. The default file name will be the image description.</p>
+  files</gui> button. The default filename will be the image description.</p>
 
   <note>
     <p>Not all files support the image field. <sys>mp4</sys> files are one
diff --git a/src/browser.c b/src/browser.c
index 94bd4c5..17331a0 100644
--- a/src/browser.c
+++ b/src/browser.c
@@ -3027,13 +3027,18 @@ GtkWidget *Create_Browser_Items (GtkWidget *parent)
     GtkCellRenderer *renderer;
     GtkTreeViewColumn *column;
     GtkWidget *PopupMenu;
-    gchar *BrowserTree_Titles[] = {N_("Tree")};
-    gchar *BrowserList_Titles[] = {N_("File Name"),N_("Title"),N_("Artist"),N_("Album Artist"),N_("Album"),
-                                   N_("Year"),N_("Disc"),N_("Track"),N_("Genre"),N_("Comment"),
-                                   N_("Composer"),N_("Original Artist"),N_("Copyright"),
-                                   N_("URL"),N_("Encoded By")};
-    gchar *ArtistList_Titles[]  = {N_("Artist"),N_("# Albums"),N_("# Files")};
-    gchar *AlbumList_Titles[]   = {N_("Album"),N_("# Files")};
+    const gchar *BrowserTree_Titles[] = { N_("Tree") };
+    const gchar *BrowserList_Titles[] = { N_("Filename"), N_("Title"),
+                                          N_("Artist"), N_("Album Artist"),
+                                          N_("Album"), N_("Year"), N_("Disc"),
+                                          N_("Track"), N_("Genre"),
+                                          N_("Comment"), N_("Composer"),
+                                          N_("Original Artist"),
+                                          N_("Copyright"), N_("URL"),
+                                          N_("Encoded By") };
+    const gchar *ArtistList_Titles[] = { N_("Artist"), N_("# Albums"),
+                                         N_("# Files") };
+    const gchar *AlbumList_Titles[] = { N_("Album"), N_("# Files") };
 
     VerticalBox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
     gtk_container_set_border_width(GTK_CONTAINER(VerticalBox),2);
@@ -3330,7 +3335,7 @@ GtkWidget *Create_Browser_Items (GtkWidget *parent)
 
     /* The file list */
     fileListModel = gtk_list_store_new (LIST_COLUMN_COUNT,
-                                        G_TYPE_STRING, /* File name. */
+                                        G_TYPE_STRING, /* Filename. */
                                         G_TYPE_STRING, /* Title tag. */
                                         G_TYPE_STRING, /* Artist tag. */
                                         G_TYPE_STRING, /* Album artist tag. */
diff --git a/src/cddb.c b/src/cddb.c
index b3cff35..0b11259 100644
--- a/src/cddb.c
+++ b/src/cddb.c
@@ -728,7 +728,7 @@ void Open_Cddb_Window (void)
 
     CddbSetToAllFields  = gtk_check_button_new_with_label(_("All"));
     Separator           = gtk_separator_new(GTK_ORIENTATION_VERTICAL);
-    CddbSetToFileName   = gtk_check_button_new_with_label(_("File Name"));
+    CddbSetToFileName   = gtk_check_button_new_with_label(_("Filename"));
     CddbSetToTitle      = gtk_check_button_new_with_label(_("Title"));
     CddbSetToArtist     = gtk_check_button_new_with_label(_("Artist"));
     CddbSetToAlbum      = gtk_check_button_new_with_label(_("Album"));
@@ -786,7 +786,7 @@ void Open_Cddb_Window (void)
     //gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(CddbUseDLM2),CDDB_USE_DLM);
     gtk_widget_set_tooltip_text(CddbUseDLM2,_("When activating this option, the "
         "Levenshtein algorithm (DLM: Damerau-Levenshtein Metric) will be used "
-        "to match the CDDB title against every file name in the current folder, "
+        "to match the CDDB title against every filename in the current folder, "
         "and to select the best match. This will be used when selecting the "
         "corresponding audio file, or applying CDDB results, instead of using "
         "directly the position order."));
@@ -2984,7 +2984,7 @@ Cddb_Search_Album_From_Selected_Files (void)
                 // Parameters of the server used (Local acces => specific!)
                 cddbalbum->server_name     = NULL;                // No server name
                 cddbalbum->server_port     = 0;                   // No server port
-                cddbalbum->server_cgi_path = g_strdup(file_path); // File name
+                cddbalbum->server_cgi_path = g_strdup(file_path); /* Filename. */
                 cddbalbum->bitmap          = Cddb_Get_Pixbuf_From_Server_Name(file_path);
 
                 // Get album category
diff --git a/src/easytag.c b/src/easytag.c
index 463be7f..a17ca6c 100644
--- a/src/easytag.c
+++ b/src/easytag.c
@@ -517,7 +517,7 @@ Create_File_Area (void)
     FileIndex = gtk_label_new("0/0:");
     gtk_box_pack_start(GTK_BOX(HBox),FileIndex,FALSE,FALSE,0);
 
-    /* File name */
+    /* Filename. */
     FileEntry = gtk_entry_new();
     gtk_editable_set_editable(GTK_EDITABLE(FileEntry), TRUE);
     gtk_box_pack_start(GTK_BOX(HBox),FileEntry,TRUE,TRUE,2);
@@ -3089,7 +3089,7 @@ Rename_File (ET_File *ETFile, gboolean hide_msgbox)
         return FALSE;
     }
 
-    /* Check if the new file name already exists. Must be done after changing
+    /* Check if the new filename already exists. Must be done after changing
      * filename to the temporary name, else we can't detect the problem under
      * Linux when renaming a file 'aa.mp3' to 'AA.mp3' and if the last one
      * already exists */
diff --git a/src/et_core.c b/src/et_core.c
index 0333a24..7bd847c 100644
--- a/src/et_core.c
+++ b/src/et_core.c
@@ -1070,7 +1070,7 @@ void ET_Sort_Displayed_File_List_And_Update_UI (ET_Sorting_Type Sorting_Type)
 
 
 /*
- * Comparison function for sorting by ascending file name.
+ * Comparison function for sorting by ascending filename.
  */
 gint ET_Comp_Func_Sort_File_By_Ascending_Filename (ET_File *ETFile1, ET_File *ETFile2)
 {
@@ -1082,7 +1082,7 @@ gint ET_Comp_Func_Sort_File_By_Ascending_Filename (ET_File *ETFile1, ET_File *ET
 }
 
 /*
- * Comparison function for sorting by descending file name.
+ * Comparison function for sorting by descending filename.
  */
 gint ET_Comp_Func_Sort_File_By_Descending_Filename (ET_File *ETFile1, ET_File *ETFile2)
 {
@@ -3255,9 +3255,9 @@ ET_Save_File_Name_From_UI (ET_File *ETFile, File_Name *FileName)
     // Convert the illegal characters
     ET_File_Name_Convert_Character(filename_new); // FIX ME : should be in UTF8?
 
-    // Set the new file name (in file system encoding)
+    /* Set the new filename (in file system encoding). */
     FileName->value = g_strconcat(dirname,G_DIR_SEPARATOR_S,filename_new,NULL);
-    // Set the new file name (in UTF-8 encoding)
+    /* Set the new filename (in UTF-8 encoding). */
     FileName->value_utf8 = filename_to_display(FileName->value);
     // Calculates collate key
     FileName->value_ck = g_utf8_collate_key_for_filename(FileName->value_utf8, -1);
@@ -3312,9 +3312,9 @@ ET_Save_File_Name_Internal (ET_File *ETFile, File_Name *FileName)
         // Convert the illegal characters
         ET_File_Name_Convert_Character(filename_new);
 
-        // Set the new file name (in file system encoding)
+        /* Set the new filename (in file system encoding). */
         FileName->value = g_strconcat(dirname,G_DIR_SEPARATOR_S,filename_new,NULL);
-        // Set the new file name (in UTF-8 encoding)
+        /* Set the new filename (in UTF-8 encoding). */
         FileName->value_utf8 = filename_to_display(FileName->value);
         // Calculate collate key
         FileName->value_ck = g_utf8_collate_key_for_filename(FileName->value_utf8, -1);
@@ -3928,10 +3928,10 @@ void ET_Update_Directory_Name_Into_File_List (gchar* last_path, gchar *new_path)
                                                    (new_path[strlen(new_path)-1]==G_DIR_SEPARATOR) ? "" : 
G_DIR_SEPARATOR_S,
                                                    &filename[strlen(last_path_tmp)],NULL);
 
-                        // Replace the file name (in file system encoding)
+                        /* Replace the filename (in file system encoding). */
                         g_free(FileName->value);
                         FileName->value = filename_tmp;
-                        // Replace the file name (in file system encoding)
+                        /* Replace the filename (in file system encoding). */
                         g_free(FileName->value_utf8);
                         FileName->value_utf8 = filename_to_display(FileName->value);
                         // Recalculate the collate key
@@ -4585,7 +4585,8 @@ ET_Read_File_Info (const gchar *filename, ET_File_Info *ETFileInfo)
 
 
 /*
- * This function generates a new file name using path of the old file and the new name
+ * This function generates a new filename using path of the old file and the
+ * new name.
  * - ETFile -> old_file_name : "/path_to_file/old_name.ext"
  * - new_file_name_utf8      : "new_name.ext"
  * Returns "/path_to_file/new_name.ext" into allocated data (in UTF-8)!
diff --git a/src/et_core.h b/src/et_core.h
index 5ab3d27..9679870 100644
--- a/src/et_core.h
+++ b/src/et_core.h
@@ -281,7 +281,7 @@ struct _ET_File
 
     GList *FileNameCur;       /* Points to item of FileNameList that represents the current value of 
filename state (i.e. file on hard disk) */
     GList *FileNameNew;       /* Points to item of FileNameList that represents the new value of filename 
state */
-    GList *FileNameList;      /* Contains the history of changes about the file name */
+    GList *FileNameList; /* Contains the history of changes about the filename. */
     GList *FileNameListBak;   /* Contains items of FileNameList removed by 'undo' procedure but have data 
currently saved (for example, when you save your last changes, make some 'undo', then make new changes) */
     
     GList *FileTag;           /* Points to the current item used of FileTagList */
diff --git a/src/misc.c b/src/misc.c
index 0a3f33f..db056b1 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -1562,7 +1562,7 @@ Playlist_Write_Button_Pressed (void)
     // Path of the playlist file (may be truncated later if PLAYLIST_CREATE_IN_PARENT_DIR is TRUE)
     playlist_path_utf8 = filename_to_display(Browser_Get_Current_Path());
 
-    // Build the playlist file name
+    /* Build the playlist filename. */
     if (PLAYLIST_USE_MASK_NAME)
     {
 
@@ -1612,7 +1612,7 @@ Playlist_Write_Button_Pressed (void)
 
     }
 
-    // Must be placed after "Build the playlist file name", as we can truncate the path!
+    // Must be placed after "Build the playlist filename", as we can truncate the path!
     if (PLAYLIST_CREATE_IN_PARENT_DIR)
     {
         if ( (strcmp(playlist_path_utf8,G_DIR_SEPARATOR_S) != 0) )
@@ -1926,7 +1926,7 @@ void Open_Search_File_Window (void)
     GtkWidget *ScrollWindow;
     GtkTreeViewColumn* column;
     GtkCellRenderer* renderer;
-    gchar *SearchResultList_Titles[] = { N_("File Name"),
+    gchar *SearchResultList_Titles[] = { N_("Filename"),
                                          N_("Title"),
                                          N_("Artist"),
                                          N_("Album Artist"),
@@ -3325,7 +3325,7 @@ Load_Filename_Select_Row_In_Other_List (GtkWidget* treeview_target, gpointer ori
 }
 
 /*
- * Set the new file name of each file.
+ * Set the new filename of each file.
  * Associate lines from LoadFileContentList with LoadFileNameList
  */
 static void
diff --git a/src/prefs.c b/src/prefs.c
index 48ee531..d3b4ef2 100644
--- a/src/prefs.c
+++ b/src/prefs.c
@@ -290,8 +290,10 @@ void Open_OptionsWindow (void)
     gtk_combo_box_set_wrap_width(GTK_COMBO_BOX(SortingFileCombo),2); // Two columns
 
     // Items of option menu
-    gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Ascending file name"));
-    gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Descending file name"));
+    gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
+                                    _("Ascending filename"));
+    gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (SortingFileCombo),
+                                    _("Descending filename"));
     gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Ascending title"));
     gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Descending title"));
     gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(SortingFileCombo), _("Ascending artist"));
@@ -498,8 +500,8 @@ void Open_OptionsWindow (void)
         "file information by detecting changes of the parent directory."));
 
 
-    /* Character Set for File Name */
-    Frame = gtk_frame_new (_("Character Set for File Name"));
+    /* Character Set for Filename */
+    Frame = gtk_frame_new (_("Character Set for Filename"));
     gtk_box_pack_start(GTK_BOX(VBox),Frame,FALSE,FALSE,0);
     vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
     gtk_container_add(GTK_CONTAINER(Frame),vbox);
@@ -1393,7 +1395,7 @@ void Open_OptionsWindow (void)
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(CddbUseDLM),CDDB_USE_DLM);
     gtk_widget_set_tooltip_text(CddbUseDLM,_("When activating this option, the "
         "Levenshtein algorithm (DLM: Damerau-Levenshtein Metric) will be used "
-        "to match the CDDB title against every file name in the current folder, "
+        "to match the CDDB title against every filename in the current folder, "
         "and to select the best match. This will be used when selecting the "
         "corresponding audio file, or applying CDDB results, instead of using "
         "directly the position order."));
diff --git a/src/scan.c b/src/scan.c
index d2dddae..e77b186 100644
--- a/src/scan.c
+++ b/src/scan.c
@@ -707,10 +707,11 @@ Scan_Rename_File_With_Mask (ET_File *ETFile)
     ET_Manage_Changes_Of_File_Data(ETFile,FileName,NULL);
     g_free(filename_new_utf8);
 
-    Statusbar_Message(_("New file name successfully scanned…"),TRUE);
+    Statusbar_Message (_("New filename successfully scanned"),TRUE);
 
     filename_new_utf8 = g_path_get_basename(((File_Name *)ETFile->FileNameNew->data)->value_utf8);
-    Log_Print(LOG_OK,_("New file name successfully scanned…(%s)"),filename_new_utf8);
+    Log_Print (LOG_OK, _("New filename successfully scanned: %s"),
+               filename_new_utf8);
     g_free(filename_new_utf8);
 
     return;
@@ -1115,7 +1116,7 @@ Scan_Process_Fields (ET_File *ETFile)
     /* Process the filename */
     if (st_filename != NULL)
     {
-        if (st_filename->value_utf8 && 
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(ProcessFileNameField))) // File name field
+        if (st_filename->value_utf8 && gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(ProcessFileNameField)))
         {
             gchar *string_utf8;
             gchar *pos;
@@ -2462,8 +2463,8 @@ void Open_ScannerWindow (gint scanner_type)
 
     gtk_box_pack_start(GTK_BOX(HBox2),ScanTagMaskCombo,TRUE,TRUE,2);
     gtk_widget_set_tooltip_text(GTK_WIDGET(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(ScanTagMaskCombo)))),
-        _("Select or type in a mask using codes (see Legend) to parse file name and "
-        "path. Used to fill in tag fields."));
+        _("Select or type in a mask using codes (see Legend) to parse "
+        "filename and path. Used to fill in tag fields"));
     // Signal to generate preview (preview of the new tag values)
     g_signal_connect_swapped(G_OBJECT(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(ScanTagMaskCombo)))),"changed",
         G_CALLBACK(Scan_Fill_Tag_Generate_Preview),NULL);
@@ -2585,7 +2586,8 @@ void Open_ScannerWindow (gint scanner_type)
                                    "those which interest you"));
     // Advice for Translators: set the first letter of filename translated
     ProcessFileNameField = gtk_toggle_button_new_with_label(   _("F"));
-    gtk_widget_set_tooltip_text(ProcessFileNameField,          _("Process file name field"));
+    gtk_widget_set_tooltip_text (ProcessFileNameField,
+                                 _("Process filename field"));
     // Advice for Translators: set the first letter of title translated
     ProcessTitleField = gtk_toggle_button_new_with_label(      _("T"));
     gtk_widget_set_tooltip_text(ProcessTitleField,             _("Process title field"));
diff --git a/src/win32/win_easytag.c b/src/win32/win_easytag.c
index 21357b8..3e9007a 100644
--- a/src/win32/win_easytag.c
+++ b/src/win32/win_easytag.c
@@ -524,7 +524,7 @@ WinMain (struct HINSTANCE__ *hInstance, struct HINSTANCE__ *hPrevInstance,
                if (prev) {
                        prev[0] = '\0';
 
-                       /* prev++ will now point to the executable file name */
+                       /* prev++ will now point to the executable filename. */
                        strcpy(exe_name, prev + 1);
 
                        strcat(easytag_dir, "\\exchndl.dll");


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