[gnome-initial-setup/wip/port-to-gtk4: 89/110] welcome: Handle empty version fields
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup/wip/port-to-gtk4: 89/110] welcome: Handle empty version fields
- Date: Sat, 16 Jul 2022 14:25:58 +0000 (UTC)
commit 5f017fc6bbf63cecec28a1c2dbf1c82db4bf38cb
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Tue Jul 5 13:23:47 2022 -0300
welcome: Handle empty version fields
Instead of showing e.g. "Foo Bar (null)", just show "Foo Bar".
Spotted while porting the Welcome page to GTK4.
gnome-initial-setup/pages/welcome/gis-welcome-page.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/gnome-initial-setup/pages/welcome/gis-welcome-page.c
b/gnome-initial-setup/pages/welcome/gis-welcome-page.c
index 1aa5165f..fc931eeb 100644
--- a/gnome-initial-setup/pages/welcome/gis-welcome-page.c
+++ b/gnome-initial-setup/pages/welcome/gis-welcome-page.c
@@ -64,7 +64,11 @@ update_welcome_title (GisWelcomePage *page)
if (name != NULL)
{
g_autofree char *version = g_get_os_info (G_OS_INFO_KEY_VERSION_ID);
- entity = g_strdup_printf ("%s %s", name, version);
+
+ if (version)
+ entity = g_strdup_printf ("%s %s", name, version);
+ else
+ entity = g_strdup (name);
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]