Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma applet for NetworkManager
Commits
aedd8cc1
Commit
aedd8cc1
authored
Oct 16, 2013
by
Jan Grulich
Browse files
Merge branch master
parents
26abf446
ad87480a
Changes
106
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
aedd8cc1
project
(
plasma-n
m
)
project
(
plasma-n
etworkmanagement
)
cmake_minimum_required
(
VERSION 2.6
)
...
...
@@ -8,10 +8,23 @@ find_package(NetworkManager "0.9.8" REQUIRED)
include
(
FindPkgConfig
)
include
(
KDE4Defaults
)
pkg_check_modules
(
MODEMMANAGERQT REQUIRED ModemManagerQt
)
if
(
NOT MODEMMANAGERQT_FOUND
)
message
(
FATAL_ERROR
"ERROR: ModemManagerQt not found. http://projects.kde.org/libmm-qt"
)
endif
(
NOT MODEMMANAGERQT_FOUND
)
if
(
DISABLE_MODEMMANAGER_SUPPORT
)
message
(
STATUS
"Disabling ModemManager support"
)
set
(
WITH_MODEMMANAGER_SUPPORT 0
)
else
()
pkg_check_modules
(
MODEMMANAGERQT ModemManagerQt
)
if
(
MODEMMANAGERQT_FOUND
)
message
(
STATUS
"Enabling ModemManager support"
)
set
(
WITH_MODEMMANAGER_SUPPORT 1
)
if
(
${
MODEMMANAGERQT_VERSION
}
VERSION_GREATER 0.7.990
)
set
(
MODEMMANAGERQT_ONE 1
)
endif
()
else
()
message
(
STATUS
"ModemManagerQt not found"
)
set
(
WITH_MODEMMANAGER_SUPPORT 0
)
endif
()
endif
()
pkg_check_modules
(
NETWORKMANAGERQT REQUIRED NetworkManagerQt
)
if
(
NOT NETWORKMANAGERQT_FOUND
)
...
...
@@ -20,7 +33,6 @@ endif (NOT NETWORKMANAGERQT_FOUND)
set
(
KDE_NETWORK_VERSION
"0.9.3.1"
)
set
(
PLASMA_NM_VERSION
"0.9.3.1"
)
set
(
MODEMMANAGERQT_VERSION
${
MODEMMANAGERQT_VERSION
}
)
configure_file
(
config.h.cmake
${
CMAKE_CURRENT_BINARY_DIR
}
/config.h
)
...
...
@@ -33,6 +45,7 @@ pkg_check_modules(QTNETWORK REQUIRED QtNetwork)
pkg_check_modules
(
NETWORKMANAGER REQUIRED NetworkManager
)
add_definitions
(
-DWITH_MODEMMANAGER_SUPPORT=
${
WITH_MODEMMANAGER_SUPPORT
}
${
QT_DEFINITIONS
}
${
KDE_DEFINITIONS
}
${
NETWORKMANAGERQT_CFLAGS_OTHER
}
...
...
@@ -45,7 +58,10 @@ include_directories(${CMAKE_SOURCE_DIR}
${
CMAKE_CURRENT_SOURCE_DIR
}
/lib
${
CMAKE_CURRENT_SOURCE_DIR
}
/lib/editor
${
QTNETWORK_INCLUDE_DIRS
}
${
MODEMMANAGERQT_INCLUDE_DIRS
}
${
MODEMMANAGER_INCLUDE_DIRS
}
if
(
MODEMMANAGERQT_FOUND
)
${
MODEMMANAGERQT_INCLUDE_DIRS
}
endif
()
${
NETWORKMANAGERQT_INCLUDE_DIRS
}
${
NETWORKMANAGER_INCLUDE_DIRS
}
${
KDE4_INCLUDES
}
)
...
...
Messages.sh
View file @
aedd8cc1
#!/usr/bin/env bash
$EXTRACTRC
`
find declarative-plugins
-name
'*.ui'
-o
-name
'*.rc'
`
`
find settings/details
-name
'*.ui'
-o
-name
'*.rc'
`
>>
rc.cpp
$XGETTEXT
rc.cpp
`
find applet
-name
'*.cpp'
`
`
find declarative-plugins
-name
'*.cpp'
`
`
find lib
-name
'*.cpp'
|
grep
-v
'lib/editor'
`
`
find settings/details
-name
'*.cpp'
`
-o
$podir
/plasma_applet_org.kde.
plasma-nm
.pot
$XGETTEXT
`
find applet
-name
'*.qml'
`
-j
-L
Java
-o
$podir
/plasma_applet_org.kde.
plasma-nm
.pot
$EXTRACTRC
`
find declarative-plugins
-name
'*.ui'
-o
-name
'*.rc'
`
`
find settings/details
-name
'*.ui'
-o
-name
'*.rc'
`
`
find applet
-name
'*.ui'
`
>>
rc.cpp
$XGETTEXT
rc.cpp
`
find applet
-name
'*.cpp'
`
`
find declarative-plugins
-name
'*.cpp'
`
`
find lib
-name
'*.cpp'
|
grep
-v
'lib/editor'
`
`
find settings/details
-name
'*.cpp'
`
-o
$podir
/plasma_applet_org.kde.
networkmanagement
.pot
$XGETTEXT
`
find applet
-name
'*.qml'
`
-j
-L
Java
-o
$podir
/plasma_applet_org.kde.
networkmanagement
.pot
rm
-f
rc.cpp
README
0 → 100644
View file @
aedd8cc1
Plasma-nm
========================
Plasma applet written in QML for managing network connections
Dependencies:
-------------
- libnm-qt (NM/0.9 branch)
→ requires NetworkManager 0.9.8+
Optional dependencies:
---------------------
- libmm-qt (MM/0.5 branch)
→ requires ModemManager 0.5 - 0.6 (ModemManager 0.7+ is not supported yet)
Plasma-nm is compiled with ModemManager support by default when libmm-qt is found,
when you want to explicitly disable ModemManager support, use -DDISABLE_MODEMMANAGER_SUPPORT=true cmake parameter.
Compiling:
----------
mkdir build
cd build
cmake ../ -DCMAKE_INSTALL_PREFIX=/usr [-DDISABLE_MODEMMANAGER_SUPPORT=true]
make
# As root:
make install
BUGS:
-----
Submit bugs and feature requests to KDE bugzilla, product plasma-nm:
https://bugs.kde.org/describecomponents.cgi?product=plasma-nm
NetworkManager specification:
------------------------------
http://projects.gnome.org/NetworkManager/developers/api/09/spec.html
http://projects.gnome.org/NetworkManager/developers/api/09/ref-settings.html
active/setting/CMakeLists.txt
View file @
aedd8cc1
...
...
@@ -14,7 +14,7 @@ set(networksettings_SRCS
kde4_add_plugin
(
active_settings_network
${
networksettings_SRCS
}
)
target_link_libraries
(
active_settings_network
NetworkManagerQt
plasman
m
-internal
plasman
etworkmanagement
-internal
${
KDE4_PLASMA_LIBS
}
${
QT_QTNETWORK_LIBRARY
}
${
KDE4_KDEUI_LIBS
}
...
...
active/setting/package/contents/ui/ConnectionList.qml
View file @
aedd8cc1
...
...
@@ -20,7 +20,7 @@
import
QtQuick
1.1
import
org
.
kde
.
plasma
.
components
0.1
as
PlasmaComponents
import
org
.
kde
.
plasmanm
0.1
as
PlasmaNm
import
org
.
kde
.
networkmanagement
0.1
as
PlasmaNm
import
org
.
kde
.
active
.
settings
0.1
Item
{
...
...
active/setting/package/contents/ui/ConnectionModelItem.qml
View file @
aedd8cc1
...
...
@@ -22,7 +22,7 @@ import QtQuick 1.1
import
org
.
kde
.
qtextracomponents
0.1
import
org
.
kde
.
plasma
.
components
0.1
as
PlasmaComponents
import
org
.
kde
.
plasma
.
core
0.1
as
PlasmaCore
import
org
.
kde
.
plasmanm
0.1
as
PlasmaNm
import
org
.
kde
.
networkmanagement
0.1
as
PlasmaNm
Item
{
property
alias
checked
:
connectionItem
.
checked
;
...
...
@@ -44,8 +44,8 @@ Item {
right
:
parent
.
right
;
}
color
:
"
green
"
;
opacity
:
itemConnected
?
0.2
:
0.1
;
visible
:
itemConnect
ed
||
itemConnec
ting
;
opacity
:
itemConnect
ionState
==
PlasmaNm
.
Enums
.
Activat
ed
?
0.2
:
0.1
;
visible
:
itemConnect
ionState
==
PlasmaNm
.
Enums
.
Activated
||
itemConnectionState
==
PlasmaNm
.
Enums
.
Activa
ting
;
}
PlasmaComponents.ListItem
{
...
...
@@ -62,7 +62,7 @@ Item {
id
:
svgIcons
;
multipleImages
:
true
;
imagePath
:
"
icons/plasma-n
m
"
;
imagePath
:
"
icons/plasma-n
etworkmanagement
"
;
}
Item
{
...
...
@@ -119,7 +119,7 @@ Item {
width
:
48
;
height
:
48
;
icon
:
QIcon
(
"
object-locked
"
);
visible
:
itemSecure
;
visible
:
itemSecur
ityType
!=
PlasmaNm
.
Enums
.
Non
e
;
}
PlasmaComponents.Label
{
...
...
active/setting/package/contents/ui/ConnectionSettings.qml
View file @
aedd8cc1
...
...
@@ -20,7 +20,7 @@
import
QtQuick
1.1
import
org
.
kde
.
plasma
.
components
0.1
as
PlasmaComponents
import
org
.
kde
.
plasmanm
0.1
as
PlasmaNm
import
org
.
kde
.
networkmanagement
0.1
as
PlasmaNm
import
org
.
kde
.
active
.
settings
0.1
Item
{
...
...
@@ -91,7 +91,7 @@ Item {
rightMargin
:
5
;
}
text
:
if
(
selectedItemModel
)
{
if
(
selectedItemModel
.
itemConnect
ed
||
selectedItemModel
.
itemConnec
ting
)
{
if
(
selectedItemModel
.
itemConnect
ionState
==
PlasmaNm
.
Enums
.
Activated
||
selectedItemModel
.
itemConnectionState
==
PlasmaNm
.
Enums
.
Activa
ting
)
{
i18n
(
"
Disconnect
"
);
}
else
{
i18n
(
"
Connect
"
);
...
...
@@ -111,7 +111,7 @@ Item {
onClicked
:
{
if
(
selectedItemModel
)
{
if
(
!
selectedItemModel
.
itemConnected
&&
!
selectedItemModel
.
itemConnecting
)
{
if
(
selectedItemModel
.
itemConnect
ionState
!=
PlasmaNm
.
Enums
.
Activat
ed
&&
selectedItemModel
.
itemConnecti
onState
!=
PlasmaNm
.
Enums
.
Activati
ng
)
{
if
(
selectedItemModel
.
itemUuid
)
{
handler
.
activateConnection
(
selectedItemModel
.
itemConnectionPath
,
selectedItemModel
.
itemDevicePath
,
selectedItemModel
.
itemSpecificPath
);
}
else
{
...
...
@@ -120,7 +120,7 @@ Item {
connectionSettingsHandler
.
addAndActivateConnection
(
map
,
selectedItemModel
.
itemDevicePath
,
selectedItemModel
.
itemSpecificPath
);
}
}
else
{
handler
.
deactivateConnection
(
selectedItemModel
.
itemConnectionPath
);
handler
.
deactivateConnection
(
selectedItemModel
.
itemConnectionPath
,
selectedItemModel
.
itemDevicePath
);
}
}
}
...
...
@@ -165,7 +165,7 @@ Item {
var
wirelessMap
=
[];
wirelessMap
[
"
ssid
"
]
=
selectedItemModel
.
itemSsid
;
var
wirelessSecurityMap
=
[];
if
(
selectedItemModel
.
itemSecure
)
{
if
(
selectedItemModel
.
itemSecur
ityType
!=
PlasmaNm
.
Enums
.
Non
e
)
{
// StaticWep
if
(
selectedItemModel
.
itemSecurityType
==
PlasmaNm
.
Enums
.
StaticWep
)
{
wirelessSecurityMap
[
"
key-mgmt
"
]
=
"
none
"
;
...
...
active/setting/package/contents/ui/GsmSettingWidget.qml
View file @
aedd8cc1
...
...
@@ -21,7 +21,7 @@
import
QtQuick
1.1
import
org
.
kde
.
plasma
.
components
0.1
as
PlasmaComponents
import
org
.
kde
.
plasma
.
extras
0.1
as
PlasmaExtras
import
org
.
kde
.
plasmanm
0.1
as
PlasmaNm
import
org
.
kde
.
networkmanagement
0.1
as
PlasmaNm
Item
{
id
:
gsmSettingWidget
;
...
...
active/setting/package/contents/ui/GsmSettings.qml
View file @
aedd8cc1
...
...
@@ -20,7 +20,7 @@
import
QtQuick
1.1
import
org
.
kde
.
plasma
.
extras
0.1
as
PlasmaExtras
import
org
.
kde
.
plasmanm
0.1
as
PlasmaNm
import
org
.
kde
.
networkmanagement
0.1
as
PlasmaNm
PlasmaExtras.ScrollArea
{
...
...
active/setting/package/contents/ui/Ipv4SettingWidget.qml
View file @
aedd8cc1
...
...
@@ -21,7 +21,7 @@
import
QtQuick
1.1
import
org
.
kde
.
plasma
.
components
0.1
as
PlasmaComponents
import
org
.
kde
.
plasma
.
extras
0.1
as
PlasmaExtras
import
org
.
kde
.
plasmanm
0.1
as
PlasmaNm
import
org
.
kde
.
networkmanagement
0.1
as
PlasmaNm
Item
{
id
:
ipv4SettingWidget
;
...
...
active/setting/package/contents/ui/NetworkSettings.qml
View file @
aedd8cc1
...
...
@@ -25,7 +25,7 @@ import org.kde.plasma.extras 0.1 as PlasmaExtras
import
org
.
kde
.
plasma
.
graphicswidgets
0.1
as
PlasmaWidgets
import
org
.
kde
.
plasma
.
mobilecomponents
0.1
as
MobileComponents
import
org
.
kde
.
active
.
settings
0.1
import
org
.
kde
.
plasmanm
0.1
as
PlasmaNm
import
org
.
kde
.
networkmanagement
0.1
as
PlasmaNm
Item
{
id
:
networkModule
;
...
...
active/setting/package/contents/ui/WiredSettings.qml
View file @
aedd8cc1
...
...
@@ -20,7 +20,7 @@
import
QtQuick
1.1
import
org
.
kde
.
plasma
.
extras
0.1
as
PlasmaExtras
import
org
.
kde
.
plasmanm
0.1
as
PlasmaNm
import
org
.
kde
.
networkmanagement
0.1
as
PlasmaNm
PlasmaExtras.ScrollArea
{
...
...
active/setting/package/contents/ui/WirelessSecuritySettingWidget.qml
View file @
aedd8cc1
...
...
@@ -21,7 +21,7 @@
import
QtQuick
1.1
import
org
.
kde
.
plasma
.
components
0.1
as
PlasmaComponents
import
org
.
kde
.
plasma
.
extras
0.1
as
PlasmaExtras
import
org
.
kde
.
plasmanm
0.1
as
PlasmaNm
import
org
.
kde
.
networkmanagement
0.1
as
PlasmaNm
Item
{
id
:
wirelessSecuritySettingWidget
;
...
...
active/setting/package/contents/ui/WirelessSettingWidget.qml
View file @
aedd8cc1
...
...
@@ -21,7 +21,7 @@
import
QtQuick
1.1
import
org
.
kde
.
plasma
.
components
0.1
as
PlasmaComponents
import
org
.
kde
.
plasma
.
extras
0.1
as
PlasmaExtras
import
org
.
kde
.
plasmanm
0.1
as
PlasmaNm
import
org
.
kde
.
networkmanagement
0.1
as
PlasmaNm
Item
{
id
:
wirelessSettingWidget
;
...
...
active/setting/package/contents/ui/WirelessSettings.qml
View file @
aedd8cc1
...
...
@@ -20,7 +20,7 @@
import
QtQuick
1.1
import
org
.
kde
.
plasma
.
extras
0.1
as
PlasmaExtras
import
org
.
kde
.
plasmanm
0.1
as
PlasmaNm
import
org
.
kde
.
networkmanagement
0.1
as
PlasmaNm
PlasmaExtras.ScrollArea
{
...
...
applet/CMakeLists.txt
View file @
aedd8cc1
...
...
@@ -2,7 +2,8 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/declarative/metadata.desktop.cmake
${
CMAKE_CURRENT_BINARY_DIR
}
/declarative/metadata.desktop
@ONLY
)
install
(
DIRECTORY declarative/contents DESTINATION
${
DATA_INSTALL_DIR
}
/plasma/plasmoids/org.kde.plasma-nm
)
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/declarative/metadata.desktop DESTINATION
${
DATA_INSTALL_DIR
}
/plasma/plasmoids/org.kde.plasma-nm
)
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/declarative/metadata.desktop DESTINATION
${
SERVICES_INSTALL_DIR
}
RENAME plasma-applet-nm.desktop
)
install
(
FILES icons/plasma-nm.svgz DESTINATION
${
DATA_INSTALL_DIR
}
/desktoptheme/default/icons/
)
install
(
DIRECTORY declarative/contents DESTINATION
${
DATA_INSTALL_DIR
}
/plasma/plasmoids/org.kde.networkmanagement
)
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/declarative/metadata.desktop DESTINATION
${
DATA_INSTALL_DIR
}
/plasma/plasmoids/org.kde.networkmanagement
)
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/declarative/metadata.desktop DESTINATION
${
SERVICES_INSTALL_DIR
}
RENAME plasma-applet-networkmanagement.desktop
)
add_subdirectory
(
icons
)
\ No newline at end of file
applet/declarative/contents/ui/CompactRepresentation.qml
View file @
aedd8cc1
...
...
@@ -22,7 +22,7 @@ import QtQuick 1.1
import
org
.
kde
.
qtextracomponents
0.1
import
org
.
kde
.
plasma
.
core
0.1
as
PlasmaCore
import
org
.
kde
.
plasma
.
components
0.1
as
PlasmaComponents
import
org
.
kde
.
plasmanm
0.1
as
PlasmaN
m
import
org
.
kde
.
networkmanagement
0.1
as
PlasmaN
M
Item
{
id
:
panelIconWidget
;
...
...
@@ -31,7 +31,7 @@ Item {
id
:
svgIcons
;
multipleImages
:
true
;
imagePath
:
"
icons/plasma-n
m
"
;
imagePath
:
"
icons/plasma-n
etworkmanagement
"
;
}
PlasmaCore.SvgItem
{
...
...
@@ -69,7 +69,7 @@ Item {
visible
:
running
;
}
PlasmaN
m
.NetworkStatus
{
PlasmaN
M
.NetworkStatus
{
id
:
networkStatus
;
onSetTooltip
:
{
...
...
@@ -91,7 +91,7 @@ Item {
}
}
PlasmaN
m
.ConnectionIcon
{
PlasmaN
M
.ConnectionIcon
{
id
:
connectionIconProvider
;
onHideConnectingIndicator
:
{
...
...
applet/declarative/contents/ui/ConnectionItem.qml
View file @
aedd8cc1
...
...
@@ -22,7 +22,7 @@ import QtQuick 1.1
import
org
.
kde
.
qtextracomponents
0.1
import
org
.
kde
.
plasma
.
components
0.1
as
PlasmaComponents
import
org
.
kde
.
plasma
.
core
0.1
as
PlasmaCore
import
org
.
kde
.
plasmanm
0.1
as
PlasmaNM
import
org
.
kde
.
networkmanagement
0.1
as
PlasmaNM
PlasmaComponents.ListItem
{
id
:
connectionItem
;
...
...
@@ -36,22 +36,18 @@ PlasmaComponents.ListItem {
(
!
connectionView
.
unknownExpanded
&&
itemSection
==
i18n
(
"
Unknown connections
"
))
property
bool
predictableWirelessPassword
:
!
itemUuid
&&
itemType
==
PlasmaNM
.
Enums
.
Wireless
&&
itemSecure
&&
itemSecurityType
!=
PlasmaNM
.
Enums
.
DynamicWep
&&
itemSecurityType
!=
PlasmaNM
.
Enums
.
LEAP
&&
itemSecurityType
!=
PlasmaNM
.
Enums
.
WpaEap
&&
itemSecurityType
!=
PlasmaNM
.
Enums
.
Wpa2Eap
;
itemSecur
ityType
!=
PlasmaNM
.
Enums
.
Non
e
&&
itemSecurityType
!=
PlasmaNM
.
Enums
.
DynamicWep
&&
itemSecurityType
!=
PlasmaNM
.
Enums
.
LEAP
&&
itemSecurityType
!=
PlasmaNM
.
Enums
.
WpaEap
&&
itemSecurityType
!=
PlasmaNM
.
Enums
.
Wpa2Eap
;
property
int
defaultCheckboxHeight
:
theme
.
defaultFont
.
mSize
.
height
*
1.6
+
buttonPadding
.
margins
.
top
;
signal
itemExpanded
(
string
connectionPath
,
bool
itemExpanded
);
signal
itemExpanded
(
string
itemUni
,
bool
itemExpanded
);
enabled
:
true
height
:
theme
.
defaultFont
.
mSize
.
height
*
2.6
+
((
connectionItemSettings
.
status
!=
Loader
.
Ready
||
!
expanded
)
?
0
:
connectionItemSettings
.
item
.
childrenRect
.
height
+
padding
.
margins
.
top
);
onClicked
:
{
if
(
itemUuid
)
{
itemExpanded
(
itemConnectionPath
,
!
expanded
);
}
else
{
itemExpanded
(
itemName
,
!
expanded
);
}
itemExpanded
(
itemUni
,
!
expanded
);
}
Item
{
...
...
@@ -68,7 +64,7 @@ PlasmaComponents.ListItem {
id
:
svgIcons
;
multipleImages
:
true
;
imagePath
:
"
icons/plasma-n
m
"
;
imagePath
:
"
icons/plasma-n
etworkmanagement
"
;
}
Item
{
...
...
@@ -100,7 +96,7 @@ PlasmaComponents.ListItem {
right
:
parent
.
right
;
}
icon
:
QIcon
(
"
object-locked
"
);
visible
:
itemSecure
;
visible
:
itemSecur
ityType
!=
PlasmaNM
.
Enums
.
Non
e
;
}
}
...
...
@@ -125,8 +121,8 @@ PlasmaComponents.ListItem {
}
text
:
itemName
;
elide
:
Text
.
ElideRight
;
font.weight
:
itemConnected
?
Font
.
DemiBold
:
Font
.
Normal
;
font.italic
:
itemConnecting
?
true
:
false
;
font.weight
:
itemConnect
ionState
==
PlasmaNM
.
Enums
.
Activat
ed
?
Font
.
DemiBold
:
Font
.
Normal
;
font.italic
:
itemConnecti
onState
==
PlasmaNM
.
Enums
.
Activati
ng
?
true
:
false
;
}
MouseEventListener
{
...
...
@@ -142,11 +138,7 @@ PlasmaComponents.ListItem {
onClicked
:
{
if
(
!
expanded
)
{
if
(
itemUuid
)
{
itemExpanded
(
itemConnectionPath
,
!
expanded
);
}
else
{
itemExpanded
(
itemName
,
!
expanded
);
}
itemExpanded
(
itemUni
,
!
expanded
);
}
else
{
if
(
configureButton
.
active
)
{
detailsView
=
!
detailsView
...
...
@@ -164,7 +156,7 @@ PlasmaComponents.ListItem {
verticalCenter
:
parent
.
verticalCenter
;
rightMargin
:
padding
.
margins
.
right
;
}
running
:
itemConnecting
;
running
:
itemConnecti
onState
==
PlasmaNM
.
Enums
.
Activati
ng
;
visible
:
running
;
}
...
...
@@ -215,7 +207,7 @@ PlasmaComponents.ListItem {
left
:
parent
.
left
;
right
:
parent
.
right
;
}
visible
:
(
itemDevicePath
&&
itemConnected
&&
itemType
!=
PlasmaNM
.
Enums
.
Vpn
)
visible
:
(
itemDevicePath
&&
itemConnect
ionState
==
PlasmaNM
.
Enums
.
Activat
ed
&&
itemType
!=
PlasmaNM
.
Enums
.
Vpn
)
PlasmaNM.TrafficMonitor
{
anchors.fill
:
parent
;
...
...
@@ -225,21 +217,17 @@ PlasmaComponents.ListItem {
PlasmaComponents.Button
{
id
:
disconnectButton
;
anchors
{
horizontalCenter
:
parent
.
horizontalCenter
;
top
:
trafficMonitor
.
bottom
;
}
text
:
i18n
(
"
Disconnect
"
);
onClicked
:
{
if
(
itemUuid
)
{
itemExpanded
(
itemConnectionPath
,
false
);
}
else
{
itemExpanded
(
itemName
,
false
);
}
itemExpanded
(
itemUni
,
false
);
handler
.
deactivateConnection
(
itemConnectionPath
);
handler
.
deactivateConnection
(
itemConnectionPath
,
itemDevicePath
);
}
}
}
...
...
@@ -306,13 +294,9 @@ PlasmaComponents.ListItem {
text
:
i18n
(
"
Connect
"
);
onClicked
:
{
if
(
itemUuid
)
{
itemExpanded
(
itemConnectionPath
,
false
);
}
else
{
itemExpanded
(
itemName
,
false
);
}
itemExpanded
(
itemUni
,
false
);
if
(
!
itemConnected
&&
!
itemConnecting
)
{
if
(
itemConnect
ionState
!=
PlasmaNM
.
Enums
.
Activat
ed
&&
itemConnecti
onState
!=
PlasmaNM
.
Enums
.
Activati
ng
)
{
if
(
itemUuid
)
{
handler
.
activateConnection
(
itemConnectionPath
,
itemDevicePath
,
itemSpecificPath
);
}
else
{
...
...
@@ -368,9 +352,10 @@ PlasmaComponents.ListItem {
topMargin
:
padding
.
margins
.
top
;
}
text
:
i18n
(
"
Edit connection
"
);
enabled
:
itemUuid
;
onClicked
:
{
itemExpanded
(
item
ConnectionPath
,
false
);
itemExpanded
(
item
Uni
,
false
);
handler
.
editConnection
(
itemUuid
);
}
}
...
...
@@ -405,7 +390,7 @@ PlasmaComponents.ListItem {
}
function
createContent
()
{
if
(
itemConnect
ed
||
itemConnec
ting
)
if
(
itemConnect
ionState
==
PlasmaNM
.
Enums
.
Activated
||
itemConnectionState
==
PlasmaNM
.
Enums
.
Activa
ting
)
connectionItemSettings
.
sourceComponent
=
connectionConnectedComponent
;
else
connectionItemSettings
.
sourceComponent
=
connectionDisconnectedComponent
;
...
...
applet/declarative/contents/ui/OptionsWidget.qml
View file @
aedd8cc1
...
...
@@ -20,7 +20,7 @@
import
QtQuick
1.1
import
org
.
kde
.
plasma
.
components
0.1
as
PlasmaComponents
import
org
.
kde
.
plasmanm
0.1
as
PlasmaNM
import
org
.
kde
.
networkmanagement
0.1
as
PlasmaNM
Item
{
id
:
optionsWidget
;
...
...
applet/declarative/contents/ui/Toolbar.qml
View file @
aedd8cc1
...
...
@@ -21,7 +21,7 @@
import
QtQuick
1.1
import
org
.
kde
.
plasma
.
components
0.1
as
PlasmaComponents
import
org
.
kde
.
plasma
.
core
0.1
as
PlasmaCore
import
org
.
kde
.
plasmanm
0.1
as
PlasmaNM
import
org
.
kde
.
networkmanagement
0.1
as
PlasmaNM
Item
{
id
:
toolBar
;
...
...
Prev
1
2
3
4
5
6
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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