From kde-commits Fri Jun 30 20:00:28 2017 From: Alexander Reinholdt Date: Fri, 30 Jun 2017 20:00:28 +0000 To: kde-commits Subject: [smb4k] plasmoid/package/contents/ui: Load network items and mounted shares into the network browser Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=149885284527332 Git commit 9ff3c1d604d1744a5ac264141278247db0bb2f13 by Alexander Reinholdt. Committed on 30/06/2017 at 19:58. Pushed by areinholdt into branch 'master'. Load network items and mounted shares into the network browser and the shar= es view when the plasmoids main view is shown. M +12 -0 plasmoid/package/contents/ui/NetworkBrowserPage.qml M +12 -0 plasmoid/package/contents/ui/SharesViewPage.qml https://commits.kde.org/smb4k/9ff3c1d604d1744a5ac264141278247db0bb2f13 diff --git a/plasmoid/package/contents/ui/NetworkBrowserPage.qml b/plasmoid= /package/contents/ui/NetworkBrowserPage.qml index 2bfbad1..27a943a 100644 --- a/plasmoid/package/contents/ui/NetworkBrowserPage.qml +++ b/plasmoid/package/contents/ui/NetworkBrowserPage.qml @@ -218,6 +218,18 @@ PlasmaComponents.Page { } = // + // Initialization + // + Component.onCompleted: { + if (networkBrowserListView.count =3D=3D 0) { + getWorkgroups() + } + else { + // Do nothing + } + } + = + // // Functions // function rescan() { diff --git a/plasmoid/package/contents/ui/SharesViewPage.qml b/plasmoid/pac= kage/contents/ui/SharesViewPage.qml index 3ca2da2..667d34b 100644 --- a/plasmoid/package/contents/ui/SharesViewPage.qml +++ b/plasmoid/package/contents/ui/SharesViewPage.qml @@ -176,6 +176,18 @@ PlasmaComponents.Page { } = // + // Initialization + // + Component.onCompleted: { + if (sharesViewListView.count =3D=3D 0) { + shareMountedOrUnmounted() + } + else { + // Do nothing + } + } + = + // // Functions // function shareMountedOrUnmounted() {