mirror of
https://github.com/arcan1s/netctl-gui.git
synced 2025-08-26 02:29:55 +00:00
small fixes before editing plasmoid
This commit is contained in:
@ -7,7 +7,7 @@ find_package (KDE4 REQUIRED)
|
||||
include (KDE4Defaults)
|
||||
|
||||
add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
|
||||
include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR}/../)
|
||||
include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/../)
|
||||
|
||||
set (PLUGIN_NAME ${SUBPROJECT})
|
||||
file (GLOB SUBPROJECT_DESKTOP_IN *.desktop)
|
||||
|
@ -71,9 +71,7 @@ bool Netctl::readConfiguration()
|
||||
|
||||
while (true) {
|
||||
fileStr = QString(confFile.readLine());
|
||||
if (confFile.atEnd())
|
||||
break;
|
||||
else if (fileStr[0] != '#') {
|
||||
if (fileStr[0] != '#') {
|
||||
if (fileStr.split(QString("="), QString::SkipEmptyParts).count() == 2) {
|
||||
if (fileStr.split(QString("="), QString::SkipEmptyParts)[0] == QString("EXTIP"))
|
||||
checkExtIP = fileStr.split(QString("="), QString::SkipEmptyParts)[1].split(QString("\n"), QString::SkipEmptyParts)[0];
|
||||
@ -87,6 +85,8 @@ bool Netctl::readConfiguration()
|
||||
netDir = fileStr.split(QString("="), QString::SkipEmptyParts)[1].split(QString("\n"), QString::SkipEmptyParts)[0];
|
||||
}
|
||||
}
|
||||
if (confFile.atEnd())
|
||||
break;
|
||||
}
|
||||
|
||||
confFile.close();
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include <Plasma/DataEngine>
|
||||
|
||||
|
||||
class Netctl : public Plasma::DataEngine
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -33,6 +34,7 @@ protected:
|
||||
bool updateSourceEvent(const QString &source);
|
||||
QStringList sources() const;
|
||||
|
||||
private:
|
||||
// configuration
|
||||
// enable check external IP
|
||||
QString checkExtIP;
|
||||
@ -46,4 +48,5 @@ protected:
|
||||
QString netDir;
|
||||
};
|
||||
|
||||
|
||||
#endif /* NETCTL_DE_H */
|
||||
|
Reference in New Issue
Block a user