diff options
Diffstat (limited to 'abs/core/mythtv/stable-29/mythtv/0294-0283-FE-Add-network-status-to-machine-status-dialog.patch')
-rw-r--r-- | abs/core/mythtv/stable-29/mythtv/0294-0283-FE-Add-network-status-to-machine-status-dialog.patch | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/abs/core/mythtv/stable-29/mythtv/0294-0283-FE-Add-network-status-to-machine-status-dialog.patch b/abs/core/mythtv/stable-29/mythtv/0294-0283-FE-Add-network-status-to-machine-status-dialog.patch new file mode 100644 index 0000000..192f0fc --- /dev/null +++ b/abs/core/mythtv/stable-29/mythtv/0294-0283-FE-Add-network-status-to-machine-status-dialog.patch @@ -0,0 +1,71 @@ +From 273937c9ee4ba00ad049ac3c9fe62ecabd2f8fdb Mon Sep 17 00:00:00 2001 +From: Lawrence Rust <lvr@softsystem.co.uk> +Date: Thu, 1 Oct 2015 09:56:13 +0100 +Subject: [PATCH 283/290] FE: Add network status to machine status dialog + +Signed-off-by: Lawrence Rust <lvr@softsystem.co.uk> +--- + mythtv/programs/mythfrontend/statusbox.cpp | 33 ++++++++++++++++++++++++++++ + 1 file changed, 33 insertions(+) + +diff --git a/mythtv/programs/mythfrontend/statusbox.cpp b/mythtv/programs/mythfrontend/statusbox.cpp +index f0078ea..23c5a24 100644 +--- a/mythtv/programs/mythfrontend/statusbox.cpp ++++ src/mythtv/programs/mythfrontend/statusbox.cpp +@@ -5,6 +5,8 @@ using namespace std; + + #include <QRegExp> + #include <QHostAddress> ++#include <QHostInfo> ++#include <QNetworkInterface> + + #include "mythcorecontext.h" + #include "filesysteminfo.h" +@@ -1221,6 +1223,12 @@ void StatusBox::doMachineStatus() + line = tr("This machine:"); + AddLogLine(line, machineStr); + ++ // Hostname ++ line = " " + tr("Hostname") + ": " + QHostInfo::localHostName(); ++ if ( !QHostInfo::localDomainName().isEmpty()) ++ line += "." + QHostInfo::localDomainName(); ++ AddLogLine(line, machineStr); ++ + // uptime + if (!getUptime(uptime)) + uptime = 0; +@@ -1264,6 +1272,31 @@ void StatusBox::doMachineStatus() + } + } + ++ // Network status ++ line = " " + tr("Interfaces") + ":"; ++ QString sep = " "; ++ foreach( QNetworkInterface iface, QNetworkInterface::allInterfaces()) ++ { ++ QNetworkInterface::InterfaceFlags f = iface.flags(); ++ if (!(f & QNetworkInterface::IsUp)) ++ continue; ++ if (!(f & QNetworkInterface::IsRunning)) ++ continue; ++ if (f & QNetworkInterface::IsLoopBack) ++ continue; ++ ++ line += sep + iface.humanReadableName() + " ["; ++ sep = ", "; ++ QString sep2 = ""; ++ foreach( QNetworkAddressEntry addr, iface.addressEntries()) ++ { ++ line += sep2 + addr.ip().toString(); ++ sep2 = ", "; ++ } ++ line += "]"; ++ } ++ AddLogLine(line, machineStr); ++ + if (!m_isBackendActive) + { + line = tr("MythTV server") + ':'; +-- +1.7.9.5 + |