You are here

Make shortcut

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Rate this item!
makeshortcut.tar.gz17.51 KB

A plugin that makes shortcuts, in a Shortcuts menu, to other plugins.

Install it in your local plugin directory. You can run it to see what it would do, and cancel it, without creating any shortcuts. If you do create shortcuts, it will create them in your local plugin directory. You can later manually delete the shortcut plugins.

This is a prototype that I'm posting for comment. It works but it could be improved. I would be glad to start a community project.

A future version might:
- let you enter parameters for the target plugin (make a "preset")
- let you enter some of the parameters of the target at shortcut time
- let you put the shortcut anywhere in the GIMP menus
- be more user-friendly e.g. replacing existing shortcuts
- disallow creating certain shortcuts that won't work (e.g. whose options don't default sensibly.)
- let you create a keyboard shortcut to the shortcut at the same time

Even more in the future: let you script a sequence of calls to other plugins and even GIMP menu items. Known as a visual script editor or a macro editor. Would not require knowledge of a programming language.

Code License: 
GIMP Version: 
Scripting Engine: 


First, my apologies, and thanks for reporting it.

I uploaded a patched archive.

It was my error in packaging. Two files were missing from the archive and so forth.

My mistake was to test on a development machine. The missing files were in another project of mine. The files were found on my development machine during testing. When I did a clean install on a clean machine, I found the problems.

Maybe I should put all the code in one big Python file, but I prefer to break it up into modules.

More information about using Make shortcut, from the Help file:

Choose a plugin and enter a name for a shortcut to it.
Shortcuts do not appear until you restart GIMP.
Shortcuts use the standard or current options of the plugin and do not present an options dialog.
Shortcuts are enabled according to the mode of the image (e.g. RGB or Grayscale.)
Plugins without sensible defaults are not suitable for shortcuts.
You can remove shortcuts by deleting their files (e.g.
in your plugin directory.

Sometimes its not always clear which plugin is being referred to. More terminology:
"Make shortcut..." is a plugin.
It creates another plugin, the shortcut or wrapping plugin.
The shortcut plugin calls a third plugin, the wrapped or target plugin.

It works nice, but
-In the dialogbox I see empty lines (I had made a little screenshot to show but unable to include). I.e. in my gimp setup the first line in Filters is empty???
-I cannot create a shortcut for contactsheet plugin. I also don't see several other plugins. Correct???

Just an idea: is it possible to make a little 'stand alone' screen instead including it in the toolbar (again !!!). My toolbar is growing to infinity.

And I'm pleased that you use Glade with python and Gimp. I hope I can find some answers in your program about registering and calling 'Glade'.

Just an idea: is it possible to make a little 'stand alone' screen instead including it in the toolbar (again !!!). My toolbar is growing to infinity.

Now that would be handy - A user definable toolbar.

Other than that, what is the actual point of the script? Just to add duplicate menu locations for plugins/scripts?

-Rob A>

Just an idea: is it possible to make a little 'stand alone' screen instead including it in the toolbar (again !!!). My toolbar is growing to infinity.

Any submenu under the image window's menu can be made available as a "permanent", standalone window. Just invoke the main menu using the right-mouse button, navigate to the appropriate submenu, and click on the dashed "tear off" line at the top of the submenu.

Something learnt today, I didn't know the "tear off" line.


But to be clear:

Click the right mouse button (RMB) in the image window (not in the menubar but in the drawing area.)

A window opens that is a mirror image of the menubar (but rotated 90 degrees.) Then you can choose a menu to tear off by navigating through the menus and clicking on the dashed lines.

Or you can choose an operation from the rotated menu bar. But then the rotated menu bar dissappears, after the operation.

Or you can tear off the rotated copy of the menubar. Another window opens, the "Image Menu" window. You can use it just like the menubar, to choose operations, but it stays open until you close it. Unlike the menubar, you can continue to tear off menus from the "Image Menu" window.

(The GIMP help refers to it as a context menu. Usually thats what the RMB does, bring up a context menu. Which means: a menu of the operations available in the area where you clicked the RMB. In this case, the operations for the image area are exactly the same as shown in the menubar.)

(In other applications you can tear off from the menubar. Why isn't GIMP like that? Maybe it is a feature of the operating system and windowing system. Maybe it is not portably supported by all windowing systems and the GIMP developers did not want to implement something that should be provided by the windowing system. Maybe this way IS a standard for the windowing system, say GNOME.)

In other applications you can tear off from the menubar. Why isn't GIMP like that?

If I recall correctly, the main menu was like that in GIMP 2.2 -- but the context menu didn't have tearoffs. When GTK added tearoff support for context menus, I guess the GIMP developers felt having them in the main menu was no longer necessary (I believe there was also some discussion over the dashed menu items confusing some users) and that it wasn't worth modifying the code to make it configurable (the 'tearoff-menus' setting in gimprc now only affects context menus).

Thanks for your comments.

I'll look into the strangeness reported.

Off hand, I suppose there could be a Shortcuts window separate.

Funny, my toolbar has plenty of room. Not a power user.

Yes, at this point, it just saves the work of navigating through hierarchal menus, and the thinking about where things are. But I anticipate letting you enter preset parameters for the target plugin. You could defer some parameters, to be entered when the shortcut runs. Ultimately, it should let you script a sequence of plugin OR other menu calls. For example, Selection to Path followed by the reverse becomes the shortcut: Round the Selection.

The GIMP architecture is quite nice.

The idea sounds good to me.

work along side Gimp Scripter?
I have Gimp scripter running nicely on Windows XP 32 bit.I even created the selection to selection script (pretty cool)
Just wondering if Gimp scripter would interfere with the shortcut filter install as they both create a menu named shortcuts.


Subscribe to Comments for "Make shortcut"