src: switched to using only wstring for status message
This commit is contained in:
@@ -9,7 +9,7 @@ DialogView::~DialogView()
|
||||
{
|
||||
}
|
||||
|
||||
void DialogView::showUnknownProgressDialog(const std::string& title, const std::string& message)
|
||||
void DialogView::showUnknownProgressDialog(const std::wstring& title, const std::wstring& message)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ void DialogView::hideUnknownProgressDialog()
|
||||
{
|
||||
}
|
||||
|
||||
void DialogView::showProgressDialog(const std::string& title, const std::string& message, size_t progress)
|
||||
void DialogView::showProgressDialog(const std::wstring& title, const std::wstring& message, size_t progress)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -16,10 +16,10 @@ public:
|
||||
DialogView(StorageAccess* storageAccess);
|
||||
virtual ~DialogView();
|
||||
|
||||
virtual void showUnknownProgressDialog(const std::string& title, const std::string& message);
|
||||
virtual void showUnknownProgressDialog(const std::wstring& title, const std::wstring& message);
|
||||
virtual void hideUnknownProgressDialog();
|
||||
|
||||
virtual void showProgressDialog(const std::string& title, const std::string& message, size_t progress);
|
||||
virtual void showProgressDialog(const std::wstring& title, const std::wstring& message, size_t progress);
|
||||
virtual void hideProgressDialog();
|
||||
|
||||
virtual void startIndexingDialog(
|
||||
|
||||
@@ -18,7 +18,7 @@ TaskCleanStorage::TaskCleanStorage(
|
||||
void TaskCleanStorage::doEnter(std::shared_ptr<Blackboard> blackboard)
|
||||
{
|
||||
Application::getInstance()->getDialogView()->showUnknownProgressDialog(
|
||||
"Clearing Files", std::to_string(m_filePaths.size()) + " Files");
|
||||
L"Clearing Files", std::to_wstring(m_filePaths.size()) + L" Files");
|
||||
|
||||
m_start = utility::durationStart();
|
||||
|
||||
@@ -33,7 +33,7 @@ Task::TaskState TaskCleanStorage::doUpdate(std::shared_ptr<Blackboard> blackboar
|
||||
m_storage->clearFileElements(m_filePaths, [=](int progress)
|
||||
{
|
||||
Application::getInstance()->getDialogView()->showProgressDialog(
|
||||
"Clearing", std::to_string(m_filePaths.size()) + " Files", progress);
|
||||
L"Clearing", std::to_wstring(m_filePaths.size()) + L" Files", progress);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -34,10 +34,10 @@ Task::TaskState TaskFinishParsing::doUpdate(std::shared_ptr<Blackboard> blackboa
|
||||
|
||||
std::shared_ptr<DialogView> dialogView = Application::getInstance()->getDialogView();
|
||||
|
||||
dialogView->showUnknownProgressDialog("Finish Indexing", "Optimizing database");
|
||||
dialogView->showUnknownProgressDialog(L"Finish Indexing", L"Optimizing database");
|
||||
m_storage->optimizeMemory();
|
||||
|
||||
dialogView->showUnknownProgressDialog("Finish Indexing", "Building caches");
|
||||
dialogView->showUnknownProgressDialog(L"Finish Indexing", L"Building caches");
|
||||
m_storage->buildCaches();
|
||||
|
||||
dialogView->hideUnknownProgressDialog();
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
#include "Application.h"
|
||||
|
||||
TaskShowUnknownProgressDialog::TaskShowUnknownProgressDialog(
|
||||
const std::string& title,
|
||||
const std::string& message
|
||||
const std::wstring& title,
|
||||
const std::wstring& message
|
||||
)
|
||||
: m_title(title)
|
||||
, m_message(message)
|
||||
|
||||
@@ -10,8 +10,8 @@ class TaskShowUnknownProgressDialog
|
||||
{
|
||||
public:
|
||||
TaskShowUnknownProgressDialog(
|
||||
const std::string& title,
|
||||
const std::string& message
|
||||
const std::wstring& title,
|
||||
const std::wstring& message
|
||||
);
|
||||
|
||||
virtual ~TaskShowUnknownProgressDialog();
|
||||
@@ -22,8 +22,8 @@ private:
|
||||
virtual void doExit(std::shared_ptr<Blackboard> blackboard);
|
||||
virtual void doReset(std::shared_ptr<Blackboard> blackboard);
|
||||
|
||||
const std::string m_title;
|
||||
const std::string m_message;
|
||||
const std::wstring m_title;
|
||||
const std::wstring m_message;
|
||||
};
|
||||
|
||||
#endif // TASK_SHOW_UNKNOWN_PROGRESS_DIALOG_H
|
||||
|
||||
@@ -245,7 +245,7 @@ void Project::refresh(RefreshMode refreshMode, DialogView* dialogView)
|
||||
}
|
||||
}
|
||||
|
||||
dialogView->showUnknownProgressDialog("Preparing Project", "Processing Files");
|
||||
dialogView->showUnknownProgressDialog(L"Preparing Project", L"Processing Files");
|
||||
ScopedFunctor dialogHider([&dialogView](){
|
||||
dialogView->hideUnknownProgressDialog();
|
||||
});
|
||||
@@ -333,7 +333,7 @@ void Project::buildIndex(const RefreshInfo& info, DialogView* dialogView)
|
||||
MessageStatus(L"Preparing Indexing", false, true).dispatch();
|
||||
MessageClearErrorCount().dispatch();
|
||||
|
||||
dialogView->showUnknownProgressDialog("Preparing Indexing", "Setting up Indexers");
|
||||
dialogView->showUnknownProgressDialog(L"Preparing Indexing", L"Setting up Indexers");
|
||||
|
||||
std::shared_ptr<TaskGroupSequence> taskSequential = std::make_shared<TaskGroupSequence>();
|
||||
|
||||
@@ -440,7 +440,7 @@ void Project::buildIndex(const RefreshInfo& info, DialogView* dialogView)
|
||||
);
|
||||
// add task that notifies the user of what's going on
|
||||
taskSequential->addTask( // we don't need to hide this dialog again, because it's overridden by other dialogs later on.
|
||||
std::make_shared<TaskShowUnknownProgressDialog>("Finish Indexing", "Saving\nRemaining Data")
|
||||
std::make_shared<TaskShowUnknownProgressDialog>(L"Finish Indexing", L"Saving\nRemaining Data")
|
||||
);
|
||||
|
||||
// add task that injects the remaining intermediate storages into the persistent storage
|
||||
|
||||
Reference in New Issue
Block a user