[geany/geany] 745f42: Export keybindings_load_keyfile() for plugins

Jiří Techet git-noreply at xxxxx
Fri Aug 4 07:37:19 UTC 2017

Branch:      refs/heads/master
Author:      Jiří Techet <techet at gmail.com>
Committer:   Matthew Brush <mbrush at codebrainz.ca>
Date:        Fri, 04 Aug 2017 07:37:19 UTC
Commit:      745f424b7752e1f181e0ef82b1d00ed99d6c69a7

Log Message:
Export keybindings_load_keyfile() for plugins

This allows plugins to reload keybindings later during their execution.
For more info see the comment in the commit.

Closes #1430

Modified Paths:

Modified: src/keybindings.c
9 lines changed, 9 insertions(+), 0 deletions(-)
@@ -824,6 +824,15 @@ static void apply_kb_accel(GeanyKeyGroup *group, GeanyKeyBinding *kb, gpointer u
+/** Reloads keybinding settings from configuration file. Normally plugins do
+ * not need to call this function as it is called automatically when a the
+ * plugin is activated. However, plugins which need to create keybindings
+ * dynamically and reload them when needed should call this function after
+ * all keybindings have been updated with plugin_set_key_group() and
+ * keybindings_set_item() calls - this makes sure that the corresponding user
+ * keybinding shortcuts are applied.
+ * @since 1.31. */
 void keybindings_load_keyfile(void)

Modified: src/keybindings.h
4 lines changed, 2 insertions(+), 2 deletions(-)
@@ -293,15 +293,15 @@ GeanyKeyBinding *keybindings_get_item(GeanyKeyGroup *group, gsize key_id);
 GdkModifierType keybindings_get_modifiers(GdkModifierType mods);
+void keybindings_load_keyfile(void);
 extern GPtrArray *keybinding_groups;	/* array of GeanyKeyGroup pointers */
 void keybindings_init(void);
-void keybindings_load_keyfile(void);
 void keybindings_free(void);
 GeanyKeyGroup *keybindings_get_core_group(guint id);

This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).

More information about the Commits mailing list