comparison src/filewriter/filewriter.c @ 2181:bbb631ab78e9

started initial (very humble) efforts on making FileWriter a general plugin
author mf0102 <0102@gmx.at>
date Wed, 21 Nov 2007 17:02:26 +0100
parents b8da6a0b0da2
children 573436f1a56e
comparison
equal deleted inserted replaced
2180:f629e0c90f18 2181:bbb631ab78e9
31 31
32 static GtkWidget *fileext_hbox, *fileext_label, *fileext_combo, *plugin_button; 32 static GtkWidget *fileext_hbox, *fileext_label, *fileext_combo, *plugin_button;
33 33
34 enum fileext_t 34 enum fileext_t
35 { 35 {
36 WAV = 0, 36 WAV = 0,
37 #ifdef FILEWRITER_MP3 37 #ifdef FILEWRITER_MP3
38 MP3, 38 MP3,
39 #endif 39 #endif
40 #ifdef FILEWRITER_VORBIS 40 #ifdef FILEWRITER_VORBIS
41 VORBIS, 41 VORBIS,
42 #endif 42 #endif
43 #ifdef FILEWRITER_FLAC 43 #ifdef FILEWRITER_FLAC
44 FLAC, 44 FLAC,
45 #endif 45 #endif
46 FILEEXT_MAX 46 FILEEXT_MAX
47 }; 47 };
48 48
49 static gint fileext = WAV; 49 static gint fileext = WAV;
50 static gchar *fileext_str[] = 50 static gchar *fileext_str[] =
51 { 51 {
52 "wav", 52 "wav",
53 #ifdef FILEWRITER_MP3 53 #ifdef FILEWRITER_MP3
54 "mp3", 54 "mp3",
55 #endif 55 #endif
56 #ifdef FILEWRITER_VORBIS 56 #ifdef FILEWRITER_VORBIS
57 "ogg", 57 "ogg",
58 #endif 58 #endif
59 #ifdef FILEWRITER_FLAC 59 #ifdef FILEWRITER_FLAC
60 "flac" 60 "flac"
61 #endif 61 #endif
62 }; 62 };
63 63
64 static FileWriter plugin; 64 static FileWriter plugin;
65 65
133 } 133 }
134 134
135 static void file_init(void) 135 static void file_init(void)
136 { 136 {
137 ConfigDb *db; 137 ConfigDb *db;
138 GtkWidget *menu_root;
139
140 /*menu_root = gtk_menu_item_new_with_label(_("FileWriter"));
141 gtk_widget_show(menu_root);
142 audacious_menu_plugin_item_add(AUDACIOUS_MENU_PLAYLIST_RCLICK, menu_root);*/
138 143
139 db = aud_cfg_db_open(); 144 db = aud_cfg_db_open();
140 aud_cfg_db_get_int(db, "filewriter", "fileext", &fileext); 145 aud_cfg_db_get_int(db, "filewriter", "fileext", &fileext);
141 aud_cfg_db_get_string(db, "filewriter", "file_path", &file_path); 146 aud_cfg_db_get_string(db, "filewriter", "file_path", &file_path);
142 aud_cfg_db_get_bool(db, "filewriter", "save_original", &save_original); 147 aud_cfg_db_get_bool(db, "filewriter", "save_original", &save_original);