1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-13 00:04:19 +00:00
Commit graph

70 commits

Author SHA1 Message Date
reuk
1d29091133
FileChooser: Always set initial directory if the initialFileOrDirectory argument is not empty 2021-07-14 15:40:58 +01:00
ed
a5c3b81f82 Use C++14 lambda capture initialisers for initialising deletion checkers 2021-07-12 11:58:29 +01:00
reuk
31a7c62baf
Windows: Fix and suppress some analysis warnings
This fixes warnings that are emitted when building with the `-analyze`
flag enabled.
2021-05-26 15:34:26 +01:00
reuk
ec43c7f61c
FileChooser: Remember previous file location on Windows 2021-04-28 13:46:55 +01:00
ed
11d872ea1b MessageMananger: Made dispatchNextMessageOnSystemQueue() accessible by internal code 2021-04-13 16:25:04 +01:00
reuk
a10cc6faff
FileChooser: Improve MinGW compatibility 2021-04-07 16:24:39 +01:00
reuk
98d5dc84e6
FileChooser: Get rid of unnecessary shared-ptr in win32 native implementation 2021-04-07 16:24:38 +01:00
reuk
b952d0204e
FileChooser: Pump message thread in destructor
IFileDialog::Show and CoUninitialize both seem to require the main
message loop to be active and running when they are called. If we block
the message thread while calling these functions, we may cause a
deadlock.

The destructor of the Win32NativeFileChooser was blocking the message
thread until the background thread exited, but the background thread was
unable to make progress while the message thread was blocked.

To work around this issue, we now pump the message thread in the
destructor of the Win32NativeFileChooser. If a dialog is currently
active, this should allow it to exit gracefully.

Note that we cannot use MessageManager::runDispatchLoopUntil here:
- MessageManager::runDispatchLoopUntil will not process any messages if
  the quit message has been received, which could lead to deadlocks if the
  FileChooser is destroyed after the quit message has been posted.
- This function isn't defined when JUCE_MODAL_LOOPS_PERMITTED is disabled.
2021-04-07 16:24:38 +01:00
Tom Poole
765eafb1eb Fixed some file permissions 2021-03-31 10:12:59 +01:00
reuk
3afaaa48be FileChooser: Fix IFileDialogEvents leak 2021-03-08 11:23:16 +00:00
reuk
fd2f866dd1 FileChooser: Avoid throwing bad_weak_ptr
It seems like shared_from_this may not be enabled when a unique_ptr is
assigned to a shared_ptr (although it *should* be enabled when
constructing a new shared_ptr from a unique_ptr). Functions that return
objects that may need to use shared_from_this now return shared_ptr,
just to be safe.

Additionally, in some cases, shared_from_this was being called from
Thread::run after the last reference to the shared object had been
released. We now call shared_from_this during 'open', which will always
run on the message thread while at least once reference to the shared
object is alive.
2021-03-03 19:21:43 +00:00
reuk
45409bb4e6
FileChooser: Hide chooser when it leaves scope on Windows 2021-03-02 10:49:39 +00:00
ed
e18284978f FileChooser: Check JUCE_MODAL_LOOPS_PERMITTED in Native::runModally() 2021-02-22 09:08:09 +00:00
reuk
cd25daf892
FileChooser: Respect comma delimiters for file filters 2021-01-11 18:37:15 +00:00
reuk
41ec486dd0
FileChooser: Show desktop folder if requested folder does not exist
This change affects the PostVista version of the Windows FileChooser.
2020-12-15 11:25:56 +00:00
reuk
6ac0e90e58
FileChooser: Allow new filechooser to load paths containing unicode characters 2020-11-30 19:50:46 +00:00
ed
b7e28541ca Replaced deprecated Displays methods 2020-10-27 12:38:59 +00:00
reuk
2b03936461 FileChooser: Use old-style win32 file chooser if user passes a custom preview component 2020-10-20 10:16:13 +01:00
reuk
8ad5ea0cb1 FileChooser: Fix win32 threading bug
The Win32NativeFileChooser was taking ownership of itself
in its `Thread::run` implementation. This meant that sometimes
the destructor of the file chooser thread would execute directly
in `Thread::run`.

