From 529cd177b573aaba391c8adc9c9f5ad76a14bf81 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Thu, 4 Dec 2014 09:26:49 +0100 Subject: [PATCH] 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. --- headers/os/storage/FilePanel.h | 1 + src/kits/tracker/FilePanel.cpp | 11 +++++++++++ src/kits/tracker/FilePanelPriv.h | 1 + src/kits/tracker/PoseView.cpp | 2 -- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/headers/os/storage/FilePanel.h b/headers/os/storage/FilePanel.h index 955ac18271..ded44de3b8 100644 --- a/headers/os/storage/FilePanel.h +++ b/headers/os/storage/FilePanel.h @@ -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); diff --git a/src/kits/tracker/FilePanel.cpp b/src/kits/tracker/FilePanel.cpp index 0b4b7c4da5..f0ffeab62b 100644 --- a/src/kits/tracker/FilePanel.cpp +++ b/src/kits/tracker/FilePanel.cpp @@ -263,6 +263,17 @@ BFilePanel::SetButtonLabel(file_panel_button button, const char* text) } +void +BFilePanel::SetNodeFlavors(uint32 flavors) +{ + AutoLock lock(fWindow); + if (!lock) + return; + + static_cast(fWindow)->SetNodeFlavors(flavors); +} + + void BFilePanel::GetPanelDirectory(entry_ref* ref) const { diff --git a/src/kits/tracker/FilePanelPriv.h b/src/kits/tracker/FilePanelPriv.h index 84b1432d97..fc2447085d 100644 --- a/src/kits/tracker/FilePanelPriv.h +++ b/src/kits/tracker/FilePanelPriv.h @@ -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); diff --git a/src/kits/tracker/PoseView.cpp b/src/kits/tracker/PoseView.cpp index ae04731da1..486c3c8fa1 100644 --- a/src/kits/tracker/PoseView.cpp +++ b/src/kits/tracker/PoseView.cpp @@ -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"