BFilePanel: allow to change the node flavors

There doesn't seem to be anything ini the implementation that would
cause a problem, as long as you don't try to change this while the
window is already open.
This commit is contained in:
Adrien Destugues 2014-12-04 09:26:49 +01:00
parent 14c42c3783
commit 529cd177b5
4 changed files with 13 additions and 2 deletions

View File

@ -67,6 +67,7 @@ class BFilePanel {
void SetRefFilter(BRefFilter* filter);
void SetSaveText(const char* text);
void SetButtonLabel(file_panel_button button, const char* label);
void SetNodeFlavors(uint32 flavors);
void SetPanelDirectory(const BEntry* newDirectory);
void SetPanelDirectory(const BDirectory* newDirectory);

View File

@ -263,6 +263,17 @@ BFilePanel::SetButtonLabel(file_panel_button button, const char* text)
}
void
BFilePanel::SetNodeFlavors(uint32 flavors)
{
AutoLock<BWindow> lock(fWindow);
if (!lock)
return;
static_cast<TFilePanel*>(fWindow)->SetNodeFlavors(flavors);
}
void
BFilePanel::GetPanelDirectory(entry_ref* ref) const
{

View File

@ -78,6 +78,7 @@ public:
void SetClientObject(BFilePanel*);
void SetRefFilter(BRefFilter*);
void SetNodeFlavors(uint32 nodeFlavors) { fNodeFlavors = nodeFlavors; }
void SetSaveText(const char* text);
void SetButtonLabel(file_panel_button, const char* text);
void SetTo(const entry_ref* ref);

View File

@ -85,14 +85,12 @@ All rights reserved.
#include "Cursors.h"
#include "DeskWindow.h"
#include "DesktopPoseView.h"
#include "DirMenu.h"
#include "FilePanelPriv.h"
#include "FSClipboard.h"
#include "FSUtils.h"
#include "FunctionObject.h"
#include "MimeTypes.h"
#include "Navigator.h"
#include "NavMenu.h"
#include "Pose.h"
#include "InfoWindow.h"
#include "Utilities.h"