[gnome-system-monitor] Add 32-bit or 64-bit to the release label



commit e29b8e670edf99e4a31da2d3d05dcd55a7f5d253
Author: Robert Roth <robert roth off gmail com>
Date:   Mon Dec 12 01:38:17 2011 +0100

    Add 32-bit or 64-bit to the release label
    
    https://bugzilla.gnome.org/show_bug.cgi?id=619979

 src/sysinfo.cpp |   21 +++++++++++++++++++--
 1 files changed, 19 insertions(+), 2 deletions(-)
---
diff --git a/src/sysinfo.cpp b/src/sysinfo.cpp
index 82884e6..3c84f38 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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]