On Jul 8, 2015 7:18 PM, Matthew Brush <mbr...@codebrainz.ca> wrote: > > On 2015-07-08 10:57 AM, Steven Blatnick wrote: > > So I've finally got a chance to look at my non-API calls. I was able to > > code around most of them, but there are two that would be much easier if > > we could make them APIs. (I haven't pushed any of these changes to my > > git repo yet.) Could we consider making these API? > > > > * keybindings_load_keyfile - I dynamically add/remove a variable > > number of plugin keybindings based on the plugin settings, so this > > allows me to refresh the results easily. This allows my > > external-tools plugin to have any number of tools with each their > > own keybinding. Otherwise, most plugins have a set number of bindings. > > This sounds dubious. > > I assume you're talking about `external-tools` plugin? Maybe I don't > understand the code enough, but it looks to me like it's just leaking > GeanyKeyGroups in `reload_tools()` and then calling > `keybindings_load_keyfile()` happens to reload the key group it newly > created? > > I completely agree there needs to be a way to dynamically add/remove > keybindings, but I'm not sure we should promote this way if I understand > it correctly. IMO, it would be much better to fix Geany. I agree. Maybe a reload_plugin type function? I saw a similar problem in gedit plugins, where you have to restart the editor for some things to take effect. And you're right, if i remember correctly, I just want to be able to reload my own shortcuts, and the existing call does them all, which is overkill to say the least. > > > * keybindings_lookup_item - I know keybindings_get_item is available > > already, but I am attempting to look up a core group keybinding and > > not plugin's own keybindings. > > This sounds reasonable, though I think it would be better if made public > to rename it to something like `keybindings_get_builtin_item()` or > something. Also I think we should change the signature to use the > correct types (those enums we already expose). Alternatively, is there an event i can tie in to? Basically the issue here is in focusing on the side panel or bottom panel, the focus lands in the wrong place to then capture ctrl+pg_up/down to switch notebook tabs. For example, when focusing my panel in external-tools, I need the focus to update to the read-only text field instead of the notebook tab label. I know I can use tab, but I'm trying to make the usage fluid.
> > > * keybindings_dialog_show_prefs_scroll - I remember someone saying the > > "Configure Plugins" window would have a button to this already in a > > later version, but I still don't see it. I only need this API if > > the button isn't added. > > > > Could probably make such a button/link use the same code as the > "Keybindings" button in the Plugin Manager dialog, since it does just > that. It might be a bit awkward UI-wise though. I'm not sure why that would be awkward? I'm away from the code right now, but I think this call is the same as that button, it just needs to be made an API. > > > Let me know if this is possible or how I should proceed. I use geany > > with my plugins daily, and can't upgrade my code base until my plugins > > are working. > > > > Best is to make a PR with the changes you want. Second best is to raise > an Issue and hope somebody else wants them enough to do it. Ok, thanks! I'll see what I can do based on the feedback. Steve > > Cheers, > Matthew Brush > > _______________________________________________ > Devel mailing list > Devel@lists.geany.org > https://lists.geany.org/cgi-bin/mailman/listinfo/devel _______________________________________________ Devel mailing list Devel@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/devel