Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.2:Rings:1-MinimalX
kdebase4-workspace
opensuse-kinfocenter.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File opensuse-kinfocenter.diff of Package kdebase4-workspace
diff -urB kde-workspace-4.11.12/kinfocenter/Modules/infosummary/infosum.cpp new/kinfocenter/Modules/infosummary/infosum.cpp --- kde-workspace-4.11.12/kinfocenter/Modules/infosummary/infosum.cpp 2014-09-12 09:42:16.000000000 +0200 +++ new/kinfocenter/Modules/infosummary/infosum.cpp 2014-09-14 09:41:12.275783695 +0200 @@ -58,12 +58,12 @@ void InfoSumPlugin::createOsBox() { DefaultBoxWidget *osWidget = new DefaultBoxWidget(); - osWidget->setIcon(KIcon("kde")); - osWidget->setLabelTitles(i18n("OS Version"),i18n("KDE SC Version"), i18n("Hostname")); + osWidget->setIcon(KIcon("suse")); + osWidget->setLabelTitles(i18n("OS Version"),i18n("KDE Platform Version"), i18n("Hostname")); OsDepInfo *osInfo = new OsDepInfo(); - osWidget->setLabelOne(osInfo->osVersion()); + osWidget->setLabelOne(osInfo->osVersion()+'\n'+osInfo->distroName()); osWidget->setLabelTwo(QString(KDE::versionString())); osWidget->setLabelThree(osInfo->hostName()); osWidget->setWhatsThis(i18nc("OS whats this","This shows information about your Operating System")); diff -urB kde-workspace-4.11.12/kinfocenter/Modules/infosummary/osdepinfo_unix.cpp new/kinfocenter/Modules/infosummary/osdepinfo_unix.cpp --- kde-workspace-4.11.12/kinfocenter/Modules/infosummary/osdepinfo_unix.cpp 2014-09-12 09:42:16.000000000 +0200 +++ new/kinfocenter/Modules/infosummary/osdepinfo_unix.cpp 2014-09-14 09:39:42.238790434 +0200 @@ -23,6 +23,18 @@ #include "osdepinfo.h" #include <sys/utsname.h> +#include <KConfig> +#include <KConfigGroup> +#include <QString> + +QString getDistro() +{ + KConfig osRelease( "/etc/os-release", KConfig::SimpleConfig ); + KConfigGroup osR( &osRelease, "" ); + QString pretty = osR.readEntry("PRETTY_NAME"); + pretty.remove('"'); + return(pretty); +} void OsDepInfo::setDepInfo() { @@ -31,4 +43,5 @@ m_osVersion = QString(unixInfo.sysname) + ' ' + QString(unixInfo.release); m_hostName = QString(unixInfo.nodename); + m_distroName = getDistro(); } diff -urB kde-workspace-4.11.12/kinfocenter/Modules/infosummary/osdepinfo.cpp new/kinfocenter/Modules/infosummary/osdepinfo.cpp --- kde-workspace-4.11.12/kinfocenter/Modules/infosummary/osdepinfo.cpp 2014-09-12 09:42:16.000000000 +0200 +++ new/kinfocenter/Modules/infosummary/osdepinfo.cpp 2014-09-14 09:39:42.238790434 +0200 @@ -37,6 +37,12 @@ return m_osVersion; } +const QString OsDepInfo::distroName() +{ + return m_distroName; +} + + #if defined(Q_OS_UNIX) #include "osdepinfo_unix.cpp" #else @@ -50,6 +56,7 @@ { m_osVersion.clear(); m_hostName.clear(); + m_distroName.clear(); } #endif // Q_OS_UNIX diff -urB kde-workspace-4.11.12/kinfocenter/Modules/infosummary/osdepinfo.h new/kinfocenter/Modules/infosummary/osdepinfo.h --- kde-workspace-4.11.12/kinfocenter/Modules/infosummary/osdepinfo.h 2014-09-12 09:42:16.000000000 +0200 +++ new/kinfocenter/Modules/infosummary/osdepinfo.h 2014-09-14 09:39:42.238790434 +0200 @@ -32,12 +32,14 @@ const QString hostName(); const QString osVersion(); + const QString distroName(); private: void setDepInfo(); QString m_hostName; QString m_osVersion; + QString m_distroName; }; #endif //OSDEPINFO
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor