[gnome-builder/wip/gtk4-port: 1061/1774] plugins/sysprof: implement split support for pages
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port: 1061/1774] plugins/sysprof: implement split support for pages
- Date: Mon, 11 Jul 2022 22:31:33 +0000 (UTC)
commit 2ee3b9f538c2209bbe23badb4d4d2bfcee6575e9
Author: Christian Hergert <chergert redhat com>
Date: Tue May 17 16:57:13 2022 -0700
plugins/sysprof: implement split support for pages
This doesn't really get used yet, but trivial to have ready for when we
might want to by moving to a new workspace, for example.
src/plugins/sysprof/gbp-sysprof-page.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
---
diff --git a/src/plugins/sysprof/gbp-sysprof-page.c b/src/plugins/sysprof/gbp-sysprof-page.c
index 56e334943..c70e9b9bd 100644
--- a/src/plugins/sysprof/gbp-sysprof-page.c
+++ b/src/plugins/sysprof/gbp-sysprof-page.c
@@ -66,6 +66,18 @@ gbp_sysprof_page_set_file (GbpSysprofPage *self,
g_set_object (&self->file, file);
sysprof_display_open (self->display, file);
+ ide_page_set_can_split (IDE_PAGE (self), TRUE);
+}
+
+static IdePage *
+gbp_sysprof_page_create_split (IdePage *page)
+{
+ GbpSysprofPage *self = (GbpSysprofPage *)page;
+
+ g_assert (GBP_IS_SYSPROF_PAGE (page));
+ g_assert (G_IS_FILE (self->file));
+
+ return IDE_PAGE (gbp_sysprof_page_new_for_file (self->file));
}
static void
@@ -120,11 +132,14 @@ static void
gbp_sysprof_page_class_init (GbpSysprofPageClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ IdePageClass *page_class = IDE_PAGE_CLASS (klass);
object_class->dispose = gbp_sysprof_page_dispose;
object_class->get_property = gbp_sysprof_page_get_property;
object_class->set_property = gbp_sysprof_page_set_property;
+ page_class->create_split = gbp_sysprof_page_create_split;
+
properties [PROP_FILE] =
g_param_spec_object ("file", NULL, NULL,
G_TYPE_FILE,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]