|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
import { Button, VerticalBox , HorizontalBox, TabWidget, ListView, StandardListView, StandardTableView, CheckBox, LineEdit} from "std-widgets.slint";
|
|
|
|
|
import { Button, VerticalBox ,TextEdit, HorizontalBox, TabWidget, ListView, StandardListView, StandardTableView, CheckBox, LineEdit} from "std-widgets.slint";
|
|
|
|
|
import {SelectableTableView} from "selectable_tree_view.slint";
|
|
|
|
|
import {LeftSidePanel} from "left_side_panel.slint";
|
|
|
|
|
import {MainList} from "main_lists.slint";
|
|
|
|
@ -6,10 +6,12 @@ import {CurrentTab, ProgressToSend} from "common.slint";
|
|
|
|
|
import { ActionButtons } from "action_buttons.slint";
|
|
|
|
|
import { Progress } from "progress.slint";
|
|
|
|
|
import {MainListModel} from "common.slint";
|
|
|
|
|
import {Settings, SettingsModel} from "settings.slint";
|
|
|
|
|
import {Settings} from "settings.slint";
|
|
|
|
|
import {Callabler} from "callabler.slint";
|
|
|
|
|
import { BottomPanel } from "bottom_panel.slint";
|
|
|
|
|
import {ColorPalette} from "color_palette.slint";
|
|
|
|
|
|
|
|
|
|
export {Settings}
|
|
|
|
|
export {Settings, Callabler}
|
|
|
|
|
|
|
|
|
|
export component MainWindow inherits Window {
|
|
|
|
|
callback deleted;
|
|
|
|
@ -114,10 +116,76 @@ export component MainWindow inherits Window {
|
|
|
|
|
read-only: true;
|
|
|
|
|
}
|
|
|
|
|
bottom_panel := BottomPanel {
|
|
|
|
|
property <bool> included-directories; // TODO why cannot set popup_item property? Strange limitation
|
|
|
|
|
|
|
|
|
|
bottom-panel-visibility <=> action_buttons.bottom-panel-visibility;
|
|
|
|
|
vertical-stretch: 0.0;
|
|
|
|
|
folder-choose-requested(included-directories) => {root.folder-choose-requested(included-directories)}
|
|
|
|
|
show_manual_add_dialog(included-directories) => {
|
|
|
|
|
self.included-directories = included-directories;
|
|
|
|
|
popup-item.show()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
popup_item := PopupWindow {
|
|
|
|
|
height: root.height;
|
|
|
|
|
width: root.width;
|
|
|
|
|
|
|
|
|
|
property <bool> included_directories;
|
|
|
|
|
private property <string> text_data;
|
|
|
|
|
|
|
|
|
|
callback set_included_directories(bool);
|
|
|
|
|
|
|
|
|
|
close-on-click: false;
|
|
|
|
|
|
|
|
|
|
set-included-directories(included-directories) => {
|
|
|
|
|
self.included-directories = included-directories;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
HorizontalLayout {
|
|
|
|
|
alignment: LayoutAlignment.center;
|
|
|
|
|
VerticalLayout {
|
|
|
|
|
alignment: LayoutAlignment.center;
|
|
|
|
|
Rectangle {
|
|
|
|
|
clip: true;
|
|
|
|
|
width: popup_item.width - 20px;
|
|
|
|
|
height: popup_item.height - 20px;
|
|
|
|
|
border-radius: 20px;
|
|
|
|
|
background: ColorPalette.popup_background; // TODO Dark theme
|
|
|
|
|
VerticalLayout {
|
|
|
|
|
// width: parent.width - 20px;
|
|
|
|
|
// height: parent.height - 20px;
|
|
|
|
|
Text {
|
|
|
|
|
text: "Please add directories one per line";
|
|
|
|
|
horizontal-alignment: TextHorizontalAlignment.center;
|
|
|
|
|
}
|
|
|
|
|
TextEdit {
|
|
|
|
|
vertical-stretch: 1.0;
|
|
|
|
|
text <=> text-data;
|
|
|
|
|
}
|
|
|
|
|
HorizontalLayout {
|
|
|
|
|
min-height: 20px;
|
|
|
|
|
Button {
|
|
|
|
|
enabled: text-data != "";
|
|
|
|
|
text: "OK";
|
|
|
|
|
clicked => {
|
|
|
|
|
Callabler.added_manual_directories(bottom-panel.included-directories, text_data);
|
|
|
|
|
popup-item.close();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Button {
|
|
|
|
|
text: "Cancel";
|
|
|
|
|
clicked => {
|
|
|
|
|
popup-item.close();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
set_console_text(text) => {
|
|
|
|
|