mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-02 01:13:19 +00:00
Replace 'add source window' with popup
This commit is contained in:
parent
854152b395
commit
fcdeec19ed
8 changed files with 98 additions and 76 deletions
|
@ -165,6 +165,12 @@ void AppWindow::setupCallbacks()
|
|||
reloadTasks();
|
||||
});
|
||||
|
||||
actions().on_add_source([&](slint::SharedString name, slint::SharedString path) {
|
||||
std::unique_ptr<mirai::DataProvider> file =
|
||||
std::make_unique<mirai::MarkdownDataProvider>(std::string(path));
|
||||
miraiInstance_->addSource(std::string(name), "FileSystemMarkdown", std::move(file));
|
||||
});
|
||||
|
||||
actions().on_edit_source([&](int sourceId, slint::SharedString name, slint::SharedString path) {
|
||||
miraiInstance_->editSource(sourceId, std::string(name), std::string(path));
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue