Issue 5617 in pharo: Add a way to define in only one place menus and shortcuts

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue 5617 in pharo: Add a way to define in only one place menus and shortcuts

pharo
Status: Accepted
Owner: [hidden email]
Labels: Milestone-2.0

New issue 5617 by [hidden email]: Add a way to define in only one  
place menus and shortcuts
http://code.google.com/p/pharo/issues/detail?id=5617

I was discussing with Guillermo, and we figured out that it's a bit stupid  
to have to define menu entries and shortcuts in different methods since the  
information is quite the same, and even the structure is similar :)


So I have implemented a little mechanism with two classes :)
So now KM and MenuPragma use the same Builder (the one used in the method  
as parameter (MenuRegistration / KMBuilder)) and then, the PragmaBuilder  
now how to build an interesting item for itself from the generic item :)

And it allows to write something like

testMenu: aBuilder
        <nautilusClassMenu>
        <keymap>
       
        (aBuilder item: #'halt...')
                category: #NautilusClassShortcuts;
                default: $h command;
                do: [:target | target halt ];
                description: 'TEST';
                enabled: [:target | target selectedClasses size <= 1 ];
                order: 0;
                withSeparatorAfter.

The cool part is that the menu can now print the shortcut associated to the  
menu entry by itself ;)
c.f. figure


I will do a little clean, add some comments and propose a slice ;)


Attachments:
        KMMenu.1.cs  19.0 KB
        Screen shot 2012-04-07 at 11.28.58 PM.png  8.6 KB


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5617 in pharo: Add a way to define in only one place menus and shortcuts

pharo
Updates:
        Cc: [hidden email] [hidden email]

Comment #1 on issue 5617 by [hidden email]: Add a way to define in  
only one place menus and shortcuts
http://code.google.com/p/pharo/issues/detail?id=5617

(No comment was entered for this change.)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5617 in pharo: Add a way to define in only one place menus and shortcuts

pharo
In reply to this post by pharo

Comment #3 on issue 5617 by [hidden email]: Add a way to define in  
only one place menus and shortcuts
http://code.google.com/p/pharo/issues/detail?id=5617

I like it...
so, where is the slice?


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5617 in pharo: Add a way to define in only one place menus and shortcuts

pharo

Comment #4 on issue 5617 by [hidden email]: Add a way to define in  
only one place menus and shortcuts
http://code.google.com/p/pharo/issues/detail?id=5617

After a check, there is no slice :)

I should check the cs is still working, but I do not have time now :)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5617 in pharo: Add a way to define in only one place menus and shortcuts

pharo
Updates:
        Status: Workneeded

Comment #5 on issue 5617 by [hidden email]: Add a way to define in  
only one place menus and shortcuts
http://code.google.com/p/pharo/issues/detail?id=5617

(No comment was entered for this change.)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5617 in pharo: Add a way to define in only one place menus and shortcuts

pharo

Comment #6 on issue 5617 by [hidden email]: Add a way to define in  
only one place menus and shortcuts
http://code.google.com/p/pharo/issues/detail?id=5617

let us know :)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5617 in pharo: Add a way to define in only one place menus and shortcuts

pharo

Comment #7 on issue 5617 by [hidden email]: Add a way to define in  
only one place menus and shortcuts
http://code.google.com/p/pharo/issues/detail?id=5617

Any one can try what described in the first post, and see :)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5617 in pharo: Add a way to define in only one place menus and shortcuts

pharo
Updates:
        Status: WorkNeeded

Comment #8 on issue 5617 by [hidden email]: Add a way to define in  
only one place menus and shortcuts
http://code.google.com/p/pharo/issues/detail?id=5617

(No comment was entered for this change.)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5617 in pharo: Add a way to define in only one place menus and shortcuts

pharo
Updates:
        Status: FixReviewNeeded

Comment #9 on issue 5617 by [hidden email]: Add a way to define in  
only one place menus and shortcuts
http://code.google.com/p/pharo/issues/detail?id=5617

Slice in the inbox


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5617 in pharo: Add a way to define in only one place menus and shortcuts

pharo
Updates:
        Status: Integrated

Comment #10 on issue 5617 by [hidden email]: Add a way to define in  
only one place menus and shortcuts
http://code.google.com/p/pharo/issues/detail?id=5617

in 2.0 209


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker