[gnome-builder/wip/gtk4-port] libide/greeter: include title in greeter page
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port] libide/greeter: include title in greeter page
- Date: Wed, 27 Apr 2022 02:30:56 +0000 (UTC)
commit e2c143388f81e34a6472acf282dcbf9523e29209
Author: Christian Hergert <chergert redhat com>
Date: Tue Apr 26 19:30:51 2022 -0700
libide/greeter: include title in greeter page
src/libide/greeter/ide-greeter-workspace.c | 8 ++++++--
src/libide/greeter/ide-greeter-workspace.h | 3 ++-
src/plugins/create-project/gbp-create-project-workspace-addin.c | 3 ++-
src/plugins/vcsui/gbp-vcsui-workspace-addin.c | 3 ++-
4 files changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/src/libide/greeter/ide-greeter-workspace.c b/src/libide/greeter/ide-greeter-workspace.c
index fcaf3af39..05d1d1013 100644
--- a/src/libide/greeter/ide-greeter-workspace.c
+++ b/src/libide/greeter/ide-greeter-workspace.c
@@ -1013,12 +1013,16 @@ ide_greeter_workspace_set_page_name (IdeGreeterWorkspace *self,
void
ide_greeter_workspace_add_page (IdeGreeterWorkspace *self,
GtkWidget *page,
- const char *name)
+ const char *name,
+ const char *title)
{
+ GtkStackPage *child;
+
g_return_if_fail (IDE_IS_GREETER_WORKSPACE (self));
g_return_if_fail (GTK_IS_WIDGET (page));
- gtk_stack_add_named (self->pages, page, name);
+ child = gtk_stack_add_named (self->pages, page, name);
+ gtk_stack_page_set_title (child, title);
}
void
diff --git a/src/libide/greeter/ide-greeter-workspace.h b/src/libide/greeter/ide-greeter-workspace.h
index fb0560f1e..4ec89df46 100644
--- a/src/libide/greeter/ide-greeter-workspace.h
+++ b/src/libide/greeter/ide-greeter-workspace.h
@@ -63,7 +63,8 @@ void ide_greeter_workspace_open_project (IdeGreeterWorkspa
IDE_AVAILABLE_IN_ALL
void ide_greeter_workspace_add_page (IdeGreeterWorkspace *self,
GtkWidget *widget,
- const char *name);
+ const char *name,
+ const char *title);
IDE_AVAILABLE_IN_ALL
void ide_greeter_workspace_remove_page (IdeGreeterWorkspace *self,
GtkWidget *widget);
diff --git a/src/plugins/create-project/gbp-create-project-workspace-addin.c
b/src/plugins/create-project/gbp-create-project-workspace-addin.c
index 45725df15..70945a473 100644
--- a/src/plugins/create-project/gbp-create-project-workspace-addin.c
+++ b/src/plugins/create-project/gbp-create-project-workspace-addin.c
@@ -59,7 +59,8 @@ gbp_create_project_workspace_addin_load (IdeWorkspaceAddin *addin,
self->widget = g_object_new (GBP_TYPE_CREATE_PROJECT_WIDGET, NULL);
ide_greeter_workspace_add_page (IDE_GREETER_WORKSPACE (workspace),
GTK_WIDGET (self->widget),
- "create-project");
+ "create-project",
+ _("Start New Project"));
IDE_EXIT;
}
diff --git a/src/plugins/vcsui/gbp-vcsui-workspace-addin.c b/src/plugins/vcsui/gbp-vcsui-workspace-addin.c
index 2733728fa..8dd989f95 100644
--- a/src/plugins/vcsui/gbp-vcsui-workspace-addin.c
+++ b/src/plugins/vcsui/gbp-vcsui-workspace-addin.c
@@ -58,7 +58,8 @@ gbp_vcsui_workspace_addin_load (IdeWorkspaceAddin *addin,
NULL);
ide_greeter_workspace_add_page (IDE_GREETER_WORKSPACE (workspace),
GTK_WIDGET (self->clone),
- "clone");
+ "clone",
+ _("Clone Repository"));
ide_greeter_workspace_add_button (IDE_GREETER_WORKSPACE (workspace),
g_object_new (GTK_TYPE_BUTTON,
"label", _("_Clone Repository…"),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]