This commit provides 1 correction and 2.5 enhancements for Geany's context action:
This commit introduces %f, %d, %e, %p, %l placeholders into the context string, i.e. the same ones as in Compile/ Build/ Run. Without them the context is somehow (indeed much) restricted.
(As consequence) the set context action is active when there is no selected text or a word under caret. Even if there are no placeholders in the context string it may contain a really useful command to access with a fast hotkey, all the more the context is specific to the file type. This commit always enables the context if it's defined in Geany's settings no matter there is or no placeholder in it.
(0.5 of enhancement) if there would be some new 'goto & context' menu items with their own requirements for access, this commit would facilitate their implementation.
There are a few bla-bla left. This new Geany's context can respond not only to %s, %f, %d etc., but to all Geany's surroundings. E.g. it can show a current state of the project from different viewpoints. Or perform the various actions for maintainance of it. All that done without leaving Geany IDE. One of innumerable possible implementations is here:
https://wiki.geany.org/howtos/using_with_tcl_tk
As a matter of fact this commit was born of it.
About the modifications of code.
For the access to 'build_replace_placeholder' function (introducing %f, %d .. placeholders) I need to modify build.c and build.h.
It is included in the proper place of callbacks.c.
To unlock the context (and move its access check to other place) I need to comment a line of keybindings.c. Actually this unlocks the hotkey of context.
To enable a separate (from other 'goto' items) checking of context access, I need to modify ui_utils.c (and its ui_utils.h).
The real access to all 'goto' items (the context including) is checked in editor.c.
https://github.com/geany/geany/pull/1841
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.