Fix stale summary buffer name when using a single article buffer
[gnus] / lisp / gnus-notifications.el
index f29bdb7..0621c23 100644 (file)
@@ -1,6 +1,6 @@
 ;; gnus-notifications.el -- Send notification on new message in Gnus
 
-;; Copyright (C) 2012-2013 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2014 Free Software Foundation, Inc.
 
 ;; Author: Julien Danjou <julien@danjou.info>
 ;; Keywords: news
@@ -92,12 +92,12 @@ Return a notification id if any, or t on success."
        :body subject
        :actions '("read" "Read")
        :on-action 'gnus-notifications-action
-       :app-icon (gnus-funcall-no-warning
-                 'image-search-load-path "gnus/gnus.png")
+       :app-icon (or photo-file
+                     (gnus-funcall-no-warning
+                      'image-search-load-path "gnus/gnus.png"))
        :app-name "Gnus"
        :category "email.arrived"
-       :timeout gnus-notifications-timeout
-       :image-path photo-file)
+       :timeout gnus-notifications-timeout)
     (message "New message from %s: %s" from subject)
     ;; Don't return an id
     t))