From 6fd04352b381037cae8983a53564e81a7f767c86 Mon Sep 17 00:00:00 2001 From: infirit Date: Thu, 18 Dec 2014 21:48:54 +0100 Subject: Add 32-bit or 64-bit to the release label Taken from GSM commit: e29b8e670edf99e4a31da2d3d05dcd55a7f5d253 From: Robert Roth Gnome bug: https://bugzilla.gnome.org/show_bug.cgi?id=619979 --- src/sysinfo.cpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/sysinfo.cpp b/src/sysinfo.cpp index e60e133..1e60e1c 100644 --- a/src/sysinfo.cpp +++ b/src/sysinfo.cpp @@ -73,8 +73,11 @@ namespace { NULL); - char* markup = g_strdup_printf(_("Release %s"), this->distro_release.c_str()); - + /* Translators: The first string parameter is release version (codename), + * the second one is the architecture, 32 or 64-bit */ + char* markup = g_strdup_printf(_("Release %s %s"), + this->distro_release.c_str(), + this->get_os_type().c_str()); g_object_set(G_OBJECT(release), "label", markup, @@ -98,6 +101,20 @@ namespace { this->memory_bytes = mem.total; } + string get_os_type () + { + int bits; + + if (GLIB_SIZEOF_VOID_P == 8) + bits = 64; + else + bits = 32; + + /* translators: This is the type of architecture, for example: + * "64-bit" or "32-bit" */ + return string(g_strdup_printf (_("%d-bit"), bits)); + } + typedef struct { const char* regex; -- cgit v1.2.1