From d582445597eb7d4e1be6d14b0959c88277e32a4f Mon Sep 17 00:00:00 2001 From: arcan1s Date: Wed, 14 May 2014 23:55:13 +0400 Subject: [PATCH] release 1.1.0 --- CHANGELOG | 5 +++ PKGBUILD-qt4 | 4 +-- PKGBUILD-qt5 | 4 +-- PKGBUILD-widget | 4 +-- sources/CMakeLists.txt | 4 +-- sources/dataengine/netctl.cpp | 12 ++----- sources/gui/resources/translations/english.ts | 28 ++++++++++------- sources/gui/resources/translations/russian.ts | 28 ++++++++++------- sources/gui/src/netctlinteract.cpp | 11 +------ sources/gui/src/wirelesswidget.cpp | 5 +++ sources/gui/src/wirelesswidget.ui | 31 +++++++++++++++++++ 11 files changed, 85 insertions(+), 51 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 389b16c..c09e9e2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +Ver.1.1.0 (netctl-1.7 update): ++ [gui] added frequency +* [gui] changed definition if profile is enabled +* [dataengine] changed definition if profile is enabled + Ver.1.0.6: * [gui] fix error checking diff --git a/PKGBUILD-qt4 b/PKGBUILD-qt4 index 69742bd..83dd256 100644 --- a/PKGBUILD-qt4 +++ b/PKGBUILD-qt4 @@ -2,7 +2,7 @@ pkgname=netctl-gui-qt4 _pkgname=netctl-gui -pkgver=1.0.6 +pkgver=1.1.0 pkgrel=1 pkgdesc="Qt4 graphical front-end for netctl. A part of netctl-gui" arch=('i686' 'x86_64') @@ -18,7 +18,7 @@ provides=('netctl-gui') conflicts=('netctl-gui') source=("https://github.com/arcan1s/netctl-gui/releases/download/V.${pkgver}/${_pkgname}-${pkgver}-src.tar.xz") install="${_pkgname}.install" -md5sums=('dc0e2f22f658d0c0ff159c95eb4fa413') +md5sums=('7c25aa8597a2a89555e7b04c253d9019') _cmakekeys="-DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DUSE_QT5:BOOL=0 -DBUILD_DATAENGINE:BOOL=0 -DBUILD_PLASMOID:BOOL=0" diff --git a/PKGBUILD-qt5 b/PKGBUILD-qt5 index 44b20d4..f4d0fce 100644 --- a/PKGBUILD-qt5 +++ b/PKGBUILD-qt5 @@ -1,7 +1,7 @@ # Maintainer: Evgeniy "arcanis" Alexeev pkgname=netctl-gui -pkgver=1.0.6 +pkgver=1.1.0 pkgrel=1 pkgdesc="Qt5 graphical front-end for netctl. A part of netctl-gui" arch=('i686' 'x86_64') @@ -15,7 +15,7 @@ optdepends=('kdebase-runtime: sudo support' 'wpa_supplicant: wifi support') source=("https://github.com/arcan1s/netctl-gui/releases/download/V.${pkgver}/${pkgname}-${pkgver}-src.tar.xz") install="${pkgname}.install" -md5sums=('dc0e2f22f658d0c0ff159c95eb4fa413') +md5sums=('7c25aa8597a2a89555e7b04c253d9019') _cmakekeys="-DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DBUILD_DATAENGINE:BOOL=0 -DBUILD_PLASMOID:BOOL=0" diff --git a/PKGBUILD-widget b/PKGBUILD-widget index e010af0..c367ec7 100644 --- a/PKGBUILD-widget +++ b/PKGBUILD-widget @@ -2,7 +2,7 @@ pkgname=kdeplasma-applets-netctl-gui _pkgname=netctl-gui -pkgver=1.0.6 +pkgver=1.1.0 pkgrel=1 pkgdesc="A plasmoid, which interacts with netctl. A part of netctl-gui" arch=('i686' 'x86_64') @@ -16,7 +16,7 @@ optdepends=('kdebase-runtime: sudo support' 'sudo: sudo support') source=("https://github.com/arcan1s/netctl-gui/releases/download/V.${pkgver}/${_pkgname}-${pkgver}-src.tar.xz") install="${_pkgname}.install" -md5sums=('dc0e2f22f658d0c0ff159c95eb4fa413') +md5sums=('7c25aa8597a2a89555e7b04c253d9019') _cmakekeys="-DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DBUILD_GUI:BOOL=0" diff --git a/sources/CMakeLists.txt b/sources/CMakeLists.txt index 7e2cdd1..9396176 100644 --- a/sources/CMakeLists.txt +++ b/sources/CMakeLists.txt @@ -7,8 +7,8 @@ cmake_policy (SET CMP0015 NEW) project (netctl-gui) set (PROJECT_VERSION_MAJOR 1) -set (PROJECT_VERSION_MINOR 0) -set (PROJECT_VERSION_PATCH 6) +set (PROJECT_VERSION_MINOR 1) +set (PROJECT_VERSION_PATCH 0) set (PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}) configure_file (${CMAKE_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h) diff --git a/sources/dataengine/netctl.cpp b/sources/dataengine/netctl.cpp index 40bd71e..2abc78d 100644 --- a/sources/dataengine/netctl.cpp +++ b/sources/dataengine/netctl.cpp @@ -201,16 +201,10 @@ QString Netctl::getProfileStringStatus(const QString cmd) QProcess command; QString status = QString("static"); QString profile = getCurrentProfile(cmd); - command.start(cmd + QString(" status ") + profile); + command.start(cmd + QString(" is-enabled ") + profile); command.waitForFinished(-1); - QString cmdOutput = QTextCodec::codecForMib(106)->toUnicode(command.readAllStandardOutput()); - QStringList profileStatus = cmdOutput.split(QChar('\n'), QString::SkipEmptyParts); - for (int i=0; i - + BridgeWidget @@ -133,7 +133,7 @@ Skip no carrier Skip no carrier - + Set to ‘yes’ to use 802.1x authentication Set to ‘yes’ to use 802.1x authentication @@ -268,7 +268,7 @@ A command that is executed before a connection is brought down A command that is executed before a connection is brought down - + Set to ‘yes’ to force connecting even if the interface is up Set to ‘yes’ to force connecting even if the interface is up @@ -319,7 +319,7 @@ Add Add - + An array of IP addresses suffixed with ‘/<netmask>’ An array of IP addresses suffixed with ‘/<netmask>’ @@ -399,7 +399,7 @@ Timeout DAD Timeout DAD - + Set to ‘yes’ to release the DHCP lease when the profile is stopped Set to ‘yes’ to release the DHCP lease when the profile is stopped @@ -459,7 +459,7 @@ DNS domain DNS domain - + A ‘domain’ line for /etc/resolv.conf A ‘domain’ line for /etc/resolv.conf @@ -467,7 +467,7 @@ DNS search DNS search - + A ‘search’ line for /etc/resolv.conf A ‘search’ line for /etc/resolv.conf @@ -475,11 +475,11 @@ DNS options DNS options - + An array of ‘options’ lines for /etc/resolv.conf An array of ‘options’ lines for /etc/resolv.conf - + Maximum time, in seconds, to wait for IPv6’s Duplicate Address Detection to succeed Maximum time, in seconds, to wait for IPv6’s Duplicate Address Detection to succeed @@ -879,7 +879,7 @@ Idle timeout Idle timeout - + This option specifies the idle time (in seconds) after which ‘pppd’ should disconnect This option specifies the idle time (in seconds) after which ‘pppd’ should disconnect @@ -919,7 +919,7 @@ LCP echo interval LCP echo interval - + These options override default LCP parameters from ‘/etc/ppp/options’ These options override default LCP parameters from ‘/etc/ppp/options’ @@ -1236,7 +1236,7 @@ tap tap - + Either ‘tun’, or ‘tap’ Either ‘tun’, or ‘tap’ @@ -1450,5 +1450,9 @@ Exclude auto Exclude auto + + Frequency + Frequency + diff --git a/sources/gui/resources/translations/russian.ts b/sources/gui/resources/translations/russian.ts index 0a1bf27..3191cb8 100644 --- a/sources/gui/resources/translations/russian.ts +++ b/sources/gui/resources/translations/russian.ts @@ -1,6 +1,6 @@ - + BridgeWidget @@ -133,7 +133,7 @@ Skip no carrier Пропустить отсутствие оператора - + Set to ‘yes’ to use 802.1x authentication Установить "да", чтобы использовать 802.1x авторизацию @@ -268,7 +268,7 @@ A command that is executed before a connection is brought down Команда, которая будет запущена перед отключением - + Set to ‘yes’ to force connecting even if the interface is up Установить "да", чтобы запустить соединение, даже если интерфейс уже поднят @@ -319,7 +319,7 @@ Add Добавить - + An array of IP addresses suffixed with ‘/<netmask>’ Массив IP адресов с суффиксом ‘/<netmask>’ @@ -399,7 +399,7 @@ Timeout DAD Таймаут DAD - + Set to ‘yes’ to release the DHCP lease when the profile is stopped Установить "да", чтобы оставить выделенный DHCP, когда профиль отключен @@ -459,7 +459,7 @@ DNS domain DNS домен - + A ‘domain’ line for /etc/resolv.conf Строка ‘domain’ в /etc/resolv.conf @@ -467,7 +467,7 @@ DNS search Поиск DNS - + A ‘search’ line for /etc/resolv.conf Строка ‘search’ в /etc/resolv.conf @@ -475,11 +475,11 @@ DNS options Опции DNS - + An array of ‘options’ lines for /etc/resolv.conf Массив строк ‘options’ в /etc/resolv.conf - + Maximum time, in seconds, to wait for IPv6’s Duplicate Address Detection to succeed Максимальное время в секундах для ожидания выполнения детектирования дубликации IPv6 адресов @@ -879,7 +879,7 @@ Idle timeout Таймаут простоя - + This option specifies the idle time (in seconds) after which ‘pppd’ should disconnect Указывает таймаут простоя в секундах, после чего 'pppd' будет отключен @@ -919,7 +919,7 @@ LCP echo interval LCP echo интервал - + These options override default LCP parameters from ‘/etc/ppp/options’ Эти опции заместят стандартные опции LCP из ‘/etc/ppp/options’ @@ -1236,7 +1236,7 @@ tap tap - + Either ‘tun’, or ‘tap’ ‘tun’ или ‘tap’ @@ -1450,5 +1450,9 @@ Exclude auto Исключить профиль + + Frequency + Частота + diff --git a/sources/gui/src/netctlinteract.cpp b/sources/gui/src/netctlinteract.cpp index b12212c..5a70605 100644 --- a/sources/gui/src/netctlinteract.cpp +++ b/sources/gui/src/netctlinteract.cpp @@ -190,16 +190,7 @@ bool Netctl::isProfileActive(const QString profile) bool Netctl::isProfileEnabled(const QString profile) { - bool status = false; - QString cmdOutput = getNetctlOutput(false, QString("status"), profile); - if (!cmdOutput.isEmpty()) { - QStringList profileStatus = cmdOutput.split(QString("\n"), QString::SkipEmptyParts); - for (int i=0; ispinBox_freq->setValue(2412); ui->listWidget_freq->setCurrentRow(-1); ui->listWidget_freq->clear(); + ui->spinBox_frequency->setValue(2000); ui->spinBox_priority->setValue(0); ui->lineEdit_country->clear(); ui->lineEdit_wpaGroup->setText(QString("wheel")); @@ -240,6 +241,8 @@ QMap WirelessWidget::getSettings() freqs.append(ui->listWidget_freq->item(i)->text()); wirelessSettings[QString("ScanFrequencies")] = freqs.join(QString(" ")); } + if (ui->spinBox_frequency->value() != 2000) + wirelessSettings[QString("Frequency")] = QString::number(ui->spinBox_frequency->value()); if (ui->spinBox_priority->value() != 0) wirelessSettings[QString("Priority")] = QString::number(ui->spinBox_priority->value()); if (!ui->lineEdit_country->text().isEmpty()) @@ -324,6 +327,8 @@ void WirelessWidget::setSettings(const QMap settings) ui->checkBox_adhoc->setCheckState(Qt::Checked); if (wirelessSettings.contains(QString("ScanFrequencies"))) ui->listWidget_freq->addItems(wirelessSettings[QString("ScanFrequencies")].split(QString("\n"))); + if (wirelessSettings.contains(QString("Frequency"))) + ui->spinBox_frequency->setValue(wirelessSettings[QString("Frequency")].toInt()); if (wirelessSettings.contains(QString("Priority"))) ui->spinBox_priority->setValue(wirelessSettings[QString("Priority")].toInt()); if (wirelessSettings.contains(QString("Country"))) diff --git a/sources/gui/src/wirelesswidget.ui b/sources/gui/src/wirelesswidget.ui index 89acad4..c86558d 100644 --- a/sources/gui/src/wirelesswidget.ui +++ b/sources/gui/src/wirelesswidget.ui @@ -305,6 +305,36 @@ + + + + + + + 150 + 0 + + + + Frequency + + + + + + + Priority group for the network + + + 2000 + + + 6000 + + + + + @@ -525,6 +555,7 @@ spinBox_freq pushButton_freq listWidget_freq + spinBox_frequency spinBox_priority lineEdit_country lineEdit_wpaGroup