[gnome-builder] plugins/code-index: cleanup action usage
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] plugins/code-index: cleanup action usage
- Date: Fri, 29 Jul 2022 19:28:46 +0000 (UTC)
commit a1a7358d4dcf5e82f2aac93ace22908b8ee7c377
Author: Christian Hergert <chergert redhat com>
Date: Fri Jul 29 12:26:00 2022 -0700
plugins/code-index: cleanup action usage
The action group will automatically be attached so we don't need workspace
helpers to duplicate that.
src/plugins/code-index/gbp-code-index-service.c | 2 +-
.../code-index/gbp-code-index-workbench-addin.c | 26 ----------------------
2 files changed, 1 insertion(+), 27 deletions(-)
---
diff --git a/src/plugins/code-index/gbp-code-index-service.c b/src/plugins/code-index/gbp-code-index-service.c
index 894396eeb..c757b27aa 100644
--- a/src/plugins/code-index/gbp-code-index-service.c
+++ b/src/plugins/code-index/gbp-code-index-service.c
@@ -210,7 +210,7 @@ gbp_code_index_service_init (GbpCodeIndexService *self)
ide_notification_set_body (self->notif, _("Search, diagnostics, and autocompletion may be limited until
complete."));
ide_notification_set_has_progress (self->notif, TRUE);
ide_notification_set_progress (self->notif, 0);
- ide_notification_add_button (self->notif, NULL, icon, "code-index.paused");
+ ide_notification_add_button (self->notif, NULL, icon, "context.workbench.code-index.paused");
self->index = ide_code_index_index_new (IDE_OBJECT (self));
}
diff --git a/src/plugins/code-index/gbp-code-index-workbench-addin.c
b/src/plugins/code-index/gbp-code-index-workbench-addin.c
index b9f57faa3..02605b22a 100644
--- a/src/plugins/code-index/gbp-code-index-workbench-addin.c
+++ b/src/plugins/code-index/gbp-code-index-workbench-addin.c
@@ -97,38 +97,12 @@ gbp_code_index_workbench_addin_project_loaded (IdeWorkbenchAddin *addin,
gbp_code_index_workbench_addin_notify_paused (self, NULL, service);
}
-static void
-gbp_code_index_workbench_addin_workspace_added (IdeWorkbenchAddin *addin,
- IdeWorkspace *workspace)
-{
- GbpCodeIndexWorkbenchAddin *self = (GbpCodeIndexWorkbenchAddin *)addin;
-
- g_assert (IDE_IS_MAIN_THREAD ());
- g_assert (GBP_IS_CODE_INDEX_WORKBENCH_ADDIN (self));
- g_assert (IDE_IS_WORKSPACE (workspace));
-
- gtk_widget_insert_action_group (GTK_WIDGET (workspace), "code-index", G_ACTION_GROUP (self));
-}
-
-static void
-gbp_code_index_workbench_addin_workspace_removed (IdeWorkbenchAddin *addin,
- IdeWorkspace *workspace)
-{
- g_assert (IDE_IS_MAIN_THREAD ());
- g_assert (GBP_IS_CODE_INDEX_WORKBENCH_ADDIN (addin));
- g_assert (IDE_IS_WORKSPACE (workspace));
-
- gtk_widget_insert_action_group (GTK_WIDGET (workspace), "code-index", NULL);
-}
-
static void
workbench_addin_iface_init (IdeWorkbenchAddinInterface *iface)
{
iface->load = gbp_code_index_workbench_addin_load;
iface->unload = gbp_code_index_workbench_addin_unload;
iface->project_loaded = gbp_code_index_workbench_addin_project_loaded;
- iface->workspace_added = gbp_code_index_workbench_addin_workspace_added;
- iface->workspace_removed = gbp_code_index_workbench_addin_workspace_removed;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]