57 Commits

Author SHA1 Message Date
8dd48fa7cc release 1.3.3
fix #19
2014-10-19 17:50:24 +04:00
287405f81a try fix #19 2014-10-18 01:17:15 +04:00
fa27b80060 add some w\o 2014-10-17 13:52:46 +04:00
c2c14c4911 Merge pull request #18 from nosada/translate_to_ja
Fix translation on plasmoid
2014-10-13 11:58:23 +04:00
e2deb8751d fix translation at plasmoid 2014-10-13 16:43:37 +09:00
1fe7d6e21f change translation at plasmoid (again) 2014-10-13 16:43:37 +09:00
e68be6d4f1 change translation at plasmoid 2014-10-13 16:43:37 +09:00
45d3a42754 update tasks 2014-10-09 22:58:13 +04:00
cb0410a182 update pkgbuild #17 2014-09-27 18:25:41 +04:00
9d349461cf release 1.3.2 2014-09-22 00:56:12 +04:00
d41a34673b add translations to resources
fix plasmoid icon
2014-09-21 14:28:58 +04:00
b199b43f58 fix mistakes and fluctuation of description at plasmoid 2014-09-19 13:55:43 +09:00
6d212efe1e fix mistakes and fluctuation of description at netctlgui-helper 2014-09-19 13:55:43 +09:00
d32486d882 fix mistakes and fluctuation of description at netctl-gui 2014-09-19 13:55:43 +09:00
5afa65ce68 edit authors 2014-09-19 00:44:55 +04:00
5b46247df2 finished 2014-09-19 01:09:56 +09:00
bda5433716 translating netctl-gui to Japanese (yet not finished) 2014-09-19 01:09:56 +09:00
835e82ca63 translated netctlgui-helper to Japanese 2014-09-19 01:09:56 +09:00
98cdb18d62 translating netctl-gui to Japanese (yet not finished), and modify plasmoid translating file 2014-09-19 01:09:56 +09:00
cd59a9b294 translating netctl-gui to Japanese (not finished) 2014-09-19 01:09:56 +09:00
4780433c4d translated plasmoid to Japanese 2014-09-19 01:09:56 +09:00
28a4934a82 change appmenu to button set to better user experience
(if user will have global appmenu enabled)
2014-09-09 09:38:59 +04:00
4e8bbeed35 update archlinux install scripts 2014-09-06 15:24:42 +04:00
f86ef0514b release 1.3.1 2014-09-06 15:02:05 +04:00
4c004af1ae add dbus configuration to backup 2014-08-27 22:30:49 +04:00
66e3a737d4 rollback some changes since
1) systemd-user doesn't work correctly with session bus
2) systemd-user cannot set capabilities
2014-08-27 22:24:19 +04:00
9cf6552c71 update install files 2014-08-27 18:20:12 +04:00
f18e74917b more correct checking dbus response 2014-08-27 18:14:22 +04:00
b909222db9 better submodules integration (hope =))
add --session support to the helper
2014-08-27 17:23:12 +04:00
0c7868536a update to changes 2014-08-27 17:12:52 +04:00
fc3956caf1 ya submodules fix 2014-08-27 17:07:00 +04:00
4cf3c85070 fix submodules (see #14) 2014-08-27 16:26:38 +04:00
6e57baccaf remove description from security notes 2014-08-27 11:47:44 +04:00
5ed704e676 rewrite to use submodules 2014-08-26 16:06:13 +04:00
eb3753ab25 update 3rdparty/language 2014-08-26 10:46:14 +04:00
f9d71577f3 update html docs to standards 2014-08-25 23:52:10 +04:00
814f2c7904 update license agreement to trdparty items 2014-08-25 20:29:30 +04:00
ceca889be4 release 1.3.0 2014-08-25 16:06:31 +04:00
696283b1e1 update readme/prepare to release 2014-08-25 15:06:03 +04:00
15cc3a8595 rename wifi tab 2014-08-25 14:59:34 +04:00
e8c3441f29 add profile reading description 2014-08-25 11:53:14 +04:00
2de7b26f66 change name to id in html docs 2014-08-25 11:42:50 +04:00
8f35aeb88f rewrite actions to qtoolbutton 2014-08-25 11:34:08 +04:00
b49188c104 remove kde runtime from optdep list 2014-08-25 10:56:45 +04:00
f8bf8830be fix mans 2014-08-25 10:55:34 +04:00
6e6c547460 unify configuration names 2014-08-25 10:54:18 +04:00
d287f52ba5 rename layout 2014-08-25 10:48:01 +04:00
8cc02a07fb update translations 2014-08-24 16:45:19 +04:00
28d51484b1 fix update toolboxes 2014-08-24 16:40:01 +04:00
e7d2e0bd38 change menu to toolboxes 2014-08-24 16:30:37 +04:00
999914926a add force* slots 2014-08-24 13:08:13 +04:00
e21b2201ab small tray fixes 2014-08-24 13:00:50 +04:00
d65ded6072 update messages 2014-08-20 23:37:37 +04:00
16662f697b cleanup!
(remove symlinks)
2014-08-20 22:16:06 +04:00
35d740b778 update build script 2014-08-20 21:25:56 +04:00
0a16364a7a update docs
change building
2014-08-20 21:16:31 +04:00
e9090ab4a9 remove suid bit to use capabilities 2014-08-20 20:21:34 +04:00
108 changed files with 4899 additions and 2194 deletions

2
.gitignore vendored
View File

@ -25,3 +25,5 @@ usr/
# translations
*.qm
# temporary bckps
*~

12
.gitmodules vendored Normal file
View File

@ -0,0 +1,12 @@
[submodule "sources/3rdparty/tasks"]
path = sources/3rdparty/tasks
url = https://github.com/mhogomchungu/tasks.git
[submodule "sources/3rdparty/pdebug"]
path = sources/3rdparty/pdebug
url = https://github.com/arcan1s/qtadds-pdebug.git
[submodule "sources/3rdparty/language"]
path = sources/3rdparty/language
url = https://github.com/arcan1s/qtadds-language.git
[submodule "sources/3rdparty/task"]
path = sources/3rdparty/task
url = https://github.com/arcan1s/qtadds-taskadds-qprocess.git

View File

@ -1,2 +1,5 @@
Current developers:
Evgeniy Alekseev aka arcanis <esalexeev (at) gmail (dot) com>
Translators:
@nosada (Japanese translation)

View File

@ -1,3 +1,32 @@
Ver.1.3.3
---------
* all
* update Japanese translation
* dataengine
- fix #19
***
Ver.1.3.2
---------
* all
+ add Japanese translation (thanks to @nosada)
***
Ver.1.3.1
---------
* gui:
* more correct calls of boolean DBus methods
* edit helper icon
* helper:
* more correct calls of boolean DBus methods
* more correct systemd service
* add ability to create session bus
***
Ver.1.3.0
---------
* all:
@ -21,10 +50,13 @@ Ver.1.3.0
+ add ability to use helper
+ add ability to start minimized/maximized/detached
+ add ability to don't save profile from WiFi tab
+ add ability to skip external components checking
- remove buttons
* more correct actions into SettingsWindow
* update to library changes
* rewrite tables to use toolTip
* edit about window
* change menuBar
* helper:
+ create daemon DBus system interface org.netctlgui.helper to the library:
self control slots, netctl control slots and netctl information slots
@ -36,13 +68,14 @@ Ver.1.3.0
+ add slot stopAllProfiles()
+ add slot reenableProfile()
+ add slots getRecommendedConfiguration()
+ add slots forceStartProfile() and forceStopProfile()
+ add double quotes to profile names
+ add tests
* rewrite to use [tasks](https://github.com/mhogomchungu/tasks) (see #7)
* rename getInterfaceList() to getWirelessInterfaceList()
* change temporaty directory from $HOME/.cache to system one
- remove functions getProfileDescriptions() and getProfileStatuses()
- remove SleepThread class
* rewrite to use [tasks](https://github.com/mhogomchungu/tasks) (see #7)
* rename getInterfaceList() to getWirelessInterfaceList()
* change temporary directory from $HOME/.cache to system one
* plasmoid:
+ add 3rd party license information
+ allow plasmoid to use system tray

View File

@ -11,7 +11,12 @@ Qt4/Qt5 graphical interface for netctl. It may work with profiles and may create
Configuration
-------------
It is recommended to use graphical interface for widget and DataEngine configuration. All settings of GUI are stored in `$HOME/.config/netctl-gui.conf`. It is highly recommended to edit it from graphical interface.
It is recommended to use graphical interface for configuration. Configuration files are:
* `$HOME/.config/netctl-gui.conf` - GUI/helper user configuration
* `/etc/netctl-gui.conf` - helper system-wide configuration
* `$KDEHOME/share/config/netctl.conf` - DataEngine user configuration
* `$KDESYSTEM/share/config/netctl.conf` - DataEngine system-wide configuration
Instruction
===========
@ -50,14 +55,20 @@ Installation
Available cmake flags:
* `-DBUILD_DATAENGINE:BOOL=0` - do not build DataEngine
* `-DBUILD_DOCS:BOOL=0` - do not build developer documentation
* `-DBUILD_GUI:BOOL=0` - do not build GUI
* `-DBUILD_HELPER:BOOL=0` - do not build helper daemon
* `-DBUILD_LIBRARY:BOOL=0` - do not build library
* `-DBUILD_PLASMOID:BOOL=0` - do not build Plasmoid
* `-DBUILD_TEST:BOOL=1` - build auto tests for the library and the helper
* `-DUSE_QT5:BOOL=0` - use Qt4 instead of Qt5 for GUI
* components:
* `-DBUILD_DATAENGINE:BOOL=0` - do not build DataEngine
* `-DBUILD_GUI:BOOL=0` - do not build GUI
* `-DBUILD_HELPER:BOOL=0` - do not build helper daemon
* `-DBUILD_LIBRARY:BOOL=0` - do not build library
* `-DBUILD_PLASMOID:BOOL=0` - do not build Plasmoid
* additional components:
* `-DBUILD_DOCS:BOOL=0` - do not build developer documentation
* `-DBUILD_TEST:BOOL=1` - build auto tests for the library and the helper
* project properties:
* `-DDBUS_SYSTEMCONF_PATH=/etc/dbus-1/system.d/` - path to dbus system configuration files
* `-DSYSTEMD_SERVICE_PATH=lib/systemd/system` - path to systemd services
* `-DUSE_CAPABILITIES:BOOL=0` - do not use setcap to get privileges to the helper
* `-DUSE_QT5:BOOL=0` - use Qt4 instead of Qt5 for GUI
Additional information
======================
@ -65,9 +76,6 @@ Additional information
TODO (wish list)
----------------
* remove suid bit from helper (polkit/logind/etc)
* check/update documentation
Links
-----

View File

@ -4,16 +4,15 @@ pkgbase=netctl-gui
pkgname=('libnetctlgui' 'netctlgui-helper' 'netctl-gui'
'libnetctlgui-qt4' 'netctlgui-helper-qt4' 'netctl-gui-qt4'
'kdeplasma-applets-netctl-gui')
pkgver=1.3.0
pkgrel=1
pkgver=1.3.3
pkgrel=2
pkgdesc="Qt4/Qt5 GUI for netctl. Also provides a widget for KDE"
arch=('i686' 'x86_64')
url="http://arcanis.name/projects/netctl-gui"
license=('GPL3')
makedepends=('automoc4' 'cmake' 'kdelibs' 'qt5-base' 'qt5-tools')
source=("https://github.com/arcan1s/netctl-gui/releases/download/V.${pkgver}/${pkgbase}-${pkgver}-src.tar.xz")
install="${pkgbase}.install"
md5sums=('d99eba4101fee42ebbfa5735aa706bc9')
md5sums=('9ba672ef33e9962ccc04fc4de75fad68')
prepare() {
@ -37,6 +36,7 @@ build() {
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_DATAENGINE:BOOL=0 \
-DBUILD_PLASMOID:BOOL=0 \
-DUSE_CAPABILITIES:BOOL=0 \
-DUSE_QT5:BOOL=0 \
"../${pkgbase}"
make
@ -46,6 +46,7 @@ build() {
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_DATAENGINE:BOOL=0 \
-DBUILD_PLASMOID:BOOL=0 \
-DUSE_CAPABILITIES:BOOL=0 \
"../${pkgbase}"
make
}
@ -54,13 +55,12 @@ build() {
package_kdeplasma-applets-netctl-gui() {
pkgdesc="A plasmoid, which interacts with netctl. A part of netctl-gui"
depends=('netctl' 'kdebase-workspace')
optdepends=('kdebase-runtime: sudo support'
'netctlgui-helper: DBus helper daemon'
optdepends=('netctlgui-helper: DBus helper daemon'
'netctlgui-helper-qt4: DBus helper daemon'
'netctl-gui: graphical front-end'
'netctl-gui-qt4: graphical front-end'
'sudo: sudo support')
install="${pkgbase}.install"
install="kdeplasma-applets-netctl-gui.install"
cd "${srcdir}/build-plasmoid"
make DESTDIR="${pkgdir}" install
@ -86,7 +86,9 @@ package_netctlgui-helper() {
depends=('libnetctlgui')
provides=('netctlgui-helper-qt4')
conflicts=('netctlgui-helper-qt4')
backup=('etc/netctlgui-helper.conf')
backup=('etc/netctl-gui.conf'
'etc/dbus-1/system.d/org.netctlgui.helper.conf')
install="netctlgui-helper.install"
cd "${srcdir}/build-qt5/helper"
make DESTDIR="${pkgdir}" install
@ -100,10 +102,12 @@ package_netctl-gui() {
'netctlgui-helper: DBus helper daemon')
provides=('netctl-gui-qt4')
conflicts=('netctl-gui-qt4')
install="${pkgbase}.install"
install="netctl-gui.install"
cd "${srcdir}/build-qt5/gui"
make DESTDIR="${pkgdir}" install
cd "${srcdir}/build-qt5/resources"
make DESTDIR="${pkgdir}" install
}
@ -115,6 +119,7 @@ package_libnetctlgui-qt4() {
'wpa_supplicant: wifi support')
provides=('libnetctlgui')
conflicts=('libnetctlgui')
install=""
cd "${srcdir}/build-qt4/netctlgui"
make DESTDIR="${pkgdir}" install
@ -126,7 +131,9 @@ package_netctlgui-helper-qt4() {
depends=('libnetctlgui-qt4')
provides=('netctlgui-helper')
conflicts=('netctlgui-helper')
backup=('etc/netctlgui-helper.conf')
backup=('etc/netctl-gui.conf'
'etc/dbus-1/system.d/org.netctlgui.helper.conf')
install="netctlgui-helper.install"
cd "${srcdir}/build-qt4/helper"
make DESTDIR="${pkgdir}" install
@ -140,8 +147,10 @@ package_netctl-gui-qt4() {
'netctlgui-helper-qt4: DBus helper daemon')
provides=('netctl-gui')
conflicts=('netctl-gui')
install="${pkgbase}.install"
install="netctl-gui.install"
cd "${srcdir}/build-qt4/gui"
make DESTDIR="${pkgdir}" install
cd "${srcdir}/build-qt4/resources"
make DESTDIR="${pkgdir}" install
}

View File

@ -0,0 +1,14 @@
post_install() {
cat << EOF
Update plasmoids...
EOF
kbuildsycoca4 > /dev/null 2>&1
}
post_upgrade() {
post_install "$1"
}
post_remove() {
post_install "$1"
}

11
arch/libnetctlgui.install Normal file
View File

@ -0,0 +1,11 @@
post_install() {
true
}
post_upgrade() {
post_install "$1"
}
post_remove() {
post_install "$1"
}

View File

@ -4,9 +4,9 @@ post_install() {
}
post_upgrade() {
post_install
post_install "$1"
}
post_remove() {
post_install
post_install "$1"
}

View File

@ -0,0 +1,11 @@
post_install() {
setcap cap_setuid=ep usr/bin/netctlgui-helper 2>/dev/null || chmod +s usr/bin/netctlgui-helper
cat << EOF
Note: users should be in network group if you want to get them access to the system bus
See http://arcanis.name/devs/netctl-gui-security-notes.html#helper
EOF
}
post_upgrade() {
post_install "$1"
}

View File

@ -3,10 +3,12 @@
ARCHIVE="netctl-gui"
SRCDIR="sources"
FILES="AUTHORS CHANGELOG COPYING README.md"
IGNORELIST="build en.qm ru.qm netctl-gui.qm *.cppcheck"
IGNORELIST="build *.qm *.cppcheck .git*"
VERSION=$(grep -m1 PROJECT_VERSION_MAJOR sources/CMakeLists.txt | awk '{print $3}' | cut -c 1).\
$(grep -m1 PROJECT_VERSION_MINOR sources/CMakeLists.txt | awk '{print $3}' | cut -c 1).\
$(grep -m1 PROJECT_VERSION_PATCH sources/CMakeLists.txt | awk '{print $3}' | cut -c 1)
# update submodules
git submodule update --init --recursive
# create archive
[[ -e ${ARCHIVE}-${VERSION}-src.tar.xz ]] && rm -f "${ARCHIVE}-${VERSION}-src.tar.xz"
[[ -d ${ARCHIVE} ]] && rm -rf "${ARCHIVE}"
@ -14,8 +16,12 @@ cp -r "${SRCDIR}" "${ARCHIVE}"
for FILE in ${FILES[*]}; do cp -r "$FILE" "${ARCHIVE}"; done
for FILE in ${IGNORELIST[*]}; do find "${ARCHIVE}" -name "${FILE}" -exec rm -rf {} \;; done
tar cJf "${ARCHIVE}-${VERSION}-src.tar.xz" "${ARCHIVE}"
ln -sf "../${ARCHIVE}-${VERSION}-src.tar.xz" arch
rm -rf "${ARCHIVE}"
# update md5sum
MD5SUMS=$(md5sum ${ARCHIVE}-${VERSION}-src.tar.xz | awk '{print $1}')
sed -i "/md5sums=('[0-9A-Fa-f]*/s/[^'][^)]*/md5sums=('${MD5SUMS}'/" PKGBUILD
sed -i "s/pkgver=[0-9.]*/pkgver=${VERSION}/" PKGBUILD
sed -i "/md5sums=('[0-9A-Fa-f]*/s/[^'][^)]*/md5sums=('${MD5SUMS}'/" arch/PKGBUILD
sed -i "s/pkgver=[0-9.]*/pkgver=${VERSION}/" arch/PKGBUILD
# clear
find . -type f -name '*src.tar.xz' -not -name "*${VERSION}-src.tar.xz" -exec rm -rf {} \;
find arch -type l -xtype l -exec rm -rf {} \;

1
sources/3rdparty/language vendored Submodule

12
sources/3rdparty/language-config.h vendored Normal file
View File

@ -0,0 +1,12 @@
#ifndef LANGUAGE_CONFIG_H
#define LANGUAGE_CONFIG_H
// put your languages here comma separated
// the first language is default language
#define LANGUAGES "en,ru"
// language key in the configuration file
#define LANGUAGE_KEY "LANGUAGE"
#endif /* LANGUAGE_CONFIG_H */

1
sources/3rdparty/pdebug vendored Submodule

Submodule sources/3rdparty/pdebug added at 294a590bb9

View File

@ -1,45 +0,0 @@
/***************************************************************************
* 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 PRETTY_DEBUG_H
#define PRETTY_DEBUG_H
inline const char *pDebug(const std::string prettyFunction)
{
return prettyFunction.c_str();
}
inline std::string pFuncInfo(const std::string prettyFunction)
{
size_t colons = prettyFunction.find("::");
// workaround for functions which are not belong to any class
if (colons == std::string::npos)
colons = prettyFunction.rfind("(");
size_t begin = prettyFunction.substr(0, colons).rfind(" ") + 1;
size_t end = prettyFunction.rfind("(") - begin;
return "[" + prettyFunction.substr(begin, end) + "]";
}
#define PDEBUG pDebug(pFuncInfo(__PRETTY_FUNCTION__))
#endif /* PRETTY_DEBUG_H */

1
sources/3rdparty/task vendored Submodule

Submodule sources/3rdparty/task added at d2798204a1

View File

@ -1,41 +0,0 @@
Asynchronous programming in Qt/C++ using tasks,continuations and resumable functions.
This project is inspired by this[1] video on channel9.
The project seeks to do async based programming in Qt/C++ using modern C++ with lambdas.
The project has two sets of APIs.
1. Task::run().then() API provides async based programming with continuation[4].
2. Task::await() API provides the first API presented in a different way[5].
Under certain use cases,they can be used interchangeably, and in others,only one or the other can be used.Some of the problems
the first API causes and solved by the second API are discussed in this[7] youtube video.
Example use case for the Task::run().then() API can be found here[0]. Additional example is [2] where an API is
declared and [3] where the declared API is used.
Example use case of the Task::await() API is here[6] where a function call "blocks" waiting for a result without "hanging" the entire GUI application.
A short tutorial on task/async/await as implemented in C# can be viewed from this[8] link.
[0] https://github.com/mhogomchungu/tasks/blob/master/example.cpp
[1] http://channel9.msdn.com/Blogs/Charles/Asynchronous-Programming-for-C-Developers-PPL-Tasks-and-Windows-8
[2] https://github.com/mhogomchungu/zuluCrypt/blob/d0439a4e36521e42fa9392b82dcefd3224d53334/zuluMount-gui/zulumounttask.h#L61
[3] https://github.com/mhogomchungu/zuluCrypt/blob/d0439a4e36521e42fa9392b82dcefd3224d53334/zuluMount-gui/mainwindow.cpp#L812
[4] Disscussion about this can be found on the following link among other places: http://isocpp.org/files/papers/N3558.pdf
[5] Disscussion about this can be found on the following link among other places: http://isocpp.org/files/papers/N3564.pdf
[6] https://github.com/mhogomchungu/zuluCrypt/blob/7123e3c3a7c8c5b3b3b6958464fd92a7f780d827/zuluMount-gui/keydialog.cpp#L511
[7] https://www.youtube.com/watch?v=Y475RshtAHA
[8] http://www.youtube.com/watch?v=DqjIQiZ_ql4

View File

@ -1,385 +0,0 @@
/*
* copyright: 2014
* name : mhogo mchungu
* email: mhogomchungu@gmail.com
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#ifndef __TASK_H_INCLUDED__
#define __TASK_H_INCLUDED__
#include <utility>
#include <future>
#include <functional>
#include <QThread>
#include <QEventLoop>
/*
*
* Examples on how to use the library are at the end of this file.
*
*/
namespace Task
{
class Thread : public QThread
{
Q_OBJECT
public:
Thread()
{
connect( this,SIGNAL( finished() ),this,SLOT( deleteLater() ) ) ;
}
protected:
virtual ~Thread()
{
}
private:
virtual void run( void )
{
}
};
template< typename T >
class future
{
public:
future() : m_function( []( T t ){ Q_UNUSED( t ) ; } )
{
}
void setActions( std::function< void( void ) > start,
std::function< void( void ) > cancel,
std::function< T ( void ) > get )
{
m_start = std::move( start ) ;
m_cancel = std::move( cancel ) ;
m_get = std::move( get ) ;
}
void then( std::function< void( T ) > function )
{
m_function = std::move( function ) ;
m_start() ;
}
T get()
{
return m_get() ;
}
T await()
{
QEventLoop p ;
T q ;
m_function = [ & ]( T r ){ q = std::move( r ) ; p.exit() ; } ;
m_start() ;
p.exec() ;
return q ;
}
void start()
{
m_start() ;
}
void cancel()
{
m_cancel() ;
}
void run( T r )
{
m_function( std::move( r ) ) ;
}
private:
std::function< void( T ) > m_function ;
std::function< void( void ) > m_start ;
std::function< void( void ) > m_cancel ;
std::function< T ( void ) > m_get ;
};
template< typename T >
class ThreadHelper : public Thread
{
public:
ThreadHelper( std::function< T ( void ) >&& function ) : m_function( std::move( function ) )
{
}
future<T>& Future( void )
{
m_future.setActions( [ this ](){ this->start() ; },
[ this ](){ this->deleteLater() ; },
[ this ](){ T r = m_function() ; this->deleteLater() ; return r ; } ) ;
return m_future ;
}
private:
~ThreadHelper()
{
m_future.run( std::move( m_cargo ) ) ;
}
void run( void )
{
m_cargo = m_function() ;
}
std::function< T ( void ) > m_function ;
future<T> m_future ;
T m_cargo ;
};
class future_1
{
public:
future_1() : m_function( [](){} )
{
}
void setActions( std::function< void( void ) > start,
std::function< void( void ) > cancel,
std::function< void( void ) > get )
{
m_start = std::move( start ) ;
m_cancel = std::move( cancel ) ;
m_get = std::move( get ) ;
}
void then( std::function< void( void ) > function )
{
m_function = std::move( function ) ;
m_start() ;
}
void get()
{
m_get() ;
}
void await()
{
QEventLoop p ;
m_function = [ & ](){ p.exit() ; } ;
m_start() ;
p.exec() ;
}
void start()
{
m_start() ;
}
void run()
{
m_function() ;
}
void cancel()
{
m_cancel() ;
}
private:
std::function< void( void ) > m_function ;
std::function< void( void ) > m_start ;
std::function< void( void ) > m_cancel ;
std::function< void( void ) > m_get ;
};
class ThreadHelper_1 : public Thread
{
public:
ThreadHelper_1( std::function< void ( void ) >&& function ) : m_function( std::move( function ) )
{
}
future_1& Future( void )
{
m_future.setActions( [ this ](){ this->start() ; },
[ this ](){ this->deleteLater() ; },
[ this ](){ m_function() ; this->deleteLater() ; } ) ;
return m_future ;
}
private:
~ThreadHelper_1()
{
m_future.run() ;
}
void run( void )
{
m_function() ;
}
std::function< void ( void ) > m_function ;
future_1 m_future ;
};
/*
* Below APIs runs two tasks,the first one will run in a different thread and
* the second one will be run on the original thread after the completion of the
* first one.
*/
template< typename T >
future<T>& run( std::function< T ( void ) > function )
{
auto t = new ThreadHelper<T>( std::move( function ) ) ;
return t->Future() ;
}
static inline future_1& run( std::function< void( void ) > function )
{
auto t = new ThreadHelper_1( std::move( function ) ) ;
return t->Future() ;
}
static inline void exec( std::function< void( void ) > function )
{
Task::run( std::move( function ) ).start() ;
}
/*
* Below APIs implements resumable functions where a function will be "blocked"
* waiting for the function to return without "hanging" the current thread.
*
* recommending reading up on C#'s await keyword to get a sense of what is being
* discussed below.
*/
static inline void await( Task::future_1& e )
{
e.await() ;
}
static inline void await( std::function< void( void ) > function )
{
Task::run( std::move( function ) ).await() ;
}
template< typename T >
T await( std::function< T ( void ) > function )
{
return Task::run<T>( std::move( function ) ).await() ;
}
template< typename T >
T await( Task::future<T>& e )
{
return e.await() ;
}
template< typename T >
T await( std::future<T>&& t )
{
return Task::await<T>( [ & ](){ return t.get() ; } ) ;
}
}
#if 0
/*
* Examples on how to use the library
*/
/*
* templated version that passes a return value of one function to another function
*/
auto _a = [](){
/*
* task _a does what task _a does here.
*
* This function body will run on a different thread
*/
return 0 ;
}
auto _b = []( int r ){
/*
*
* task _b does what task _b does here.
*
* r is a const reference to a value returned by _a
*
* This function body will run on the original thread
*/
}
Task::run<int>( _a ).then( _b ) ;
alternatively,
Task::future<int>& e = Task::run( _a ) ;
e.then( _b ) ;
/*
* Non templated version that does not pass around return value
*/
auto _c = [](){
/*
* task _a does what task _a does here.
*
* This function body will run on a different thread
*/
}
auto _d = [](){
/*
* task _b does what task _b does here.
*
* r is a const reference to a value returned by _a
*
* This function body will run on the original thread
*/
}
Task::run( _c ).then( _d ) ;
/*
* if no continuation
*/
Task::exec( _c ) ;
/*
* Task::await() is used to "block" without "hanging" the calling thread until the function returns.
*
* Its use case is to do sync programming without hanging the calling thread.
*
* example use case for it is to "block" on function in a GUI thread withough blocking the GUI thread
* hanging the application.
*/
/*
* await example when the called function return no result
*/
Task::await( _c ) ;
/*
* await example when the called function return a result
*/
int r = Task::await<int>( _a ) ;
alternatively,
Task::future<int>& e = Task::run<int>( _a ) ;
int r = e.await() ;
alternatively,
int r = Task::run<int>( _a ).await() ;
#endif
#endif //__TASK_H_INCLUDED__

View File

@ -1,44 +0,0 @@
/***************************************************************************
* 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 "taskadds.h"
TaskResult runTask(const QString cmd, const bool useSuid)
{
return Task::await<TaskResult>( [ & ]() {
TaskResult r;
if (useSuid) {
RootProcess command;
command.start(cmd);
command.waitForFinished(-1);
r.exitCode = command.exitCode();
r.output = command.readAllStandardOutput();
r.error = command.readAllStandardError();
} else {
QProcess command;
command.start(cmd);
command.waitForFinished(-1);
r.exitCode = command.exitCode();
r.output = command.readAllStandardOutput();
r.error = command.readAllStandardError();
}
return r;
});
}

View File

@ -1,47 +0,0 @@
/***************************************************************************
* 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 TASKADDS_H
#define TASKADDS_H
#include <QProcess>
#include <unistd.h>
#include "task.h"
class RootProcess : public QProcess
{
protected:
void setupChildProcess()
{
::setuid(0);
};
};
struct TaskResult
{
int exitCode;
QByteArray error;
QByteArray output;
};
TaskResult runTask(const QString cmd, const bool useSuid = true);
#endif /* TASKADDS_H */

1
sources/3rdparty/tasks vendored Submodule

Submodule sources/3rdparty/tasks added at 230bdecd2c

View File

@ -11,7 +11,7 @@ set (PROJECT_CONTACT "esalexeev@gmail.com")
set (PROJECT_LICENSE "GPLv3")
set (PROJECT_VERSION_MAJOR 1)
set (PROJECT_VERSION_MINOR 3)
set (PROJECT_VERSION_PATCH 0)
set (PROJECT_VERSION_PATCH 3)
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_YEAR "%Y")
@ -21,6 +21,7 @@ message (STATUS "Version: ${PROJECT_VERSION}")
message (STATUS "Build date: ${CURRENT_DATE}")
# install options
option (USE_CAPABILITIES "Use setcap to set capabilities for the helper" ON)
option (USE_QT5 "Use Qt5 instead of Qt4" ON)
# components
option (BUILD_GUI "Build GUI" ON)
@ -60,6 +61,7 @@ endif ()
configure_file (${CMAKE_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h)
# resources
set (PROJECT_TRDPARTY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty)
set (PROJECT_LIBRARY netctlgui)
set (PROJECT_RESOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/resources)
add_subdirectory (${PROJECT_RESOURCE_DIR})

View File

@ -7,13 +7,18 @@ 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}/../)
include_directories (${CMAKE_SOURCE_DIR}
${CMAKE_BINARY_DIR}
${KDE4_INCLUDES}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}/../
${PROJECT_TRDPARTY_DIR})
set (PLUGIN_NAME ${SUBPROJECT})
file (GLOB SUBPROJECT_DESKTOP_IN *.desktop)
file (RELATIVE_PATH SUBPROJECT_DESKTOP ${CMAKE_SOURCE_DIR} ${SUBPROJECT_DESKTOP_IN})
file (GLOB SUBPROJECT_SOURCE *.cpp)
set (TASK_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/task.h)
file (GLOB_RECURSE SUBPROJECT_SOURCE *.cpp ${PROJECT_TRDPARTY_DIR}/task/*.cpp)
set (TASK_HEADER ${PROJECT_TRDPARTY_DIR}/task/task.h)
file (GLOB SUBPROJECT_CONF *.conf)
# prepare

View File

@ -15,6 +15,8 @@
* along with netctl-gui. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#include "netctl.h"
#include <KGlobal>
#include <KStandardDirs>
#include <Plasma/DataContainer>
@ -25,9 +27,8 @@
#include <QProcessEnvironment>
#include <QTextCodec>
#include "netctl.h"
#include "pdebug.h"
#include "taskadds.h"
#include <pdebug/pdebug.h>
#include <task/taskadds.h>
Netctl::Netctl(QObject *parent, const QVariantList &args)
@ -45,6 +46,7 @@ Netctl::Netctl(QObject *parent, const QVariantList &args)
setMinimumPollingInterval(333);
readConfiguration();
initSources();
}
@ -184,6 +186,8 @@ QString Netctl::getExtIp(const QString cmd)
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Cmd" << cmd;
// test network connection
if (!isNetworkActive()) return QString("N\\A");
TaskResult process = runTask(cmd);
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
if (process.exitCode != 0)
@ -219,6 +223,7 @@ QString Netctl::getIntIp(const QAbstractSocket::NetworkLayerProtocol protocol)
QList<QHostAddress> rawList = QNetworkInterface::allAddresses();
for (int i=0; i<rawList.count(); i++) {
if(rawList[i] == QHostAddress(QHostAddress::LocalHost)) continue;
if(rawList[i] == QHostAddress(QHostAddress::LocalHostIPv6)) continue;
if (rawList[i].protocol() == protocol) {
intIp = rawList[i].toString();
break;
@ -315,6 +320,32 @@ QString Netctl::getStatus(const QString cmdNetctl, const QString cmdNetctlAuto)
}
void Netctl::initSources()
{
if (debug) qDebug() << PDEBUG;
QStringList sourcesList = sources();
for (int i=0; i<sourcesList.count(); i++)
setData(sourcesList[i], QString("value"), QString("N\\A"));
}
bool Netctl::isNetworkActive()
{
if (debug) qDebug() << PDEBUG;
QString cmd = QString("ping -c 1 google.com");
if (debug) qDebug() << PDEBUG << ":" << "Cmd" << cmd;
TaskResult process = runTask(cmd);
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
if (process.exitCode == 0)
return true;
else
return false;
}
bool Netctl::updateSourceEvent(const QString &source)
{
if (debug) qDebug() << PDEBUG;

View File

@ -37,6 +37,10 @@ public:
QStringList getProfileList(const QString cmdNetctl, const QString cmdNetctlAuto);
QStringList getProfileStringStatus(const QString cmdNetctl, const QString cmdNetctlAuto);
QString getStatus(const QString cmdNetctl, const QString cmdNetctlAuto);
bool isNetworkActive();
public slots:
void initSources();
protected:
bool sourceRequestEvent(const QString &name);

View File

@ -1 +0,0 @@
../3rdparty/pdebug/pdebug.h

View File

@ -1 +0,0 @@
../3rdparty/task/task.h

View File

@ -1 +0,0 @@
../3rdparty/task/taskadds.cpp

View File

@ -1 +0,0 @@
../3rdparty/task/taskadds.h

View File

@ -63,6 +63,7 @@ _netctl_gui_settings=(
'PREFERED_IFACE'
'PROFILE_DIR'
'RFKILL_DIR'
'SKIPCOMPONENTS'
'STARTTOTRAY'
'SUDO_PATH'
'SYSTEMCTL_PATH'

View File

@ -1,3 +1,4 @@
<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
@ -20,27 +21,27 @@ th {
th.sub {
font-style: italic;
font-weight: normal;
}
small {
font-size: 70%;
}
</style>
<h1>netctl-gui DBus API description</h1>
<h3>Project version : @PROJECT_VERSION@</h3>
<ol>
<li><a href="#api">DBus API</a></li>
<li><a href="#helper">Helper API</a></li>
<ul>
<li><a href="#ctrl">Helper ctrl API</a></li>
<li><a href="#netctl">Helper netctl API</a></li>
</ul>
<li><a href="#gui">GUI API</a></li>
<ul>
<li><a href="#netctlgui">GUI netctlgui API</a></li>
</ul>
<li><a href="#links">External links</a></li>
</ol>
</head>
<body>
<h2><a href="#api" class="anchor" name="api"></a>DBus API</h2>
<h1>netctl-gui DBus API description</h1>
<h3>Project version : @PROJECT_VERSION@</h3>
<ol>
<li><a href="#api">DBus API</a></li>
<li><a href="#helper">Helper API</a></li>
<li><a href="#ctrl">Helper ctrl API</a></li>
<li><a href="#netctl">Helper netctl API</a></li>
<li><a href="#gui">GUI API</a></li>
<li><a href="#netctlgui">GUI netctlgui API</a></li>
<li><a href="#links">External links</a></li>
</ol>
<h2><a href="#api" class="anchor" id="api"></a>DBus API</h2>
<table>
<tbody><tr>
<th>method</th>
@ -49,11 +50,11 @@ th.sub {
</tr>
<!-- helper service -->
<tr>
<th colspan="3"><a href="#helper" class="anchor" name="helper"></a><code>org.netctlgui.helper</code> service (system bus)</th>
<th colspan="3"><a href="#helper" class="anchor" id="helper"></a><code>org.netctlgui.helper</code> service (system bus)</th>
</tr>
<!-- /ctrl path -->
<tr>
<th colspan="3" class="sub"><a href="#ctrl" class="anchor" name="ctrl"></a><code>/ctrl</code> path</th>
<th colspan="3" class="sub"><a href="#ctrl" class="anchor" id="ctrl"></a><code>/ctrl</code> path</th>
</tr>
<!-- helper actions -->
<tr>
@ -112,6 +113,16 @@ th.sub {
<td>enables or disables the profile. Returns <code>true</code> if action has been performed successfully</td>
<td>yes</td>
</tr>
<tr>
<td>bool forceStart(QString profile)</td>
<td>force starts the profile. Returns <code>true</code> if action has been performed successfully</td>
<td>yes</td>
</tr>
<tr>
<td>bool forceStop(QString profile)</td>
<td>force stops the profile. Returns <code>true</code> if action has been performed successfully</td>
<td>yes</td>
</tr>
<tr>
<td>bool Reenable(QString profile)</td>
<td>reenables the profile. Returns <code>true</code> if action has been performed successfully</td>
@ -192,7 +203,7 @@ th.sub {
</tr>
<!-- /netctl path -->
<tr>
<th colspan="3" class="sub"><a href="#netctl" class="anchor" name="netctl"></a><code>/netctl</code> path</th>
<th colspan="3" class="sub"><a href="#netctl" class="anchor" id="netctl"></a><code>/netctl</code> path</th>
</tr>
<!-- general information -->
<tr>
@ -270,11 +281,11 @@ th.sub {
</tr>
<!-- gui service -->
<tr>
<th colspan="3"><a href="#gui" class="anchor" name="gui"></a><code>org.netctlgui.netctlgui</code> service (session bus)</th>
<th colspan="3"><a href="#gui" class="anchor" id="gui"></a><code>org.netctlgui.netctlgui</code> service (session bus)</th>
</tr>
<!-- /netctlgui path -->
<tr>
<th colspan="3" class="sub"><a href="#netctlgui" class="anchor" name="netctlgui"></a><code>/netctlgui</code> path</th>
<th colspan="3" class="sub"><a href="#netctlgui" class="anchor" id="netctlgui"></a><code>/netctlgui</code> path</th>
</tr>
<!-- gui actions -->
<tr>
@ -354,17 +365,17 @@ th.sub {
</tr>
</table>
<h2><a href="#links" class="anchor" name="links"></a>External links</h2>
<h2><a href="#links" class="anchor" id="links"></a>External links</h2>
<ul>
<li><a href="http://arcanis.name/projects/netctl-gui/">Homepage</a></li>
<li><a href="https://github.com/arcan1s/netctl-gui">Repository</a></li>
<li><a href="https://github.com/arcan1s/netctl-gui/issues">Bugtracker</a></li>
</ul>
<p align="center" style="font-size: 70%">
<small>
&copy; 2014-@CURRENT_YEAR@ <a href="mailto:@PROJECT_CONTACT@">@PROJECT_AUTHOR@</a><br>
This software is licensed under @PROJECT_LICENSE@
</p>
</small>
</body>
</html>

View File

@ -1,62 +1,79 @@
<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>netctl-gui secutiry notes</title>
<style type="text/css">
img {
display: block;
margin: 0 auto;
}
small {
font-size: 70%;
}
</style>
<h1>netctl-gui security notes</h1>
<h3>Project version : @PROJECT_VERSION@</h3>
<ol>
<li><a href="#description">Description</a></li>
<li><a href="#arch">Architecture</a></li>
<li><a href="#library">Library</a></li>
<li><a href="#helper">Helper</a></li>
<li><a href="#gui">Graphical interface</a></li>
<li><a href="#kde">KDE components</a></li>
<li><a href="#links">External links</a></li>
</ol>
</head>
<body>
<h2><a href="#description" class="anchor" name="description"></a>Description</h2>
<h1>netctl-gui security notes</h1>
<h3>Project version : @PROJECT_VERSION@</h3>
<ol>
<li><a href="#arch">Architecture</a></li>
<li><a href="#library">Library</a></li>
<li><a href="#helper">Helper</a></li>
<li><a href="#gui">Graphical interface</a></li>
<li><a href="#kde">KDE components</a></li>
<li><a href="#links">External links</a></li>
</ol>
<h2><a href="#description" class="anchor" id="description"></a>Description</h2>
<p></p>
<h2><a href="#arch" class="anchor" name="arch"></a>Architecture</h2>
<img src="architecture.png" alt="architecture" align="middle">
<h2><a href="#arch" class="anchor" id="arch"></a>Architecture</h2>
<img src="architecture.png" alt="architecture">
<h2><a href="#library" class="anchor" name="library"></a>Library</h2>
<p>According to <a href="#arch">the scheme<a> the library gets information from netctl and can control it. Also it provides some additional functions such as a profile creation and removal and access to wpa_supplicant functions. Some functions do not require additional permissions, but other ones do it. All dynamic arguments including profile names and paths are in double quotes to avoid white spaces problem. The functions which <b>require</b> root privileges are:</p>
<h2><a href="#library" class="anchor" id="library"></a>Library</h2>
<p>According to <a href="#arch">the scheme</a> the library gets information from netctl and can control it. Also it provides some additional functions such as a profile creation and removal and access to wpa_supplicant functions. Some functions do not require additional permissions, but other ones do it. All dynamic arguments including profile names and paths are in double quotes to avoid white spaces problem. The functions which <b>require</b> root privileges are:</p>
<ul>
<li>Netctl control module</li>
<ul>
<li><ul>
<li><code>netctl stop-all|start|stop|restart|switch-to|enable|disable|reenable &lt;profile&gt;</code>. They are commands which provide a general control to netctl.</li>
<li><code>systemctl start|restart|enable &lt;netctl-auto@service&gt;</code>. They are commands which provide ability to control netctl-auto systemd service.</li>
</ul>
</ul></li>
<li>Netctl profiles module</li>
<ul>
<li><ul>
<li>Copying of a temporary profile from home directory to netctl profiles directory. <code>cp</code> command is used for it.</li>
<li>Removal of a profile. <code>rm</code> command is used for it.</li>
</ul>
</ul></li>
<li>WiFi module</li>
<ul>
<li><ul>
<li>This module require root privileges to start <code>wpa_supplicant</code> only. For the futher interaction user must be in <code>CTRL_GROUP</code>.</li>
</ul>
</ul></li>
</ul>
<p>If library will be initialized with <code>FORCE_SUDO=true</code> than it will use <code>sudo</code> command (which can be transferred to the library by <code>SUDO_PATH</code> option). Otherwise it will try to set UID of children processes to 0. Please note that <code>sudo</code> command and UID setting will be used only for those commands which require it.</p>
<h2><a href="#helper" class="anchor" name="helper"></a>Helper</h2>
<p>Profiles reading should be described. Since profiles has shell-like syntax some variables (which provide an array) cannot be reading by usual ways. To do it library uses bash:</p>
<pre>
# define system variables
env -i bash -c "set"
# get profile and system variable list
env -i bash -c "source '&lt;profile&gt;'; set"
# get profile variables
env -i bash -c "source '&lt;profile&gt;'; for i in &#36;{!&lt;key&gt;[@]}; do echo &#36;{&lt;key&gt;[$i]}; done"
</pre>
<h2><a href="#helper" class="anchor" id="helper"></a>Helper</h2>
<p>First of all the helper <b>does not interact</b> with netctl directly, it uses the library to do it. So all library security notes are applicable here. To start the helper and to create DBus services user must be in <code>network</code> group by default (or must be root). But you may change it by editing <code>$DBUS_SYSTEMCONF_PATH/org.netctlgui.helper.conf</code> policy file (<code>/etc/dbus-1/system.d/org.netctlgui.helper.conf</code> by default). Please refer to DBus documentation to do it.</p>
<p>There are two binaries <code>netctgui-helper</code> and <code>netctlgui-helper-suid</code>. They are the same, but the second one has SUID bit, so it can be running by normal user without any password. Please note that <b>it is dangerous</b> and recommended way is to use systemd daemon. In this case you may not install <code>netctlgui-helper-suid</code> binary.</p>
<p>By default <code>netctgui-helper</code> binary has capabilities to set UID to the children processes (<code>CAP_SETUID</code>). If you do not want to get these capabilities you may use <code>-DUSE_CAPABILITIES</code> cmake flag. Please refer to <code>man 7 capabilities</code> for more details.</p>
<p>There are two configuration files <code>$HOME/.config/netctl-gui.conf</code> and <code>/etc/netctl-gui.conf</code>. The first one is a user configuration and the second one is a system-wide. Please note that by default user configuration has higher priority than system-wide, but running with <code>--system</code> flag user configuration will not be reading. The helper and GUI configurations are the same (although some keys aren't needed).</p>
<h2><a href="#gui" class="anchor" name="gui"></a>Graphical interface</h2>
<h2><a href="#gui" class="anchor" id="gui"></a>Graphical interface</h2>
<p>Graphical interface may interact with netctl over <a href="#helper">DBus (the helper)</a> and over <a href="#library">the library</a>. Please refer to their notes to any additional information. If user uses helper he should have permissions to run it.</p>
<h2><a href="#kde" class="anchor" name="kde"></a>KDE components</h2>
<h2><a href="#kde" class="anchor" id="kde"></a>KDE components</h2>
<p>There are two netctl-based commands which are run from the DataEngine</p>
<ul>
<li><code>&lt;cmd&gt; list</code></li>
@ -79,17 +96,17 @@
<p>The other way is to use DBus communication with <a href="#helper">the helper</a>. In this case user should have rights to start the helper.</p>
<h2><a href="#links" class="anchor" name="links"></a>External links</h2>
<h2><a href="#links" class="anchor" id="links"></a>External links</h2>
<ul>
<li><a href="http://arcanis.name/projects/netctl-gui/">Homepage</a></li>
<li><a href="https://github.com/arcan1s/netctl-gui">Repository</a></li>
<li><a href="https://github.com/arcan1s/netctl-gui/issues">Bugtracker</a></li>
</ul>
<p align="center" style="font-size: 70%">
<small>
&copy; 2014-@CURRENT_YEAR@ <a href="mailto:@PROJECT_CONTACT@">@PROJECT_AUTHOR@</a><br>
This software is licensed under @PROJECT_LICENSE@
</p>
</small>
</body>
</html>
</html>

View File

@ -64,7 +64,7 @@ Configuration file
.RE
.SH SEE ALSO
.BR netctlgui-helper (1)
.BR netctlgui-helper.conf (5)
.BR netctl-gui.conf (5)
.SH STANDARDS
See
.B @CMAKE_INSTALL_PREFIX@/share/doc/netctl-gui/netctl-gui-dbus-api.html

View File

@ -1,7 +1,9 @@
# set files
file (GLOB SOURCES *.cpp)
file (GLOB HEADERS *.h)
file (GLOB FORMS *.ui)
file (GLOB_RECURSE SOURCES *.cpp ${PROJECT_TRDPARTY_DIR}/task/*.cpp
${PROJECT_TRDPARTY_DIR}/language/*.cpp)
file (GLOB_RECURSE HEADERS *.h ${PROJECT_TRDPARTY_DIR}/task/*.h
${PROJECT_TRDPARTY_DIR}/language/*.h)
file (GLOB_RECURSE FORMS *.ui ${PROJECT_TRDPARTY_DIR}/about/*.ui)
file (GLOB LANGUAGES ${SUBPROJECT_TRANSLATION_DIR}/*.ts)
set (RESOURCES ${SUBPROJECT_RESOURCE_DIR}/resources.qrc)
@ -11,7 +13,8 @@ include_directories (${CMAKE_CURRENT_SOURCE_DIR}/../../${PROJECT_LIBRARY}/includ
${CMAKE_CURRENT_BINARY_DIR}/../
${CMAKE_SOURCE_DIR}
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR})
${CMAKE_CURRENT_BINARY_DIR}
${PROJECT_TRDPARTY_DIR})
link_directories (${PROJECT_LIBRARY}/src/lib)
if (USE_QT5)

View File

@ -22,7 +22,8 @@
#include <QDialogButtonBox>
#include <QPushButton>
#include "pdebug.h"
#include <pdebug/pdebug.h>
#include "version.h"

View File

@ -21,7 +21,7 @@
#include <QDBusMessage>
#include <QDebug>
#include "pdebug.h"
#include <pdebug/pdebug.h>
QList<netctlProfileInfo> parseOutputNetctl(const QList<QVariant> raw,

View File

@ -22,7 +22,7 @@
#include <QSpacerItem>
#include <QDebug>
#include "pdebug.h"
#include <pdebug/pdebug.h>
ErrorWindow::ErrorWindow(QWidget *parent, const bool debugCmd)

View File

@ -1,115 +0,0 @@
/***************************************************************************
* 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 "language.h"
#include <QFile>
#include <QLocale>
Language::Language()
{
}
QString Language::checkLanguage(const QString language, const QString defaultLanguage)
{
QStringList availableLanguages = getAvailableLanguages();
for (int i=0; i<availableLanguages.count(); i++)
if (language == availableLanguages[i])
return availableLanguages[i];
for (int i=0; i<availableLanguages.count(); i++)
if (language.contains(availableLanguages[i] + QChar('_')))
return availableLanguages[i];
return defaultLanguage;
}
QString Language::defineLanguage(const QString configPath, const QString options)
{
QMap<QString, QString> optionsDict = parseOptions(options);
if (optionsDict.contains(QString("LANGUAGE")))
if (getAvailableLanguages().contains(optionsDict[QString("LANGUAGE")]))
return optionsDict[QString("LANGUAGE")];
QString language;
language = defineLanguageFromFile(configPath);
if (language.isEmpty())
language = defineLanguageFromLocale();
language = checkLanguage(language, QString("en"));
return language;
}
QString Language::defineLanguageFromFile(const QString configPath)
{
QMap<QString, QString> settings;
if (configPath.isEmpty())
return QString("");
QFile configFile(configPath);
QString fileStr;
if (!configFile.open(QIODevice::ReadOnly))
return QString("");
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('=')))
settings[fileStr.split(QChar('='))[0]] = fileStr.split(QChar('='))[1];
if (configFile.atEnd()) break;
}
configFile.close();
if (settings.contains(QString("LANGUAGE")))
return settings[QString("LANGUAGE")];
else
return QString("");
}
QString Language::defineLanguageFromLocale()
{
return QLocale::system().name();
}
QStringList Language::getAvailableLanguages()
{
QStringList languages;
languages.append(QString("en"));
languages.append(QString("ru"));
return languages;
}
QMap<QString, QString> Language::parseOptions(const QString options)
{
QMap<QString, QString> optionsDict;
for (int i=0; i<options.split(QChar(',')).count(); i++) {
if (options.split(QChar(','))[i].split(QChar('=')).count() < 2)
continue;
optionsDict[options.split(QChar(','))[i].split(QChar('='))[0]] =
options.split(QChar(','))[i].split(QChar('='))[1];
}
return optionsDict;
}

View File

@ -1,43 +0,0 @@
/***************************************************************************
* 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 LANGUAGE_H
#define LANGUAGE_H
#include <QStringList>
class Language : public QObject
{
Q_OBJECT
public:
explicit Language();
static QString checkLanguage(const QString language,
const QString defaultLanguage = QString("en"));
static QString defineLanguage(const QString configPath,
const QString options = QString("OPTIONS"));
static QString defineLanguageFromFile(const QString configPath);
static QString defineLanguageFromLocale();
static QStringList getAvailableLanguages();
private:
static QMap<QString, QString> parseOptions(const QString options);
};
#endif /* LANGUAGE_H */

View File

@ -25,7 +25,8 @@
#include <iostream>
#include <unistd.h>
#include "language.h"
#include <language/language.h>
#include "mainwindow.h"
#include "messages.h"
#include "version.h"
@ -42,7 +43,7 @@ bool existingSessionOperation(const QString operation)
QDBusMessage response = bus.call(request);
QList<QVariant> arguments = response.arguments();
return !arguments.isEmpty();
return (!arguments.isEmpty() && bool(arguments[0].toInt()));
}

View File

@ -22,8 +22,11 @@
#include <QDesktopServices>
#include <QFileDialog>
#include <QFileInfo>
#include <QMenu>
#include <QUrl>
#include <pdebug/pdebug.h>
#include "bridgewidget.h"
#include "dbusoperation.h"
#include "errorwindow.h"
@ -33,7 +36,6 @@
#include "macvlanwidget.h"
#include "mobilewidget.h"
#include "passwdwidget.h"
#include "pdebug.h"
#include "pppoewidget.h"
#include "tunnelwidget.h"
#include "tuntapwidget.h"
@ -60,72 +62,76 @@ void MainWindow::setMenuActionsShown(const bool state)
if (debug) qDebug() << PDEBUG << ":" << "State" << state;
// main
ui->actionMainEdit->setVisible(state);
ui->actionMainEnable->setVisible(state);
ui->actionMainRefresh->setVisible(state);
ui->actionMainRemove->setVisible(state);
ui->actionMainRestart->setVisible(state);
ui->actionMainStart->setVisible(state);
ui->actionMainStopAll->setVisible(state);
ui->actionMainSwitch->setVisible(state);
toolBarActions[QString("mainRefresh")]->setVisible(state);
toolBarActions[QString("mainStart")]->setVisible(state);
toolBarActions[QString("mainSwitch")]->setVisible(state);
toolBarActions[QString("mainRestart")]->setVisible(state);
toolBarActions[QString("mainEnable")]->setVisible(state);
toolBarActions[QString("mainStopAll")]->setVisible(state);
toolBarActions[QString("mainEdit")]->setVisible(state);
toolBarActions[QString("mainRemove")]->setVisible(state);
// profile
ui->actionProfileClear->setVisible(state);
ui->actionProfileLoad->setVisible(state);
ui->actionProfileRemove->setVisible(state);
ui->actionProfileSave->setVisible(state);
toolBarActions[QString("profileClear")]->setVisible(state);
toolBarActions[QString("profileLoad")]->setVisible(state);
toolBarActions[QString("profileSave")]->setVisible(state);
toolBarActions[QString("profileRemove")]->setVisible(state);
// wifi
ui->actionWifiRefresh->setVisible(state);
ui->actionWifiStart->setVisible(state);
toolBarActions[QString("wifiRefresh")]->setVisible(state);
toolBarActions[QString("wifiStart")]->setVisible(state);
}
void MainWindow::updateMenuMain()
{
if (debug) qDebug() << PDEBUG;
setMenuActionsShown(false);
actionMenu->setDefaultAction(toolBarActions[QString("mainStart")]);
ui->actionMainRefresh->setVisible(true);
toolBarActions[QString("mainRefresh")]->setVisible(true);
if (ui->tableWidget_main->currentItem() == 0) return;
if (!ui->tableWidget_main->item(ui->tableWidget_main->currentItem()->row(), 2)->text().isEmpty()) {
ui->actionMainRestart->setVisible(true);
ui->actionMainStart->setText(QApplication::translate("MainWindow", "Stop profile"));
ui->actionMainStart->setIcon(QIcon::fromTheme("process-stop"));
toolBarActions[QString("mainRestart")]->setVisible(true);
toolBarActions[QString("mainStart")]->setText(QApplication::translate("MainWindow", "Stop"));
toolBarActions[QString("mainStart")]->setIcon(QIcon::fromTheme("process-stop"));
} else {
ui->actionMainStart->setText(QApplication::translate("MainWindow", "Start profile"));
ui->actionMainStart->setIcon(QIcon::fromTheme("system-run"));
toolBarActions[QString("mainStart")]->setText(QApplication::translate("MainWindow", "Start"));
toolBarActions[QString("mainStart")]->setIcon(QIcon::fromTheme("system-run"));
}
if (!mainTabGetActiveProfiles().isEmpty()) {
if (!mainTabGetActiveProfiles()
.contains(ui->tableWidget_main->item(ui->tableWidget_main->currentItem()->row(), 0)->text()))
ui->actionMainSwitch->setVisible(true);
ui->actionMainStopAll->setVisible(true);
toolBarActions[QString("mainSwitch")]->setVisible(true);
toolBarActions[QString("mainStopAll")]->setVisible(true);
}
ui->actionMainStart->setVisible(true);
toolBarActions[QString("mainStart")]->setVisible(true);
if (!ui->tableWidget_main->item(ui->tableWidget_main->currentItem()->row(), 3)->text().isEmpty()) {
ui->actionMainEnable->setText(QApplication::translate("MainWindow", "Disable profile"));
ui->actionMainEnable->setIcon(QIcon::fromTheme("edit-remove"));
toolBarActions[QString("mainEnable")]->setText(QApplication::translate("MainWindow", "Disable"));
toolBarActions[QString("mainEnable")]->setIcon(QIcon::fromTheme("edit-remove"));
} else {
ui->actionMainEnable->setText(QApplication::translate("MainWindow", "Enable profile"));
ui->actionMainEnable->setIcon(QIcon::fromTheme("edit-add"));
toolBarActions[QString("mainEnable")]->setText(QApplication::translate("MainWindow", "Enable"));
toolBarActions[QString("mainEnable")]->setIcon(QIcon::fromTheme("edit-add"));
}
ui->actionMainEnable->setVisible(true);
ui->actionMainEdit->setVisible(true);
ui->actionMainRemove->setVisible(true);
toolBarActions[QString("mainEnable")]->setVisible(true);
toolBarActions[QString("mainEdit")]->setVisible(true);
toolBarActions[QString("mainRemove")]->setVisible(true);
}
void MainWindow::updateMenuProfile()
{
if (debug) qDebug() << PDEBUG;
setMenuActionsShown(false);
actionMenu->setDefaultAction(toolBarActions[QString("profileSave")]);
ui->actionProfileClear->setVisible(true);
toolBarActions[QString("profileClear")]->setVisible(true);
if (ui->comboBox_profile->currentText().isEmpty()) {
ui->actionProfileLoad->setVisible(false);
ui->actionProfileRemove->setVisible(false);
ui->actionProfileSave->setVisible(false);
toolBarActions[QString("profileLoad")]->setVisible(false);
toolBarActions[QString("profileRemove")]->setVisible(false);
toolBarActions[QString("profileSave")]->setVisible(false);
} else {
ui->actionProfileLoad->setVisible(true);
ui->actionProfileRemove->setVisible(true);
ui->actionProfileSave->setVisible(true);
toolBarActions[QString("profileLoad")]->setVisible(true);
toolBarActions[QString("profileRemove")]->setVisible(true);
toolBarActions[QString("profileSave")]->setVisible(true);
}
}
@ -133,22 +139,46 @@ void MainWindow::updateMenuProfile()
void MainWindow::updateMenuWifi()
{
if (debug) qDebug() << PDEBUG;
setMenuActionsShown(false);
actionMenu->setDefaultAction(toolBarActions[QString("wifiStart")]);
ui->actionWifiRefresh->setVisible(true);
toolBarActions[QString("wifiRefresh")]->setVisible(true);
if (ui->tableWidget_wifi->currentItem() == 0) return;
if (!ui->tableWidget_wifi->item(ui->tableWidget_wifi->currentItem()->row(), 4)->text().isEmpty()) {
if (!ui->tableWidget_wifi->item(ui->tableWidget_wifi->currentItem()->row(), 3)->text().isEmpty()) {
ui->actionWifiStart->setText(QApplication::translate("MainWindow", "Stop WiFi"));
ui->actionWifiStart->setIcon(QIcon::fromTheme("process-stop"));
toolBarActions[QString("wifiStart")]->setText(QApplication::translate("MainWindow", "Stop"));
toolBarActions[QString("wifiStart")]->setIcon(QIcon::fromTheme("process-stop"));
} else {
ui->actionWifiStart->setText(QApplication::translate("MainWindow", "Start WiFi"));
ui->actionWifiStart->setIcon(QIcon::fromTheme("system-run"));
toolBarActions[QString("wifiStart")]->setText(QApplication::translate("MainWindow", "Start"));
toolBarActions[QString("wifiStart")]->setIcon(QIcon::fromTheme("system-run"));
}
} else {
ui->actionWifiStart->setText(QApplication::translate("MainWindow", "Start WiFi"));
ui->actionWifiStart->setIcon(QIcon::fromTheme("system-run"));
toolBarActions[QString("wifiStart")]->setText(QApplication::translate("MainWindow", "Start"));
toolBarActions[QString("wifiStart")]->setIcon(QIcon::fromTheme("system-run"));
}
toolBarActions[QString("wifiStart")]->setVisible(true);
}
void MainWindow::updateToolBars()
{
if (debug) qDebug() << PDEBUG;
if (sender() == ui->pushButton_menu) {
mainToolBar->setHidden(false);
actionToolBar->setHidden(true);
helpToolBar->setHidden(true);
} else if (sender() == ui->pushButton_action) {
mainToolBar->setHidden(true);
actionToolBar->setHidden(false);
helpToolBar->setHidden(true);
updateMenu();
} else if (sender() == ui->pushButton_help) {
mainToolBar->setHidden(true);
actionToolBar->setHidden(true);
helpToolBar->setHidden(false);
}
ui->actionWifiStart->setVisible(true);
}
@ -542,32 +572,6 @@ void MainWindow::mainTabSwitchToProfile()
}
void MainWindow::mainTabRefreshButtons(QTableWidgetItem *current, QTableWidgetItem *previous)
{
Q_UNUSED(previous);
if (debug) qDebug() << PDEBUG;
if (!checkExternalApps(QString("netctl")))
return errorWin->showWindow(1, QString(PDEBUG));
if (current == 0) {
ui->pushButton_mainRestart->setDisabled(true);
ui->pushButton_mainStart->setDisabled(true);
return;
}
ui->pushButton_mainStart->setEnabled(true);
if (!ui->tableWidget_main->item(current->row(), 2)->text().isEmpty()) {
ui->pushButton_mainRestart->setEnabled(true);
ui->pushButton_mainStart->setText(QApplication::translate("MainWindow", "Stop"));
ui->pushButton_mainStart->setIcon(QIcon::fromTheme("process-stop"));
} else {
ui->pushButton_mainRestart->setDisabled(true);
ui->pushButton_mainStart->setText(QApplication::translate("MainWindow", "Start"));
ui->pushButton_mainStart->setIcon(QIcon::fromTheme("system-run"));
}
}
// profile tab slots
void MainWindow::profileTabChangeState(const QString current)
{
@ -1041,12 +1045,9 @@ void MainWindow::wifiTabSetEnabled(const bool state)
if (state) {
ui->tableWidget_wifi->show();
ui->pushButton_wifiRefresh->setEnabled(true);
ui->label_wifi->hide();
} else {
ui->tableWidget_wifi->hide();
ui->pushButton_wifiRefresh->setDisabled(true);
ui->pushButton_wifiStart->setDisabled(true);
ui->label_wifi->show();
}
}
@ -1124,34 +1125,3 @@ void MainWindow::wifiTabStart()
updateWifiTab();
}
void MainWindow::wifiTabRefreshButtons(QTableWidgetItem *current, QTableWidgetItem *previous)
{
Q_UNUSED(previous);
if (debug) qDebug() << PDEBUG;
if (!checkExternalApps(QString("wpasup")))
return errorWin->showWindow(1, QString(PDEBUG));
if (current == 0) {
ui->pushButton_wifiStart->setDisabled(true);
return;
}
if (ui->tableWidget_wifi->item(current->row(), 0)->text() == QString("<hidden>")) {
ui->pushButton_wifiStart->setDisabled(true);
return;
}
ui->pushButton_wifiStart->setEnabled(true);
if (!ui->tableWidget_wifi->item(current->row(), 4)->text().isEmpty()) {
if (!ui->tableWidget_wifi->item(current->row(), 3)->text().isEmpty()) {
ui->pushButton_wifiStart->setText(QApplication::translate("MainWindow", "Stop"));
ui->pushButton_wifiStart->setIcon(QIcon::fromTheme("process-stop"));
} else {
ui->pushButton_wifiStart->setText(QApplication::translate("MainWindow", "Start"));
ui->pushButton_wifiStart->setIcon(QIcon::fromTheme("system-run"));
}
} else {
ui->pushButton_wifiStart->setText(QApplication::translate("MainWindow", "Start"));
ui->pushButton_wifiStart->setIcon(QIcon::fromTheme("system-run"));
}
}

View File

@ -24,15 +24,16 @@
#include <QTranslator>
#include <QUrl>
#include <language/language.h>
#include <pdebug/pdebug.h>
#include <task/taskadds.h>
#include "aboutwindow.h"
#include "dbusoperation.h"
#include "errorwindow.h"
#include "language.h"
#include "netctlautowindow.h"
#include "passwdwidget.h"
#include "pdebug.h"
#include "settingswindow.h"
#include "taskadds.h"
#include "trayicon.h"
#include "version.h"
@ -360,6 +361,7 @@ void MainWindow::updateConfiguration(const QMap<QString, QVariant> args)
createObjects();
createActions();
createToolBars();
// tray
if ((QSystemTrayIcon::isSystemTrayAvailable()) &&

View File

@ -21,6 +21,10 @@
#include <QDBusConnection>
#include <QDBusMessage>
#include <QDebug>
#include <QMenu>
#include <pdebug/pdebug.h>
#include <task/taskadds.h>
#include "aboutwindow.h"
#include "bridgewidget.h"
@ -34,10 +38,8 @@
#include "netctlautowindow.h"
#include "netctlguiadaptor.h"
#include "passwdwidget.h"
#include "pdebug.h"
#include "pppoewidget.h"
#include "settingswindow.h"
#include "taskadds.h"
#include "trayicon.h"
#include "tunnelwidget.h"
#include "tuntapwidget.h"
@ -233,7 +235,7 @@ bool MainWindow::isHelperActive()
DBUS_HELPER_INTERFACE, QString("Active"),
QList<QVariant>(), true, debug);
return (!responce.isEmpty());
return (!responce.isEmpty() && bool(responce[0].toInt()));
}
@ -273,6 +275,7 @@ bool MainWindow::checkExternalApps(const QString apps = QString("all"))
{
if (debug) qDebug() << PDEBUG;
if (configuration[QString("SKIPCOMPONENTS")] == QString("true")) return true;
QStringList cmd;
cmd.append("which");
cmd.append(configuration[QString("SUDO_PATH")]);
@ -343,52 +346,26 @@ void MainWindow::createActions()
if (debug) qDebug() << PDEBUG;
connect(ui->tabWidget, SIGNAL(currentChanged(int)), this, SLOT(updateTabs(int)));
connect(ui->actionAbout, SIGNAL(triggered(bool)), this, SLOT(showAboutWindow()));
connect(ui->actionApi, SIGNAL(triggered(bool)), this, SLOT(showApi()));
connect(ui->actionLibrary, SIGNAL(triggered(bool)), this, SLOT(showLibrary()));
connect(ui->actionNetctlAuto, SIGNAL(triggered(bool)), this, SLOT(showNetctlAutoWindow()));
connect(ui->actionReport, SIGNAL(triggered(bool)), this, SLOT(reportABug()));
connect(ui->actionSecurity, SIGNAL(triggered(bool)), this, SLOT(showSecurityNotes()));
connect(ui->actionSettings, SIGNAL(triggered(bool)), this, SLOT(showSettingsWindow()));
connect(ui->actionQuit, SIGNAL(triggered(bool)), this, SLOT(closeMainWindow()));
// actions menu
connect(ui->menuActions, SIGNAL(aboutToShow()), this, SLOT(updateMenu()));
connect(ui->actionMainEdit, SIGNAL(triggered(bool)), this, SLOT(mainTabEditProfile()));
connect(ui->actionMainEnable, SIGNAL(triggered(bool)), this, SLOT(mainTabEnableProfile()));
connect(ui->actionMainRefresh, SIGNAL(triggered(bool)), this, SLOT(updateMainTab()));
connect(ui->actionMainRemove, SIGNAL(triggered(bool)), this, SLOT(mainTabRemoveProfile()));
connect(ui->actionMainRestart, SIGNAL(triggered(bool)), this, SLOT(mainTabRestartProfile()));
connect(ui->actionMainStart, SIGNAL(triggered(bool)), this, SLOT(mainTabStartProfile()));
connect(ui->actionMainStopAll, SIGNAL(triggered(bool)), this, SLOT(mainTabStopAllProfiles()));
connect(ui->actionMainSwitch, SIGNAL(triggered(bool)), this, SLOT(mainTabSwitchToProfile()));
connect(ui->actionProfileClear, SIGNAL(triggered(bool)), this, SLOT(profileTabClear()));
connect(ui->actionProfileLoad, SIGNAL(triggered(bool)), this, SLOT(profileTabLoadProfile()));
connect(ui->actionProfileRemove, SIGNAL(triggered(bool)), this, SLOT(profileTabRemoveProfile()));
connect(ui->actionProfileSave, SIGNAL(triggered(bool)), this, SLOT(profileTabCreateProfile()));
connect(ui->actionWifiRefresh, SIGNAL(triggered(bool)), this, SLOT(updateWifiTab()));
connect(ui->actionWifiStart, SIGNAL(triggered(bool)), this, SLOT(wifiTabStart()));
connect(ui->pushButton_menu, SIGNAL(clicked(bool)), this, SLOT(updateToolBars()));
connect(ui->pushButton_action, SIGNAL(clicked(bool)), this, SLOT(updateToolBars()));
connect(ui->pushButton_help, SIGNAL(clicked(bool)), this, SLOT(updateToolBars()));
// main tab events
connect(ui->pushButton_mainRefresh, SIGNAL(clicked(bool)), this, SLOT(updateMainTab()));
connect(ui->pushButton_mainRestart, SIGNAL(clicked(bool)), this, SLOT(mainTabRestartProfile()));
connect(ui->pushButton_mainStart, SIGNAL(clicked(bool)), this, SLOT(mainTabStartProfile()));
connect(ui->pushButton_netctlAuto, SIGNAL(clicked(bool)), this, SLOT(showNetctlAutoWindow()));
connect(ui->tableWidget_main, SIGNAL(itemActivated(QTableWidgetItem *)), this, SLOT(mainTabStartProfile()));
connect(ui->tableWidget_main, SIGNAL(currentItemChanged(QTableWidgetItem *, QTableWidgetItem *)), this, SLOT(mainTabRefreshButtons(QTableWidgetItem *, QTableWidgetItem *)));
connect(ui->tableWidget_main, SIGNAL(currentItemChanged(QTableWidgetItem *, QTableWidgetItem *)),
this, SLOT(updateMenuMain()));
connect(ui->tableWidget_main, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(mainTabContextualMenu(QPoint)));
// profile tab events
connect(ui->comboBox_profile, SIGNAL(currentIndexChanged(QString)), this, SLOT(profileTabLoadProfile()));
connect(ui->pushButton_profileClear, SIGNAL(clicked(bool)), this, SLOT(profileTabClear()));
connect(ui->pushButton_profileSave, SIGNAL(clicked(bool)), this, SLOT(profileTabCreateProfile()));
connect(ui->comboBox_profile, SIGNAL(editTextChanged(QString)), this, SLOT(updateMenuProfile()));
connect(generalWid->connectionType, SIGNAL(currentIndexChanged(QString)), this, SLOT(profileTabChangeState(QString)));
// wifi tab events
connect(ui->pushButton_wifiRefresh, SIGNAL(clicked(bool)), this, SLOT(updateWifiTab()));
connect(ui->pushButton_wifiStart, SIGNAL(clicked(bool)), this, SLOT(wifiTabStart()));
connect(ui->tableWidget_wifi, SIGNAL(itemActivated(QTableWidgetItem *)), this, SLOT(wifiTabStart()));
connect(ui->tableWidget_wifi, SIGNAL(currentItemChanged(QTableWidgetItem *, QTableWidgetItem *)), this, SLOT(wifiTabRefreshButtons(QTableWidgetItem *, QTableWidgetItem *)));
connect(ui->tableWidget_wifi, SIGNAL(currentItemChanged(QTableWidgetItem *, QTableWidgetItem *)),
this, SLOT(updateMenuWifi()));
connect(ui->tableWidget_wifi, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(wifiTabContextualMenu(QPoint)));
}
@ -467,6 +444,105 @@ void MainWindow::createObjects()
}
void MainWindow::createToolBars()
{
if (debug) qDebug() << PDEBUG;
mainToolBar = new QToolBar(this);
mainToolBar->setToolButtonStyle(Qt::ToolButtonFollowStyle);
toolBarActions[QString("netctlAuto")] = mainToolBar->addAction(QApplication::translate("MainWindow", "netctl-auto"),
this, SLOT(showNetctlAutoWindow()));
toolBarActions[QString("settings")] = mainToolBar->addAction(QIcon::fromTheme(QString("configure")),
QApplication::translate("MainWindow", "Settings"),
this, SLOT(showSettingsWindow()));
appShortcuts[QString("settingsShortcut")] = new QShortcut(QKeySequence(QApplication::translate("MainWindow", "Ctrl+S")),
this, SLOT(showSettingsWindow()));
toolBarActions[QString("quit")] = mainToolBar->addAction(QIcon::fromTheme(QString("exit")),
QApplication::translate("MainWindow", "Quit"),
this, SLOT(closeMainWindow()));
appShortcuts[QString("quitShortcut")] = new QShortcut(QKeySequence(QApplication::translate("MainWindow", "Ctrl+Q")),
this, SLOT(closeMainWindow()));
ui->centralLayout->insertWidget(1, mainToolBar);
mainToolBar->setHidden(true);
actionToolBar = new QToolBar(this);
actionToolBar->setToolButtonStyle(Qt::ToolButtonFollowStyle);
toolBarActions[QString("mainRefresh")] = actionToolBar->addAction(QIcon::fromTheme(QString("stock-refresh")),
QApplication::translate("MainWindow", "Refresh"),
this, SLOT(updateMainTab()));
toolBarActions[QString("profileClear")] = actionToolBar->addAction(QIcon::fromTheme(QString("edit-clear")),
QApplication::translate("MainWindow", "Clear"),
this, SLOT(profileTabClear()));
toolBarActions[QString("wifiRefresh")] = actionToolBar->addAction(QIcon::fromTheme(QString("stock-refresh")),
QApplication::translate("MainWindow", "Refresh"),
this, SLOT(updateWifiTab()));
actionMenu = new QToolButton(this);
actionMenu->setPopupMode(QToolButton::DelayedPopup);
actionMenu->setToolButtonStyle(Qt::ToolButtonFollowStyle);
QMenu *menu = new QMenu(actionMenu);
toolBarActions[QString("mainStart")] = menu->addAction(QIcon::fromTheme(QString("system-run")),
QApplication::translate("MainWindow", "Start"),
this, SLOT(mainTabStartProfile()));
toolBarActions[QString("mainSwitch")] = menu->addAction(QIcon::fromTheme(QString("system-run")),
QApplication::translate("MainWindow", "Switch"),
this, SLOT(mainTabSwitchToProfile()));
toolBarActions[QString("mainRestart")] = menu->addAction(QIcon::fromTheme(QString("stock-refresh")),
QApplication::translate("MainWindow", "Restart"),
this, SLOT(mainTabRestartProfile()));
toolBarActions[QString("mainEnable")] = menu->addAction(QIcon::fromTheme(QString("edit-add")),
QApplication::translate("MainWindow", "Enable"),
this, SLOT(mainTabEnableProfile()));
toolBarActions[QString("mainStopAll")] = menu->addAction(QIcon::fromTheme(QString("process-stop")),
QApplication::translate("MainWindow", "Stop all"),
this, SLOT(mainTabStopAllProfiles()));
toolBarActions[QString("profileLoad")] = menu->addAction(QIcon::fromTheme(QString("document-open")),
QApplication::translate("MainWindow", "Load"),
this, SLOT(profileTabLoadProfile()));
toolBarActions[QString("profileSave")] = menu->addAction(QIcon::fromTheme(QString("document-save")),
QApplication::translate("MainWindow", "Save"),
this, SLOT(profileTabCreateProfile()));
toolBarActions[QString("wifiStart")] = menu->addAction(QIcon::fromTheme(QString("system-run")),
QApplication::translate("MainWindow", "Start"),
this, SLOT(wifiTabStart()));
actionMenu->setMenu(menu);
actionToolBar->addWidget(actionMenu);
toolBarActions[QString("mainEdit")] = actionToolBar->addAction(QIcon::fromTheme(QString("edit")),
QApplication::translate("MainWindow", "Edit"),
this, SLOT(mainTabEditProfile()));
toolBarActions[QString("mainRemove")] = actionToolBar->addAction(QIcon::fromTheme(QString("edit-delete")),
QApplication::translate("MainWindow", "Remove"),
this, SLOT(mainTabRemoveProfile()));
toolBarActions[QString("profileRemove")] = actionToolBar->addAction(QIcon::fromTheme(QString("edit-delete")),
QApplication::translate("MainWindow", "Remove"),
this, SLOT(profileTabRemoveProfile()));
ui->centralLayout->insertWidget(1, actionToolBar);
actionToolBar->setHidden(true);
helpToolBar = new QToolBar(this);
helpToolBar->setToolButtonStyle(Qt::ToolButtonFollowStyle);
toolBarActions[QString("security")] = helpToolBar->addAction(QIcon::fromTheme(QString("security-medium")),
QApplication::translate("MainWindow", "Security"),
this, SLOT(showSecurityNotes()));
toolBarActions[QString("api")] = helpToolBar->addAction(QApplication::translate("MainWindow", "DBus API"),
this, SLOT(showApi()));
toolBarActions[QString("library")] = helpToolBar->addAction(QApplication::translate("MainWindow", "Library"),
this, SLOT(showLibrary()));
helpToolBar->addSeparator();
toolBarActions[QString("report")] = helpToolBar->addAction(QIcon::fromTheme(QString("tools-report-bug")),
QApplication::translate("MainWindow", "Report a bug"),
this, SLOT(reportABug()));
toolBarActions[QString("about")] = helpToolBar->addAction(QIcon::fromTheme(QString("help-about")),
QApplication::translate("MainWindow", "About"),
this, SLOT(showAboutWindow()));
ui->centralLayout->insertWidget(1, helpToolBar);
helpToolBar->setHidden(true);
ui->pushButton_menu->click();
}
void MainWindow::deleteObjects()
{
if (debug) qDebug() << PDEBUG;
@ -493,6 +569,24 @@ void MainWindow::deleteObjects()
if (errorWin != nullptr) delete errorWin;
if (netctlAutoWin != nullptr) delete netctlAutoWin;
if (settingsWin != nullptr) delete settingsWin;
if (actionMenu != nullptr) {
actionMenu->menu()->clear();
delete actionMenu;
}
if (actionToolBar != nullptr) {
actionToolBar->clear();
delete actionToolBar;
}
if (helpToolBar != nullptr) {
helpToolBar->clear();
delete helpToolBar;
}
if (mainToolBar != nullptr) {
mainToolBar->clear();
delete mainToolBar;
delete appShortcuts[QString("settingsShortcut")];
delete appShortcuts[QString("quitShortcut")];
}
if (trayIcon != nullptr) delete trayIcon;
if (ui != nullptr) delete ui;
}

