Program: bbtk
Module: $RCSfile: bbwxDirectorySelector.cxx,v $
Language: C++
- Date: $Date: 2008/02/15 12:47:18 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2008/04/18 12:59:52 $
+ Version: $Revision: 1.4 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#include "bbwxDirectorySelector.h"
#include "bbwxPackage.h"
-
-#include <wx/filedlg.h>
-
+
+#include <wx/dirdlg.h>
namespace bbwx
{
BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,DirectorySelector);
- BBTK_USER_BLACK_BOX_IMPLEMENTATION(DirectorySelector,bbtk::AtomicBlackBox);
+ BBTK_BLACK_BOX_IMPLEMENTATION(DirectorySelector,bbtk::AtomicBlackBox);
void DirectorySelector::Process()
bbtkDebugMessageInc("Core",9,"DirectorySelector::Process() ["
<<bbGetFullName()<<"]"<<std::endl);
- wxFileDialog* FD =
- new wxFileDialog( 0,
+ wxDirDialog* FD =
+ new wxDirDialog( 0,
bbtk::std2wx(bbGetInputMessage()),
bbtk::std2wx(bbGetInputDefaultDir()));
- FD->ShowModal();
-
- if (FD->GetReturnCode()==wxID_OK)
+ if (FD->ShowModal()==wxID_OK)
{
bbSetOutputOut( bbtk::wx2std (FD->GetPath()) );
bbSetInputDefaultDir( bbtk::wx2std (FD->GetPath()) );
}
else
- {
+ {
bbSetOutputOut("");
bbSetInputDefaultDir("");
}