[gnome-builder/wip/gtk4-port: 1055/1774] plugins/sysprof: add helper to get GFile for page
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port: 1055/1774] plugins/sysprof: add helper to get GFile for page
- Date: Mon, 11 Jul 2022 22:31:32 +0000 (UTC)
commit 999ddb32f1f72e2aadf1c0caab7acc49375b398d
Author: Christian Hergert <chergert redhat com>
Date: Tue May 17 16:23:24 2022 -0700
plugins/sysprof: add helper to get GFile for page
src/plugins/sysprof/gbp-sysprof-page.c | 4 ++--
src/plugins/sysprof/gbp-sysprof-page.h | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/plugins/sysprof/gbp-sysprof-page.c b/src/plugins/sysprof/gbp-sysprof-page.c
index db20abf0b..56e334943 100644
--- a/src/plugins/sysprof/gbp-sysprof-page.c
+++ b/src/plugins/sysprof/gbp-sysprof-page.c
@@ -45,10 +45,10 @@ G_DEFINE_TYPE (GbpSysprofPage, gbp_sysprof_page, IDE_TYPE_PAGE)
static GParamSpec *properties [N_PROPS];
-static GFile *
+GFile *
gbp_sysprof_page_get_file (GbpSysprofPage *self)
{
- g_assert (GBP_IS_SYSPROF_PAGE (self));
+ g_return_val_if_fail (GBP_IS_SYSPROF_PAGE (self), NULL);
return self->file;
}
diff --git a/src/plugins/sysprof/gbp-sysprof-page.h b/src/plugins/sysprof/gbp-sysprof-page.h
index a668f0fac..a662d32cf 100644
--- a/src/plugins/sysprof/gbp-sysprof-page.h
+++ b/src/plugins/sysprof/gbp-sysprof-page.h
@@ -28,6 +28,7 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (GbpSysprofPage, gbp_sysprof_page, GBP, SYSPROF_PAGE, IdePage)
-GbpSysprofPage *gbp_sysprof_page_new_for_file (GFile *file);
+GbpSysprofPage *gbp_sysprof_page_new_for_file (GFile *file);
+GFile *gbp_sysprof_page_get_file (GbpSysprofPage *self);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]