View File

@ -20,7 +20,10 @@
#include <QApplication>
#include <QMainWindow>
#include <QShortcut>
#include <QTableWidgetItem>
#include <QToolBar>
#include <QToolButton>
#include <netctlgui/netctlgui.h>
@ -103,6 +106,7 @@ private slots:
void updateMenuMain();
void updateMenuProfile();
void updateMenuWifi();
void updateToolBars();
// tab update slots
void updateMainTab();
void updateProfileTab();
@ -117,7 +121,6 @@ private slots:
void mainTabStartProfile();
void mainTabStopAllProfiles();
void mainTabSwitchToProfile();
void mainTabRefreshButtons(QTableWidgetItem *current, QTableWidgetItem *previous);
// profile tab slots
void profileTabChangeState(const QString current);
void profileTabClear();
@ -128,11 +131,16 @@ private slots:
void wifiTabContextualMenu(const QPoint &pos);
void wifiTabSetEnabled(const bool state);
void wifiTabStart();
void wifiTabRefreshButtons(QTableWidgetItem *current, QTableWidgetItem *previous);
private:
// ui
TrayIcon *trayIcon = nullptr;
QMap<QString, QShortcut *> appShortcuts;
QMap<QString, QAction *> toolBarActions;
QToolButton *actionMenu = nullptr;
QToolBar *actionToolBar = nullptr;
QToolBar *helpToolBar = nullptr;
QToolBar *mainToolBar = nullptr;
Ui::MainWindow *ui = nullptr;
AboutWindow *aboutWin = nullptr;
ErrorWindow *errorWin = nullptr;
@ -160,6 +168,7 @@ private:
void createActions();
void createDBusSession();
void createObjects();
void createToolBars();
void deleteObjects();
void keyPressEvent(QKeyEvent *pressedKey);
QString configPath;

