[gnome-builder/wip/gtk4-port: 912/1774] libide/gui: leave TODO about plugin unloading
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port: 912/1774] libide/gui: leave TODO about plugin unloading
- Date: Mon, 11 Jul 2022 22:31:28 +0000 (UTC)
commit 70ddf864c8e0ab495f5322b64c87d16450b73f17
Author: Christian Hergert <chergert redhat com>
Date: Sun May 8 10:46:52 2022 -0700
libide/gui: leave TODO about plugin unloading
src/libide/gui/ide-application-plugins.c | 2 ++
src/libide/gui/ide-application-private.h | 2 ++
src/libide/gui/ide-application.c | 11 +++++++++++
3 files changed, 15 insertions(+)
---
diff --git a/src/libide/gui/ide-application-plugins.c b/src/libide/gui/ide-application-plugins.c
index 02df5388e..e7c37c497 100644
--- a/src/libide/gui/ide-application-plugins.c
+++ b/src/libide/gui/ide-application-plugins.c
@@ -280,6 +280,8 @@ ide_application_plugins_unload_plugin_after_cb (IdeApplication *self,
module_dir = peas_plugin_info_get_module_dir (plugin_info);
module_name = peas_plugin_info_get_module_name (plugin_info);
+ _ide_application_remove_resources (self, module_dir);
+
g_debug ("Unloaded plugin \"%s\" with module-dir \"%s\"",
module_name, module_dir);
}
diff --git a/src/libide/gui/ide-application-private.h b/src/libide/gui/ide-application-private.h
index cc02d7547..62e3884c6 100644
--- a/src/libide/gui/ide-application-private.h
+++ b/src/libide/gui/ide-application-private.h
@@ -114,5 +114,7 @@ void _ide_application_command_line (IdeApplication
GApplicationCommandLine *cmdline);
void _ide_application_add_resources (IdeApplication *self,
const char *path);
+void _ide_application_remove_resources (IdeApplication *self,
+ const char *path);
G_END_DECLS
diff --git a/src/libide/gui/ide-application.c b/src/libide/gui/ide-application.c
index 554e02282..b24c53cba 100644
--- a/src/libide/gui/ide-application.c
+++ b/src/libide/gui/ide-application.c
@@ -332,6 +332,17 @@ _ide_application_add_resources (IdeApplication *self,
ide_shortcut_manager_add_resources (resource_path);
}
+void
+_ide_application_remove_resources (IdeApplication *self,
+ const char *resource_path)
+{
+ g_return_if_fail (IDE_IS_APPLICATION (self));
+ g_return_if_fail (resource_path != NULL);
+
+ /* Unmerge menus, keybindings, etc */
+ g_warning ("TODO: implement resource unloading for plugins: %s", resource_path);
+}
+
static void
ide_application_get_property (GObject *object,
guint prop_id,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]