Tracker: style fixes to FilePanel
This commit is contained in:
@@ -76,7 +76,7 @@ run_save_panel()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// #pragma mark -
|
// #pragma mark - BFilePanel
|
||||||
|
|
||||||
|
|
||||||
BFilePanel::BFilePanel(file_panel_mode mode, BMessenger* target,
|
BFilePanel::BFilePanel(file_panel_mode mode, BMessenger* target,
|
||||||
|
|||||||
@@ -33,23 +33,9 @@ All rights reserved.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "Attributes.h"
|
|
||||||
#include "AttributeStream.h"
|
|
||||||
#include "AutoLock.h"
|
|
||||||
#include "Commands.h"
|
|
||||||
#include "DesktopPoseView.h"
|
|
||||||
#include "DirMenu.h"
|
|
||||||
#include "FavoritesMenu.h"
|
|
||||||
#include "FilePanelPriv.h"
|
#include "FilePanelPriv.h"
|
||||||
#include "FSUtils.h"
|
|
||||||
#include "FSClipboard.h"
|
#include <string.h>
|
||||||
#include "IconMenuItem.h"
|
|
||||||
#include "MimeTypes.h"
|
|
||||||
#include "NavMenu.h"
|
|
||||||
#include "PoseView.h"
|
|
||||||
#include "Tracker.h"
|
|
||||||
#include "tracker_private.h"
|
|
||||||
#include "Utilities.h"
|
|
||||||
|
|
||||||
#include <Alert.h>
|
#include <Alert.h>
|
||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
@@ -76,7 +62,23 @@ All rights reserved.
|
|||||||
#include <Volume.h>
|
#include <Volume.h>
|
||||||
#include <VolumeRoster.h>
|
#include <VolumeRoster.h>
|
||||||
|
|
||||||
#include <string.h>
|
#include "Attributes.h"
|
||||||
|
#include "AttributeStream.h"
|
||||||
|
#include "AutoLock.h"
|
||||||
|
#include "Commands.h"
|
||||||
|
#include "DesktopPoseView.h"
|
||||||
|
#include "DirMenu.h"
|
||||||
|
#include "FavoritesMenu.h"
|
||||||
|
#include "FSUtils.h"
|
||||||
|
#include "FSClipboard.h"
|
||||||
|
#include "IconMenuItem.h"
|
||||||
|
#include "MimeTypes.h"
|
||||||
|
#include "NavMenu.h"
|
||||||
|
#include "PoseView.h"
|
||||||
|
#include "Tracker.h"
|
||||||
|
#include "Utilities.h"
|
||||||
|
|
||||||
|
#include "tracker_private.h"
|
||||||
|
|
||||||
|
|
||||||
const char* kDefaultFilePanelTemplate = "FilePanelSettings";
|
const char* kDefaultFilePanelTemplate = "FilePanelSettings";
|
||||||
@@ -1271,6 +1273,7 @@ TFilePanel::MessageReceived(BMessage* message)
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
_inherited::MessageReceived(message);
|
_inherited::MessageReceived(message);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ of Be Incorporated in the United States and other countries. Other brand product
|
|||||||
names are registered trademarks or trademarks of their respective holders.
|
names are registered trademarks or trademarks of their respective holders.
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
*/
|
*/
|
||||||
#ifndef _FILE_PANEL_PRIV_H
|
#ifndef _FILE_PANEL_PRIV_H
|
||||||
#define _FILE_PANEL_PRIV_H
|
#define _FILE_PANEL_PRIV_H
|
||||||
|
|
||||||
|
|
||||||
@@ -70,31 +70,31 @@ public:
|
|||||||
|
|
||||||
BFilePanelPoseView* PoseView() const;
|
BFilePanelPoseView* PoseView() const;
|
||||||
|
|
||||||
virtual bool QuitRequested();
|
virtual bool QuitRequested();
|
||||||
virtual void MenusBeginning();
|
virtual void MenusBeginning();
|
||||||
virtual void MenusEnded();
|
virtual void MenusEnded();
|
||||||
virtual void DispatchMessage(BMessage* message, BHandler* handler);
|
virtual void DispatchMessage(BMessage* message, BHandler* handler);
|
||||||
virtual void ShowContextMenu(BPoint, const entry_ref*, BView*);
|
virtual void ShowContextMenu(BPoint, const entry_ref*, BView*);
|
||||||
|
|
||||||
void SetClientObject(BFilePanel*);
|
void SetClientObject(BFilePanel*);
|
||||||
void SetRefFilter(BRefFilter*);
|
void SetRefFilter(BRefFilter*);
|
||||||
void SetSaveText(const char* text);
|
void SetSaveText(const char* text);
|
||||||
void SetButtonLabel(file_panel_button, const char* text);
|
void SetButtonLabel(file_panel_button, const char* text);
|
||||||
void SetTo(const entry_ref* ref);
|
void SetTo(const entry_ref* ref);
|
||||||
virtual void SelectionChanged();
|
virtual void SelectionChanged();
|
||||||
void HandleOpenButton();
|
void HandleOpenButton();
|
||||||
void HandleSaveButton();
|
void HandleSaveButton();
|
||||||
void Rewind();
|
void Rewind();
|
||||||
bool IsSavePanel() const;
|
bool IsSavePanel() const;
|
||||||
void Refresh();
|
void Refresh();
|
||||||
const BMessenger* Target() const;
|
const BMessenger* Target() const;
|
||||||
BRefFilter* Filter() const;
|
BRefFilter* Filter() const;
|
||||||
|
|
||||||
void SetTarget(BMessenger);
|
void SetTarget(BMessenger);
|
||||||
void SetMessage(BMessage* message);
|
void SetMessage(BMessage* message);
|
||||||
|
|
||||||
virtual status_t GetNextEntryRef(entry_ref*);
|
virtual status_t GetNextEntryRef(entry_ref*);
|
||||||
virtual void MessageReceived(BMessage*);
|
virtual void MessageReceived(BMessage*);
|
||||||
|
|
||||||
void SetHideWhenDone(bool);
|
void SetHideWhenDone(bool);
|
||||||
bool HidesWhenDone(void);
|
bool HidesWhenDone(void);
|
||||||
@@ -111,49 +111,49 @@ protected:
|
|||||||
virtual void RestoreWindowState(const BMessage&);
|
virtual void RestoreWindowState(const BMessage&);
|
||||||
virtual void RestoreState(const BMessage&);
|
virtual void RestoreState(const BMessage&);
|
||||||
|
|
||||||
virtual void AddFileContextMenus(BMenu*);
|
virtual void AddFileContextMenus(BMenu*);
|
||||||
virtual void AddWindowContextMenus(BMenu*);
|
virtual void AddWindowContextMenus(BMenu*);
|
||||||
virtual void AddDropContextMenus(BMenu*);
|
virtual void AddDropContextMenus(BMenu*);
|
||||||
virtual void AddVolumeContextMenus(BMenu*);
|
virtual void AddVolumeContextMenus(BMenu*);
|
||||||
|
|
||||||
virtual void SetupNavigationMenu(const entry_ref*, BMenu*);
|
virtual void SetupNavigationMenu(const entry_ref*, BMenu*);
|
||||||
virtual void OpenDirectory();
|
virtual void OpenDirectory();
|
||||||
virtual void OpenParent();
|
virtual void OpenParent();
|
||||||
virtual void WindowActivated(bool state);
|
virtual void WindowActivated(bool state);
|
||||||
|
|
||||||
static filter_result FSFilter(BMessage*, BHandler**, BMessageFilter*);
|
static filter_result FSFilter(BMessage*, BHandler**, BMessageFilter*);
|
||||||
static filter_result MessageDropFilter(BMessage*, BHandler**,
|
static filter_result MessageDropFilter(BMessage*, BHandler**,
|
||||||
BMessageFilter*);
|
BMessageFilter*);
|
||||||
|
|
||||||
int32 ShowCenteredAlert(const char* text, const char* button1,
|
int32 ShowCenteredAlert(const char* text, const char* button1,
|
||||||
const char* button2 = NULL, const char* button3 = NULL);
|
const char* button2 = NULL, const char* button3 = NULL);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool SwitchDirToDesktopIfNeeded(entry_ref &ref);
|
friend class BackgroundView;
|
||||||
bool CanOpenParent() const;
|
|
||||||
void SwitchDirMenuTo(const entry_ref* ref);
|
|
||||||
void AdjustButton();
|
|
||||||
bool SelectChildInParent(const entry_ref* parent,
|
|
||||||
const node_ref* child);
|
|
||||||
void OpenSelectionCommon(BMessage*);
|
|
||||||
|
|
||||||
bool fIsSavePanel;
|
bool SwitchDirToDesktopIfNeeded(entry_ref &ref);
|
||||||
uint32 fNodeFlavors;
|
bool CanOpenParent() const;
|
||||||
BackgroundView* fBackView;
|
void SwitchDirMenuTo(const entry_ref* ref);
|
||||||
BDirMenu* fDirMenu;
|
void AdjustButton();
|
||||||
BMenuField* fDirMenuField;
|
bool SelectChildInParent(const entry_ref* parent,
|
||||||
BTextControl* fTextControl;
|
const node_ref* child);
|
||||||
BMessenger fTarget;
|
void OpenSelectionCommon(BMessage*);
|
||||||
BFilePanel* fClientObject;
|
|
||||||
int32 fSelectionIterator;
|
|
||||||
BMessage* fMessage;
|
|
||||||
BString fButtonText;
|
|
||||||
bool fHideWhenDone;
|
|
||||||
bool fIsTrackingMenu;
|
|
||||||
|
|
||||||
typedef BContainerWindow _inherited;
|
bool fIsSavePanel;
|
||||||
|
uint32 fNodeFlavors;
|
||||||
|
BackgroundView* fBackView;
|
||||||
|
BDirMenu* fDirMenu;
|
||||||
|
BMenuField* fDirMenuField;
|
||||||
|
BTextControl* fTextControl;
|
||||||
|
BMessenger fTarget;
|
||||||
|
BFilePanel* fClientObject;
|
||||||
|
int32 fSelectionIterator;
|
||||||
|
BMessage* fMessage;
|
||||||
|
BString fButtonText;
|
||||||
|
bool fHideWhenDone;
|
||||||
|
bool fIsTrackingMenu;
|
||||||
|
|
||||||
friend class BackgroundView;
|
typedef BContainerWindow _inherited;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -169,29 +169,29 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
// don't do any volume watching and memtamime watching in file panels
|
// don't do any volume watching and memtamime watching in file panels
|
||||||
// for now
|
// for now
|
||||||
virtual void StartWatching();
|
virtual void StartWatching();
|
||||||
virtual void StopWatching();
|
virtual void StopWatching();
|
||||||
|
|
||||||
virtual void RestoreState(AttributeStreamNode*);
|
virtual void RestoreState(AttributeStreamNode*);
|
||||||
virtual void RestoreState(const BMessage &);
|
virtual void RestoreState(const BMessage &);
|
||||||
virtual void SavePoseLocations(BRect* = NULL);
|
virtual void SavePoseLocations(BRect* = NULL);
|
||||||
|
|
||||||
virtual EntryListBase* InitDirentIterator(const entry_ref*);
|
virtual EntryListBase* InitDirentIterator(const entry_ref*);
|
||||||
virtual void AddPosesCompleted();
|
virtual void AddPosesCompleted();
|
||||||
virtual bool IsDesktopView() const;
|
virtual bool IsDesktopView() const;
|
||||||
|
|
||||||
void ShowVolumes(bool visible, bool showShared);
|
void ShowVolumes(bool visible, bool showShared);
|
||||||
|
|
||||||
void AdaptToVolumeChange(BMessage*);
|
void AdaptToVolumeChange(BMessage*);
|
||||||
void AdaptToDesktopIntegrationChange(BMessage*);
|
void AdaptToDesktopIntegrationChange(BMessage*);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool fIsDesktop;
|
bool fIsDesktop;
|
||||||
// This flags makes the distinction between the Desktop as
|
// This flags makes the distinction between the Desktop as
|
||||||
// the root of the world and "/boot/home/Desktop" to which
|
// the root of the world and "/boot/home/Desktop" to which
|
||||||
// we might have navigated from the home dir.
|
// we might have navigated from the home dir.
|
||||||
|
|
||||||
typedef BPoseView _inherited;
|
typedef BPoseView _inherited;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -249,4 +249,5 @@ TFilePanel::TrackingMenu() const
|
|||||||
|
|
||||||
using namespace BPrivate;
|
using namespace BPrivate;
|
||||||
|
|
||||||
#endif
|
|
||||||
|
#endif // _FILE_PANEL_PRIV_H
|
||||||
|
|||||||
Reference in New Issue
Block a user