summaryrefslogtreecommitdiff
path: root/panels/info
diff options
context:
space:
mode:
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2016-07-11 14:39:05 -0300
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2016-07-12 12:45:36 -0300
commit6052e469a957203f5e339c44f828349b417679b8 (patch)
treecfffa7fe6b6c4706df248e727fd66f4c9f5e35e6 /panels/info
parent8b70c44b5a7868c0895e2b358323fc350f3ccba9 (diff)
downloadgnome-control-center-6052e469a957203f5e339c44f828349b417679b8.tar.gz
info: show build-id
While developing, it's useful to show the build id of the installed OS when available, which the info panel doesn't handle for now. https://bugzilla.gnome.org/show_bug.cgi?id=768693
Diffstat (limited to 'panels/info')
-rw-r--r--panels/info/cc-info-panel.c29
1 files changed, 22 insertions, 7 deletions
diff --git a/panels/info/cc-info-panel.c b/panels/info/cc-info-panel.c
index d6c47b08d..79729dd06 100644
--- a/panels/info/cc-info-panel.c
+++ b/panels/info/cc-info-panel.c
@@ -455,7 +455,7 @@ static char *
get_os_type (void)
{
GHashTable *os_info;
- gchar *name, *result;
+ gchar *name, *result, *build_id;
int bits;
os_info = get_os_info ();
@@ -464,19 +464,34 @@ get_os_type (void)
return NULL;
name = g_hash_table_lookup (os_info, "PRETTY_NAME");
+ build_id = g_hash_table_lookup (os_info, "BUILD_ID");
if (GLIB_SIZEOF_VOID_P == 8)
bits = 64;
else
bits = 32;
- /* translators: This is the name of the OS, followed by the type
- * of architecture, for example:
- * "Fedora 18 (Spherical Cow) 64-bit" or "Ubuntu (Oneric Ocelot) 32-bit" */
- if (name)
- result = g_strdup_printf (_("%s %d-bit"), name, bits);
+ if (build_id)
+ {
+ /* translators: This is the name of the OS, followed by the type
+ * of architecture and the build id, for example:
+ * "Fedora 18 (Spherical Cow) 64-bit (Build ID: xyz)" or
+ * "Ubuntu (Oneric Ocelot) 32-bit (Build ID: jki)" */
+ if (name)
+ result = g_strdup_printf (_("%s %d-bit (Build ID: %s)"), name, bits, build_id);
+ else
+ result = g_strdup_printf (_("%d-bit (Build ID: %s)"), bits, build_id);
+ }
else
- result = g_strdup_printf (_("%d-bit"), bits);
+ {
+ /* translators: This is the name of the OS, followed by the type
+ * of architecture, for example:
+ * "Fedora 18 (Spherical Cow) 64-bit" or "Ubuntu (Oneric Ocelot) 32-bit" */
+ if (name)
+ result = g_strdup_printf (_("%s %d-bit"), name, bits);
+ else
+ result = g_strdup_printf (_("%d-bit"), bits);
+ }
g_clear_pointer (&os_info, g_hash_table_destroy);