[recipes] Avoid a (null) showing up in the about dialog
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] Avoid a (null) showing up in the about dialog
- Date: Tue, 21 Feb 2017 03:16:21 +0000 (UTC)
commit 9adcf9dc7944f332cd9e3940a8a2b7534d4f89f0
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Feb 20 22:15:23 2017 -0500
Avoid a (null) showing up in the about dialog
Currently, we can't find out the OS name when running
in a sandbox (I've filed a ticket to have that fixed).
But we still shouldn't show (null).
src/gr-about-dialog.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/gr-about-dialog.c b/src/gr-about-dialog.c
index 37ca146..fcaaf4a 100644
--- a/src/gr-about-dialog.c
+++ b/src/gr-about-dialog.c
@@ -215,6 +215,13 @@ get_os_information (char **os_name,
if (platform && minor && micro)
*version = g_strconcat (platform, ".", minor, ".", micro, NULL);
}
+
+ if (!*os_name)
+ *os_name = g_strdup (_("Unknown"));
+ if (!*os_type)
+ *os_type = g_strdup (_("Unknown"));
+ if (!*desktop)
+ *desktop = g_strdup (_("Unknown"));
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]