It is currently 02 Apr 2020, 09:31


GIMP/GL:  Tutorials | Tips | 🡆 Questions | Interests | Script Requests
Recommendations:  Index | Top 10
Resources:  Python-Fu Plug-ins | Scheme-Fu Scripts | GIMP
Python:  Lessons | Questions | Exercises
The Arts:  GIMPed | GIMPed Photos | Other | Contests | Public Domain Images | Isolated Images | Blender
Inkscape
Social:  Say Hello | Anything Goes | Shares | FCSP

Getting access to a control item

GIMP or GIMP LEARN forum related Questions
No avatar
Janek
Forum Member

Getting access to a control item

Post#1 by Janek » 08 Mar 2019, 09:37


Hi,

I have a python script that requires checkbox to be selected PF_TOGGLE. I'd like to get access to them as I have to make some of them greyed in specific circumstances.

So my question is: how do we get access to the control items inside the opened window when I start my script?

NB: I'm searching for a king of handle to the window, then access to the list of control items inside it.
GIMP Learn rocks...
0

No avatar
Janek
Forum Member

Post#2 by Janek » 08 Mar 2019, 11:11


It sounds like pdb.gimp_progress_get_window_handle could be a good starting point. I continue to investigate.
GIMP Learn rocks...
0

No avatar
Janek
Forum Member

Post#3 by Janek » 08 Mar 2019, 11:31


Did many test and it always returns 0. It sounds like this function does not work.
GIMP Learn rocks...
0

tim
GL Blogger

Post#4 by tim » 09 Mar 2019, 02:07


I don't think you're able to do that.
As by the time you execute your plug-in all the parameters are passed in and no longer have control of the Dialog window.
Unless you want to program your own Dialogs using GTK something which is way above my head.
aka Tin
:tree_02:
Tin's: Favorite Index | Simple Art === fb4yt video search | fb4yt recent video views report
Lottery numbers from image | Interested Members in TLF
Paying for hosting is to support my hobby, and donating money made from ads to The Red Cross.
         
0

No avatar
Janek
Forum Member

Post#5 by Janek » 09 Mar 2019, 13:15


Programming my own dialogs with GTK won't be a big deal but I want to avoid this as it needs the end user to install the GTK lib, tings that I want to avoid.
I was really expecting pdb.gimp_progress_get_window_handle to work fine but it does not. Even if it would have worked properly the following problems would have been to get access to the list of items and it sounds that we don't have any functions to get access to them.

In my situation I have PF_TOGGLE that are there for nothing. Not really good but better than nothing. Just I like clean plug-in and so this one is not.
GIMP Learn rocks...
0


GIMP/GL:  Tutorials | Tips | 🡆 Questions | Interests | Script Requests
Recommendations:  Index | Top 10
Resources:  Python-Fu Plug-ins | Scheme-Fu Scripts | GIMP
Python:  Lessons | Questions | Exercises
The Arts:  GIMPed | GIMPed Photos | Other | Contests | Public Domain Images | Isolated Images | Blender
Inkscape
Social:  Say Hello | Anything Goes | Shares | FCSP

Post Reply
  • Similar Topics
    Replies
    Views
    Last post
• Featuring Members' Works (Image Attachments) •
1: member
2: member
3: member
4: member
5: member

Who is online

Users browsing this forum: No registered users and 4 guests