Mercurial > libervia-desktop-kivy
annotate libervia/desktop_kivy/kv/dialog.kv @ 514:d78728d7fd6a
plugin wid calls, core: implements WebRTC DataChannel file transfer:
- Add a new "file" icon in call UI to send a file via WebRTC.
- Handle new preflight mechanism, and WebRTC file transfer.
- Native file chooser handling has been moved to new `core.file_chooser` module, and now
supports "save" and "dir" modes (based on `plyer`).
rel 442
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 06 Apr 2024 13:37:27 +0200 |
parents | b3cedbee561d |
children |
rev | line source |
---|---|
493
b3cedbee561d
refactoring: rename `cagou` to `libervia.desktop_kivy` + update imports and names following backend changes
Goffi <goffi@goffi.org>
parents:
461
diff
changeset
|
1 #Libervia Desktop-Kivy |
461 | 2 # Copyright (C) 2016-2021 Jérôme Poisson (goffi@goffi.org) |
203
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
3 |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
4 # This program is free software: you can redistribute it and/or modify |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
5 # it under the terms of the GNU Affero General Public License as published by |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
6 # the Free Software Foundation, either version 3 of the License, or |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
7 # (at your option) any later version. |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
8 |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
9 # This program is distributed in the hope that it will be useful, |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
12 # GNU Affero General Public License for more details. |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
13 |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
14 # You should have received a copy of the GNU Affero General Public License |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
15 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
16 |
493
b3cedbee561d
refactoring: rename `cagou` to `libervia.desktop_kivy` + update imports and names following backend changes
Goffi <goffi@goffi.org>
parents:
461
diff
changeset
|
17 #:import _ libervia.backend.core.i18n._ |
203
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
18 |
243 | 19 |
20 <MessageDialog>: | |
21 orientation: "vertical" | |
22 spacing: dp(5) | |
23 canvas.before: | |
24 Color: | |
25 rgba: 0, 0, 0, 1 | |
26 Rectangle: | |
27 pos: self.pos | |
28 size: self.size | |
29 Label: | |
30 size_hint: 1, None | |
31 text_size: root.width, None | |
32 size: self.texture_size | |
33 font_size: sp(20) | |
34 padding: dp(5), dp(10) | |
35 color: 1, 1, 1, 1 | |
36 text: root.title | |
37 halign: "center" | |
38 italic: True | |
39 bold: True | |
40 Label: | |
41 text: root.message | |
42 text_size: root.width, None | |
43 size: self.texture_size | |
44 padding: dp(25), 0 | |
45 font_size: sp(20) | |
46 color: 1, 1, 1, 1 | |
47 Button: | |
48 size_hint: 1, None | |
49 height: dp(50) | |
50 background_color: 0.33, 1.0, 0.0, 1 | |
51 text: _("Close") | |
52 bold: True | |
53 on_release: root.close_cb() | |
54 | |
55 | |
203
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
56 <ConfirmDialog>: |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
57 orientation: "vertical" |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
58 spacing: dp(5) |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
59 canvas.before: |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
60 Color: |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
61 rgba: 0, 0, 0, 1 |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
62 Rectangle: |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
63 pos: self.pos |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
64 size: self.size |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
65 Label: |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
66 size_hint: 1, None |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
67 text_size: root.width, None |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
68 size: self.texture_size |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
69 font_size: sp(20) |
226
1abd9d694e67
dialog: added some padding in ConfirmDialog
Goffi <goffi@goffi.org>
parents:
203
diff
changeset
|
70 padding: dp(5), dp(10) |
203
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
71 color: 1, 1, 1, 1 |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
72 text: root.title |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
73 halign: "center" |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
74 italic: True |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
75 bold: True |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
76 Label: |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
77 text: root.message |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
78 text_size: root.width, None |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
79 size: self.texture_size |
226
1abd9d694e67
dialog: added some padding in ConfirmDialog
Goffi <goffi@goffi.org>
parents:
203
diff
changeset
|
80 padding: dp(25), 0 |
203
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
81 font_size: sp(20) |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
82 color: 1, 1, 1, 1 |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
83 Button: |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
84 size_hint: 1, None |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
85 height: dp(50) |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
86 background_color: 0.33, 1.0, 0.0, 1 |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
87 text: _("Yes") |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
88 bold: True |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
89 on_release: root.yes_cb() if root.yes_cb is not None else None |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
90 Button: |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
91 size_hint: 1, None |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
92 height: dp(50) |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
93 text: _("No") |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
94 bold: True |
dbd2274fc78b
core: new core.dialog module with a ConfirmDialog
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
95 on_release: root.no_cb() if root.no_cb is not None else None |