ANN: ShortcutEditor for wxPython :-D

Showing 1-7 of 7 messages
ANN: ShortcutEditor for wxPython :-D Infinity77 3/5/12 1:00 PM
Hi All,

    it's been a while since my last announcement, so I thought I'd
jump in and make another one. I am happy to announce the birth of my
latest child, ShortcutEditor.

NOTE: ShortcutEditor requires AGW 0.9.3 or the latest SVN, due to the
enhancements I made to GenericMessageDialog, CustomTreeCtrl and
HyperTreeList.


Description
===========

ShortcutEditor is a widget that allows the user to customize and change keyboard
shortcuts via a dialog. It can be used to edit `wx.MenuItem` shortcuts
or accelerators
defined in a `wx.AcceleratorTable`.

The interface itself is very much inpired by the GIMP shortcut editor:

http://graphicssoft.about.com/od/gimptutorials/tp/keyboard-shortcut-editor.htm

There are very few minor UI differences between ShortcutEditor and the GIMP one,
although the behaviour should be pretty much equivalent.

Various features:

* Shortcuts are listed in a tree-like structure, pretty much reflecting a menu
  hierarchy (as most of the time ShortcutEditor is used to edit `wx.MenuItem`
  shortcuts);
* Accelerators defined via `wx.AcceleratorTable` are handled in a similar way;
* Support for I18N;
* Ability to restore default shortcuts/accelerators via a UI button;
* Possibility to send back the new/updated shortcuts to the original
  `wx.MenuBar` or the original `wx.AcceleratorTable`;
* Filters on the shortcuts label (case-insensitive);
* Basic help window with instructions (customizable via SetHTMLHelpFile),
  via the ``Help`` button.

The docstrings should explain relatively well how to use it, and I am
currently re-building the AGW documentation for the new 0.9.3 version.

Source code: the wxPython SVN repository (please remember to update
the whole of AGW).

Please let me know if you encounter any issue, although patches are
much more welcome :-)

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

>>> import PyQt4.QtGui
Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
ImportError: No module named PyQt4.QtGui
>>>
>>> import pygtk
Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
ImportError: No module named pygtk
>>>
>>> import wx
>>>
>>>

Re: [wxPython-users] ANN: ShortcutEditor for wxPython :-D Frank Niessink 3/18/12 1:16 PM
Hi Andrea,

2012/3/5 Andrea Gavana <andrea...@gmail.com>:


> Hi All,
>
>    it's been a while since my last announcement, so I thought I'd
> jump in and make another one. I am happy to announce the birth of my
> latest child, ShortcutEditor.

That's great! I will surely look into making good use of this widget
for Task Coach.

Thanks, Frank

Re: ANN: ShortcutEditor for wxPython :-D Mike Driscoll 6/21/12 7:57 AM

I realize this post is old, but I was working on a short article about this widget and noticed that the example application in the source didn't work.  You have

wx.Frame.__init(self, parent, -1, "ShortcutEditor Demo")

instead of

wx.Frame.__init__(self, parent, -1, "ShortcutEditor Demo")

in the "usage example" portion. I'll be posting my little blurb later this week. Thanks for the cool new tool, Andrea!

- Mike
Re: [wxPython-users] Re: ANN: ShortcutEditor for wxPython :-D Infinity77 6/21/12 10:59 AM
Thanks Mike, it should be fixed now in SVN.
Re: ANN: ShortcutEditor for wxPython :-D Steven Sproat 11/24/12 5:56 PM
Excuse the late reply to this announcement, but I've just installed wx 2.9.4 and am playing about, getting this into my program. This is fantastic bit of work here Andrea, but minimal code to consume its service! Brilliant.

I'm going to look into saving the state of the user's choice so the app can restore it on startup.

thanks again
Re: [wxPython-users] Re: ANN: ShortcutEditor for wxPython :-D werner 11/24/12 11:44 PM
Steven,

On 25/11/2012 02:56, Steven Sproat wrote:
> Excuse the late reply to this announcement, but I've just installed wx
> 2.9.4 and am playing about, getting this into my program. This is
> fantastic bit of work here Andrea, but minimal code to consume its
> service! Brilliant.
>
> I'm going to look into saving the state of the user's choice so the
> app can restore it on startup.
I assume you are aware of Andrea's "persist" module, I haven't used the
ShortcutEditor so don't know if persist is saving/restoring the actual data.

I use "persist" in my latest version of my stuff, but "data" type
entries are stored in a database in my case, so don't use "persist" for
that at all.

Werner
Re: [wxPython-users] Re: ANN: ShortcutEditor for wxPython :-D Steven Sproat 11/25/12 8:09 AM
Hey Werner!

Yes I'm aware of the persistent controls - I was looking at the demo
last night. Seems fun but I may need to do some custom things, e.g. only
save what's changed.

I thought of another enhancement - if you open the editor and change
some keys and save them, then re-open the dialog, the "restore defaults"
button will restore your previously saved settings. I'd expect it to
restore the application defaults. Not sure what's the right approach
there and doing it my way would be much harder.

Regards,
Steven
--
Steven Sproat, BSc
http://www.whyteboard.org/