Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Setting GTK Dialog default answers
#1
I'm sure that due to an upgrade from GTK2 to GTK3, the default responses (i.e., the active button) when a pop-up dialog displays changed between GIMP 2.8 and 2.10.  Even after a few years, these changes still bother me.  Is there any way, external to the GIMP code itself, that the default responses for a given dialog can be set?  I'm hoping that there is some kind of external file where this might be set.  I'm just not familiar enough with the GTK internals to know if this is possible or not.

Thanks for any insights.
Reply
#2
From another post you are using xubuntu 20.04. When you look at a Gimp 2.10 installation, then a libgimp dependency is GTK2

AFAIK, you have to go to Gimp 2.99 for GTK3.

Quote:..snip..when a pop-up dialog displays changed between GIMP 2.8 and 2.10.

Give an example of the change, it might help.

When it comes to GTK an interesting run-down here https://fosspost.org/gtk-4-0-released/ (from a couple of years ago)
Reply
#3
Rich, I'm on Xubuntu 22.04.1 now, but was on 20.04 up until a few months ago. I am using GIMP 2.10.32, but saw the menu changes back during the transition from 2.8 to 2.10. As far as GTK goes, I guess I just assumed that that was the transition from GTK2 to GTK3, but apparently see I was working from an incorrect assumption. (Was that the jump from GTK1 to 2???) I've had a number of other problems in the past with the GTK2 to 3 transition with other programs and I just assumed that that applied to GIMP as well since this is the Gimp Tool Kit! So thanks for setting me straight. And thanks for the link to the article. It is unfortunate that things move in these fits-and-jumps.

My query still remains. Is there any way to gain control over the menu button selection hierarchy?

Examples: Previously, on menus such as "Selective Gaussian Blur" or "Sharpen (Unsharp Mask)," the default button was OK so I just needed to simply hit Return to perform the function. Now the default button is Presets which forces me to either grab the mouse to execute the command, or type Shift-Tab before hitting Return.

Another case is when I directly edit JPG images and do not save an XCF version of the work. After exporting the revised JPG I want to close the GIMP tab (Ctrl-W). Previously the pop-up close window has the Discard Changes button active so, again, I could execute the desired command by hitting Return. Now, the active button is Cancel and I have to hit Tab to activate Discard Changes button before hitting Return.

What I'm looking for is a way to specify which button comes up as active so that I can immediately get the behavior I'm looking for 99% of the time without having to jump through hoops. I'm sure other people would want different default activations and if there is a way to control this with a setup file, everyone could get the behavior they like. Editing the code to rearrange the order in which the buttons on all these menus is defined would be a hopeless endeavor, as it would have to be done again and again for every point release. I'm hoping that GTK provides a way to do this.
Reply
#4
I have both a Gimp 2.8.22 and a Gimp 2.10.32 on a kubuntu 20.04 installation.

Quote:Examples: Previously, on menus such as "Selective Gaussian Blur" or "Sharpen (Unsharp Mask)," the default button was OK so I just needed to simply hit Return to perform the function. Now the default button is Presets which forces me to either grab the mouse to execute the command, or type Shift-Tab before hitting Return.

I can not get (say) the selective-blur tool to apply by hitting the enter key, so our installations differ there.

What does work in both Gimp's is the Alt key to show the quick key, giving alt-o (as in Ok) to apply and close the dialogue.

Why the difference between Kubuntu and Xubuntu, I do not know.

The big difference, of course, is the change to GEGL in Gimp 2.10, where the filter effect is shown on canvas. A great improvement.

Quote:Another case is when I directly edit JPG images and do not save an XCF version of the work. After exporting the revised JPG I want to close the GIMP tab (Ctrl-W). Previously the pop-up close window has the Discard Changes button active so, again, I could execute the desired command by hitting Return. Now, the active button is Cancel and I have to hit Tab to activate Discard Changes button before hitting Return.

Similar to previous situation, here the Discard Changes button is not active but alt-d (as in d(iscard) applies).

There are other ways. This goes way back to the Gimp 2.8 introduction of Save vs Export, a plugin to quickly export and mark the image clean. https://github.com/akkana/gimp-plugins/b...t-clean.py You do have to be careful with this one, you can lose the original if not careful, but after the export, apply the plugin (I have it set to the 's' key) You do not get the Discard Changes Dialogue, the image closes straight away.
Reply
#5
rich2005:

Thanks for the reminder about the alt-<letter> options to select menu buttons. That helps but I would still like to be able to reassign the default buttons on various menus so that the desired default action was always immediately selected and I could go back to a uniform and predictable method of interfacing with GIMP rather than having to be aware of the requirements in every instance. Of course, what I think of as proper defaults will differ from others, which is why I was hoping that GTK might allow this to be specified external to the program.

I remember the controversy regarding save/export in going from 2.8 to 2.10. I decided to just embrace the change and learn the new procedure. I like the "save" reminder, but I always manually save when I'm working in and xcf image and would just like to get the desired default when I'm not saving in the GIMP format.

Regards.
Reply


Forum Jump: