aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2014-12-22 13:56:36 -0200
committerArtur Malabarba <bruce.connor.am@gmail.com>2014-12-22 14:02:57 -0200
commit756d92b9722d4ecebc4f7e223628cf008fb66188 (patch)
treefd327a55356e4d9992287fca3c1126f837f797dd
parent69f081af1461fb70858a29f7426a758ecc10bafe (diff)
Add mode-line to inbox
-rw-r--r--sx-inbox.el18
1 files changed, 16 insertions, 2 deletions
diff --git a/sx-inbox.el b/sx-inbox.el
index 575d181..07453d4 100644
--- a/sx-inbox.el
+++ b/sx-inbox.el
@@ -104,7 +104,16 @@ These are identified by their links.")
" "
(:propertize "q" face mode-line-buffer-id)
": Quit")
- "Header-line used on the question list.")
+ "Header-line used on the inbox list.")
+
+(defvar sx-inbox--mode-line
+ '(" "
+ (:propertize
+ (sx-inbox--notification-p
+ "Notifications"
+ "Inbox")
+ face mode-line-buffer-id))
+ "Mode-line used on the inbox list.")
(define-derived-mode sx-inbox-mode
sx-question-list-mode "Question List"
@@ -116,7 +125,12 @@ These are identified by their links.")
(lambda (page) (sx-inbox-get sx-inbox--notification-p page)))
(setq tabulated-list-format
[("Type" 30 t nil t) ("Date" 10 t :right-align t) ("Title" 0)])
- (setq header-line-format sx-inbox--header-line))
+ (setq mode-line-format sx-inbox--mode-line)
+ (setq header-line-format sx-inbox--header-line)
+ ;; @TODO: This will no longer be necessary once we properly
+ ;; refactor sx-question-list-mode.
+ (remove-hook 'tabulated-list-revert-hook
+ #'sx-question-list--update-mode-line t))
;;; Keybinds