Mercurial > libervia-desktop-kivy
annotate cagou/kv/profile_manager.kv @ 491:203755bbe0fe
massive refactoring from camelCase -> snake_case. See backend commit log for more details
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 08 Apr 2023 13:44:32 +0200 |
parents | 3c9ba4a694ef |
children |
rev | line source |
---|---|
0 | 1 # Cagou: desktop/mobile frontend for Salut à Toi XMPP client |
461 | 2 # Copyright (C) 2016-2021 Jérôme Poisson (goffi@goffi.org) |
0 | 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 | |
2
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
17 |
0 | 18 <ProfileManager>: |
19 Label: | |
270
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
20 size_hint: 1, None |
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
21 text_size: root.width, None |
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
22 width: self.texture_size[0] |
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
23 height: self.texture_size[1] + dp(20) |
0 | 24 text: "Profile Manager" |
270
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
25 halign: "center" |
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
26 bold: True |
0 | 27 |
1
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
28 <PMLabel@Label>: |
62 | 29 size_hint: 1, None |
30 height: sp(30) | |
1
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
31 |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
32 <PMInput@TextInput>: |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
33 multiline: False |
62 | 34 size_hint: 1, None |
35 height: sp(30) | |
1
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
36 write_tab: False |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
37 |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
38 <PMButton@Button>: |
270
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
39 size_hint: 1, None |
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
40 height: dp(40) |
1
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
41 |
2
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
42 |
1
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
43 <NewProfileScreen>: |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
44 profile_name: profile_name |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
45 jid: jid |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
46 password: password |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
47 |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
48 BoxLayout: |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
49 orientation: "vertical" |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
50 |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
51 Label: |
270
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
52 size_hint: 1, None |
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
53 text_size: root.width, None |
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
54 size: self.texture_size |
1
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
55 text: "Creation of a new profile" |
270
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
56 halign: "center" |
1
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
57 Label: |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
58 text: root.error_msg |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
59 bold: True |
270
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
60 size_hint: 1, None |
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
61 height: dp(40) |
1
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
62 color: 1,0,0,1 |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
63 GridLayout: |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
64 cols: 2 |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
65 |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
66 PMLabel: |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
67 text: "Profile name" |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
68 PMInput: |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
69 id: profile_name |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
70 |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
71 PMLabel: |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
72 text: "JID" |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
73 PMInput: |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
74 id: jid |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
75 |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
76 PMLabel: |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
77 text: "Password" |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
78 PMInput: |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
79 id: password |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
80 password: True |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
81 |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
82 Widget: |
270
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
83 size_hint: 1, None |
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
84 height: dp(50) |
1
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
85 |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
86 Widget: |
270
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
87 size_hint: 1, None |
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
88 height: dp(50) |
1
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
89 |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
90 PMButton: |
2
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
91 text: "OK" |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
92 on_press: root.doCreate() |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
93 |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
94 PMButton: |
1
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
95 text: "Cancel" |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
96 on_press: |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
97 root.pm.screen_manager.transition.direction = 'right' |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
98 root.pm.screen_manager.current = 'profiles' |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
99 |
2
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
100 Widget: |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
101 |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
102 |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
103 <DeleteProfilesScreen>: |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
104 BoxLayout: |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
105 orientation: "vertical" |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
106 |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
107 Label: |
270
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
108 size_hint: 1, None |
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
109 text_size: root.width, None |
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
110 size: self.texture_size |
2
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
111 text: "Are you sure you want to delete the following profiles?" |
270
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
112 halign: "center" |
2
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
113 |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
114 Label: |
270
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
115 size_hint: 1, None |
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
116 text_size: root.width, None |
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
117 height: self.texture_size[1] + dp(60) |
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
118 width: self.texture_size[0] |
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
119 halign: "center" |
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
120 # for now we only handle single selection |
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
121 text: u'\n'.join([i.text for i in [root.pm.selected]]) if root.pm.selected else u'' |
2
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
122 bold: True |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
123 |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
124 Label: |
270
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
125 size_hint: 1, None |
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
126 text_size: root.width, dp(30) |
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
127 height: self.texture_size[1] |
2
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
128 text: u'/!\\ WARNING: this operation is irreversible' |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
129 color: 1,0,0,1 |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
130 bold: True |
270
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
131 halign: "center" |
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
132 valign: "top" |
2
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
133 GridLayout: |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
134 cols: 2 |
270
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
135 PMButton: |
2
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
136 text: "Delete" |
491
203755bbe0fe
massive refactoring from camelCase -> snake_case. See backend commit log for more details
Goffi <goffi@goffi.org>
parents:
461
diff
changeset
|
137 on_press: root.do_delete() |
2
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
138 |
270
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
139 PMButton: |
2
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
140 text: "Cancel" |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
141 on_press: |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
142 root.pm.screen_manager.transition.direction = 'right' |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
143 root.pm.screen_manager.current = 'profiles' |
1
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
144 |
2
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
145 |
1
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
146 <ProfilesScreen>: |
0 | 147 layout: layout |
148 BoxLayout: | |
149 orientation: 'vertical' | |
150 | |
151 Label: | |
270
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
152 size_hint: 1, None |
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
153 text_size: root.width, None |
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
154 size: self.texture_size |
62 | 155 text: "Select a profile or create a new one" |
270
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
156 halign: "center" |
0 | 157 |
158 GridLayout: | |
159 cols: 2 | |
270
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
160 size_hint: 1, None |
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
161 height: dp(40) |
0 | 162 Button: |
163 text: "New" | |
1
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
164 on_press: |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
165 root.pm.screen_manager.transition.direction = 'left' |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
166 root.pm.screen_manager.current = 'new_profile' |
0 | 167 Button: |
270
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
168 disabled: not root.pm.selected |
0 | 169 text: "Delete" |
2
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
170 on_press: |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
171 root.pm.screen_manager.transition.direction = 'left' |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
172 root.pm.screen_manager.current = 'delete_profiles' |
270
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
173 ScrollView |
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
174 BoxLayout: |
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
175 size_hint: 1, None |
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
176 height: self.minimum_height |
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
177 orientation: "vertical" |
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
178 id: layout |
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
179 Button |
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
180 text: "Connect" |
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
181 size_hint: 1, None |
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
182 height: dp(40) |
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
183 disabled: not root.pm.selected |
491
203755bbe0fe
massive refactoring from camelCase -> snake_case. See backend commit log for more details
Goffi <goffi@goffi.org>
parents:
461
diff
changeset
|
184 on_press: root.pm._on_connect_profiles() |
0 | 185 |
2
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
186 |
0 | 187 <ProfileItem>: |
270
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
188 size_hint: 1, None |
148
d1408a98c505
profile manager: removed images (use plain color instead), and changed colors
Goffi <goffi@goffi.org>
parents:
126
diff
changeset
|
189 background_normal: "" |
d1408a98c505
profile manager: removed images (use plain color instead), and changed colors
Goffi <goffi@goffi.org>
parents:
126
diff
changeset
|
190 background_down: "" |
d1408a98c505
profile manager: removed images (use plain color instead), and changed colors
Goffi <goffi@goffi.org>
parents:
126
diff
changeset
|
191 deselected_color: (1,1,1,1) if self.index%2 else (0.87,0.87,0.87,1) |
d1408a98c505
profile manager: removed images (use plain color instead), and changed colors
Goffi <goffi@goffi.org>
parents:
126
diff
changeset
|
192 selected_color: 0.67,1.0,1.0,1 |
270
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
193 selected: self.state == 'down' |
0 | 194 color: 0,0,0,1 |
270
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
195 background_color: self.selected_color if self.selected else self.deselected_color |
491
203755bbe0fe
massive refactoring from camelCase -> snake_case. See backend commit log for more details
Goffi <goffi@goffi.org>
parents:
461
diff
changeset
|
196 on_press: self.ps.pm.select_profile(self) |
270
89ba66464329
profile manager: don't use anymore deprecated ListView + use dp() for sizes of buttons instead of relative size.
Goffi <goffi@goffi.org>
parents:
148
diff
changeset
|
197 height: dp(30) |