Hi Sven,

On 3 Oct 2010 at 14:19, Sven Neumann wrote:

> On Sun, 2010-10-03 at 12:59 +0000, Alan Campbell wrote:
> > One of uses of an underscore is to pick out the shortcut character
> > in a menu item:
> > 
> > (script-fu-register  "wrdhb_create_half_blind_dovetail"
> >   "_Half blind dovetail..."   ;menu label
> >   "Create Template for Half blind Dovetail" 
> > ....
> > )
> > 
> > There also appears to be
> > 
> > (script-fu-register  "wrdhb_create_half_blind_dovetail"
> >   _"Half blind dovetail..."   ;menu label
> > ...
> > )
> > 
> > whch I gather has something to do with translation: I assume it
> > would have no effect in this particular case because it's sadly
> > unreasonable to expect translation dictionaries (po files??) to know
> > "blind" or "dovetail".  That so?
> 
> If you want your scripts to be translated, then you need to put your
> scripts into a separate translation domain and ship the translations
> with them. You can of course not expect the strings from your scripts
> to be part of the standard script-fu translation domain.

Yikes.  Okay, will now go find out what a translation domain is.  
However, since woodrats I think are only sold only with English 
instructions, I guess their owners will probably read engish...
> 
> > Also, I've been using this style of getting a script registered for
> > use in create menu:
> > 
> > (script-fu-menu-register "wrdhb_create_template_half_blind_dovetail"
> > "<Image>/File/Create/Woodrat")
> > 
> > (a)  Can I combine the two, putting path in second parameter of
> > script-fu-register?
> 
> Using a path in the script-fu-register call is deprecated. Please use
> script-fu-menu-register.

Have done, thanks.

> > (b) Is there anyway of getting a letter of the submenu "Woodrat" to
> > be a shortcut key?  I've tried variations of underscore in the
> > "<Image>/File/Create/Woodrat" parameter, doesn't work.
> 
> You need to explicitly create the submenu using
> gimp-plugin-menu-branch-register. This procedure should accept
> mnemonics marked with an underscore.
> 

Tried
(gimp-plugin-menu-branch-register "<Image>/File/Create" "W_oodrat")
(gimp-plugin-menu-branch-register "<Image>/File/Create" "_Woodrat") 

followed by 

(script-fu-menu-register "wrdhb_create_half_blind_dovetail"
                                  "<Image>/File/Create/W_oodrat")

or

(script-fu-menu-register "wrdhb_create_half_blind_dovetail"
                                  "<Image>/File/Create/_Woodrat")

or

(script-fu-menu-register "wrdhb_create_half_blind_dovetail"
                                  "<Image>/File/Create/Woodrat")


Always got the "Woodrat" folder under File | Create menu, no shortcut 
key indicated.




Yrs,

Alan 

Law of Cybernetic Entomology:

   There is always one more bug.


===================== +++++  =====================



_______________________________________________
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user

Reply via email to