[easytag/wip/easytag-next] Add static to more variable declarations



commit 7f6ef0dd59b2651e8c9211f725580e7c947813da
Author: David King <amigadave amigadave com>
Date:   Sat Jan 12 23:02:39 2013 +0000

    Add static to more variable declarations
    
    Remove some unused variables, caught by making them static.

 src/ape_tag.c     |   12 -----
 src/bar.c         |    6 +-
 src/browser.c     |   80 ++++++++++++++--------------------
 src/browser.h     |    4 +-
 src/cddb.c        |   58 ++++++++++++------------
 src/charset.c     |    2 +-
 src/charset.h     |    4 --
 src/easytag.c     |   21 +++------
 src/et_core.c     |   20 --------
 src/flac_tag.c    |    1 -
 src/id3_tag.c     |   20 +++++---
 src/log.c         |   10 +++--
 src/misc.c        |   42 +++++++++---------
 src/misc.h        |    4 --
 src/mpeg_header.c |    2 +-
 src/ogg_header.c  |   10 ----
 src/picture.c     |   25 -----------
 src/scan.c        |  125 ++++++++++++++++++++++++----------------------------
 18 files changed, 172 insertions(+), 274 deletions(-)
---
diff --git a/src/ape_tag.c b/src/ape_tag.c
index ae49442..bfcc023 100644
--- a/src/ape_tag.c
+++ b/src/ape_tag.c
@@ -38,18 +38,6 @@
 #include "charset.h"
 #include "libapetag/apetaglib.h"
 
-/***************
- * Declaration *
- ***************/
-
-
-
-/**************
- * Prototypes *
- **************/
-gboolean Ape_Tag_Write_File (FILE *file_in, gchar *filename_in);
-
-
 /*************
  * Functions *
  *************/
diff --git a/src/bar.c b/src/bar.c
index 715beb1..a0291e7 100644
--- a/src/bar.c
+++ b/src/bar.c
@@ -39,9 +39,9 @@
 /***************
  * Declaration *
  ***************/
-GtkWidget   *StatusBar = NULL;
+static GtkWidget *StatusBar = NULL;
 static guint StatusbarTimerId = 0;
-GList *ActionPairsList = NULL;
+static GList *ActionPairsList = NULL;
 
 /**************
  * Prototypes *
@@ -54,7 +54,7 @@ static void Statusbar_Remove_Timer (void);
 
 
 /*************
- * Functions *
+ * Functions o
  *************/
 
 /*
diff --git a/src/browser.c b/src/browser.c
index b20bf58..d91c11c 100644
--- a/src/browser.c
+++ b/src/browser.c
@@ -73,49 +73,43 @@
  * Declarations *
  ****************/
 
-// Pixmaps
+/* Pixmaps. */
 static GdkPixbuf *opened_folder_pixmap = NULL, *closed_folder_pixmap, *closed_folder_readonly_pixmap, *closed_folder_unreadable_pixmap;
 #ifdef G_OS_WIN32
-// Pixmap used for Win32 only
+/* Pixmap used for Win32 only */
 static GdkPixbuf *harddrive_pixmap, *removable_pixmap, *cdrom_pixmap, *network_pixmap, *ramdisk_pixmap;
 #endif /* G_OS_WIN32 */
 
