mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
Ctrl: FileSel::NoExeIcons
This commit is contained in:
parent
87c6a9396c
commit
a066fe7773
5 changed files with 34 additions and 1 deletions
|
|
@ -922,6 +922,7 @@ void FileSel::SearchLoad()
|
|||
SortBy(list, ~sortby);
|
||||
Update();
|
||||
#ifdef GUI_WIN
|
||||
if(!noexeicons)
|
||||
lazyicons.Start(list, d, WhenIcon);
|
||||
#endif
|
||||
StartLI();
|
||||
|
|
@ -2374,6 +2375,7 @@ FileSel::FileSel()
|
|||
multi = false;
|
||||
bidname = false;
|
||||
appmodal = true;
|
||||
noexeicons = false;
|
||||
|
||||
AddChildBefore(GetFirstChild(), &sizegrip);
|
||||
|
||||
|
|
|
|||
|
|
@ -224,6 +224,7 @@ protected:
|
|||
bool bidname;
|
||||
bool appmodal;
|
||||
bool loaded;
|
||||
bool noexeicons;
|
||||
|
||||
Ctrl *file_ctrl = NULL;
|
||||
int file_ctrl_cx;
|
||||
|
|
@ -355,6 +356,7 @@ public:
|
|||
FileSel& FileCtrl(Ctrl& ext, int cx) { file_ctrl = &ext; file_ctrl_cx = cx; return *this; }
|
||||
FileSel& FileCtrl(Ctrl& ext) { return FileCtrl(ext, ext.GetMinSize().cx); }
|
||||
FileSel& DefaultName(const String& s) { default_name = s; return *this; }
|
||||
FileSel& NoExeIcons(bool b = true) { noexeicons = b; return *this; }
|
||||
|
||||
FileSel();
|
||||
virtual ~FileSel();
|
||||
|
|
|
|||
|
|
@ -332,4 +332,11 @@ the width from GetMinSize().&]
|
|||
]_[*@3 s])&]
|
||||
[s2;%% Specifies the default name for Save As operation.&]
|
||||
[s3;%% &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:FileSel`:`:NoExeIcons`(bool`): [_^Upp`:`:FileSel^ FileSel][@(0.0.255) `&]_[* No
|
||||
ExeIcons]([@(0.0.255) bool]_[*@3 b]_`=_[@(0.0.255) true])&]
|
||||
[s2;%% In Win32 environment, FileSel is using background thread to
|
||||
load icons from .exe files. In some contexts, this can be causing
|
||||
problems. NoExeIcons suppresses loading of this information.&]
|
||||
[s3;%% &]
|
||||
[s3;%% ]]
|
||||
9
upptst/FileSelNoExe/FileSelNoExe.upp
Normal file
9
upptst/FileSelNoExe/FileSelNoExe.upp
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
uses
|
||||
CtrlLib;
|
||||
|
||||
file
|
||||
main.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "GUI";
|
||||
|
||||
13
upptst/FileSelNoExe/main.cpp
Normal file
13
upptst/FileSelNoExe/main.cpp
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#include <CtrlLib/CtrlLib.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
GUI_APP_MAIN
|
||||
{
|
||||
FileSel sel;
|
||||
sel.Type("all", "*.*");
|
||||
sel.NoExeIcons();
|
||||
sel.ExecuteSaveAs();
|
||||
sel.NoExeIcons(false);
|
||||
sel.ExecuteSaveAs();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue