mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-02 09:23:18 +00:00
Add default path when creating new source
This commit is contained in:
parent
14d04f6a77
commit
d6c781faa2
7 changed files with 24 additions and 6 deletions
|
@ -8,6 +8,7 @@
|
|||
#include "AppWindow.h"
|
||||
#include "SeleniteSetup.h"
|
||||
#include "Utils.h"
|
||||
#include "evalyte-cpp-common/evalyte.h"
|
||||
#include "mirai-core/DataProvider.h"
|
||||
#include "mirai-core/DateTime.h"
|
||||
#include "mirai-core/Day.h"
|
||||
|
@ -48,6 +49,10 @@ AppWindowBackend::AppWindowBackend(mirai::Mirai *miraiInstance)
|
|||
}
|
||||
);
|
||||
|
||||
addSourceWindow_->set_default_source_path(
|
||||
slint::SharedString(evalyte::dataDirectoryPath("mirai") + "/")
|
||||
);
|
||||
|
||||
const auto palettePath = std::string(getenv("HOME")) + "/.config/evalyte/theme.json";
|
||||
const auto palette = selenite::parseJson(palettePath);
|
||||
if (palette.has_value()) {
|
||||
|
@ -138,6 +143,8 @@ void AppWindowBackend::setupCallbacks()
|
|||
std::string(params.name), std::string(params.type), std::move(file)
|
||||
);
|
||||
addSourceWindow_->hide();
|
||||
view_.setAllSources();
|
||||
view_.update();
|
||||
reloadSources();
|
||||
reloadTasks();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue