toolbar for planner

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

toolbar for planner

Joakim Verona
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
[hidden email]
https://mail.gna.org/listinfo/planner-el-discuss
Reply | Threaded
Open this post in threaded view
|

Re: toolbar for planner

John Sullivan-2
[hidden email] writes:

> 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.
>

I agree and I like this idea. A couple questions though --

1) Would this be better done as a freerunner library that could be
loaded, that would modify planner behavior? In general it would be good
for planner to have a toolbar on laptops and desktops too, but we would
want a different toolbar there than on the freerunner due to screen
size. Can you modify your patch to be loaded in a separate
planner-mobile file?

2) I think we probably want to include some of the default tool-bar
icons, like save, instead of removing them all. What do you think?

3) Can you find or make a different icon for the checkmark? It has those
ABC letters above it which makes it a little confusing :).

I'm definitely interested in making Planner work well on the FreeRunner
-- I'm already carrying my ~/Plans around on it, so if you're interested
in helping more that'd be great.


--
John Sullivan
Emacs Planner Maintainer
http://wjsullivan.net/PlannerMode.html
GPG Key: AE8600B6

_______________________________________________
Planner-el-discuss mailing list
[hidden email]
https://mail.gna.org/listinfo/planner-el-discuss
Reply | Threaded
Open this post in threaded view
|

Re: toolbar for planner

John Sullivan-2
In reply to this post by Joakim Verona
I started a wiki page for planning this as well,
http://www.emacswiki.org/emacs/PlannerModeMobile.

--
John Sullivan
Emacs Planner Maintainer
http://wjsullivan.net/PlannerMode.html
GPG Key: AE8600B6

_______________________________________________
Planner-el-discuss mailing list
[hidden email]
https://mail.gna.org/listinfo/planner-el-discuss
Reply | Threaded
Open this post in threaded view
|

Re: toolbar for planner

Joakim Verona
In reply to this post by John Sullivan-2
John Sullivan <[hidden email]> writes:

> [hidden email] writes:
>
>> 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.
>>
>
> I agree and I like this idea. A couple questions though --
>
> 1) Would this be better done as a freerunner library that could be
> loaded, that would modify planner behavior? In general it would be good
> for planner to have a toolbar on laptops and desktops too, but we would
> want a different toolbar there than on the freerunner due to screen
> size. Can you modify your patch to be loaded in a separate
> planner-mobile file?

I'm not sure I follow. The buttons would be the same everywhere, only
different sizes right? So its more of a general tool-bar-for-mobiles.el
library we want, right? I think Emacs supports this in a way already,
need to look into it.

> 2) I think we probably want to include some of the default tool-bar
> icons, like save, instead of removing them all. What do you think?

I've discussed this on the emacs-devel list for another mobile emacs
project. What I'd like is for minor modes to be able to add to the
global toolbar, not replace it. Aparently this isnt possible. I've made
a patch to emacs that hasnt been reviewed yet.

In the meantime planner would need to duplicate the global buttons it
needs, AFAICS.

>
> 3) Can you find or make a different icon for the checkmark? It has those
> ABC letters above it which makes it a little confusing :).

I can make icons, we need to figure out how to distribute them though.
If they can be made general enough maybe they can go into Emacs.


> I'm definitely interested in making Planner work well on the FreeRunner
> -- I'm already carrying my ~/Plans around on it, so if you're interested
> in helping more that'd be great.
--
Joakim Verona


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