summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--callbacks.c143
-rw-r--r--callbacks.h48
-rw-r--r--cdumb.c1
-rw-r--r--cgme.c1
-rw-r--r--conf.c13
-rw-r--r--conf.h6
-rw-r--r--csid.cpp2
-rw-r--r--deadbeef.glade733
-rw-r--r--deadbeef.h9
-rw-r--r--interface.c402
-rw-r--r--interface.h1
-rw-r--r--plugins.c16
-rw-r--r--plugins.h3
-rw-r--r--plugins/cdda/cdda.c3
-rw-r--r--plugins/faad2/faad2.c1
-rw-r--r--plugins/ffap/ffap.c4
-rw-r--r--plugins/flac/flac.c1
-rw-r--r--plugins/hotkeys/hotkeys.c4
-rw-r--r--plugins/mpgmad/mpgmad.c4
-rw-r--r--plugins/sndfile/sndfile.c5
-rw-r--r--plugins/vfs_curl/vfs_curl.c3
-rw-r--r--plugins/vorbis/vorbis.c1
-rw-r--r--plugins/wavpack/wavpack.c1
-rw-r--r--streamer.c9
-rw-r--r--vfs_stdio.c3
25 files changed, 1348 insertions, 69 deletions
diff --git a/callbacks.c b/callbacks.c
index bdbcfaad..e8af63dd 100644
--- a/callbacks.c
+++ b/callbacks.c
@@ -1302,3 +1302,146 @@ on_add_audio_cd_activate (GtkMenuItem *menuitem,
playlist_refresh ();
}
+static GtkWidget *prefwin;
+
+void
+on_preferences_activate (GtkMenuItem *menuitem,
+ gpointer user_data)
+{
+ GtkWidget *w = prefwin = create_prefwin ();
+ gtk_window_set_transient_for (GTK_WINDOW (w), GTK_WINDOW (mainwin));
+
+ // alsa_soundcard
+ // FIXME: get list of soundcards from alsa
+ const char *s = conf_get_str ("alsa_soundcard", "default");
+ GtkComboBox *combobox = GTK_COMBO_BOX (lookup_widget (w, "pref_soundcard"));
+ if (strcasecmp (s, "default")) {
+ gtk_combo_box_append_text (combobox, s);
+ gtk_combo_box_set_active (combobox, 1);
+ }
+ else {
+ gtk_combo_box_set_active (combobox, 0);
+ }
+
+ // samplerate
+ gtk_entry_set_text (GTK_ENTRY (lookup_widget (w, "pref_samplerate")), conf_get_str ("samplerate", "48000"));
+
+ // src_quality
+ combobox = GTK_COMBO_BOX (lookup_widget (w, "pref_src_quality"));
+ gtk_combo_box_set_active (combobox, conf_get_int ("src_quality", 2));
+
+ // replaygain_mode
+ combobox = GTK_COMBO_BOX (lookup_widget (w, "pref_replaygain_mode"));
+ gtk_combo_box_set_active (combobox, conf_get_int ("replaygain_mode", 0));
+
+ // replaygain_scale
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (lookup_widget (w, "pref_replaygain_scale")), conf_get_int ("replaygain_scale", 1));
+
+ // close_send_to_tray
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (lookup_widget (w, "pref_close_send_to_tray")), conf_get_int ("close_send_to_tray", 0));
+
+ // list of plugins
+ GtkTreeView *tree = GTK_TREE_VIEW (lookup_widget (w, "pref_pluginlist"));
+ GtkListStore *store = gtk_list_store_new (1, G_TYPE_STRING);//GTK_LIST_STORE (gtk_tree_view_get_model (tree));
+ GtkCellRenderer *rend = gtk_cell_renderer_text_new ();
+ GtkTreeViewColumn *col = gtk_tree_view_column_new_with_attributes ("Title", rend, "text", 0, NULL);
+ gtk_tree_view_append_column (tree, col);
+ DB_plugin_t **plugins = plug_get_list ();
+ int i;
+ for (i = 0; plugins[i]; i++) {
+ GtkTreeIter it;
+ gtk_list_store_append (store, &it);
+ gtk_list_store_set (store, &it, 0, plugins[i]->name, -1);
+ }
+ gtk_tree_view_set_model (tree, GTK_TREE_MODEL (store));
+
+ gtk_widget_show (w);
+}
+
+
+void
+on_pref_soundcard_changed (GtkComboBox *combobox,
+ gpointer user_data)
+{
+ char *text = gtk_combo_box_get_active_text (combobox);
+ conf_set_str ("alsa_soundcard", text ? text : "default");
+}
+
+
+void
+on_pref_samplerate_changed (GtkEditable *editable,
+ gpointer user_data)
+{
+ const char *text = gtk_entry_get_text (GTK_ENTRY (editable));
+ conf_set_str ("samplerate", text ? text : "48000");
+}
+
+
+void
+on_pref_src_quality_changed (GtkComboBox *combobox,
+ gpointer user_data)
+{
+ int active = gtk_combo_box_get_active (combobox);
+ conf_set_int ("src_quality", active == -1 ? 2 : active);
+}
+
+
+void
+on_pref_replaygain_mode_changed (GtkComboBox *combobox,
+ gpointer user_data)
+{
+ int active = gtk_combo_box_get_active (combobox);
+ conf_set_int ("replaygain_mode", active == -1 ? 0 : active);
+}
+
+void
+on_pref_replaygain_scale_clicked (GtkButton *button,
+ gpointer user_data)
+{
+ int active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button));
+ conf_set_int ("replaygain_mode", active);
+}
+
+
+void
+on_pref_close_send_to_tray_clicked (GtkButton *button,
+ gpointer user_data)
+{
+ int active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button));
+ conf_set_int ("close_send_to_tray", active);
+}
+
+
+void
+on_pref_plugin_configure_activate (GtkButton *button,
+ gpointer user_data)
+{
+}
+
+void
+on_pref_pluginlist_cursor_changed (GtkTreeView *treeview,
+ gpointer user_data)
+{
+ GtkTreePath *path;
+ GtkTreeViewColumn *col;
+ gtk_tree_view_get_cursor (treeview, &path, &col);
+ if (!path || !col) {
+ // reset
+ return;
+ }
+ int *indices = gtk_tree_path_get_indices (path);
+ DB_plugin_t **plugins = plug_get_list ();
+ DB_plugin_t *p = plugins[*indices];
+ assert (p);
+ GtkWidget *w = prefwin;//GTK_WIDGET (gtk_widget_get_parent_window (GTK_WIDGET (treeview)));
+ assert (w);
+ GtkEntry *e = GTK_ENTRY (lookup_widget (w, "pref_plugin_descr"));
+ gtk_entry_set_text (e, p->descr ? p->descr : "");
+ e = GTK_ENTRY (lookup_widget (w, "pref_plugin_author"));
+ gtk_entry_set_text (e, p->author ? p->author : "");
+ e = GTK_ENTRY (lookup_widget (w, "pref_plugin_email"));
+ gtk_entry_set_text (e, p->email ? p->email : "");
+ e = GTK_ENTRY (lookup_widget (w, "pref_plugin_website"));
+ gtk_entry_set_text (e, p->website ? p->website : "");
+}
+
diff --git a/callbacks.h b/callbacks.h
index 378f7923..2049f861 100644
--- a/callbacks.h
+++ b/callbacks.h
@@ -546,3 +546,51 @@ on_helpwindow_key_press_event (GtkWidget *widget,
void
on_add_audio_cd_activate (GtkMenuItem *menuitem,
gpointer user_data);
+
+void
+on_preferences_activate (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+on_pref_soundcard_changed (GtkComboBox *combobox,
+ gpointer user_data);
+
+void
+on_pref_samplerate_changed (GtkEditable *editable,
+ gpointer user_data);
+
+void
+on_pref_src_quality_changed (GtkComboBox *combobox,
+ gpointer user_data);
+
+void
+on_pref_replaygain_clicked (GtkButton *button,
+ gpointer user_data);
+
+void
+on_pref_replaygain_scale_clicked (GtkButton *button,
+ gpointer user_data);
+
+void
+on_pref_close_send_to_tray_clicked (GtkButton *button,
+ gpointer user_data);
+
+void
+on_pref_plugin_configure_activate (GtkButton *button,
+ gpointer user_data);
+
+void
+on_pref_src_quality_changed (GtkComboBox *combobox,
+ gpointer user_data);
+
+void
+on_conf_replaygain_mode_changed (GtkComboBox *combobox,
+ gpointer user_data);
+
+void
+on_pref_replaygain_mode_changed (GtkComboBox *combobox,
+ gpointer user_data);
+
+void
+on_pref_pluginlist_cursor_changed (GtkTreeView *treeview,
+ gpointer user_data);
diff --git a/cdumb.c b/cdumb.c
index b3a4eeb5..fc29860f 100644
--- a/cdumb.c
+++ b/cdumb.c
@@ -799,6 +799,7 @@ static DB_decoder_t plugin = {
.plugin.version_minor = 1,
.plugin.type = DB_PLUGIN_DECODER,
.plugin.name = "DUMB module player",
+ .plugin.descr = "module player based on DUMB library",
.plugin.author = "Alexey Yakovenko",
.plugin.email = "waker@users.sourceforge.net",
.plugin.website = "http://deadbeef.sf.net",
diff --git a/cgme.c b/cgme.c
index ba47f8f0..cf63a730 100644
--- a/cgme.c
+++ b/cgme.c
@@ -199,6 +199,7 @@ static DB_decoder_t plugin = {
.plugin.version_minor = 1,
.plugin.type = DB_PLUGIN_DECODER,
.plugin.name = "Game_Music_Emu decoder",
+ .plugin.descr = "chiptune music player based on GME",
.plugin.author = "Alexey Yakovenko",
.plugin.email = "waker@users.sourceforge.net",
.plugin.website = "http://deadbeef.sf.net",
diff --git a/conf.c b/conf.c
index 3af8f68e..70ceeae5 100644
--- a/conf.c
+++ b/conf.c
@@ -128,3 +128,16 @@ conf_set_str (const char *key, const char *val) {
conf_items = it;
}
+void
+conf_set_int (const char *key, int val) {
+ char s[10];
+ snprintf (s, sizeof (s), "%d", val);
+ conf_set_str (key, s);
+}
+
+void
+conf_set_float (const char *key, float val) {
+ char s[10];
+ snprintf (s, sizeof (s), "%0.7f", val);
+ conf_set_str (key, s);
+}
diff --git a/conf.h b/conf.h
index 3a6248eb..4c090ab3 100644
--- a/conf.h
+++ b/conf.h
@@ -41,6 +41,12 @@ conf_get_int (const char *key, int def);
void
conf_set_str (const char *key, const char *val);
+void
+conf_set_int (const char *key, int val);
+
+void
+conf_set_float (const char *key, float val);
+
DB_conf_item_t *
conf_find (const char *group, DB_conf_item_t *prev);
diff --git a/csid.cpp b/csid.cpp
index 4b250598..177f239e 100644
--- a/csid.cpp
+++ b/csid.cpp
@@ -60,7 +60,7 @@ static DB_decoder_t plugin = {
/* .plugin.version_minor = */1,
/* .inactive = */0,
/* .plugin.name = */"SID decoder",
- /* .plugin.descr = */"based on libsidplay2",
+ /* .plugin.descr = */"SID player based on libsidplay2",
/* .plugin.author = */"Alexey Yakovenko",
/* .plugin.email = */"waker@users.sourceforge.net",
/* .plugin.website = */"http://deadbeef.sf.net",
diff --git a/deadbeef.glade b/deadbeef.glade
index 76b40ba8..2386e3a0 100644
--- a/deadbeef.glade
+++ b/deadbeef.glade
@@ -56,7 +56,7 @@
<accelerator key="O" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image85">
+ <widget class="GtkImage" id="image99">
<property name="visible">True</property>
<property name="stock">gtk-open</property>
<property name="icon_size">1</property>
@@ -83,7 +83,7 @@
<signal name="activate" handler="on_add_files_activate" last_modification_time="Sat, 04 Jul 2009 13:04:01 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image86">
+ <widget class="GtkImage" id="image100">
<property name="visible">True</property>
<property name="stock">gtk-add</property>
<property name="icon_size">1</property>
@@ -104,7 +104,7 @@
<signal name="activate" handler="on_add_folders_activate" last_modification_time="Sun, 06 Sep 2009 17:51:40 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image87">
+ <widget class="GtkImage" id="image101">
<property name="visible">True</property>
<property name="stock">gtk-add</property>
<property name="icon_size">1</property>
@@ -125,7 +125,7 @@
<signal name="activate" handler="on_add_audio_cd_activate" last_modification_time="Sat, 10 Oct 2009 15:29:22 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image88">
+ <widget class="GtkImage" id="image102">
<property name="visible">True</property>
<property name="stock">gtk-add</property>
<property name="icon_size">1</property>
@@ -153,7 +153,7 @@
<accelerator key="Q" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image89">
+ <widget class="GtkImage" id="image103">
<property name="visible">True</property>
<property name="stock">gtk-quit</property>
<property name="icon_size">1</property>
@@ -187,7 +187,7 @@
<signal name="activate" handler="on_clear1_activate" last_modification_time="Sun, 06 Sep 2009 18:30:03 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image90">
+ <widget class="GtkImage" id="image104">
<property name="visible">True</property>
<property name="stock">gtk-clear</property>
<property name="icon_size">1</property>
@@ -228,7 +228,7 @@
<accelerator key="Delete" modifiers="0" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image91">
+ <widget class="GtkImage" id="image105">
<property name="visible">True</property>
<property name="stock">gtk-remove</property>
<property name="icon_size">1</property>
@@ -263,6 +263,21 @@
<accelerator key="F" modifiers="GDK_CONTROL_MASK" signal="activate"/>
</widget>
</child>
+
+ <child>
+ <widget class="GtkSeparatorMenuItem" id="separator5">
+ <property name="visible">True</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="preferences">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Preferences</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="on_preferences_activate" last_modification_time="Sat, 10 Oct 2009 15:50:29 GMT"/>
+ </widget>
+ </child>
</widget>
</child>
</widget>
@@ -434,7 +449,7 @@
<signal name="activate" handler="on_help1_activate" last_modification_time="Tue, 08 Sep 2009 17:32:06 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image92">
+ <widget class="GtkImage" id="image106">
<property name="visible">True</property>
<property name="stock">gtk-help</property>
<property name="icon_size">1</property>
@@ -1280,4 +1295,706 @@
</child>
</widget>
+<widget class="GtkWindow" id="prefwin">
+ <property name="width_request">642</property>
+ <property name="height_request">372</property>
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Preferences</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">True</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="urgency_hint">False</property>
+
+ <child>
+ <widget class="GtkNotebook" id="notebook2">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="show_tabs">True</property>
+ <property name="show_border">True</property>
+ <property name="tab_pos">GTK_POS_TOP</property>
+ <property name="scrollable">False</property>
+ <property name="enable_popup">False</property>
+
+ <child>
+ <widget class="GtkTable" id="table3">
+ <property name="border_width">3</property>
+ <property name="visible">True</property>
+ <property name="n_rows">5</property>
+ <property name="n_columns">2</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">0</property>
+ <property name="column_spacing">3</property>
+
+ <child>
+ <widget class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Soundcard</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkComboBoxEntry" id="pref_soundcard">
+ <property name="visible">True</property>
+ <property name="items" translatable="yes">default</property>
+ <property name="add_tearoffs">False</property>
+ <property name="has_frame">True</property>
+ <property name="focus_on_click">True</property>
+ <signal name="changed" handler="on_pref_soundcard_changed" last_modification_time="Sat, 10 Oct 2009 18:51:35 GMT"/>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Samplerate (Hz)</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="pref_samplerate">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes">48000</property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">●</property>
+ <property name="activates_default">False</property>
+ <signal name="changed" handler="on_pref_samplerate_changed" last_modification_time="Sat, 10 Oct 2009 18:51:41 GMT"/>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label6">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">SRC quality</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label8">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Replaygain mode</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label9">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Apply replaygain peak scale</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCheckButton" id="pref_replaygain_scale">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes"></property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ <signal name="clicked" handler="on_pref_replaygain_scale_clicked" last_modification_time="Sat, 10 Oct 2009 18:52:10 GMT"/>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="x_options">expand</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkComboBox" id="pref_src_quality">
+ <property name="visible">True</property>
+ <property name="items" translatable="yes">sinc_best_quality
+sinc_medium_quality
+sinc_fastest
+sinc_zero_order_hold
+linear</property>
+ <property name="add_tearoffs">False</property>
+ <property name="focus_on_click">True</property>
+ <signal name="changed" handler="on_pref_src_quality_changed" last_modification_time="Sat, 10 Oct 2009 19:02:36 GMT"/>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkComboBox" id="pref_replaygain_mode">
+ <property name="visible">True</property>
+ <property name="items" translatable="yes">Disable
+Track
+Album</property>
+ <property name="add_tearoffs">False</property>
+ <property name="focus_on_click">True</property>
+ <signal name="changed" handler="on_pref_replaygain_mode_changed" last_modification_time="Sat, 10 Oct 2009 19:22:23 GMT"/>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="Sound">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Sound</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkTable" id="table4">
+ <property name="border_width">3</property>
+ <property name="visible">True</property>
+ <property name="n_rows">1</property>
+ <property name="n_columns">2</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">0</property>
+ <property name="column_spacing">3</property>
+
+ <child>
+ <widget class="GtkLabel" id="label7">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Close minimizes to tray</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCheckButton" id="pref_close_send_to_tray">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes"></property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ <signal name="clicked" handler="on_pref_close_send_to_tray_clicked" last_modification_time="Sat, 10 Oct 2009 18:52:15 GMT"/>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">expand</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">GUI</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHPaned" id="hpaned1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow2">
+ <property name="width_request">280</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTreeView" id="pref_pluginlist">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">True</property>
+ <property name="rules_hint">False</property>
+ <property name="reorderable">False</property>
+ <property name="enable_search">True</property>
+ <property name="fixed_height_mode">False</property>
+ <property name="hover_selection">False</property>
+ <property name="hover_expand">False</property>
+ <signal name="cursor_changed" handler="on_pref_pluginlist_cursor_changed" last_modification_time="Sat, 10 Oct 2009 19:54:17 GMT"/>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="shrink">True</property>
+ <property name="resize">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkTable" id="table5">
+ <property name="width_request">400</property>
+ <property name="visible">True</property>
+ <property name="n_rows">5</property>
+ <property name="n_columns">2</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">0</property>
+ <property name="column_spacing">0</property>
+
+ <child>
+ <widget class="GtkLabel" id="label11">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Description</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label12">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Author(s)</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label13">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Email</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label14">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Website</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="pref_plugin_descr">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">False</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">●</property>
+ <property name="activates_default">False</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="pref_plugin_author">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">False</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">●</property>
+ <property name="activates_default">False</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="pref_plugin_email">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">False</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">●</property>
+ <property name="activates_default">False</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="pref_plugin_website">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">False</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">●</property>
+ <property name="activates_default">False</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="pref_plugin_configure">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Configure</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <signal name="clicked" handler="on_pref_plugin_configure_activate" last_modification_time="Sat, 10 Oct 2009 18:51:12 GMT"/>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="x_options"></property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="shrink">True</property>
+ <property name="resize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Plugins</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
</glade-interface>
diff --git a/deadbeef.h b/deadbeef.h
index 29594658..6232236f 100644
--- a/deadbeef.h
+++ b/deadbeef.h
@@ -230,6 +230,15 @@ typedef struct {
int (*conf_get_int) (const char *key, int def);
void (*conf_set_str) (const char *key, const char *val);
DB_conf_item_t * (*conf_find) (const char *group, DB_conf_item_t *prev);
+ // exporting plugin conf options for gui
+ // all exported options are grouped by plugin, and will be available to user
+ // from gui
+// void (*export_plugin_option_string) (DB_plugin_t *plugin, const char *key);
+// void (*export_plugin_option_path) (DB_plugin_t *plugin, const char *key);
+// void (*export_plugin_option_check) (DB_plugin_t *plugin, const char *key);
+// void (*export_plugin_option_radio) (DB_plugin_t *plugin, const char *key);
+// void (*export_plugin_option_combo) (DB_plugin_t *plugin, const char *key);
+// void (*export_plugin_option_comboentry) (DB_plugin_t *plugin, const char *key);
} DB_functions_t;
// base plugin interface
diff --git a/interface.c b/interface.c
index ff385e22..f864a253 100644
--- a/interface.c
+++ b/interface.c
@@ -35,28 +35,30 @@ create_mainwin (void)
GtkWidget *menuitem1;
GtkWidget *menuitem1_menu;
GtkWidget *open;
- GtkWidget *image85;
+ GtkWidget *image99;
GtkWidget *separator2;
GtkWidget *add_files;
- GtkWidget *image86;
+ GtkWidget *image100;
GtkWidget *add_folders;
- GtkWidget *image87;
+ GtkWidget *image101;
GtkWidget *add_audio_cd;
- GtkWidget *image88;
+ GtkWidget *image102;
GtkWidget *separatormenuitem1;
GtkWidget *quit;
- GtkWidget *image89;
+ GtkWidget *image103;
GtkWidget *edit1;
GtkWidget *edit1_menu;
GtkWidget *clear1;
- GtkWidget *image90;
+ GtkWidget *image104;
GtkWidget *select_all1;
GtkWidget *selection1;
GtkWidget *selection1_menu;
GtkWidget *remove1;
- GtkWidget *image91;
+ GtkWidget *image105;
GtkWidget *crop1;
GtkWidget *find1;
+ GtkWidget *separator5;
+ GtkWidget *preferences;
GtkWidget *playlist1;
GtkWidget *playlist1_menu;
GtkWidget *playlist_load;
@@ -79,7 +81,7 @@ create_mainwin (void)
GtkWidget *menuitem4_menu;
GtkWidget *about1;
GtkWidget *help1;
- GtkWidget *image92;
+ GtkWidget *image106;
GtkWidget *hbox2;
GtkWidget *hbox3;
GtkWidget *stopbtn;
@@ -135,9 +137,9 @@ create_mainwin (void)
GDK_O, (GdkModifierType) GDK_CONTROL_MASK,
GTK_ACCEL_VISIBLE);
- image85 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU);
- gtk_widget_show (image85);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (open), image85);
+ image99 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU);
+ gtk_widget_show (image99);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (open), image99);
separator2 = gtk_separator_menu_item_new ();
gtk_widget_show (separator2);
@@ -148,25 +150,25 @@ create_mainwin (void)
gtk_widget_show (add_files);
gtk_container_add (GTK_CONTAINER (menuitem1_menu), add_files);
- image86 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU);
- gtk_widget_show (image86);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (add_files), image86);
+ image100 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU);
+ gtk_widget_show (image100);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (add_files), image100);
add_folders = gtk_image_menu_item_new_with_mnemonic ("Add folder(s)");
gtk_widget_show (add_folders);
gtk_container_add (GTK_CONTAINER (menuitem1_menu), add_folders);
- image87 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU);
- gtk_widget_show (image87);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (add_folders), image87);
+ image101 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU);
+ gtk_widget_show (image101);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (add_folders), image101);
add_audio_cd = gtk_image_menu_item_new_with_mnemonic ("Add Audio CD");
gtk_widget_show (add_audio_cd);
gtk_container_add (GTK_CONTAINER (menuitem1_menu), add_audio_cd);
- image88 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU);
- gtk_widget_show (image88);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (add_audio_cd), image88);
+ image102 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU);
+ gtk_widget_show (image102);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (add_audio_cd), image102);
separatormenuitem1 = gtk_separator_menu_item_new ();
gtk_widget_show (separatormenuitem1);
@@ -180,9 +182,9 @@ create_mainwin (void)
GDK_Q, (GdkModifierType) GDK_CONTROL_MASK,
GTK_ACCEL_VISIBLE);
- image89 = gtk_image_new_from_stock ("gtk-quit", GTK_ICON_SIZE_MENU);
- gtk_widget_show (image89);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (quit), image89);
+ image103 = gtk_image_new_from_stock ("gtk-quit", GTK_ICON_SIZE_MENU);
+ gtk_widget_show (image103);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (quit), image103);
edit1 = gtk_menu_item_new_with_mnemonic ("Edit");
gtk_widget_show (edit1);
@@ -195,9 +197,9 @@ create_mainwin (void)
gtk_widget_show (clear1);
gtk_container_add (GTK_CONTAINER (edit1_menu), clear1);
- image90 = gtk_image_new_from_stock ("gtk-clear", GTK_ICON_SIZE_MENU);
- gtk_widget_show (image90);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (clear1), image90);
+ image104 = gtk_image_new_from_stock ("gtk-clear", GTK_ICON_SIZE_MENU);
+ gtk_widget_show (image104);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (clear1), image104);
select_all1 = gtk_menu_item_new_with_mnemonic ("Select all");
gtk_widget_show (select_all1);
@@ -220,9 +222,9 @@ create_mainwin (void)
GDK_Delete, (GdkModifierType) 0,
GTK_ACCEL_VISIBLE);
- image91 = gtk_image_new_from_stock ("gtk-remove", GTK_ICON_SIZE_MENU);
- gtk_widget_show (image91);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (remove1), image91);
+ image105 = gtk_image_new_from_stock ("gtk-remove", GTK_ICON_SIZE_MENU);
+ gtk_widget_show (image105);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (remove1), image105);
crop1 = gtk_menu_item_new_with_mnemonic ("Crop");
gtk_widget_show (crop1);
@@ -235,6 +237,15 @@ create_mainwin (void)
GDK_F, (GdkModifierType) GDK_CONTROL_MASK,
GTK_ACCEL_VISIBLE);
+ separator5 = gtk_separator_menu_item_new ();
+ gtk_widget_show (separator5);
+ gtk_container_add (GTK_CONTAINER (edit1_menu), separator5);
+ gtk_widget_set_sensitive (separator5, FALSE);
+
+ preferences = gtk_menu_item_new_with_mnemonic ("Preferences");
+ gtk_widget_show (preferences);
+ gtk_container_add (GTK_CONTAINER (edit1_menu), preferences);
+
playlist1 = gtk_menu_item_new_with_mnemonic ("Playlist");
gtk_widget_show (playlist1);
gtk_container_add (GTK_CONTAINER (menubar1), playlist1);
@@ -324,9 +335,9 @@ create_mainwin (void)
gtk_widget_show (help1);
gtk_container_add (GTK_CONTAINER (menuitem4_menu), help1);
- image92 = gtk_image_new_from_stock ("gtk-help", GTK_ICON_SIZE_MENU);
- gtk_widget_show (image92);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (help1), image92);
+ image106 = gtk_image_new_from_stock ("gtk-help", GTK_ICON_SIZE_MENU);
+ gtk_widget_show (image106);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (help1), image106);
hbox2 = gtk_hbox_new (FALSE, 0);
gtk_widget_show (hbox2);
@@ -513,6 +524,9 @@ create_mainwin (void)
g_signal_connect ((gpointer) find1, "activate",
G_CALLBACK (on_find_activate),
NULL);
+ g_signal_connect ((gpointer) preferences, "activate",
+ G_CALLBACK (on_preferences_activate),
+ NULL);
g_signal_connect ((gpointer) playlist_load, "activate",
G_CALLBACK (on_playlist_load_activate),
NULL);
@@ -680,28 +694,30 @@ create_mainwin (void)
GLADE_HOOKUP_OBJECT (mainwin, menuitem1, "menuitem1");
GLADE_HOOKUP_OBJECT (mainwin, menuitem1_menu, "menuitem1_menu");
GLADE_HOOKUP_OBJECT (mainwin, open, "open");
- GLADE_HOOKUP_OBJECT (mainwin, image85, "image85");
+ GLADE_HOOKUP_OBJECT (mainwin, image99, "image99");
GLADE_HOOKUP_OBJECT (mainwin, separator2, "separator2");
GLADE_HOOKUP_OBJECT (mainwin, add_files, "add_files");
- GLADE_HOOKUP_OBJECT (mainwin, image86, "image86");
+ GLADE_HOOKUP_OBJECT (mainwin, image100, "image100");
GLADE_HOOKUP_OBJECT (mainwin, add_folders, "add_folders");
- GLADE_HOOKUP_OBJECT (mainwin, image87, "image87");
+ GLADE_HOOKUP_OBJECT (mainwin, image101, "image101");
GLADE_HOOKUP_OBJECT (mainwin, add_audio_cd, "add_audio_cd");
- GLADE_HOOKUP_OBJECT (mainwin, image88, "image88");
+ GLADE_HOOKUP_OBJECT (mainwin, image102, "image102");
GLADE_HOOKUP_OBJECT (mainwin, separatormenuitem1, "separatormenuitem1");
GLADE_HOOKUP_OBJECT (mainwin, quit, "quit");
- GLADE_HOOKUP_OBJECT (mainwin, image89, "image89");
+ GLADE_HOOKUP_OBJECT (mainwin, image103, "image103");
GLADE_HOOKUP_OBJECT (mainwin, edit1, "edit1");
GLADE_HOOKUP_OBJECT (mainwin, edit1_menu, "edit1_menu");
GLADE_HOOKUP_OBJECT (mainwin, clear1, "clear1");
- GLADE_HOOKUP_OBJECT (mainwin, image90, "image90");
+ GLADE_HOOKUP_OBJECT (mainwin, image104, "image104");
GLADE_HOOKUP_OBJECT (mainwin, select_all1, "select_all1");
GLADE_HOOKUP_OBJECT (mainwin, selection1, "selection1");
GLADE_HOOKUP_OBJECT (mainwin, selection1_menu, "selection1_menu");
GLADE_HOOKUP_OBJECT (mainwin, remove1, "remove1");
- GLADE_HOOKUP_OBJECT (mainwin, image91, "image91");
+ GLADE_HOOKUP_OBJECT (mainwin, image105, "image105");
GLADE_HOOKUP_OBJECT (mainwin, crop1, "crop1");
GLADE_HOOKUP_OBJECT (mainwin, find1, "find1");
+ GLADE_HOOKUP_OBJECT (mainwin, separator5, "separator5");
+ GLADE_HOOKUP_OBJECT (mainwin, preferences, "preferences");
GLADE_HOOKUP_OBJECT (mainwin, playlist1, "playlist1");
GLADE_HOOKUP_OBJECT (mainwin, playlist1_menu, "playlist1_menu");
GLADE_HOOKUP_OBJECT (mainwin, playlist_load, "playlist_load");
@@ -722,7 +738,7 @@ create_mainwin (void)
GLADE_HOOKUP_OBJECT (mainwin, menuitem4_menu, "menuitem4_menu");
GLADE_HOOKUP_OBJECT (mainwin, about1, "about1");
GLADE_HOOKUP_OBJECT (mainwin, help1, "help1");
- GLADE_HOOKUP_OBJECT (mainwin, image92, "image92");
+ GLADE_HOOKUP_OBJECT (mainwin, image106, "image106");
GLADE_HOOKUP_OBJECT (mainwin, hbox2, "hbox2");
GLADE_HOOKUP_OBJECT (mainwin, hbox3, "hbox3");
GLADE_HOOKUP_OBJECT (mainwin, stopbtn, "stopbtn");
@@ -1122,3 +1138,309 @@ create_helpwindow (void)
return helpwindow;
}
+GtkWidget*
+create_prefwin (void)
+{
+ GtkWidget *prefwin;
+ GtkWidget *notebook2;
+ GtkWidget *table3;
+ GtkWidget *label4;
+ GtkWidget *pref_soundcard;
+ GtkWidget *label5;
+ GtkWidget *pref_samplerate;
+ GtkWidget *label6;
+ GtkWidget *label8;
+ GtkWidget *label9;
+ GtkWidget *pref_replaygain_scale;
+ GtkWidget *pref_src_quality;
+ GtkWidget *pref_replaygain_mode;
+ GtkWidget *Sound;
+ GtkWidget *table4;
+ GtkWidget *label7;
+ GtkWidget *pref_close_send_to_tray;
+ GtkWidget *label2;
+ GtkWidget *hpaned1;
+ GtkWidget *scrolledwindow2;
+ GtkWidget *pref_pluginlist;
+ GtkWidget *table5;
+ GtkWidget *label11;
+ GtkWidget *label12;
+ GtkWidget *label13;
+ GtkWidget *label14;
+ GtkWidget *pref_plugin_descr;
+ GtkWidget *pref_plugin_author;
+ GtkWidget *pref_plugin_email;
+ GtkWidget *pref_plugin_website;
+ GtkWidget *pref_plugin_configure;
+ GtkWidget *label3;
+
+ prefwin = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_widget_set_size_request (prefwin, 642, 372);
+ gtk_window_set_title (GTK_WINDOW (prefwin), "Preferences");
+ gtk_window_set_modal (GTK_WINDOW (prefwin), TRUE);
+
+ notebook2 = gtk_notebook_new ();
+ gtk_widget_show (notebook2);
+ gtk_container_add (GTK_CONTAINER (prefwin), notebook2);
+
+ table3 = gtk_table_new (5, 2, FALSE);
+ gtk_widget_show (table3);
+ gtk_container_add (GTK_CONTAINER (notebook2), table3);
+ gtk_container_set_border_width (GTK_CONTAINER (table3), 3);
+ gtk_table_set_col_spacings (GTK_TABLE (table3), 3);
+
+ label4 = gtk_label_new ("Soundcard");
+ gtk_widget_show (label4);
+ gtk_table_attach (GTK_TABLE (table3), label4, 0, 1, 0, 1,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label4), 0, 0.5);
+
+ pref_soundcard = gtk_combo_box_entry_new_text ();
+ gtk_widget_show (pref_soundcard);
+ gtk_table_attach (GTK_TABLE (table3), pref_soundcard, 1, 2, 0, 1,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (GTK_FILL), 0, 0);
+ gtk_combo_box_append_text (GTK_COMBO_BOX (pref_soundcard), "default");
+
+ label5 = gtk_label_new ("Samplerate (Hz)");
+ gtk_widget_show (label5);
+ gtk_table_attach (GTK_TABLE (table3), label5, 0, 1, 1, 2,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label5), 0, 0.5);
+
+ pref_samplerate = gtk_entry_new ();
+ gtk_widget_show (pref_samplerate);
+ gtk_table_attach (GTK_TABLE (table3), pref_samplerate, 1, 2, 1, 2,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_entry_set_text (GTK_ENTRY (pref_samplerate), "48000");
+ gtk_entry_set_invisible_char (GTK_ENTRY (pref_samplerate), 9679);
+
+ label6 = gtk_label_new ("SRC quality");
+ gtk_widget_show (label6);
+ gtk_table_attach (GTK_TABLE (table3), label6, 0, 1, 2, 3,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label6), 0, 0.5);
+
+ label8 = gtk_label_new ("Replaygain mode");
+ gtk_widget_show (label8);
+ gtk_table_attach (GTK_TABLE (table3), label8, 0, 1, 3, 4,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label8), 0, 0.5);
+
+ label9 = gtk_label_new ("Apply replaygain peak scale");
+ gtk_widget_show (label9);
+ gtk_table_attach (GTK_TABLE (table3), label9, 0, 1, 4, 5,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label9), 0, 0.5);
+
+ pref_replaygain_scale = gtk_check_button_new_with_mnemonic ("");
+ gtk_widget_show (pref_replaygain_scale);
+ gtk_table_attach (GTK_TABLE (table3), pref_replaygain_scale, 1, 2, 4, 5,
+ (GtkAttachOptions) (GTK_EXPAND),
+ (GtkAttachOptions) (0), 0, 0);
+
+ pref_src_quality = gtk_combo_box_new_text ();
+ gtk_widget_show (pref_src_quality);
+ gtk_table_attach (GTK_TABLE (table3), pref_src_quality, 1, 2, 2, 3,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (GTK_FILL), 0, 0);
+ gtk_combo_box_append_text (GTK_COMBO_BOX (pref_src_quality), "sinc_best_quality");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (pref_src_quality), "sinc_medium_quality");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (pref_src_quality), "sinc_fastest");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (pref_src_quality), "sinc_zero_order_hold");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (pref_src_quality), "linear");
+
+ pref_replaygain_mode = gtk_combo_box_new_text ();
+ gtk_widget_show (pref_replaygain_mode);
+ gtk_table_attach (GTK_TABLE (table3), pref_replaygain_mode, 1, 2, 3, 4,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (GTK_FILL), 0, 0);
+ gtk_combo_box_append_text (GTK_COMBO_BOX (pref_replaygain_mode), "Disable");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (pref_replaygain_mode), "Track");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (pref_replaygain_mode), "Album");
+
+ Sound = gtk_label_new ("Sound");
+ gtk_widget_show (Sound);
+ gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 0), Sound);
+
+ table4 = gtk_table_new (1, 2, FALSE);
+ gtk_widget_show (table4);
+ gtk_container_add (GTK_CONTAINER (notebook2), table4);
+ gtk_container_set_border_width (GTK_CONTAINER (table4), 3);
+ gtk_table_set_col_spacings (GTK_TABLE (table4), 3);
+
+ label7 = gtk_label_new ("Close minimizes to tray");
+ gtk_widget_show (label7);
+ gtk_table_attach (GTK_TABLE (table4), label7, 0, 1, 0, 1,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label7), 0, 0.5);
+
+ pref_close_send_to_tray = gtk_check_button_new_with_mnemonic ("");
+ gtk_widget_show (pref_close_send_to_tray);
+ gtk_table_attach (GTK_TABLE (table4), pref_close_send_to_tray, 1, 2, 0, 1,
+ (GtkAttachOptions) (GTK_EXPAND),
+ (GtkAttachOptions) (0), 0, 0);
+
+ label2 = gtk_label_new ("GUI");
+ gtk_widget_show (label2);
+ gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 1), label2);
+
+ hpaned1 = gtk_hpaned_new ();
+ gtk_widget_show (hpaned1);
+ gtk_container_add (GTK_CONTAINER (notebook2), hpaned1);
+
+ scrolledwindow2 = gtk_scrolled_window_new (NULL, NULL);
+ gtk_widget_show (scrolledwindow2);
+ gtk_paned_pack1 (GTK_PANED (hpaned1), scrolledwindow2, FALSE, TRUE);
+ gtk_widget_set_size_request (scrolledwindow2, 280, -1);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow2), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+ gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow2), GTK_SHADOW_IN);
+
+ pref_pluginlist = gtk_tree_view_new ();
+ gtk_widget_show (pref_pluginlist);
+ gtk_container_add (GTK_CONTAINER (scrolledwindow2), pref_pluginlist);
+
+ table5 = gtk_table_new (5, 2, FALSE);
+ gtk_widget_show (table5);
+ gtk_paned_pack2 (GTK_PANED (hpaned1), table5, TRUE, TRUE);
+ gtk_widget_set_size_request (table5, 400, -1);
+
+ label11 = gtk_label_new ("Description");
+ gtk_widget_show (label11);
+ gtk_table_attach (GTK_TABLE (table5), label11, 0, 1, 0, 1,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label11), 0, 0.5);
+
+ label12 = gtk_label_new ("Author(s)");
+ gtk_widget_show (label12);
+ gtk_table_attach (GTK_TABLE (table5), label12, 0, 1, 1, 2,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label12), 0, 0.5);
+
+ label13 = gtk_label_new ("Email");
+ gtk_widget_show (label13);
+ gtk_table_attach (GTK_TABLE (table5), label13, 0, 1, 2, 3,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label13), 0, 0.5);
+
+ label14 = gtk_label_new ("Website");
+ gtk_widget_show (label14);
+ gtk_table_attach (GTK_TABLE (table5), label14, 0, 1, 3, 4,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label14), 0, 0.5);
+
+ pref_plugin_descr = gtk_entry_new ();
+ gtk_widget_show (pref_plugin_descr);
+ gtk_table_attach (GTK_TABLE (table5), pref_plugin_descr, 1, 2, 0, 1,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_editable_set_editable (GTK_EDITABLE (pref_plugin_descr), FALSE);
+ gtk_entry_set_invisible_char (GTK_ENTRY (pref_plugin_descr), 9679);
+
+ pref_plugin_author = gtk_entry_new ();
+ gtk_widget_show (pref_plugin_author);
+ gtk_table_attach (GTK_TABLE (table5), pref_plugin_author, 1, 2, 1, 2,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_editable_set_editable (GTK_EDITABLE (pref_plugin_author), FALSE);
+ gtk_entry_set_invisible_char (GTK_ENTRY (pref_plugin_author), 9679);
+
+ pref_plugin_email = gtk_entry_new ();
+ gtk_widget_show (pref_plugin_email);
+ gtk_table_attach (GTK_TABLE (table5), pref_plugin_email, 1, 2, 2, 3,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_editable_set_editable (GTK_EDITABLE (pref_plugin_email), FALSE);
+ gtk_entry_set_invisible_char (GTK_ENTRY (pref_plugin_email), 9679);
+
+ pref_plugin_website = gtk_entry_new ();
+ gtk_widget_show (pref_plugin_website);
+ gtk_table_attach (GTK_TABLE (table5), pref_plugin_website, 1, 2, 3, 4,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_editable_set_editable (GTK_EDITABLE (pref_plugin_website), FALSE);
+ gtk_entry_set_invisible_char (GTK_ENTRY (pref_plugin_website), 9679);
+
+ pref_plugin_configure = gtk_button_new_with_mnemonic ("Configure");
+ gtk_widget_show (pref_plugin_configure);
+ gtk_table_attach (GTK_TABLE (table5), pref_plugin_configure, 1, 2, 4, 5,
+ (GtkAttachOptions) (0),
+ (GtkAttachOptions) (0), 0, 0);
+
+ label3 = gtk_label_new ("Plugins");
+ gtk_widget_show (label3);
+ gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 2), label3);
+
+ g_signal_connect ((gpointer) pref_soundcard, "changed",
+ G_CALLBACK (on_pref_soundcard_changed),
+ NULL);
+ g_signal_connect ((gpointer) pref_samplerate, "changed",
+ G_CALLBACK (on_pref_samplerate_changed),
+ NULL);
+ g_signal_connect ((gpointer) pref_replaygain_scale, "clicked",
+ G_CALLBACK (on_pref_replaygain_scale_clicked),
+ NULL);
+ g_signal_connect ((gpointer) pref_src_quality, "changed",
+ G_CALLBACK (on_pref_src_quality_changed),
+ NULL);
+ g_signal_connect ((gpointer) pref_replaygain_mode, "changed",
+ G_CALLBACK (on_pref_replaygain_mode_changed),
+ NULL);
+ g_signal_connect ((gpointer) pref_close_send_to_tray, "clicked",
+ G_CALLBACK (on_pref_close_send_to_tray_clicked),
+ NULL);
+ g_signal_connect ((gpointer) pref_pluginlist, "cursor_changed",
+ G_CALLBACK (on_pref_pluginlist_cursor_changed),
+ NULL);
+ g_signal_connect ((gpointer) pref_plugin_configure, "clicked",
+ G_CALLBACK (on_pref_plugin_configure_activate),
+ NULL);
+
+ /* Store pointers to all widgets, for use by lookup_widget(). */
+ GLADE_HOOKUP_OBJECT_NO_REF (prefwin, prefwin, "prefwin");
+ GLADE_HOOKUP_OBJECT (prefwin, notebook2, "notebook2");
+ GLADE_HOOKUP_OBJECT (prefwin, table3, "table3");
+ GLADE_HOOKUP_OBJECT (prefwin, label4, "label4");
+ GLADE_HOOKUP_OBJECT (prefwin, pref_soundcard, "pref_soundcard");
+ GLADE_HOOKUP_OBJECT (prefwin, label5, "label5");
+ GLADE_HOOKUP_OBJECT (prefwin, pref_samplerate, "pref_samplerate");
+ GLADE_HOOKUP_OBJECT (prefwin, label6, "label6");
+ GLADE_HOOKUP_OBJECT (prefwin, label8, "label8");
+ GLADE_HOOKUP_OBJECT (prefwin, label9, "label9");
+ GLADE_HOOKUP_OBJECT (prefwin, pref_replaygain_scale, "pref_replaygain_scale");
+ GLADE_HOOKUP_OBJECT (prefwin, pref_src_quality, "pref_src_quality");
+ GLADE_HOOKUP_OBJECT (prefwin, pref_replaygain_mode, "pref_replaygain_mode");
+ GLADE_HOOKUP_OBJECT (prefwin, Sound, "Sound");
+ GLADE_HOOKUP_OBJECT (prefwin, table4, "table4");
+ GLADE_HOOKUP_OBJECT (prefwin, label7, "label7");
+ GLADE_HOOKUP_OBJECT (prefwin, pref_close_send_to_tray, "pref_close_send_to_tray");
+ GLADE_HOOKUP_OBJECT (prefwin, label2, "label2");
+ GLADE_HOOKUP_OBJECT (prefwin, hpaned1, "hpaned1");
+ GLADE_HOOKUP_OBJECT (prefwin, scrolledwindow2, "scrolledwindow2");
+ GLADE_HOOKUP_OBJECT (prefwin, pref_pluginlist, "pref_pluginlist");
+ GLADE_HOOKUP_OBJECT (prefwin, table5, "table5");
+ GLADE_HOOKUP_OBJECT (prefwin, label11, "label11");
+ GLADE_HOOKUP_OBJECT (prefwin, label12, "label12");
+ GLADE_HOOKUP_OBJECT (prefwin, label13, "label13");
+ GLADE_HOOKUP_OBJECT (prefwin, label14, "label14");
+ GLADE_HOOKUP_OBJECT (prefwin, pref_plugin_descr, "pref_plugin_descr");
+ GLADE_HOOKUP_OBJECT (prefwin, pref_plugin_author, "pref_plugin_author");
+ GLADE_HOOKUP_OBJECT (prefwin, pref_plugin_email, "pref_plugin_email");
+ GLADE_HOOKUP_OBJECT (prefwin, pref_plugin_website, "pref_plugin_website");
+ GLADE_HOOKUP_OBJECT (prefwin, pref_plugin_configure, "pref_plugin_configure");
+ GLADE_HOOKUP_OBJECT (prefwin, label3, "label3");
+
+ return prefwin;
+}
+
diff --git a/interface.h b/interface.h
index a6b5e661..23b18e11 100644
--- a/interface.h
+++ b/interface.h
@@ -7,3 +7,4 @@ GtkWidget* create_searchwin (void);
GtkWidget* create_traymenu (void);
GtkWidget* create_addprogress (void);
GtkWidget* create_helpwindow (void);
+GtkWidget* create_prefwin (void);
diff --git a/plugins.c b/plugins.c
index 103b5e87..1c182d5c 100644
--- a/plugins.c
+++ b/plugins.c
@@ -139,6 +139,9 @@ plug_volume_set_amp (float amp) {
volumebar_notify_changed ();
}
+#define MAX_PLUGINS 100
+DB_plugin_t *g_plugins[MAX_PLUGINS+1];
+
#define MAX_DECODER_PLUGINS 50
DB_decoder_t *g_decoder_plugins[MAX_DECODER_PLUGINS+1];
@@ -422,26 +425,27 @@ plug_load_all (void) {
#undef PLUG
// categorize plugins
+ int numplugins = 0;
int numdecoders = 0;
int numvfs = 0;
for (plugin_t *plug = plugins; plug; plug = plug->next) {
+ g_plugins[numplugins++] = plug->plugin;
if (plug->plugin->type == DB_PLUGIN_DECODER) {
fprintf (stderr, "found decoder plugin %s\n", plug->plugin->name);
if (numdecoders >= MAX_DECODER_PLUGINS) {
break;
}
- g_decoder_plugins[numdecoders] = (DB_decoder_t *)plug->plugin;
- numdecoders++;
+ g_decoder_plugins[numdecoders++] = (DB_decoder_t *)plug->plugin;
}
else if (plug->plugin->type == DB_PLUGIN_VFS) {
fprintf (stderr, "found vfs plugin %s\n", plug->plugin->name);
if (numvfs >= MAX_VFS_PLUGINS) {
break;
}
- g_vfs_plugins[numvfs] = (DB_vfs_t *)plug->plugin;
- numvfs++;
+ g_vfs_plugins[numvfs++] = (DB_vfs_t *)plug->plugin;
}
}
+ g_plugins[numplugins] = NULL;
g_decoder_plugins[numdecoders] = NULL;
g_vfs_plugins[numvfs] = NULL;
}
@@ -471,3 +475,7 @@ plug_get_vfs_list (void) {
return g_vfs_plugins;
}
+struct DB_plugin_s **
+plug_get_list (void) {
+ return g_plugins;
+}
diff --git a/plugins.h b/plugins.h
index 4d72bd8a..633bc503 100644
--- a/plugins.h
+++ b/plugins.h
@@ -70,6 +70,9 @@ plug_playback_get_pos (void);
void
plug_playback_set_pos (float pos);
+struct DB_plugin_s **
+plug_get_list (void);
+
struct DB_decoder_s **
plug_get_decoder_list (void);
diff --git a/plugins/cdda/cdda.c b/plugins/cdda/cdda.c
index 0d85e0b7..76b4662a 100644
--- a/plugins/cdda/cdda.c
+++ b/plugins/cdda/cdda.c
@@ -427,7 +427,8 @@ static DB_decoder_t plugin = {
.plugin.version_major = 0,
.plugin.version_minor = 1,
.plugin.type = DB_PLUGIN_DECODER,
- .plugin.name = "Audio CD Player",
+ .plugin.name = "Audio CD player",
+ .plugin.descr = "using libcdio, includes .nrg image support",
.plugin.author = "Viktor Semykin",
.plugin.email = "thesame.ml@gmail.com",
.plugin.website = "http://deadbeef.sf.net",
diff --git a/plugins/faad2/faad2.c b/plugins/faad2/faad2.c
index 60176969..7c1d8cac 100644
--- a/plugins/faad2/faad2.c
+++ b/plugins/faad2/faad2.c
@@ -248,6 +248,7 @@ static DB_decoder_t plugin = {
.plugin.version_minor = 1,
.plugin.type = DB_PLUGIN_DECODER,
.plugin.name = "faad2 AAC decoder",
+ .plugin.descr = "aac/mp4 player",
.plugin.author = "Alexey Yakovenko",
.plugin.email = "waker@users.sourceforge.net",
.plugin.website = "http://deadbeef.sf.net",
diff --git a/plugins/ffap/ffap.c b/plugins/ffap/ffap.c
index 735630bf..fd96fc9f 100644
--- a/plugins/ffap/ffap.c
+++ b/plugins/ffap/ffap.c
@@ -1760,8 +1760,8 @@ static DB_decoder_t plugin = {
.plugin.version_major = 0,
.plugin.version_minor = 1,
.plugin.type = DB_PLUGIN_DECODER,
- .plugin.name = "FFAP Monkey's Audio decoder",
- .plugin.descr = "Based on ffmpeg apedec by Benjamin Zores and rockbox libdemac by Dave Chapman",
+ .plugin.name = "Monkey's Audio (APE) decoder",
+ .plugin.descr = "Derived from ffmpeg code by Benjamin Zores and rockbox code by Dave Chapman",
.plugin.author = "Alexey Yakovenko",
.plugin.email = "waker@users.sourceforge.net",
.plugin.website = "http://deadbeef.sf.net",
diff --git a/plugins/flac/flac.c b/plugins/flac/flac.c
index ced92d45..4a6b9f9c 100644
--- a/plugins/flac/flac.c
+++ b/plugins/flac/flac.c
@@ -555,6 +555,7 @@ static DB_decoder_t plugin = {
.plugin.version_minor = 1,
.plugin.type = DB_PLUGIN_DECODER,
.plugin.name = "FLAC decoder",
+ .plugin.descr = "FLAC decoder using libFLAC",
.plugin.author = "Alexey Yakovenko",
.plugin.email = "waker@users.sourceforge.net",
.plugin.website = "http://deadbeef.sf.net",
diff --git a/plugins/hotkeys/hotkeys.c b/plugins/hotkeys/hotkeys.c
index 5cde339c..476564d9 100644
--- a/plugins/hotkeys/hotkeys.c
+++ b/plugins/hotkeys/hotkeys.c
@@ -332,8 +332,8 @@ hotkeys_stop (void) {
static DB_misc_t plugin = {
DB_PLUGIN_SET_API_VERSION
.plugin.type = DB_PLUGIN_MISC,
- .plugin.name = "Global Hotkeys",
- .plugin.descr = "Allows to control player using xlib global hotkeys",
+ .plugin.name = "Global hotkeys support",
+ .plugin.descr = "Allows to control player with global hotkeys",
.plugin.author = "Viktor Semykin",
.plugin.email = "thesame.ml@gmail.com",
.plugin.website = "http://deadbeef.sf.net",
diff --git a/plugins/mpgmad/mpgmad.c b/plugins/mpgmad/mpgmad.c
index 8005e5d0..d25f59d4 100644
--- a/plugins/mpgmad/mpgmad.c
+++ b/plugins/mpgmad/mpgmad.c
@@ -1015,8 +1015,8 @@ static DB_decoder_t plugin = {
.plugin.version_major = 0,
.plugin.version_minor = 1,
.plugin.type = DB_PLUGIN_DECODER,
- .plugin.name = "MPEG v1,2 layer1,2,3 decoder",
- .plugin.descr = "based on libmad",
+ .plugin.name = "MPEG decoder",
+ .plugin.descr = "MPEG v1/2 layer1/2/3 decoder based on libmad",
.plugin.author = "Alexey Yakovenko",
.plugin.email = "waker@users.sourceforge.net",
.plugin.website = "http://deadbeef.sf.net",
diff --git a/plugins/sndfile/sndfile.c b/plugins/sndfile/sndfile.c
index 9281890a..545d41b8 100644
--- a/plugins/sndfile/sndfile.c
+++ b/plugins/sndfile/sndfile.c
@@ -148,7 +148,7 @@ sndfile_insert (DB_playItem_t *after, const char *fname) {
return after;
}
-static const char * exts[] = { "wav", NULL };
+static const char * exts[] = { "wav", "aif", "aiff", "snd", "au", "paf", "svx", "nist", "voc", "ircam", "w64", "mat4", "mat5", "pvf", "xi", "htk", "sds", "avr", "wavex", "sd2", "caf", "wve", NULL };
static const char *filetypes[] = { "wav", NULL };
// define plugin interface
@@ -157,7 +157,8 @@ static DB_decoder_t plugin = {
.plugin.version_major = 0,
.plugin.version_minor = 1,
.plugin.type = DB_PLUGIN_DECODER,
- .plugin.name = "SNDFILE decoder",
+ .plugin.name = "pcm player",
+ .plugin.descr = "wav/aiff player using libsndfile",
.plugin.author = "Alexey Yakovenko",
.plugin.email = "waker@users.sourceforge.net",
.plugin.website = "http://deadbeef.sf.net",
diff --git a/plugins/vfs_curl/vfs_curl.c b/plugins/vfs_curl/vfs_curl.c
index e1105b1d..14a748fc 100644
--- a/plugins/vfs_curl/vfs_curl.c
+++ b/plugins/vfs_curl/vfs_curl.c
@@ -380,7 +380,8 @@ static DB_vfs_t plugin = {
.plugin.version_major = 0,
.plugin.version_minor = 1,
.plugin.type = DB_PLUGIN_VFS,
- .plugin.name = "CURL VFS (streaming over http)",
+ .plugin.name = "cURL vfs",
+ .plugin.descr = "http and ftp streaming module using libcurl",
.plugin.author = "Alexey Yakovenko",
.plugin.email = "waker@users.sourceforge.net",
.plugin.website = "http://deadbeef.sf.net",
diff --git a/plugins/vorbis/vorbis.c b/plugins/vorbis/vorbis.c
index 78496458..d3de500f 100644
--- a/plugins/vorbis/vorbis.c
+++ b/plugins/vorbis/vorbis.c
@@ -380,6 +380,7 @@ static DB_decoder_t plugin = {
.plugin.version_minor = 1,
.plugin.type = DB_PLUGIN_DECODER,
.plugin.name = "OggVorbis decoder",
+ .plugin.descr = "OggVorbis decoder using standard xiph.org libraries",
.plugin.author = "Alexey Yakovenko",
.plugin.email = "waker@users.sourceforge.net",
.plugin.website = "http://deadbeef.sf.net",
diff --git a/plugins/wavpack/wavpack.c b/plugins/wavpack/wavpack.c
index 349d2eac..51608d64 100644
--- a/plugins/wavpack/wavpack.c
+++ b/plugins/wavpack/wavpack.c
@@ -259,6 +259,7 @@ static DB_decoder_t plugin = {
.plugin.version_minor = 1,
.plugin.type = DB_PLUGIN_DECODER,
.plugin.name = "WavPack decoder",
+ .plugin.descr = ".wv player using libwavpack",
.plugin.author = "Alexey Yakovenko",
.plugin.email = "waker@users.sourceforge.net",
.plugin.website = "http://deadbeef.sf.net",
diff --git a/streamer.c b/streamer.c
index 2e27a001..e2fd369a 100644
--- a/streamer.c
+++ b/streamer.c
@@ -40,6 +40,8 @@ static SRC_STATE *src;
static SRC_DATA srcdata;
static int codecleft;
+static int conf_replaygain_mode = 0;
+static int conf_replaygain_scale = 1;
// that's buffer for resampling.
// our worst case is 192KHz downsampling to 22050Hz with 2048 sample output buffer
#define INPUT_BUFFER_SIZE (2048*192000/22050*8)
@@ -401,6 +403,8 @@ streamer_init (void) {
// src = src_new (SRC_SINC_BEST_QUALITY, 2, NULL);
// src = src_new (SRC_LINEAR, 2, NULL);
src = src_new (conf_get_int ("src_quality", 2), 2, NULL);
+ conf_replaygain_mode = conf_get_int ("replaygain_mode", 0);
+ conf_replaygain_scale = conf_get_int ("replaygain_scale", 1);
if (!src) {
return -1;
}
@@ -430,9 +434,6 @@ int replaygain_scale = 1;
static void
apply_replay_gain_int16 (playItem_t *it, char *bytes, int size) {
- int conf_replaygain_mode = conf_get_int ("replaygain_mode", 0);
- int conf_replaygain_scale = conf_get_int ("replaygain_scale", 1);
-
if (!replaygain || !conf_replaygain_mode) {
return;
}
@@ -475,8 +476,6 @@ apply_replay_gain_int16 (playItem_t *it, char *bytes, int size) {
static void
apply_replay_gain_float32 (playItem_t *it, char *bytes, int size) {
- int conf_replaygain_mode = conf_get_int ("replaygain_mode", 0);
- int conf_replaygain_scale = conf_get_int ("replaygain_scale", 1);
if (!replaygain || !conf_replaygain_mode) {
return;
}
diff --git a/vfs_stdio.c b/vfs_stdio.c
index 903f2af0..0f7abf69 100644
--- a/vfs_stdio.c
+++ b/vfs_stdio.c
@@ -94,7 +94,8 @@ static DB_vfs_t plugin = {
.plugin.version_major = 0,
.plugin.version_minor = 1,
.plugin.type = DB_PLUGIN_VFS,
- .plugin.name = "STDIO VFS",
+ .plugin.name = "stdio vfs",
+ .plugin.descr = "Standard IO plugin",
.plugin.author = "Alexey Yakovenko",
.plugin.email = "waker@users.sourceforge.net",
.plugin.website = "http://deadbeef.sf.net",