From 00a35d75d2db0e7752513fa972fcc944ea70d7e5 Mon Sep 17 00:00:00 2001 From: arcan1s Date: Sat, 3 Jan 2015 13:56:00 +0300 Subject: [PATCH] add ability to build kde4 and kf5 packages --- sources/CMakeLists.txt | 35 +- sources/dataengine/CMakeLists.txt | 59 +- sources/dataengine/netctl.cpp | 22 +- .../plasma-dataengine-netctl.desktop | 4 +- sources/plasmoid-kde4/CMakeLists.txt | 41 + sources/plasmoid-kde4/appearance.ui | 488 ++++++++ .../{plasmoid => plasmoid-kde4}/dataengine.ui | 0 .../{plasmoid => plasmoid-kde4}/netctl.cpp | 0 sources/plasmoid-kde4/netctl.h | 139 +++ .../plasma-applet-netctl.desktop | 20 + .../plasma_applet_netctl.notifyrc | 0 .../plasmoid.cppcheck | 0 .../po/CMakeLists.txt | 0 sources/{plasmoid => plasmoid-kde4}/po/en.po | 0 .../po/extract_messages.sh | 0 sources/{plasmoid => plasmoid-kde4}/po/ja.po | 0 .../po/plasma_applet_netctl.pot | 0 sources/{plasmoid => plasmoid-kde4}/po/ru.po | 0 sources/plasmoid-kde4/widget.ui | 343 ++++++ .../{plasmoid => plasmoid-kf5}/CMakeLists.txt | 0 sources/plasmoid-kf5/dataengine.ui | 185 +++ sources/plasmoid-kf5/netctl.cpp | 1035 +++++++++++++++++ sources/{plasmoid => plasmoid-kf5}/netctl.h | 0 .../plasma_applet_netctl.notifyrc | 14 + .../plasmoid/contents/config/config.qml | 0 .../plasmoid/contents/config/main.xml | 0 .../plasmoid/contents/ui/about.qml | 0 .../plasmoid/contents/ui/appearance.qml | 0 .../plasmoid/contents/ui/main.qml | 0 .../plasmoid/contents/ui/widget.qml | 0 .../plasmoid/metadata.desktop | 2 +- .../plugin/CMakeLists.txt | 0 .../plugin/netctl.cpp | 0 .../plugin/netctl.h | 0 .../plugin/netctladds.cpp | 0 .../plugin/netctladds.h | 0 .../{plasmoid => plasmoid-kf5}/plugin/qmldir | 0 sources/plasmoid-kf5/po/CMakeLists.txt | 24 + sources/plasmoid-kf5/po/en.po | 448 +++++++ sources/plasmoid-kf5/po/extract_messages.sh | 47 + sources/plasmoid-kf5/po/ja.po | 422 +++++++ .../plasmoid-kf5/po/plasma_applet_netctl.pot | 409 +++++++ sources/plasmoid-kf5/po/ru.po | 448 +++++++ sources/version.h.in | 1 + 44 files changed, 4144 insertions(+), 42 deletions(-) create mode 100644 sources/plasmoid-kde4/CMakeLists.txt create mode 100644 sources/plasmoid-kde4/appearance.ui rename sources/{plasmoid => plasmoid-kde4}/dataengine.ui (100%) rename sources/{plasmoid => plasmoid-kde4}/netctl.cpp (100%) create mode 100644 sources/plasmoid-kde4/netctl.h create mode 100644 sources/plasmoid-kde4/plasma-applet-netctl.desktop rename sources/{plasmoid => plasmoid-kde4}/plasma_applet_netctl.notifyrc (100%) rename sources/{plasmoid => plasmoid-kde4}/plasmoid.cppcheck (100%) rename sources/{plasmoid => plasmoid-kde4}/po/CMakeLists.txt (100%) rename sources/{plasmoid => plasmoid-kde4}/po/en.po (100%) rename sources/{plasmoid => plasmoid-kde4}/po/extract_messages.sh (100%) rename sources/{plasmoid => plasmoid-kde4}/po/ja.po (100%) rename sources/{plasmoid => plasmoid-kde4}/po/plasma_applet_netctl.pot (100%) rename sources/{plasmoid => plasmoid-kde4}/po/ru.po (100%) create mode 100644 sources/plasmoid-kde4/widget.ui rename sources/{plasmoid => plasmoid-kf5}/CMakeLists.txt (100%) create mode 100644 sources/plasmoid-kf5/dataengine.ui create mode 100644 sources/plasmoid-kf5/netctl.cpp rename sources/{plasmoid => plasmoid-kf5}/netctl.h (100%) create mode 100644 sources/plasmoid-kf5/plasma_applet_netctl.notifyrc rename sources/{plasmoid => plasmoid-kf5}/plasmoid/contents/config/config.qml (100%) rename sources/{plasmoid => plasmoid-kf5}/plasmoid/contents/config/main.xml (100%) rename sources/{plasmoid => plasmoid-kf5}/plasmoid/contents/ui/about.qml (100%) rename sources/{plasmoid => plasmoid-kf5}/plasmoid/contents/ui/appearance.qml (100%) rename sources/{plasmoid => plasmoid-kf5}/plasmoid/contents/ui/main.qml (100%) rename sources/{plasmoid => plasmoid-kf5}/plasmoid/contents/ui/widget.qml (100%) rename sources/{plasmoid => plasmoid-kf5}/plasmoid/metadata.desktop (91%) rename sources/{plasmoid => plasmoid-kf5}/plugin/CMakeLists.txt (100%) rename sources/{plasmoid => plasmoid-kf5}/plugin/netctl.cpp (100%) rename sources/{plasmoid => plasmoid-kf5}/plugin/netctl.h (100%) rename sources/{plasmoid => plasmoid-kf5}/plugin/netctladds.cpp (100%) rename sources/{plasmoid => plasmoid-kf5}/plugin/netctladds.h (100%) rename sources/{plasmoid => plasmoid-kf5}/plugin/qmldir (100%) create mode 100644 sources/plasmoid-kf5/po/CMakeLists.txt create mode 100644 sources/plasmoid-kf5/po/en.po create mode 100755 sources/plasmoid-kf5/po/extract_messages.sh create mode 100644 sources/plasmoid-kf5/po/ja.po create mode 100644 sources/plasmoid-kf5/po/plasma_applet_netctl.pot create mode 100644 sources/plasmoid-kf5/po/ru.po diff --git a/sources/CMakeLists.txt b/sources/CMakeLists.txt index de0b2c2..f1cdb21 100644 --- a/sources/CMakeLists.txt +++ b/sources/CMakeLists.txt @@ -29,21 +29,22 @@ option (BUILD_HELPER "Build helper" ON) option (BUILD_LIBRARY "Build library" ON) option (BUILD_DATAENGINE "Build DataEngine" ON) option (BUILD_PLASMOID "Build plasmoid" ON) +option (BUILD_KDE4 "Build on KDE4" OFF) if (BUILD_GUI OR BUILD_HELPER) - set (BUILD_LIBRARY ON) + set (BUILD_LIBRARY ON) endif () if (BUILD_PLASMOID) - set (BUILD_DATAENGINE ON) + set (BUILD_DATAENGINE ON) endif () # documentation option (BUILD_DOCS "Build Doxygen documentation" OFF) if (BUILD_DOCS) - set (BUILD_LIBRARY ON) + set (BUILD_LIBRARY ON) endif () # test option (BUILD_TEST "Build unit tests" OFF) if (BUILD_TEST) - set (BUILD_LIBRARY ON) + set (BUILD_LIBRARY ON) endif () # FIXME: dbus path set (DBUS_SYSTEMCONF_PATH "/etc/dbus-1/system.d/" CACHE STRING "Path to dbus system configuration files") @@ -51,11 +52,11 @@ set (SYSTEMD_SERVICE_PATH "lib/systemd/system" CACHE STRING "Path to systemd ser # flags if (CMAKE_COMPILER_IS_GNUCXX) - set (CMAKE_CXX_FLAGS "-Wall -std=c++11") - set (CMAKE_CXX_FLAGS_DEBUG "-g -O0") - set (CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG") + set (CMAKE_CXX_FLAGS "-Wall -std=c++11") + set (CMAKE_CXX_FLAGS_DEBUG "-g -O0") + set (CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG") else () - message (STATUS "Unknown compiler") + message (STATUS "Unknown compiler") endif () configure_file (${CMAKE_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h) @@ -68,21 +69,25 @@ add_subdirectory (${PROJECT_RESOURCE_DIR}) # components if (BUILD_LIBRARY) - add_subdirectory (${PROJECT_LIBRARY}) + add_subdirectory (${PROJECT_LIBRARY}) endif () if (BUILD_HELPER) - add_subdirectory (helper) + add_subdirectory (helper) endif () if (BUILD_TEST) - enable_testing () - add_subdirectory (test) + enable_testing () + add_subdirectory (test) endif () if (BUILD_GUI) - add_subdirectory (gui) + add_subdirectory (gui) endif () if (BUILD_DATAENGINE) - add_subdirectory (dataengine) + add_subdirectory (dataengine) endif () if (BUILD_PLASMOID) - add_subdirectory (plasmoid) + if (BUILD_KDE4) + add_subdirectory (plasmoid-kde4) + else () + add_subdirectory (plasmoid-kf5) + endif (BUILD_KDE4) endif () diff --git a/sources/dataengine/CMakeLists.txt b/sources/dataengine/CMakeLists.txt index 9a85ded..95933f6 100644 --- a/sources/dataengine/CMakeLists.txt +++ b/sources/dataengine/CMakeLists.txt @@ -3,29 +3,37 @@ set (SUBPROJECT plasma_engine_netctl) message (STATUS "Subproject ${SUBPROJECT}") # find required libaries -find_package (Qt5 REQUIRED COMPONENTS Widgets Network) -find_package (ECM 0.0.11 REQUIRED NO_MODULE) -set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) -find_package(KF5 REQUIRED COMPONENTS Plasma Service) +if (BUILD_KDE4) + find_package (KDE4 REQUIRED) + include (KDE4Defaults) -include (KDEInstallDirs) -include (KDECMakeSettings) -include (KDECompilerSettings) -add_definitions (${Qt5Core_DEFINITIONS} ${Qt5Network_DEFINITIONS}) + add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS}) +else () + find_package (Qt5 REQUIRED COMPONENTS Widgets Network) + find_package (ECM 0.0.11 REQUIRED NO_MODULE) + set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) + find_package(KF5 REQUIRED COMPONENTS Plasma Service) + + include (KDEInstallDirs) + include (KDECMakeSettings) + include (KDECompilerSettings) + add_definitions (${Qt5Core_DEFINITIONS} ${Qt5Network_DEFINITIONS}) + + set (Qt_INCLUDE ${Qt5Core_INCLUDE_DIRS} + ${Qt5Network_INCLUDE_DIRS}) + set (KDE_INCLUDE ${ConfigCore_INCLUDE_DIR} + ${CoreAddons_INCLUDE_DIR} + ${Plasma_INCLUDE_DIR} + ${Service_INCLUDE_DIR}) +endif () -set (Qt_INCLUDE ${Qt5Core_INCLUDE_DIRS} - ${Qt5Network_INCLUDE_DIRS}) -set (Kf5_INCLUDE ${ConfigCore_INCLUDE_DIR} - ${CoreAddons_INCLUDE_DIR} - ${Plasma_INCLUDE_DIR} - ${Service_INCLUDE_DIR}) include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/../ ${PROJECT_TRDPARTY_DIR} ${Qt_INCLUDE} - ${Kf5_INCLUDE}) + ${KDE_INCLUDE}) set (PLUGIN_NAME ${SUBPROJECT}) file (GLOB SUBPROJECT_DESKTOP_IN *.desktop) @@ -38,13 +46,22 @@ file (GLOB SUBPROJECT_CONF *.conf) configure_file (${SUBPROJECT_DESKTOP_IN} ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_DESKTOP}) # make -qt5_wrap_cpp (TASK_MOC_SOURCE ${TASK_HEADER}) -add_library (${PLUGIN_NAME} MODULE ${SUBPROJECT_SOURCE} ${TASK_MOC_SOURCE}) -target_link_libraries (${PLUGIN_NAME} ${Plasma_LIBRARIES} ${Qt5Network_LIBRARIES}) -kcoreaddons_desktop_to_json (${PLUGIN_NAME} ${SUBPROJECT_DESKTOP_IN}) -# kcoreaddons_desktop_to_json (${PLUGIN_NAME} ${SUBPROJECT_DESKTOP}) +if (BUILD_KDE4) + qt4_wrap_cpp (TASK_MOC_SOURCE ${TASK_HEADER}) + kde4_add_plugin (${PLUGIN_NAME} ${SUBPROJECT_SOURCE} ${TASK_MOC_SOURCE}) + target_link_libraries (${PLUGIN_NAME} ${KDE4_KDECORE_LIBS} ${KDE4_PLASMA_LIBS} ${QT_QTNETWORK_LIBRARY}) +else () + qt5_wrap_cpp (TASK_MOC_SOURCE ${TASK_HEADER}) + add_library (${PLUGIN_NAME} MODULE ${SUBPROJECT_SOURCE} ${TASK_MOC_SOURCE}) + target_link_libraries (${PLUGIN_NAME} ${Plasma_LIBRARIES} ${Qt5Network_LIBRARIES}) + kcoreaddons_desktop_to_json (${PLUGIN_NAME} ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_DESKTOP}) +endif () # install -install (TARGETS ${PLUGIN_NAME} DESTINATION ${PLUGIN_INSTALL_DIR}/plasma/dataengine) +if (BUILD_KDE4) + install (TARGETS ${PLUGIN_NAME} DESTINATION ${PLUGIN_INSTALL_DIR}) +else () + install (TARGETS ${PLUGIN_NAME} DESTINATION ${PLUGIN_INSTALL_DIR}/plasma/dataengine) +endif () install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_DESKTOP} DESTINATION ${SERVICES_INSTALL_DIR}) install (FILES ${SUBPROJECT_CONF} DESTINATION ${CONFIG_INSTALL_DIR}) diff --git a/sources/dataengine/netctl.cpp b/sources/dataengine/netctl.cpp index bf8c4bf..0ff6816 100644 --- a/sources/dataengine/netctl.cpp +++ b/sources/dataengine/netctl.cpp @@ -23,11 +23,19 @@ #include #include #include -#include #include #include #include +#include + +// KF5-KDE4 compability +#ifdef BUILD_KDE4 +#include +#include +#else +#include +#endif /* BUILD_KDE4 */ Netctl::Netctl(QObject *parent, const QVariantList &args) @@ -88,7 +96,12 @@ void Netctl::readConfiguration() rawConfig[QString("NETCTLCMD")] = QString("/usr/bin/netctl"); rawConfig[QString("NETCTLAUTOCMD")] = QString("/usr/bin/netctl-auto"); - QString fileName = QStandardPaths::locate(QStandardPaths::ConfigLocation, QString("netctl.conf")); + QString fileName; +#ifdef BUILD_KDE4 + fileName = KGlobal::dirs()->findResource("config", "netctl.conf"); +#else + fileName = QStandardPaths::locate(QStandardPaths::ConfigLocation, QString("netctl.conf")); +#endif /* BUILD_KDE4 */ if (debug) qDebug() << PDEBUG << ":" << "Configuration file" << fileName; QFile configFile(fileName); if (!configFile.open(QIODevice::ReadOnly)) { @@ -387,7 +400,10 @@ bool Netctl::updateSourceEvent(const QString &source) } -// K_EXPORT_PLASMA_DATAENGINE(netctl, Netctl) +#ifdef BUILD_KDE4 +K_EXPORT_PLASMA_DATAENGINE(netctl, Netctl) +#else K_EXPORT_PLASMA_DATAENGINE_WITH_JSON(netctl, Netctl, "plasma-dataengine-netctl.json") +#endif /* BUILD_KDE4 */ #include "netctl.moc" diff --git a/sources/dataengine/plasma-dataengine-netctl.desktop b/sources/dataengine/plasma-dataengine-netctl.desktop index 00b6fb2..9f6521c 100644 --- a/sources/dataengine/plasma-dataengine-netctl.desktop +++ b/sources/dataengine/plasma-dataengine-netctl.desktop @@ -10,11 +10,11 @@ X-KDE-ServiceTypes=Plasma/DataEngine X-KDE-Library=plasma_engine_netctl X-Plasma-EngineName=netctl -X-KDE-PluginInfo-Author=Evgeniy Alekseev aka arcanis +X-KDE-PluginInfo-Author=Evgeniy Alekseev X-KDE-PluginInfo-Email=esalexeev@gmail.com X-KDE-PluginInfo-Name=netctl X-KDE-PluginInfo-Version=@PROJECT_VERSION@ -X-KDE-PluginInfo-Website=http://arcan1s.github.io/projects/netctlplasmoid +X-KDE-PluginInfo-Website=http://arcanis.name/ru/projects/netctl-gui/ X-KDE-PluginInfo-Category=Network X-KDE-PluginInfo-Depends= X-KDE-PluginInfo-License=GPLv3 diff --git a/sources/plasmoid-kde4/CMakeLists.txt b/sources/plasmoid-kde4/CMakeLists.txt new file mode 100644 index 0000000..d795ae3 --- /dev/null +++ b/sources/plasmoid-kde4/CMakeLists.txt @@ -0,0 +1,41 @@ +# set project name +set (SUBPROJECT plasma_applet_netctl) +message (STATUS "Subproject ${SUBPROJECT}") +# find resources +set (RESOURCES ${PROJECT_RESOURCE_DIR}/resources-plasmoid.qrc) + +# find required libaries +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} + ${CMAKE_CURRENT_BINARY_DIR}/../ + ${PROJECT_TRDPARTY_DIR}) + +add_subdirectory (po) + +# set sources +set (PLUGIN_NAME ${SUBPROJECT}) +file (GLOB SUBPROJECT_DESKTOP_IN *.desktop) +file (RELATIVE_PATH SUBPROJECT_DESKTOP ${CMAKE_SOURCE_DIR} ${SUBPROJECT_DESKTOP_IN}) +file (GLOB SUBPROJECT_NOTIFY *.notifyrc) +file (GLOB SUBPROJECT_SOURCE *.cpp) +file (GLOB_RECURSE SUBPROJECT_UI *.ui ${PROJECT_TRDPARTY_DIR}/about/*.ui) + +# prepare +configure_file (${SUBPROJECT_DESKTOP_IN} ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_DESKTOP}) + +# make +qt4_add_resources (QRC_SOURCES ${RESOURCES}) +kde4_add_ui_files (SUBPROJECT_SOURCE ${SUBPROJECT_UI}) +kde4_add_plugin (${PLUGIN_NAME} ${SUBPROJECT_SOURCE} ${QRC_SOURCES}) +target_link_libraries (${PLUGIN_NAME} ${KDE4_PLASMA_LIBS} ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS}) + +# install +install (TARGETS ${PLUGIN_NAME} DESTINATION ${PLUGIN_INSTALL_DIR}) +install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_DESKTOP} DESTINATION ${SERVICES_INSTALL_DIR}) +install (FILES ${SUBPROJECT_NOTIFY} DESTINATION ${DATA_INSTALL_DIR}/${PLUGIN_NAME}) diff --git a/sources/plasmoid-kde4/appearance.ui b/sources/plasmoid-kde4/appearance.ui new file mode 100644 index 0000000..b106e34 --- /dev/null +++ b/sources/plasmoid-kde4/appearance.ui @@ -0,0 +1,488 @@ + + + AppearanceWindow + + + + 0 + 0 + 480 + 341 + + + + + 480 + 320 + + + + Configuration Window + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + 80 + 23 + + + + Inactive icon + + + + + + + + + + + 100 + 0 + + + + Browse + + + + + + + + + + + + 80 + 23 + + + + Font color + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 100 + 23 + + + + Set font color + + + + + + + + + 5 + + + 5 + + + Qt::Horizontal + + + + + + + + + + 80 + 23 + + + + Font size + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 100 + 23 + + + + Set font size + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 7 + + + 48 + + + 12 + + + + + + + + + + + + 80 + 23 + + + + Font weight + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 100 + 23 + + + + Set font weight + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 300 + + + 600 + + + 50 + + + 400 + + + + + + + + + + + + 80 + 23 + + + + Font style + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 100 + 23 + + + + Set font style + + + + normal + + + + + italic + + + + + + + + + + + + + 80 + 23 + + + + Font + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 180 + 23 + + + + Set font family + + + + + + + + + + + + 80 + 23 + + + + Active icon + + + + + + + + + + + 100 + 0 + + + + Browse + + + + + + + + + + + + 80 + 23 + + + + Text align + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 100 + 23 + + + + Set text align + + + + center + + + + + right + + + + + left + + + + + justify + + + + + + + + + + + KColorCombo + QComboBox +
kcolorcombo.h
+
+
+ + fontComboBox_font + spinBox_fontSize + kcolorcombo_fontColor + spinBox_fontWeight + comboBox_fontStyle + lineEdit_activeIcon + pushButton_activeIcon + lineEdit_inactiveIcon + pushButton_inactiveIcon + + + +
diff --git a/sources/plasmoid/dataengine.ui b/sources/plasmoid-kde4/dataengine.ui similarity index 100% rename from sources/plasmoid/dataengine.ui rename to sources/plasmoid-kde4/dataengine.ui diff --git a/sources/plasmoid/netctl.cpp b/sources/plasmoid-kde4/netctl.cpp similarity index 100% rename from sources/plasmoid/netctl.cpp rename to sources/plasmoid-kde4/netctl.cpp diff --git a/sources/plasmoid-kde4/netctl.h b/sources/plasmoid-kde4/netctl.h new file mode 100644 index 0000000..04a8a47 --- /dev/null +++ b/sources/plasmoid-kde4/netctl.h @@ -0,0 +1,139 @@ +/*************************************************************************** + * This file is part of netctl-gui * + * * + * netctl-gui is free software: you can redistribute it and/or * + * modify it under the terms of the GNU General Public License as * + * published by the Free Software Foundation, either version 3 of the * + * License, or (at your option) any later version. * + * * + * netctl-gui is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with netctl-gui. If not, see http://www.gnu.org/licenses/ * + ***************************************************************************/ + +#ifndef NETCTL_PLASMOID_H +#define NETCTL_PLASMOID_H + +#include +#include +#include + +#include +#include +#include +#include + + +class Netctl; + +class IconLabel : public QLabel +{ + Q_OBJECT + +public: + IconLabel(Netctl *wid, const bool debugCmd); + ~IconLabel(); + +protected: + void mousePressEvent(QMouseEvent *event); + +private: + bool debug; + Netctl *widget; +}; + +class Netctl : public Plasma::PopupApplet +{ + Q_OBJECT + +public: + Netctl(QObject *parent, const QVariantList &args); + ~Netctl(); + void init(); + QString parsePattern(const QString rawLine); + QMap readDataEngineConfiguration(); + void writeDataEngineConfiguration(const QMap settings); + QMap updateDataEngineConfiguration(const QMap rawConfig); + +public slots: + // events + void sendNotification(const QString eventId, const QString message); + void showGui(); + void showWifi(); + // dataengine + void dataUpdated(const QString &sourceName, const Plasma::DataEngine::Data &data); + // configuration interface + void configAccepted(); + void configChanged(); + void setBigInterface(); + void setDataEngineExternalIp4(); + void setDataEngineExternalIp6(); + void setHelper(); + void setSudo(); + void setWifi(); + +private slots: + // ui + void updateIcon(); + void updateInterface(bool setHidden); + // configuration interface + void selectAbstractSomething(); + // context menu + void enableProfileSlot(); + void restartProfileSlot(); + void startProfileSlot(QAction *profile); + void stopProfileSlot(); + void stopAllProfilesSlot(); + void switchToProfileSlot(QAction *profile); + // helper + void checkHelperStatus(); + void startHelper(); + +protected: + void createConfigurationInterface(KConfigDialog *parent); + QList contextualActions(); + +private: + // ui + QWidget *graphicsWidget; + QHBoxLayout *layout; + IconLabel *iconLabel; + QLabel *textLabel; + // information + bool status; + QMap info; + QStringList profileList; + // context menu + void createActions(); + QList menuActions; + QMenu *startProfileMenu; + QMenu *switchToProfileMenu; + QMap contextMenu; + // data engine + Plasma::DataEngine *netctlEngine; + void connectToEngine(); + void disconnectFromEngine(); + QList sendDBusRequest(const QString cmd, const QList args = QList()); + // configuration interface + Ui::AppearanceWindow uiAppConfig; + Ui::DataEngineWindow uiDEConfig; + Ui::ConfigWindow uiWidConfig; + Ui::About uiAboutConfig; + // configuration + int autoUpdateInterval; + bool bigInterface; + bool debug; + QString textPattern; + QStringList formatLine; + QMap paths; + bool useHelper, useSudo, useWifi; +}; + +K_EXPORT_PLASMA_APPLET(netctl, Netctl) + + +#endif /* NETCTL_PLASMOID_H */ diff --git a/sources/plasmoid-kde4/plasma-applet-netctl.desktop b/sources/plasmoid-kde4/plasma-applet-netctl.desktop new file mode 100644 index 0000000..2bb2549 --- /dev/null +++ b/sources/plasmoid-kde4/plasma-applet-netctl.desktop @@ -0,0 +1,20 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Netctl +Comment=Plasmoid for netctl +Type=Service +Icon=netctl-gui-widget + +X-KDE-ServiceTypes=Plasma/Applet,Plasma/PopupApplet +X-KDE-Library=plasma_applet_netctl + +X-KDE-PluginInfo-Author=Evgeniy Alekseev +X-KDE-PluginInfo-Email=esalexeev@gmail.com +X-KDE-PluginInfo-Name=netctl +X-KDE-PluginInfo-Version=@PROJECT_VERSION@ +X-KDE-PluginInfo-Website=http://arcanis.name/ru/projects/netctl-gui/ +X-KDE-PluginInfo-Category=Network +X-KDE-PluginInfo-Depends= +X-KDE-PluginInfo-License=GPLv3 +X-KDE-PluginInfo-EnabledByDefault=true +X-Plasma-NotificationArea=true diff --git a/sources/plasmoid/plasma_applet_netctl.notifyrc b/sources/plasmoid-kde4/plasma_applet_netctl.notifyrc similarity index 100% rename from sources/plasmoid/plasma_applet_netctl.notifyrc rename to sources/plasmoid-kde4/plasma_applet_netctl.notifyrc diff --git a/sources/plasmoid/plasmoid.cppcheck b/sources/plasmoid-kde4/plasmoid.cppcheck similarity index 100% rename from sources/plasmoid/plasmoid.cppcheck rename to sources/plasmoid-kde4/plasmoid.cppcheck diff --git a/sources/plasmoid/po/CMakeLists.txt b/sources/plasmoid-kde4/po/CMakeLists.txt similarity index 100% rename from sources/plasmoid/po/CMakeLists.txt rename to sources/plasmoid-kde4/po/CMakeLists.txt diff --git a/sources/plasmoid/po/en.po b/sources/plasmoid-kde4/po/en.po similarity index 100% rename from sources/plasmoid/po/en.po rename to sources/plasmoid-kde4/po/en.po diff --git a/sources/plasmoid/po/extract_messages.sh b/sources/plasmoid-kde4/po/extract_messages.sh similarity index 100% rename from sources/plasmoid/po/extract_messages.sh rename to sources/plasmoid-kde4/po/extract_messages.sh diff --git a/sources/plasmoid/po/ja.po b/sources/plasmoid-kde4/po/ja.po similarity index 100% rename from sources/plasmoid/po/ja.po rename to sources/plasmoid-kde4/po/ja.po diff --git a/sources/plasmoid/po/plasma_applet_netctl.pot b/sources/plasmoid-kde4/po/plasma_applet_netctl.pot similarity index 100% rename from sources/plasmoid/po/plasma_applet_netctl.pot rename to sources/plasmoid-kde4/po/plasma_applet_netctl.pot diff --git a/sources/plasmoid/po/ru.po b/sources/plasmoid-kde4/po/ru.po similarity index 100% rename from sources/plasmoid/po/ru.po rename to sources/plasmoid-kde4/po/ru.po diff --git a/sources/plasmoid-kde4/widget.ui b/sources/plasmoid-kde4/widget.ui new file mode 100644 index 0000000..f4b1d07 --- /dev/null +++ b/sources/plasmoid-kde4/widget.ui @@ -0,0 +1,343 @@ + + + ConfigWindow + + + + 0 + 0 + 480 + 340 + + + + + 480 + 320 + + + + Configuration Window + + + + + + + + + 150 + 23 + + + + Auto update interval, msec + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 100 + 0 + + + + Qt::LeftToRight + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 333 + + + 10000 + + + 500 + + + 1000 + + + + + + + + + + + + 150 + 23 + + + + Path to GUI + + + + + + + + + + + 100 + 23 + + + + Browse + + + + + + + + + + + + 150 + 23 + + + + Use helper + + + true + + + + + + + + + + + 100 + 23 + + + + Browse + + + + + + + + + + + + 150 + 23 + + + + Path to netctl + + + + + + + + + + + 100 + 23 + + + + Browse + + + + + + + + + + + + 150 + 23 + + + + Path to netctl-auto + + + + + + + + + + + 100 + 23 + + + + Browse + + + + + + + + + + + + 150 + 23 + + + + Use sudo for netctl + + + true + + + + + + + + + + + 100 + 23 + + + + Browse + + + + + + + + + + + + 150 + 23 + + + + Show 'Start WiFi menu' + + + true + + + + + + + + + + + 100 + 23 + + + + Browse + + + + + + + + + Show more detailed interface + + + true + + + + + + + $info - active profile information +$current - current profile name +$extip4 - external IPv4 +$extip6 - external IPv6 +$interfaces - list of the network interfaces +$intip4 - internal IPv4 +$intip6 - internal IPv6 +$profiles - list of the netctl profiles +$status - current profile status (static/enabled) + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + spinBox_autoUpdate + lineEdit_gui + pushButton_gui + lineEdit_netctl + pushButton_netctl + checkBox_sudo + lineEdit_sudo + pushButton_sudo + checkBox_wifi + lineEdit_wifi + pushButton_wifi + + + + diff --git a/sources/plasmoid/CMakeLists.txt b/sources/plasmoid-kf5/CMakeLists.txt similarity index 100% rename from sources/plasmoid/CMakeLists.txt rename to sources/plasmoid-kf5/CMakeLists.txt diff --git a/sources/plasmoid-kf5/dataengine.ui b/sources/plasmoid-kf5/dataengine.ui new file mode 100644 index 0000000..019f720 --- /dev/null +++ b/sources/plasmoid-kf5/dataengine.ui @@ -0,0 +1,185 @@ + + + DataEngineWindow + + + + 0 + 0 + 480 + 333 + + + + + 480 + 320 + + + + Configuration Window + + + + + + + + + 150 + 23 + + + + Path to netctl + + + + + + + + + + + 100 + 23 + + + + Browse + + + + + + + + + + + + 150 + 23 + + + + Path to netctl-auto + + + + + + + + + + + 100 + 23 + + + + Browse + + + + + + + + + + + + 150 + 23 + + + + Check external IPv4 + + + true + + + + + + + + + + + 100 + 23 + + + + Browse + + + + + + + + + + + + 150 + 23 + + + + Check external IPv6 + + + true + + + + + + + + + + + 100 + 23 + + + + Browse + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + lineEdit_netctl + pushButton_netctl + checkBox_extIp4 + lineEdit_extIp4 + pushButton_extIp4 + + + + diff --git a/sources/plasmoid-kf5/netctl.cpp b/sources/plasmoid-kf5/netctl.cpp new file mode 100644 index 0000000..a9689d0 --- /dev/null +++ b/sources/plasmoid-kf5/netctl.cpp @@ -0,0 +1,1035 @@ +/*************************************************************************** + * This file is part of netctl-gui * + * * + * netctl-gui is free software: you can redistribute it and/or * + * modify it under the terms of the GNU General Public License as * + * published by the Free Software Foundation, either version 3 of the * + * License, or (at your option) any later version. * + * * + * netctl-gui is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with netctl-gui. If not, see http://www.gnu.org/licenses/ * + ***************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +#include "netctl.h" +#include "ui_about.h" +#include "ui_appearance.h" +#include "ui_dataengine.h" +#include "ui_widget.h" +#include "version.h" + + +IconLabel::IconLabel(Netctl *wid, const bool debugCmd) + : QLabel(), + debug(debugCmd), + widget(wid) +{ +} + + +IconLabel::~IconLabel() +{ +} + + +void IconLabel::mousePressEvent(QMouseEvent *event) +{ + if (debug) qDebug() << PDEBUG; + + if (event->button() == Qt::LeftButton) + widget->showGui(); +} + + +Netctl::Netctl(QObject *parent, const QVariantList &args) + : Plasma::PopupApplet(parent, args) +{ + // debug + QProcessEnvironment environment = QProcessEnvironment::systemEnvironment(); + QString debugEnv = environment.value(QString("NETCTLGUI_DEBUG"), QString("no")); + if (debugEnv == QString("yes")) + debug = true; + else + debug = false; + + setBackgroundHints(DefaultBackground); + setAspectRatioMode(Plasma::IgnoreAspectRatio); + setHasConfigurationInterface(true); + // text format init + formatLine.append(QString("")); + formatLine.append(QString("")); +} + + +Netctl::~Netctl() +{ + if (debug) qDebug() << PDEBUG; + +// // actions +// delete startProfileMenu; +// delete switchToProfileMenu; +// // dataengine +// disconnectFromEngine(); +// delete netctlEngine; +// // ui +// delete iconWidget; +// delete textLabel; +// delete layout; +// delete graphicsWidget; +} + + +void Netctl::init() +{ + if (debug) qDebug() << PDEBUG; + + info[QString("current")] = QString("N\\A"); + info[QString("extip4")] = QString("N\\A"); + info[QString("extip6")] = QString("N\\A"); + info[QString("interfaces")] = QString("N\\A"); + info[QString("info")] = QString("N\\A (N\\A)"); + info[QString("intip4")] = QString("N\\A"); + info[QString("intip6")] = QString("N\\A"); + info[QString("profiles")] = QString("N\\A"); + info[QString("status")] = QString("N\\A"); + + netctlEngine = dataEngine(QString("netctl")); + createActions(); + // generate ui + graphicsWidget = new QWidget(); + graphicsWidget->setAttribute(Qt::WA_TranslucentBackground, true); + setWidget(graphicsWidget); + // layouts + layout = new QHBoxLayout(graphicsWidget); + layout->setContentsMargins(1, 1, 1, 1); + iconLabel = new IconLabel(this, debug); + layout->addWidget(iconLabel); + textLabel = new QLabel(graphicsWidget); + layout->addWidget(textLabel); + // read variables + configChanged(); +} + + +QString Netctl::parsePattern(const QString rawLine) +{ + if (debug) qDebug() << PDEBUG; + + QString line = rawLine; + for (int i=0; i Netctl::readDataEngineConfiguration() +{ + if (debug) qDebug() << PDEBUG; + + QMap rawConfig; + rawConfig[QString("EXTIP4")] = QString("false"); + rawConfig[QString("EXTIP4CMD")] = QString("curl ip4.telize.com"); + rawConfig[QString("EXTIP6")] = QString("false"); + rawConfig[QString("EXTIP6CMD")] = QString("curl ip6.telize.com"); + rawConfig[QString("NETCTLCMD")] = QString("/usr/bin/netctl"); + rawConfig[QString("NETCTLAUTOCMD")] = QString("/usr/bin/netctl-auto"); + + QString fileName = KGlobal::dirs()->findResource("config", "netctl.conf"); + if (debug) qDebug() << PDEBUG << ":" << "Configuration file" << fileName; + QFile configFile(fileName); + if (!configFile.open(QIODevice::ReadOnly)) + return updateDataEngineConfiguration(rawConfig); + QString fileStr; + QStringList value; + while (true) { + fileStr = QString(configFile.readLine()).trimmed(); + if ((fileStr.isEmpty()) && (!configFile.atEnd())) continue; + if ((fileStr[0] == QChar('#')) && (!configFile.atEnd())) continue; + if ((fileStr[0] == QChar(';')) && (!configFile.atEnd())) continue; + if (fileStr.contains(QChar('='))) { + value.clear(); + for (int i=1; i settings) +{ + if (debug) qDebug() << PDEBUG; + + QMap config = updateDataEngineConfiguration(settings); + QString fileName = KGlobal::dirs()->locateLocal("config", "netctl.conf"); + if (debug) qDebug() << PDEBUG << ":" << "Configuration file" << fileName; + QFile configFile(fileName); + if (!configFile.open(QIODevice::WriteOnly)) return; + for (int i=0; i Netctl::updateDataEngineConfiguration(const QMap rawConfig) +{ + if (debug) qDebug() << PDEBUG; + + QMap config; + QString key, value; + // remove spaces and copy source map + for (int i=0; isetPixmap(iconPixmap); +} + + +void Netctl::updateInterface(bool setShown) +{ + if (debug) qDebug() << PDEBUG; + if (debug) qDebug() << PDEBUG << ":" << "State" << setShown; + + if (setShown) + layout->addWidget(textLabel); + else + layout->removeWidget(textLabel); + graphicsWidget->adjustSize(); + resize(1, 1); +} + + +// context menu +void Netctl::enableProfileSlot() +{ + if (debug) qDebug() << PDEBUG; + + QString enableStatus = QString(""); + if (info[QString("status")].contains(QString("enabled"))) { + enableStatus = QString(" disable "); + sendNotification(QString("Info"), i18n("Set profile %1 disabled", info[QString("current")])); + } else { + enableStatus = QString(" enable "); + sendNotification(QString("Info"), i18n("Set profile %1 enabled", info[QString("current")])); + } + if (useHelper) { + QList args; + args.append(info[QString("current")]); + sendDBusRequest(QString("Enable"), args); + } else { + QProcess command; + QString commandLine = QString(""); + if (useSudo) + commandLine = paths[QString("sudo")] + QString(" "); + commandLine += paths[QString("netctl")] + enableStatus + info[QString("current")]; + command.startDetached(commandLine); + } +} + + +void Netctl::restartProfileSlot() +{ + if (debug) qDebug() << PDEBUG; + + sendNotification(QString("Info"), i18n("Restart profile %1", info[QString("current")])); + if (useHelper) { + QList args; + args.append(info[QString("current")]); + sendDBusRequest(QString("Restart"), args); + } else { + QProcess command; + QString commandLine = QString(""); + if (useSudo) + commandLine = paths[QString("sudo")] + QString(" "); + commandLine += paths[QString("netctl")] + QString(" restart ") + info[QString("current")]; + command.startDetached(commandLine); + } +} + + +void Netctl::startProfileSlot(QAction *profile) +{ + if (debug) qDebug() << PDEBUG; + if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile->text().remove(QChar('&')); + + sendNotification(QString("Info"), i18n("Start profile %1", profile->text().remove(QChar('&')))); + if (useHelper) { + QList args; + args.append(profile->text().remove(QChar('&'))); + if (status) + sendDBusRequest(QString("SwitchTo"), args); + else + sendDBusRequest(QString("Start"), args); + } else { + QProcess command; + QString commandLine = QString(""); + if (useSudo) + commandLine = paths[QString("sudo")] + QString(" "); + if (status) + commandLine += paths[QString("netctl")] + QString(" switch-to ") + profile->text().remove(QChar('&')); + else + commandLine += paths[QString("netctl")] + QString(" start ") + profile->text().remove(QChar('&')); + command.startDetached(commandLine); + } +} + + +void Netctl::stopProfileSlot() +{ + if (debug) qDebug() << PDEBUG; + + sendNotification(QString("Info"), i18n("Stop profile %1", info[QString("current")])); + if (useHelper) { + QList args; + args.append(info[QString("current")]); + sendDBusRequest(QString("Start"), args); + } else { + QProcess command; + QString commandLine = QString(""); + if (useSudo) + commandLine = paths[QString("sudo")] + QString(" "); + commandLine += paths[QString("netctl")] + QString(" stop ") + info[QString("current")]; + command.startDetached(commandLine); + } +} + + +void Netctl::stopAllProfilesSlot() +{ + if (debug) qDebug() << PDEBUG; + + sendNotification(QString("Info"), i18n("Stop all profiles")); + if (useHelper) + sendDBusRequest(QString("StopAll"), QList()); + else { + QProcess command; + QString commandLine = QString(""); + if (useSudo) + commandLine = paths[QString("sudo")] + QString(" "); + commandLine += paths[QString("netctl")] + QString(" stop-all "); + command.startDetached(commandLine); + } +} + + +void Netctl::switchToProfileSlot(QAction *profile) +{ + if (debug) qDebug() << PDEBUG; + if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile->text().remove(QChar('&')); + + + sendNotification(QString("Info"), i18n("Switch to profile %1", profile->text().remove(QChar('&')))); + if (useHelper) { + QList args; + args.append(profile->text().remove(QChar('&'))); + sendDBusRequest(QString("autoStart"), args); + } else { + QProcess command; + QString commandLine = paths[QString("netctlAuto")] + QString(" switch-to ") + + profile->text().remove(QChar('&')); + command.startDetached(commandLine); + } +} + + +void Netctl::startHelper() +{ + if (debug) qDebug() << PDEBUG; + + QProcess command; + QString commandLine = paths[QString("helper")]; + + command.startDetached(commandLine); +} + + +void Netctl::checkHelperStatus() +{ + if (debug) qDebug() << PDEBUG; + + if (useHelper) + useHelper = !sendDBusRequest(QString("Active"), QList()).isEmpty(); +} + + +QList Netctl::contextualActions() +{ + if (debug) qDebug() << PDEBUG; + + if (status) + contextMenu[QString("title")]->setIcon(QIcon(paths[QString("active")])); + else + contextMenu[QString("title")]->setIcon(QIcon(paths[QString("inactive")])); + contextMenu[QString("title")]->setText(info[QString("current")] + QString(" ") + info[QString("status")]); + + if (info[QString("status")] == QString("(netctl-auto)")) { + contextMenu[QString("start")]->setVisible(false); + contextMenu[QString("stop")]->setVisible(false); + contextMenu[QString("stopall")]->setVisible(false); + contextMenu[QString("switch")]->setVisible(true); + contextMenu[QString("restart")]->setVisible(false); + contextMenu[QString("enable")]->setVisible(false); + switchToProfileMenu->clear(); + for (int i=0; iaddAction(profile); + } + } else { + if (info[QString("current")].contains(QChar('|'))) { + contextMenu[QString("start")]->setVisible(true); + contextMenu[QString("stop")]->setVisible(false); + contextMenu[QString("stopall")]->setVisible(true); + contextMenu[QString("switch")]->setVisible(false); + contextMenu[QString("restart")]->setVisible(false); + contextMenu[QString("enable")]->setVisible(false); + } else { + contextMenu[QString("start")]->setVisible(true); + contextMenu[QString("stop")]->setVisible(status); + contextMenu[QString("stopall")]->setVisible(false); + contextMenu[QString("switch")]->setVisible(false); + contextMenu[QString("restart")]->setVisible(status); + contextMenu[QString("enable")]->setVisible(status); + } + if (status) { + contextMenu[QString("start")]->setText(i18n("Start another profile")); + contextMenu[QString("stop")]->setText(i18n("Stop %1", info[QString("current")])); + contextMenu[QString("restart")]->setText(i18n("Restart %1", info[QString("current")])); + if (info[QString("status")].contains(QString("enabled"))) + contextMenu[QString("enable")]->setText(i18n("Disable %1", info[QString("current")])); + else + contextMenu[QString("enable")]->setText(i18n("Enable %1", info[QString("current")])); + } + else + contextMenu[QString("start")]->setText(i18n("Start profile")); + startProfileMenu->clear(); + for (int i=0; iaddAction(profile); + } + } + + contextMenu[QString("wifi")]->setVisible(useWifi); + + return menuActions; +} + + +void Netctl::createActions() +{ + if (debug) qDebug() << PDEBUG; + + menuActions.clear(); + + contextMenu[QString("title")] = new QAction(QString("netctl-gui"), this); + menuActions.append(contextMenu[QString("title")]); + + contextMenu[QString("start")] = new QAction(i18n("Start profile"), this); + contextMenu[QString("start")]->setIcon(QIcon::fromTheme("dialog-apply")); + startProfileMenu = new QMenu(NULL); + contextMenu[QString("start")]->setMenu(startProfileMenu); + connect(startProfileMenu, SIGNAL(triggered(QAction *)), this, + SLOT(startProfileSlot(QAction *))); + menuActions.append(contextMenu[QString("start")]); + + contextMenu[QString("stop")] = new QAction(i18n("Stop profile"), this); + contextMenu[QString("stop")]->setIcon(QIcon::fromTheme("dialog-close")); + connect(contextMenu[QString("stop")], SIGNAL(triggered(bool)), this, SLOT(stopProfileSlot())); + menuActions.append(contextMenu[QString("stop")]); + + contextMenu[QString("stopall")] = new QAction(i18n("Stop all profiles"), this); + contextMenu[QString("stopall")]->setIcon(QIcon::fromTheme("dialog-close")); + connect(contextMenu[QString("stopall")], SIGNAL(triggered(bool)), this, SLOT(stopAllProfilesSlot())); + menuActions.append(contextMenu[QString("stopall")]); + + contextMenu[QString("switch")] = new QAction(i18n("Switch to profile"), this); + contextMenu[QString("switch")]->setIcon(QIcon::fromTheme("dialog-apply")); + switchToProfileMenu = new QMenu(NULL); + contextMenu[QString("switch")]->setMenu(switchToProfileMenu); + connect(switchToProfileMenu, SIGNAL(triggered(QAction *)), this, + SLOT(switchToProfileSlot(QAction *))); + menuActions.append(contextMenu[QString("switch")]); + + contextMenu[QString("restart")] = new QAction(i18n("Restart profile"), this); + contextMenu[QString("restart")]->setIcon(QIcon::fromTheme("stock-refresh")); + connect(contextMenu[QString("restart")], SIGNAL(triggered(bool)), this, SLOT(restartProfileSlot())); + menuActions.append(contextMenu[QString("restart")]); + + contextMenu[QString("enable")] = new QAction(i18n("Enable profile"), this); + connect(contextMenu[QString("enable")], SIGNAL(triggered(bool)), this, SLOT(enableProfileSlot())); + menuActions.append(contextMenu[QString("enable")]); + + contextMenu[QString("gui")] = new QAction(i18n("Show netctl-gui"), this); + contextMenu[QString("gui")]->setIcon(QIcon(":icon")); + connect(contextMenu[QString("gui")], SIGNAL(triggered(bool)), this, SLOT(showGui())); + menuActions.append(contextMenu[QString("gui")]); + + contextMenu[QString("wifi")] = new QAction(i18n("Show WiFi menu"), this); + contextMenu[QString("wifi")]->setIcon(QIcon(":wifi")); + connect(contextMenu[QString("wifi")], SIGNAL(triggered(bool)), this, SLOT(showWifi())); + menuActions.append(contextMenu[QString("wifi")]); +} + + +// events +void Netctl::sendNotification(const QString eventId, const QString message) +{ + if (debug) qDebug() << PDEBUG; + if (debug) qDebug() << PDEBUG << ":" << "Event" << eventId; + if (debug) qDebug() << PDEBUG << ":" << "Message" << message; + + KNotification *notification = new KNotification(eventId); + notification->setComponentData(KComponentData("plasma_applet_netctl")); + notification->setTitle(QString("Netctl ::: ") + eventId); + notification->setText(message); + notification->sendEvent(); + delete notification; +} + + +void Netctl::showGui() +{ + if (debug) qDebug() << PDEBUG; + + sendNotification(QString("Info"), i18n("Start GUI")); + QProcess command; + + command.startDetached(paths[QString("gui")]); +} + + +void Netctl::showWifi() +{ + if (debug) qDebug() << PDEBUG; + + sendNotification(QString("Info"), i18n("Start WiFi menu")); + QProcess command; + + command.startDetached(paths[QString("wifi")]); +} + + +// data engine interaction +void Netctl::connectToEngine() +{ + if (debug) qDebug() << PDEBUG; + + netctlEngine->connectSource(QString("active"), this, autoUpdateInterval); + netctlEngine->connectSource(QString("current"), this, autoUpdateInterval); + netctlEngine->connectSource(QString("extip4"), this, autoUpdateInterval); + netctlEngine->connectSource(QString("extip6"), this, autoUpdateInterval); + netctlEngine->connectSource(QString("interfaces"), this, autoUpdateInterval); + netctlEngine->connectSource(QString("intip4"), this, autoUpdateInterval); + netctlEngine->connectSource(QString("intip6"), this, autoUpdateInterval); + netctlEngine->connectSource(QString("profiles"), this, autoUpdateInterval); + netctlEngine->connectSource(QString("status"), this, autoUpdateInterval); + updateInterface(bigInterface); +} + + +void Netctl::dataUpdated(const QString &sourceName, const Plasma::DataEngine::Data &data) +{ + if (debug) qDebug() << PDEBUG; + if (debug) qDebug() << PDEBUG << ":" << "Source" << sourceName; + + if (isPopupShowing()) return; + if (isUserConfiguring()) return; + if (data.isEmpty()) return; + QString value = data[QString("value")].toString(); + if (value.isEmpty()) + value = QString("N\\A"); + + if (sourceName == QString("active")) { + if (value == QString("true")) { + if (!status) + sendNotification(QString("Info"), i18n("Network is up")); + status = true; + } else { + if (status) + sendNotification(QString("Info"), i18n("Network is down")); + status = false; + } + updateIcon(); + } else if (sourceName == QString("current")) { + info[QString("current")] = value; + QStringList profiles; + for (int i=0; isetText(formatLine[0] + parsePattern(textPattern) + formatLine[1]); + } else if (sourceName == QString("extip4")) { + info[QString("extip4")] = value; + } else if (sourceName == QString("extip6")) { + info[QString("extip6")] = value; + } else if (sourceName == QString("interfaces")) { + info[QString("interfaces")] = value; + } else if (sourceName == QString("intip4")) { + info[QString("intip4")] = value; + } else if (sourceName == QString("intip6")) { + info[QString("intip6")] = value; + } else if (sourceName == QString("profiles")) { + profileList = value.split(QChar(',')); + info[QString("profiles")] = profileList.join(QChar(',')); + } else if (sourceName == QString("status")) { + info[QString("status")] = value; + } + + update(); +} + + +void Netctl::disconnectFromEngine() +{ + if (debug) qDebug() << PDEBUG; + + netctlEngine->disconnectSource(QString("currentProfile"), this); + netctlEngine->disconnectSource(QString("extIp4"), this); + netctlEngine->disconnectSource(QString("extIp6"), this); + netctlEngine->disconnectSource(QString("interfaces"), this); + netctlEngine->disconnectSource(QString("intIp4"), this); + netctlEngine->disconnectSource(QString("intIp6"), this); + netctlEngine->disconnectSource(QString("profiles"), this); + netctlEngine->disconnectSource(QString("statusBool"), this); + netctlEngine->disconnectSource(QString("statusString"), this); + + updateInterface(false); +} + + +QList Netctl::sendDBusRequest(const QString cmd, const QList args) +{ + if (debug) qDebug() << PDEBUG; + if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd; + if (debug) qDebug() << PDEBUG << ":" << "args" << args; + + QDBusConnection bus = QDBusConnection::systemBus(); + QDBusMessage request = QDBusMessage::createMethodCall(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH, + DBUS_HELPER_INTERFACE, cmd); + if (!args.isEmpty()) + request.setArguments(args); + QDBusMessage response = bus.call(request, QDBus::BlockWithGui); + QList arguments = response.arguments(); + if (arguments.size() == 0) + if (debug) qDebug() << PDEBUG << ":" << "Error message" << response.errorMessage(); + + return arguments; +} + + +// configuration interface +void Netctl::selectAbstractSomething() +{ + if (debug) qDebug() << PDEBUG; + + QString path = QString("/usr/bin"); + QLineEdit *lineEdit = uiWidConfig.lineEdit_gui; + if (sender() == uiAppConfig.pushButton_activeIcon) { + path = QString("/usr/share/icons"); + lineEdit = uiAppConfig.lineEdit_activeIcon; + } else if (sender() == uiAppConfig.pushButton_inactiveIcon) { + path = QString("/usr/share/icons"); + lineEdit = uiAppConfig.lineEdit_inactiveIcon; + } else if (sender() == uiWidConfig.pushButton_gui) + lineEdit = uiWidConfig.lineEdit_gui; + else if (sender() == uiWidConfig.pushButton_helper) + lineEdit = uiWidConfig.lineEdit_helper; + else if (sender() == uiWidConfig.pushButton_netctl) + lineEdit = uiWidConfig.lineEdit_netctl; + else if (sender() == uiWidConfig.pushButton_netctlAuto) + lineEdit = uiWidConfig.lineEdit_netctlAuto; + else if (sender() == uiWidConfig.pushButton_sudo) + lineEdit = uiWidConfig.lineEdit_sudo; + else if (sender() == uiWidConfig.pushButton_wifi) + lineEdit = uiWidConfig.lineEdit_wifi; + else if (sender() == uiDEConfig.pushButton_extIp4) + lineEdit = uiDEConfig.lineEdit_extIp4; + else if (sender() == uiDEConfig.pushButton_extIp6) + lineEdit = uiDEConfig.lineEdit_extIp6; + else if (sender() == uiDEConfig.pushButton_netctl) + lineEdit = uiDEConfig.lineEdit_netctl; + else if (sender() == uiDEConfig.pushButton_netctlAuto) + lineEdit = uiDEConfig.lineEdit_netctlAuto; + + KUrl url = KFileDialog::getOpenUrl(KUrl(path), "*"); + lineEdit->setText(url.path()); +} + + +void Netctl::createConfigurationInterface(KConfigDialog *parent) +{ + if (debug) qDebug() << PDEBUG; + + QWidget *configWidget = new QWidget; + uiWidConfig.setupUi(configWidget); + QWidget *appWidget = new QWidget; + uiAppConfig.setupUi(appWidget); + QWidget *deWidget = new QWidget; + uiDEConfig.setupUi(deWidget); + QWidget *aboutWidget = new QWidget; + uiAboutConfig.setupUi(aboutWidget); + + uiWidConfig.spinBox_autoUpdate->setValue(autoUpdateInterval); + uiWidConfig.lineEdit_gui->setText(paths[QString("gui")]); + if (useHelper) + uiWidConfig.checkBox_helper->setCheckState(Qt::Checked); + else + uiWidConfig.checkBox_helper->setCheckState(Qt::Unchecked); + uiWidConfig.lineEdit_helper->setText(paths[QString("helper")]); + setHelper(); + uiWidConfig.lineEdit_netctl->setText(paths[QString("netctl")]); + uiWidConfig.lineEdit_netctlAuto->setText(paths[QString("netctlAuto")]); + if (useSudo) + uiWidConfig.checkBox_sudo->setCheckState(Qt::Checked); + else + uiWidConfig.checkBox_sudo->setCheckState(Qt::Unchecked); + uiWidConfig.lineEdit_sudo->setText(paths[QString("sudo")]); + setSudo(); + if (useWifi) + uiWidConfig.checkBox_wifi->setCheckState(Qt::Checked); + else + uiWidConfig.checkBox_wifi->setCheckState(Qt::Unchecked); + uiWidConfig.lineEdit_wifi->setText(paths[QString("wifi")]); + setWifi(); + if (bigInterface) + uiWidConfig.checkBox_showBigInterface->setCheckState(Qt::Checked); + else + uiWidConfig.checkBox_showBigInterface->setCheckState(Qt::Unchecked); + QString pattern = textPattern; + uiWidConfig.textEdit->setPlainText(pattern.replace(QString("
"), QString("\n"))); + setBigInterface(); + + KConfigGroup cg = config(); + QString textAlign = cg.readEntry("textAlign", "center"); + QString fontFamily = cg.readEntry("fontFamily", "Terminus"); + int fontSize = cg.readEntry("fontSize", 10); + QString fontColor = cg.readEntry("fontColor", "#000000"); + int fontWeight = cg.readEntry("fontWeight", 400); + QString fontStyle = cg.readEntry("fontStyle", "normal"); + QFont font = QFont(fontFamily, 12, 400, FALSE); + uiAppConfig.comboBox_textAlign->setCurrentIndex(uiAppConfig.comboBox_textAlign->findText(textAlign)); + uiAppConfig.fontComboBox_font->setCurrentFont(font); + uiAppConfig.spinBox_fontSize->setValue(fontSize); + uiAppConfig.kcolorcombo_fontColor->setColor(fontColor); + uiAppConfig.spinBox_fontWeight->setValue(fontWeight); + uiAppConfig.comboBox_fontStyle->setCurrentIndex(uiAppConfig.comboBox_fontStyle->findText(fontStyle)); + uiAppConfig.lineEdit_activeIcon->setText(paths[QString("active")]); + uiAppConfig.lineEdit_inactiveIcon->setText(paths[QString("inactive")]); + + QMap deSettings = readDataEngineConfiguration(); + uiDEConfig.lineEdit_netctl->setText(deSettings[QString("NETCTLCMD")]); + uiDEConfig.lineEdit_netctlAuto->setText(deSettings[QString("NETCTLAUTOCMD")]); + if (deSettings[QString("EXTIP4")] == QString("true")) + uiDEConfig.checkBox_extIp4->setCheckState(Qt::Checked); + else + uiDEConfig.checkBox_extIp4->setCheckState(Qt::Unchecked); + uiDEConfig.lineEdit_extIp4->setText(deSettings[QString("EXTIP4CMD")]); + setDataEngineExternalIp4(); + if (deSettings[QString("EXTIP6")] == QString("true")) + uiDEConfig.checkBox_extIp6->setCheckState(Qt::Checked); + else + uiDEConfig.checkBox_extIp6->setCheckState(Qt::Unchecked); + uiDEConfig.lineEdit_extIp6->setText(deSettings[QString("EXTIP6CMD")]); + setDataEngineExternalIp6(); + + // 1st tab + uiAboutConfig.label_name->setText(QString(NAME)); + uiAboutConfig.label_version->setText(i18n("Version %1\n(build date %2)", QString(VERSION), QString(BUILD_DATE))); + uiAboutConfig.label_description->setText(i18n("KDE widget which interacts with netctl.")); + uiAboutConfig.label_links->setText(i18n("Links:") + QString("
") + + QString("%2
").arg(QString(HOMEPAGE)).arg(i18n("Homepage")) + + QString("%2
").arg(QString(REPOSITORY)).arg(i18n("Repository")) + + QString("%2
").arg(QString(BUGTRACKER)).arg(i18n("Bugtracker")) + + QString("%2
").arg(QString(TRANSLATION)).arg(i18n("Translation issue")) + + QString("%2").arg(QString(AUR_PACKAGES)).arg(i18n("AUR packages"))); + uiAboutConfig.label_license->setText(QString("© %1 %3
").arg(QString(DATE)).arg(QString(EMAIL)).arg(QString(AUTHOR)) + + i18n("This software is licensed under %1", QString(LICENSE)) + QString("
")); + // 2nd tab + QStringList trdPartyList = QString(TRDPARTY_LICENSE).split(QChar(';'), QString::SkipEmptyParts); + for (int i=0; i%1 (%2 license)") + .arg(trdPartyList[i].split(QChar(','))[0]) + .arg(trdPartyList[i].split(QChar(','))[1]) + .arg(trdPartyList[i].split(QChar(','))[2]); + uiAboutConfig.label_translators->setText(i18n("Translators: %1", QString(TRANSLATORS))); + uiAboutConfig.label_trdparty->setText(i18n("This software uses: %1", trdPartyList.join(QString(", ")))); + + parent->addPage(configWidget, i18n("Netctl plasmoid"), Applet::icon()); + parent->addPage(appWidget, i18n("Appearance"), QString("preferences-desktop-theme")); + parent->addPage(deWidget, i18n("DataEngine"), Applet::icon()); + parent->addPage(aboutWidget, i18n("About"), QString("help-about")); + + connect(uiWidConfig.checkBox_helper, SIGNAL(stateChanged(int)), this, SLOT(setHelper())); + connect(uiWidConfig.checkBox_showBigInterface, SIGNAL(stateChanged(int)), this, + SLOT(setBigInterface())); + connect(uiWidConfig.checkBox_sudo, SIGNAL(stateChanged(int)), this, SLOT(setSudo())); + connect(uiWidConfig.checkBox_wifi, SIGNAL(stateChanged(int)), this, SLOT(setWifi())); + connect(uiDEConfig.checkBox_extIp4, SIGNAL(stateChanged(int)), this, SLOT(setDataEngineExternalIp4())); + connect(uiDEConfig.checkBox_extIp6, SIGNAL(stateChanged(int)), this, SLOT(setDataEngineExternalIp6())); + + connect(uiWidConfig.pushButton_gui, SIGNAL(clicked()), this, SLOT(selectAbstractSomething())); + connect(uiWidConfig.pushButton_helper, SIGNAL(clicked()), this, SLOT(selectAbstractSomething())); + connect(uiWidConfig.pushButton_netctl, SIGNAL(clicked()), this, SLOT(selectAbstractSomething())); + connect(uiWidConfig.pushButton_netctlAuto, SIGNAL(clicked()), this, SLOT(selectAbstractSomething())); + connect(uiWidConfig.pushButton_sudo, SIGNAL(clicked()), this, SLOT(selectAbstractSomething())); + connect(uiWidConfig.pushButton_wifi, SIGNAL(clicked()), this, SLOT(selectAbstractSomething())); + connect(uiAppConfig.pushButton_activeIcon, SIGNAL(clicked()), this, SLOT(selectAbstractSomething())); + connect(uiAppConfig.pushButton_inactiveIcon, SIGNAL(clicked()), this, SLOT(selectAbstractSomething())); + connect(uiDEConfig.pushButton_extIp4, SIGNAL(clicked()), this, SLOT(selectAbstractSomething())); + connect(uiDEConfig.pushButton_extIp6, SIGNAL(clicked()), this, SLOT(selectAbstractSomething())); + connect(uiDEConfig.pushButton_netctl, SIGNAL(clicked()), this, SLOT(selectAbstractSomething())); + connect(uiDEConfig.pushButton_netctlAuto, SIGNAL(clicked()), this, SLOT(selectAbstractSomething())); + + connect(parent, SIGNAL(okClicked()), this, SLOT(configAccepted())); + connect(parent, SIGNAL(applyClicked()), this, SLOT(configAccepted())); +} + + +void Netctl::configAccepted() +{ + if (debug) qDebug() << PDEBUG; + + disconnectFromEngine(); + KConfigGroup cg = config(); + + cg.writeEntry("autoUpdateInterval", uiWidConfig.spinBox_autoUpdate->value()); + cg.writeEntry("guiPath", uiWidConfig.lineEdit_gui->text()); + if (uiWidConfig.checkBox_helper->checkState() == 0) + cg.writeEntry("useHelper", false); + else + cg.writeEntry("useHelper", true); + cg.writeEntry("helperPath", uiWidConfig.lineEdit_helper->text()); + cg.writeEntry("netctlPath", uiWidConfig.lineEdit_netctl->text()); + cg.writeEntry("netctlAutoPath", uiWidConfig.lineEdit_netctlAuto->text()); + if (uiWidConfig.checkBox_sudo->checkState() == 0) + cg.writeEntry("useSudo", false); + else + cg.writeEntry("useSudo", true); + cg.writeEntry("sudoPath", uiWidConfig.lineEdit_sudo->text()); + if (uiWidConfig.checkBox_wifi->checkState() == 0) + cg.writeEntry("useWifi", false); + else + cg.writeEntry("useWifi", true); + cg.writeEntry("wifiPath", uiWidConfig.lineEdit_wifi->text()); + if (uiWidConfig.checkBox_showBigInterface->checkState() == 0) + cg.writeEntry("showBigInterface", false); + else + cg.writeEntry("showBigInterface", true); + QString pattern = uiWidConfig.textEdit->toPlainText(); + pattern.replace(QString("\n"), QString("
")); + cg.writeEntry("textPattern", pattern); + + cg.writeEntry("textAlign", uiAppConfig.comboBox_textAlign->currentText()); + cg.writeEntry("fontFamily", uiAppConfig.fontComboBox_font->currentFont().family()); + cg.writeEntry("fontSize", uiAppConfig.spinBox_fontSize->value()); + cg.writeEntry("fontColor", uiAppConfig.kcolorcombo_fontColor->color().name()); + cg.writeEntry("fontWeight", uiAppConfig.spinBox_fontWeight->value()); + cg.writeEntry("fontStyle", uiAppConfig.comboBox_fontStyle->currentText()); + cg.writeEntry("activeIconPath", uiAppConfig.lineEdit_activeIcon->text()); + cg.writeEntry("inactiveIconPath", uiAppConfig.lineEdit_inactiveIcon->text()); + + QMap deSettings; + deSettings[QString("NETCTLCMD")] = uiDEConfig.lineEdit_netctl->text(); + deSettings[QString("NETCTLAUTOCMD")] = uiDEConfig.lineEdit_netctlAuto->text(); + if (uiDEConfig.checkBox_extIp4->checkState() == 0) + deSettings[QString("EXTIP4")] = QString("false"); + else + deSettings[QString("EXTIP4")] = QString("true"); + deSettings[QString("EXTIP4CMD")] = uiDEConfig.lineEdit_extIp4->text(); + if (uiDEConfig.checkBox_extIp6->checkState() == 0) + deSettings[QString("EXTIP6")] = QString("false"); + else + deSettings[QString("EXTIP6")] = QString("true"); + deSettings[QString("EXTIP6CMD")] = uiDEConfig.lineEdit_extIp6->text(); + writeDataEngineConfiguration(deSettings); +} + + +void Netctl::configChanged() +{ + if (debug) qDebug() << PDEBUG; + + KConfigGroup cg = config(); + + autoUpdateInterval = cg.readEntry("autoUpdateInterval", 1000); + paths[QString("gui")] = cg.readEntry("guiPath", "/usr/bin/netctl-gui"); + paths[QString("helper")] = cg.readEntry("helperPath", "/usr/bin/netctlgui-helper"); + paths[QString("netctl")] = cg.readEntry("netctlPath", "/usr/bin/netctl"); + paths[QString("netctlAuto")] = cg.readEntry("netctlAutoPath", "/usr/bin/netctl-auto"); + paths[QString("sudo")] = cg.readEntry("sudoPath", "/usr/bin/kdesu"); + paths[QString("wifi")] = cg.readEntry("wifiPath", "/usr/bin/netctl-gui -t 3"); + useSudo = cg.readEntry("useSudo", true); + useWifi = cg.readEntry("useWifi", false); + bigInterface = cg.readEntry("showBigInterface", true); + useHelper = cg.readEntry("useHelper", true); + textPattern = cg.readEntry("textPattern", "$info
IPv4: $intip4
IPv6: $intip6"); + + QString textAlign = cg.readEntry("textAlign", "center"); + QString fontFamily = cg.readEntry("fontFamily", "Terminus"); + int fontSize = cg.readEntry("fontSize", 10); + QString fontColor = cg.readEntry("fontColor", "#000000"); + int fontWeight = cg.readEntry("fontWeight", 400); + QString fontStyle = cg.readEntry("fontStyle", "normal"); + paths[QString("active")] = cg.readEntry("activeIconPath", + "/usr/share/icons/hicolor/64x64/apps/netctl-idle.png"); + paths[QString("inactive")] = cg.readEntry("inactiveIconPath", + "/usr/share/icons/hicolor/64x64/apps/netctl-offline.png"); + + formatLine[0] = QString("\ +\ +

") + .arg(textAlign) + .arg(fontFamily) + .arg(QString::number(fontSize)) + .arg(QString::number(fontWeight)) + .arg(fontStyle) + .arg(fontColor); + formatLine[1] = QString("

"); + + if (useHelper) startHelper(); + checkHelperStatus(); + connectToEngine(); +} + + +void Netctl::setBigInterface() +{ + if (debug) qDebug() << PDEBUG; + + if (uiWidConfig.checkBox_showBigInterface->checkState() == 0) + uiWidConfig.textEdit->setDisabled(true); + else if (uiWidConfig.checkBox_showBigInterface->checkState() == 2) + uiWidConfig.textEdit->setDisabled(false); +} + + +void Netctl::setDataEngineExternalIp4() +{ + if (debug) qDebug() << PDEBUG; + + if (uiDEConfig.checkBox_extIp4->checkState() == 0) { + uiDEConfig.lineEdit_extIp4->setDisabled(true); + uiDEConfig.pushButton_extIp4->setDisabled(true); + } else if (uiDEConfig.checkBox_extIp4->checkState() == 2) { + uiDEConfig.lineEdit_extIp4->setEnabled(true); + uiDEConfig.pushButton_extIp4->setEnabled(true); + } +} + + +void Netctl::setDataEngineExternalIp6() +{ + if (debug) qDebug() << PDEBUG; + + if (uiDEConfig.checkBox_extIp6->checkState() == 0) { + uiDEConfig.lineEdit_extIp6->setDisabled(true); + uiDEConfig.pushButton_extIp6->setDisabled(true); + } else if (uiDEConfig.checkBox_extIp6->checkState() == 2) { + uiDEConfig.lineEdit_extIp6->setEnabled(true); + uiDEConfig.pushButton_extIp6->setEnabled(true); + } +} + + +void Netctl::setHelper() +{ + if (uiWidConfig.checkBox_helper->checkState() == 0) { + uiWidConfig.lineEdit_helper->setDisabled(true); + uiWidConfig.pushButton_helper->setDisabled(true); + } else if (uiWidConfig.checkBox_helper->checkState() == 2) { + uiWidConfig.lineEdit_helper->setEnabled(true); + uiWidConfig.pushButton_helper->setEnabled(true); + } +} + + +void Netctl::setSudo() +{ + if (debug) qDebug() << PDEBUG; + + if (uiWidConfig.checkBox_sudo->checkState() == 0) { + uiWidConfig.lineEdit_sudo->setDisabled(true); + uiWidConfig.pushButton_sudo->setDisabled(true); + } else if (uiWidConfig.checkBox_sudo->checkState() == 2) { + uiWidConfig.lineEdit_sudo->setEnabled(true); + uiWidConfig.pushButton_sudo->setEnabled(true); + } +} + + +void Netctl::setWifi() +{ + if (debug) qDebug() << PDEBUG; + + if (uiWidConfig.checkBox_wifi->checkState() == 0) { + uiWidConfig.lineEdit_wifi->setDisabled(true); + uiWidConfig.pushButton_wifi->setDisabled(true); + } else if (uiWidConfig.checkBox_wifi->checkState() == 2) { + uiWidConfig.lineEdit_wifi->setEnabled(true); + uiWidConfig.pushButton_wifi->setEnabled(true); + } +} + + +#include "netctl.moc" diff --git a/sources/plasmoid/netctl.h b/sources/plasmoid-kf5/netctl.h similarity index 100% rename from sources/plasmoid/netctl.h rename to sources/plasmoid-kf5/netctl.h diff --git a/sources/plasmoid-kf5/plasma_applet_netctl.notifyrc b/sources/plasmoid-kf5/plasma_applet_netctl.notifyrc new file mode 100644 index 0000000..9d50894 --- /dev/null +++ b/sources/plasmoid-kf5/plasma_applet_netctl.notifyrc @@ -0,0 +1,14 @@ +[Global] +IconName=netctl-gui-widget +Name=Netctl plasmoid +Comment=Netctl plasmoid popups + +[Event/Error] +Name=Error +Comment=There is an error from netctl plasmoid +Action=Popup + +[Event/Info] +Name=Information +Comment=There is an information from netctl plasmoid +Action=Popup diff --git a/sources/plasmoid/plasmoid/contents/config/config.qml b/sources/plasmoid-kf5/plasmoid/contents/config/config.qml similarity index 100% rename from sources/plasmoid/plasmoid/contents/config/config.qml rename to sources/plasmoid-kf5/plasmoid/contents/config/config.qml diff --git a/sources/plasmoid/plasmoid/contents/config/main.xml b/sources/plasmoid-kf5/plasmoid/contents/config/main.xml similarity index 100% rename from sources/plasmoid/plasmoid/contents/config/main.xml rename to sources/plasmoid-kf5/plasmoid/contents/config/main.xml diff --git a/sources/plasmoid/plasmoid/contents/ui/about.qml b/sources/plasmoid-kf5/plasmoid/contents/ui/about.qml similarity index 100% rename from sources/plasmoid/plasmoid/contents/ui/about.qml rename to sources/plasmoid-kf5/plasmoid/contents/ui/about.qml diff --git a/sources/plasmoid/plasmoid/contents/ui/appearance.qml b/sources/plasmoid-kf5/plasmoid/contents/ui/appearance.qml similarity index 100% rename from sources/plasmoid/plasmoid/contents/ui/appearance.qml rename to sources/plasmoid-kf5/plasmoid/contents/ui/appearance.qml diff --git a/sources/plasmoid/plasmoid/contents/ui/main.qml b/sources/plasmoid-kf5/plasmoid/contents/ui/main.qml similarity index 100% rename from sources/plasmoid/plasmoid/contents/ui/main.qml rename to sources/plasmoid-kf5/plasmoid/contents/ui/main.qml diff --git a/sources/plasmoid/plasmoid/contents/ui/widget.qml b/sources/plasmoid-kf5/plasmoid/contents/ui/widget.qml similarity index 100% rename from sources/plasmoid/plasmoid/contents/ui/widget.qml rename to sources/plasmoid-kf5/plasmoid/contents/ui/widget.qml diff --git a/sources/plasmoid/plasmoid/metadata.desktop b/sources/plasmoid-kf5/plasmoid/metadata.desktop similarity index 91% rename from sources/plasmoid/plasmoid/metadata.desktop rename to sources/plasmoid-kf5/plasmoid/metadata.desktop index 3a816c5..24ac2ea 100644 --- a/sources/plasmoid/plasmoid/metadata.desktop +++ b/sources/plasmoid-kf5/plasmoid/metadata.desktop @@ -11,7 +11,7 @@ X-Plasma-MainScript=ui/main.qml X-Plasma-NotificationArea=true X-Plasma-RemoteLocation= -X-KDE-PluginInfo-Author=Evgeniy Alekseev aka arcanis +X-KDE-PluginInfo-Author=Evgeniy Alekseev X-KDE-PluginInfo-Email=esalexeev@gmail.com X-KDE-PluginInfo-Name=org.kde.plasma.netctl X-KDE-PluginInfo-Version=@PROJECT_VERSION@ diff --git a/sources/plasmoid/plugin/CMakeLists.txt b/sources/plasmoid-kf5/plugin/CMakeLists.txt similarity index 100% rename from sources/plasmoid/plugin/CMakeLists.txt rename to sources/plasmoid-kf5/plugin/CMakeLists.txt diff --git a/sources/plasmoid/plugin/netctl.cpp b/sources/plasmoid-kf5/plugin/netctl.cpp similarity index 100% rename from sources/plasmoid/plugin/netctl.cpp rename to sources/plasmoid-kf5/plugin/netctl.cpp diff --git a/sources/plasmoid/plugin/netctl.h b/sources/plasmoid-kf5/plugin/netctl.h similarity index 100% rename from sources/plasmoid/plugin/netctl.h rename to sources/plasmoid-kf5/plugin/netctl.h diff --git a/sources/plasmoid/plugin/netctladds.cpp b/sources/plasmoid-kf5/plugin/netctladds.cpp similarity index 100% rename from sources/plasmoid/plugin/netctladds.cpp rename to sources/plasmoid-kf5/plugin/netctladds.cpp diff --git a/sources/plasmoid/plugin/netctladds.h b/sources/plasmoid-kf5/plugin/netctladds.h similarity index 100% rename from sources/plasmoid/plugin/netctladds.h rename to sources/plasmoid-kf5/plugin/netctladds.h diff --git a/sources/plasmoid/plugin/qmldir b/sources/plasmoid-kf5/plugin/qmldir similarity index 100% rename from sources/plasmoid/plugin/qmldir rename to sources/plasmoid-kf5/plugin/qmldir diff --git a/sources/plasmoid-kf5/po/CMakeLists.txt b/sources/plasmoid-kf5/po/CMakeLists.txt new file mode 100644 index 0000000..43779b4 --- /dev/null +++ b/sources/plasmoid-kf5/po/CMakeLists.txt @@ -0,0 +1,24 @@ +find_package(KDE4 REQUIRED) +find_package(Gettext REQUIRED) + +if (NOT GETTEXT_MSGFMT_EXECUTABLE) + message(FATAL_ERROR "Please install the msgfmt binary") +endif (NOT GETTEXT_MSGFMT_EXECUTABLE) + +file (GLOB _po_files *.po) + +set (_gmoFiles) + +foreach (_current_PO_FILE ${_po_files}) + get_filename_component (_lang ${_current_PO_FILE} NAME_WE) + set (_gmoFile ${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo) + add_custom_command (OUTPUT ${_gmoFile} + COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${_gmoFile} ${_current_PO_FILE} + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + DEPENDS ${_current_PO_FILE} + ) + + install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo DESTINATION ${LOCALE_INSTALL_DIR}/${_lang}/LC_MESSAGES/ RENAME plasma_applet_netctl.mo) + list (APPEND _gmoFiles ${_gmoFile}) +endforeach (_current_PO_FILE) +add_custom_target (pofiles ALL DEPENDS ${_gmoFiles}) diff --git a/sources/plasmoid-kf5/po/en.po b/sources/plasmoid-kf5/po/en.po new file mode 100644 index 0000000..976ec93 --- /dev/null +++ b/sources/plasmoid-kf5/po/en.po @@ -0,0 +1,448 @@ +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Evgeniy Alekseev , 2014. +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: https://github.com/arcan1s/netctl-gui/issues\n" +"POT-Creation-Date: 2014-08-24 16:44+0400\n" +"PO-Revision-Date: 2014-08-20 12:00+0400\n" +"Last-Translator: Evgeniy Alekseev \n" +"Language-Team: Russian \n" +"Language: ru\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"X-Generator: Lokalize 1.5\n" + +#: netctl.cpp:270 +msgid "Set profile %1 disabled" +msgstr "Set profile %1 disabled" + +#: netctl.cpp:273 +msgid "Set profile %1 enabled" +msgstr "Set profile %1 enabled" + +#: netctl.cpp:294 +msgid "Restart profile %1" +msgstr "Restart profile %1" + +#: netctl.cpp:315 +msgid "Start profile %1" +msgstr "Start profile %1" + +#: netctl.cpp:341 +msgid "Stop profile %1" +msgstr "Stop profile %1" + +#: netctl.cpp:361 netctl.cpp:499 +msgid "Stop all profiles" +msgstr "Stop all profiles" + +#: netctl.cpp:381 +msgid "Switch to profile %1" +msgstr "Switch to profile %1" + +#: netctl.cpp:454 +msgid "Start another profile" +msgstr "Start another profile" + +#: netctl.cpp:455 +msgid "Stop %1" +msgstr "Stop %1" + +#: netctl.cpp:456 +msgid "Restart %1" +msgstr "Restart %1" + +#: netctl.cpp:458 +msgid "Disable %1" +msgstr "Disable %1" + +#: netctl.cpp:460 +msgid "Enable %1" +msgstr "Enable %1" + +#: netctl.cpp:463 netctl.cpp:486 +msgid "Start profile" +msgstr "Start profile" + +#: netctl.cpp:494 +msgid "Stop profile" +msgstr "Stop profile" + +#: netctl.cpp:504 +msgid "Switch to profile" +msgstr "Switch to profile" + +#: netctl.cpp:512 +msgid "Restart profile" +msgstr "Restart profile" + +#: netctl.cpp:517 +msgid "Enable profile" +msgstr "Enable profile" + +#: netctl.cpp:521 +msgid "Show netctl-gui" +msgstr "Show netctl-gui" + +#: netctl.cpp:526 +msgid "Show WiFi menu" +msgstr "Show WiFi menu" + +#: netctl.cpp:553 +msgid "Start GUI" +msgstr "Start GUI" + +#: netctl.cpp:564 +msgid "Start WiFi menu" +msgstr "Start WiFi menu" + +#: netctl.cpp:604 +msgid "Network is up" +msgstr "Network is up" + +#: netctl.cpp:608 +msgid "Network is down" +msgstr "Network is down" + +#: netctl.cpp:798 +msgid "" +"Version %1\n" +"(build date %2)" +msgstr "" +"Version %1\n" +"(build date %2)" + +#: netctl.cpp:799 +msgid "KDE widget which interacts with netctl." +msgstr "KDE widget which interacts with netctl." + +#: netctl.cpp:800 +msgid "Links:" +msgstr "Links:" + +#: netctl.cpp:801 +msgid "Homepage" +msgstr "Homepage" + +#: netctl.cpp:802 +msgid "Repository" +msgstr "Repository" + +#: netctl.cpp:803 +msgid "Bugtracker" +msgstr "Bugtracker" + +#: netctl.cpp:804 +msgid "Translation issue" +msgstr "Translation issue" + +#: netctl.cpp:805 +msgid "AUR packages" +msgstr "AUR packages" + +#: netctl.cpp:807 +msgid "This software is licensed under %1" +msgstr "This software is licensed under %1" + +#: netctl.cpp:815 +msgid "Translators: %1" +msgstr "Translators: %1" + +#: netctl.cpp:816 +msgid "This software uses: %1" +msgstr "This software uses: %1" + +#: netctl.cpp:818 +msgid "Netctl plasmoid" +msgstr "Netctl plasmoid" + +#: netctl.cpp:819 +msgid "Appearance" +msgstr "Appearance" + +#: netctl.cpp:820 +msgid "DataEngine" +msgstr "DataEngine" + +#: netctl.cpp:821 +msgid "About" +msgstr "About" + +#. i18n: file: appearance.ui:47 +#. i18n: ectx: property (text), widget (QLabel, label_inactiveIcon) +#: po/rc.cpp:3 rc.cpp:3 +msgid "Inactive icon" +msgstr "Inactive icon" + +#. i18n: file: appearance.ui:63 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_inactiveIcon) +#. i18n: file: appearance.ui:391 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_activeIcon) +#. i18n: file: dataengine.ui:50 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctl) +#. i18n: file: dataengine.ui:83 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctlAuto) +#. i18n: file: dataengine.ui:119 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp4) +#. i18n: file: dataengine.ui:155 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp6) +#. i18n: file: widget.ui:108 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_gui) +#. i18n: file: widget.ui:144 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_helper) +#. i18n: file: widget.ui:177 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctl) +#. i18n: file: widget.ui:210 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctlAuto) +#. i18n: file: widget.ui:246 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_sudo) +#. i18n: file: widget.ui:282 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_wifi) +#. i18n: file: appearance.ui:63 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_inactiveIcon) +#. i18n: file: appearance.ui:391 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_activeIcon) +#. i18n: file: dataengine.ui:50 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctl) +#. i18n: file: dataengine.ui:83 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctlAuto) +#. i18n: file: dataengine.ui:119 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp4) +#. i18n: file: dataengine.ui:155 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp6) +#. i18n: file: widget.ui:108 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_gui) +#. i18n: file: widget.ui:144 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_helper) +#. i18n: file: widget.ui:177 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctl) +#. i18n: file: widget.ui:210 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctlAuto) +#. i18n: file: widget.ui:246 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_sudo) +#. i18n: file: widget.ui:282 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_wifi) +#: po/rc.cpp:6 po/rc.cpp:42 po/rc.cpp:54 po/rc.cpp:60 po/rc.cpp:66 +#: po/rc.cpp:72 po/rc.cpp:81 po/rc.cpp:87 po/rc.cpp:93 po/rc.cpp:99 +#: po/rc.cpp:105 po/rc.cpp:111 rc.cpp:6 rc.cpp:42 rc.cpp:54 rc.cpp:60 +#: rc.cpp:66 rc.cpp:72 rc.cpp:81 rc.cpp:87 rc.cpp:93 rc.cpp:99 rc.cpp:105 +#: rc.cpp:111 +msgid "Browse" +msgstr "Browse" + +#. i18n: file: appearance.ui:80 +#. i18n: ectx: property (text), widget (QLabel, label_fontColor) +#: po/rc.cpp:9 rc.cpp:9 +msgid "Font color" +msgstr "Font color" + +#. i18n: file: appearance.ui:112 +#. i18n: ectx: property (toolTip), widget (KColorCombo, kcolorcombo_fontColor) +#: po/rc.cpp:12 rc.cpp:12 +msgid "Set font color" +msgstr "Set font color" + +#. i18n: file: appearance.ui:142 +#. i18n: ectx: property (text), widget (QLabel, label_fontSize) +#: po/rc.cpp:15 rc.cpp:15 +msgid "Font size" +msgstr "Font size" + +#. i18n: file: appearance.ui:174 +#. i18n: ectx: property (toolTip), widget (QSpinBox, spinBox_fontSize) +#: po/rc.cpp:18 rc.cpp:18 +msgid "Set font size" +msgstr "Set font size" + +#. i18n: file: appearance.ui:203 +#. i18n: ectx: property (text), widget (QLabel, label_fontWeight) +#: po/rc.cpp:21 rc.cpp:21 +msgid "Font weight" +msgstr "Font weight" + +#. i18n: file: appearance.ui:235 +#. i18n: ectx: property (toolTip), widget (QSpinBox, spinBox_fontWeight) +#: po/rc.cpp:24 rc.cpp:24 +msgid "Set font weight" +msgstr "Set font weight" + +#. i18n: file: appearance.ui:267 +#. i18n: ectx: property (text), widget (QLabel, label_fontStyle) +#: po/rc.cpp:27 rc.cpp:27 +msgid "Font style" +msgstr "Font style" + +#. i18n: file: appearance.ui:299 +#. i18n: ectx: property (toolTip), widget (QComboBox, comboBox_fontStyle) +#: po/rc.cpp:30 rc.cpp:30 +msgid "Set font style" +msgstr "Set font style" + +#. i18n: file: appearance.ui:326 +#. i18n: ectx: property (text), widget (QLabel, label_font) +#: po/rc.cpp:33 rc.cpp:33 +msgid "Font" +msgstr "Font" + +#. i18n: file: appearance.ui:358 +#. i18n: ectx: property (toolTip), widget (QFontComboBox, fontComboBox_font) +#: po/rc.cpp:36 rc.cpp:36 +msgid "Set font family" +msgstr "Set font family" + +#. i18n: file: appearance.ui:375 +#. i18n: ectx: property (text), widget (QLabel, label_activeIcon) +#: po/rc.cpp:39 rc.cpp:39 +msgid "Active icon" +msgstr "Active icon" + +#. i18n: file: appearance.ui:408 +#. i18n: ectx: property (text), widget (QLabel, label_textAlign) +#: po/rc.cpp:45 rc.cpp:45 +msgid "Text align" +msgstr "Text align" + +#. i18n: file: appearance.ui:440 +#. i18n: ectx: property (toolTip), widget (QComboBox, comboBox_textAlign) +#: po/rc.cpp:48 rc.cpp:48 +msgid "Set text align" +msgstr "Set text align" + +#. i18n: file: dataengine.ui:34 +#. i18n: ectx: property (text), widget (QLabel, label_netctl) +#. i18n: file: widget.ui:161 +#. i18n: ectx: property (text), widget (QLabel, label_netctl) +#. i18n: file: dataengine.ui:34 +#. i18n: ectx: property (text), widget (QLabel, label_netctl) +#. i18n: file: widget.ui:161 +#. i18n: ectx: property (text), widget (QLabel, label_netctl) +#: po/rc.cpp:51 po/rc.cpp:90 rc.cpp:51 rc.cpp:90 +msgid "Path to netctl" +msgstr "Path to netctl" + +#. i18n: file: dataengine.ui:67 +#. i18n: ectx: property (text), widget (QLabel, label_netctlAuto) +#. i18n: file: widget.ui:194 +#. i18n: ectx: property (text), widget (QLabel, label_netctlAuto) +#. i18n: file: dataengine.ui:67 +#. i18n: ectx: property (text), widget (QLabel, label_netctlAuto) +#. i18n: file: widget.ui:194 +#. i18n: ectx: property (text), widget (QLabel, label_netctlAuto) +#: po/rc.cpp:57 po/rc.cpp:96 rc.cpp:57 rc.cpp:96 +msgid "Path to netctl-auto" +msgstr "Path to netctl-auto" + +#. i18n: file: dataengine.ui:100 +#. i18n: ectx: property (text), widget (QCheckBox, checkBox_extIp4) +#: po/rc.cpp:63 rc.cpp:63 +msgid "Check external IPv4" +msgstr "Check external IPv4" + +#. i18n: file: dataengine.ui:136 +#. i18n: ectx: property (text), widget (QCheckBox, checkBox_extIp6) +#: po/rc.cpp:69 rc.cpp:69 +msgid "Check external IPv6" +msgstr "Check external IPv6" + +#. i18n: file: widget.ui:34 +#. i18n: ectx: property (text), widget (QLabel, label_autoUpdate) +#: po/rc.cpp:75 rc.cpp:75 +msgid "Auto update interval, msec" +msgstr "Auto update interval, msec" + +#. i18n: file: widget.ui:92 +#. i18n: ectx: property (text), widget (QLabel, label_gui) +#: po/rc.cpp:78 rc.cpp:78 +msgid "Path to GUI" +msgstr "Path to GUI" + +#. i18n: file: widget.ui:125 +#. i18n: ectx: property (text), widget (QCheckBox, checkBox_helper) +#: po/rc.cpp:84 rc.cpp:84 +msgid "Use helper" +msgstr "Use helper" + +#. i18n: file: widget.ui:227 +#. i18n: ectx: property (text), widget (QCheckBox, checkBox_sudo) +#: po/rc.cpp:102 rc.cpp:102 +msgid "Use sudo for netctl" +msgstr "Use sudo for netctl" + +#. i18n: file: widget.ui:263 +#. i18n: ectx: property (text), widget (QCheckBox, checkBox_wifi) +#: po/rc.cpp:108 rc.cpp:108 +msgid "Show 'Start WiFi menu'" +msgstr "Show 'Start WiFi menu'" + +#. i18n: file: widget.ui:291 +#. i18n: ectx: property (text), widget (QCheckBox, checkBox_showBigInterface) +#: po/rc.cpp:114 rc.cpp:114 +msgid "Show more detailed interface" +msgstr "Show more detailed interface" + +#. i18n: file: widget.ui:309 +#. i18n: ectx: property (toolTip), widget (QPlainTextEdit, textEdit) +#: po/rc.cpp:117 rc.cpp:117 +msgid "" +"$info - active profile information\n" +"$current - current profile name\n" +"$extip4 - external IPv4\n" +"$extip6 - external IPv6\n" +"$interfaces - list of the network interfaces\n" +"$intip4 - internal IPv4\n" +"$intip6 - internal IPv6\n" +"$profiles - list of the netctl profiles\n" +"$status - current profile status (static/enabled)" +msgstr "" +"$info - active profile information\n" +"$current - current profile name\n" +"$extip4 - external IPv4\n" +"$extip6 - external IPv6\n" +"$interfaces - list of the network interfaces\n" +"$intip4 - internal IPv4\n" +"$intip6 - internal IPv6\n" +"$profiles - list of the netctl profiles\n" +"$status - current profile status (static/enabled)" + +#: po/rc.cpp:126 rc.cpp:126 +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Evgeniy Alekseev" + +#: po/rc.cpp:127 rc.cpp:127 +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "esalexeev@gmail.com" + +#~ msgid "Acknowledgement" +#~ msgstr "Acknowledgement" + +#~ msgid "normal" +#~ msgstr "normal" + +#~ msgid "italic" +#~ msgstr "italic" + +#~ msgid "Path to ip" +#~ msgstr "Path to ip" + +#~ msgid "Path to interface list" +#~ msgstr "Path to interface list" + +#~ msgid "Show network devices" +#~ msgstr "Show network devices" + +#~ msgid "Show external IP" +#~ msgstr "Show external IP" + +#~ msgid "Show internal IP" +#~ msgstr "Show internal IP" + +#~ msgid "Configuration" +#~ msgstr "Configuration" diff --git a/sources/plasmoid-kf5/po/extract_messages.sh b/sources/plasmoid-kf5/po/extract_messages.sh new file mode 100755 index 0000000..e210bd7 --- /dev/null +++ b/sources/plasmoid-kf5/po/extract_messages.sh @@ -0,0 +1,47 @@ +#!/bin/sh +# root of translatable sources +BASEDIR="../" +PROJECT="plasma_applet_netctl" +BUGADDR="https://github.com/arcan1s/netctl-gui/issues" +# working dir +WDIR=`pwd` + + +echo "Preparing rc files" +cd ${BASEDIR} +# we use simple sorting to make sure the lines do not jump around too much from system to system +find . -name '*.rc' -o -name '*.ui' -o -name '*.kcfg' | sort > ${WDIR}/rcfiles.list +xargs --arg-file=${WDIR}/rcfiles.list extractrc > ${WDIR}/rc.cpp +# additional string for KAboutData +echo 'i18nc("NAME OF TRANSLATORS","Your names");' >> ${WDIR}/rc.cpp +echo 'i18nc("EMAIL OF TRANSLATORS","Your emails");' >> ${WDIR}/rc.cpp +cd ${WDIR} +echo "Done preparing rc files" + +echo "Extracting messages" +cd ${BASEDIR} +# see above on sorting +find . -name '*.cpp' -o -name '*.h' -o -name '*.c' | sort > ${WDIR}/infiles.list +echo "rc.cpp" >> ${WDIR}/infiles.list +cd ${WDIR} +xgettext --from-code=UTF-8 -C -kde -ci18n -ki18n:1 -ki18nc:1c,2 -ki18np:1,2 -ki18ncp:1c,2,3 -ktr2i18n:1 \ +-kI18N_NOOP:1 -kI18N_NOOP2:1c,2 -kaliasLocale -kki18n:1 -kki18nc:1c,2 -kki18np:1,2 -kki18ncp:1c,2,3 \ +--msgid-bugs-address="${BUGADDR}" \ +--files-from=infiles.list -D ${BASEDIR} -D ${WDIR} -o ${PROJECT}.pot || { echo "Error while calling xgettext, aborting."; exit 1; } +echo "Done extracting messages" + +echo "Merging translations" +catalogs=`find . -name '*.po'` +for cat in $catalogs; do + echo $cat + msgmerge -o $cat.new $cat ${PROJECT}.pot + mv $cat.new $cat +done +echo "Done merging translations" + + +echo "Cleaning up" +cd ${WDIR} +rm -f rcfiles.list infiles.list rc.cpp +echo "Done" + diff --git a/sources/plasmoid-kf5/po/ja.po b/sources/plasmoid-kf5/po/ja.po new file mode 100644 index 0000000..ec438b7 --- /dev/null +++ b/sources/plasmoid-kf5/po/ja.po @@ -0,0 +1,422 @@ +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# NOGISAKA Sadata , 2014. +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: https://github.com/arcan1s/netctl-gui/issues\n" +"POT-Creation-Date: 2014-08-24 16:44+0400\n" +"PO-Revision-Date: 2014-10-13 16:37+0900\n" +"Last-Translator: NOGISAKA Sadata \n" +"Language-Team: Japanese \n" +"Language: ja\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Lokalize 1.5\n" + +#: netctl.cpp:270 +msgid "Set profile %1 disabled" +msgstr "プロファイル %1 を無効にする" + +#: netctl.cpp:273 +msgid "Set profile %1 enabled" +msgstr "プロファイル %1 を有効にする" + +#: netctl.cpp:294 +msgid "Restart profile %1" +msgstr "プロファイル %1 の利用を再開" + +#: netctl.cpp:315 +msgid "Start profile %1" +msgstr "プロファイル %1 の利用を開始" + +#: netctl.cpp:341 +msgid "Stop profile %1" +msgstr "プロファイル %1 の利用を停止する" + +#: netctl.cpp:361 netctl.cpp:499 +msgid "Stop all profiles" +msgstr "全てのプロファイルの利用を停止する" + +#: netctl.cpp:381 +msgid "Switch to profile %1" +msgstr "プロファイルを %1 へ切り替える" + +#: netctl.cpp:454 +msgid "Start another profile" +msgstr "他のプロファイルの利用を開始" + +#: netctl.cpp:455 +msgid "Stop %1" +msgstr "%1 を停止" + +#: netctl.cpp:456 +msgid "Restart %1" +msgstr "%1 を再開" + +#: netctl.cpp:458 +msgid "Disable %1" +msgstr "%1 を無効にする" + +#: netctl.cpp:460 +msgid "Enable %1" +msgstr "%1 を有効にする" + +#: netctl.cpp:463 netctl.cpp:486 +msgid "Start profile" +msgstr "プロファイルの利用を開始" + +#: netctl.cpp:494 +msgid "Stop profile" +msgstr "プロファイルの利用を停止する" + +#: netctl.cpp:504 +msgid "Switch to profile" +msgstr "プロファイルを切り替える" + +#: netctl.cpp:512 +msgid "Restart profile" +msgstr "プロファイルの利用を再開" + +#: netctl.cpp:517 +msgid "Enable profile" +msgstr "プロファイルを有効にする" + +#: netctl.cpp:521 +msgid "Show netctl-gui" +msgstr "netctl-gui を表示" + +#: netctl.cpp:526 +msgid "Show WiFi menu" +msgstr "WiFi メニューを表示" + +#: netctl.cpp:553 +msgid "Start GUI" +msgstr "GUI を開始" + +#: netctl.cpp:564 +msgid "Start WiFi menu" +msgstr "WiFi メニューを開始" + +#: netctl.cpp:604 +msgid "Network is up" +msgstr "ネットワークは有効です" + +#: netctl.cpp:608 +msgid "Network is down" +msgstr "ネットワークは無効です" + +#: netctl.cpp:798 +msgid "" +"Version %1\n" +"(build date %2)" +msgstr "" +"バージョン:%1\n" +"(ビルド日時:%2)" + +#: netctl.cpp:799 +msgid "KDE widget which interacts with netctl." +msgstr "netctl と連携する KDE ウィジェット" + +#: netctl.cpp:800 +msgid "Links:" +msgstr "リンク:" + +#: netctl.cpp:801 +msgid "Homepage" +msgstr "ホームページ" + +#: netctl.cpp:802 +msgid "Repository" +msgstr "レポジトリ" + +#: netctl.cpp:803 +msgid "Bugtracker" +msgstr "バグトラッカ" + +#: netctl.cpp:804 +msgid "Translation issue" +msgstr "翻訳に関する issue" + +#: netctl.cpp:805 +msgid "AUR packages" +msgstr "AUR パッケージ" + +#: netctl.cpp:807 +msgid "This software is licensed under %1" +msgstr "このソフトウェアは %1 の下で許諾されます" + +#: netctl.cpp:815 +msgid "Translators: %1" +msgstr "翻訳者:%1" + +#: netctl.cpp:816 +msgid "This software uses: %1" +msgstr "このソフトウェアは次を利用しています:%1" + +#: netctl.cpp:818 +msgid "Netctl plasmoid" +msgstr "Netctl plasmoid" + +#: netctl.cpp:819 +msgid "Appearance" +msgstr "外観" + +#: netctl.cpp:820 +msgid "DataEngine" +msgstr "DataEngine" + +#: netctl.cpp:821 +msgid "About" +msgstr "概要" + +#. i18n: file: appearance.ui:47 +#. i18n: ectx: property (text), widget (QLabel, label_inactiveIcon) +#: po/rc.cpp:3 rc.cpp:3 +msgid "Inactive icon" +msgstr "非アクティブ時のアイコン" + +#. i18n: file: appearance.ui:63 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_inactiveIcon) +#. i18n: file: appearance.ui:391 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_activeIcon) +#. i18n: file: dataengine.ui:50 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctl) +#. i18n: file: dataengine.ui:83 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctlAuto) +#. i18n: file: dataengine.ui:119 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp4) +#. i18n: file: dataengine.ui:155 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp6) +#. i18n: file: widget.ui:108 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_gui) +#. i18n: file: widget.ui:144 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_helper) +#. i18n: file: widget.ui:177 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctl) +#. i18n: file: widget.ui:210 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctlAuto) +#. i18n: file: widget.ui:246 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_sudo) +#. i18n: file: widget.ui:282 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_wifi) +#. i18n: file: appearance.ui:63 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_inactiveIcon) +#. i18n: file: appearance.ui:391 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_activeIcon) +#. i18n: file: dataengine.ui:50 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctl) +#. i18n: file: dataengine.ui:83 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctlAuto) +#. i18n: file: dataengine.ui:119 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp4) +#. i18n: file: dataengine.ui:155 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp6) +#. i18n: file: widget.ui:108 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_gui) +#. i18n: file: widget.ui:144 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_helper) +#. i18n: file: widget.ui:177 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctl) +#. i18n: file: widget.ui:210 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctlAuto) +#. i18n: file: widget.ui:246 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_sudo) +#. i18n: file: widget.ui:282 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_wifi) +#: po/rc.cpp:6 po/rc.cpp:42 po/rc.cpp:54 po/rc.cpp:60 po/rc.cpp:66 +#: po/rc.cpp:72 po/rc.cpp:81 po/rc.cpp:87 po/rc.cpp:93 po/rc.cpp:99 +#: po/rc.cpp:105 po/rc.cpp:111 rc.cpp:6 rc.cpp:42 rc.cpp:54 rc.cpp:60 +#: rc.cpp:66 rc.cpp:72 rc.cpp:81 rc.cpp:87 rc.cpp:93 rc.cpp:99 rc.cpp:105 +#: rc.cpp:111 +msgid "Browse" +msgstr "参照" + +#. i18n: file: appearance.ui:80 +#. i18n: ectx: property (text), widget (QLabel, label_fontColor) +#: po/rc.cpp:9 rc.cpp:9 +msgid "Font color" +msgstr "フォントの色" + +#. i18n: file: appearance.ui:112 +#. i18n: ectx: property (toolTip), widget (KColorCombo, kcolorcombo_fontColor) +#: po/rc.cpp:12 rc.cpp:12 +msgid "Set font color" +msgstr "フォントの色を設定する" + +#. i18n: file: appearance.ui:142 +#. i18n: ectx: property (text), widget (QLabel, label_fontSize) +#: po/rc.cpp:15 rc.cpp:15 +msgid "Font size" +msgstr "フォントの大きさ" + +#. i18n: file: appearance.ui:174 +#. i18n: ectx: property (toolTip), widget (QSpinBox, spinBox_fontSize) +#: po/rc.cpp:18 rc.cpp:18 +msgid "Set font size" +msgstr "フォントの大きさを設定する" + +#. i18n: file: appearance.ui:203 +#. i18n: ectx: property (text), widget (QLabel, label_fontWeight) +#: po/rc.cpp:21 rc.cpp:21 +msgid "Font weight" +msgstr "フォントの太さ" + +#. i18n: file: appearance.ui:235 +#. i18n: ectx: property (toolTip), widget (QSpinBox, spinBox_fontWeight) +#: po/rc.cpp:24 rc.cpp:24 +msgid "Set font weight" +msgstr "フォントの太さを設定する" + +#. i18n: file: appearance.ui:267 +#. i18n: ectx: property (text), widget (QLabel, label_fontStyle) +#: po/rc.cpp:27 rc.cpp:27 +msgid "Font style" +msgstr "フォントの字形" + +#. i18n: file: appearance.ui:299 +#. i18n: ectx: property (toolTip), widget (QComboBox, comboBox_fontStyle) +#: po/rc.cpp:30 rc.cpp:30 +msgid "Set font style" +msgstr "フォントの字形を設定する" + +#. i18n: file: appearance.ui:326 +#. i18n: ectx: property (text), widget (QLabel, label_font) +#: po/rc.cpp:33 rc.cpp:33 +msgid "Font" +msgstr "フォント" + +#. i18n: file: appearance.ui:358 +#. i18n: ectx: property (toolTip), widget (QFontComboBox, fontComboBox_font) +#: po/rc.cpp:36 rc.cpp:36 +msgid "Set font family" +msgstr "フォントを設定する" + +#. i18n: file: appearance.ui:375 +#. i18n: ectx: property (text), widget (QLabel, label_activeIcon) +#: po/rc.cpp:39 rc.cpp:39 +msgid "Active icon" +msgstr "アクティブ時のアイコン" + +#. i18n: file: appearance.ui:408 +#. i18n: ectx: property (text), widget (QLabel, label_textAlign) +#: po/rc.cpp:45 rc.cpp:45 +msgid "Text align" +msgstr "テキストの位置" + +#. i18n: file: appearance.ui:440 +#. i18n: ectx: property (toolTip), widget (QComboBox, comboBox_textAlign) +#: po/rc.cpp:48 rc.cpp:48 +msgid "Set text align" +msgstr "テキストの位置を設定する" + +#. i18n: file: dataengine.ui:34 +#. i18n: ectx: property (text), widget (QLabel, label_netctl) +#. i18n: file: widget.ui:161 +#. i18n: ectx: property (text), widget (QLabel, label_netctl) +#. i18n: file: dataengine.ui:34 +#. i18n: ectx: property (text), widget (QLabel, label_netctl) +#. i18n: file: widget.ui:161 +#. i18n: ectx: property (text), widget (QLabel, label_netctl) +#: po/rc.cpp:51 po/rc.cpp:90 rc.cpp:51 rc.cpp:90 +msgid "Path to netctl" +msgstr "netctl へのパス" + +#. i18n: file: dataengine.ui:67 +#. i18n: ectx: property (text), widget (QLabel, label_netctlAuto) +#. i18n: file: widget.ui:194 +#. i18n: ectx: property (text), widget (QLabel, label_netctlAuto) +#. i18n: file: dataengine.ui:67 +#. i18n: ectx: property (text), widget (QLabel, label_netctlAuto) +#. i18n: file: widget.ui:194 +#. i18n: ectx: property (text), widget (QLabel, label_netctlAuto) +#: po/rc.cpp:57 po/rc.cpp:96 rc.cpp:57 rc.cpp:96 +msgid "Path to netctl-auto" +msgstr "netctl-auto へのパス" + +#. i18n: file: dataengine.ui:100 +#. i18n: ectx: property (text), widget (QCheckBox, checkBox_extIp4) +#: po/rc.cpp:63 rc.cpp:63 +msgid "Check external IPv4" +msgstr "外部 IPv4 アドレスを確認" + +#. i18n: file: dataengine.ui:136 +#. i18n: ectx: property (text), widget (QCheckBox, checkBox_extIp6) +#: po/rc.cpp:69 rc.cpp:69 +msgid "Check external IPv6" +msgstr "外部 IPv6 アドレスを確認" + +#. i18n: file: widget.ui:34 +#. i18n: ectx: property (text), widget (QLabel, label_autoUpdate) +#: po/rc.cpp:75 rc.cpp:75 +msgid "Auto update interval, msec" +msgstr "自動更新の間隔(ミリ秒)" + +#. i18n: file: widget.ui:92 +#. i18n: ectx: property (text), widget (QLabel, label_gui) +#: po/rc.cpp:78 rc.cpp:78 +msgid "Path to GUI" +msgstr "GUIへのパス" + +#. i18n: file: widget.ui:125 +#. i18n: ectx: property (text), widget (QCheckBox, checkBox_helper) +#: po/rc.cpp:84 rc.cpp:84 +msgid "Use helper" +msgstr "ヘルパを使用する" + +#. i18n: file: widget.ui:227 +#. i18n: ectx: property (text), widget (QCheckBox, checkBox_sudo) +#: po/rc.cpp:102 rc.cpp:102 +msgid "Use sudo for netctl" +msgstr "netctl に対して sudo を使用する" + +#. i18n: file: widget.ui:263 +#. i18n: ectx: property (text), widget (QCheckBox, checkBox_wifi) +#: po/rc.cpp:108 rc.cpp:108 +msgid "Show 'Start WiFi menu'" +msgstr "「Wifi メニューの開始」を表示" + +#. i18n: file: widget.ui:291 +#. i18n: ectx: property (text), widget (QCheckBox, checkBox_showBigInterface) +#: po/rc.cpp:114 rc.cpp:114 +msgid "Show more detailed interface" +msgstr "インターフェースについての詳細を表示" + +#. i18n: file: widget.ui:309 +#. i18n: ectx: property (toolTip), widget (QPlainTextEdit, textEdit) +#: po/rc.cpp:117 rc.cpp:117 +msgid "" +"$info - active profile information\n" +"$current - current profile name\n" +"$extip4 - external IPv4\n" +"$extip6 - external IPv6\n" +"$interfaces - list of the network interfaces\n" +"$intip4 - internal IPv4\n" +"$intip6 - internal IPv6\n" +"$profiles - list of the netctl profiles\n" +"$status - current profile status (static/enabled)" +msgstr "" +"$info - アクティブなプロファイルの情報\n" +"$current - 現在利用中プロファイルの情報\n" +"$extip4 - 外部 IPv4 アドレス\n" +"$extip6 - 外部 IPv6 アドレス\n" +"$interfaces - ネットワークインターフェースの一覧\n" +"$intip4 - 内部 IPv4 アドレス\n" +"$intip6 - 内部 IPv6 アドレス\n" +"$profiles - プロファイルの一覧\n" +"$status - 現在のプロファイルの状態(静的/有効)" + +#: po/rc.cpp:126 rc.cpp:126 +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "NOGISAKA Sadata" + +#: po/rc.cpp:127 rc.cpp:127 +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "ngsksdt@gmail.com " + + diff --git a/sources/plasmoid-kf5/po/plasma_applet_netctl.pot b/sources/plasmoid-kf5/po/plasma_applet_netctl.pot new file mode 100644 index 0000000..35a438a --- /dev/null +++ b/sources/plasmoid-kf5/po/plasma_applet_netctl.pot @@ -0,0 +1,409 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: https://github.com/arcan1s/netctl-gui/issues\n" +"POT-Creation-Date: 2014-08-24 16:44+0400\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: netctl.cpp:270 +msgid "Set profile %1 disabled" +msgstr "" + +#: netctl.cpp:273 +msgid "Set profile %1 enabled" +msgstr "" + +#: netctl.cpp:294 +msgid "Restart profile %1" +msgstr "" + +#: netctl.cpp:315 +msgid "Start profile %1" +msgstr "" + +#: netctl.cpp:341 +msgid "Stop profile %1" +msgstr "" + +#: netctl.cpp:361 netctl.cpp:499 +msgid "Stop all profiles" +msgstr "" + +#: netctl.cpp:381 +msgid "Switch to profile %1" +msgstr "" + +#: netctl.cpp:454 +msgid "Start another profile" +msgstr "" + +#: netctl.cpp:455 +msgid "Stop %1" +msgstr "" + +#: netctl.cpp:456 +msgid "Restart %1" +msgstr "" + +#: netctl.cpp:458 +msgid "Disable %1" +msgstr "" + +#: netctl.cpp:460 +msgid "Enable %1" +msgstr "" + +#: netctl.cpp:463 netctl.cpp:486 +msgid "Start profile" +msgstr "" + +#: netctl.cpp:494 +msgid "Stop profile" +msgstr "" + +#: netctl.cpp:504 +msgid "Switch to profile" +msgstr "" + +#: netctl.cpp:512 +msgid "Restart profile" +msgstr "" + +#: netctl.cpp:517 +msgid "Enable profile" +msgstr "" + +#: netctl.cpp:521 +msgid "Show netctl-gui" +msgstr "" + +#: netctl.cpp:526 +msgid "Show WiFi menu" +msgstr "" + +#: netctl.cpp:553 +msgid "Start GUI" +msgstr "" + +#: netctl.cpp:564 +msgid "Start WiFi menu" +msgstr "" + +#: netctl.cpp:604 +msgid "Network is up" +msgstr "" + +#: netctl.cpp:608 +msgid "Network is down" +msgstr "" + +#: netctl.cpp:798 +msgid "" +"Version %1\n" +"(build date %2)" +msgstr "" + +#: netctl.cpp:799 +msgid "KDE widget which interacts with netctl." +msgstr "" + +#: netctl.cpp:800 +msgid "Links:" +msgstr "" + +#: netctl.cpp:801 +msgid "Homepage" +msgstr "" + +#: netctl.cpp:802 +msgid "Repository" +msgstr "" + +#: netctl.cpp:803 +msgid "Bugtracker" +msgstr "" + +#: netctl.cpp:804 +msgid "Translation issue" +msgstr "" + +#: netctl.cpp:805 +msgid "AUR packages" +msgstr "" + +#: netctl.cpp:807 +msgid "This software is licensed under %1" +msgstr "" + +#: netctl.cpp:815 +msgid "Translators: %1" +msgstr "" + +#: netctl.cpp:816 +msgid "This software uses: %1" +msgstr "" + +#: netctl.cpp:818 +msgid "Netctl plasmoid" +msgstr "" + +#: netctl.cpp:819 +msgid "Appearance" +msgstr "" + +#: netctl.cpp:820 +msgid "DataEngine" +msgstr "" + +#: netctl.cpp:821 +msgid "About" +msgstr "" + +#. i18n: file: appearance.ui:47 +#. i18n: ectx: property (text), widget (QLabel, label_inactiveIcon) +#: po/rc.cpp:3 rc.cpp:3 +msgid "Inactive icon" +msgstr "" + +#. i18n: file: appearance.ui:63 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_inactiveIcon) +#. i18n: file: appearance.ui:391 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_activeIcon) +#. i18n: file: dataengine.ui:50 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctl) +#. i18n: file: dataengine.ui:83 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctlAuto) +#. i18n: file: dataengine.ui:119 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp4) +#. i18n: file: dataengine.ui:155 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp6) +#. i18n: file: widget.ui:108 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_gui) +#. i18n: file: widget.ui:144 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_helper) +#. i18n: file: widget.ui:177 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctl) +#. i18n: file: widget.ui:210 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctlAuto) +#. i18n: file: widget.ui:246 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_sudo) +#. i18n: file: widget.ui:282 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_wifi) +#. i18n: file: appearance.ui:63 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_inactiveIcon) +#. i18n: file: appearance.ui:391 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_activeIcon) +#. i18n: file: dataengine.ui:50 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctl) +#. i18n: file: dataengine.ui:83 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctlAuto) +#. i18n: file: dataengine.ui:119 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp4) +#. i18n: file: dataengine.ui:155 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp6) +#. i18n: file: widget.ui:108 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_gui) +#. i18n: file: widget.ui:144 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_helper) +#. i18n: file: widget.ui:177 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctl) +#. i18n: file: widget.ui:210 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctlAuto) +#. i18n: file: widget.ui:246 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_sudo) +#. i18n: file: widget.ui:282 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_wifi) +#: po/rc.cpp:6 po/rc.cpp:42 po/rc.cpp:54 po/rc.cpp:60 po/rc.cpp:66 +#: po/rc.cpp:72 po/rc.cpp:81 po/rc.cpp:87 po/rc.cpp:93 po/rc.cpp:99 +#: po/rc.cpp:105 po/rc.cpp:111 rc.cpp:6 rc.cpp:42 rc.cpp:54 rc.cpp:60 +#: rc.cpp:66 rc.cpp:72 rc.cpp:81 rc.cpp:87 rc.cpp:93 rc.cpp:99 rc.cpp:105 +#: rc.cpp:111 +msgid "Browse" +msgstr "" + +#. i18n: file: appearance.ui:80 +#. i18n: ectx: property (text), widget (QLabel, label_fontColor) +#: po/rc.cpp:9 rc.cpp:9 +msgid "Font color" +msgstr "" + +#. i18n: file: appearance.ui:112 +#. i18n: ectx: property (toolTip), widget (KColorCombo, kcolorcombo_fontColor) +#: po/rc.cpp:12 rc.cpp:12 +msgid "Set font color" +msgstr "" + +#. i18n: file: appearance.ui:142 +#. i18n: ectx: property (text), widget (QLabel, label_fontSize) +#: po/rc.cpp:15 rc.cpp:15 +msgid "Font size" +msgstr "" + +#. i18n: file: appearance.ui:174 +#. i18n: ectx: property (toolTip), widget (QSpinBox, spinBox_fontSize) +#: po/rc.cpp:18 rc.cpp:18 +msgid "Set font size" +msgstr "" + +#. i18n: file: appearance.ui:203 +#. i18n: ectx: property (text), widget (QLabel, label_fontWeight) +#: po/rc.cpp:21 rc.cpp:21 +msgid "Font weight" +msgstr "" + +#. i18n: file: appearance.ui:235 +#. i18n: ectx: property (toolTip), widget (QSpinBox, spinBox_fontWeight) +#: po/rc.cpp:24 rc.cpp:24 +msgid "Set font weight" +msgstr "" + +#. i18n: file: appearance.ui:267 +#. i18n: ectx: property (text), widget (QLabel, label_fontStyle) +#: po/rc.cpp:27 rc.cpp:27 +msgid "Font style" +msgstr "" + +#. i18n: file: appearance.ui:299 +#. i18n: ectx: property (toolTip), widget (QComboBox, comboBox_fontStyle) +#: po/rc.cpp:30 rc.cpp:30 +msgid "Set font style" +msgstr "" + +#. i18n: file: appearance.ui:326 +#. i18n: ectx: property (text), widget (QLabel, label_font) +#: po/rc.cpp:33 rc.cpp:33 +msgid "Font" +msgstr "" + +#. i18n: file: appearance.ui:358 +#. i18n: ectx: property (toolTip), widget (QFontComboBox, fontComboBox_font) +#: po/rc.cpp:36 rc.cpp:36 +msgid "Set font family" +msgstr "" + +#. i18n: file: appearance.ui:375 +#. i18n: ectx: property (text), widget (QLabel, label_activeIcon) +#: po/rc.cpp:39 rc.cpp:39 +msgid "Active icon" +msgstr "" + +#. i18n: file: appearance.ui:408 +#. i18n: ectx: property (text), widget (QLabel, label_textAlign) +#: po/rc.cpp:45 rc.cpp:45 +msgid "Text align" +msgstr "" + +#. i18n: file: appearance.ui:440 +#. i18n: ectx: property (toolTip), widget (QComboBox, comboBox_textAlign) +#: po/rc.cpp:48 rc.cpp:48 +msgid "Set text align" +msgstr "" + +#. i18n: file: dataengine.ui:34 +#. i18n: ectx: property (text), widget (QLabel, label_netctl) +#. i18n: file: widget.ui:161 +#. i18n: ectx: property (text), widget (QLabel, label_netctl) +#. i18n: file: dataengine.ui:34 +#. i18n: ectx: property (text), widget (QLabel, label_netctl) +#. i18n: file: widget.ui:161 +#. i18n: ectx: property (text), widget (QLabel, label_netctl) +#: po/rc.cpp:51 po/rc.cpp:90 rc.cpp:51 rc.cpp:90 +msgid "Path to netctl" +msgstr "" + +#. i18n: file: dataengine.ui:67 +#. i18n: ectx: property (text), widget (QLabel, label_netctlAuto) +#. i18n: file: widget.ui:194 +#. i18n: ectx: property (text), widget (QLabel, label_netctlAuto) +#. i18n: file: dataengine.ui:67 +#. i18n: ectx: property (text), widget (QLabel, label_netctlAuto) +#. i18n: file: widget.ui:194 +#. i18n: ectx: property (text), widget (QLabel, label_netctlAuto) +#: po/rc.cpp:57 po/rc.cpp:96 rc.cpp:57 rc.cpp:96 +msgid "Path to netctl-auto" +msgstr "" + +#. i18n: file: dataengine.ui:100 +#. i18n: ectx: property (text), widget (QCheckBox, checkBox_extIp4) +#: po/rc.cpp:63 rc.cpp:63 +msgid "Check external IPv4" +msgstr "" + +#. i18n: file: dataengine.ui:136 +#. i18n: ectx: property (text), widget (QCheckBox, checkBox_extIp6) +#: po/rc.cpp:69 rc.cpp:69 +msgid "Check external IPv6" +msgstr "" + +#. i18n: file: widget.ui:34 +#. i18n: ectx: property (text), widget (QLabel, label_autoUpdate) +#: po/rc.cpp:75 rc.cpp:75 +msgid "Auto update interval, msec" +msgstr "" + +#. i18n: file: widget.ui:92 +#. i18n: ectx: property (text), widget (QLabel, label_gui) +#: po/rc.cpp:78 rc.cpp:78 +msgid "Path to GUI" +msgstr "" + +#. i18n: file: widget.ui:125 +#. i18n: ectx: property (text), widget (QCheckBox, checkBox_helper) +#: po/rc.cpp:84 rc.cpp:84 +msgid "Use helper" +msgstr "" + +#. i18n: file: widget.ui:227 +#. i18n: ectx: property (text), widget (QCheckBox, checkBox_sudo) +#: po/rc.cpp:102 rc.cpp:102 +msgid "Use sudo for netctl" +msgstr "" + +#. i18n: file: widget.ui:263 +#. i18n: ectx: property (text), widget (QCheckBox, checkBox_wifi) +#: po/rc.cpp:108 rc.cpp:108 +msgid "Show 'Start WiFi menu'" +msgstr "" + +#. i18n: file: widget.ui:291 +#. i18n: ectx: property (text), widget (QCheckBox, checkBox_showBigInterface) +#: po/rc.cpp:114 rc.cpp:114 +msgid "Show more detailed interface" +msgstr "" + +#. i18n: file: widget.ui:309 +#. i18n: ectx: property (toolTip), widget (QPlainTextEdit, textEdit) +#: po/rc.cpp:117 rc.cpp:117 +msgid "" +"$info - active profile information\n" +"$current - current profile name\n" +"$extip4 - external IPv4\n" +"$extip6 - external IPv6\n" +"$interfaces - list of the network interfaces\n" +"$intip4 - internal IPv4\n" +"$intip6 - internal IPv6\n" +"$profiles - list of the netctl profiles\n" +"$status - current profile status (static/enabled)" +msgstr "" + +#: po/rc.cpp:126 rc.cpp:126 +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "" + +#: po/rc.cpp:127 rc.cpp:127 +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "" diff --git a/sources/plasmoid-kf5/po/ru.po b/sources/plasmoid-kf5/po/ru.po new file mode 100644 index 0000000..76a0a54 --- /dev/null +++ b/sources/plasmoid-kf5/po/ru.po @@ -0,0 +1,448 @@ +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Evgeniy Alekseev , 2014. +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: https://github.com/arcan1s/netctl-gui/issues\n" +"POT-Creation-Date: 2014-08-24 16:44+0400\n" +"PO-Revision-Date: 2014-08-20 12:00+0400\n" +"Last-Translator: Evgeniy Alekseev \n" +"Language-Team: Russian \n" +"Language: ru\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"X-Generator: Lokalize 1.5\n" + +#: netctl.cpp:270 +msgid "Set profile %1 disabled" +msgstr "Выключение автозагрузки профиля %1" + +#: netctl.cpp:273 +msgid "Set profile %1 enabled" +msgstr "Включение автозагрузки профиля %1" + +#: netctl.cpp:294 +msgid "Restart profile %1" +msgstr "Перезапуск профиля %1" + +#: netctl.cpp:315 +msgid "Start profile %1" +msgstr "Запуск профиля %1" + +#: netctl.cpp:341 +msgid "Stop profile %1" +msgstr "Остановка профиля %1" + +#: netctl.cpp:361 netctl.cpp:499 +msgid "Stop all profiles" +msgstr "Остановить все профили" + +#: netctl.cpp:381 +msgid "Switch to profile %1" +msgstr "Переключение на профиль %1" + +#: netctl.cpp:454 +msgid "Start another profile" +msgstr "Запустить другой профиль" + +#: netctl.cpp:455 +msgid "Stop %1" +msgstr "Остановить %1" + +#: netctl.cpp:456 +msgid "Restart %1" +msgstr "Перезапустить %1" + +#: netctl.cpp:458 +msgid "Disable %1" +msgstr "Отключить %1" + +#: netctl.cpp:460 +msgid "Enable %1" +msgstr "Включить %1" + +#: netctl.cpp:463 netctl.cpp:486 +msgid "Start profile" +msgstr "Запустить профиль" + +#: netctl.cpp:494 +msgid "Stop profile" +msgstr "Остановить профиль" + +#: netctl.cpp:504 +msgid "Switch to profile" +msgstr "Переключить профиль" + +#: netctl.cpp:512 +msgid "Restart profile" +msgstr "Перезапустить профиль" + +#: netctl.cpp:517 +msgid "Enable profile" +msgstr "Включить профиль" + +#: netctl.cpp:521 +msgid "Show netctl-gui" +msgstr "Показать netctl-gui" + +#: netctl.cpp:526 +msgid "Show WiFi menu" +msgstr "Запустить WiFi-menu" + +#: netctl.cpp:553 +msgid "Start GUI" +msgstr "Запуск GUI" + +#: netctl.cpp:564 +msgid "Start WiFi menu" +msgstr "Запуск WiFi-menu" + +#: netctl.cpp:604 +msgid "Network is up" +msgstr "Сеть работает" + +#: netctl.cpp:608 +msgid "Network is down" +msgstr "Сеть не работает" + +#: netctl.cpp:798 +msgid "" +"Version %1\n" +"(build date %2)" +msgstr "" +"Версия %1\n" +"(дата сборки %2)" + +#: netctl.cpp:799 +msgid "KDE widget which interacts with netctl." +msgstr "Виджет KDE, который взаимодействует с netctl." + +#: netctl.cpp:800 +msgid "Links:" +msgstr "Ссылки:" + +#: netctl.cpp:801 +msgid "Homepage" +msgstr "Домашняя страница" + +#: netctl.cpp:802 +msgid "Repository" +msgstr "Репозиторий" + +#: netctl.cpp:803 +msgid "Bugtracker" +msgstr "Багтрекер" + +#: netctl.cpp:804 +msgid "Translation issue" +msgstr "Тикет перевода" + +#: netctl.cpp:805 +msgid "AUR packages" +msgstr "Пакеты в AUR" + +#: netctl.cpp:807 +msgid "This software is licensed under %1" +msgstr "Данное приложение лицензировано под %1" + +#: netctl.cpp:815 +msgid "Translators: %1" +msgstr "Переводчики: %1" + +#: netctl.cpp:816 +msgid "This software uses: %1" +msgstr "Данное приложение использует: %1" + +#: netctl.cpp:818 +msgid "Netctl plasmoid" +msgstr "Netctl plasmoid" + +#: netctl.cpp:819 +msgid "Appearance" +msgstr "Внешний вид" + +#: netctl.cpp:820 +msgid "DataEngine" +msgstr "DataEngine" + +#: netctl.cpp:821 +msgid "About" +msgstr "О программе" + +#. i18n: file: appearance.ui:47 +#. i18n: ectx: property (text), widget (QLabel, label_inactiveIcon) +#: po/rc.cpp:3 rc.cpp:3 +msgid "Inactive icon" +msgstr "Иконка неактивного подключения" + +#. i18n: file: appearance.ui:63 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_inactiveIcon) +#. i18n: file: appearance.ui:391 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_activeIcon) +#. i18n: file: dataengine.ui:50 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctl) +#. i18n: file: dataengine.ui:83 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctlAuto) +#. i18n: file: dataengine.ui:119 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp4) +#. i18n: file: dataengine.ui:155 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp6) +#. i18n: file: widget.ui:108 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_gui) +#. i18n: file: widget.ui:144 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_helper) +#. i18n: file: widget.ui:177 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctl) +#. i18n: file: widget.ui:210 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctlAuto) +#. i18n: file: widget.ui:246 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_sudo) +#. i18n: file: widget.ui:282 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_wifi) +#. i18n: file: appearance.ui:63 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_inactiveIcon) +#. i18n: file: appearance.ui:391 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_activeIcon) +#. i18n: file: dataengine.ui:50 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctl) +#. i18n: file: dataengine.ui:83 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctlAuto) +#. i18n: file: dataengine.ui:119 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp4) +#. i18n: file: dataengine.ui:155 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp6) +#. i18n: file: widget.ui:108 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_gui) +#. i18n: file: widget.ui:144 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_helper) +#. i18n: file: widget.ui:177 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctl) +#. i18n: file: widget.ui:210 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctlAuto) +#. i18n: file: widget.ui:246 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_sudo) +#. i18n: file: widget.ui:282 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_wifi) +#: po/rc.cpp:6 po/rc.cpp:42 po/rc.cpp:54 po/rc.cpp:60 po/rc.cpp:66 +#: po/rc.cpp:72 po/rc.cpp:81 po/rc.cpp:87 po/rc.cpp:93 po/rc.cpp:99 +#: po/rc.cpp:105 po/rc.cpp:111 rc.cpp:6 rc.cpp:42 rc.cpp:54 rc.cpp:60 +#: rc.cpp:66 rc.cpp:72 rc.cpp:81 rc.cpp:87 rc.cpp:93 rc.cpp:99 rc.cpp:105 +#: rc.cpp:111 +msgid "Browse" +msgstr "Обзор" + +#. i18n: file: appearance.ui:80 +#. i18n: ectx: property (text), widget (QLabel, label_fontColor) +#: po/rc.cpp:9 rc.cpp:9 +msgid "Font color" +msgstr "Цвет шрифта" + +#. i18n: file: appearance.ui:112 +#. i18n: ectx: property (toolTip), widget (KColorCombo, kcolorcombo_fontColor) +#: po/rc.cpp:12 rc.cpp:12 +msgid "Set font color" +msgstr "Укажите цвет шрифта" + +#. i18n: file: appearance.ui:142 +#. i18n: ectx: property (text), widget (QLabel, label_fontSize) +#: po/rc.cpp:15 rc.cpp:15 +msgid "Font size" +msgstr "Размер шрифта" + +#. i18n: file: appearance.ui:174 +#. i18n: ectx: property (toolTip), widget (QSpinBox, spinBox_fontSize) +#: po/rc.cpp:18 rc.cpp:18 +msgid "Set font size" +msgstr "Укажите размер шрифта" + +#. i18n: file: appearance.ui:203 +#. i18n: ectx: property (text), widget (QLabel, label_fontWeight) +#: po/rc.cpp:21 rc.cpp:21 +msgid "Font weight" +msgstr "Толщина шрифта" + +#. i18n: file: appearance.ui:235 +#. i18n: ectx: property (toolTip), widget (QSpinBox, spinBox_fontWeight) +#: po/rc.cpp:24 rc.cpp:24 +msgid "Set font weight" +msgstr "Укажите ширину шрифта" + +#. i18n: file: appearance.ui:267 +#. i18n: ectx: property (text), widget (QLabel, label_fontStyle) +#: po/rc.cpp:27 rc.cpp:27 +msgid "Font style" +msgstr "Стиль шрифта" + +#. i18n: file: appearance.ui:299 +#. i18n: ectx: property (toolTip), widget (QComboBox, comboBox_fontStyle) +#: po/rc.cpp:30 rc.cpp:30 +msgid "Set font style" +msgstr "Укажите стиль шрифта" + +#. i18n: file: appearance.ui:326 +#. i18n: ectx: property (text), widget (QLabel, label_font) +#: po/rc.cpp:33 rc.cpp:33 +msgid "Font" +msgstr "Шрифт" + +#. i18n: file: appearance.ui:358 +#. i18n: ectx: property (toolTip), widget (QFontComboBox, fontComboBox_font) +#: po/rc.cpp:36 rc.cpp:36 +msgid "Set font family" +msgstr "Укажите шрифт" + +#. i18n: file: appearance.ui:375 +#. i18n: ectx: property (text), widget (QLabel, label_activeIcon) +#: po/rc.cpp:39 rc.cpp:39 +msgid "Active icon" +msgstr "Иконка активного подключения" + +#. i18n: file: appearance.ui:408 +#. i18n: ectx: property (text), widget (QLabel, label_textAlign) +#: po/rc.cpp:45 rc.cpp:45 +msgid "Text align" +msgstr "Выравнивание текста" + +#. i18n: file: appearance.ui:440 +#. i18n: ectx: property (toolTip), widget (QComboBox, comboBox_textAlign) +#: po/rc.cpp:48 rc.cpp:48 +msgid "Set text align" +msgstr "Установите выравнивание текста" + +#. i18n: file: dataengine.ui:34 +#. i18n: ectx: property (text), widget (QLabel, label_netctl) +#. i18n: file: widget.ui:161 +#. i18n: ectx: property (text), widget (QLabel, label_netctl) +#. i18n: file: dataengine.ui:34 +#. i18n: ectx: property (text), widget (QLabel, label_netctl) +#. i18n: file: widget.ui:161 +#. i18n: ectx: property (text), widget (QLabel, label_netctl) +#: po/rc.cpp:51 po/rc.cpp:90 rc.cpp:51 rc.cpp:90 +msgid "Path to netctl" +msgstr "Путь к netctl" + +#. i18n: file: dataengine.ui:67 +#. i18n: ectx: property (text), widget (QLabel, label_netctlAuto) +#. i18n: file: widget.ui:194 +#. i18n: ectx: property (text), widget (QLabel, label_netctlAuto) +#. i18n: file: dataengine.ui:67 +#. i18n: ectx: property (text), widget (QLabel, label_netctlAuto) +#. i18n: file: widget.ui:194 +#. i18n: ectx: property (text), widget (QLabel, label_netctlAuto) +#: po/rc.cpp:57 po/rc.cpp:96 rc.cpp:57 rc.cpp:96 +msgid "Path to netctl-auto" +msgstr "Путь к netctl-auto" + +#. i18n: file: dataengine.ui:100 +#. i18n: ectx: property (text), widget (QCheckBox, checkBox_extIp4) +#: po/rc.cpp:63 rc.cpp:63 +msgid "Check external IPv4" +msgstr "Проверять внешний IPv4" + +#. i18n: file: dataengine.ui:136 +#. i18n: ectx: property (text), widget (QCheckBox, checkBox_extIp6) +#: po/rc.cpp:69 rc.cpp:69 +msgid "Check external IPv6" +msgstr "Проверять внешний IPv6" + +#. i18n: file: widget.ui:34 +#. i18n: ectx: property (text), widget (QLabel, label_autoUpdate) +#: po/rc.cpp:75 rc.cpp:75 +msgid "Auto update interval, msec" +msgstr "Интервал автообновления, мсек" + +#. i18n: file: widget.ui:92 +#. i18n: ectx: property (text), widget (QLabel, label_gui) +#: po/rc.cpp:78 rc.cpp:78 +msgid "Path to GUI" +msgstr "Путь к GUI" + +#. i18n: file: widget.ui:125 +#. i18n: ectx: property (text), widget (QCheckBox, checkBox_helper) +#: po/rc.cpp:84 rc.cpp:84 +msgid "Use helper" +msgstr "Использовать хелпер" + +#. i18n: file: widget.ui:227 +#. i18n: ectx: property (text), widget (QCheckBox, checkBox_sudo) +#: po/rc.cpp:102 rc.cpp:102 +msgid "Use sudo for netctl" +msgstr "Использовать sudo для netctl" + +#. i18n: file: widget.ui:263 +#. i18n: ectx: property (text), widget (QCheckBox, checkBox_wifi) +#: po/rc.cpp:108 rc.cpp:108 +msgid "Show 'Start WiFi menu'" +msgstr "Показать 'Запустить WiFi-menu'" + +#. i18n: file: widget.ui:291 +#. i18n: ectx: property (text), widget (QCheckBox, checkBox_showBigInterface) +#: po/rc.cpp:114 rc.cpp:114 +msgid "Show more detailed interface" +msgstr "Показать более детальный интерфейс" + +#. i18n: file: widget.ui:309 +#. i18n: ectx: property (toolTip), widget (QPlainTextEdit, textEdit) +#: po/rc.cpp:117 rc.cpp:117 +msgid "" +"$info - active profile information\n" +"$current - current profile name\n" +"$extip4 - external IPv4\n" +"$extip6 - external IPv6\n" +"$interfaces - list of the network interfaces\n" +"$intip4 - internal IPv4\n" +"$intip6 - internal IPv6\n" +"$profiles - list of the netctl profiles\n" +"$status - current profile status (static/enabled)" +msgstr "" +"$info - информация об активном профиле\n" +"$current - имя текущего профиля\n" +"$extip4 - внешний IPv4\n" +"$extip6 - внешний IPv6\n" +"$interfaces - список сетевых интерфейсов\n" +"$intip4 - внутренний IPv4\n" +"$intip6 - внутренний IPv6\n" +"$profiles - список профилей netctl\n" +"$status - статус текущего профиля (static/enabled)" + +#: po/rc.cpp:126 rc.cpp:126 +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Evgeniy Alekseev" + +#: po/rc.cpp:127 rc.cpp:127 +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "esalexeev@gmail.com" + +#~ msgid "Acknowledgement" +#~ msgstr "Благодарности" + +#~ msgid "normal" +#~ msgstr "normal" + +#~ msgid "italic" +#~ msgstr "italic" + +#~ msgid "Path to ip" +#~ msgstr "Путь к ip" + +#~ msgid "Path to interface list" +#~ msgstr "Путь к интерфейсам" + +#~ msgid "Show network devices" +#~ msgstr "Показать сетевые устройства" + +#~ msgid "Show external IP" +#~ msgstr "Показать внешний IP" + +#~ msgid "Show internal IP" +#~ msgstr "Показать внутренний IP" + +#~ msgid "Configuration" +#~ msgstr "Настройка" diff --git a/sources/version.h.in b/sources/version.h.in index fdf25c9..29fcd1d 100644 --- a/sources/version.h.in +++ b/sources/version.h.in @@ -31,6 +31,7 @@ #define PROJECT_BUILD_HELPER "@BUILD_HELPER@" #define PROJECT_BUILD_LIBRARY "@BUILD_LIBRARY@" #define PROJECT_BUILD_PLASMOID "@BUILD_PLASMOID@" +#cmakedefine BUILD_KDE4 // additional components #define PROJECT_BUILD_DOCS "@BUILD_DOCS@" #define PROJECT_BUILD_TEST "@BUILD_TEST@"