[gnome-builder] libide/gui: use workspace actions instead of gtk
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide/gui: use workspace actions instead of gtk
- Date: Fri, 29 Jul 2022 01:12:23 +0000 (UTC)
commit 63ad31410de015203d263a009ba2ed4b3f57b038
Author: Christian Hergert <chergert redhat com>
Date: Thu Jul 28 18:12:17 2022 -0700
libide/gui: use workspace actions instead of gtk
This ensures they end up in workspace.<action-name>.
src/libide/editor/ide-editor-workspace.c | 10 +++++-----
src/libide/gui/ide-primary-workspace.c | 10 +++++-----
src/plugins/menu-search/gtk/menus.ui | 6 +++---
3 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/src/libide/editor/ide-editor-workspace.c b/src/libide/editor/ide-editor-workspace.c
index bba9da5d9..df6967476 100644
--- a/src/libide/editor/ide-editor-workspace.c
+++ b/src/libide/editor/ide-editor-workspace.c
@@ -194,11 +194,11 @@ ide_editor_workspace_foreach_page (IdeWorkspace *workspace,
}
static void
-toggle_panel_action (GtkWidget *widget,
+toggle_panel_action (gpointer instance,
const char *action_name,
GVariant *param)
{
- IdeEditorWorkspace *self = (IdeEditorWorkspace *)widget;
+ IdeEditorWorkspace *self = instance;
g_autofree char *can_property = NULL;
const char *property = NULL;
gboolean reveal;
@@ -276,9 +276,9 @@ ide_editor_workspace_class_init (IdeEditorWorkspaceClass *klass)
gtk_widget_class_bind_template_child (widget_class, IdeEditorWorkspace, header_bar);
gtk_widget_class_bind_template_child (widget_class, IdeEditorWorkspace, project_title);
- gtk_widget_class_install_action (widget_class, "panel.toggle-start", NULL, toggle_panel_action);
- gtk_widget_class_install_action (widget_class, "panel.toggle-end", NULL, toggle_panel_action);
- gtk_widget_class_install_action (widget_class, "panel.toggle-bottom", NULL, toggle_panel_action);
+ ide_workspace_class_install_action (workspace_class, "panel.toggle-start", NULL, toggle_panel_action);
+ ide_workspace_class_install_action (workspace_class, "panel.toggle-end", NULL, toggle_panel_action);
+ ide_workspace_class_install_action (workspace_class, "panel.toggle-bottom", NULL, toggle_panel_action);
g_type_ensure (IDE_TYPE_GRID);
g_type_ensure (IDE_TYPE_NOTIFICATIONS_BUTTON);
diff --git a/src/libide/gui/ide-primary-workspace.c b/src/libide/gui/ide-primary-workspace.c
index 0c804b819..11923f36f 100644
--- a/src/libide/gui/ide-primary-workspace.c
+++ b/src/libide/gui/ide-primary-workspace.c
@@ -208,11 +208,11 @@ ide_primary_workspace_foreach_page (IdeWorkspace *workspace,
}
static void
-toggle_panel_action (GtkWidget *widget,
+toggle_panel_action (gpointer instance,
const char *action_name,
GVariant *param)
{
- IdePrimaryWorkspace *self = (IdePrimaryWorkspace *)widget;
+ IdePrimaryWorkspace *self = instance;
g_autofree char *can_property = NULL;
const char *property = NULL;
gboolean reveal;
@@ -296,9 +296,9 @@ ide_primary_workspace_class_init (IdePrimaryWorkspaceClass *klass)
gtk_widget_class_bind_template_child (widget_class, IdePrimaryWorkspace, project_title);
gtk_widget_class_bind_template_child (widget_class, IdePrimaryWorkspace, run_button);
- gtk_widget_class_install_action (widget_class, "panel.toggle-start", NULL, toggle_panel_action);
- gtk_widget_class_install_action (widget_class, "panel.toggle-end", NULL, toggle_panel_action);
- gtk_widget_class_install_action (widget_class, "panel.toggle-bottom", NULL, toggle_panel_action);
+ ide_workspace_class_install_action (workspace_class, "panel.toggle-start", NULL, toggle_panel_action);
+ ide_workspace_class_install_action (workspace_class, "panel.toggle-end", NULL, toggle_panel_action);
+ ide_workspace_class_install_action (workspace_class, "panel.toggle-bottom", NULL, toggle_panel_action);
g_type_ensure (IDE_TYPE_GRID);
g_type_ensure (IDE_TYPE_NOTIFICATIONS_BUTTON);
diff --git a/src/plugins/menu-search/gtk/menus.ui b/src/plugins/menu-search/gtk/menus.ui
index 8118bcabb..887cba839 100644
--- a/src/plugins/menu-search/gtk/menus.ui
+++ b/src/plugins/menu-search/gtk/menus.ui
@@ -8,7 +8,7 @@
<attribute name="label" translatable="yes">Toggle Left Panel</attribute>
<attribute name="description" translatable="yes">Toggle the left panel in our out of view</attribute>
<attribute name="verb-icon" translatable="yes">panel-left-symbolic</attribute>
- <attribute name="action">panel.toggle-start</attribute>
+ <attribute name="action">workspace.panel.toggle-start</attribute>
</item>
<item>
@@ -16,14 +16,14 @@
<attribute name="label" translatable="yes">Toggle Right Panel</attribute>
<attribute name="description" translatable="yes">Toggle the right panel in our out of view</attribute>
<attribute name="verb-icon" translatable="yes">panel-right-symbolic</attribute>
- <attribute name="action">panel.toggle-end</attribute>
+ <attribute name="action">workspace.panel.toggle-end</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Toggle Bottom Panel</attribute>
<attribute name="description" translatable="yes">Toggle the bottom panel in our out of view</attribute>
<attribute name="verb-icon">panel-bottom-symbolic</attribute>
- <attribute name="action">panel.toggle-bottom</attribute>
+ <attribute name="action">workspace.panel.toggle-bottom</attribute>
</item>
<item>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]