Mercurial > libervia-desktop-kivy
annotate cagou/kv/profile_manager.kv @ 185:ab3f5173ef5c
chat, simple XHTML: font size adjustement
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 11 May 2018 20:07:17 +0200 |
parents | d1408a98c505 |
children | 89ba66464329 |
rev | line source |
---|---|
0 | 1 # Cagou: desktop/mobile frontend for Salut à Toi XMPP client |
126 | 2 # Copyright (C) 2016-2018 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: | |
20 text: "Profile Manager" | |
21 size_hint: 1,0.05 | |
22 | |
1
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
23 <PMLabel@Label>: |
62 | 24 size_hint: 1, None |
25 height: sp(30) | |
1
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
26 |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
27 <PMInput@TextInput>: |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
28 multiline: False |
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 write_tab: False |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
32 |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
33 <PMButton@Button>: |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
34 size_hint: 1, 0.2 |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
35 |
2
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
36 |
1
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
37 <NewProfileScreen>: |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
38 profile_name: profile_name |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
39 jid: jid |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
40 password: password |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
41 |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
42 BoxLayout: |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
43 orientation: "vertical" |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
44 |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
45 Label: |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
46 text: "Creation of a new profile" |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
47 bold: True |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
48 size_hint: 1, 0.1 |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
49 Label: |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
50 text: root.error_msg |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
51 bold: True |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
52 size_hint: 1, 0.1 |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
53 color: 1,0,0,1 |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
54 GridLayout: |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
55 cols: 2 |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
56 |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
57 PMLabel: |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
58 text: "Profile name" |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
59 PMInput: |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
60 id: profile_name |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
61 |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
62 PMLabel: |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
63 text: "JID" |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
64 PMInput: |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
65 id: jid |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
66 |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
67 PMLabel: |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
68 text: "Password" |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
69 PMInput: |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
70 id: password |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
71 password: True |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
72 |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
73 Widget: |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
74 size_hint: 1, 0.2 |
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 Widget: |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
77 size_hint: 1, 0.2 |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
78 |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
79 PMButton: |
2
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
80 text: "OK" |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
81 on_press: root.doCreate() |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
82 |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
83 PMButton: |
1
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
84 text: "Cancel" |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
85 on_press: |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
86 root.pm.screen_manager.transition.direction = 'right' |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
87 root.pm.screen_manager.current = 'profiles' |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
88 |
2
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
89 Widget: |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
90 |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
91 |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
92 <DeleteProfilesScreen>: |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
93 BoxLayout: |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
94 orientation: "vertical" |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
95 |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
96 Label: |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
97 text: "Are you sure you want to delete the following profiles?" |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
98 size_hint: 1, 0.1 |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
99 |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
100 Label: |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
101 text: u'\n'.join([i.text for i in root.pm.profiles_screen.list_adapter.selection]) |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
102 bold: True |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
103 |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
104 Label: |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
105 text: u'/!\\ WARNING: this operation is irreversible' |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
106 color: 1,0,0,1 |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
107 bold: True |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
108 size_hint: 1, 0.2 |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
109 |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
110 GridLayout: |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
111 cols: 2 |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
112 |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
113 Button: |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
114 text: "Delete" |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
115 size_hint: 1, 0.2 |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
116 on_press: root.doDelete() |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
117 |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
118 Button: |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
119 text: "Cancel" |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
120 size_hint: 1, 0.2 |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
121 on_press: |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
122 root.pm.screen_manager.transition.direction = 'right' |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
123 root.pm.screen_manager.current = 'profiles' |
1
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
124 |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
125 Widget: |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
126 |
2
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
127 |
1
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
128 <ProfilesScreen>: |
0 | 129 layout: layout |
130 BoxLayout: | |
131 id: layout | |
132 orientation: 'vertical' | |
133 | |
134 Label: | |
62 | 135 text: "Select a profile or create a new one" |
0 | 136 size_hint: 1,0.05 |
137 | |
138 GridLayout: | |
139 cols: 2 | |
140 size_hint: 1, 0.1 | |
141 Button: | |
142 size_hint: 1, 0.1 | |
143 text: "New" | |
1
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
144 on_press: |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
145 root.pm.screen_manager.transition.direction = 'left' |
189b76859110
Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
146 root.pm.screen_manager.current = 'new_profile' |
0 | 147 Button: |
2
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
148 disabled: not root.list_adapter.selection |
0 | 149 text: "Delete" |
150 size_hint: 1, 0.1 | |
2
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
151 on_press: |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
152 root.pm.screen_manager.transition.direction = 'left' |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
153 root.pm.screen_manager.current = 'delete_profiles' |
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
154 |
0 | 155 |
156 <ConnectButton>: | |
157 text: "Connect" | |
158 size_hint: 1, 0.1 | |
5
33b619506832
profile manger: launch plug process when "Connect" button is pressed (full plugging is not working yet)
Goffi <goffi@goffi.org>
parents:
4
diff
changeset
|
159 disabled: not self.profile_screen.list_adapter.selection |
33b619506832
profile manger: launch plug process when "Connect" button is pressed (full plugging is not working yet)
Goffi <goffi@goffi.org>
parents:
4
diff
changeset
|
160 on_press: self.pm._onConnectProfiles() |
0 | 161 |
2
8f9ed634a5eb
Profile manager: profile(s) deletion is handled
Goffi <goffi@goffi.org>
parents:
1
diff
changeset
|
162 |
0 | 163 <ProfileItem>: |
148
d1408a98c505
profile manager: removed images (use plain color instead), and changed colors
Goffi <goffi@goffi.org>
parents:
126
diff
changeset
|
164 background_normal: "" |
d1408a98c505
profile manager: removed images (use plain color instead), and changed colors
Goffi <goffi@goffi.org>
parents:
126
diff
changeset
|
165 background_down: "" |
d1408a98c505
profile manager: removed images (use plain color instead), and changed colors
Goffi <goffi@goffi.org>
parents:
126
diff
changeset
|
166 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
|
167 selected_color: 0.67,1.0,1.0,1 |
0 | 168 color: 0,0,0,1 |