summaryrefslogtreecommitdiff
path: root/src/sysinfo.cpp
diff options
context:
space:
mode:
authorrbuj <[email protected]>2019-04-13 09:27:45 +0200
committerraveit65 <[email protected]>2019-04-15 18:18:47 +0200
commitcf667502a0ee315442fe281416eee66d8f66500c (patch)
treec0f96a4f96dd61bf97e5d5241275478b118b1d5e /src/sysinfo.cpp
parent08645403f57a44a270df6b737f9b5d82059848f3 (diff)
downloadmate-system-monitor-cf667502a0ee315442fe281416eee66d8f66500c.tar.bz2
mate-system-monitor-cf667502a0ee315442fe281416eee66d8f66500c.tar.xz
Show 32/64-bit Version intead of release for Arch Linux in System tab
Arch Linux is a rolling release distribution. Test: - Backup /etc/os-release file - Replace the content of /etc/os-release file - Launch mate-system-monitor - Select System tab - Close mate-system-monitor - Restore /etc/os-release file $ cat ~/os-release NAME="Arch Linux" PRETTY_NAME="Arch Linux" ID=arch BUILD_ID=rolling ANSI_COLOR="0;36" HOME_URL="https://www.archlinux.org/" DOCUMENTATION_URL="https://wiki.archlinux.org/" SUPPORT_URL="https://bbs.archlinux.org/" BUG_REPORT_URL="https://bugs.archlinux.org/"
Diffstat (limited to 'src/sysinfo.cpp')
-rw-r--r--src/sysinfo.cpp26
1 files changed, 18 insertions, 8 deletions
diff --git a/src/sysinfo.cpp b/src/sysinfo.cpp
index 91cfee8..5c40a2e 100644
--- a/src/sysinfo.cpp
+++ b/src/sysinfo.cpp
@@ -72,16 +72,26 @@ namespace {
("<big><big><b>" + this->distro_name + "</b></big></big>").c_str(),
NULL);
-
- /* Translators: The first string parameter is release version (codename),
- * the second one is the architecture, 32 or 64-bit */
+ char* markup;
#ifdef __linux__
- char* markup = g_strdup_printf(_("Release %s %s"),
- this->distro_release.c_str(),
- this->get_os_type().c_str());
+ if (this->distro_release != "")
+ {
+ /* Translators: The first string parameter is release version (codename),
+ * the second one is the architecture, 32 or 64-bit */
+ markup = g_strdup_printf(_("Release %s %s"),
+ this->distro_release.c_str(),
+ this->get_os_type().c_str());
+ }
+ else
+ {
+ /* Translators: The string parameter is the architecture, 32 or 64-bit */
+ markup = g_strdup_printf(_("%s Version"),
+ this->get_os_type().c_str());
+ }
#else
- char* markup = g_strdup_printf(_("Release %s"),
- this->distro_release.c_str());
+ /* Translators: The string parameter is release version (codename) */
+ markup = g_strdup_printf(_("Release %s"),
+ this->distro_release.c_str());
#endif
g_object_set(G_OBJECT(release),