[gnome-builder/wip/gtk4-port: 441/1774] libide/greeter: add/remove page helpers
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port: 441/1774] libide/greeter: add/remove page helpers
- Date: Mon, 11 Jul 2022 22:31:12 +0000 (UTC)
commit 2dfb794ebd586da5f75a5b1bc99f7d1a50a9f3be
Author: Christian Hergert <chergert redhat com>
Date: Wed Apr 6 17:53:05 2022 -0700
libide/greeter: add/remove page helpers
src/libide/greeter/ide-greeter-workspace.c | 21 +++++++++++++++++++++
src/libide/greeter/ide-greeter-workspace.h | 7 +++++++
2 files changed, 28 insertions(+)
---
diff --git a/src/libide/greeter/ide-greeter-workspace.c b/src/libide/greeter/ide-greeter-workspace.c
index a86fdcde7..086d8c77e 100644
--- a/src/libide/greeter/ide-greeter-workspace.c
+++ b/src/libide/greeter/ide-greeter-workspace.c
@@ -987,3 +987,24 @@ ide_greeter_workspace_set_page_name (IdeGreeterWorkspace *self,
gtk_stack_set_visible_child_name (self->pages, name);
}
+
+void
+ide_greeter_workspace_add_page (IdeGreeterWorkspace *self,
+ GtkWidget *page,
+ const char *name)
+{
+ 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);
+}
+
+void
+ide_greeter_workspace_remove_page (IdeGreeterWorkspace *self,
+ GtkWidget *page)
+{
+ g_return_if_fail (IDE_IS_GREETER_WORKSPACE (self));
+ g_return_if_fail (GTK_IS_WIDGET (page));
+
+ gtk_stack_remove (self->pages, page);
+}
diff --git a/src/libide/greeter/ide-greeter-workspace.h b/src/libide/greeter/ide-greeter-workspace.h
index 7ebc4d673..fb0560f1e 100644
--- a/src/libide/greeter/ide-greeter-workspace.h
+++ b/src/libide/greeter/ide-greeter-workspace.h
@@ -61,6 +61,13 @@ IDE_AVAILABLE_IN_ALL
void ide_greeter_workspace_open_project (IdeGreeterWorkspace *self,
IdeProjectInfo *project_info);
IDE_AVAILABLE_IN_ALL
+void ide_greeter_workspace_add_page (IdeGreeterWorkspace *self,
+ GtkWidget *widget,
+ const char *name);
+IDE_AVAILABLE_IN_ALL
+void ide_greeter_workspace_remove_page (IdeGreeterWorkspace *self,
+ GtkWidget *widget);
+IDE_AVAILABLE_IN_ALL
GtkWidget *ide_greeter_workspace_get_page (IdeGreeterWorkspace *self);
IDE_AVAILABLE_IN_ALL
void ide_greeter_workspace_set_page (IdeGreeterWorkspace *self,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]