comparison src/filewriter/filewriter.c @ 986:5523559a1eac trunk

[svn] - add Vorbis output mode - change "Output file extension" to "Output file format" - link against -lvorbisenc, this will probably want to be adjusted before we make a release on a 1.4 branch
author nenolod
date Mon, 30 Apr 2007 21:18:44 -0700
parents 029056fb9f9d
children 67cf9a1e3dc5
comparison
equal deleted inserted replaced
985:029056fb9f9d 986:5523559a1eac
26 static GtkWidget *configure_win = NULL, *configure_vbox; 26 static GtkWidget *configure_win = NULL, *configure_vbox;
27 static GtkWidget *path_hbox, *path_label, *path_dirbrowser; 27 static GtkWidget *path_hbox, *path_label, *path_dirbrowser;
28 static GtkWidget *configure_bbox, *configure_ok, *configure_cancel; 28 static GtkWidget *configure_bbox, *configure_ok, *configure_cancel;
29 29
30 static GtkWidget *fileext_hbox, *fileext_label, *fileext_combo, *plugin_button; 30 static GtkWidget *fileext_hbox, *fileext_label, *fileext_combo, *plugin_button;
31 enum fileext_t { WAV = 0, MP3, FILEEXT_MAX } ; 31 enum fileext_t { WAV = 0, MP3, VORBIS, FILEEXT_MAX } ;
32 static gint fileext = WAV; 32 static gint fileext = WAV;
33 static gchar *fileext_str[] = { "wav", "mp3" } ; 33 static gchar *fileext_str[] = { "wav", "mp3", "ogg" } ;
34 static FileWriter plugin; 34 static FileWriter plugin;
35 35
36 static GtkWidget *saveplace_hbox, *saveplace; 36 static GtkWidget *saveplace_hbox, *saveplace;
37 static gboolean save_original = TRUE; 37 static gboolean save_original = TRUE;
38 38
100 100
101 if (fileext == WAV) 101 if (fileext == WAV)
102 plugin = wav_plugin; 102 plugin = wav_plugin;
103 if (fileext == MP3) 103 if (fileext == MP3)
104 plugin = mp3_plugin; 104 plugin = mp3_plugin;
105 if (fileext == VORBIS)
106 plugin = vorbis_plugin;
105 } 107 }
106 108
107 static void file_init(void) 109 static void file_init(void)
108 { 110 {
109 ConfigDb *db; 111 ConfigDb *db;
483 485
484 486
485 fileext_hbox = gtk_hbox_new(FALSE, 5); 487 fileext_hbox = gtk_hbox_new(FALSE, 5);
486 gtk_box_pack_start(GTK_BOX(configure_vbox), fileext_hbox, FALSE, FALSE, 0); 488 gtk_box_pack_start(GTK_BOX(configure_vbox), fileext_hbox, FALSE, FALSE, 0);
487 489
488 fileext_label = gtk_label_new(_("Output file extension:")); 490 fileext_label = gtk_label_new(_("Output file format:"));
489 gtk_box_pack_start(GTK_BOX(fileext_hbox), fileext_label, FALSE, FALSE, 0); 491 gtk_box_pack_start(GTK_BOX(fileext_hbox), fileext_label, FALSE, FALSE, 0);
490 492
491 fileext_combo = gtk_combo_box_new_text(); 493 fileext_combo = gtk_combo_box_new_text();
492 gtk_combo_box_append_text(GTK_COMBO_BOX(fileext_combo), "WAV"); 494 gtk_combo_box_append_text(GTK_COMBO_BOX(fileext_combo), "WAV");
493 gtk_combo_box_append_text(GTK_COMBO_BOX(fileext_combo), "MP3"); 495 gtk_combo_box_append_text(GTK_COMBO_BOX(fileext_combo), "MP3");
496 gtk_combo_box_append_text(GTK_COMBO_BOX(fileext_combo), "Vorbis");
494 gtk_box_pack_start(GTK_BOX(fileext_hbox), fileext_combo, FALSE, FALSE, 0); 497 gtk_box_pack_start(GTK_BOX(fileext_hbox), fileext_combo, FALSE, FALSE, 0);
495 gtk_combo_box_set_active(GTK_COMBO_BOX(fileext_combo), fileext); 498 gtk_combo_box_set_active(GTK_COMBO_BOX(fileext_combo), fileext);
496 g_signal_connect(G_OBJECT(fileext_combo), "changed", G_CALLBACK(fileext_cb), NULL); 499 g_signal_connect(G_OBJECT(fileext_combo), "changed", G_CALLBACK(fileext_cb), NULL);
497 500
498 plugin_button = gtk_button_new_with_label(_("Configure")); 501 plugin_button = gtk_button_new_with_label(_("Configure"));