diff options
author | waker <wakeroid@gmail.com> | 2010-12-28 22:18:58 +0100 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2010-12-28 22:18:58 +0100 |
commit | e1bec0e410440034be6457e3dafe490e07683f55 (patch) | |
tree | b2c1aa2be9827ec840e3f08abe523c609410d282 /plugins/gtkui | |
parent | fb04911887b9003d5fc99694cf556f32fab7f125 (diff) |
nuked old plugin activate/deactivate/nostop code;
improved plugin start and connect code
Diffstat (limited to 'plugins/gtkui')
-rw-r--r-- | plugins/gtkui/gtkui.c | 6 | ||||
-rw-r--r-- | plugins/gtkui/prefwin.c | 21 |
2 files changed, 4 insertions, 23 deletions
diff --git a/plugins/gtkui/gtkui.c b/plugins/gtkui/gtkui.c index e8f41e64..abd6a720 100644 --- a/plugins/gtkui/gtkui.c +++ b/plugins/gtkui/gtkui.c @@ -1164,11 +1164,13 @@ gtkui_start (void) { return 0; } +static DB_plugin_t *supereq_plugin; + gboolean gtkui_connect_cb (void *none) { // equalizer GtkWidget *eq_mi = lookup_widget (mainwin, "view_eq"); - if (!deadbeef->plug_get_for_id ("supereq")) { + if (!supereq_plugin) { gtk_widget_hide (GTK_WIDGET (eq_mi)); } else { @@ -1196,6 +1198,7 @@ gtkui_connect_cb (void *none) { static int gtkui_connect (void) { + supereq_plugin = deadbeef->plug_get_for_id ("supereq"); // need to do it in gtk thread g_idle_add (gtkui_connect_cb, NULL); @@ -1262,7 +1265,6 @@ static ddb_gtkui_t plugin = { .gui.plugin.api_vminor = DB_API_VERSION_MINOR, .gui.plugin.version_major = 1, .gui.plugin.version_minor = 0, - .gui.plugin.nostop = 1, .gui.plugin.type = DB_PLUGIN_MISC, .gui.plugin.id = "gtkui", .gui.plugin.name = "Standard GTK2 user interface", diff --git a/plugins/gtkui/prefwin.c b/plugins/gtkui/prefwin.c index 163459d9..38167165 100644 --- a/plugins/gtkui/prefwin.c +++ b/plugins/gtkui/prefwin.c @@ -67,27 +67,6 @@ gtk_enum_sound_callback (const char *name, const char *desc, void *userdata) { } void -on_plugin_active_toggled (GtkCellRendererToggle *cell_renderer, gchar *path, GtkTreeModel *model) { - GtkTreePath *p = gtk_tree_path_new_from_string (path); - if (p) { - int *indices = gtk_tree_path_get_indices (p); - //gtk_tree_path_free (p); // wtf?? gtk crashes on this - if (indices) { - DB_plugin_t **plugins = deadbeef->plug_get_list (); - DB_plugin_t *plug = plugins[*indices]; - gboolean state; - GtkTreeIter iter; - gtk_tree_model_get_iter (model, &iter, p); - gtk_tree_model_get (model, &iter, 0, &state, -1); - if (!deadbeef->plug_activate (plug, !state)) { - gtk_list_store_set (GTK_LIST_STORE (model), &iter, 0, !state, -1); - } - } - g_free (indices); - } -} - -void preferences_fill_soundcards (void) { if (!prefwin) { return; |