implement download and open from the cloud browser

This commit is contained in:
2017-11-06 10:07:19 +00:00
parent 05c5bd1bdb
commit fc402d584a
7 changed files with 54 additions and 27 deletions

View File

@@ -89,7 +89,6 @@ void NodeDialogCloud::load_thumbs_thread()
thumb.create(width, height);
thumb.copy_from((uint8_t*)rgb.data());
App::I.async_start();
auto node = new NodeDialogCloudItem;
node->m_manager = m_manager;
@@ -104,20 +103,16 @@ void NodeDialogCloud::load_thumbs_thread()
App::I.async_update();
App::I.async_end();
// node->on_selected = [&](NodeDialogCloudItem* target) {
// if (target == current)
// return;
// selected_path = target->m_path;
// selected_file = target->m_file_name;
// selected_name = selected_file.substr(0, selected_file.length() - 5);
// if (current)
// current->m_selected = false;
// current = target;
// };
// load thumb
// ui::Image thumb = ui::Canvas::I->thumbnail_read(node->m_path);
node->on_selected = [&](NodeDialogCloudItem* target) {
if (target == current)
return;
selected_path = target->m_path;
selected_file = target->m_file_name;
selected_name = selected_file.substr(0, selected_file.length() - 5);
if (current)
current->m_selected = false;
current = target;
};
}
curl_easy_cleanup(curl);
}