You are here

Make shortcut

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Rate this item!
AttachmentSize
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: 

Comments

How i could have missed this till now ?
It is really a good idea...i am downloading now so i can't give yet a feedback, but i saw used in a short video and from what i saw...well i tought the best was run here to dl

thank bootchk

Your program is really great.
If you have time, please, expand their program to the announced job opportunities of development.
Maybe the subject will develop on the GimpChat:
http://www.gimpchat.com/viewtopic.php?f=8&t=1204&start=10 # p14047.
Creating, for novice users, it is very important - but it should be simple - for understanding the enormous possibilities GIMP.

I used your Makeshortcut plugin and also your Inspect plugin as examples how to interface Glade, Python with Gimp and it works, thanks to you. The contactsheet plugin has now his own GUI. But...now how to internationalise it?? I found the following functions:
-def gtk.glade.bindtextdomain(domainname, dirname) and
-def gtk.glade.textdomain(APP)
played awhile with these functions but I cannot get the glade file translated. No problem with a python file. I have put the 'translation.mo' file in the gimp locale directory, also tried the gtk+/glade locale directory. What am I missing??

I found this link:

http://www.majorsilence.com/pygtk_internationalization

It is recent and seems comprehensive and comprehensible.
I haven't tried it yet though.

Thanks a lot I will try and let you know the results.

EDIT
Just solved I'm now able to internationalize. You have a few things to do. 1e add libglade.dll to the c:\windows\system32 directory; 2e import gtk, gtk.glade and call gtk.glade.bindtextdomain(APP,DIR), gtk.glade.textdomain(APP); 3e after builder = gtk.Builder() insert builder.set_translation_domain(APP). For translations within a python file use gettext.install(APP, DIR, unicode=True).

I don't know off hand. You noticed I had not internationalized. But I should. So I will look into it tomorrow.

Good news: internationalization works I build a little (minimal) example just running in a python shell, ported it to 'Gimp' and guess:

bad news: internationalization doesn't work.

The thing I can discover that there is no module 'gtk.glade'. From a python shell importing a gtk.glade module is a piece of cake but importing 'gtk.glade' from the (gimp) python console is impossible. No module gtk.glade!

I found something similar at http://ubuntuforums.org/showthread.php?t=956553, but that is for Linux and I have WinXP. Do you have any ideas I can try??

What should I see??? I see only a menuitem "make shortcut". Clicking on it does nothing.

Should bring up a dialog box.

Maybe it is behind another window?

what platform, what version of Gimp?

It uses Glade3. Requires pygtk, a fairly recent version 2.16 I recall.

start Gimp in a terminal (a console) please and see if there are any messages.

Sorry, its lightly tested on one platform, Ubuntu.

Should bring up a dialog box. --> none

Maybe it is behind another window? --> none

what platform, what version of Gimp?--> winxp SP3 and gimp v2.6.8

It uses Glade3. Requires pygtk, a fairly recent version 2.16 I recall.

-->Glade (v3.6.7) installed, so is pygtk v2.16

start Gimp in a terminal (a console) please and see if there are any messages.

-->started gimp from command prompt (dos console): nothing

Sorry, its lightly tested on one platform, Ubuntu.

-->Unfortunately I don't have Linux running, so I have to wait

Pages

Subscribe to Comments for "Make shortcut"