[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Google
  Web www.spinics.net

Re: Plugin registration question



On 4 April 2012 16:09, Ofnuts <ofnuts@xxxxxxxxxxx> wrote:
> On 04/03/2012 11:54 AM, Jon Decker wrote:
>>
>> Hello
>>
>> The plugin I have been developing doesn't really relate to individual
>> images (its more of an extension).  In my registration call, how do I make
>> it so that the listing in the menu is never grayed out?  Currently I just
>> open any image to make the entry active, but I'm sure there is a way to make
>> certain entries always active.  I'm using the gimpplugin module.  Thanks
>>
>
> If you define it without parameters is will always be active:

I t is not "without parameters" - it is ratehr, without an image type
- the string right before the parameters sequence.

You can have an "always active" plug-in that accepts parameters, of
course - as all the scripts in the file->create->logo menu.

> --------------------
> #!/usr/bin/env python
> # -*- coding: utf-8 -*-
>
> from gimpfu import *
>
> def always():
>    pdb.gimp_message('Running')
>
>
> register(
>    "always","Always...","Always...",
>    "X","X","2012",
>    "Always...",
>    "",
>    [],[],
>    always,
>    menu="<Image>/File",
> )
>
>
> main()
> --------------------
>
> _______________________________________________
> gimp-developer-list mailing list
> gimp-developer-list@xxxxxxxxx
> http://mail.gnome.org/mailman/listinfo/gimp-developer-list
_______________________________________________
gimp-developer-list mailing list
gimp-developer-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gimp-developer-list



[Home]     [Video For Linux]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Yosemite Book Store]     [gtk]     [GIMP for Windows]     [KDE]     [Scanner]     [Memory]     [GEGL]     [Gimp's Home]     [Gimp on Windows]     [Steve's Art]     [Webcams]

  Powered by Linux