From 3593fc1ea2637caeff93800c535f2d84a8f24ec2 Mon Sep 17 00:00:00 2001 From: Qball Date: Mon, 15 Feb 2010 15:28:25 +0100 Subject: [PATCH] Do not close old notification, update it --- po/Makefile.in.in | 4 ++-- src/plugin.c | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/po/Makefile.in.in b/po/Makefile.in.in index c7e8302..cc8a222 100644 --- a/po/Makefile.in.in +++ b/po/Makefile.in.in @@ -56,7 +56,7 @@ ALL_LINGUAS = @ALL_LINGUAS@ PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi) -USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep '^$$lang$$' $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep '^$$lang$$'`"; then printf "$$lang "; fi; done; fi) +USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep \^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep \^$$lang$$`"; then printf "$$lang "; fi; done; fi) USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done) @@ -129,7 +129,7 @@ install-data-yes: all done # Empty stubs to satisfy archaic automake needs -dvi info tags TAGS ID: +dvi info ctags tags CTAGS TAGS ID: # Define this as empty until I found a useful application. install-exec installcheck: diff --git a/src/plugin.c b/src/plugin.c index a32b2f8..296cf28 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -145,11 +145,14 @@ static void libnotify_song_changed(MpdObj *mi) (char *)C_("Body markup", "[Artist: %artist%\n][Album: %album% [(%date%)]\n][Genre: %genre%\n]"), song); /* if notification exists update it, else create one */ - if(not != NULL) + if(not == NULL) { - notify_notification_close(not, NULL); - } +// notify_notification_close(not, NULL); not = notify_notification_new(summary, buffer,NULL, NULL); + } + else{ + notify_notification_update(not, summary, buffer, NULL); + } notify_notification_set_urgency(not, NOTIFY_URGENCY_LOW); if(cfg_get_single_value_as_int_with_default(config, "libnotify-plugin", "attach-to-tray", TRUE)) -- 2.11.4.GIT