I'm experimenting with Planner on my openmoko freerunner:
http://wiki.openmoko.org/wiki/Main_Page

I've found that tool-bars, that I normaly dont like, are useful on pen
computers, so heres a simple attempt at a tool bar for planner.


diff --git a/planner.el b/planner.el
index be04ded..0b01023 100644
--- a/planner.el
+++ b/planner.el
@@ -407,6 +407,7 @@
 (defvar planner-version "3.42"
   "The version of Planner currently loaded.")
 
+
 ;; Compatibility hacks -- these will be removed in the future
 
 (defun planner-update-wiki-project ()
@@ -676,6 +677,18 @@ If nil, do not carry unfinished tasks forward."
     map)
   "Keymap used by Planner mode.")
 
+(defvar tool-bar-map)
+(defvar planner-tool-bar-map
+  (let ((map (make-sparse-keymap)))
+    (dolist (x '((planner-goto-yesterday . "prev-node")
+                 (planner-goto-tomorrow   .   "next-node")
+                 (planner-task-done .  "spell");spell looks like a "tick" mark
+                 (muse-follow-name-at-point . "jump-to")
+                 )
+               map)
+      (tool-bar-local-item
+       (cdr x) (car x) (car x)  map  planner-mode-map))))
+
 (defun planner-install-extra-context-keybindings ()
   "Install extra context-sensitive keybindings.
 These keybindings conflict with windmove.el, but might
@@ -1054,6 +1067,8 @@ does to the diary buffer."
       (hack-local-variables)
     (error (message "File local-variables error: %s"
                     (prin1-to-string err))))
+  ;;tool-bar
+  (set (make-local-variable 'tool-bar-map) planner-tool-bar-map)
   ;; check to see if the mode changed
   (when (eq major-mode 'planner-mode)
     (let ((hook (if (boundp 'write-file-functions)

-- 
Joakim Verona


_______________________________________________
Planner-el-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/planner-el-discuss

Reply via email to