summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-12-18 21:48:54 +0100
committerinfirit <[email protected]>2014-12-18 21:48:54 +0100
commit6fd04352b381037cae8983a53564e81a7f767c86 (patch)
tree9d4ffd6de7ef8fb4e63a746bd39b7177cd5a0008
parent120ef9172463db2778b4790baa8ba7ae650aa247 (diff)
downloadmate-system-monitor-6fd04352b381037cae8983a53564e81a7f767c86.tar.bz2
mate-system-monitor-6fd04352b381037cae8983a53564e81a7f767c86.tar.xz
Add 32-bit or 64-bit to the release label
Taken from GSM commit: e29b8e670edf99e4a31da2d3d05dcd55a7f5d253 From: Robert Roth <[email protected]> Gnome bug: https://bugzilla.gnome.org/show_bug.cgi?id=619979
-rw-r--r--src/sysinfo.cpp21
1 files changed, 19 insertions, 2 deletions
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;