Commit 708a6683 authored by Ali Abdallah's avatar Ali Abdallah

Fix a minor memory leak in the tray plugin,

the plugin is not able to close notification when the daemon is
notify-osd, notify_notification_close does nothing, however it works
with xfce4-notifyd and notification-daemon.
parent dd330070
......@@ -190,6 +190,7 @@ tray_activate_cb (GtkStatusIcon *tray_icon, TrayProvider *tray)
static void
notification_closed_cb (NotifyNotification *n, TrayProvider *tray)
{
g_object_unref (tray->n);
tray->n = NULL;
}
......@@ -313,7 +314,14 @@ state_changed_cb (ParoleProviderPlayer *player, const ParoleStream *stream, Paro
{
if ( tray->n )
{
notify_notification_close (tray->n, NULL);
GError *error = NULL;
notify_notification_close (tray->n, &error);
if ( error )
{
g_warning ("Failed to close notification : %s", error->message);
g_error_free (error);
}
g_object_unref (tray->n);
tray->n = NULL;
}
if ( state < PAROLE_STATE_PAUSED )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment