fix cloud upload message box
This commit is contained in:
@@ -10,13 +10,7 @@ void App::cloud_upload()
|
|||||||
return;
|
return;
|
||||||
if (Canvas::I->m_newdoc)
|
if (Canvas::I->m_newdoc)
|
||||||
{
|
{
|
||||||
auto msgbox = new NodeMessageBox();
|
message_box("Warning", "This document needs to be saved before upload.");
|
||||||
msgbox->m_manager = &layout;
|
|
||||||
msgbox->init();
|
|
||||||
msgbox->m_title->set_text("Warning");
|
|
||||||
msgbox->m_message->set_text("This document needs to be saved before upload.");
|
|
||||||
layout[main_id]->add_child(msgbox);
|
|
||||||
layout[main_id]->update();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -35,18 +29,10 @@ void App::cloud_upload()
|
|||||||
});
|
});
|
||||||
|
|
||||||
pb->destroy();
|
pb->destroy();
|
||||||
auto msgbox = new NodeMessageBox();
|
message_box("Success", "This document has been succesfully uploaded.");
|
||||||
msgbox->m_manager = &layout;
|
|
||||||
msgbox->init();
|
|
||||||
msgbox->m_title->set_text("Success");
|
|
||||||
msgbox->m_message->set_text("This document has been succesfully uploaded.");
|
|
||||||
layout[main_id]->add_child(msgbox);
|
|
||||||
layout[main_id]->update();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
auto m = layout[main_id]->add_child<NodeMessageBox>();
|
auto m = message_box("Publish document", "Would you like to upload to the public domain?");
|
||||||
m->m_title->set_text("Publish document");
|
|
||||||
m->m_message->set_text("Would you like to upload to the public domain?");
|
|
||||||
m->btn_ok->m_text->set_text("Yes");
|
m->btn_ok->m_text->set_text("Yes");
|
||||||
m->btn_cancel->m_text->set_text("No");
|
m->btn_cancel->m_text->set_text("No");
|
||||||
m->btn_ok->on_click = [this, m, upload_thread](Node*) {
|
m->btn_ok->on_click = [this, m, upload_thread](Node*) {
|
||||||
@@ -56,7 +42,6 @@ void App::cloud_upload()
|
|||||||
m->btn_cancel->on_click = [this, m, upload_thread](Node*) {
|
m->btn_cancel->on_click = [this, m, upload_thread](Node*) {
|
||||||
m->destroy();
|
m->destroy();
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user