RSS/Atom feed Twitter
Site is read-only, email is disabled

Updating plugin dialog after click in main window

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

4 of 4 messages available
Toggle history

Please log in to manage your subscriptions.

Updating plugin dialog after click in main window fgingras 09 Sep 15:05
  Updating plugin dialog after click in main window Emil Brink 09 Sep 15:15
  Updating plugin dialog after click in main window Liam R E Quin 09 Sep 18:19
  Updating plugin dialog after click in main window Bill Skaggs 09 Sep 18:34
fgingras
2009-09-09 15:05:41 UTC (about 15 years ago)

Updating plugin dialog after click in main window

Hey all,

I believe this message's subject is quite explicit; basically, I have a plugin dialog in which the user can input three 0-255 numbers for color selection, or alternately use the current foreground color. What I'm looking for is a way for the plugin to know when it should update its own dialog, which would be the time when the user uses the color picker and clicks somewhere on the opened image. As it currently is, picking a color leaves the dialog's inputs unchanged, which is not very elegant.

Also, I was wondering if there is an easy way to add a "color selector thing" (this thing where all available colors are displayed in a rectangle space so you can just click on the one you want) to the dialog. I'm guessing this is more GTK related, but I can't seem to find information about it.

Thank you all and please have a nice day!

François Gingras

Emil Brink
2009-09-09 15:15:08 UTC (about 15 years ago)

Updating plugin dialog after click in main window

On Wed, Sep 9, 2009 at 3:05 PM, fgingras wrote:

[snip]

Also, I was wondering if there is an easy way to add a "color selector thing" (this thing where all available colors are displayed in a rectangle space so you can just click on the one you want) to the dialog. I'm guessing this is more GTK related, but I can't seem to find information about it.

Sounds like a http://library.gnome.org/devel/gtk/stable/GtkColorSelection.html to me.

/Emil

Liam R E Quin
2009-09-09 18:19:42 UTC (about 15 years ago)

Updating plugin dialog after click in main window

On Wed, 2009-09-09 at 06:05 -0700, fgingras wrote:

What I'm looking
for is a way for the plugin to know when it should update its own dialog, which would be the time when the user uses the color picker and clicks somewhere on the opened image.

I'd say look at something like the colour-to-transparency code.

Liam

Bill Skaggs
2009-09-09 18:34:48 UTC (about 15 years ago)

Updating plugin dialog after click in main window

What you want is probably either a GimpColorSelection ( http://developer.gimp.org/api/2.0/libgimpwidgets/GimpColorSelection.html ) or a GimpColorButton
( http://developer.gimp.org/api/2.0/libgimpwidgets/GimpColorButton.html ), which pops up a GimpColorSelection when pressed. I don't think there is any way
to get it to update automatically when the core changes. Once upon a time this
happened without any programming needed, but in the current Gimp, each plug-in has its own "context" for things like colors, and there is no way for
the core Gimp application to pass messages to a plug-in, except in response to a
request from the plug-in. The only way to do it, as far as I know, is for the
plug-in to interrogate the core at regular intervals to see if anything has changed, and that's a nasty solution.

-- Bill