From aceca73cda17bbfeabe620f171371f09b81c5363 Mon Sep 17 00:00:00 2001 From: cxl Date: Thu, 19 Nov 2020 19:53:36 +0000 Subject: [PATCH] CtrlLib: FileSel fixed to compile in Linux git-svn-id: svn://ultimatepp.org/upp/trunk@15459 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/CtrlLib/FileSel.cpp | 8 +++++++- uppsrc/CtrlLib/FileSel.h | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/uppsrc/CtrlLib/FileSel.cpp b/uppsrc/CtrlLib/FileSel.cpp index 9db47c492..867b77020 100644 --- a/uppsrc/CtrlLib/FileSel.cpp +++ b/uppsrc/CtrlLib/FileSel.cpp @@ -1453,7 +1453,11 @@ void FileSel::Reload() void FileSel::Activate() { - if(loaded && !loading_network && GetDir() != "\\" && netnode.GetCount() == 0) + if(loaded && !loading_network && GetDir() != "\\" +#ifdef PLATFORM_WIN32 + && netnode.GetCount() == 0 +#endif + ) Reload(); TopWindow::Activate(); } @@ -1461,7 +1465,9 @@ void FileSel::Activate() bool FileSel::Key(dword key, int count) { switch(key) { case K_F9: +#ifdef PLATFORM_WIN32 netroot_loaded = false; +#endif Reload(); return true; case K_MOUSE_FORWARD: diff --git a/uppsrc/CtrlLib/FileSel.h b/uppsrc/CtrlLib/FileSel.h index 17080f50f..05976af56 100644 --- a/uppsrc/CtrlLib/FileSel.h +++ b/uppsrc/CtrlLib/FileSel.h @@ -278,8 +278,10 @@ protected: void GoToPlace(); void AddPlaceRaw(const String& path, const Image& m, const String& name, const char* group = NULL, int row = -1); void AddSystemPlaces(int row = -1); +#ifdef PLATFORM_WIN32 void ScanNetwork(Function ()> fn); void ScanNetworkRoot(); +#endif using WithFileSelectorLayout::Title;