annotate cagou/plugins/plugin_wid_file_sharing.kv @ 242:c2503168fab7

plugin chat (encryption): added a button to display trust management UI.
author Goffi <goffi@goffi.org>
date Thu, 03 Jan 2019 10:52:57 +0100
parents 059c5b39032d
children cf61a011f731
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
192
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
1 # Cagou: desktop/mobile frontend for Salut à Toi XMPP client
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
2 # Copyright (C) 2016-2018 Jérôme Poisson (goffi@goffi.org)
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
3
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
4 # This program is free software: you can redistribute it and/or modify
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
5 # it under the terms of the GNU Affero General Public License as published by
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
6 # the Free Software Foundation, either version 3 of the License, or
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
7 # (at your option) any later version.
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
8
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
9 # This program is distributed in the hope that it will be useful,
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
12 # GNU Affero General Public License for more details.
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
13
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
14 # You should have received a copy of the GNU Affero General Public License
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
16
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
17 #:import ModernMenu kivy.garden.modernmenu.ModernMenu
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
18
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
19
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
20 <ModeBtn>:
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
21 width: self.texture_size[0] + sp(20)
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
22 size_hint: None, 1
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
23
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
24
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
25 <FileSharing>:
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
26 float_layout: float_layout
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
27 layout: layout
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
28 FloatLayout:
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
29 id: float_layout
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
30 ScrollView:
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
31 size_hint: 1, 1
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
32 pos_hint: {'x': 0, 'y': 0}
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
33 do_scroll_x: False
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
34 scroll_type: ['bars', 'content']
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
35 bar_width: dp(6)
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
36 StackLayout:
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
37 id: layout
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
38 size_hint: 1, None
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
39 height: self.minimum_height
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
40 spacing: 0
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
41
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
42
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
43 <PathWidget>:
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
44 shared: False
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
45 Symbol:
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
46 size_hint: 1, None
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
47 height: dp(80)
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
48 symbol: 'folder-open-empty' if root.is_dir else 'doc'
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
49 margin: dp(40)
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
50 color: (1, 0, 0, 1) if root.shared else (0, 0, 0, 1) if root.is_dir else app.c_prim_dark
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
51 Label:
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
52 size_hint: None, None
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
53 width: dp(100)
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
54 font_size: sp(14)
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
55 text_size: dp(95), None
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
56 size: self.texture_size
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
57 text: root.name
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
58 halign: 'center'
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
59
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
60
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
61 <LocalPathWidget>:
222
a676cb07c1cb core (menu): TouchMenuBehaviour:
Goffi <goffi@goffi.org>
parents: 206
diff changeset
62 shared: root.filepath in root.main_wid.shared_paths