[easytag] Fix switch-enum warning when disabling tag support



commit 2f8ce5f47892b75bd610647de22b826f9375b8a2
Author: David King <amigadave amigadave com>
Date:   Thu Mar 26 18:05:42 2015 +0100

    Fix switch-enum warning when disabling tag support
    
    https://bugzilla.gnome.org/show_bug.cgi?id=746372

 src/application_window.c |   40 ++++++++++++++++++++++++++++++++++++++++
 src/file.c               |   18 ++++++++++++++++++
 src/file_list.c          |   40 ++++++++++++++++++++++++++++++++++++++++
 src/tag_area.c           |   36 ++++++++++++++++++++++++++++++++++++
 4 files changed, 134 insertions(+), 0 deletions(-)
---
diff --git a/src/application_window.c b/src/application_window.c
index b658131..6813512 100644
--- a/src/application_window.c
+++ b/src/application_window.c
@@ -2107,6 +2107,24 @@ et_application_window_update_et_file_from_ui (EtApplicationWindow *self)
             FileTag = et_application_window_tag_area_create_file_tag (self);
             et_file_tag_copy_other_into (et_file->FileTag->data, FileTag);
             break;
+#ifndef ENABLE_MP3
+        case ID3_TAG:
+#endif
+#ifndef ENABLE_OGG
+        case OGG_TAG:
+#endif
+#ifndef ENABLE_FLAC
+        case FLAC_TAG:
+#endif
+#ifndef ENABLE_MP4
+        case MP4_TAG:
+#endif
+#ifndef ENABLE_WAVPACK
+        case WAVPACK_TAG:
+#endif
+#ifndef ENABLE_OPUS
+        case OPUS_TAG:
+#endif
         case UNKNOWN_TAG:
         default:
             FileTag = et_file_tag_new ();
@@ -2314,6 +2332,28 @@ et_application_window_display_et_file (EtApplicationWindow *self,
             break;
 #endif
         case OFR_FILE:
+#if !defined ENABLE_MP3 && defined ENABLE_ID3LIB
+        case MP3_FILE:
+        case MP2_FILE:
+#endif
+#ifndef ENABLE_OGG
+        case OGG_FILE:
+#endif
+#ifndef ENABLE_SPEEX
+        case SPEEX_FILE:
+#endif
+#ifndef ENABLE_FLAC
+        case FLAC_FILE:
+#endif
+#ifndef ENABLE_MP4
+        case MP4_FILE:
+#endif
+#ifndef ENABLE_WAVPACK
+        case WAVPACK_FILE:
+#endif
+#ifndef ENABLE_OPUS
+        case OPUS_FILE:
+#endif
         case UNKNOWN_FILE:
         default:
             /* Default displaying. */
diff --git a/src/file.c b/src/file.c
index 01c0d34..b287652 100644
--- a/src/file.c
+++ b/src/file.c
@@ -1353,6 +1353,24 @@ ET_Save_File_Tag_To_HD (ET_File *ETFile, GError **error)
             state = ogg_tag_write_file_tag (ETFile, error);
             break;
 #endif
+#ifndef ENABLE_MP3
+        case ID3_TAG:
+#endif
+#ifndef ENABLE_OGG
+        case OGG_TAG:
+#endif
+#ifndef ENABLE_FLAC
+        case FLAC_TAG:
+#endif
+#ifndef ENABLE_MP4
+        case MP4_TAG:
+#endif
+#ifndef ENABLE_WAVPACK
+        case WAVPACK_TAG:
+#endif
+#ifndef ENABLE_OPUS
+        case WAVPACK_TAG:
+#endif
         case UNKNOWN_TAG:
         default:
             Log_Print (LOG_ERROR,
diff --git a/src/file_list.c b/src/file_list.c
index 43d665b..40da814 100644
--- a/src/file_list.c
+++ b/src/file_list.c
@@ -320,6 +320,24 @@ et_file_list_add (GList *file_list,
             }
             break;
 #endif
+#ifndef ENABLE_MP3
+        case ID3_TAG:
+#endif
+#ifndef ENABLE_OGG
+        case OGG_TAG:
+#endif
+#ifndef ENABLE_FLAC
+        case FLAC_TAG:
+#endif
+#ifndef ENABLE_MP4
+        case MP4_TAG:
+#endif
+#ifndef ENABLE_WAVPACK
+        case WAVPACK_TAG:
+#endif
+#ifndef ENABLE_OPUS
+        case WAVPACK_TAG:
+#endif
         case UNKNOWN_TAG:
         default:
             /* FIXME: Translatable string. */
@@ -386,6 +404,28 @@ et_file_list_add (GList *file_list,
             break;
 #endif
         case OFR_FILE:
+#if !defined ENABLE_MP3 && defined ENABLE_ID3LIB
+        case MP3_FILE:
+        case MP2_FILE:
+#endif
+#ifndef ENABLE_OGG
+        case OGG_FILE:
+#endif
+#ifndef ENABLE_SPEEX
+        case SPEEX_FILE:
+#endif
+#ifndef ENABLE_FLAC
+        case FLAC_FILE:
+#endif
+#ifndef ENABLE_MP4
+        case MP4_FILE:
+#endif
+#ifndef ENABLE_WAVPACK
+        case WAVPACK_FILE:
+#endif
+#ifndef ENABLE_OPUS
+        case OPUS_FILE:
+#endif
         case UNKNOWN_FILE:
         default:
             /* FIXME: Translatable string. */
diff --git a/src/tag_area.c b/src/tag_area.c
index 36eb1a0..4c37181 100644
--- a/src/tag_area.c
+++ b/src/tag_area.c
@@ -2651,6 +2651,24 @@ et_tag_area_update_controls (EtTagArea *self,
             break;
 #endif /* ENABLE_WAVPACK */
 
+#ifndef ENABLE_MP3
+        case ID3_TAG:
+#endif
+#ifndef ENABLE_OGG
+        case OGG_TAG:
+#endif
+#ifndef ENABLE_FLAC
+        case FLAC_TAG:
+#endif
+#ifndef ENABLE_MP4
+        case MP4_TAG:
+#endif
+#ifndef ENABLE_WAVPACK
+        case WAVPACK_TAG:
+#endif
+#ifndef ENABLE_OPUS
+        case WAVPACK_TAG:
+#endif
         case UNKNOWN_TAG:
         default:
             gtk_widget_hide (priv->disc_number_label);
@@ -3046,6 +3064,24 @@ et_tag_area_display_et_file (EtTagArea *self,
             gtk_label_set_text (GTK_LABEL (priv->label), _("Opus Tag"));
             break;
 #endif
+#ifndef ENABLE_MP3
+        case ID3_TAG:
+#endif
+#ifndef ENABLE_OGG
+        case OGG_TAG:
+#endif
+#ifndef ENABLE_FLAC
+        case FLAC_TAG:
+#endif
+#ifndef ENABLE_MP4
+        case MP4_TAG:
+#endif
+#ifndef ENABLE_WAVPACK
+        case WAVPACK_TAG:
+#endif
+#ifndef ENABLE_OPUS
+        case WAVPACK_TAG:
+#endif
         case UNKNOWN_TAG:
         default:
             gtk_label_set_text (GTK_LABEL (priv->label), _("Tag"));


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