View File

@ -14,7 +14,41 @@
<string>Netctl GUI</string>
</property>
<widget class="QWidget" name="centralWidget">
<layout class="QVBoxLayout" name="verticalLayout_4">
<layout class="QVBoxLayout" name="centralLayout">
<item>
<layout class="QHBoxLayout" name="layout_menus">
<item>
<widget class="QPushButton" name="pushButton_menu">
<property name="styleSheet">
<string notr="true">border: none;</string>
</property>
<property name="text">
<string>Menu</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_action">
<property name="styleSheet">
<string notr="true">border: none;</string>
</property>
<property name="text">
<string>Actions</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_help">
<property name="styleSheet">
<string notr="true">border: none;</string>
</property>
<property name="text">
<string>Help</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
@ -101,77 +135,6 @@
<column/>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="layout_mainButtons">
<item>
<widget class="QPushButton" name="pushButton_mainRefresh">
<property name="text">
<string>Refresh</string>
</property>
<property name="icon">
<iconset theme="stock-refresh">
<normaloff/>
</iconset>
</property>
<property name="shortcut">
<string>Ctrl+R</string>
</property>
<property name="autoDefault">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="spacer_mainButtons">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton_mainRestart">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Restart</string>
</property>
<property name="icon">
<iconset theme="stock-refresh">
<normaloff/>
</iconset>
</property>
<property name="autoDefault">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_mainStart">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Start</string>
</property>
<property name="icon">
<iconset theme="system-run">
<normaloff/>
</iconset>
</property>
<property name="autoDefault">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_new">
@ -228,7 +191,7 @@
<x>0</x>
<y>0</y>
<width>437</width>
<height>338</height>
<height>368</height>
</rect>
</property>
<property name="sizePolicy">
@ -241,47 +204,6 @@
</widget>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="layout_newProfileButtons">
<item>
<widget class="QPushButton" name="pushButton_profileClear">
<property name="text">
<string>Clear</string>
</property>
<property name="icon">
<iconset theme="edit-clear">
<normaloff/>
</iconset>
</property>
</widget>
</item>
<item>
<spacer name="spacer_newProfileButtons">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton_profileSave">
<property name="text">
<string>Save</string>
</property>
<property name="icon">
<iconset theme="document-save">
<normaloff/>
</iconset>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_wifi">
@ -290,7 +212,7 @@
<normaloff>:/wifi.png</normaloff>:/wifi.png</iconset>
</attribute>
<attribute name="title">
<string>Connect to Wi-Fi</string>
<string>WiFi menu</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
@ -357,339 +279,19 @@
<column/>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="layout_wifiButtons">
<item>
<widget class="QPushButton" name="pushButton_wifiRefresh">
<property name="text">
<string>Refresh</string>
</property>
<property name="icon">
<iconset theme="stock-refresh">
<normaloff/>
</iconset>
</property>
<property name="shortcut">
<string>Ctrl+R</string>
</property>
<property name="autoDefault">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="spacer_wifiButtons">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton_wifiStart">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Start</string>
</property>
<property name="icon">
<iconset theme="system-run">
<normaloff/>
</iconset>
</property>
<property name="autoDefault">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<widget class="QMenuBar" name="menuBar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>469</width>
<height>22</height>
</rect>
</property>
<widget class="QMenu" name="menuMenu">
<property name="title">
<string>Menu</string>
</property>
<addaction name="actionNetctlAuto"/>
<addaction name="actionSettings"/>
<addaction name="actionQuit"/>
</widget>
<widget class="QMenu" name="menuActions">
<property name="title">
<string>Actions</string>
</property>
<addaction name="actionMainRefresh"/>
<addaction name="actionWifiRefresh"/>
<addaction name="actionProfileClear"/>
<addaction name="separator"/>
<addaction name="actionMainStart"/>
<addaction name="actionMainSwitch"/>
<addaction name="actionMainRestart"/>
<addaction name="actionMainEnable"/>
<addaction name="actionMainStopAll"/>
<addaction name="actionProfileLoad"/>
<addaction name="actionProfileSave"/>
<addaction name="actionWifiStart"/>
<addaction name="separator"/>
<addaction name="actionMainEdit"/>
<addaction name="actionMainRemove"/>
<addaction name="actionProfileRemove"/>
</widget>
<widget class="QMenu" name="menuHelp">
<property name="title">
<string>Help</string>
</property>
<addaction name="actionSecurity"/>
<addaction name="actionApi"/>
<addaction name="actionLibrary"/>
<addaction name="separator"/>
<addaction name="actionReport"/>
<addaction name="actionAbout"/>
</widget>
<addaction name="menuMenu"/>
<addaction name="menuActions"/>
<addaction name="menuHelp"/>
</widget>
<widget class="QStatusBar" name="statusBar"/>
<action name="actionSettings">
<property name="icon">
<iconset theme="configure">
<normaloff/>
</iconset>
</property>
<property name="text">
<string>Settings</string>
</property>
<property name="shortcut">
<string>Ctrl+S</string>
</property>
</action>
<action name="actionQuit">
<property name="icon">
<iconset theme="exit">
<normaloff/>
</iconset>
</property>
<property name="text">
<string>Quit</string>
</property>
<property name="shortcut">
<string>Ctrl+Q</string>
</property>
</action>
<action name="actionMainRefresh">
<property name="icon">
<iconset theme="stock-refresh">
<normaloff/>
</iconset>
</property>
<property name="text">
<string>Refresh</string>
</property>
</action>
<action name="actionMainStart">
<property name="icon">
<iconset theme="system-run">
<normaloff/>
</iconset>
</property>
<property name="text">
<string>Start profile</string>
</property>
</action>
<action name="actionMainRestart">
<property name="icon">
<iconset theme="stock-refresh">
<normaloff/>
</iconset>
</property>
<property name="text">
<string>Restart profile</string>
</property>
</action>
<action name="actionMainEnable">
<property name="icon">
<iconset theme="edit-add">
<normaloff/>
</iconset>
</property>
<property name="text">
<string>Enable profile</string>
</property>
</action>
<action name="actionMainEdit">
<property name="icon">
<iconset theme="edit">
<normaloff/>
</iconset>
</property>
<property name="text">
<string>Edit profile</string>
</property>
</action>
<action name="actionMainRemove">
<property name="icon">
<iconset theme="edit-delete">
<normaloff/>
</iconset>
</property>
<property name="text">
<string>Remove profile</string>
</property>
</action>
<action name="actionProfileClear">
<property name="icon">
<iconset theme="edit-clear">
<normaloff/>
</iconset>
</property>
<property name="text">
<string>Clear</string>
</property>
</action>
<action name="actionWifiRefresh">
<property name="icon">
<iconset theme="stock-refresh">
<normaloff/>
</iconset>
</property>
<property name="text">
<string>Refresh</string>
</property>
</action>
<action name="actionProfileLoad">
<property name="icon">
<iconset theme="document-open">
<normaloff/>
</iconset>
</property>
<property name="text">
<string>Load profile</string>
</property>
</action>
<action name="actionProfileSave">
<property name="icon">
<iconset theme="document-save">
<normaloff/>
</iconset>
</property>
<property name="text">
<string>Save profile</string>
</property>
</action>
<action name="actionWifiStart">
<property name="icon">
<iconset theme="system-run">
<normaloff/>
</iconset>
</property>
<property name="text">
<string>Start Wi-Fi</string>
</property>
</action>
<action name="actionProfileRemove">
<property name="icon">
<iconset theme="edit-delete">
<normaloff/>
</iconset>
</property>
<property name="text">
<string>Remove profile</string>
</property>
</action>
<action name="actionNetctlAuto">
<property name="text">
<string>netctl-auto</string>
</property>
</action>
<action name="actionAbout">
<property name="icon">
<iconset theme="help-about">
<normaloff/>
</iconset>
</property>
<property name="text">
<string>About</string>
</property>
</action>
<action name="actionReport">
<property name="icon">
<iconset theme="tools-report-bug">
<normaloff/>
</iconset>
</property>
<property name="text">
<string>Report a bug</string>
</property>
</action>
<action name="actionApi">
<property name="text">
<string>DBus API reference</string>
</property>
</action>
<action name="actionSecurity">
<property name="icon">
<iconset theme="security-medium">
<normaloff/>
</iconset>
</property>
<property name="text">
<string>Security notes</string>
</property>
</action>
<action name="actionLibrary">
<property name="text">
<string>Library documentation</string>
</property>
</action>
<action name="actionMainSwitch">
<property name="icon">
<iconset theme="system-run"/>
</property>
<property name="text">
<string>Switch to profile</string>
</property>
</action>
<action name="actionMainStopAll">
<property name="icon">
<iconset theme="process-stop"/>
</property>
<property name="text">
<string>Stop all profiles</string>
</property>
</action>
</widget>
<tabstops>
<tabstop>tabWidget</tabstop>
<tabstop>tableWidget_main</tabstop>
<tabstop>pushButton_mainRefresh</tabstop>
<tabstop>pushButton_mainRestart</tabstop>
<tabstop>pushButton_mainStart</tabstop>
<tabstop>scrollArea</tabstop>
<tabstop>pushButton_profileClear</tabstop>
<tabstop>pushButton_profileSave</tabstop>
<tabstop>tableWidget_wifi</tabstop>
<tabstop>pushButton_wifiRefresh</tabstop>
<tabstop>pushButton_wifiStart</tabstop>
</tabstops>
<resources>
<include location="../../resources/resources.qrc"/>