Now, we explicitly transfer ownership into a function object which
will run asynchronously on the main thread. This way, the file chooser
thread will be stopped on the main thread.
2020-10-20 10:16:13 +01:00
ed
876aceed99 Windows: Made the behaviour of the new native FileChooser consistent with the old when saving a file with no extension specified 2020-08-20 18:10:21 +01:00
reuk
994ba04d7e
FileChooser: Use a newer friendlier filebrowser on Windows 2020-08-04 11:37:38 +01:00
reuk
c6861bf96e Clang: Remove unused data member 2020-07-01 10:00:43 +01:00
ed
009d685179 Updated all license headers 2020-06-29 08:30:22 +01:00
reuk
092bc44413
MinGW: Fix windows/gcc warnings 2020-05-11 11:28:28 +01:00
reuk
e13901d912 ClangCl: Silence code which warns when building on Windows with Clang 2020-04-27 10:22:06 +01:00
Tom Poole
894e7d2bd2 Updated all license headers 2020-04-23 17:30:39 +01:00
reuk
327f817b9b Copyrights: Update commercial/gpl headers to be gpl-only 2020-04-09 15:22:56 +01:00
ed
e36736e0ec Fixed some typos 2020-01-06 14:04:16 +00:00
ed
fdc77e645d Windows: Fixed a focus ping-pong issue in the native file chooser when using a custom component 2018-12-03 14:21:51 +00:00
ed
1526d9fa09 Windows: Tidied up some of the native file chooser code 2018-11-30 17:17:39 +00:00
ed
e5d1e0008e Allow mouse events to pass to FilePreviewComponent in native file choosers 2018-11-30 14:28:06 +00:00
ed
aee19ad963 Windows: Fixed a leak in the win32 file chooser when using a custom FilePreviewComponent 2018-11-30 14:25:33 +00:00
ed
78d90fafba Windows: Scale the target bounds of the native file chooser's FilePreviewComponent so it is displayed correctly 2018-11-30 12:52:58 +00:00
jules
38295f332b Converted some old typedefs to using declarations 2018-05-03 09:59:05 +01:00
Tom Poole
ab863a6dc2 Replaced all usage of ScopedPointer with std::unique_ptr 2018-04-19 20:27:47 +01:00
Tom Poole
4229dc0a4f Made a lot of ScopedPointer usage conform to the std::unique_ptr interface 2018-04-10 18:34:20 +01:00
jules
4fcedf7be5 Standardised some lambda syntax 2018-01-08 10:28:41 +00:00
jules
7daff1a99e Fixed a build error 2017-11-29 20:30:12 +00:00
jules
6a49d6efdc Minor tidying up 2017-11-29 17:33:00 +00:00
Lukasz Kozakiewicz
5358756d58 FileChooser: misc fixes and improvements to iOS and Android file choosers. 2017-11-29 16:46:38 +01:00
jules
f85d706131 Some minor formatting and comment fixes 2017-11-28 17:46:15 +00:00
hogliux
df8fc9b910 FileChoosers: Added a file-chooser save mode where the caller already supplies a temporary file which should be saved. JUCE will automatically move the temporary file to the location selected by the user 2017-11-22 14:03:42 +00:00
hogliux
7e23bf28ae Added iOS/Android native file chooser support and support for asynchronous invocation of file choosers 2017-11-20 10:56:08 +00:00
jules
eda613c6db Moved all "namespace juce" declarations from module headers to the individual .h and .cpp source files. This makes life a lot easier for Intellisense and other IDE autocompletion tools 2017-09-08 08:59:55 +01:00
ed
dec870f5eb Projucer: Fixed a few live-build errors on Windows 2017-09-01 11:06:01 +01:00
tpoole
f1409640f8 Added File::isRoot() 2017-05-09 17:59:07 +01:00
tpoole
9b065f12b4 Fixed bug in the Win32 FileChooser dialog when selecting a nonexistent root drive 2017-05-09 10:48:11 +01:00
hogliux
b5afccc37c Updated file headers and the README with the JUCE 5 license 2017-04-27 14:43:04 +01:00
jules
024fe6c9ad Avoided an assertion in win32 file chooser code 2017-04-20 09:53:56 +01:00
ed
f3be41caba Fixed a bug in the Windows FileChooser where two backslashes would be added to the file paths of selected files 2017-01-03 16:44:34 +00:00