[gnome-builder] libide/webkit: add helper to check for generator
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide/webkit: add helper to check for generator
- Date: Fri, 16 Sep 2022 23:02:21 +0000 (UTC)
commit f00bf9717555eb9e841729426d8c2b4ddbd4d27a
Author: Christian Hergert <chergert redhat com>
Date: Fri Sep 16 16:00:55 2022 -0700
libide/webkit: add helper to check for generator
We can't persist these currently.
src/libide/webkit/ide-webkit-page.c | 11 +++++++++++
src/libide/webkit/ide-webkit-page.h | 2 ++
2 files changed, 13 insertions(+)
---
diff --git a/src/libide/webkit/ide-webkit-page.c b/src/libide/webkit/ide-webkit-page.c
index f8af06ffe..2d0ddfc4d 100644
--- a/src/libide/webkit/ide-webkit-page.c
+++ b/src/libide/webkit/ide-webkit-page.c
@@ -706,3 +706,14 @@ ide_webkit_page_new_for_generator (IdeHtmlGenerator *generator)
return self;
}
+
+gboolean
+ide_webkit_page_has_generator (IdeWebkitPage *self)
+{
+ IdeWebkitPagePrivate *priv = ide_webkit_page_get_instance_private (self);
+
+ g_return_val_if_fail (IDE_IS_WEBKIT_PAGE (self), FALSE);
+
+ return priv->generator != NULL;
+}
+
diff --git a/src/libide/webkit/ide-webkit-page.h b/src/libide/webkit/ide-webkit-page.h
index 091511fbe..ecc1b7c1a 100644
--- a/src/libide/webkit/ide-webkit-page.h
+++ b/src/libide/webkit/ide-webkit-page.h
@@ -58,5 +58,7 @@ IDE_AVAILABLE_IN_ALL
void ide_webkit_page_reload (IdeWebkitPage *self);
IDE_AVAILABLE_IN_ALL
void ide_webkit_page_reload_ignoring_cache (IdeWebkitPage *self);
+IDE_AVAILABLE_IN_ALL
+gboolean ide_webkit_page_has_generator (IdeWebkitPage *self);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]