View File

@ -117,19 +117,33 @@ QString infoMessage()
{
QString infoMessage = QString("");
// build information
infoMessage += QCoreApplication::translate("MainWindow", "Build date: %1").
infoMessage += QApplication::translate("MainWindow", "Build date: %1").
arg(QString(BUILD_DATE));
infoMessage += QString("\n%1:\n").arg(QCoreApplication::translate("MainWindow", "cmake flags"));
infoMessage += QString("\t-DCMAKE_BUILD_TYPE=%1 \\\n").arg(QString(CMAKE_BUILD_TYPE));
infoMessage += QString("\t-DCMAKE_INSTALL_PREFIX=%1 \\\n").arg(QString(CMAKE_INSTALL_PREFIX));
infoMessage += QString("\t-DBUILD_DOCS=%1 \\\n").arg(QString(PROJECT_BUILD_DOCS));
infoMessage += QString("\t-DBUILD_LIBRARY=%1 \\\n").arg(QString(PROJECT_BUILD_LIBRARY));
infoMessage += QString("\t-DBUILD_GUI=%1 \\\n").arg(QString(PROJECT_BUILD_GUI));
infoMessage += QString("\t-DUSE_QT5=%1 \\\n").arg(QString(PROJECT_USE_QT5));
infoMessage += QString("\t-DBUILD_DATAENGINE=%1 \\\n").arg(QString(PROJECT_BUILD_DATAENGINE));
// cmake
infoMessage += QString("\n%1:\n").arg(QApplication::translate("MainWindow", "cmake flags"));
// cmake properties
infoMessage += QString("%1:\n").arg(QApplication::translate("MainWindow", "cmake properties"));
infoMessage += QString("\t-DCMAKE_BUILD_TYPE=%1\n").arg(QString(CMAKE_BUILD_TYPE));
infoMessage += QString("\t-DCMAKE_INSTALL_PREFIX=%1\n").arg(QString(CMAKE_INSTALL_PREFIX));
// components
infoMessage += QString("%1:\n").arg(QApplication::translate("MainWindow", "Components"));
infoMessage += QString("\t-DBUILD_DATAENGINE=%1\n").arg(QString(PROJECT_BUILD_DATAENGINE));
infoMessage += QString("\t-DBUILD_GUI=%1\n").arg(QString(PROJECT_BUILD_GUI));
infoMessage += QString("\t-DBUILD_HELPER=%1\n").arg(QString(PROJECT_BUILD_HELPER));
infoMessage += QString("\t-DBUILD_LIBRARY=%1\n").arg(QString(PROJECT_BUILD_LIBRARY));
infoMessage += QString("\t-DBUILD_PLASMOID=%1\n").arg(QString(PROJECT_BUILD_PLASMOID));
// additional components
infoMessage += QString("%1:\n").arg(QApplication::translate("MainWindow", "Additional components"));
infoMessage += QString("\t-DBUILD_DOCS=%1\n").arg(QString(PROJECT_BUILD_DOCS));
infoMessage += QString("\t-DBUILD_TEST=%1\n").arg(QString(PROJECT_BUILD_TEST));
// project properties
infoMessage += QString("%1:\n").arg(QApplication::translate("MainWindow", "Project properties"));
infoMessage += QString("\t-DDBUS_SYSTEMCONF_PATH=%1\n").arg(QString(PROJECT_DBUS_SYSTEMCONF_PATH));
infoMessage += QString("\t-DSYSTEMD_SERVICE_PATH=%1\n").arg(QString(PROJECT_SYSTEMD_SERVICE_PATH));
infoMessage += QString("\t-DUSE_CAPABILITIES=%1\n").arg(QString(PROJECT_USE_CAPABILITIES));
infoMessage += QString("\t-DUSE_QT5=%1\n").arg(QString(PROJECT_USE_QT5));
// transport information
infoMessage += QString("%1:\n").arg(QCoreApplication::translate("MainWindow", "DBus configuration"));
infoMessage += QString("%1:\n").arg(QApplication::translate("MainWindow", "DBus configuration"));
infoMessage += QString("\tDBUS_SERVICE=%1\n").arg(QString(DBUS_SERVICE));
infoMessage += QString("\tDBUS_INTERFACE=%1\n").arg(QString(DBUS_INTERFACE));
infoMessage += QString("\tDBUS_OBJECT_PATH=%1\n").arg(QString(DBUS_OBJECT_PATH));
@ -138,11 +152,8 @@ QString infoMessage()
infoMessage += QString("\tDBUS_CTRL_PATH=%1\n").arg(QString(DBUS_CTRL_PATH));
infoMessage += QString("\tDBUS_LIB_PATH=%1\n").arg(QString(DBUS_LIB_PATH));
// docs path
infoMessage += QString("%1:\n").arg(QCoreApplication::translate("MainWindow", "Documentation"));
infoMessage += QString("%1:\n").arg(QApplication::translate("MainWindow", "Documentation"));
infoMessage += QString("\tDOCS_PATH=%1\n").arg(QString(DOCS_PATH));
QStringList docs = QDir(QString(DOCS_PATH)).entryList(QDir::NoDotAndDotDot);
for (int i=0; i<docs.count(); i++)
infoMessage += QString("\t%1\n").arg(docs[i]);
return infoMessage;
}

