[easytag/wip/core-refactoring: 22/24] Remove several unused functions



commit 44ee9ec20ce2f6dd0810a0abf268cd0209783d92
Author: David King <amigadave amigadave com>
Date:   Thu Jan 8 20:03:47 2015 +0000

    Remove several unused functions
    
    Found with the -fdata-sections and -ffunction-sections arguments to the
    compiler, and --gc-sections and --print-gc-sections linker arguments.

 src/application_window.c |   12 --------
 src/application_window.h |    1 -
 src/charset.c            |   23 ----------------
 src/charset.h            |    1 -
 src/misc.c               |   20 --------------
 src/misc.h               |    1 -
 src/preferences_dialog.c |   65 ----------------------------------------------
 src/scan_dialog.c        |   13 ---------
 src/scan_dialog.h        |    1 -
 9 files changed, 0 insertions(+), 137 deletions(-)
---
diff --git a/src/application_window.c b/src/application_window.c
index ce1fba9..7a84885 100644
--- a/src/application_window.c
+++ b/src/application_window.c
@@ -2626,18 +2626,6 @@ et_application_window_browser_refresh_file_in_list (EtApplicationWindow *self,
     et_browser_refresh_file_in_list (ET_BROWSER (priv->browser), file);
 }
 
-void
-et_application_window_browser_refresh_sort (EtApplicationWindow *self)
-{
-    EtApplicationWindowPrivate *priv;
-
-    g_return_if_fail (ET_APPLICATION_WINDOW (self));
-
-    priv = et_application_window_get_instance_private (self);
-
-    et_browser_refresh_sort (ET_BROWSER (priv->browser));
-}
-
 static void
 quit_confirmed (EtApplicationWindow *self)
 {
diff --git a/src/application_window.h b/src/application_window.h
index c85758a..2a3a623 100644
--- a/src/application_window.h
+++ b/src/application_window.h
@@ -87,7 +87,6 @@ ET_File * et_application_window_browser_select_file_by_dlm (EtApplicationWindow
 void et_application_window_browser_unselect_all (EtApplicationWindow *self);
 void et_application_window_browser_refresh_list (EtApplicationWindow *self);
 void et_application_window_browser_refresh_file_in_list (EtApplicationWindow *self, const ET_File *file);
-void et_application_window_browser_refresh_sort (EtApplicationWindow *self);
 void et_application_window_scan_dialog_update_previews (EtApplicationWindow *self);
 void et_application_window_progress_set_fraction (EtApplicationWindow *self, gdouble fraction);
 void et_application_window_progress_set_text (EtApplicationWindow *self, const gchar *text);
diff --git a/src/charset.c b/src/charset.c
index b5523f0..d08c19e 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -712,29 +712,6 @@ Charset_Populate_Combobox (GtkComboBox *combo, gint select_charset)
     gtk_combo_box_set_active (combo, select_charset);
 }
 
-
-/*
- * Return charset_name from charset_title
- */
-const gchar *
-Charset_Get_Name_From_Title (const gchar *charset_title)
-{
-    guint i;
-
-    g_return_val_if_fail (charset_title != NULL, NULL);
-
-    for (i = 0; i < CHARSET_TRANS_ARRAY_LEN; i++)
-    {
-        if (strcasecmp (_(charset_title),
-                        _(charset_trans_array[i].charset_title)) == 0)
-        {
-            return charset_trans_array[i].charset_name;
-        }
-    }
-
-    return NULL;
-}
-
 const gchar *
 et_charset_get_name_from_index (guint index)
 {
diff --git a/src/charset.h b/src/charset.h
index 87a6d84..128de1d 100644
--- a/src/charset.h
+++ b/src/charset.h
@@ -39,7 +39,6 @@ gchar *filename_from_display (const gchar *string);
 gchar *Try_To_Validate_Utf8_String (const gchar *string);
 
 void Charset_Populate_Combobox (GtkComboBox *combo, gint select_charset);
-const gchar *Charset_Get_Name_From_Title (const gchar *charset_title);
 const gchar * et_charset_get_name_from_index (guint index);
 
 void Charset_Insert_Locales_Init    (void);
diff --git a/src/misc.c b/src/misc.c
index c76cd2f..cc5d519 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -142,26 +142,6 @@ gboolean Add_String_To_Combo_List (GtkListStore *liststore, const gchar *str)
 #endif
 }
 
-/*
- * Returns the text of the selected item in a combo box
- * Remember to free the returned value...
- */
-gchar *Get_Active_Combo_Box_Item (GtkComboBox *combo)
-{
-    gchar *text;
-    GtkTreeIter iter;
-    GtkTreeModel *model;
-
-    g_return_val_if_fail (combo != NULL, NULL);
-
-    model = gtk_combo_box_get_model(combo);
-    if (!gtk_combo_box_get_active_iter(combo, &iter))
-        return NULL;
-
-    gtk_tree_model_get(model, &iter, MISC_COMBO_TEXT, &text, -1);
-    return text;
-}
-
 static void
 et_on_child_exited (GPid pid, gint status, gpointer user_data)
 {
diff --git a/src/misc.h b/src/misc.h
index bc1a10e..ae3a14f 100644
--- a/src/misc.h
+++ b/src/misc.h
@@ -28,7 +28,6 @@ G_BEGIN_DECLS
  * Combobox misc functions
  */
 gboolean Add_String_To_Combo_List(GtkListStore *liststore, const gchar *string);
-gchar   *Get_Active_Combo_Box_Item(GtkComboBox *combo);
 
 gchar *Convert_Duration (gulong duration);
 
diff --git a/src/preferences_dialog.c b/src/preferences_dialog.c
index 31c87a4..112cba9 100644
--- a/src/preferences_dialog.c
+++ b/src/preferences_dialog.c
@@ -1141,71 +1141,6 @@ Check_DefaultPathToMp3 (EtPreferencesDialog *self)
     return FALSE;
 }
 
-/*
- * The character set conversion is used for ID3 tag. UTF-8 is used to display.
- *  - reading_character is converted to UTF-8
- *  - writing_character is converted from UTF-8
- */
-/*****************
-gint Check_CharacterSetTranslation (void)
-{
-    gchar *temp;
-    gchar *reading_character;
-    gchar *writing_character;
-
-    temp = Get_Active_Combo_Box_Item(GTK_COMBO_BOX(FileReadingCharacterSetCombo));
-    reading_character = Charset_Get_Name_From_Title(temp);
-    g_free(temp);
-
-    temp = Get_Active_Combo_Box_Item(GTK_COMBO_BOX(FileWritingCharacterSetCombo));
-    writing_character = Charset_Get_Name_From_Title(temp);
-    g_free(temp);
-
-    // Check conversion when reading file
-    if ( GTK_TOGGLE_BUTTON(UseNonStandardId3ReadingCharacterSet)->active
-    && (test_conversion_charset(reading_character,"UTF-8")!=TRUE) )
-    {
-        gchar *msg = g_strdup_printf(_("The character set translation from '%s'\n"
-                                       "to '%s' is not supported"),reading_character,"UTF-8");
-        GtkWidget *msgbox = msg_box_new(_("Error"),
-                                        GTK_WINDOW(OptionsWindow),
-                                        NULL,
-                                        GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
-                                        msg,
-                                        GTK_STOCK_DIALOG_ERROR,
-                                        GTK_STOCK_OK, GTK_RESPONSE_OK,
-                                        NULL);
-        gtk_dialog_run(GTK_DIALOG(msgbox));
-        gtk_widget_destroy(msgbox);
-        g_free(msg);
-        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(UseNonStandardId3ReadingCharacterSet),FALSE);
-        return 0;
-    }
-    // Check conversion when writing file
-    if ( GTK_TOGGLE_BUTTON(UseNonStandardId3WritingCharacterSet)->active
-    && (test_conversion_charset("UTF-8",writing_character)!=TRUE) )
-    {
-        gchar *msg = g_strdup_printf(_("The character set translation from '%s'\n"
-                                       "to '%s' is not supported"),"UTF-8",writing_character);
-        GtkWidget *msgbox = msg_box_new(_("Error"),
-                                        GTK_WINDOW(OptionsWindow),
-                                        NULL,
-                                        GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
-                                        msg,
-                                        GTK_STOCK_DIALOG_ERROR,
-                                        GTK_STOCK_OK, GTK_RESPONSE_OK,
-                                        NULL);
-        gtk_dialog_run(GTK_DIALOG(msgbox));
-        gtk_widget_destroy(msgbox);
-        g_free(msg);
-        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(UseNonStandardId3WritingCharacterSet),FALSE);
-        return 0;
-    }
-
-    return 1;
-}
-*************/
-
 static gboolean
 Check_Config (EtPreferencesDialog *self)
 {
diff --git a/src/scan_dialog.c b/src/scan_dialog.c
index 7c58eb5..263270f 100644
--- a/src/scan_dialog.c
+++ b/src/scan_dialog.c
@@ -1661,19 +1661,6 @@ on_scan_mode_changed (EtScanDialog *self,
     }
 }
 
-void
-et_scan_dialog_open (EtScanDialog *self, EtScanMode scanner_type)
-{
-    g_return_if_fail (ET_SCAN_DIALOG (self));
-    g_return_if_fail (scanner_type >= ET_SCAN_MODE_FILL_TAG
-                      && scanner_type <= ET_SCAN_MODE_PROCESS_FIELDS);
-
-    if (g_settings_get_enum (MainSettings, "scan-mode") != (gint)scanner_type)
-    {
-        g_settings_set_enum (MainSettings, "scan-mode", scanner_type);
-    }
-}
-
 static void
 Mask_Editor_List_Add (EtScanDialog *self)
 {
diff --git a/src/scan_dialog.h b/src/scan_dialog.h
index 4819d86..70a6021 100644
--- a/src/scan_dialog.h
+++ b/src/scan_dialog.h
@@ -51,7 +51,6 @@ struct _EtScanDialogClass
 GType et_scan_dialog_get_type (void);
 EtScanDialog *et_scan_dialog_new (GtkWindow *parent);
 void et_scan_dialog_apply_changes (EtScanDialog *self);
-void et_scan_dialog_open (EtScanDialog *self, EtScanMode scanner_type);
 void et_scan_dialog_scan_selected_files (EtScanDialog *self);
 void et_scan_dialog_update_previews (EtScanDialog *self);
 


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