[gnome-software/1690-button-to-go-back-is-missing-in-os-updates-page-opened-from-installed-updates-window: 20/21] gs-update-dialog: Read 'title' property only when it exists
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/1690-button-to-go-back-is-missing-in-os-updates-page-opened-from-installed-updates-window: 20/21] gs-update-dialog: Read 'title' property only when it exists
- Date: Tue, 5 Apr 2022 15:17:29 +0000 (UTC)
commit ab700224879500f3162c74c236efb29120e74c28
Author: Milan Crha <mcrha redhat com>
Date: Mon Mar 28 16:51:37 2022 +0200
gs-update-dialog: Read 'title' property only when it exists
Not every widget packed in the leaflet has the 'title' property,
thus read it only if any such exists. This could cause runtime
warning when moving through installed updates.
src/gs-update-dialog.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/gs-update-dialog.c b/src/gs-update-dialog.c
index 6bcbce10c..22d5654be 100644
--- a/src/gs-update-dialog.c
+++ b/src/gs-update-dialog.c
@@ -56,7 +56,7 @@ leaflet_child_transition_cb (AdwLeaflet *leaflet, GParamSpec *pspec, GsUpdateDia
adw_leaflet_remove (leaflet, child);
child = adw_leaflet_get_visible_child (leaflet);
- if (child != NULL) {
+ if (child != NULL && g_object_class_find_property (G_OBJECT_CLASS (GTK_WIDGET_GET_CLASS (child)),
"title") != NULL) {
g_autofree gchar *title = NULL;
g_object_get (G_OBJECT (child), "title", &title, NULL);
gtk_window_set_title (GTK_WINDOW (dialog), title);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]