[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [smb4k] plasmoid/package/contents/ui: Load network items and mounted shares into the network browser
From:       Alexander Reinholdt <null () kde ! org>
Date:       2017-06-30 20:00:28
Message-ID: E1dR25c-0003r6-7c () code ! kde ! org
[Download RAW message or body]

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 shares 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 == 0) {
+      getWorkgroups()
+    }
+    else {
+      // Do nothing
+    }
+  }
+  
+  //
   // Functions
   //
   function rescan() {
diff --git a/plasmoid/package/contents/ui/SharesViewPage.qml \
b/plasmoid/package/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 == 0) {
+      shareMountedOrUnmounted()
+    }
+    else {
+      // Do nothing
+    }
+  }
+  
+  //
   // Functions
   //
   function shareMountedOrUnmounted() {


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic