diff options
author | Philipp Haselwarter <philipp.haselwarter@gmx.de> | 2011-01-15 01:09:25 +0100 |
---|---|---|
committer | Yuri D'Elia <wavexx@thregr.org> | 2011-01-15 18:42:52 +0100 |
commit | 8ba48171f9a305171f5f9a11a4e50690ad326275 (patch) | |
tree | d458a6f8b01154c5c1fd87945788dc879f39fb9a /gnus-desktop-notify.el | |
parent | 57593f9436b4a3aac457272269aa55874166e2eb (diff) |
Shorten displayed group names using `gnus-short-group-name'
Especially newsgroups can have very long names; these are now abbreviated.
Their length can be customized with `gnus-desktop-notify-uncollapsed-levels'.
Diffstat (limited to 'gnus-desktop-notify.el')
-rw-r--r-- | gnus-desktop-notify.el | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/gnus-desktop-notify.el b/gnus-desktop-notify.el index 3139d7b..f35b196 100644 --- a/gnus-desktop-notify.el +++ b/gnus-desktop-notify.el @@ -150,6 +150,16 @@ support HTML formatting (awesome and KDE are known to work). %G Group name" :type 'string) +(defcustom gnus-desktop-notify-uncollapsed-levels gnus-group-uncollapsed-levels + "Number of group name elements to leave alone when making a shortened name +for display from a group name. +Value can be `gnus-group-uncollapsed-levels', an integer or nil to +deactivate shortening completely." + :type '(choice (const :tag "Standard `gnus-group-uncollapsed-levels'" + gnus-group-uncollapsed-levels) + (integer) + (const :tag "nil (deactivate feature)" nil))) + (defcustom gnus-desktop-notify-groups 'gnus-desktop-notify-all-except "Gnus group notification mode. Can be either: @@ -240,7 +250,10 @@ with the behavior defined by `gnus-desktop-notify-send-mode'." unread (> unread 0) old-count (> count old-count)) (setq updated-groups - (cons (cons name (- count old-count)) + (cons (cons (if gnus-desktop-notify-uncollapsed-levels + (gnus-short-group-name name gnus-desktop-notify-uncollapsed-levels) + name) + (- count old-count)) updated-groups)))))))) (when (and updated-groups (not (called-interactively-p 'any))) (funcall gnus-desktop-notify-function updated-groups)))) |