annotate src/profile_manager.kv @ 1:189b76859110

Profile manager: new profile creation is handled
author Goffi <goffi@goffi.org>
date Sat, 26 Mar 2016 18:58:13 +0100
parents src/cagou.kv@160cc95ad7ea
children 8f9ed634a5eb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
1 # Cagou: desktop/mobile frontend for Salut à Toi XMPP client
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
2 # Copyright (C) 2016 Jérôme Poisson (goffi@goffi.org)
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
3
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
4 # This program is free software: you can redistribute it and/or modify
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
5 # it under the terms of the GNU Affero General Public License as published by
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
6 # the Free Software Foundation, either version 3 of the License, or
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
7 # (at your option) any later version.
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
8
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
9 # This program is distributed in the hope that it will be useful,
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
12 # GNU Affero General Public License for more details.
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
13
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
14 # You should have received a copy of the GNU Affero General Public License
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
16
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
17 <ProfileManager>:
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
18 Label:
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
19 text: "Profile Manager"
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
20 size_hint: 1,0.05
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
21
1
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
22 <PMLabel@Label>:
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
23 size_hint: 1, 0.1
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
24
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
25 <PMInput@TextInput>:
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
26 multiline: False
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
27 size_hint: 1, 0.1
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
28 write_tab: False
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
29
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
30 <PMButton@Button>:
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
31 size_hint: 1, 0.2
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 <NewProfileScreen>:
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
34 profile_name: profile_name
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
35 jid: jid
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
36 password: password
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 BoxLayout:
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
39 orientation: "vertical"
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
40
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
41 Label:
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
42 text: "Creation of a new profile"
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
43 bold: True
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
44 size_hint: 1, 0.1
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: root.error_msg
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 color: 1,0,0,1
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
50 GridLayout:
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
51 cols: 2
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
52
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
53 PMLabel:
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
54 text: "Profile name"
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
55 PMInput:
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
56 id: profile_name
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
57
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
58 PMLabel:
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
59 text: "JID"
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
60 PMInput:
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
61 id: jid
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
62
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
63 PMLabel:
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
64 text: "Password"
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
65 PMInput:
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
66 id: password
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
67 password: True
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
68
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
69 Widget:
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
70 size_hint: 1, 0.2
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
71
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
72 Widget:
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
73 size_hint: 1, 0.2
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
74
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
75 PMButton:
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
76 text: "Cancel"
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
77 on_press:
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
78 root.pm.screen_manager.transition.direction = 'right'
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
79 root.pm.screen_manager.current = 'profiles'
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
80
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
81 PMButton:
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
82 text: "OK"
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
83 on_press: root.doCreate()
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
84
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
85 Widget:
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
86
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
87 <ProfilesScreen>:
0
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
88 layout: layout
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
89 BoxLayout:
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
90 id: layout
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
91 orientation: 'vertical'
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
92
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
93 Label:
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
94 text: "Select a profile to connect with, or create a new one"
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
95 size_hint: 1,0.05
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
96
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
97 GridLayout:
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
98 cols: 2
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
99 size_hint: 1, 0.1
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
100 Button:
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
101 size_hint: 1, 0.1
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
102 text: "New"
1
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
103 on_press:
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
104 root.pm.screen_manager.transition.direction = 'left'
189b76859110 Profile manager: new profile creation is handled
Goffi <goffi@goffi.org>
parents: 0
diff changeset
105 root.pm.screen_manager.current = 'new_profile'
0
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
106 Button:
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
107 text: "Delete"
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
108 size_hint: 1, 0.1
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
109
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
110 <ConnectButton>:
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
111 text: "Connect"
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
112 size_hint: 1, 0.1
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
113
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
114 <ProfileItem>:
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
115 background_normal: "button_selected.png" if self.is_selected else "button.png"
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
116 deselected_color: 1,1,1,1
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
117 selected_color: 1,1,1,1
160cc95ad7ea initial commit:
Goffi <goffi@goffi.org>
parents:
diff changeset
118 color: 0,0,0,1