implement pick_dir on windows, upload VS project,

This commit is contained in:
2018-10-08 03:51:05 +02:00
parent c9c7b9f1c4
commit bc64d3c241
7 changed files with 89 additions and 22 deletions

View File

@@ -202,14 +202,22 @@ void NodeDialogSave::init_controls()
LOG("change working path to %s", path.c_str());
async_start();
App::I.work_path = path;
#ifdef _WIN32
GetFullPathNameA(path.c_str(), sizeof(path_buffer), path_buffer, nullptr);
#else
realpath(path.c_str(), path_buffer);
#endif
working_path->set_text_format("Working dir: %s", path_buffer);
async_update();
async_end();
});
};
working_path = find<NodeText>("path");
#ifdef _WIN32
GetFullPathNameA(App::I.work_path.c_str(), sizeof(path_buffer), path_buffer, nullptr);
#else
realpath(App::I.work_path.c_str(), path_buffer);
#endif
working_path->set_text_format("Working dir: %s", path_buffer);
#endif
}
@@ -258,14 +266,22 @@ void NodeDialogNewDoc::init_controls()
LOG("change working path to %s", path.c_str());
async_start();
App::I.work_path = path;
#ifdef _WIN32
GetFullPathNameA(path.c_str(), sizeof(path_buffer), path_buffer, nullptr);
#else
realpath(path.c_str(), path_buffer);
#endif
working_path->set_text_format("Working dir: %s", path_buffer);
async_update();
async_end();
});
};
working_path = find<NodeText>("path");
#ifdef _WIN32
GetFullPathNameA(App::I.work_path.c_str(), sizeof(path_buffer), path_buffer, nullptr);
#else
realpath(App::I.work_path.c_str(), path_buffer);
#endif
working_path->set_text_format("Working dir: %s", path_buffer);
#endif
}