diff src/filewriter/filewriter.c @ 1000:d980b7e5bf1d trunk

[svn] - Prepared FileWriter for partial compilation
author mf0102
date Sat, 05 May 2007 05:03:57 -0700
parents 67cf9a1e3dc5
children be2d04b2bd28
line wrap: on
line diff
--- a/src/filewriter/filewriter.c	Sat May 05 04:20:17 2007 -0700
+++ b/src/filewriter/filewriter.c	Sat May 05 05:03:57 2007 -0700
@@ -28,9 +28,37 @@
 static GtkWidget *configure_bbox, *configure_ok, *configure_cancel;
 
 static GtkWidget *fileext_hbox, *fileext_label, *fileext_combo, *plugin_button;
-enum fileext_t { WAV = 0, MP3, VORBIS, FLAC, FILEEXT_MAX } ;
+
+enum fileext_t
+{
+	WAV = 0,
+#ifdef FILEWRITER_MP3
+	MP3,
+#endif
+#ifdef FILEWRITER_VORBIS
+	VORBIS,
+#endif
+#ifdef FILEWRITER_FLAC
+	FLAC,
+#endif
+	FILEEXT_MAX
+};
+
 static gint fileext = WAV;
-static gchar *fileext_str[] = { "wav", "mp3", "ogg", "flac" } ;
+static gchar *fileext_str[] =
+{
+	"wav",
+#ifdef FILEWRITER_MP3
+	"mp3",
+#endif
+#ifdef FILEWRITER_VORBIS
+	"ogg",
+#endif
+#ifdef FILEWRITER_FLAC
+	"flac"
+#endif
+};
+
 static FileWriter plugin;
 
 static GtkWidget *saveplace_hbox, *saveplace;
@@ -100,12 +128,18 @@
 
     if (fileext == WAV)
         plugin = wav_plugin;
+#ifdef FILEWRITER_MP3
     if (fileext == MP3)
         plugin = mp3_plugin;
+#endif
+#ifdef FILEWRITER_VORBIS
     if (fileext == VORBIS)
         plugin = vorbis_plugin;
+#endif
+#ifdef FILEWRITER_FLAC
     if (fileext == FLAC)
         plugin = flac_plugin;
+#endif
 }
 
 static void file_init(void)
@@ -494,9 +528,15 @@
 
         fileext_combo = gtk_combo_box_new_text();
         gtk_combo_box_append_text(GTK_COMBO_BOX(fileext_combo), "WAV");
+#ifdef FILEWRITER_MP3
         gtk_combo_box_append_text(GTK_COMBO_BOX(fileext_combo), "MP3");
+#endif
+#ifdef FILEWRITER_VORBIS
         gtk_combo_box_append_text(GTK_COMBO_BOX(fileext_combo), "Vorbis");
+#endif
+#ifdef FILEWRITER_FLAC
         gtk_combo_box_append_text(GTK_COMBO_BOX(fileext_combo), "FLAC");
+#endif
         gtk_box_pack_start(GTK_BOX(fileext_hbox), fileext_combo, FALSE, FALSE, 0);
         gtk_combo_box_set_active(GTK_COMBO_BOX(fileext_combo), fileext);
         g_signal_connect(G_OBJECT(fileext_combo), "changed", G_CALLBACK(fileext_cb), NULL);