Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Plasma applet for NetworkManager
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Plasma
Plasma applet for NetworkManager
Commits
f0b20f72
Commit
f0b20f72
authored
Nov 30, 2017
by
Jan Grulich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor improvements and coding style fixes
parent
34ed20f0
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
113 additions
and
119 deletions
+113
-119
mobile/CMakeLists.txt
mobile/CMakeLists.txt
+1
-2
mobile/package/contents/ui/ConnectionEditorDialog.qml
mobile/package/contents/ui/ConnectionEditorDialog.qml
+4
-7
mobile/package/contents/ui/IPDetailsSection.qml
mobile/package/contents/ui/IPDetailsSection.qml
+29
-12
mobile/package/contents/ui/NetworkDetailsView.qml
mobile/package/contents/ui/NetworkDetailsView.qml
+63
-26
mobile/package/contents/ui/ProxyDetailsSection.qml
mobile/package/contents/ui/ProxyDetailsSection.qml
+0
-51
mobile/package/contents/ui/RowItemDelegate.qml
mobile/package/contents/ui/RowItemDelegate.qml
+7
-7
mobile/package/contents/ui/Wifi.qml
mobile/package/contents/ui/Wifi.qml
+3
-6
mobile/package/metadata.desktop
mobile/package/metadata.desktop
+4
-5
mobile/wifi.desktop
mobile/wifi.desktop
+2
-3
No files found.
mobile/CMakeLists.txt
View file @
f0b20f72
install
(
FILES wifi.desktop DESTINATION
${
SERVICES_INSTALL_DIR
}
)
kpackage_install_package
(
package wifi kcms
)
kpackage_install_package
(
package wifi kcms
)
mobile/package/contents/ui/ConnectionEditorDialog.qml
View file @
f0b20f72
/*
*
* Copyright 2017 Martin Kacej <>
* Copyright 2017 Martin Kacej <m.kacej@atlas.sk>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
...
...
@@ -22,7 +20,6 @@
import
QtQuick
2.2
import
QtQuick
.
Controls
1.4
as
Controls
import
QtQuick
.
Layouts
1.2
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
import
org
.
kde
.
plasma
.
components
2.0
as
PlasmaComponents
import
org
.
kde
.
plasma
.
extras
2.0
as
PlasmaExtras
...
...
@@ -63,16 +60,16 @@ PlasmaExtras.ScrollArea {
}
}
IPDetailsSection
{
IPDetailsSection
{
visible
:
advancedOptionsSwitch
.
checked
}
ProxyDetailsSection
{
ProxyDetailsSection
{
visible
:
advancedOptionsSwitch
.
checked
}
}
function
save
(){
function
save
()
{
console
.
info
(
'
Connection saved
'
)
}
}
mobile/package/contents/ui/IPDetailsSection.qml
View file @
f0b20f72
/*
* Copyright 2017 Martin Kacej <m.kacej@atlas.sk>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2 or
* (at your option) any later version.
*
* This program 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 Library General Public License for more details
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import
QtQuick
2.2
import
QtQuick
.
Controls
1.4
as
Controls
import
QtQuick
.
Layouts
1.2
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
import
org
.
kde
.
plasma
.
components
2.0
as
PlasmaComponents
import
org
.
kde
.
plasma
.
extras
2.0
as
PlasmaExtras
ColumnLayout
{
property
var
adress
:
""
...
...
@@ -11,11 +28,11 @@ ColumnLayout{
spacing
:
units
.
gridUnit
PlasmaComponents.Label
{
PlasmaComponents.Label
{
text
:
i18n
(
"
IP Settings
"
)
}
PlasmaComponents.Switch
{
PlasmaComponents.Switch
{
id
:
manualIPCheckbox
checked
:
false
onCheckedChanged
:
{
...
...
@@ -23,32 +40,32 @@ ColumnLayout{
}
}
ColumnLayout
{
ColumnLayout
{
id
:
manuaIPSettings
anchors.top
:
manualIPCheckbox
.
bottom
visible
:
false
PlasmaComponents.Label
{
PlasmaComponents.Label
{
text
:
i18n
(
"
IP Address
"
)
}
Controls.TextField
{
Controls.TextField
{
placeholderText
:
i18n
(
"
193.168.1.128
"
)
text
:
adress
}
PlasmaComponents.Label
{
PlasmaComponents.Label
{
text
:
i18n
(
"
Gateway
"
)
}
Controls.TextField
{
Controls.TextField
{
placeholderText
:
i18n
(
"
192.168.1.1
"
)
}
PlasmaComponents.Label
{
PlasmaComponents.Label
{
text
:
i18n
(
"
Network prefix length
"
)
}
Controls.TextField
{
Controls.TextField
{
placeholderText
:
i18n
(
"
24
"
)
}
...
...
@@ -56,7 +73,7 @@ ColumnLayout{
text
:
i18n
(
"
DNS
"
)
}
Controls.TextField
{
Controls.TextField
{
placeholderText
:
i18n
(
"
8.8.8.8
"
)
}
}
...
...
mobile/package/contents/ui/NetworkDetailsView.qml
View file @
f0b20f72
/*
*
* Copyright 2017 Martin Kacej <>
* Copyright 2017 Martin Kacej <m.kacej@atlas.sk>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
...
...
@@ -21,34 +20,72 @@
import
QtQuick
2.2
import
QtQuick
.
Controls
1.4
as
Controls
import
QtQuick
.
Layouts
1.2
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
import
org
.
kde
.
plasma
.
components
2.0
as
PlasmaComponents
import
org
.
kde
.
plasma
.
extras
2.0
as
PlasmaExtras
PlasmaExtras.ScrollArea
{
property
var
details
property
var
signal_strength
:
0
property
var
signal_speed
:
0
property
var
ip_address
:
0
property
var
security
:
"
Unknown
"
property
alias
signal_strength
:
signalStrengthLabel
.
text
property
alias
signal_speed
:
linkSpeedLabel
.
text
property
alias
ip_address
:
securityLabel
.
text
property
alias
security
:
ipAddressLabel
.
text
Column
{
Column
{
Column
{
id
:
staticInfo
anchors.bottomMargin
:
units
.
gridUnit
PlasmaComponents.Label
{
text
:
i18n
(
"
<b>Strength: </b>
"
+
signal_strength
)
Row
{
spacing
:
units
.
gridUnit
/
2
PlasmaComponents.Label
{
font.weight
:
Font
.
Bold
text
:
i18n
(
"
Strength:
"
)
}
PlasmaComponents.Label
{
id
:
signalStrengthLabel
}
}
PlasmaComponents.Label
{
text
:
i18n
(
"
<b>Link Speed:</b>
"
+
signal_speed
)
Row
{
spacing
:
units
.
gridUnit
/
2
PlasmaComponents.Label
{
font.weight
:
Font
.
Bold
text
:
i18n
(
"
Link Speed:
"
)
}
PlasmaComponents.Label
{
id
:
linkSpeedLabel
}
}
PlasmaComponents.Label
{
text
:
i18n
(
"
<b>Security: </b>
"
+
security
)
Row
{
spacing
:
units
.
gridUnit
/
2
PlasmaComponents.Label
{
font.weight
:
Font
.
Bold
text
:
i18n
(
"
Security:
"
)
}
PlasmaComponents.Label
{
id
:
securityLabel
}
}
PlasmaComponents.Label
{
text
:
i18n
(
"
<b>IP Address: </b>
"
+
ip_address
)
Row
{
spacing
:
units
.
gridUnit
/
2
PlasmaComponents.Label
{
font.weight
:
Font
.
Bold
text
:
i18n
(
"
IP Address:
"
)
}
PlasmaComponents.Label
{
id
:
ipAddressLabel
}
}
}
...
...
@@ -63,14 +100,10 @@ PlasmaExtras.ScrollArea{
}
}
IPDetailsSection
{
IPDetailsSection
{
id
:
detailsIP
visible
:
advancedOptionsSwitch
.
checked
}
ProxyDetailsSection
{
visible
:
advancedOptionsSwitch
.
checked
}
}
function
fillDetails
()
{
...
...
@@ -79,13 +112,17 @@ PlasmaExtras.ScrollArea{
console
.
info
(
details
[
i
])
d
[
details
[(
i
*
2
)]]
=
details
[(
i
*
2
)
+
1
]
}
if
(
d
[
'
Access point (SSID)
'
])
detailsDialog
.
titleText
=
d
[
'
Access point (SSID)
'
]
if
(
d
[
'
Access point (SSID)
'
])
detailsDialog
.
titleText
=
d
[
'
Access point (SSID)
'
]
signal_strength
=
d
[
'
Signal strength
'
]
if
(
d
[
'
IPv4 Address
'
])
ip_address
=
detailsIP
.
adress
=
d
[
'
IPv4 Address
'
]
if
(
d
[
'
Security type
'
])
security
=
d
[
'
Security type
'
]
if
(
d
[
'
Connection speed
'
])
signal_speed
=
d
[
'
Connection speed
'
]
if
(
d
[
'
IPv4 Address
'
])
ip_address
=
detailsIP
.
adress
=
d
[
'
IPv4 Address
'
]
if
(
d
[
'
Security type
'
])
security
=
d
[
'
Security type
'
]
if
(
d
[
'
Connection speed
'
])
signal_speed
=
d
[
'
Connection speed
'
]
}
function
clearDetails
(){
function
clearDetails
()
{
signal_speed
=
signal_strength
=
ip_address
=
0
security
=
"
Unknown
"
detailsIP
.
adress
=
detailsIP
.
gateway
=
''
...
...
mobile/package/contents/ui/ProxyDetailsSection.qml
deleted
100644 → 0
View file @
34ed20f0
import
QtQuick
2.2
import
QtQuick
.
Controls
1.4
as
Controls
import
QtQuick
.
Layouts
1.2
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
import
org
.
kde
.
plasma
.
components
2.0
as
PlasmaComponents
import
org
.
kde
.
plasma
.
extras
2.0
as
PlasmaExtras
ColumnLayout
{
spacing
:
units
.
gridUnit
PlasmaComponents.Label
{
text
:
i18n
(
"
Proxy settings
"
)
}
PlasmaComponents.CheckBox
{
id
:
manualProxyCheck
checked
:
false
onCheckedChanged
:
{
manuaProxySettings
.
visible
=
checked
}
}
ColumnLayout
{
id
:
manuaProxySettings
anchors.top
:
manualProxyCheck
.
bottom
visible
:
false
PlasmaComponents.Label
{
text
:
i18n
(
"
Proxy hostname
"
)
}
Controls.TextField
{
placeholderText
:
i18n
(
"
my.proxy.com
"
)
}
PlasmaComponents.Label
{
text
:
i18n
(
"
Proxy port
"
)
}
Controls.TextField
{
placeholderText
:
i18n
(
"
8080
"
)
}
PlasmaComponents.Label
{
text
:
i18n
(
"
Bypass proxy for
"
)
}
Controls.TextField
{
placeholderText
:
i18n
(
"
example.com,mytest.com
"
)
}
}
}
mobile/package/contents/ui/RowItemDelegate.qml
View file @
f0b20f72
/*
*
* Copyright 2017 Martin Kacej <>
* Copyright 2017 Martin Kacej <m.kacej@atlas.sk>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
...
...
@@ -26,12 +25,12 @@ import org.kde.plasma.components 2.0 as PlasmaComponents
import
org
.
kde
.
plasma
.
networkmanagement
0.2
as
PlasmaNM
import
org
.
kde
.
kirigami
1.0
as
Kirigami
Kirigami.SwipeListItem
{
Kirigami.SwipeListItem
{
width
:
parent
.
width
enabled
:
true
backgroundColor
:
theme
.
backgroundColor
Item
{
Item
{
height
:
connectionSvgIcon
.
height
width
:
parent
.
width
...
...
@@ -84,7 +83,8 @@ Kirigami.SwipeListItem{
Kirigami.Action
{
iconName
:
"
configure-small
"
onTriggered
:
{
if
(
ConnectionDetails
)
networkDetailsViewContent
.
details
=
ConnectionDetails
if
(
ConnectionDetails
)
networkDetailsViewContent
.
details
=
ConnectionDetails
if
(
ConnectionDetails
[
1
]
!==
""
)
{
detailsDialog
.
titleText
=
ItemUniqueName
}
else
{
...
...
@@ -102,10 +102,10 @@ Kirigami.SwipeListItem{
}
]
function
connect
(){
function
connect
()
{
console
.
info
(
ConnectionDetails
[
1
]
+
'
trying to connect
'
)
}
function
forgetNetwork
(){
function
forgetNetwork
()
{
console
.
info
(
ConnectionDetails
[
1
]
+
'
trying to forget
'
)
}
}
mobile/package/contents/ui/Wifi.qml
View file @
f0b20f72
/*
*
* Copyright 2017 Martin Kacej <>
* Copyright 2017 Martin Kacej <m.kacej@atlas.sk>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
...
...
@@ -21,10 +20,8 @@
import
QtQuick
2.0
import
QtQuick
.
Controls
1.4
as
Controls
import
QtQuick
.
Layouts
1.2
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
import
org
.
kde
.
plasma
.
components
2.0
as
PlasmaComponents
import
org
.
kde
.
plasma
.
extras
2.0
as
PlasmaExtras
import
org
.
kde
.
active
.
settings
2.0
as
ActiveSettings
import
org
.
kde
.
plasma
.
networkmanagement
0.2
as
PlasmaNM
import
org
.
kde
.
kirigami
1.0
as
Kirigami
...
...
@@ -73,7 +70,7 @@ Item {
Layout.fillWidth
:
true
}
Controls.Switch
{
Controls.Switch
{
id
:
wifiSwitchButton
checked
:
enabled
&&
enabledConnections
.
wirelessEnabled
enabled
:
enabledConnections
.
wirelessHwEnabled
...
...
@@ -150,7 +147,7 @@ Item {
connectionEditorDialog
.
close
()
}
}
PlasmaComponents.Button
{
PlasmaComponents.Button
{
anchors.right
:
parent
.
right
text
:
'
Cancel
'
onClicked
:
connectionEditorDialog
.
close
()
...
...
mobile/package/metadata.desktop
View file @
f0b20f72
[Desktop Entry]
Name=Wifi settings
Comment=Network settings
Name=Wi-Fi
Comment=Wireless network setting
Encoding=UTF-8
Type=Service
Icon=network-wireless-symbolic
...
...
@@ -10,8 +9,8 @@ X-KDE-PluginInfo-Author=Martin Kacej
X-KDE-PluginInfo-Email=m.kacej@atlas.sk
X-KDE-PluginInfo-Name=wifi
X-KDE-PluginInfo-Version=0.1
X-KDE-PluginInfo-Website=http
://plasma-active.org
X-KDE-PluginInfo-Category=
Online Services
X-KDE-PluginInfo-Website=http
s://plasma-mobile.org/
X-KDE-PluginInfo-Category=
System Information
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=true
...
...
mobile/wifi.desktop
View file @
f0b20f72
[Desktop Entry]
Name=
Network Settings
Comment=Wi
fi, Bluetooth, Mobile Networks Settings
Name=
Wi-Fi
Comment=Wi
reless network setting
Icon=network-wireless-symbolic
Exec=plasma-settings -m wifi
...
...
@@ -8,7 +8,6 @@ Exec=plasma-settings -m wifi
Type=Service
X-KDE-ServiceTypes=KCModule
#X-KDE-Library=kcm_mobile_power
X-KDE-ParentApp=kcontrol
X-KDE-FormFactors=handset,tablet,mediacenter
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment