2 Commits

Author SHA1 Message Date
e26da85b5f release 1.4.5
+ add translation support to plugin part
* more correct interface painting
* more correct configuration interface painting (fix #42)
* move plugin from private
2015-05-13 00:02:48 +03:00
f665a46346 release 1.4.4
Fix minfo
2015-04-30 01:08:12 +03:00
14 changed files with 60 additions and 33 deletions

View File

@ -1,3 +1,16 @@
Ver.1.4.5
---------
* plasmoid
+ add translation support to plugin part
* more correct interface painting
* more correct configuration interface painting
* move plugin from private
Ver.1.4.4
---------
* dataengine
- fix profile status definition
Ver.1.4.3 Ver.1.4.3
--------- ---------
* all * all

View File

@ -3,7 +3,7 @@
pkgbase=netctl-gui pkgbase=netctl-gui
pkgname=('libnetctlgui' 'netctlgui-helper' 'netctl-gui' pkgname=('libnetctlgui' 'netctlgui-helper' 'netctl-gui'
'plasma5-applet-netctl-gui') 'plasma5-applet-netctl-gui')
pkgver=1.4.3 pkgver=1.4.5
pkgrel=1 pkgrel=1
pkgdesc="Qt4/Qt5 GUI for netctl. Also provides a widget for KDE" pkgdesc="Qt4/Qt5 GUI for netctl. Also provides a widget for KDE"
arch=('i686' 'x86_64') arch=('i686' 'x86_64')
@ -11,7 +11,7 @@ url="http://arcanis.name/projects/netctl-gui"
license=('GPL3') license=('GPL3')
makedepends=('cmake' 'extra-cmake-modules' 'plasma-framework' 'qt5-tools') makedepends=('cmake' 'extra-cmake-modules' 'plasma-framework' 'qt5-tools')
source=("https://github.com/arcan1s/netctl-gui/releases/download/V.${pkgver}/${pkgbase}-${pkgver}-src.tar.xz") source=("https://github.com/arcan1s/netctl-gui/releases/download/V.${pkgver}/${pkgbase}-${pkgver}-src.tar.xz")
md5sums=('65a62753c03e2996a05d930c0ec2d460') md5sums=('9c1ddad6163290ed3fb52c3d233e1ee3')
prepare() { prepare() {
rm -rf "${srcdir}/build-"{plasmoid,qt5} rm -rf "${srcdir}/build-"{plasmoid,qt5}

View File

@ -4,7 +4,7 @@ pkgbase=netctl-gui-qt4
_pkgbase=netctl-gui _pkgbase=netctl-gui
pkgname=('libnetctlgui-qt4' 'netctlgui-helper-qt4' 'netctl-gui-qt4' pkgname=('libnetctlgui-qt4' 'netctlgui-helper-qt4' 'netctl-gui-qt4'
'kdeplasma-applets-netctl-gui') 'kdeplasma-applets-netctl-gui')
pkgver=1.4.3 pkgver=1.4.5
pkgrel=1 pkgrel=1
pkgdesc="Qt4 GUI for netctl. Also provides a widget for KDE4" pkgdesc="Qt4 GUI for netctl. Also provides a widget for KDE4"
arch=('i686' 'x86_64') arch=('i686' 'x86_64')
@ -12,7 +12,7 @@ url="http://arcanis.name/projects/netctl-gui"
license=('GPL3') license=('GPL3')
makedepends=('automoc4' 'cmake' 'kdelibs') makedepends=('automoc4' 'cmake' 'kdelibs')
source=("https://github.com/arcan1s/netctl-gui/releases/download/V.${pkgver}/${_pkgbase}-${pkgver}-src.tar.xz") source=("https://github.com/arcan1s/netctl-gui/releases/download/V.${pkgver}/${_pkgbase}-${pkgver}-src.tar.xz")
md5sums=('65a62753c03e2996a05d930c0ec2d460') md5sums=('9c1ddad6163290ed3fb52c3d233e1ee3')
prepare() { prepare() {

View File

@ -11,7 +11,7 @@ set (PROJECT_CONTACT "esalexeev@gmail.com")
set (PROJECT_LICENSE "GPLv3") set (PROJECT_LICENSE "GPLv3")
set (PROJECT_VERSION_MAJOR 1) set (PROJECT_VERSION_MAJOR 1)
set (PROJECT_VERSION_MINOR 4) set (PROJECT_VERSION_MINOR 4)
set (PROJECT_VERSION_PATCH 3) set (PROJECT_VERSION_PATCH 5)
set (PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}) set (PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
string (TIMESTAMP CURRENT_DATE "%Y-%m-%d %H:%M" UTC) string (TIMESTAMP CURRENT_DATE "%Y-%m-%d %H:%M" UTC)
string (TIMESTAMP CURRENT_YEAR "%Y") string (TIMESTAMP CURRENT_YEAR "%Y")

View File

@ -198,16 +198,15 @@ QStringList Netctl::getProfileList(const QString cmdNetctl, const QString cmdNet
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
netctlAutoStatus = true; netctlAutoStatus = true;
QString output = getCmdOutput(QString("%1 list").arg(cmdNetctlAuto)); QString output = getCmdOutput(QString("%1 list").arg(cmdNetctlAuto)).trimmed();
if (output.isEmpty()) { if (output.isEmpty()) {
output = getCmdOutput(QString("%1 list").arg(cmdNetctl)); output = getCmdOutput(QString("%1 list").arg(cmdNetctl)).trimmed();
netctlAutoStatus = false; netctlAutoStatus = false;
} }
qDebug() << output;
// parse // parse
QStringList currentProfiles; QStringList currentProfiles;
QStringList profileList = output.split(QChar('\n'), QString::SkipEmptyParts); QStringList profileList = output.split(QChar('\n'));
for (int i=0; i<profileList.count(); i++) { for (int i=0; i<profileList.count(); i++) {
if (profileList[i][0] != QChar('*')) continue; if (profileList[i][0] != QChar('*')) continue;
currentProfiles.append(profileList[i]); currentProfiles.append(profileList[i]);

View File

@ -19,7 +19,7 @@ import QtQuick 2.0
import QtQuick.Controls 1.3 as QtControls import QtQuick.Controls 1.3 as QtControls
import QtQuick.Layouts 1.0 as QtLayouts import QtQuick.Layouts 1.0 as QtLayouts
import org.kde.plasma.private.netctl 1.0 import org.kde.plasma.netctl 1.0
Item { Item {
@ -33,7 +33,7 @@ Item {
Column { Column {
id: pageColumn id: pageColumn
width: units.gridUnit * 25 anchors.fill: parent
QtControls.TabView { QtControls.TabView {
height: parent.height height: parent.height
width: parent.width width: parent.width

View File

@ -21,7 +21,7 @@ import QtQuick.Controls.Styles 1.3 as QtStyles
import QtQuick.Dialogs 1.1 as QtDialogs import QtQuick.Dialogs 1.1 as QtDialogs
import QtQuick.Layouts 1.0 as QtLayouts import QtQuick.Layouts 1.0 as QtLayouts
import org.kde.plasma.private.netctl 1.0 import org.kde.plasma.netctl 1.0
Item { Item {
@ -52,7 +52,7 @@ Item {
Column { Column {
id: pageColumn id: pageColumn
width: units.gridUnit * 25 anchors.fill: parent
Row { Row {
height: implicitHeight height: implicitHeight
width: parent.width width: parent.width

View File

@ -21,7 +21,7 @@ import QtQuick.Dialogs 1.1 as QtDialogs
import QtQuick.Layouts 1.0 as QtLayouts import QtQuick.Layouts 1.0 as QtLayouts
import QtQuick.Controls.Styles 1.3 as QtStyles import QtQuick.Controls.Styles 1.3 as QtStyles
import org.kde.plasma.private.netctl 1.0 import org.kde.plasma.netctl 1.0
Item { Item {
@ -37,7 +37,7 @@ Item {
Column { Column {
id: pageColumn id: pageColumn
width: units.gridUnit * 25 anchors.fill: parent
Row { Row {
height: implicitHeight height: implicitHeight
width: parent.width width: parent.width

View File

@ -17,11 +17,12 @@
import QtQuick 2.4 import QtQuick 2.4
import QtQuick.Controls 1.3 as QtControls import QtQuick.Controls 1.3 as QtControls
import QtQuick.Layouts 1.1
import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.private.netctl 1.0 import org.kde.plasma.netctl 1.0
Item { Item {
@ -75,8 +76,8 @@ Item {
} }
// ui // ui
Grid { GridLayout {
id: mainGrid anchors.fill: parent
columns: 2 columns: 2
Image { Image {
@ -126,15 +127,6 @@ Item {
text.text = NetctlAdds.parsePattern(plasmoid.configuration.textPattern) text.text = NetctlAdds.parsePattern(plasmoid.configuration.textPattern)
Plasmoid.toolTipSubText = NetctlAdds.valueByKey("info") Plasmoid.toolTipSubText = NetctlAdds.valueByKey("info")
needMenuUpdate() needMenuUpdate()
// updae geometry
text.update()
icon.height = text.contentHeight
icon.width = text.contentHeight
icon.update()
height = text.contentHeight
width = icon.paintedWidth + text.contentWidth
update()
} }
onNeedMenuUpdate: { onNeedMenuUpdate: {

View File

@ -21,7 +21,7 @@ import QtQuick.Dialogs 1.1 as QtDialogs
import QtQuick.Layouts 1.0 as QtLayouts import QtQuick.Layouts 1.0 as QtLayouts
import QtQuick.Controls.Styles 1.3 as QtStyles import QtQuick.Controls.Styles 1.3 as QtStyles
import org.kde.plasma.private.netctl 1.0 import org.kde.plasma.netctl 1.0
Item { Item {
@ -48,7 +48,7 @@ Item {
Column { Column {
id: pageColumn id: pageColumn
width: units.gridUnit * 25 anchors.fill: parent
Row { Row {
height: implicitHeight height: implicitHeight
width: parent.width width: parent.width

View File

@ -0,0 +1,22 @@
[Desktop Entry]
Encoding=UTF-8
Name=Netctl
Comment=Plasmoid for netctl
Type=Service
Icon=netctl-gui-widget
X-KDE-ServiceTypes=Plasma/Applet
X-Plasma-API=declarativeappletscript
X-Plasma-MainScript=ui/main.qml
X-Plasma-NotificationArea=true
X-Plasma-RemoteLocation=
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=1.4.4
X-KDE-PluginInfo-Website=http://arcanis.name/projects/netctl-gui
X-KDE-PluginInfo-Category=Network
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPLv3
X-KDE-PluginInfo-EnabledByDefault=true

View File

@ -1,4 +1,5 @@
set (PLUGIN_NAME netctlplugin) set (PLUGIN_NAME netctlplugin)
add_definitions(-DTRANSLATION_DOMAIN=\"plasma_applet_org.kde.plasma.netctl\")
add_definitions (${Qt5Core_DEFINITIONS} ${Qt5DBus_DEFINITIONS} ${Qt5Qml_DEFINITIONS}) add_definitions (${Qt5Core_DEFINITIONS} ${Qt5DBus_DEFINITIONS} ${Qt5Qml_DEFINITIONS})
set (Qt_INCLUDE ${Qt5Core_INCLUDE_DIRS} set (Qt_INCLUDE ${Qt5Core_INCLUDE_DIRS}
@ -26,6 +27,6 @@ file (GLOB SUBPROJECT_NOTIFY *.notifyrc)
add_library (${PLUGIN_NAME} SHARED ${SUBPROJECT_SOURCE}) add_library (${PLUGIN_NAME} SHARED ${SUBPROJECT_SOURCE})
target_link_libraries (${PLUGIN_NAME} ${Qt_LIBRARIES} ${Kf5_LIBRARIES}) target_link_libraries (${PLUGIN_NAME} ${Qt_LIBRARIES} ${Kf5_LIBRARIES})
install (TARGETS ${PLUGIN_NAME} DESTINATION ${QML_INSTALL_DIR}/org/kde/plasma/private/netctl) install (TARGETS ${PLUGIN_NAME} DESTINATION ${QML_INSTALL_DIR}/org/kde/plasma/netctl)
install (FILES qmldir DESTINATION ${QML_INSTALL_DIR}/org/kde/plasma/private/netctl) install (FILES qmldir DESTINATION ${QML_INSTALL_DIR}/org/kde/plasma/netctl)
install (FILES ${SUBPROJECT_NOTIFY} DESTINATION ${KNOTIFYRC_INSTALL_DIR}) install (FILES ${SUBPROJECT_NOTIFY} DESTINATION ${KNOTIFYRC_INSTALL_DIR})

View File

@ -32,7 +32,7 @@ static QObject *netctl_singletontype_provider(QQmlEngine *engine, QJSEngine *scr
void NetctlPlugin::registerTypes(const char *uri) void NetctlPlugin::registerTypes(const char *uri)
{ {
Q_ASSERT(uri == QLatin1String("org.kde.plasma.private.netctl")); Q_ASSERT(uri == QLatin1String("org.kde.plasma.netctl"));
qmlRegisterSingletonType<NetctlAdds>(uri, 1, 0, "NetctlAdds", netctl_singletontype_provider); qmlRegisterSingletonType<NetctlAdds>(uri, 1, 0, "NetctlAdds", netctl_singletontype_provider);
} }

View File

@ -1,3 +1,3 @@
module org.kde.plasma.private.netctl module org.kde.plasma.netctl
plugin netctlplugin plugin netctlplugin