GNOME Bugzilla – Bug 334963
External Tools configuration does not instant apply
Last modified: 2019-03-23 20:46:37 UTC
You have to close the external tools manager for the changes to be applied, which can be annoying when you want to try out your tool. On the other hand the dialog layout only provides a close button instead of a apply/cancel combo. NB. There is a really simple fix but it's ugly and not efficient at all since the current way of updating the menu is to remove it entirely and recreate it.
Could you describe the simple fix you are thinking about?
The simple fix consists on updating the menu (ie destroying it and creating it again) everytime the tools tree is updated. It is not perfect though, because the tree is not updated everytime you move focus from one widget to another. Currently the XML tree is updated when you click on a tool in the left-hand side list.
What about updating the menu when the dialog looses the focus? We should also check the case an accellerator is used to activate a tool and the focus is on the dialog. I'm quite sure this will not be a problem since the main window will not get the accellerator and so it should not be possible to activate a tool using the accellerator without first moving the focus out of the dialog, but I may be wrong.
Created attachment 61485 [details] [review] Apply Paolo's idea for auto-apply This patch applies the idea provided by Paolo Maggi. This needs some further testing. I just noticed some glitches about the accelerators which are not always correctly updated (but this is also the case without the patch). I think it comes from GTK way to set custom accelerators.
The patch looks fine to me. I see the accel problem, but I don't see how it has anything to do with this patch. It's a separate problem which needs investigation. I say to put the patch in.
The patch has been committed. I don't close the bug yet so that I'll be able to implement autoapply more nicely. Ideally only the menus that have changed should be updated.
Closing this bug as there is no really better way to handle this issue than the current one.