summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorDmitriy <home@local>2015-05-23 13:37:06 +0300
committerDmitriy <home@local>2015-05-23 13:37:06 +0300
commit395263ea04514a37a93ff676001eb211149e4b52 (patch)
treef70d91003bd50276c4ed8065aa6bb4d0f6c4bbc0 /plugins
parent86c9bfbe92e236d1c2318096bb791af06a0806a7 (diff)
downloadmate-settings-daemon-395263ea04514a37a93ff676001eb211149e4b52.tar.bz2
mate-settings-daemon-395263ea04514a37a93ff676001eb211149e4b52.tar.xz
fix mpris plugin "vanish" function
See bug #75
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mpris/msd-mpris-manager.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/mpris/msd-mpris-manager.c b/plugins/mpris/msd-mpris-manager.c
index 1427044..96d9cff 100644
--- a/plugins/mpris/msd-mpris-manager.c
+++ b/plugins/mpris/msd-mpris-manager.c
@@ -134,6 +134,7 @@ mp_name_vanished (GDBusConnection *connection,
MsdMprisManager *manager)
{
gchar *player_name;
+ GList *player_list;
if (g_queue_is_empty (manager->priv->media_player_queue))
return;
@@ -142,7 +143,11 @@ mp_name_vanished (GDBusConnection *connection,
player_name = get_player_name(name);
- g_queue_remove (manager->priv->media_player_queue, player_name);
+ player_list = g_queue_find_custom (manager->priv->media_player_queue,
+ player_name, g_strcmp0);
+
+ if (player_list)
+ g_queue_remove (manager->priv->media_player_queue, player_list->data);
g_free (player_name);
}