-GtkWidget    *BrowserTree; // Tree of directories
-GtkTreeStore *directoryTreeModel;
-GtkWidget    *BrowserList;     // List of files
-GtkListStore *fileListModel;
-GtkWidget    *BrowserLabel;
-GtkWidget    *BrowserButton;
-GtkWidget    *BrowserParentButton;
-GtkWidget    *BrowserNoteBook;
-GtkWidget    *BrowserArtistList;
-GtkListStore *artistListModel;
-GtkWidget    *BrowserAlbumList;
-GtkListStore *albumListModel;
-gchar        *BrowserCurrentPath = NULL; // Path selected in the browser area (BrowserEntry or BrowserTree)
-
-GtkListStore *RunProgramModel;
-
-GtkWidget *RunProgramTreeWindow  = NULL;
-GtkWidget *RunProgramListWindow  = NULL;
-
-// The Rename Directory window
-GtkWidget    *RenameDirectoryWindow = NULL;
-GtkWidget    *RenameDirectoryCombo;
-GtkWidget    *RenameDirectoryWithMask;
-GtkWidget    *RenameDirectoryMaskCombo;
-GtkListStore *RenameDirectoryMaskModel = NULL;
-GtkWidget    *RenameDirectoryMaskStatusIconBox;
-GtkWidget    *RenameDirectoryPreviewLabel = NULL;
-
-guint blrs_idle_handler_id = 0;
-guint blru_idle_handler_id = 0;
-guint bl_row_selected;
-
-ET_File *LastBrowserListETFileSelected; // The last ETFile selected in the BrowserList
-
-
-gchar *Rename_Directory_Masks [] =
+static GtkWidget    *BrowserTree; /* Tree of directories. */
+static GtkTreeStore *directoryTreeModel;
+static GtkListStore *fileListModel;
+static GtkWidget    *BrowserLabel;
+static GtkWidget    *BrowserButton;
+static GtkWidget    *BrowserParentButton;
+static GtkWidget    *BrowserNoteBook;
+static GtkListStore *artistListModel;
+static GtkListStore *albumListModel;
+/* Path selected in the browser area (BrowserEntry or BrowserTree). */
+static gchar        *BrowserCurrentPath = NULL;
+
+static GtkListStore *RunProgramModel;
+
+static GtkWidget *RunProgramTreeWindow = NULL;
+static GtkWidget *RunProgramListWindow = NULL;
+
+/* The Rename Directory window. */
+GtkWidget *RenameDirectoryWindow = NULL;
+static GtkWidget *RenameDirectoryCombo;
+static GtkWidget *RenameDirectoryWithMask;
+static GtkListStore *RenameDirectoryMaskModel = NULL;
+static GtkWidget *RenameDirectoryMaskStatusIconBox;
+GtkWidget *RenameDirectoryPreviewLabel = NULL;
+
+/* The last ETFile selected in the BrowserList. */
+static ET_File *LastBrowserListETFileSelected;
+
+
+static gchar *Rename_Directory_Masks [] =
 {
     "%a - %b",
     "%a_-_%b",
@@ -156,9 +150,6 @@ static gint Browser_List_Sort_Func (GtkTreeModel *model, GtkTreeIter *a,
                                     GtkTreeIter *b, gpointer data);
 static void Browser_List_Select_File_By_Iter (GtkTreeIter *iter,
                                               gboolean select_it);
-void        Browser_List_Select_All_Files       (void);
-void        Browser_List_Unselect_All_Files     (void);
-void        Browser_List_Invert_File_Selection  (void);
 
 static void Browser_Entry_Activated (void);
 
@@ -175,11 +166,7 @@ static void Browser_Album_List_Row_Selected (GtkTreeSelection *selection,
                                              gpointer data);
 static void Browser_Album_List_Set_Row_Appearance (GtkTreeIter *row);
 
-gchar      *Browser_Get_Current_Path       (void);
 static void Browser_Update_Current_Path (const gchar *path);
-void        Browser_Load_Home_Directory    (void);
-void        Browser_Load_Default_Directory (void);
-void        Browser_Reload_Directory       (void);
 
 #ifdef G_OS_WIN32
 static gboolean Browser_Win32_Get_Drive_Root (gchar *drive,
@@ -201,7 +188,6 @@ static gboolean Browser_Popup_Menu_Handler (GtkMenu *menu,
                                             GdkEventButton *event);
 
 /* For window to rename a directory */
-void        Browser_Open_Rename_Directory_Window (void);
 static void Destroy_Rename_Directory_Window (void);
 static void Rename_Directory (void);
 static gboolean Rename_Directory_Window_Key_Press (GtkWidget *window,
@@ -209,14 +195,12 @@ static gboolean Rename_Directory_Window_Key_Press (GtkWidget *window,
 static void Rename_Directory_With_Mask_Toggled (void);
 
 /* For window to run a program with the directory */
-void        Browser_Open_Run_Program_Tree_Window (void);
 static void Destroy_Run_Program_Tree_Window (void);
 static gboolean Run_Program_Tree_Window_Key_Press (GtkWidget *window,
                                                    GdkEvent *event);
 static void Run_Program_With_Directory (GtkWidget *combobox);
 
 /* For window to run a program with the file */
-void        Browser_Open_Run_Program_List_Window (void);
 static void Destroy_Run_Program_List_Window (void);
 static gboolean Run_Program_List_Window_Key_Press (GtkWidget *window,
                                                    GdkEvent *event);
diff --git a/src/browser.h b/src/browser.h
index 3b33f47..4f0ba30 100644
--- a/src/browser.h
+++ b/src/browser.h
@@ -124,10 +124,9 @@ enum
 };
 
 
-GtkWidget *BrowserTree;
 GtkWidget *BrowserList;
-GtkWidget *BrowserArtistList;
 GtkWidget *BrowserAlbumList;
+GtkWidget *BrowserArtistList;
 GtkWidget *BrowserEntryCombo;
 GtkListStore *BrowserEntryModel;
 GtkWidget *BrowserHPaned;
@@ -138,7 +137,6 @@ GtkWidget *RenameDirectoryMaskCombo;
 GtkWidget *RenameDirectoryPreviewLabel;
 
 
-
 /**************
  * Prototypes *
  **************/
diff --git a/src/cddb.c b/src/cddb.c
index 7818820..8988a7f 100644
--- a/src/cddb.c
+++ b/src/cddb.c
@@ -108,35 +108,35 @@ static const gchar CDDB_RESULT_FILE[] = "cddb_result_file.tmp";
 /****************
  * Declarations *
  ****************/
-GtkWidget *CddbNoteBook;
-GList     *CddbAlbumList = NULL;
-
-GtkWidget    *CddbSearchStringCombo = NULL;
-GtkListStore *CddbSearchStringModel = NULL;
-
-GtkWidget    *CddbSearchStringInResultCombo;
-GtkListStore *CddbSearchStringInResultModel = NULL;
-
-GtkWidget    *CddbAlbumListView = NULL;
-GtkListStore *CddbAlbumListModel = NULL;
-GtkWidget    *CddbTrackListView = NULL;
-GtkListStore *CddbTrackListModel = NULL;
-GtkWidget *CddbApplyButton = NULL;
-GtkWidget *CddbSearchButton = NULL;
-GtkWidget *CddbSearchAutoButton = NULL;
-GtkWidget *CddbStatusBar;
-guint      CddbStatusBarContext;
-
-GtkWidget *CddbStopSearchButton;
-GtkWidget *CddbStopSearchAutoButton;
-GtkWidget *CddbSearchStringInResultNextButton;
-GtkWidget *CddbSearchStringInResultPrevButton;
-GtkWidget *CddbDisplayRedLinesButton;
-GtkWidget *CddbSelectAllInResultButton;
-GtkWidget *CddbUnselectAllInResultButton;
-GtkWidget *CddbInvertSelectionInResultButton;
-
-gboolean   CddbStopSearch = FALSE;
+static GtkWidget *CddbNoteBook;
+static GList *CddbAlbumList = NULL;
+
+static GtkWidget *CddbSearchStringCombo = NULL;
+static GtkListStore *CddbSearchStringModel = NULL;
+
+static GtkWidget *CddbSearchStringInResultCombo;
+static GtkListStore *CddbSearchStringInResultModel = NULL;
+
+static GtkWidget *CddbAlbumListView = NULL;
+static GtkListStore *CddbAlbumListModel = NULL;
+static GtkWidget *CddbTrackListView = NULL;
+static GtkListStore *CddbTrackListModel = NULL;
+static GtkWidget *CddbApplyButton = NULL;
+static GtkWidget *CddbSearchButton = NULL;
+static GtkWidget *CddbSearchAutoButton = NULL;
+static GtkWidget *CddbStatusBar;
+static guint CddbStatusBarContext;
+
+static GtkWidget *CddbStopSearchButton;
+static GtkWidget *CddbStopSearchAutoButton;
+static GtkWidget *CddbSearchStringInResultNextButton;
+static GtkWidget *CddbSearchStringInResultPrevButton;
+static GtkWidget *CddbDisplayRedLinesButton;
+static GtkWidget *CddbSelectAllInResultButton;
+static GtkWidget *CddbUnselectAllInResultButton;
+static GtkWidget *CddbInvertSelectionInResultButton;
+
+static gboolean CddbStopSearch = FALSE;
 
 
 /**************
diff --git a/src/charset.c b/src/charset.c
index 4ca79f0..ea598bd 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -45,7 +45,7 @@
  ****************/
 
 #define CHARSET_TRANS_ARRAY_LEN ( sizeof(charset_trans_array) / sizeof((charset_trans_array)[0]) )
-const CharsetInfo charset_trans_array[] = {
+static const CharsetInfo charset_trans_array[] = {
     {N_("Arabic (IBM-864)"),                  "IBM864"        },
     {N_("Arabic (ISO-8859-6)"),               "ISO-8859-6"    },
     {N_("Arabic (Windows-1256)"),             "windows-1256"  },
diff --git a/src/charset.h b/src/charset.h
index f756344..88d3659 100644
--- a/src/charset.h
+++ b/src/charset.h
@@ -34,10 +34,6 @@ typedef struct
     gchar *charset_name;
 } CharsetInfo;
 
-/* translated charset titles */
-extern const CharsetInfo charset_trans_array[];
-
-
 
 /**************
  * Prototypes *
diff --git a/src/easytag.c b/src/easytag.c
index 865248f..48eccd3 100644
--- a/src/easytag.c
+++ b/src/easytag.c
@@ -66,23 +66,22 @@
 /****************
  * Declarations *
  ****************/
-guint idle_handler_id;
-guint progressbar_index;  /* An integer to set the value of progress bar into the recurse fonction */
+static guint idle_handler_id;
 
-GtkWidget *QuitRecursionWindow = NULL;
+static GtkWidget *QuitRecursionWindow = NULL;
 
 /* Used to force to hide the msgbox when saving tag */
-gboolean SF_HideMsgbox_Write_Tag;
+static gboolean SF_HideMsgbox_Write_Tag;
 /* To remember which button was pressed when saving tag */
-gint     SF_ButtonPressed_Write_Tag;
+static gint SF_ButtonPressed_Write_Tag;
 /* Used to force to hide the msgbox when renaming file */
-gboolean SF_HideMsgbox_Rename_File;
+static gboolean SF_HideMsgbox_Rename_File;
 /* To remember which button was pressed when renaming file */
-gint     SF_ButtonPressed_Rename_File;
+static gint SF_ButtonPressed_Rename_File;
 /* Used to force to hide the msgbox when deleting file */
-gboolean SF_HideMsgbox_Delete_File;
+static gboolean SF_HideMsgbox_Delete_File;
 /* To remember which button was pressed when deleting file */
-gint     SF_ButtonPressed_Delete_File;
+static gint SF_ButtonPressed_Delete_File;
 
 #ifdef ENABLE_FLAC
     #include <FLAC/metadata.h>
@@ -111,9 +110,6 @@ static GtkWidget *Create_Tag_Area     (void);
 static void Menu_Mini_Button_Clicked (GtkEntry *entry);
 static void Mini_Button_Clicked (GObject *object);
 static void Disable_Command_Buttons (void);
-void Clear_Tag_Entry_Fields  (void);
-void Clear_File_Entry_Field  (void);
-void Clear_Header_Fields     (void);
 
 static gboolean Make_Dir (const gchar *dirname_old, const gchar *dirname_new);
 static gboolean Remove_Dir (const gchar *dirname_old,
@@ -123,7 +119,6 @@ static gboolean Rename_File (ET_File *ETFile, gboolean hide_msgbox);
 static gint Save_File (ET_File *ETFile, gboolean multiple_files,
                        gboolean force_saving_files);
 static gint Delete_File (ET_File *ETFile, gboolean multiple_files);
-gint Save_All_Files_With_Answer        (gboolean force_saving_files);
 static gint Save_Selected_Files_With_Answer (gboolean force_saving_files);
 static gint Save_List_Of_Files (GList *etfilelist,
                                 gboolean force_saving_files);
diff --git a/src/et_core.c b/src/et_core.c
index 99ce6a7..125e6ac 100644
--- a/src/et_core.c
+++ b/src/et_core.c
@@ -92,22 +92,15 @@ GdkColor BLACK      = {0, 0x0000, 0x0000, 0x0000};
  * Prototypes *
  **************/
 
-void ET_Core_Create     (void);
-void ET_Core_Initialize (void);
-void ET_Core_Free       (void);
-void ET_Core_Destroy    (void);
-
 //gboolean ET_File_Is_Supported (gchar *filename);
 static gchar *ET_Get_File_Extension (const gchar *filename);
 static ET_File_Description *ET_Get_File_Description (const gchar *filename);
 static ET_File_Description *ET_Get_File_Description_From_Extension (const gchar *extension);
 
 static gboolean ET_Free_File_List                 (void);
-gboolean ET_Free_File_List_Item            (ET_File *ETFile);
 static gboolean ET_Free_File_Name_List            (GList *FileNameList);
 static gboolean ET_Free_File_Tag_List (GList *FileTagList);
 static gboolean ET_Free_File_Name_Item            (File_Name *FileName);
-gboolean ET_Free_File_Tag_Item             (File_Tag *FileTag);
 static gboolean ET_Free_File_Tag_Item_Other_Field (File_Tag *FileTag);
 static gboolean ET_Free_File_Info_Item (ET_File_Info *ETFileInfo);
 static gboolean ET_Free_History_File_List (void);
@@ -126,9 +119,6 @@ static gboolean ET_Copy_File_Tag_Item_Other_Field (ET_File *ETFile, File_Tag *Fi
 static guint ET_File_Key_New (void);
 static guint ET_Undo_Key_New (void);
 
-GList   *ET_File_List_Remove (GList *item_to_remove);
-
-gboolean ET_Remove_File_From_File_List         (ET_File *ETFile);
 static gboolean ET_Remove_File_From_Artist_Album_List (ET_File *ETFile);
 
 static void ET_Display_File_And_List_Status_To_UI (ET_File *ETFile);
@@ -143,28 +133,18 @@ static gboolean ET_Save_File_Tag_From_UI (File_Tag *FileTag);
 static gboolean ET_Save_File_Tag_Internal (ET_File *ETFile, File_Tag *FileTag);
 
 static void ET_Mark_File_Tag_As_Saved (ET_File *ETFile);
-void     ET_Mark_File_Name_As_Saved            (ET_File *ETFile);
 
-gboolean ET_Manage_Changes_Of_File_Data         (ET_File *ETFile, File_Name *FileName, File_Tag *FileTag);
 static gboolean ET_Detect_Changes_Of_File_Name (File_Name *FileName1,
                                                 File_Name *FileName2);
-gboolean ET_Detect_Changes_Of_File_Tag          (File_Tag  *FileTag1,  File_Tag  *FileTag2);
 static gboolean ET_Add_File_Name_To_List (ET_File *ETFile,
                                           File_Name *FileName);
 static gboolean ET_Add_File_Tag_To_List (ET_File *ETFile, File_Tag  *FileTag);
 static gboolean ET_Add_File_To_History_List (ET_File *ETFile);
 static gboolean ET_Add_File_To_Artist_Album_File_List (ET_File *ETFile);
 
-GList   *ET_Displayed_File_List_First           (void);
-GList   *ET_Displayed_File_List_Previous        (void);
-GList   *ET_Displayed_File_List_Next            (void);
-GList   *ET_Displayed_File_List_Last            (void);
-GList   *ET_Displayed_File_List_By_Etfile       (ET_File *ETFile);
 static guint ET_Displayed_File_List_Get_Length      (void);
 static void ET_Displayed_File_List_Number (void);
 
-gboolean ET_Set_Displayed_File_List (GList *ETFileList);
-
 static gboolean ET_Read_File_Info (const gchar *filename,
                                    ET_File_Info *ETFileInfo);
 
diff --git a/src/flac_tag.c b/src/flac_tag.c
index 76ffdbf..b181177 100644
--- a/src/flac_tag.c
+++ b/src/flac_tag.c
@@ -91,7 +91,6 @@
 /**************
  * Prototypes *
  **************/
-gboolean Flac_Tag_Write_File (FILE *file_in, gchar *filename_in, vcedit_state *state);
 
 static gboolean Flac_Write_Delimetered_Tag (FLAC__StreamMetadata *vc_block, const gchar *tag_name, gchar *values);
 static gboolean Flac_Write_Tag (FLAC__StreamMetadata *vc_block, const gchar *tag_name, gchar *value);
diff --git a/src/id3_tag.c b/src/id3_tag.c
index bacfe79..084d53e 100644
--- a/src/id3_tag.c
+++ b/src/id3_tag.c
@@ -59,19 +59,23 @@
 /**************
  * Prototypes *
  **************/
-gchar *Id3tag_Get_Error_Message (ID3_Err error);
-void   Id3tag_Prepare_ID3v1     (ID3Tag *id3_tag);
-gchar *Id3tag_Rules_For_ISO_Fields (const gchar *string, const gchar *from_codeset, const gchar *to_codeset);
-gchar *Id3tag_Get_Field         (const ID3Frame *id3_frame, ID3_FieldID id3_fieldid);
-ID3_TextEnc Id3tag_Set_Field    (const ID3Frame *id3_frame, ID3_FieldID id3_fieldid, gchar *string);
+static gchar *Id3tag_Get_Error_Message (ID3_Err error);
+static void Id3tag_Prepare_ID3v1 (ID3Tag *id3_tag);
+static gchar *Id3tag_Rules_For_ISO_Fields (const gchar *string,
+                                           const gchar *from_codeset,
+                                           const gchar *to_codeset);
+static gchar *Id3tag_Get_Field (const ID3Frame *id3_frame,
+                                ID3_FieldID id3_fieldid);
+static ID3_TextEnc Id3tag_Set_Field (const ID3Frame *id3_frame,
+                                     ID3_FieldID id3_fieldid, gchar *string);
 
 ID3_C_EXPORT size_t ID3Tag_Link_1         (ID3Tag *id3tag, const char *filename);
 ID3_C_EXPORT size_t ID3Field_GetASCII_1   (const ID3Field *field, char *buffer,      size_t maxChars, size_t itemNum);
 ID3_C_EXPORT size_t ID3Field_GetUNICODE_1 (const ID3Field *field, unicode_t *buffer, size_t maxChars, size_t itemNum);
 
-gboolean Id3tag_Check_If_File_Is_Corrupted (gchar *filename);
+static gboolean Id3tag_Check_If_File_Is_Corrupted (const gchar *filename);
 
-gboolean Id3tag_Check_If_Id3lib_Is_Bugged (void);
+static gboolean Id3tag_Check_If_Id3lib_Is_Bugged (void);
 
 
 
@@ -1188,7 +1192,7 @@ gchar *Id3tag_Rules_For_ISO_Fields (const gchar *string, const gchar *from_codes
  * Some files which contains only zeroes create an infinite loop in id3lib...
  * To generate a file with zeroes : dd if=/dev/zero bs=1M count=6 of=test-corrupted-mp3-zero-contend.mp3
  */
-gboolean Id3tag_Check_If_File_Is_Corrupted (gchar *filename)
+gboolean Id3tag_Check_If_File_Is_Corrupted (const gchar *filename)
 {
     FILE *file;
     unsigned char tmp[256];
diff --git a/src/log.c b/src/log.c
index 7faa826..9ae4bf3 100644
--- a/src/log.c
+++ b/src/log.c
@@ -44,10 +44,12 @@
  * Declarations *
  ****************/
 
-GtkWidget    *LogList          = NULL;
-GtkListStore *logListModel;
-GList        *LogPrintTmpList  = NULL; // Temporary list to store messages for the LogList when this control wasn't yet created
-gint          LogListNbrRows;
+static GtkWidget *LogList = NULL;
+static GtkListStore *logListModel;
+/* Temporary list to store messages for the LogList when this control was not
+ * yet created. */
+static GList *LogPrintTmpList = NULL;
+static gint LogListNbrRows;
 
 enum
 {
diff --git a/src/misc.c b/src/misc.c
index ba05cc9..6a39a41 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -52,29 +52,29 @@
 /***************
  * Declaration *
  ***************/
-// Playlist window defined in misc.h
-
-// Search file window
-GtkWidget *SearchFileWindow = NULL;
-GtkWidget *SearchStringCombo;
-GtkListStore *SearchStringModel = NULL;
-GtkWidget *SearchInFilename;
-GtkWidget *SearchInTag;
-GtkWidget *SearchCaseSensitive;
-GtkWidget *SearchResultList;
-GtkListStore *SearchResultListModel;
-GtkWidget *SearchStatusBar;
-guint      SearchStatusBarContext;
-
-// Load filename window
-GtkWidget *LoadFilenameWindow  = NULL;
-GtkWidget *FileToLoadCombo;
-GtkListStore *FileToLoadModel = NULL;
-GtkWidget *LoadFileContentList;
-GtkListStore* LoadFileContentListModel;
-GtkWidget *LoadFileNameList;
-GtkListStore* LoadFileNameListModel;
-
+/* Playlist window defined in misc.h */
+
+/* Search file window. */
+static GtkWidget *SearchFileWindow = NULL;
+static GtkWidget *SearchStringCombo;
+static GtkListStore *SearchStringModel = NULL;
+static GtkWidget *SearchInFilename;
+static GtkWidget *SearchInTag;
+static GtkWidget *SearchCaseSensitive;
+static GtkWidget *SearchResultList;
+static GtkListStore *SearchResultListModel;
+static GtkWidget *SearchStatusBar;
+static guint SearchStatusBarContext;
+
+/* Load filename window. */
+static GtkWidget *LoadFilenameWindow = NULL;
+static GtkWidget *FileToLoadCombo;
+static GtkListStore *FileToLoadModel = NULL;
+static GtkWidget *LoadFileContentList;
+static GtkListStore* LoadFileContentListModel;
+static GtkWidget *LoadFileNameList;
+static GtkListStore* LoadFileNameListModel;
+static GtkWidget *LoadFileRunScanner;
 
 enum
 {
diff --git a/src/misc.h b/src/misc.h
index 99c7b9d..5c13263 100644
--- a/src/misc.h
+++ b/src/misc.h
@@ -44,10 +44,6 @@ GtkWidget *PlayListContentMaskCombo;
 GtkListStore *PlayListNameMaskModel;
 GtkListStore *PlayListContentMaskModel;
 
-GtkWidget *LoadFilenameWindow;
-GtkWidget *LoadFileRunScanner;
-
-
 
 /**************
  * Prototypes *
diff --git a/src/mpeg_header.c b/src/mpeg_header.c
index 4515cb7..c5f1f21 100644
--- a/src/mpeg_header.c
+++ b/src/mpeg_header.c
@@ -51,7 +51,7 @@
 /****************
  * Declarations *
  ****************/
-gchar *layer_names[3] =
+static const gchar *layer_names[3] =
 {
     "I",    /* Layer 1 */
     "II",   /* Layer 2 */
diff --git a/src/ogg_header.c b/src/ogg_header.c
index f9e26da..486b08d 100644
--- a/src/ogg_header.c
+++ b/src/ogg_header.c
@@ -42,16 +42,6 @@
 #include "misc.h"
 
 
-/***************
- * Declaration *
- ***************/
-
-
-/**************
- * Prototypes *
- **************/
-
-
 /*************
  * Functions *
  *************/
diff --git a/src/picture.c b/src/picture.c
index e440ca9..d730264 100644
--- a/src/picture.c
+++ b/src/picture.c
@@ -45,45 +45,20 @@
 #endif /* G_OS_WIN32 */
 
 
-/****************
- * Declarations *
- ****************/
-
-
 /**************
  * Prototypes *
  **************/
 
-void Tag_Area_Picture_Drag_Data (GtkWidget *widget, GdkDragContext *dc,
-                                 gint x, gint y, GtkSelectionData *selection_data,
-                                 guint info, guint t, gpointer data);
-void Picture_Selection_Changed_cb (GtkTreeSelection *selection, gpointer data);
 static void Picture_Load_Filename (gchar *filename, gpointer user_data);
 
-void Picture_Add_Button_Clicked         (GObject *object);
-void Picture_Properties_Button_Clicked  (GObject *object);
-void Picture_Save_Button_Clicked        (GObject *object);
-void Picture_Clear_Button_Clicked       (GObject *object);
-
-Picture_Format Picture_Format_From_Data (Picture *pic);
 static const gchar *Picture_Format_String (Picture_Format format);
 static const gchar *Picture_Type_String (Picture_Type type);
 static gchar *Picture_Info (Picture *pic);
-void           PictureEntry_Clear       (void);
-void           PictureEntry_Update      (Picture *pic, gboolean select_it);
 
-Picture *Picture_Allocate (void);
-Picture *Picture_Copy_One (const Picture *pic);
-Picture *Picture_Copy     (const Picture *pic);
-void     Picture_Free     (Picture *pic);
 static Picture *Picture_Load_File_Data (const gchar *filename);
 static gboolean Picture_Save_File_Data (const Picture *pic,
                                         const gchar *filename);
 
-gboolean Picture_Entry_View_Button_Pressed (GtkTreeView *treeview, GdkEventButton *event, gpointer data);
-gboolean Picture_Entry_View_Key_Pressed    (GtkTreeView *treeview, GdkEvent *event, gpointer data);
-
-
 /*
  * Note :
  * -> MP4_TAG :
diff --git a/src/scan.c b/src/scan.c
index 509239e..c210296 100644
--- a/src/scan.c
+++ b/src/scan.c
@@ -49,65 +49,64 @@
 /****************
  * Declarations *
  ****************/
-GtkWidget *DummyEntry = NULL;    /* Used to simulate a gtkentry widget for mask code '%i' */
-GtkWidget *ScanTagMaskCombo           = NULL;
-GtkWidget *RenameFileMaskCombo        = NULL;
-GtkWidget *ScannerOptionCombo         = NULL;
-GtkWidget *RenameFilePrefixPathButton = NULL;
-
-GtkWidget *ScanTagFrame;
-GtkWidget *RenameFileFrame;
-GtkWidget *ProcessFieldsFrame;
-GtkWidget *FillTagPreviewLabel        = NULL;
-GtkWidget *RenameFilePreviewLabel     = NULL;
-
-GtkListStore *RenameFileListModel;
-GtkListStore *ScanTagListModel;
-
-GtkWidget *ProcessFileNameField;
-GtkWidget *ProcessTitleField;
-GtkWidget *ProcessArtistField;
-GtkWidget *ProcessAlbumArtistField;
-GtkWidget *ProcessAlbumField;
-GtkWidget *ProcessGenreField;
-GtkWidget *ProcessCommentField;
-GtkWidget *ProcessComposerField;
-GtkWidget *ProcessOrigArtistField;
-GtkWidget *ProcessCopyrightField;
-GtkWidget *ProcessURLField;
-GtkWidget *ProcessEncodedByField;
-GtkWidget *ProcessFieldsConvertIntoSpace      = NULL;
-GtkWidget *ProcessFieldsConvertSpace          = NULL;
-GtkWidget *ProcessFieldsConvert               = NULL;
-GtkWidget *ProcessFieldsConvertLabelTo;
-GtkWidget *ProcessFieldsConvertTo             = NULL;
-GtkWidget *ProcessFieldsConvertFrom           = NULL;
-GtkWidget *ProcessFieldsAllUppercase          = NULL;
-GtkWidget *ProcessFieldsAllDowncase           = NULL;
-GtkWidget *ProcessFieldsFirstLetterUppercase  = NULL;
-GtkWidget *ProcessFieldsFirstLettersUppercase = NULL;
-GtkWidget *ProcessFieldsDetectRomanNumerals   = NULL;
-GtkWidget *ProcessFieldsRemoveSpace           = NULL;
-GtkWidget *ProcessFieldsInsertSpace           = NULL;
-GtkWidget *ProcessFieldsOnlyOneSpace          = NULL;
-
-GtkWidget *LegendFrame    = NULL;
-GtkWidget *LegendButton   = NULL;
-
-GtkWidget *MaskEditorButton = NULL;
-GtkWidget *MaskEditorFrame  = NULL;
-GtkWidget *MaskEditorVBox;
-GtkWidget *MaskEditorHBox;
-GtkWidget *MaskEditorScrollWindow;
-GtkWidget *MaskEditorList;
-GtkWidget *MaskEditorEntry;
-GtkWidget *MaskEditorNewButton;
-GtkWidget *MaskEditorCopyButton;
-GtkWidget *MaskEditorAddButton;
-GtkWidget *MaskEditorRemoveButton;
-GtkWidget *MaskEditorUpButton;
-GtkWidget *MaskEditorDownButton;
-GtkWidget *MaskEditorSaveButton;
+static GtkWidget *ScanTagMaskCombo = NULL;
+static GtkWidget *RenameFileMaskCombo = NULL;
+static GtkWidget *ScannerOptionCombo = NULL;
+static GtkWidget *RenameFilePrefixPathButton = NULL;
+
+static GtkWidget *ScanTagFrame;
+static GtkWidget *RenameFileFrame;
+static GtkWidget *ProcessFieldsFrame;
+static GtkWidget *FillTagPreviewLabel = NULL;
+static GtkWidget *RenameFilePreviewLabel = NULL;
+
+static GtkListStore *RenameFileListModel;
+static GtkListStore *ScanTagListModel;
+
+static GtkWidget *ProcessFileNameField;
+static GtkWidget *ProcessTitleField;
+static GtkWidget *ProcessArtistField;
+static GtkWidget *ProcessAlbumArtistField;
+static GtkWidget *ProcessAlbumField;
+static GtkWidget *ProcessGenreField;
+static GtkWidget *ProcessCommentField;
+static GtkWidget *ProcessComposerField;
+static GtkWidget *ProcessOrigArtistField;
+static GtkWidget *ProcessCopyrightField;
+static GtkWidget *ProcessURLField;
+static GtkWidget *ProcessEncodedByField;
+static GtkWidget *ProcessFieldsConvertIntoSpace = NULL;
+static GtkWidget *ProcessFieldsConvertSpace = NULL;
+static GtkWidget *ProcessFieldsConvert = NULL;
+static GtkWidget *ProcessFieldsConvertLabelTo;
+static GtkWidget *ProcessFieldsConvertTo = NULL;
+static GtkWidget *ProcessFieldsConvertFrom = NULL;
+static GtkWidget *ProcessFieldsAllUppercase = NULL;
+static GtkWidget *ProcessFieldsAllDowncase = NULL;
+static GtkWidget *ProcessFieldsFirstLetterUppercase = NULL;
+static GtkWidget *ProcessFieldsFirstLettersUppercase = NULL;
+static GtkWidget *ProcessFieldsDetectRomanNumerals = NULL;
+static GtkWidget *ProcessFieldsRemoveSpace = NULL;
+static GtkWidget *ProcessFieldsInsertSpace = NULL;
+static GtkWidget *ProcessFieldsOnlyOneSpace = NULL;
+
+static GtkWidget *LegendFrame = NULL;
+static GtkWidget *LegendButton = NULL;
+
+static GtkWidget *MaskEditorButton = NULL;
+static GtkWidget *MaskEditorFrame  = NULL;
+static GtkWidget *MaskEditorVBox;
+static GtkWidget *MaskEditorHBox;
+static GtkWidget *MaskEditorScrollWindow;
+static GtkWidget *MaskEditorList;
+static GtkWidget *MaskEditorEntry;
+static GtkWidget *MaskEditorNewButton;
+static GtkWidget *MaskEditorCopyButton;
+static GtkWidget *MaskEditorAddButton;
+static GtkWidget *MaskEditorRemoveButton;
+static GtkWidget *MaskEditorUpButton;
+static GtkWidget *MaskEditorDownButton;
+static GtkWidget *MaskEditorSaveButton;
 
 /* Some predefined masks -- IMPORTANT: Null-terminate me! */
 gchar *Scan_Masks [] =
@@ -225,22 +224,16 @@ static void ScannerWindow_Quit (void);
 static gboolean ScannerWindow_Key_Press (GtkWidget *window, GdkEvent *event);
 static void Scan_Toggle_Legend_Button (void);
 static void Scan_Toggle_Mask_Editor_Button (void);
-gchar   *Scan_Replace_String (gchar *string, gchar *last, gchar *new);
 static void Scan_Option_Button (void);
 static gboolean Scan_Check_Scan_Tag_Mask (GtkWidget *widget_to_show_hide,
                                           GtkEntry *widget_source);
-gboolean Scan_Check_Rename_File_Mask (GtkWidget *widget_to_show_hide, GtkEntry *widget_source);
 static gboolean Scan_Check_Editor_Mask (GtkWidget *widget_to_show_hide,
                                         GtkEntry *widget_source);
 
-gchar   *Scan_Generate_New_Filename_From_Mask (ET_File *ETFile, gchar *mask, gboolean no_dir_check_or_conversion);
 static GList *Scan_Generate_New_Tag_From_Mask (ET_File *ETFile, gchar *mask);
-void     Scan_Rename_File_Generate_Preview    (void);
 static void Scan_Rename_File_Prefix_Path (void);
-void     Scan_Fill_Tag_Generate_Preview       (void);
 static void Scan_Free_File_Rename_List (GList *list);
 static void Scan_Free_File_Fill_Tag_List (GList *list);
-void     Scan_Rename_Directory_Generate_Preview (void);
 
 static gchar **Scan_Return_File_Tag_Field_From_Mask_Code (File_Tag *FileTag,
                                                           gchar code);
@@ -286,9 +279,7 @@ static void Scan_Set_Scanner_Window_Init_Position (void);
 
 
 /*************
- *           *
  * Functions *
- *           *
  *************/
 
 void Init_ScannerWindow (void)



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