Mercurial > audlegacy
changeset 3445:d3fd60f14bb7 trunk
branch merge
author | mf0102 <0102@gmx.at> |
---|---|
date | Fri, 07 Sep 2007 16:59:08 +0200 |
parents | e426b3e5fdb4 (current diff) 709cd9c2fa8f (diff) |
children | 9049fae12a72 6dff6e58ce71 |
files | |
diffstat | 12 files changed, 19 insertions(+), 198 deletions(-) [+] |
line wrap: on
line diff
--- a/src/audacious/discovery.c Fri Sep 07 16:58:35 2007 +0200 +++ b/src/audacious/discovery.c Fri Sep 07 16:59:08 2007 +0200 @@ -53,29 +53,6 @@ return DISCOVERY_PLUGIN(node->data); } - -void -discovery_about(gint i) -{ - DiscoveryPlugin *plugin = get_discovery_plugin(i); - - if (!plugin || !plugin->about) - return; - - plugin->about(); -} - -void -discovery_configure(gint i) -{ - DiscoveryPlugin *plugin = get_discovery_plugin(i); - - if (!plugin || !plugin->configure) - return; - - plugin->configure(); -} - void enable_discovery_plugin(gint i, gboolean enable) {
--- a/src/audacious/discovery.h Fri Sep 07 16:58:35 2007 +0200 +++ b/src/audacious/discovery.h Fri Sep 07 16:59:08 2007 +0200 @@ -44,8 +44,6 @@ GList *get_discovery_list(void); GList *get_discovery_enabled_list(void); void enable_discovery_plugin(gint i, gboolean enable); -void discovery_about(gint i); -void discovery_configure(gint i); gboolean discovery_enabled(gint i); gchar *discovery_stringify_enabled_list(void); void discovery_enable_from_stringified_list(const gchar * list);
--- a/src/audacious/effect.c Fri Sep 07 16:58:35 2007 +0200 +++ b/src/audacious/effect.c Fri Sep 07 16:59:08 2007 +0200 @@ -105,31 +105,6 @@ } void -effect_about(int i) -{ - EffectPlugin *effect; - GList *node = g_list_nth(ep_data.effect_list, i); - if (node) { - effect = node->data; - if (effect && effect->about) - effect->about(); - } -} - -void -effect_configure(int i) -{ - GList *node = g_list_nth(ep_data.effect_list, i); - EffectPlugin *effect; - if (node) { - effect = node->data; - if (effect && effect->configure) - effect->configure(); - } -} - - -void enable_effect_plugin(int i, gboolean enable) { GList *node = g_list_nth(ep_data.effect_list, i);
--- a/src/audacious/effect.h Fri Sep 07 16:58:35 2007 +0200 +++ b/src/audacious/effect.h Fri Sep 07 16:59:08 2007 +0200 @@ -36,8 +36,6 @@ }; GList *get_effect_list(void); -void effect_about(gint i); -void effect_configure(gint i); GList *get_effect_enabled_list(void); void enable_effect_plugin(gint i, gboolean enable); gboolean effect_enabled(gint i);
--- a/src/audacious/general.c Fri Sep 07 16:58:35 2007 +0200 +++ b/src/audacious/general.c Fri Sep 07 16:59:08 2007 +0200 @@ -53,29 +53,6 @@ return GENERAL_PLUGIN(node->data); } - -void -general_about(gint i) -{ - GeneralPlugin *plugin = get_general_plugin(i); - - if (!plugin || !plugin->about) - return; - - plugin->about(); -} - -void -general_configure(gint i) -{ - GeneralPlugin *plugin = get_general_plugin(i); - - if (!plugin || !plugin->configure) - return; - - plugin->configure(); -} - void enable_general_plugin(gint i, gboolean enable) {
--- a/src/audacious/general.h Fri Sep 07 16:58:35 2007 +0200 +++ b/src/audacious/general.h Fri Sep 07 16:59:08 2007 +0200 @@ -35,8 +35,6 @@ GList *get_general_list(void); GList *get_general_enabled_list(void); void enable_general_plugin(gint i, gboolean enable); -void general_about(gint i); -void general_configure(gint i); gboolean general_enabled(gint i); gchar *general_stringify_enabled_list(void); void general_enable_from_stringified_list(const gchar * list);
--- a/src/audacious/input.c Fri Sep 07 16:58:35 2007 +0200 +++ b/src/audacious/input.c Fri Sep 07 16:59:08 2007 +0200 @@ -861,23 +861,3 @@ ui_skinned_playstatus_set_buffering(mainwin_playstatus, ip_data.buffering); } - -void -input_about(gint index) -{ - InputPlugin *ip; - - ip = g_list_nth(ip_data.input_list, index)->data; - if (ip && ip->about) - ip->about(); -} - -void -input_configure(gint index) -{ - InputPlugin *ip; - - ip = g_list_nth(ip_data.input_list, index)->data; - if (ip && ip->configure) - ip->configure(); -}
--- a/src/audacious/input.h Fri Sep 07 16:58:35 2007 +0200 +++ b/src/audacious/input.h Fri Sep 07 16:59:08 2007 +0200 @@ -65,9 +65,6 @@ guchar *input_get_vis(gint time); void input_update_vis_plugin(gint time); -void input_about(gint index); -void input_configure(gint index); - void input_add_vis_pcm(gint time, AFormat fmt, gint nch, gint length, gpointer ptr); InputVisType input_get_vis_type();
--- a/src/audacious/main.c Fri Sep 07 16:58:35 2007 +0200 +++ b/src/audacious/main.c Fri Sep 07 16:59:08 2007 +0200 @@ -207,7 +207,7 @@ TRUE, /* show seperators in pl */ NULL, /* chardet_detector */ NULL, /* chardet_fallback */ - 3000, /* audio buffer size */ + 500, /* audio buffer size */ FALSE, /* whether or not to postpone format detection on initial add */ TRUE, /* show filepopup for tuple */ NULL, /* words identifying covers */
--- a/src/audacious/ui_preferences.c Fri Sep 07 16:58:35 2007 +0200 +++ b/src/audacious/ui_preferences.c Fri Sep 07 16:59:08 2007 +0200 @@ -875,27 +875,16 @@ GtkTreeSelection *selection; GtkTreeModel *model; GtkTreeIter iter; - gint id; + Plugin *plugin = NULL; selection = gtk_tree_view_get_selection(treeview); if (!gtk_tree_selection_get_selected(selection, &model, &iter)) return; - gtk_tree_model_get(model, &iter, PLUGIN_VIEW_COL_ID, &id, -1); + gtk_tree_model_get(model, &iter, PLUGIN_VIEW_COL_PLUGIN_PTR, &plugin, -1); - switch(GPOINTER_TO_INT(g_object_get_data(G_OBJECT(treeview), "plugin_type"))) { - case PLUGIN_VIEW_TYPE_INPUT: - input_configure(id); - break; - case PLUGIN_VIEW_TYPE_GENERAL: - general_configure(id); - break; - case PLUGIN_VIEW_TYPE_VIS: - vis_configure(id); - break; - case PLUGIN_VIEW_TYPE_EFFECT: - effect_configure(id); - break; - } + g_return_if_fail(plugin != NULL); + + plugin->configure(); } static void @@ -904,27 +893,16 @@ GtkTreeSelection *selection; GtkTreeModel *model; GtkTreeIter iter; - gint id; + Plugin *plugin = NULL; selection = gtk_tree_view_get_selection(treeview); if (!gtk_tree_selection_get_selected(selection, &model, &iter)) return; - gtk_tree_model_get(model, &iter, PLUGIN_VIEW_COL_ID, &id, -1); + gtk_tree_model_get(model, &iter, PLUGIN_VIEW_COL_PLUGIN_PTR, &plugin, -1); - switch(GPOINTER_TO_INT(g_object_get_data(G_OBJECT(treeview), "plugin_type"))) { - case PLUGIN_VIEW_TYPE_INPUT: - input_about(id); - break; - case PLUGIN_VIEW_TYPE_GENERAL: - general_about(id); - break; - case PLUGIN_VIEW_TYPE_VIS: - vis_about(id); - break; - case PLUGIN_VIEW_TYPE_EFFECT: - effect_about(id); - break; - } + g_return_if_fail(plugin != NULL); + + plugin->about(); } static void @@ -933,36 +911,17 @@ GtkTreeSelection *selection; GtkTreeModel *model; GtkTreeIter iter; - - GList *plist; - gint id; + Plugin *plugin = NULL; selection = gtk_tree_view_get_selection(treeview); if (!gtk_tree_selection_get_selected(selection, &model, &iter)) return; - gtk_tree_model_get(model, &iter, PLUGIN_VIEW_COL_ID, &id, -1); + gtk_tree_model_get(model, &iter, PLUGIN_VIEW_COL_PLUGIN_PTR, &plugin, -1); - switch(GPOINTER_TO_INT(g_object_get_data(G_OBJECT(treeview), "plugin_type"))) { - case PLUGIN_VIEW_TYPE_INPUT: - plist = get_input_list(); - break; - case PLUGIN_VIEW_TYPE_GENERAL: - plist = get_general_list(); - break; - case PLUGIN_VIEW_TYPE_VIS: - plist = get_vis_list(); - break; - case PLUGIN_VIEW_TYPE_EFFECT: - plist = get_effect_list(); - break; - default: - return; - } - plist = g_list_nth(plist, id); + g_return_if_fail(plugin != NULL); - gtk_widget_set_sensitive(GTK_WIDGET(button), - INPUT_PLUGIN(plist->data)->configure != NULL); + gtk_widget_set_sensitive(GTK_WIDGET(button), plugin->configure != NULL); } static void @@ -971,35 +930,17 @@ GtkTreeSelection *selection; GtkTreeModel *model; GtkTreeIter iter; - GList *plist; - gint id; + Plugin *plugin = NULL; selection = gtk_tree_view_get_selection(treeview); if (!gtk_tree_selection_get_selected(selection, &model, &iter)) return; - gtk_tree_model_get(model, &iter, PLUGIN_VIEW_COL_ID, &id, -1); + gtk_tree_model_get(model, &iter, PLUGIN_VIEW_COL_PLUGIN_PTR, &plugin, -1); - switch(GPOINTER_TO_INT(g_object_get_data(G_OBJECT(treeview), "plugin_type"))) { - case PLUGIN_VIEW_TYPE_INPUT: - plist = get_input_list(); - break; - case PLUGIN_VIEW_TYPE_GENERAL: - plist = get_general_list(); - break; - case PLUGIN_VIEW_TYPE_VIS: - plist = get_vis_list(); - break; - case PLUGIN_VIEW_TYPE_EFFECT: - plist = get_effect_list(); - break; - default: - return; - } - plist = g_list_nth(plist, id); + g_return_if_fail(plugin != NULL); - gtk_widget_set_sensitive(GTK_WIDGET(button), - INPUT_PLUGIN(plist->data)->about != NULL); + gtk_widget_set_sensitive(GTK_WIDGET(button), plugin->about != NULL); }
--- a/src/audacious/visualization.c Fri Sep 07 16:58:35 2007 +0200 +++ b/src/audacious/visualization.c Fri Sep 07 16:59:08 2007 +0200 @@ -63,24 +63,6 @@ } void -vis_about(gint i) -{ - GList *node = g_list_nth(vp_data.vis_list, i); - - if (node && node->data && VIS_PLUGIN(node->data)->about) - VIS_PLUGIN(node->data)->about(); -} - -void -vis_configure(gint i) -{ - GList *node = g_list_nth(vp_data.vis_list, i); - - if (node && node->data && VIS_PLUGIN(node->data)->configure) - VIS_PLUGIN(node->data)->configure(); -} - -void vis_playback_start(void) { GList *node;
--- a/src/audacious/visualization.h Fri Sep 07 16:58:35 2007 +0200 +++ b/src/audacious/visualization.h Fri Sep 07 16:59:08 2007 +0200 @@ -41,8 +41,6 @@ GList *get_vis_enabled_list(void); void enable_vis_plugin(gint i, gboolean enable); void vis_disable_plugin(VisPlugin * vp); -void vis_about(gint i); -void vis_configure(gint i); void vis_playback_start(void); void vis_playback_stop(void); gboolean vis_enabled(gint i);