add share button and implement AirDrop share in OSX, update info.plist to set on Mac OS the default app for PPI, on iOS include the Documents/Inbox subfolder used to store the received files from AirDrop
This commit is contained in:
@@ -88,7 +88,7 @@ void NodeDialogBrowse::init_controls()
|
||||
realpath(path.c_str(), path_buffer);
|
||||
#endif
|
||||
working_path->set_text_format("Destination dir: %s", path_buffer);
|
||||
search_path = path;
|
||||
search_paths = {path};
|
||||
clear_list();
|
||||
init_list();
|
||||
async_update();
|
||||
@@ -122,19 +122,29 @@ void NodeDialogBrowse::clear_list()
|
||||
|
||||
void NodeDialogBrowse::init_list()
|
||||
{
|
||||
auto names = Asset::list_files(search_path, false, ".*\\.ppi");
|
||||
for (const auto& n : names)
|
||||
std::vector<std::tuple<std::string/*file-name*/, std::string/*path*/>> files;
|
||||
for (auto sp : search_paths)
|
||||
{
|
||||
ui::Image thumb = ui::Canvas::I->thumbnail_read(search_path + "/" + n);
|
||||
auto items = Asset::list_files(sp, false, ".*\\.ppi");
|
||||
for (const auto& i : items)
|
||||
{
|
||||
files.push_back({i, sp + '/' + i});
|
||||
}
|
||||
}
|
||||
for (const auto& f : files)
|
||||
{
|
||||
auto f_name = std::get<0>(f);
|
||||
auto f_path = std::get<1>(f);
|
||||
ui::Image thumb = ui::Canvas::I->thumbnail_read(f_path);
|
||||
if (thumb.width == 0 || thumb.height == 0)
|
||||
continue;
|
||||
|
||||
auto node = new NodeDialogBrowseItem;
|
||||
node->m_manager = m_manager;
|
||||
node->init();
|
||||
node->m_text->set_text(n.c_str());
|
||||
node->m_path = search_path + "/" + n;
|
||||
node->m_file_name = n;
|
||||
node->m_text->set_text(f_name.c_str());
|
||||
node->m_path = f_path;
|
||||
node->m_file_name = f_name;
|
||||
node->on_selected = [&](NodeDialogBrowseItem* target) {
|
||||
if (target == current)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user