From ee7ed5a1d18c24f336c1cad1547ede9052d00828 Mon Sep 17 00:00:00 2001 From: Philip Chimento Date: Sun, 7 Apr 2024 21:34:14 -0700 Subject: [PATCH] Remove I7App parameter from i7_app_foreach_installed_extension callbacks It is no longer needed. --- src/app.c | 10 +++++----- src/app.h | 6 ++---- src/searchwindow.c | 2 +- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/app.c b/src/app.c index 56a1d3be..e7b86c90 100644 --- a/src/app.c +++ b/src/app.c @@ -945,7 +945,7 @@ i7_app_foreach_installed_extension(I7App *self, gboolean builtin, I7AppAuthorFun continue; if(author_func) - author_result = author_func(self, author_info, author_func_data); + author_result = author_func(author_info, author_func_data); else author_result = NULL; @@ -965,7 +965,7 @@ i7_app_foreach_installed_extension(I7App *self, gboolean builtin, I7AppAuthorFun continue; if(extension_func) - extension_func(self, author_file, extension_info, author_result, extension_func_data); + extension_func(author_file, extension_info, author_result, extension_func_data); g_object_unref(extension_info); } @@ -994,7 +994,7 @@ i7_app_foreach_installed_extension(I7App *self, gboolean builtin, I7AppAuthorFun /* Helper function: Add author to tree store callback */ static GtkTreeIter * -add_author_to_tree_store(I7App *app, GFileInfo *info, GtkTreeStore *store) +add_author_to_tree_store(GFileInfo *info, GtkTreeStore *store) { GtkTreeIter parent_iter; const char *author_display_name = g_file_info_get_display_name(info); @@ -1016,7 +1016,7 @@ add_author_to_tree_store(I7App *app, GFileInfo *info, GtkTreeStore *store) /* Helper function: add extension to tree store as a non-built-in extension */ static void -add_extension_to_tree_store(I7App *app, GFile *parent, GFileInfo *info, GtkTreeIter *parent_iter, GtkTreeStore *store) +add_extension_to_tree_store(GFile *parent, GFileInfo *info, GtkTreeIter *parent_iter, GtkTreeStore *store) { GError *error = NULL; const char *extension_name = g_file_info_get_name(info); @@ -1055,7 +1055,7 @@ add_extension_to_tree_store(I7App *app, GFile *parent, GFileInfo *info, GtkTreeI /* Helper function: add extension to tree store as a built-in extension. Makes * sure that user-installed extensions override the built-in ones. */ static void -add_builtin_extension_to_tree_store(I7App *app, GFile *parent, GFileInfo *info, GtkTreeIter *parent_iter, GtkTreeStore *store) +add_builtin_extension_to_tree_store(GFile *parent, GFileInfo *info, GtkTreeIter *parent_iter, GtkTreeStore *store) { GError *error = NULL; const char *extension_name = g_file_info_get_name(info); diff --git a/src/app.h b/src/app.h index dc9a870c..ecdd6465 100644 --- a/src/app.h +++ b/src/app.h @@ -39,7 +39,6 @@ typedef void (*I7DocumentForeachFunc)(I7Document *, gpointer); /** * I7AppAuthorFunc: - * @app: the application * @info: the #GFileInfo for the author directory. * @data: user data to pass to the callback. * @@ -47,10 +46,9 @@ typedef void (*I7DocumentForeachFunc)(I7Document *, gpointer); * directory. May return a result, which is passed to #I7AppExtensionFunc for * each extension file found in that author directory. */ -typedef void * (*I7AppAuthorFunc)(I7App *app, GFileInfo *info, void *data); +typedef void * (*I7AppAuthorFunc)(GFileInfo *info, void *data); /** * I7AppExtensionFunc: - * @app: the application * @parent: the #GFile for the extension file's parent. * @info: the #GFileInfo for the extension file. * @author_result: the return value of the #I7AppAuthorFunc for the parent. @@ -59,7 +57,7 @@ typedef void * (*I7AppAuthorFunc)(I7App *app, GFileInfo *info, void *data); * Callback for enumerating installed extensions, called for each author * directory. */ -typedef void (*I7AppExtensionFunc)(I7App *app, GFile *parent, GFileInfo *info, void *author_result, void *data); +typedef void (*I7AppExtensionFunc)(GFile *parent, GFileInfo *info, void *author_result, void *data); GType i7_app_get_type(void) G_GNUC_CONST; I7App *i7_app_new(void); diff --git a/src/searchwindow.c b/src/searchwindow.c index 2e5cb746..137cad61 100644 --- a/src/searchwindow.c +++ b/src/searchwindow.c @@ -733,7 +733,7 @@ i7_search_window_search_project(I7SearchWindow *self) } static void -extension_search_result(I7App *app, GFile *parent, GFileInfo *info, gpointer unused, I7SearchWindow *self) +extension_search_result(GFile *parent, GFileInfo *info, gpointer unused, I7SearchWindow *self) { I7SearchWindowPrivate *priv = i7_search_window_get_instance_private(self); GError *err = NULL;