comparison libervia/desktop_kivy/plugins/plugin_wid_contact_list.kv @ 493:b3cedbee561d

refactoring: rename `cagou` to `libervia.desktop_kivy` + update imports and names following backend changes
author Goffi <goffi@goffi.org>
date Fri, 02 Jun 2023 18:26:16 +0200
parents cagou/plugins/plugin_wid_contact_list.kv@203755bbe0fe
children
comparison
equal deleted inserted replaced
492:5114bbb5daa3 493:b3cedbee561d
1 #Libervia Desktop-Kivy
2 # Copyright (C) 2016-2021 Jérôme Poisson (goffi@goffi.org)
3
4 # This program is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU Affero General Public License as published by
6 # the Free Software Foundation, either version 3 of the License, or
7 # (at your option) any later version.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU Affero General Public License for more details.
13
14 # You should have received a copy of the GNU Affero General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16
17 #:import _ libervia.backend.core.i18n._
18 #:import e kivy.utils.escape_markup
19
20 <AddContactMenu>:
21 padding: dp(20)
22 spacing: dp(10)
23 Label:
24 size_hint: 1, None
25 color: 1, 1, 1, 1
26 text: _("Please enter new contact JID")
27 text_size: root.width, None
28 size: self.texture_size
29 halign: "center"
30 bold: True
31 TextInput:
32 id: contact_jid
33 size_hint: 1, None
34 height: sp(30)
35 hint_text: _("enter here your new contact JID")
36 Button:
37 size_hint: 1, None
38 height: sp(50)
39 text: _("add this contact")
40 on_release: root.contact_add(contact_jid.text)
41 Widget:
42
43
44 <DelContactMenu>:
45 padding: dp(20)
46 spacing: dp(10)
47 Avatar:
48 id: avatar
49 size_hint: 1, None
50 height: dp(60)
51 data: root.contact_item.data.get('avatar')
52 allow_stretch: True
53 Label:
54 size_hint: 1, None
55 color: 1, 1, 1, 1
56 text: _("Are you sure you wand to remove [b]{name}[/b] from your contact list?").format(name=e(root.contact_item.jid))
57 markup: True
58 text_size: root.width, None
59 size: self.texture_size
60 halign: "center"
61 BoxLayout:
62 Button:
63 background_color: 1, 0, 0, 1
64 size_hint: 0.5, None
65 height: sp(50)
66 text: _("yes, remove it")
67 bold: True
68 on_release: root.do_delete_contact()
69 Button:
70 size_hint: 0.5, None
71 height: sp(50)
72 text: _("no, keep it")
73 on_release: root.hide()
74 Widget:
75
76
77 <ContactList>:
78 float_layout: float_layout
79 layout: layout
80 orientation: 'vertical'
81 BoxLayout:
82 size_hint: 1, None
83 height: dp(35)
84 width: dp(35)
85 font_size: dp(30)
86 Widget:
87 SymbolButtonLabel:
88 symbol: 'plus-circled'
89 text: _("add a contact")
90 on_release: root.add_contact_menu()
91 Widget:
92 FloatLayout:
93 id: float_layout
94 ScrollView:
95 size_hint: 1, 1
96 pos_hint: {'x': 0, 'y': 0}
97 do_scroll_x: False
98 scroll_type: ['bars', 'content']
99 bar_width: dp(6)
100 StackLayout:
101 id: layout
102 size_hint: 1, None
103 height: self.minimum_height
104 spacing: 0