[geany/geany] bc5b68: Remove indirection from callback handler
Matthew Brush
git-noreply at xxxxx
Fri Aug 10 05:35:16 UTC 2012
Branch: refs/heads/master
Author: Matthew Brush <matt at geany.org>
Committer: Matthew Brush <matt at geany.org>
Date: Fri, 10 Aug 2012 05:35:16
Commit: bc5b68822dee11a7c007fee633cf97db0a55b8dd
https://github.com/geany/geany/commit/bc5b68822dee11a7c007fee633cf97db0a55b8dd
Log Message:
-----------
Remove indirection from callback handler
Modified Paths:
--------------
src/plugins.c
Modified: src/plugins.c
20 files changed, 10 insertions(+), 10 deletions(-)
===================================================================
@@ -1051,11 +1051,19 @@ void plugins_load_active(void)
}
+/* Update the global active plugins list so it's up-to-date when configuration
+ * is saved. Called in response to GeanyObject's "save-settings" signal. */
static void update_active_plugins_pref(void)
{
gint i = 0;
GList *list;
- gsize count = g_list_length(active_plugin_list) + g_list_length(failed_plugins_list);
+ gsize count;
+
+ /* if plugins are disabled, don't clear list of active plugins */
+ if (!want_plugins)
+ return;
+
+ count = g_list_length(active_plugin_list) + g_list_length(failed_plugins_list);
g_strfreev(active_plugins_pref);
@@ -1085,14 +1093,6 @@ static void update_active_plugins_pref(void)
}
-static void on_save_settings(GKeyFile *config)
-{
- /* if plugins are disabled, don't clear list of active plugins */
- if (want_plugins)
- update_active_plugins_pref();
-}
-
-
/* called even if plugin support is disabled */
void plugins_init(void)
{
@@ -1111,7 +1111,7 @@ void plugins_init(void)
stash_group_add_entry(group, &prefs.custom_plugin_path,
"custom_plugin_path", "", "extra_plugin_path_entry");
- g_signal_connect(geany_object, "save-settings", G_CALLBACK(on_save_settings), NULL);
+ g_signal_connect(geany_object, "save-settings", G_CALLBACK(update_active_plugins_pref), NULL);
stash_group_add_string_vector(group, &active_plugins_pref, "active_plugins", NULL);
}
@@ Diff output truncated at 100000 characters. @@
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
More information about the Commits
mailing list