From 36cf4b6daf031e4d5e757b4f732b9bf39d69200c Mon Sep 17 00:00:00 2001 From: donadio Date: Fri, 29 May 2009 08:40:30 +0000 Subject: [PATCH] *** empty log message *** --- src2/creaImageIOWxGimmickPanel.cpp | 5 +++++ src2/creaImageIOWxGimmickPanel.h | 2 ++ src2/creaImageIOWxGimmickView.cpp | 16 +++++++++++++++- src2/creaImageIOWxGimmickView.h | 2 ++ 4 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src2/creaImageIOWxGimmickPanel.cpp b/src2/creaImageIOWxGimmickPanel.cpp index d47038e..f722840 100644 --- a/src2/creaImageIOWxGimmickPanel.cpp +++ b/src2/creaImageIOWxGimmickPanel.cpp @@ -84,6 +84,11 @@ namespace creaImageIO mSendImageSignal(t); } + void WxGimmickPanel::AddImagesToDB(std::string dir) + { + mView->AddDir(dir); + } + //================================================================ // BEGIN_EVENT_TABLE(WxGimmickPanel, wxDialog) // END_EVENT_TABLE() diff --git a/src2/creaImageIOWxGimmickPanel.h b/src2/creaImageIOWxGimmickPanel.h index dd873f6..aaea672 100644 --- a/src2/creaImageIOWxGimmickPanel.h +++ b/src2/creaImageIOWxGimmickPanel.h @@ -54,6 +54,8 @@ namespace creaImageIO void OnSelectedImage(bool t); + void AddImagesToDB(std::string dir); + // DECLARE_EVENT_TABLE(); private : diff --git a/src2/creaImageIOWxGimmickView.cpp b/src2/creaImageIOWxGimmickView.cpp index 9d916f4..9ada3c1 100644 --- a/src2/creaImageIOWxGimmickView.cpp +++ b/src2/creaImageIOWxGimmickView.cpp @@ -653,6 +653,19 @@ namespace creaImageIO wxMessageBox(std2wx("The selected files have been copied"),_T("Copy files"),wxOK,this); } + //================================================= + void WxGimmickView::AddDir(std::string dirName) + { + mProgressDialog = new wxProgressDialog(_T("Adding directory"),_T(""),1000,this,wxPD_ELAPSED_TIME |wxPD_CAN_ABORT ); + mCurrentDirectory = crea::std2wx(dirName); + mGimmick->AddDir(crea::wx2std(mNotebook->GetPageText(mNotebook->GetSelection())),dirName,true); + mProgressDialog->Pulse(_T("Updating view...")); + + UpdateTreeViewLevel(crea::wx2std(mNotebook->GetPageText(mNotebook->GetSelection())),1); + delete mProgressDialog; + DisplayAddSummary(); + } + //================================================= void WxGimmickView::OnSynchronize(wxCommandEvent& event) { @@ -750,7 +763,7 @@ namespace creaImageIO if (addToDB) { mProgressDialog = new wxProgressDialog(_T("Adding directory"),_T(""),1000,this,wxPD_ELAPSED_TIME |wxPD_CAN_ABORT ); - mCurrentDirectory = gimmickTools->getOutputDir(); // Try // JPRx + mCurrentDirectory = gimmickTools->getOutputDir(); mGimmick->AddDir(crea::wx2std(mNotebook->GetPageText(mNotebook->GetSelection())),outputDir,true); mProgressDialog->Pulse(_T("Updating view...")); @@ -766,6 +779,7 @@ namespace creaImageIO wxMessageBox(_T("One or both of the directory fields are empty"),_T("Empty Fields"),wxOK,this); } } + delete gimmickTools; #endif } diff --git a/src2/creaImageIOWxGimmickView.h b/src2/creaImageIOWxGimmickView.h index 074a571..0b4c74d 100644 --- a/src2/creaImageIOWxGimmickView.h +++ b/src2/creaImageIOWxGimmickView.h @@ -67,6 +67,8 @@ namespace creaImageIO void ClearSelection(); ///Copies selected files void CopyFiles(const std::vector& filenames); + ///Add selected files to the Database + void AddDir(std::string dirName); ///Sends a request to read the currently selected node and the ones that surround it. -- 2.45.1