mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Updated FileBrowserComponent to refresh its list if the user switches to another app and then returns.
This commit is contained in:
parent
e2c274840d
commit
6baf778e41
2 changed files with 30 additions and 17 deletions
|
|
@ -41,7 +41,8 @@ class JUCE_API FileBrowserComponent : public Component,
|
|||
private TextEditorListener,
|
||||
private ButtonListener,
|
||||
private ComboBoxListener, // (can't use ComboBox::Listener due to idiotic VC2005 bug)
|
||||
private FileFilter
|
||||
private FileFilter,
|
||||
private Timer
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
|
|
@ -103,8 +104,7 @@ public:
|
|||
*/
|
||||
File getSelectedFile (int index) const noexcept;
|
||||
|
||||
/** Deselects any files that are currently selected.
|
||||
*/
|
||||
/** Deselects any files that are currently selected. */
|
||||
void deselectAllFiles();
|
||||
|
||||
/** Returns true if the currently selected file(s) are usable.
|
||||
|
|
@ -150,8 +150,7 @@ public:
|
|||
*/
|
||||
virtual String getActionVerb() const;
|
||||
|
||||
/** Returns true if the saveMode flag was set when this component was created.
|
||||
*/
|
||||
/** Returns true if the saveMode flag was set when this component was created. */
|
||||
bool isSaveMode() const noexcept;
|
||||
|
||||
/** Sets the label that will be displayed next to the filename entry box.
|
||||
|
|
@ -243,10 +242,8 @@ public:
|
|||
bool isFileSuitable (const File&) const override;
|
||||
/** @internal */
|
||||
bool isDirectorySuitable (const File&) const override;
|
||||
|
||||
/** @internal */
|
||||
FilePreviewComponent* getPreviewComponent() const noexcept;
|
||||
|
||||
/** @internal */
|
||||
DirectoryContentsDisplayComponent* getDisplayComponent() const noexcept;
|
||||
|
||||
|
|
@ -263,13 +260,13 @@ protected:
|
|||
|
||||
private:
|
||||
//==============================================================================
|
||||
ScopedPointer <DirectoryContentsList> fileList;
|
||||
ScopedPointer<DirectoryContentsList> fileList;
|
||||
const FileFilter* fileFilter;
|
||||
|
||||
int flags;
|
||||
File currentRoot;
|
||||
Array<File> chosenFiles;
|
||||
ListenerList <FileBrowserListener> listeners;
|
||||
ListenerList<FileBrowserListener> listeners;
|
||||
|
||||
ScopedPointer<DirectoryContentsDisplayComponent> fileListComponent;
|
||||
FilePreviewComponent* previewComp;
|
||||
|
|
@ -277,11 +274,12 @@ private:
|
|||
TextEditor filenameBox;
|
||||
Label fileLabel;
|
||||
ScopedPointer<Button> goUpButton;
|
||||
|
||||
TimeSliceThread thread;
|
||||
bool wasProcessActive;
|
||||
|
||||
void timerCallback() override;
|
||||
void sendListenerChangeMessage();
|
||||
bool isFileOrDirSuitable (const File& f) const;
|
||||
bool isFileOrDirSuitable (const File&) const;
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FileBrowserComponent)
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue