[gnome-builder/wip/gtk4-port: 1337/1774] libide/webkit: add fallback icon when no favicon is available
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port: 1337/1774] libide/webkit: add fallback icon when no favicon is available
- Date: Mon, 11 Jul 2022 22:31:42 +0000 (UTC)
commit af5d2741c670d09d507d77fff859d160a8eedc8c
Author: Christian Hergert <chergert redhat com>
Date: Fri Jun 3 14:30:10 2022 -0700
libide/webkit: add fallback icon when no favicon is available
src/libide/webkit/ide-webkit-page.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/libide/webkit/ide-webkit-page.c b/src/libide/webkit/ide-webkit-page.c
index 688c93cbf..8e1b30ceb 100644
--- a/src/libide/webkit/ide-webkit-page.c
+++ b/src/libide/webkit/ide-webkit-page.c
@@ -81,14 +81,18 @@ transform_cairo_surface_to_gicon (GBinding *binding,
int height;
g_assert (G_IS_BINDING (binding));
- g_assert (from_value != NULL);
- g_assert (to_value != NULL);
+ g_assert (G_VALUE_HOLDS_POINTER (from_value));
+ g_assert (G_VALUE_HOLDS_OBJECT (to_value));
g_assert (IDE_IS_WEBKIT_PAGE (self));
/* No ownership transfer */
surface = g_value_get_pointer (from_value);
+
if (surface == NULL)
- return TRUE;
+ {
+ g_value_take_object (to_value, g_themed_icon_new ("web-browser-symbolic"));
+ return TRUE;
+ }
width = 16 * gtk_widget_get_scale_factor (GTK_WIDGET (self));
height = 16 * gtk_widget_get_scale_factor (GTK_WIDGET (self));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]