View File

@ -21,9 +21,9 @@
#include <QDebug>
#include <netctlgui/netctlgui.h>
#include <pdebug/pdebug.h>
#include "dbusoperation.h"
#include "pdebug.h"
#include "version.h"

View File

@ -1 +0,0 @@
../../3rdparty/pdebug/pdebug.h

View File

@ -23,9 +23,10 @@
#include <QFileDialog>
#include <QTextStream>
#include "language.h"
#include <language/language.h>
#include <pdebug/pdebug.h>
#include "mainwindow.h"
#include "pdebug.h"
SettingsWindow::SettingsWindow(QWidget *parent, const bool debugCmd, const QString configFile)
@ -262,6 +263,10 @@ QMap<QString, QString> SettingsWindow::readSettings()
settings[QString("PREFERED_IFACE")] = ui->lineEdit_interface->text();
settings[QString("PROFILE_DIR")] = ui->lineEdit_profilePath->text();
settings[QString("RFKILL_DIR")] = ui->lineEdit_rfkill->text();
if (ui->checkBox_components->checkState() == 2)
settings[QString("SKIPCOMPONENTS")] = QString("true");
else
settings[QString("SKIPCOMPONENTS")] = QString("false");
if (ui->checkBox_startToTray->checkState() == 2)
settings[QString("STARTTOTRAY")] = QString("true");
else
@ -318,6 +323,10 @@ void SettingsWindow::setSettings(const QMap<QString, QString> settings)
ui->lineEdit_interface->setText(settings[QString("PREFERED_IFACE")]);
ui->lineEdit_profilePath->setText(settings[QString("PROFILE_DIR")]);
ui->lineEdit_rfkill->setText(settings[QString("RFKILL_DIR")]);
if (settings[QString("SKIPCOMPONENTS")] == QString("true"))
ui->checkBox_components->setCheckState(Qt::Checked);
else
ui->checkBox_components->setCheckState(Qt::Unchecked);
if (settings[QString("STARTTOTRAY")] == QString("true"))
ui->checkBox_startToTray->setCheckState(Qt::Checked);
else
@ -361,6 +370,7 @@ QMap<QString, QString> SettingsWindow::getDefault()
settings[QString("PREFERED_IFACE")] = QString("");
settings[QString("PROFILE_DIR")] = QString("/etc/netctl/");
settings[QString("RFKILL_DIR")] = QString("/sys/class/rfkill/");
settings[QString("SKIPCOMPONENTS")] = QString("false");
settings[QString("STARTTOTRAY")] = QString("false");
settings[QString("SUDO_PATH")] = QString("/usr/bin/kdesu");
settings[QString("SYSTEMCTL_PATH")] = QString("/usr/bin/systemctl");

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>680</width>
<height>397</height>
<width>678</width>
<height>395</height>
</rect>
</property>
<property name="windowTitle">
@ -73,7 +73,7 @@
</property>
<property name="icon">
<iconset resource="../../resources/resources.qrc">
<normaloff>:/icon.png</normaloff>:/icon.png</iconset>
<normaloff>:/icon-helper.png</normaloff>:/icon-helper.png</iconset>
</property>
</item>
<item>
@ -136,8 +136,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>464</width>
<height>336</height>
<width>462</width>
<height>330</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_7">
@ -180,6 +180,13 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_components">
<property name="text">
<string>Skip components checking</string>
</property>
</widget>
</item>
<item>
<spacer name="spacer_general">
<property name="orientation">
@ -211,8 +218,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>397</width>
<height>322</height>
<width>462</width>
<height>330</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_13">
@ -296,16 +303,6 @@
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_helperPathInfo">
<property name="text">
<string>There are too binaries. `netctlgui-helper` should be running as root (for example from systemd), otherwise interface `/ctrl` will not be available. `netctlgui-helper-suid` may be running as normal user, but you should keep it in mind that it has SUID bit.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="layout_helperPath">
<item>
@ -392,7 +389,7 @@
<x>0</x>
<y>0</y>
<width>436</width>
<height>165</height>
<height>173</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
@ -579,7 +576,7 @@
<x>0</x>
<y>0</y>
<width>436</width>
<height>43</height>
<height>45</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_9">
@ -649,7 +646,7 @@
<x>0</x>
<y>0</y>
<width>277</width>
<height>190</height>
<height>194</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_10">
@ -846,7 +843,7 @@
<x>0</x>
<y>0</y>
<width>436</width>
<height>103</height>
<height>107</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_11">

