[gnome-builder] plugins/html-preview: cleanup actions usage
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] plugins/html-preview: cleanup actions usage
- Date: Fri, 29 Jul 2022 20:46:36 +0000 (UTC)
commit 6a16cc1eeb70b815917cf2bd4c1a1217e06442e6
Author: Christian Hergert <chergert redhat com>
Date: Fri Jul 29 13:44:35 2022 -0700
plugins/html-preview: cleanup actions usage
src/plugins/html-preview/gbp-html-preview-workspace-addin.c | 12 +++---------
src/plugins/html-preview/gtk/menus.ui | 2 +-
2 files changed, 4 insertions(+), 10 deletions(-)
---
diff --git a/src/plugins/html-preview/gbp-html-preview-workspace-addin.c
b/src/plugins/html-preview/gbp-html-preview-workspace-addin.c
index 2cd2b095f..cc2291441 100644
--- a/src/plugins/html-preview/gbp-html-preview-workspace-addin.c
+++ b/src/plugins/html-preview/gbp-html-preview-workspace-addin.c
@@ -43,7 +43,7 @@ static void live_preview_action (GbpHtmlPreviewWorkspaceAddin *self,
GVariant *params);
IDE_DEFINE_ACTION_GROUP (GbpHtmlPreviewWorkspaceAddin, gbp_html_preview_workspace_addin, {
- { "html-preview", live_preview_action },
+ { "preview", live_preview_action },
})
static void
@@ -59,7 +59,7 @@ gbp_html_preview_workspace_addin_set_language (GbpHtmlPreviewWorkspaceAddin *sel
enabled = language_id != NULL &&
g_hash_table_contains (known_languages, language_id);
- gbp_html_preview_workspace_addin_set_action_enabled (self, "html-preview", enabled);
+ gbp_html_preview_workspace_addin_set_action_enabled (self, "preview", enabled);
}
static void
@@ -133,10 +133,6 @@ gbp_html_preview_workspace_addin_load (IdeWorkspaceAddin *addin,
self->workspace = workspace;
- gtk_widget_insert_action_group (GTK_WIDGET (workspace),
- "html-preview",
- G_ACTION_GROUP (self));
-
self->buffer_signals = g_signal_group_new (IDE_TYPE_BUFFER);
g_signal_connect_object (self->buffer_signals,
"bind",
@@ -169,8 +165,6 @@ gbp_html_preview_workspace_addin_unload (IdeWorkspaceAddin *addin,
g_assert (GBP_IS_HTML_PREVIEW_WORKSPACE_ADDIN (self));
g_assert (IDE_IS_WORKSPACE (workspace));
- gtk_widget_insert_action_group (GTK_WIDGET (workspace), "html-preview", NULL);
-
g_clear_object (&self->buffer_signals);
self->editor_page = NULL;
@@ -207,7 +201,7 @@ gbp_html_preview_workspace_addin_class_init (GbpHtmlPreviewWorkspaceAddinClass *
static void
gbp_html_preview_workspace_addin_init (GbpHtmlPreviewWorkspaceAddin *self)
{
- gbp_html_preview_workspace_addin_set_action_enabled (self, "html-preview", FALSE);
+ gbp_html_preview_workspace_addin_set_action_enabled (self, "preview", FALSE);
}
static void
diff --git a/src/plugins/html-preview/gtk/menus.ui b/src/plugins/html-preview/gtk/menus.ui
index 2c2e89e1a..b813905b2 100644
--- a/src/plugins/html-preview/gtk/menus.ui
+++ b/src/plugins/html-preview/gtk/menus.ui
@@ -5,7 +5,7 @@
<item>
<attribute name="id">html-preview-item</attribute>
<attribute name="label" translatable="yes">Open Preview…</attribute>
- <attribute name="action">html-preview.html-preview</attribute>
+ <attribute name="action">workspace.html-preview.preview</attribute>
<attribute name="hidden-when">action-disabled</attribute>
</item>
</section>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]