summaryrefslogtreecommitdiff
path: root/plugins/pltbrowser
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2013-08-11 16:24:37 +0200
committerGravatar waker <wakeroid@gmail.com>2013-08-11 16:24:37 +0200
commit748ca83990821a667093fcef30b9c7d1b28589b9 (patch)
treead971f0b128a6fffabc8ed5e98152ec704c5307d /plugins/pltbrowser
parentb5c822c7afe8433cc5e0b14bfc1de21236849680 (diff)
gtkui major version bump and related fixes
Diffstat (limited to 'plugins/pltbrowser')
-rw-r--r--plugins/pltbrowser/pltbrowser.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/plugins/pltbrowser/pltbrowser.c b/plugins/pltbrowser/pltbrowser.c
index b7e16ba6..8d4febfc 100644
--- a/plugins/pltbrowser/pltbrowser.c
+++ b/plugins/pltbrowser/pltbrowser.c
@@ -165,31 +165,23 @@ w_pltbrowser_create (void) {
return (ddb_gtkui_widget_t *)w;
}
-static gboolean
-pltbrowser_connect_cb (void *ctx) {
- return FALSE;
-}
-
static int
pltbrowser_connect (void) {
-#if GTK_CHECK_VERSION(3,0,0)
- gtkui_plugin = (ddb_gtkui_t *)deadbeef->plug_get_for_id ("gtkui3");
-#else
- gtkui_plugin = (ddb_gtkui_t *)deadbeef->plug_get_for_id ("gtkui");
-#endif
+ gtkui_plugin = (ddb_gtkui_t *)deadbeef->plug_get_for_id (GTKUI_PLUGIN_ID);
if(!gtkui_plugin) {
+ fprintf (stderr, "pltbrowser: can't find gtkui plugin\n");
return -1;
}
gtkui_plugin->w_reg_widget ("pltbrowser", _("Playlist browser"), w_pltbrowser_create);
- // need to do it in gtk thread
- g_idle_add (pltbrowser_connect_cb, NULL);
return 0;
}
static int
pltbrowser_disconnect (void) {
- gtkui_plugin->w_unreg_widget ("pltbrowser");
+ if (gtkui_plugin) {
+ gtkui_plugin->w_unreg_widget ("pltbrowser");
+ }
return 0;
}
@@ -200,6 +192,7 @@ static DB_misc_t plugin = {
.plugin.version_minor = 0,
.plugin.type = DB_PLUGIN_MISC,
.plugin.id = "pltbrowser",
+ .plugin.name = "pltbrowser",
.plugin.descr = "Playlist browser",
.plugin.copyright =
"DeaDBeeF -- the music player\n"