diff options
author | Kirill A. Korinskiy <catap@catap.ru> | 2010-01-08 12:42:11 +0300 |
---|---|---|
committer | Kirill A. Korinskiy <catap@catap.ru> | 2010-01-08 14:16:13 +0300 |
commit | 532939f971febe5a29ed20607d0075ba60f90a04 (patch) | |
tree | f6cc548e1dc9ac0ebaec3fa6befe9bf35679a7b5 /jabber-libnotify.el | |
parent | 7d67638dfbb1d84844223739e8ae27440313130f (diff) |
Make multiline notify
Diffstat (limited to 'jabber-libnotify.el')
-rw-r--r-- | jabber-libnotify.el | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/jabber-libnotify.el b/jabber-libnotify.el index 9ff28a4..e958616 100644 --- a/jabber-libnotify.el +++ b/jabber-libnotify.el @@ -60,7 +60,7 @@ "Return the next notification id." (setq jabber-libnotify-id (+ jabber-libnotify-id 1))) -(defun jabber-libnotify-message (msg) +(defun jabber-libnotify-message (text &optional title) "Show MSG using libnotify" (cond ((eq jabber-libnotify-method 'shell) @@ -71,8 +71,10 @@ "-t" (format "%s" jabber-libnotify-timeout) "-i" (or jabber-libnotify-icon "\"\"") "-u" jabber-libnotify-urgency - (or jabber-libnotify-message-header " ") msg)) - (error nil))) + (or title + (or jabber-libnotify-message-header " ") + text)) + (error nil)))) ((eq jabber-libnotify-method 'dbus) (condition-case e (dbus-call-method @@ -84,8 +86,9 @@ (jabber-libnotify-next-id) jabber-libnotify-icon ':string (encode-coding-string - jabber-libnotify-message-header 'utf-8) - ':string (encode-coding-string msg 'utf-8) + (or title jabber-libnotify-message-header) + 'utf-8) + ':string (encode-coding-string text 'utf-8) '(:array) '(:array :signature "{sv}") ':int32 jabber-libnotify-timeout) |