implement work_path for documents and data_path for assets
This commit is contained in:
@@ -23,10 +23,9 @@ void App::cloud_upload()
|
||||
else
|
||||
{
|
||||
auto upload_thread = [this] {
|
||||
std::string path = data_path + "/" + doc_name + ".ppi";
|
||||
if (ui::Canvas::I->m_unsaved)
|
||||
{
|
||||
Canvas::I->project_save_thread(path);
|
||||
Canvas::I->project_save_thread(doc_path);
|
||||
}
|
||||
|
||||
async_start();
|
||||
@@ -34,7 +33,7 @@ void App::cloud_upload()
|
||||
async_redraw();
|
||||
async_end();
|
||||
|
||||
upload(path, doc_name + ".ppi", [this,pb](float p){
|
||||
upload(doc_path, doc_filename, [this,pb](float p){
|
||||
async_start();
|
||||
pb->m_progress->SetWidthP(p * 100.f);
|
||||
async_redraw();
|
||||
@@ -90,7 +89,7 @@ void App::cloud_upload_all()
|
||||
}
|
||||
|
||||
int progress = 0;
|
||||
int total = names.size();
|
||||
int total = (int)names.size();
|
||||
|
||||
for (const auto& n : names)
|
||||
{
|
||||
@@ -130,7 +129,6 @@ void App::cloud_browse()
|
||||
// load thumbnail test
|
||||
auto dialog = std::make_shared<NodeDialogCloud>();
|
||||
dialog->m_manager = &layout;
|
||||
dialog->data_path = data_path;
|
||||
dialog->init();
|
||||
dialog->create();
|
||||
dialog->loaded();
|
||||
@@ -148,8 +146,7 @@ void App::cloud_browse()
|
||||
m->m_message->set_text("Download in progress");
|
||||
async_redraw();
|
||||
async_end();
|
||||
|
||||
download(dialog->selected_file, [this,m](float p){
|
||||
download(dialog->selected_path, [this,m](float p){
|
||||
static char progress[256];
|
||||
sprintf(progress, "Download in progress %.2f%%", p * 100.f);
|
||||
async_start();
|
||||
|
||||
Reference in New Issue
Block a user