mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
Add an (unimplemented) rename operation.
This commit is contained in:
@@ -115,6 +115,11 @@ void Filesystem::deleteFile(const Path& path)
|
||||
throw UnimplementedFilesystemException();
|
||||
}
|
||||
|
||||
void Filesystem::moveFile(const Path& oldName, const Path& newName)
|
||||
{
|
||||
throw UnimplementedFilesystemException();
|
||||
}
|
||||
|
||||
bool Filesystem::needsFlushing()
|
||||
{
|
||||
return _sectors->needsFlushing();
|
||||
|
||||
@@ -125,6 +125,7 @@ public:
|
||||
OP_GETFSDATA = 0b0000000100000000,
|
||||
OP_PUTFSDATA = 0b0000001000000000,
|
||||
OP_PUTATTRS = 0b0000010000000000,
|
||||
OP_MOVE = 0b0000100000000000,
|
||||
};
|
||||
|
||||
public:
|
||||
@@ -167,6 +168,9 @@ public:
|
||||
/* Deletes a file or non-empty directory. */
|
||||
virtual void deleteFile(const Path& path);
|
||||
|
||||
/* Moves a file (including renaming it). */
|
||||
virtual void moveFile(const Path& oldName, const Path& newName);
|
||||
|
||||
/* Does this filesystem need flushing? */
|
||||
bool needsFlushing();
|
||||
|
||||
|
||||
@@ -286,6 +286,8 @@ MainWindowGen::MainWindowGen( wxWindow* parent, wxWindowID id, const wxString& t
|
||||
|
||||
browserNewDirectoryTool = browserToolbar->AddTool( wxID_ANY, wxT("New directory"), wxArtProvider::GetBitmap( wxART_NEW_DIR, wxART_TOOLBAR ), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString, NULL );
|
||||
|
||||
browserRenameTool = browserToolbar->AddTool( wxID_ANY, wxT("Rename"), wxArtProvider::GetBitmap( wxART_COPY, wxART_TOOLBAR ), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString, NULL );
|
||||
|
||||
browserDeleteTool = browserToolbar->AddTool( wxID_ANY, wxT("Delete"), wxArtProvider::GetBitmap( wxART_DELETE, wxART_TOOLBAR ), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString, NULL );
|
||||
|
||||
browserToolbar->AddSeparator();
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">MainWindowGen</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size">592,607</property>
|
||||
<property name="size">616,607</property>
|
||||
<property name="style">wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER</property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="title">FluxEngine</property>
|
||||
@@ -2375,6 +2375,17 @@
|
||||
<property name="tooltip"></property>
|
||||
<event name="OnToolClicked">OnBrowserNewDirectoryButton</event>
|
||||
</object>
|
||||
<object class="tool" expanded="1">
|
||||
<property name="bitmap">Load From Art Provider; wxART_COPY; wxART_TOOLBAR</property>
|
||||
<property name="context_menu">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="kind">wxITEM_NORMAL</property>
|
||||
<property name="label">Rename</property>
|
||||
<property name="name">browserRenameTool</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="statusbar"></property>
|
||||
<property name="tooltip"></property>
|
||||
</object>
|
||||
<object class="tool" expanded="1">
|
||||
<property name="bitmap">Load From Art Provider; wxART_DELETE; wxART_TOOLBAR</property>
|
||||
<property name="context_menu">0</property>
|
||||
|
||||
@@ -90,6 +90,7 @@ class MainWindowGen : public wxFrame
|
||||
wxToolBarToolBase* browserSaveTool;
|
||||
wxToolBarToolBase* browserNewTool;
|
||||
wxToolBarToolBase* browserNewDirectoryTool;
|
||||
wxToolBarToolBase* browserRenameTool;
|
||||
wxToolBarToolBase* browserDeleteTool;
|
||||
wxToolBarToolBase* browserFormatTool;
|
||||
wxDataViewCtrl* browserTree;
|
||||
@@ -129,7 +130,7 @@ class MainWindowGen : public wxFrame
|
||||
|
||||
public:
|
||||
|
||||
MainWindowGen( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("FluxEngine"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 592,607 ), long style = wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER|wxFULL_REPAINT_ON_RESIZE|wxTAB_TRAVERSAL );
|
||||
MainWindowGen( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("FluxEngine"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 616,607 ), long style = wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER|wxFULL_REPAINT_ON_RESIZE|wxTAB_TRAVERSAL );
|
||||
|
||||
~MainWindowGen();
|
||||
|
||||
|
||||
@@ -928,6 +928,9 @@ public:
|
||||
browserToolbar->EnableTool(browserNewDirectoryTool->GetId(),
|
||||
(capabilities & Filesystem::OP_CREATEDIR) &&
|
||||
(selection.size() <= 1));
|
||||
browserToolbar->EnableTool(browserRenameTool->GetId(),
|
||||
(capabilities & Filesystem::OP_MOVE) &&
|
||||
(selection.size() == 1));
|
||||
browserToolbar->EnableTool(browserDeleteTool->GetId(),
|
||||
(capabilities & Filesystem::OP_DELETE) &&
|
||||
(selection.size() >= 1));
|
||||
|
||||
Reference in New Issue
Block a user