summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2010-05-13 07:45:26 +0200
committerCarsten Dominik <carsten.dominik@gmail.com>2010-05-13 07:45:26 +0200
commitc1cc420149b8fe8cbdeffbc2bb6cc55d0ceb2479 (patch)
tree9adaa0098f60060ec089882672e76cfedf6d89b7
parente21d08ae35849f1b2efb22b89cde6369a43e28eb (diff)
downloadorg-mode-c1cc420149b8fe8cbdeffbc2bb6cc55d0ceb2479.tar.gz
Add help-echo to habit graph
Patch by Michael Fornius.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/org-habit.el9
2 files changed, 13 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d7dc638..45c9ec7 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2010-05-13 Mikael Fornius <mfo@abc.se>
+
+ * org-habit.el (org-habit-build-graph): Help-echo date when
+ mouse is over stars.
+
2010-05-13 Jan Böker <jan.boecker@jboecker.de>
* org.el (org-file-apps): Improve docstring to reflect
diff --git a/lisp/org-habit.el b/lisp/org-habit.el
index 3d731ca..098f24d 100644
--- a/lisp/org-habit.el
+++ b/lisp/org-habit.el
@@ -280,9 +280,16 @@ current time."
donep)))
markedp face)
(if donep
- (progn
+ (let ((done-time (time-add
+ starting
+ (days-to-time
+ (- start (time-to-days starting))))))
+
(aset graph index ?*)
(setq markedp t)
+ (put-text-property
+ index (1+ index) 'help-echo
+ (format-time-string (org-time-stamp-format) done-time) graph)
(while (and done-dates
(= start (car done-dates)))
(setq last-done-date (car done-dates)