[gnome-builder/wip/gtk4-port: 458/736] plugins/vcsui: add clone page to greeter workspace
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port: 458/736] plugins/vcsui: add clone page to greeter workspace
- Date: Tue, 26 Apr 2022 01:46:27 +0000 (UTC)
commit 13b9db4218dc9b28746c29687a4702c4b489ff9e
Author: Christian Hergert <chergert redhat com>
Date: Wed Apr 6 17:54:12 2022 -0700
plugins/vcsui: add clone page to greeter workspace
src/plugins/vcsui/gbp-vcsui-workspace-addin.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/src/plugins/vcsui/gbp-vcsui-workspace-addin.c b/src/plugins/vcsui/gbp-vcsui-workspace-addin.c
index 0316f0950..b35fb52cb 100644
--- a/src/plugins/vcsui/gbp-vcsui-workspace-addin.c
+++ b/src/plugins/vcsui/gbp-vcsui-workspace-addin.c
@@ -30,7 +30,8 @@
struct _GbpVcsuiWorkspaceAddin
{
- GObject parent_instance;
+ GObject parent_instance;
+ GbpVcsuiCloneWidget *clone;
};
static void
@@ -45,10 +46,11 @@ gbp_vcsui_workspace_addin_load (IdeWorkspaceAddin *addin,
if (IDE_IS_GREETER_WORKSPACE (workspace))
{
- GbpVcsuiCloneWidget *clone;
-
- clone = g_object_new (GBP_TYPE_VCSUI_CLONE_WIDGET,
- NULL);
+ self->clone = g_object_new (GBP_TYPE_VCSUI_CLONE_WIDGET,
+ NULL);
+ ide_greeter_workspace_add_page (IDE_GREETER_WORKSPACE (workspace),
+ GTK_WIDGET (self->clone),
+ "clone");
}
IDE_EXIT;
@@ -66,6 +68,9 @@ gbp_vcsui_workspace_addin_unload (IdeWorkspaceAddin *addin,
if (IDE_IS_GREETER_WORKSPACE (workspace))
{
+ ide_greeter_workspace_remove_page (IDE_GREETER_WORKSPACE (workspace),
+ GTK_WIDGET (self->clone));
+ self->clone = NULL;
}
IDE_EXIT;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]