View File

@ -1 +0,0 @@
../../3rdparty/task/task.h

View File

@ -1 +0,0 @@
../../3rdparty/task/taskadds.cpp

View File

@ -1 +0,0 @@
../../3rdparty/task/taskadds.h

View File

@ -21,8 +21,9 @@
#include <QMenu>
#include <QMessageBox>
#include <pdebug/pdebug.h>
#include "mainwindow.h"
#include "pdebug.h"
TrayIcon::TrayIcon(QObject *parent, const bool debugCmd)
@ -164,6 +165,8 @@ void TrayIcon::updateMenu()
contextMenu[QString("gui")]->setText(QApplication::translate("TrayIcon", "Show"));
else
contextMenu[QString("gui")]->setText(QApplication::translate("TrayIcon", "Hide"));
setContextMenu(menuActions);
}
@ -175,6 +178,7 @@ void TrayIcon::createActions()
contextMenu[QString("title")] = new QAction(QIcon(":icon"), QApplication::translate("TrayIcon", "Status"), this);
menuActions->addAction(contextMenu[QString("title")]);
connect(contextMenu[QString("title")], SIGNAL(triggered(bool)), this, SLOT(showInformationInWindow()));
menuActions->addSeparator();
@ -232,9 +236,7 @@ void TrayIcon::init()
setToolTip(QString("netctl-gui"));
createActions();
setContextMenu(menuActions);
connect(this, SIGNAL(messageClicked()), this, SLOT(showInformationInWindow()));
connect(this, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
this, SLOT(itemActivated(QSystemTrayIcon::ActivationReason)));
}
@ -253,6 +255,8 @@ void TrayIcon::itemActivated(const QSystemTrayIcon::ActivationReason reason)
mainWindow->showMainWindow();
break;
case QSystemTrayIcon::Context:
// clear menu before update
setContextMenu(0);
updateMenu();
break;
default:

View File

@ -55,6 +55,7 @@ _netctl_gui_settings=(
'PREFERED_IFACE'
'PROFILE_DIR'
'RFKILL_DIR'
'SKIPCOMPONENTS'
'STARTTOTRAY'
'SUDO_PATH'
'SYSTEMCTL_PATH'

View File

@ -24,7 +24,7 @@ configure_file (${SUBPROJECT_MAN_IN} ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_MA
configure_file (${SUBPROJECT_MAN5_IN} ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_MAN5})
install (FILES org.netctlgui.helper.conf DESTINATION ${DBUS_SYSTEMCONF_PATH})
install (FILES netctlgui-helper.conf DESTINATION /etc)
install (FILES netctl-gui.conf DESTINATION /etc)
install (FILES netctlgui-helper.service DESTINATION ${SYSTEMD_SERVICE_PATH})
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_MAN} DESTINATION share/man/man1/)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_MAN5} DESTINATION share/man/man5/)

View File

@ -25,6 +25,7 @@ _netctlgui_helper_arglist=(
'--nodaemon'
'--replace'
'--restore'
'--session'
'--system'
'-v'
'--version'

View File

@ -1,5 +1,5 @@
# Configuration file for Netctl GUI project
# /etc/netctlgui-helper.conf - system-wide configuration
# /etc/netctl-gui.conf - system-wide configuration
# $HOME/.config/netctl-gui.conf - user configuration
# close helper after GUI application quit.
@ -39,6 +39,9 @@ PROFILE_DIR=/etc/netctl/
# path to directory with rfkill devices.
# This option is not recognized by netctlgui-helper
RFKILL_DIR=/sys/class/rfkill/
# skip external components checking
# This option is not recognized by netctlgui-helper
SKIPCOMPONENTS=false
# start netctl-gui minimized to tray if it is available.
# This option is not recognized by netctlgui-helper
STARTTOTRAY=false

View File

@ -1,13 +1,13 @@
.TH netctlgui-helper.conf 5 "@CURRENT_DATE@" "version @PROJECT_VERSION@" "File Formats Manual"
.TH netctl-gui.conf 5 "@CURRENT_DATE@" "version @PROJECT_VERSION@" "File Formats Manual"
.SH NAME
netctlgui-helper.conf is a configuration file of Netctl GUI project
netctl-gui.conf is a configuration file of Netctl GUI project
.SH SYNOPSIS
.B /etc/netctlgui-helper.conf
.B /etc/netctl-gui.conf
for system-wide configuration or
.B $HOME/.config/netctl-gui.conf
for user one
.SH DESCRIPTION
.B netctlgui-helper.conf
.B netctl-gui.conf
is a file which contains parameters for
.BR netctlgui-helper (1)
and may be used as template for
@ -70,6 +70,9 @@ path to directory with
.BR rfkill (8)
devices. This option is not recognized by
.BR netctlgui-helper (1)
.IP "SKIPCOMPONENTS=false"
skip external components checking. This option is not recognized by
.BR netctlgui-helper (1)
.IP "STARTTOTRAY=false"
start
.BR netctl-gui (1)

View File

@ -23,6 +23,8 @@ do not run as daemon
force replace the existing session
.IP "--restore"
force restore the existing session
.IP "--session"
force create user DBus session
.IP "--system"
do not read user configuration
.IP "-v, --version"
@ -34,7 +36,7 @@ show this help and exit
.SH FILES
.I $HOME/.config/netctl-gui.conf
,
.I /etc/netctlgui-helper.conf
.I /etc/netctl-gui.conf
.RS
Configuration files
.RE
@ -64,7 +66,7 @@ By the way it is highly recommended to copy source service file before to
and edit copied file to avoid upgrade problems.
.SH SEE ALSO
.BR netctl-gui (1)
.BR netctlgui-helper.conf (5)
.BR netctl-gui.conf (5)
.SH STANDARDS
See
.B @CMAKE_INSTALL_PREFIX@/share/doc/netctl-gui/netctl-gui-dbus-api.html

View File

@ -1,9 +1,11 @@
[Unit]
Description=netctlgui-helper daemon
Documentation=man:netctlgui-helper(1) man:netctl-gui.conf(5)
[Service]
Type=forking
ExecStart=/usr/bin/netctlgui-helper --system
Type=dbus
BusName=org.netctlgui.helper
ExecStart=/usr/bin/netctlgui-helper --nodaemon --system
[Install]
WantedBy=multi-user.target

View File

@ -1,6 +1,8 @@
# set files
file (GLOB SOURCES *.cpp)
file (GLOB HEADERS *.h)
file (GLOB_RECURSE SOURCES *.cpp ${PROJECT_TRDPARTY_DIR}/task/*.cpp
${PROJECT_TRDPARTY_DIR}/language/*.cpp)
file (GLOB_RECURSE HEADERS *.h ${PROJECT_TRDPARTY_DIR}/task/*.h
${PROJECT_TRDPARTY_DIR}/language/*.h)
file (GLOB LANGUAGES ${SUBPROJECT_TRANSLATION_DIR}/*.ts)
set (RESOURCES ${SUBPROJECT_RESOURCE_DIR}/resources-helper.qrc)
@ -10,7 +12,8 @@ include_directories (${CMAKE_CURRENT_SOURCE_DIR}/../../${PROJECT_LIBRARY}/includ
${CMAKE_CURRENT_BINARY_DIR}/../
${CMAKE_SOURCE_DIR}
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR})
${CMAKE_CURRENT_BINARY_DIR}
${PROJECT_TRDPARTY_DIR})
link_directories (${PROJECT_LIBRARY}/src/lib)
if (USE_QT5)
@ -44,15 +47,14 @@ else ()
set (TRANSLATIONS_BINARY ${TRANSLATIONS_BINARY} ${QM})
add_custom_command (OUTPUT ${QM} COMMAND ${QT_LRELEASE_EXECUTABLE} ${TS} MAIN_DEPENDENCY ${TS})
endforeach ()
add_custom_target (translations-header COMMAND ${QT_LUPDATE_EXECUTABLE} ${HEADERS} ${SOURCES} -ts ${TRANSLATIONS})
add_custom_command (TARGET translations-header COMMAND ${QT_LRELEASE_EXECUTABLE} ${TRANSLATIONS})
add_custom_target (translations-helper COMMAND ${QT_LUPDATE_EXECUTABLE} ${HEADERS} ${SOURCES} -ts ${TRANSLATIONS})
add_custom_command (TARGET translations-helper COMMAND ${QT_LRELEASE_EXECUTABLE} ${TRANSLATIONS})
endif()
add_executable (${SUBPROJECT} ${SOURCES} ${HEADERS} ${MOC_SOURCES} ${QRC_SOURCES} ${TRANSLATIONS})
target_link_libraries (${SUBPROJECT} ${PROJECT_LIBRARY} ${QT_NEEDED_LIBS})
add_executable (${SUBPROJECT}-suid ${SOURCES} ${HEADERS} ${MOC_SOURCES} ${QRC_SOURCES} ${TRANSLATIONS})
target_link_libraries (${SUBPROJECT}-suid ${PROJECT_LIBRARY} ${QT_NEEDED_LIBS})
# install properties
install (TARGETS ${SUBPROJECT} DESTINATION bin)
install (TARGETS ${SUBPROJECT}-suid DESTINATION bin
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE SETUID)
if (USE_CAPABILITIES)
install (CODE "exec_program (setcap ARGS \"cap_setuid=ep\" \"$ENV{DESTDIR}/bin/${SUBPROJECT}\")")
endif ()

View File

@ -186,6 +186,18 @@ bool ControlAdaptor::Enable(const QString profile)
}
bool ControlAdaptor::forceStart(const QString profile)
{
return netctlCommand->forceStartProfile(profile);
}
bool ControlAdaptor::forceStop(const QString profile)
{
return netctlCommand->forceStopProfile(profile);
}
bool ControlAdaptor::Reenable(const QString profile)
{
return netctlCommand->reenableProfile(profile);

View File

@ -57,6 +57,8 @@ public slots:
bool autoServiceRestart();
bool autoServiceStart();
bool Enable(const QString profile);
bool forceStart(const QString profile);
bool forceStop(const QString profile);
bool Reenable(const QString profile);
bool Restart(const QString profile);
bool Start(const QString profile);

View File

@ -1 +0,0 @@
../../gui/src/language.cpp

View File

@ -1 +0,0 @@
../../gui/src/language.h

View File

@ -25,7 +25,8 @@
#include <iostream>
#include <unistd.h>
#include "language.h"
#include <language/language.h>
#include "messages.h"
#include "netctlhelper.h"
#include "version.h"
@ -42,7 +43,7 @@ bool existingSessionOperation(const QString operation)
QDBusMessage response = bus.call(request);
QList<QVariant> arguments = response.arguments();
return !arguments.isEmpty();
return (!arguments.isEmpty() && bool(arguments[0].toInt()));
}
@ -67,6 +68,9 @@ int main(int argc, char *argv[])
} else if (QString(argv[i]) == QString("--restore")) {
// restore
args[QString("state")] = (int) 2;
} else if (QString(argv[i]) == QString("--session")) {
// session
args[QString("session")] = true;
} else if (QString(argv[i]) == QString("--system")) {
// system
args[QString("system")] = true;
@ -91,10 +95,11 @@ int main(int argc, char *argv[])
args[QString("nodaemon")] = true;
// check euid
if (geteuid() != 0) {
cout << QCoreApplication::translate("NetctlHelper", "The helper is running with EUID %1. Some functions will not be available.")
cout << QCoreApplication::translate("NetctlHelper", "The helper is running with EUID %1. Some functions may not be available.")
.arg(QString::number(geteuid())).toUtf8().data() << endl;
cout << QCoreApplication::translate("NetctlHelper", "See security notes for more details.")
.toUtf8().data() << endl;
args[QString("session")] = true;
}
#if QT_VERSION >= 0x050000

View File

@ -37,6 +37,7 @@ QMap<QString, QVariant> getArgs()
args[QString("config")] = QString(QDir::homePath() + QString("/.config/netctl-gui.conf"));
args[QString("debug")] = false;
args[QString("nodaemon")] = false;
args[QString("session")] = false;
args[QString("state")] = (int) 0;
args[QString("system")] = false;
args[QString("help")] = false;
@ -65,6 +66,8 @@ QString helpMessage()
.arg(QCoreApplication::translate("NetctlHelper", "force replace the existing session"));
helpMessage += QString(" --restore - %1\n")
.arg(QCoreApplication::translate("NetctlHelper", "force restore the existing session"));
helpMessage += QString(" --session - %1\n")
.arg(QCoreApplication::translate("NetctlHelper", "force create user DBus session"));
helpMessage += QString(" --system - %1\n")
.arg(QCoreApplication::translate("NetctlHelper", "do not read user configuration, system-wide only"));
helpMessage += QString(" %1\n").arg(QCoreApplication::translate("NetctlHelper", "Show messages:"));
@ -85,15 +88,29 @@ QString infoMessage()
// build information
infoMessage += QCoreApplication::translate("NetctlHelper", "Build date: %1").
arg(QString(BUILD_DATE));
// cmake
infoMessage += QString("\n%1:\n").arg(QCoreApplication::translate("NetctlHelper", "cmake flags"));
infoMessage += QString("\t-DCMAKE_BUILD_TYPE=%1 \\\n").arg(QString(CMAKE_BUILD_TYPE));
infoMessage += QString("\t-DCMAKE_INSTALL_PREFIX=%1 \\\n").arg(QString(CMAKE_INSTALL_PREFIX));
infoMessage += QString("\t-DBUILD_DOCS=%1 \\\n").arg(QString(PROJECT_BUILD_DOCS));
infoMessage += QString("\t-DBUILD_LIBRARY=%1 \\\n").arg(QString(PROJECT_BUILD_LIBRARY));
infoMessage += QString("\t-DBUILD_GUI=%1 \\\n").arg(QString(PROJECT_BUILD_GUI));
infoMessage += QString("\t-DUSE_QT5=%1 \\\n").arg(QString(PROJECT_USE_QT5));
infoMessage += QString("\t-DBUILD_DATAENGINE=%1 \\\n").arg(QString(PROJECT_BUILD_DATAENGINE));
// cmake properties
infoMessage += QString("%1:\n").arg(QCoreApplication::translate("NetctlHelper", "cmake properties"));
infoMessage += QString("\t-DCMAKE_BUILD_TYPE=%1\n").arg(QString(CMAKE_BUILD_TYPE));
infoMessage += QString("\t-DCMAKE_INSTALL_PREFIX=%1\n").arg(QString(CMAKE_INSTALL_PREFIX));
// components
infoMessage += QString("%1:\n").arg(QCoreApplication::translate("NetctlHelper", "Components"));
infoMessage += QString("\t-DBUILD_DATAENGINE=%1\n").arg(QString(PROJECT_BUILD_DATAENGINE));
infoMessage += QString("\t-DBUILD_GUI=%1\n").arg(QString(PROJECT_BUILD_GUI));
infoMessage += QString("\t-DBUILD_HELPER=%1\n").arg(QString(PROJECT_BUILD_HELPER));
infoMessage += QString("\t-DBUILD_LIBRARY=%1\n").arg(QString(PROJECT_BUILD_LIBRARY));
infoMessage += QString("\t-DBUILD_PLASMOID=%1\n").arg(QString(PROJECT_BUILD_PLASMOID));
// additional components
infoMessage += QString("%1:\n").arg(QCoreApplication::translate("NetctlHelper", "Additional components"));
infoMessage += QString("\t-DBUILD_DOCS=%1\n").arg(QString(PROJECT_BUILD_DOCS));
infoMessage += QString("\t-DBUILD_TEST=%1\n").arg(QString(PROJECT_BUILD_TEST));
// project properties
infoMessage += QString("%1:\n").arg(QCoreApplication::translate("NetctlHelper", "Project properties"));
infoMessage += QString("\t-DDBUS_SYSTEMCONF_PATH=%1\n").arg(QString(PROJECT_DBUS_SYSTEMCONF_PATH));
infoMessage += QString("\t-DSYSTEMD_SERVICE_PATH=%1\n").arg(QString(PROJECT_SYSTEMD_SERVICE_PATH));
infoMessage += QString("\t-DUSE_CAPABILITIES=%1\n").arg(QString(PROJECT_USE_CAPABILITIES));
infoMessage += QString("\t-DUSE_QT5=%1\n").arg(QString(PROJECT_USE_QT5));
// transport information
infoMessage += QString("%1:\n").arg(QCoreApplication::translate("NetctlHelper", "DBus configuration"));
infoMessage += QString("\tDBUS_SERVICE=%1\n").arg(QString(DBUS_SERVICE));
@ -106,9 +123,6 @@ QString infoMessage()
// docs path
infoMessage += QString("%1:\n").arg(QCoreApplication::translate("NetctlHelper", "Documentation"));
infoMessage += QString("\tDOCS_PATH=%1\n").arg(QString(DOCS_PATH));
QStringList docs = QDir(QString(DOCS_PATH)).entryList(QDir::NoDotAndDotDot);
for (int i=0; i<docs.count(); i++)
infoMessage += QString("\t%1\n").arg(docs[i]);
return infoMessage;
}

View File

@ -24,10 +24,10 @@
#include <unistd.h>
#include <netctlgui/netctlgui.h>
#include <pdebug/pdebug.h>
#include "controladaptor.h"
#include "netctladaptor.h"
#include "pdebug.h"
#include "version.h"
@ -35,6 +35,7 @@ NetctlHelper::NetctlHelper(QObject *parent, QMap<QString, QVariant> args)
: QObject(parent),
configPath(args[QString("config")].toString()),
debug(args[QString("debug")].toBool()),
session(args[QString("session")].toBool()),
system(args[QString("system")].toBool())
{
updateConfiguration();
@ -88,6 +89,25 @@ void NetctlHelper::createInterface()
if (debug) qDebug() << PDEBUG << ":" << bus.lastError().message();
return quitHelper();
}
// session bus
if (!session) return;
QDBusConnection sessionBus = QDBusConnection::sessionBus();
if (!sessionBus.registerService(DBUS_HELPER_SERVICE)) {
if (debug) qDebug() << PDEBUG << ":" << "Could not register session service";
if (debug) qDebug() << PDEBUG << ":" << sessionBus.lastError().message();
}
if (!sessionBus.registerObject(DBUS_LIB_PATH,
new NetctlAdaptor(this, debug, configuration),
QDBusConnection::ExportAllContents)) {
if (debug) qDebug() << PDEBUG << ":" << "Could not register session library object";
if (debug) qDebug() << PDEBUG << ":" << sessionBus.lastError().message();
}
if (!sessionBus.registerObject(DBUS_CTRL_PATH,
new ControlAdaptor(this, debug, configuration),
QDBusConnection::ExportAllContents)) {
if (debug) qDebug() << PDEBUG << ":" << "Could not register session control object";
if (debug) qDebug() << PDEBUG << ":" << sessionBus.lastError().message();
}
}
@ -98,6 +118,11 @@ void NetctlHelper::deleteInterface()
QDBusConnection::systemBus().unregisterObject(DBUS_LIB_PATH);
QDBusConnection::systemBus().unregisterObject(DBUS_CTRL_PATH);
QDBusConnection::systemBus().unregisterService(DBUS_HELPER_SERVICE);
// session bus
if (!session) return;
QDBusConnection::sessionBus().unregisterObject(DBUS_LIB_PATH);
QDBusConnection::sessionBus().unregisterObject(DBUS_CTRL_PATH);
QDBusConnection::sessionBus().unregisterService(DBUS_HELPER_SERVICE);
}
@ -122,6 +147,7 @@ QMap<QString, QString> NetctlHelper::getDefault()
settings[QString("PREFERED_IFACE")] = QString("");
settings[QString("PROFILE_DIR")] = QString("/etc/netctl/");
settings[QString("RFKILL_DIR")] = QString("/sys/class/rfkill/");
settings[QString("SKIPCOMPONENTS")] = QString("false");
settings[QString("STARTTOTRAY")] = QString("false");
settings[QString("SUDO_PATH")] = QString("/usr/bin/kdesu");
settings[QString("SYSTEMCTL_PATH")] = QString("/usr/bin/systemctl");
@ -172,7 +198,7 @@ void NetctlHelper::updateConfiguration()
if (debug) qDebug() << PDEBUG;
deleteInterface();
configuration = getSettings(QString("/etc/netctlgui-helper.conf"));
configuration = getSettings(QString("/etc/netctl-gui.conf"));
if (!system)
configuration = getSettings(configPath, configuration);
createInterface();

View File

@ -41,6 +41,7 @@ private:
QString configPath;
QMap<QString, QString> configuration;
bool debug;
bool session;
bool system;
void createInterface();
void deleteInterface();

View File

@ -1 +0,0 @@
../../3rdparty/pdebug/pdebug.h

View File

@ -24,6 +24,7 @@ _netctlgui_helper_arglist=(
{'--nodaemon','--nodaemon'}'[do not start as daemon]'
{'--replace','--replace'}'[force replace the existing session]'
{'--restore','--restore'}'[force restore the existing session]'
{'--session','--session'}'[force create user DBus session]'
{'--system','--system'}'[do not read user configuration]'
{'(--version)-v','(-v)--version'}'[show version and exit]'
{'(--info)-i','(-i)--info'}'[show build information and exit]'

View File

@ -176,6 +176,20 @@ public slots:
* @return true if the method was completed without errors
*/
bool enableProfile(const QString profile);
/**
* @brief method which force starts profile
* @param profile profile name
* @return false if components are not found or command exit code is not equal to 0
* @return true if the method was completed without errors
*/
bool forceStartProfile(const QString profile);
/**
* @brief method which force stops profile
* @param profile profile name
* @return false if components are not found or command exit code is not equal to 0
* @return true if the method was completed without errors
*/
bool forceStopProfile(const QString profile);
/**
* @brief method which reenables profile
* @param profile profile name

View File

@ -1,13 +1,15 @@
# set files
file (GLOB SOURCES *.cpp)
file (GLOB HEADERS *.h)
file (GLOB_RECURSE SOURCES *.cpp ${PROJECT_TRDPARTY_DIR}/task/*.cpp)
file (GLOB_RECURSE HEADERS *.h ${SUBPROJECT_INCLUDE_DIR}/*h
${PROJECT_TRDPARTY_DIR}/task/*.h)
# include_path
include_directories (${SUBPROJECT_INCLUDE_DIR}
${CMAKE_CURRENT_BINARY_DIR}/../
${CMAKE_SOURCE_DIR}
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR})
${CMAKE_CURRENT_BINARY_DIR}
${PROJECT_TRDPARTY_DIR})
if (USE_QT5)
find_package(Qt5 COMPONENTS Core REQUIRED)

View File

@ -23,7 +23,7 @@
*/
#include "netctlgui.h"
#include <netctlgui/netctlgui.h>
/**

View File

@ -1 +0,0 @@
../include/netctlgui/netctlgui.h

View File

@ -26,9 +26,9 @@
#include <QDebug>
#include <QDirIterator>
#include "netctlgui.h"
#include "pdebug.h"
#include "taskadds.h"
#include <netctlgui/netctlgui.h>
#include <pdebug/pdebug.h>
#include <task/taskadds.h>
/**
@ -542,6 +542,30 @@ bool Netctl::enableProfile(const QString profile)
}
/**
* @fn forceStartProfile
*/
bool Netctl::forceStartProfile(const QString profile)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile;
return cmdCall(true, netctlCommand, QString("start"), profile);
}
/**
* @fn forceStopProfile
*/
bool Netctl::forceStopProfile(const QString profile)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile;
return cmdCall(true, netctlCommand, QString("stop"), profile);
}
/**
* @fn reenableProfile
*/

