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
4c04603c
Commit
4c04603c
authored
Mar 30, 2022
by
Nate Graham
Browse files
applet: put the PlaceholderMessage in a Loader to save some memory
parent
036dbfc0
Changes
1
Hide whitespace changes
Inline
Side-by-side
applet/contents/ui/PopupDialog.qml
View file @
4c04603c
...
...
@@ -83,39 +83,43 @@ PlasmaExtras.Representation {
property
int
currentVisibleButtonIndex
:
-
1
property
bool
showSeparator
:
false
PlasmaExtras.PlaceholderMessage
{
Loader
{
anchors.centerIn
:
parent
width
:
parent
.
width
-
(
PlasmaCore
.
Units
.
largeSpacing
*
4
)
visible
:
connectionView
.
count
===
0
iconName
:
{
if
(
toolbarValues
.
displayplaneModeMessage
)
{
return
"
network-flightmode-on
"
}
if
(
toolbarValues
.
displayWifiMessage
)
{
return
"
network-wireless-off
"
}
if
(
toolbarValues
.
displayWwanMessage
)
{
return
"
network-mobile-off
"
}
return
"
edit-none
"
}
text
:
{
if
(
toolbarValues
.
displayplaneModeMessage
)
{
return
i18n
(
"
Airplane mode is enabled
"
)
}
if
(
toolbarValues
.
displayWifiMessage
)
{
active
:
connectionView
.
count
===
0
asynchronous
:
true
visible
:
status
==
Loader
.
Ready
sourceComponent
:
PlasmaExtras.PlaceholderMessage
{
iconName
:
{
if
(
toolbarValues
.
displayplaneModeMessage
)
{
return
"
network-flightmode-on
"
}
if
(
toolbarValues
.
displayWifiMessage
)
{
return
"
network-wireless-off
"
}
if
(
toolbarValues
.
displayWwanMessage
)
{
return
i18n
(
"
Wireless and mobile networks are deactivated
"
)
return
"
network-mobile-off
"
}
return
i18n
(
"
Wireless is deactivated
"
)
return
"
edit-none
"
}
if
(
toolbarValues
.
displayWwanMessage
)
{
return
i18n
(
"
Mobile network is deactivated
"
)
}
if
(
toolbar
.
searchTextField
.
text
.
length
>
0
)
{
return
i18n
(
"
No matches
"
)
text
:
{
if
(
toolbarValues
.
displayplaneModeMessage
)
{
return
i18n
(
"
Airplane mode is enabled
"
)
}
if
(
toolbarValues
.
displayWifiMessage
)
{
if
(
toolbarValues
.
displayWwanMessage
)
{
return
i18n
(
"
Wireless and mobile networks are deactivated
"
)
}
return
i18n
(
"
Wireless is deactivated
"
)
}
if
(
toolbarValues
.
displayWwanMessage
)
{
return
i18n
(
"
Mobile network is deactivated
"
)
}
if
(
toolbar
.
searchTextField
.
text
.
length
>
0
)
{
return
i18n
(
"
No matches
"
)
}
return
i18n
(
"
No available connections
"
)
}
return
i18n
(
"
No available connections
"
)
}
}
...
...
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