diff options
author | rbuj <[email protected]> | 2019-04-13 09:27:45 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2019-04-15 12:02:43 +0200 |
commit | ed02d9121529beb50a709d50f01bba6b8f578795 (patch) | |
tree | 18a80d50db9678e72d7fd3efa2fbef64e87ae437 /src/sysinfo.cpp | |
parent | 8e92f12169578e6f6be1bbf8348bba457dda127f (diff) | |
download | mate-system-monitor-ed02d9121529beb50a709d50f01bba6b8f578795.tar.bz2 mate-system-monitor-ed02d9121529beb50a709d50f01bba6b8f578795.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.cpp | 26 |
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), |