View File

@ -1 +0,0 @@
../include/netctlgui/netctlinteract.h

View File

@ -29,9 +29,9 @@
#include <QFileInfo>
#include <QTextStream>
#include "netctlgui.h"
#include "pdebug.h"
#include "taskadds.h"
#include <netctlgui/netctlgui.h>
#include <pdebug/pdebug.h>
#include <task/taskadds.h>
/**

View File

@ -1 +0,0 @@
../include/netctlgui/netctlprofile.h

View File

@ -1 +0,0 @@
../../3rdparty/pdebug/pdebug.h

View File

@ -1 +0,0 @@
../../3rdparty/task/task.h

View File

@ -1 +0,0 @@
../../3rdparty/task/taskadds.cpp

View File

@ -1 +0,0 @@
../../3rdparty/task/taskadds.h

View File

@ -26,9 +26,9 @@
#include <QDebug>
#include <grp.h>
#include "netctlgui.h"
#include "pdebug.h"
#include "taskadds.h"
#include <netctlgui/netctlgui.h>
#include <pdebug/pdebug.h>
#include <task/taskadds.h>
/**

View File

@ -1 +0,0 @@
../include/netctlgui/wpasupinteract.h

View File

@ -9,7 +9,12 @@ 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}/../)
include_directories (${CMAKE_SOURCE_DIR}
${CMAKE_BINARY_DIR}
${KDE4_INCLUDES}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}/../
${PROJECT_TRDPARTY_DIR})
add_subdirectory (po)
@ -19,7 +24,7 @@ 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 SUBPROJECT_UI *.ui)
file (GLOB_RECURSE SUBPROJECT_UI *.ui ${PROJECT_TRDPARTY_DIR}/about/*.ui)
# prepare
configure_file (${SUBPROJECT_DESKTOP_IN} ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_DESKTOP})

View File

@ -1 +0,0 @@
../gui/src/about.ui

View File

@ -29,8 +29,9 @@
#include <QMenu>
#include <QProcessEnvironment>
#include <pdebug/pdebug.h>
#include "netctl.h"
#include "pdebug.h"
#include "ui_about.h"
#include "ui_appearance.h"
#include "ui_dataengine.h"

View File

@ -1 +0,0 @@
../3rdparty/pdebug/pdebug.h

View File

@ -1,5 +1,5 @@
[Global]
IconName=netctl-gui
IconName=netctl-gui-widget
Name=Netctl plasmoid
Comment=Netctl plasmoid popups

View File

@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/netctl-gui/issues\n"
"POT-Creation-Date: 2014-08-20 11:59+0400\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 <esalexeev@gmail.com>\n"
"Language-Team: Russian <kde-russian@lists.kde.ru>\n"
@ -18,99 +18,99 @@ msgstr ""
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Lokalize 1.5\n"
#: netctl.cpp:269
#: netctl.cpp:270
msgid "Set profile %1 disabled"
msgstr "Set profile %1 disabled"
#: netctl.cpp:272
#: netctl.cpp:273
msgid "Set profile %1 enabled"
msgstr "Set profile %1 enabled"
#: netctl.cpp:293
#: netctl.cpp:294
msgid "Restart profile %1"
msgstr "Restart profile %1"
#: netctl.cpp:314
#: netctl.cpp:315
msgid "Start profile %1"
msgstr "Start profile %1"
#: netctl.cpp:340
#: netctl.cpp:341
msgid "Stop profile %1"
msgstr "Stop profile %1"
#: netctl.cpp:360 netctl.cpp:498
#: netctl.cpp:361 netctl.cpp:499
msgid "Stop all profiles"
msgstr "Stop all profiles"
#: netctl.cpp:380
#: netctl.cpp:381
msgid "Switch to profile %1"
msgstr "Switch to profile %1"
#: netctl.cpp:453
#: netctl.cpp:454
msgid "Start another profile"
msgstr "Start another profile"
#: netctl.cpp:454
#: netctl.cpp:455
msgid "Stop %1"
msgstr "Stop %1"
#: netctl.cpp:455
#: netctl.cpp:456
msgid "Restart %1"
msgstr "Restart %1"
#: netctl.cpp:457
#: netctl.cpp:458
msgid "Disable %1"
msgstr "Disable %1"
#: netctl.cpp:459
#: netctl.cpp:460
msgid "Enable %1"
msgstr "Enable %1"
#: netctl.cpp:462 netctl.cpp:485
#: netctl.cpp:463 netctl.cpp:486
msgid "Start profile"
msgstr "Start profile"
#: netctl.cpp:493
#: netctl.cpp:494
msgid "Stop profile"
msgstr "Stop profile"
#: netctl.cpp:503
#: netctl.cpp:504
msgid "Switch to profile"
msgstr "Switch to profile"
#: netctl.cpp:511
#: netctl.cpp:512
msgid "Restart profile"
msgstr "Restart profile"
#: netctl.cpp:516
#: netctl.cpp:517
msgid "Enable profile"
msgstr "Enable profile"
#: netctl.cpp:520
#: netctl.cpp:521
msgid "Show netctl-gui"
msgstr "Show netctl-gui"
#: netctl.cpp:525
#: netctl.cpp:526
msgid "Show WiFi menu"
msgstr "Show WiFi menu"
#: netctl.cpp:552
#: netctl.cpp:553
msgid "Start GUI"
msgstr "Start GUI"
#: netctl.cpp:563
#: netctl.cpp:564
msgid "Start WiFi menu"
msgstr "Start WiFi menu"
#: netctl.cpp:603
#: netctl.cpp:604
msgid "Network is up"
msgstr "Network is up"
#: netctl.cpp:607
#: netctl.cpp:608
msgid "Network is down"
msgstr "Network is down"
#: netctl.cpp:797
#: netctl.cpp:798
msgid ""
"Version %1\n"
"(build date %2)"
@ -118,73 +118,65 @@ msgstr ""
"Version %1\n"
"(build date %2)"
#: netctl.cpp:798
#: netctl.cpp:799
msgid "KDE widget which interacts with netctl."
msgstr "KDE widget which interacts with netctl."
#: netctl.cpp:799
#: netctl.cpp:800
msgid "Links:"
msgstr "Links:"
#: netctl.cpp:800
#: netctl.cpp:801
msgid "Homepage"
msgstr "Homepage"
#: netctl.cpp:801
#: netctl.cpp:802
msgid "Repository"
msgstr "Repository"
#: netctl.cpp:802
#: netctl.cpp:803
msgid "Bugtracker"
msgstr "Bugtracker"
#: netctl.cpp:803
#: netctl.cpp:804
msgid "Translation issue"
msgstr "Translation issue"
#: netctl.cpp:804
#: netctl.cpp:805
msgid "AUR packages"
msgstr "AUR packages"
#: netctl.cpp:806
#: netctl.cpp:807
msgid "This software is licensed under %1"
msgstr "This software is licensed under %1"
#: netctl.cpp:814
#: netctl.cpp:815
msgid "Translators: %1"
msgstr "Translators: %1"
#: netctl.cpp:815
#: netctl.cpp:816
msgid "This software uses: %1"
msgstr "This software uses: %1"
#: netctl.cpp:817
#: netctl.cpp:818
msgid "Netctl plasmoid"
msgstr "Netctl plasmoid"
#: netctl.cpp:818
#: netctl.cpp:819
msgid "Appearance"
msgstr "Appearance"
#: netctl.cpp:819
#: netctl.cpp:820
msgid "DataEngine"
msgstr "DataEngine"
#. i18n: file: about.ui:21
#. i18n: ectx: attribute (title), widget (QWidget, tab_About)
#: netctl.cpp:820 po/rc.cpp:3 rc.cpp:3
#: netctl.cpp:821
msgid "About"
msgstr "About"
#. i18n: file: about.ui:127
#. i18n: ectx: attribute (title), widget (QWidget, tab_ackn)
#: po/rc.cpp:6 rc.cpp:6
msgid "Acknowledgement"
msgstr "Acknowledgement"
#. i18n: file: appearance.ui:47
#. i18n: ectx: property (text), widget (QLabel, label_inactiveIcon)
#: po/rc.cpp:9 rc.cpp:9
#: po/rc.cpp:3 rc.cpp:3
msgid "Inactive icon"
msgstr "Inactive icon"
@ -236,89 +228,89 @@ msgstr "Inactive icon"
#. i18n: ectx: property (text), widget (QPushButton, pushButton_sudo)
#. i18n: file: widget.ui:282
#. i18n: ectx: property (text), widget (QPushButton, pushButton_wifi)
#: po/rc.cpp:12 po/rc.cpp:48 po/rc.cpp:60 po/rc.cpp:66 po/rc.cpp:72
#: po/rc.cpp:78 po/rc.cpp:87 po/rc.cpp:93 po/rc.cpp:99 po/rc.cpp:105
#: po/rc.cpp:111 po/rc.cpp:117 rc.cpp:12 rc.cpp:48 rc.cpp:60 rc.cpp:66
#: rc.cpp:72 rc.cpp:78 rc.cpp:87 rc.cpp:93 rc.cpp:99 rc.cpp:105 rc.cpp:111
#: rc.cpp:117
#: 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:15 rc.cpp:15
#: 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:18 rc.cpp:18
#: 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:21 rc.cpp:21
#: 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:24 rc.cpp:24
#: 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:27 rc.cpp:27
#: 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:30 rc.cpp:30
#: 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:33 rc.cpp:33
#: 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:36 rc.cpp:36
#: 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:39 rc.cpp:39
#: 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:42 rc.cpp:42
#: 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:45 rc.cpp:45
#: 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:51 rc.cpp:51
#: 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:54 rc.cpp:54
#: po/rc.cpp:48 rc.cpp:48
msgid "Set text align"
msgstr "Set text align"
@ -330,7 +322,7 @@ msgstr "Set text align"
#. i18n: ectx: property (text), widget (QLabel, label_netctl)
#. i18n: file: widget.ui:161
#. i18n: ectx: property (text), widget (QLabel, label_netctl)
#: po/rc.cpp:57 po/rc.cpp:96 rc.cpp:57 rc.cpp:96
#: po/rc.cpp:51 po/rc.cpp:90 rc.cpp:51 rc.cpp:90
msgid "Path to netctl"
msgstr "Path to netctl"
@ -342,61 +334,61 @@ msgstr "Path to netctl"
#. i18n: ectx: property (text), widget (QLabel, label_netctlAuto)
#. i18n: file: widget.ui:194
#. i18n: ectx: property (text), widget (QLabel, label_netctlAuto)
#: po/rc.cpp:63 po/rc.cpp:102 rc.cpp:63 rc.cpp:102
#: 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:69 rc.cpp:69
#: 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:75 rc.cpp:75
#: 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:81 rc.cpp:81
#: 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:84 rc.cpp:84
#: 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:90 rc.cpp:90
#: 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:108 rc.cpp:108
#: 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:114 rc.cpp:114
#: 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:120 rc.cpp:120
#: 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:123 rc.cpp:123
#: po/rc.cpp:117 rc.cpp:117
msgid ""
"$info - active profile information\n"
"$current - current profile name\n"
@ -418,16 +410,19 @@ msgstr ""
"$profiles - list of the netctl profiles\n"
"$status - current profile status (static/enabled)"
#: po/rc.cpp:132 rc.cpp:132
#: po/rc.cpp:126 rc.cpp:126
msgctxt "NAME OF TRANSLATORS"
msgid "Your names"
msgstr "Evgeniy Alekseev"
#: po/rc.cpp:133 rc.cpp:133
#: 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"

422
sources/plasmoid/po/ja.po Normal file
View File

@ -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 <ngsksdt@gmail.com>, 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 <ngsksdt@gmail.com>\n"
"Language-Team: Japanese <kde-i18n-doc@kde.org>\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 "

View File

@ -8,7 +8,7 @@ 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-20 11:59+0400\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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -17,171 +17,163 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: netctl.cpp:269
#: netctl.cpp:270
msgid "Set profile %1 disabled"
msgstr ""
#: netctl.cpp:272
#: netctl.cpp:273
msgid "Set profile %1 enabled"
msgstr ""
#: netctl.cpp:293
#: netctl.cpp:294
msgid "Restart profile %1"
msgstr ""
#: netctl.cpp:314
#: netctl.cpp:315
msgid "Start profile %1"
msgstr ""
#: netctl.cpp:340
#: netctl.cpp:341
msgid "Stop profile %1"
msgstr ""
#: netctl.cpp:360 netctl.cpp:498
#: netctl.cpp:361 netctl.cpp:499
msgid "Stop all profiles"
msgstr ""
#: netctl.cpp:380
#: netctl.cpp:381
msgid "Switch to profile %1"
msgstr ""
#: netctl.cpp:453
#: netctl.cpp:454
msgid "Start another profile"
msgstr ""
#: netctl.cpp:454
#: netctl.cpp:455
msgid "Stop %1"
msgstr ""
#: netctl.cpp:455
#: netctl.cpp:456
msgid "Restart %1"
msgstr ""
#: netctl.cpp:457
#: netctl.cpp:458
msgid "Disable %1"
msgstr ""
#: netctl.cpp:459
#: netctl.cpp:460
msgid "Enable %1"
msgstr ""
#: netctl.cpp:462 netctl.cpp:485
#: netctl.cpp:463 netctl.cpp:486
msgid "Start profile"
msgstr ""
#: netctl.cpp:493
#: netctl.cpp:494
msgid "Stop profile"
msgstr ""
#: netctl.cpp:503
#: netctl.cpp:504
msgid "Switch to profile"
msgstr ""
#: netctl.cpp:511
#: netctl.cpp:512
msgid "Restart profile"
msgstr ""
#: netctl.cpp:516
#: netctl.cpp:517
msgid "Enable profile"
msgstr ""
#: netctl.cpp:520
#: netctl.cpp:521
msgid "Show netctl-gui"
msgstr ""
#: netctl.cpp:525
#: netctl.cpp:526
msgid "Show WiFi menu"
msgstr ""
#: netctl.cpp:552
#: netctl.cpp:553
msgid "Start GUI"
msgstr ""
#: netctl.cpp:563
#: netctl.cpp:564
msgid "Start WiFi menu"
msgstr ""
#: netctl.cpp:603
#: netctl.cpp:604
msgid "Network is up"
msgstr ""
#: netctl.cpp:607
#: netctl.cpp:608
msgid "Network is down"
msgstr ""
#: netctl.cpp:797
#: netctl.cpp:798
msgid ""
"Version %1\n"
"(build date %2)"
msgstr ""
#: netctl.cpp:798
#: netctl.cpp:799
msgid "KDE widget which interacts with netctl."
msgstr ""
#: netctl.cpp:799
#: netctl.cpp:800
msgid "Links:"
msgstr ""
#: netctl.cpp:800
#: netctl.cpp:801
msgid "Homepage"
msgstr ""
#: netctl.cpp:801
#: netctl.cpp:802
msgid "Repository"
msgstr ""
#: netctl.cpp:802
#: netctl.cpp:803
msgid "Bugtracker"
msgstr ""
#: netctl.cpp:803
#: netctl.cpp:804
msgid "Translation issue"
msgstr ""
#: netctl.cpp:804
#: netctl.cpp:805
msgid "AUR packages"
msgstr ""
#: netctl.cpp:806
#: netctl.cpp:807
msgid "This software is licensed under %1"
msgstr ""
#: netctl.cpp:814
#: netctl.cpp:815
msgid "Translators: %1"
msgstr ""
#: netctl.cpp:815
#: netctl.cpp:816
msgid "This software uses: %1"
msgstr ""
#: netctl.cpp:817
#: netctl.cpp:818
msgid "Netctl plasmoid"
msgstr ""
#: netctl.cpp:818
#: netctl.cpp:819
msgid "Appearance"
msgstr ""
#: netctl.cpp:819
#: netctl.cpp:820
msgid "DataEngine"
msgstr ""
#. i18n: file: about.ui:21
#. i18n: ectx: attribute (title), widget (QWidget, tab_About)
#: netctl.cpp:820 po/rc.cpp:3 rc.cpp:3
#: netctl.cpp:821
msgid "About"
msgstr ""
#. i18n: file: about.ui:127
#. i18n: ectx: attribute (title), widget (QWidget, tab_ackn)
#: po/rc.cpp:6 rc.cpp:6
msgid "Acknowledgement"
msgstr ""
#. i18n: file: appearance.ui:47
#. i18n: ectx: property (text), widget (QLabel, label_inactiveIcon)
#: po/rc.cpp:9 rc.cpp:9
#: po/rc.cpp:3 rc.cpp:3
msgid "Inactive icon"
msgstr ""
@ -233,89 +225,89 @@ msgstr ""
#. i18n: ectx: property (text), widget (QPushButton, pushButton_sudo)
#. i18n: file: widget.ui:282
#. i18n: ectx: property (text), widget (QPushButton, pushButton_wifi)
#: po/rc.cpp:12 po/rc.cpp:48 po/rc.cpp:60 po/rc.cpp:66 po/rc.cpp:72
#: po/rc.cpp:78 po/rc.cpp:87 po/rc.cpp:93 po/rc.cpp:99 po/rc.cpp:105
#: po/rc.cpp:111 po/rc.cpp:117 rc.cpp:12 rc.cpp:48 rc.cpp:60 rc.cpp:66
#: rc.cpp:72 rc.cpp:78 rc.cpp:87 rc.cpp:93 rc.cpp:99 rc.cpp:105 rc.cpp:111
#: rc.cpp:117
#: 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:15 rc.cpp:15
#: 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:18 rc.cpp:18
#: 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:21 rc.cpp:21
#: 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:24 rc.cpp:24
#: 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:27 rc.cpp:27
#: 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:30 rc.cpp:30
#: 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:33 rc.cpp:33
#: 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:36 rc.cpp:36
#: 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:39 rc.cpp:39
#: 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:42 rc.cpp:42
#: 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:45 rc.cpp:45
#: 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:51 rc.cpp:51
#: 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:54 rc.cpp:54
#: po/rc.cpp:48 rc.cpp:48
msgid "Set text align"
msgstr ""
@ -327,7 +319,7 @@ msgstr ""
#. i18n: ectx: property (text), widget (QLabel, label_netctl)
#. i18n: file: widget.ui:161
#. i18n: ectx: property (text), widget (QLabel, label_netctl)
#: po/rc.cpp:57 po/rc.cpp:96 rc.cpp:57 rc.cpp:96
#: po/rc.cpp:51 po/rc.cpp:90 rc.cpp:51 rc.cpp:90
msgid "Path to netctl"
msgstr ""
@ -339,61 +331,61 @@ msgstr ""
#. i18n: ectx: property (text), widget (QLabel, label_netctlAuto)
#. i18n: file: widget.ui:194
#. i18n: ectx: property (text), widget (QLabel, label_netctlAuto)
#: po/rc.cpp:63 po/rc.cpp:102 rc.cpp:63 rc.cpp:102
#: 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:69 rc.cpp:69
#: 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:75 rc.cpp:75
#: 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:81 rc.cpp:81
#: 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:84 rc.cpp:84
#: 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:90 rc.cpp:90
#: 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:108 rc.cpp:108
#: 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:114 rc.cpp:114
#: 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:120 rc.cpp:120
#: 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:123 rc.cpp:123
#: po/rc.cpp:117 rc.cpp:117
msgid ""
"$info - active profile information\n"
"$current - current profile name\n"
@ -406,12 +398,12 @@ msgid ""
"$status - current profile status (static/enabled)"
msgstr ""
#: po/rc.cpp:132 rc.cpp:132
#: po/rc.cpp:126 rc.cpp:126
msgctxt "NAME OF TRANSLATORS"
msgid "Your names"
msgstr ""
#: po/rc.cpp:133 rc.cpp:133
#: po/rc.cpp:127 rc.cpp:127
msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails"
msgstr ""

View File

@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/netctl-gui/issues\n"
"POT-Creation-Date: 2014-08-20 11:59+0400\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 <esalexeev@gmail.com>\n"
"Language-Team: Russian <kde-russian@lists.kde.ru>\n"
@ -18,99 +18,99 @@ msgstr ""
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Lokalize 1.5\n"
#: netctl.cpp:269
#: netctl.cpp:270
msgid "Set profile %1 disabled"
msgstr "Выключение автозагрузки профиля %1"
#: netctl.cpp:272
#: netctl.cpp:273
msgid "Set profile %1 enabled"
msgstr "Включение автозагрузки профиля %1"
#: netctl.cpp:293
#: netctl.cpp:294
msgid "Restart profile %1"
msgstr "Перезапуск профиля %1"
#: netctl.cpp:314
#: netctl.cpp:315
msgid "Start profile %1"
msgstr "Запуск профиля %1"
#: netctl.cpp:340
#: netctl.cpp:341
msgid "Stop profile %1"
msgstr "Остановка профиля %1"
#: netctl.cpp:360 netctl.cpp:498
#: netctl.cpp:361 netctl.cpp:499
msgid "Stop all profiles"
msgstr "Остановить все профили"
#: netctl.cpp:380
#: netctl.cpp:381
msgid "Switch to profile %1"
msgstr "Переключение на профиль %1"
#: netctl.cpp:453
#: netctl.cpp:454
msgid "Start another profile"
msgstr "Запустить другой профиль"
#: netctl.cpp:454
#: netctl.cpp:455
msgid "Stop %1"
msgstr "Остановить %1"
#: netctl.cpp:455
#: netctl.cpp:456
msgid "Restart %1"
msgstr "Перезапустить %1"
#: netctl.cpp:457
#: netctl.cpp:458
msgid "Disable %1"
msgstr "Отключить %1"
#: netctl.cpp:459
#: netctl.cpp:460
msgid "Enable %1"
msgstr "Включить %1"
#: netctl.cpp:462 netctl.cpp:485
#: netctl.cpp:463 netctl.cpp:486
msgid "Start profile"
msgstr "Запустить профиль"
#: netctl.cpp:493
#: netctl.cpp:494
msgid "Stop profile"
msgstr "Остановить профиль"
#: netctl.cpp:503
#: netctl.cpp:504
msgid "Switch to profile"
msgstr "Переключить профиль"
#: netctl.cpp:511
#: netctl.cpp:512
msgid "Restart profile"
msgstr "Перезапустить профиль"
#: netctl.cpp:516
#: netctl.cpp:517
msgid "Enable profile"
msgstr "Включить профиль"
#: netctl.cpp:520
#: netctl.cpp:521
msgid "Show netctl-gui"
msgstr "Показать netctl-gui"
#: netctl.cpp:525
#: netctl.cpp:526
msgid "Show WiFi menu"
msgstr "Запустить WiFi-menu"
#: netctl.cpp:552
#: netctl.cpp:553
msgid "Start GUI"
msgstr "Запуск GUI"
#: netctl.cpp:563
#: netctl.cpp:564
msgid "Start WiFi menu"
msgstr "Запуск WiFi-menu"
#: netctl.cpp:603
#: netctl.cpp:604
msgid "Network is up"
msgstr "Сеть работает"
#: netctl.cpp:607
#: netctl.cpp:608
msgid "Network is down"
msgstr "Сеть не работает"
#: netctl.cpp:797
#: netctl.cpp:798
msgid ""
"Version %1\n"
"(build date %2)"
@ -118,73 +118,65 @@ msgstr ""
"Версия %1\n"
"(дата сборки %2)"
#: netctl.cpp:798
#: netctl.cpp:799
msgid "KDE widget which interacts with netctl."
msgstr "Виджет KDE, который взаимодействует с netctl."
#: netctl.cpp:799
#: netctl.cpp:800
msgid "Links:"
msgstr "Ссылки:"
#: netctl.cpp:800
#: netctl.cpp:801
msgid "Homepage"
msgstr "Домашняя страница"
#: netctl.cpp:801
#: netctl.cpp:802
msgid "Repository"
msgstr "Репозиторий"
#: netctl.cpp:802
#: netctl.cpp:803
msgid "Bugtracker"
msgstr "Багтрекер"
#: netctl.cpp:803
#: netctl.cpp:804
msgid "Translation issue"
msgstr "Тикет перевода"
#: netctl.cpp:804
#: netctl.cpp:805
msgid "AUR packages"
msgstr "Пакеты в AUR"
#: netctl.cpp:806
#: netctl.cpp:807
msgid "This software is licensed under %1"
msgstr "Данное приложение лицензировано под %1"
#: netctl.cpp:814
#: netctl.cpp:815
msgid "Translators: %1"
msgstr "Переводчики: %1"
#: netctl.cpp:815
#: netctl.cpp:816
msgid "This software uses: %1"
msgstr "Данное приложение использует: %1"
#: netctl.cpp:817
#: netctl.cpp:818
msgid "Netctl plasmoid"
msgstr "Netctl plasmoid"
#: netctl.cpp:818
#: netctl.cpp:819
msgid "Appearance"
msgstr "Внешний вид"
#: netctl.cpp:819
#: netctl.cpp:820
msgid "DataEngine"
msgstr "DataEngine"
#. i18n: file: about.ui:21
#. i18n: ectx: attribute (title), widget (QWidget, tab_About)
#: netctl.cpp:820 po/rc.cpp:3 rc.cpp:3
#: netctl.cpp:821
msgid "About"
msgstr "О программе"
#. i18n: file: about.ui:127
#. i18n: ectx: attribute (title), widget (QWidget, tab_ackn)
#: po/rc.cpp:6 rc.cpp:6
msgid "Acknowledgement"
msgstr "Благодарности"
#. i18n: file: appearance.ui:47
#. i18n: ectx: property (text), widget (QLabel, label_inactiveIcon)
#: po/rc.cpp:9 rc.cpp:9
#: po/rc.cpp:3 rc.cpp:3
msgid "Inactive icon"
msgstr "Иконка неактивного подключения"
@ -236,89 +228,89 @@ msgstr "Иконка неактивного подключения"
#. i18n: ectx: property (text), widget (QPushButton, pushButton_sudo)
#. i18n: file: widget.ui:282
#. i18n: ectx: property (text), widget (QPushButton, pushButton_wifi)
#: po/rc.cpp:12 po/rc.cpp:48 po/rc.cpp:60 po/rc.cpp:66 po/rc.cpp:72
#: po/rc.cpp:78 po/rc.cpp:87 po/rc.cpp:93 po/rc.cpp:99 po/rc.cpp:105
#: po/rc.cpp:111 po/rc.cpp:117 rc.cpp:12 rc.cpp:48 rc.cpp:60 rc.cpp:66
#: rc.cpp:72 rc.cpp:78 rc.cpp:87 rc.cpp:93 rc.cpp:99 rc.cpp:105 rc.cpp:111
#: rc.cpp:117
#: 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:15 rc.cpp:15
#: 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:18 rc.cpp:18
#: 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:21 rc.cpp:21
#: 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:24 rc.cpp:24
#: 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:27 rc.cpp:27
#: 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:30 rc.cpp:30
#: 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:33 rc.cpp:33
#: 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:36 rc.cpp:36
#: 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:39 rc.cpp:39
#: 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:42 rc.cpp:42
#: 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:45 rc.cpp:45
#: 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:51 rc.cpp:51
#: 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:54 rc.cpp:54
#: po/rc.cpp:48 rc.cpp:48
msgid "Set text align"
msgstr "Установите выравнивание текста"
@ -330,7 +322,7 @@ msgstr "Установите выравнивание текста"
#. i18n: ectx: property (text), widget (QLabel, label_netctl)
#. i18n: file: widget.ui:161
#. i18n: ectx: property (text), widget (QLabel, label_netctl)
#: po/rc.cpp:57 po/rc.cpp:96 rc.cpp:57 rc.cpp:96
#: po/rc.cpp:51 po/rc.cpp:90 rc.cpp:51 rc.cpp:90
msgid "Path to netctl"
msgstr "Путь к netctl"
@ -342,61 +334,61 @@ msgstr "Путь к netctl"
#. i18n: ectx: property (text), widget (QLabel, label_netctlAuto)
#. i18n: file: widget.ui:194
#. i18n: ectx: property (text), widget (QLabel, label_netctlAuto)
#: po/rc.cpp:63 po/rc.cpp:102 rc.cpp:63 rc.cpp:102
#: 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:69 rc.cpp:69
#: 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:75 rc.cpp:75
#: 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:81 rc.cpp:81
#: 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:84 rc.cpp:84
#: 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:90 rc.cpp:90
#: 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:108 rc.cpp:108
#: 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:114 rc.cpp:114
#: 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:120 rc.cpp:120
#: 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:123 rc.cpp:123
#: po/rc.cpp:117 rc.cpp:117
msgid ""
"$info - active profile information\n"
"$current - current profile name\n"
@ -418,16 +410,19 @@ msgstr ""
"$profiles - список профилей netctl\n"
"$status - статус текущего профиля (static/enabled)"
#: po/rc.cpp:132 rc.cpp:132
#: po/rc.cpp:126 rc.cpp:126
msgctxt "NAME OF TRANSLATORS"
msgid "Your names"
msgstr "Evgeniy Alekseev"
#: po/rc.cpp:133 rc.cpp:133
#: 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"

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -2,6 +2,7 @@
<qresource>
<!-- helper translations -->
<file>translations-helper/en.qm</file>
<file>translations-helper/ja.qm</file>
<file>translations-helper/ru.qm</file>
<!-- pony <3 -->
<file>pinkiepie</file>

View File

@ -2,9 +2,11 @@
<qresource>
<!-- gui translations -->
<file>translations/en.qm</file>
<file>translations/ja.qm</file>
<file>translations/ru.qm</file>
<!-- icons -->
<file>icon.png</file>
<file>icon-helper.png</file>
<file>wifi.png</file>
<file>network-idle-64x64.png</file>
<file>network-offline-64x64.png</file>

View File

@ -76,32 +76,52 @@
<translation>Build date: %1</translation>
</message>
<message>
<location filename="../../helper/src/messages.cpp" line="88"/>
<location filename="../../helper/src/messages.cpp" line="89"/>
<source>cmake flags</source>
<translation>cmake flags</translation>
</message>
<message>
<location filename="../../helper/src/messages.cpp" line="98"/>
<location filename="../../helper/src/messages.cpp" line="91"/>
<source>cmake properties</source>
<translation>cmake properties</translation>
</message>
<message>
<location filename="../../helper/src/messages.cpp" line="95"/>
<source>Components</source>
<translation>Components</translation>
</message>
<message>
<location filename="../../helper/src/messages.cpp" line="102"/>
<source>Additional components</source>
<translation>Additional components</translation>
</message>
<message>
<location filename="../../helper/src/messages.cpp" line="106"/>
<source>Project properties</source>
<translation>Project properties</translation>
</message>
<message>
<location filename="../../helper/src/messages.cpp" line="112"/>
<source>DBus configuration</source>
<translation>DBus configuration</translation>
</message>
<message>
<location filename="../../helper/src/messages.cpp" line="107"/>
<location filename="../../helper/src/messages.cpp" line="121"/>
<source>Documentation</source>
<translation>Documentation</translation>
</message>
<message>
<location filename="../../helper/src/messages.cpp" line="122"/>
<location filename="../../helper/src/messages.cpp" line="133"/>
<source>Version</source>
<translation>Version</translation>
</message>
<message>
<location filename="../../helper/src/messages.cpp" line="125"/>
<location filename="../../helper/src/messages.cpp" line="136"/>
<source>Author</source>
<translation>Author</translation>
</message>
<message>
<location filename="../../helper/src/messages.cpp" line="128"/>
<location filename="../../helper/src/messages.cpp" line="139"/>
<source>License</source>
<translation>License</translation>
</message>
@ -110,24 +130,28 @@
<translation type="vanished">The helper is running with EUID %1. Functions will not be available.</translation>
</message>
<message>
<location filename="../../helper/src/main.cpp" line="94"/>
<source>The helper is running with EUID %1. Some functions will not be available.</source>
<translation>The helper is running with EUID %1. Some functions will not be available.</translation>
<translation type="vanished">The helper is running with EUID %1. Some functions will not be available.</translation>
</message>
<message>
<location filename="../../helper/src/main.cpp" line="96"/>
<location filename="../../helper/src/main.cpp" line="95"/>
<source>The helper is running with EUID %1. Some functions may not be available.</source>
<translation>The helper is running with EUID %1. Some functions may not be available.</translation>
</message>
<message>
<location filename="../../helper/src/main.cpp" line="97"/>
<source>See security notes for more details.</source>
<translation>See security notes for more details.</translation>
</message>
<message>
<location filename="../../helper/src/main.cpp" line="135"/>
<location filename="../../helper/src/main.cpp" line="146"/>
<location filename="../../helper/src/main.cpp" line="136"/>
<location filename="../../helper/src/main.cpp" line="147"/>
<source>Replace existing session.</source>
<translation>Replace existing session.</translation>
</message>
<message>
<location filename="../../helper/src/main.cpp" line="140"/>
<location filename="../../helper/src/main.cpp" line="152"/>
<location filename="../../helper/src/main.cpp" line="141"/>
<location filename="../../helper/src/main.cpp" line="153"/>
<source>Restore existing session.</source>
<translation>Restore existing session.</translation>
</message>

Some files were not shown because too many files have changed in this diff Show More