comparison 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
comparison
equal deleted inserted replaced
0:160cc95ad7ea 1:189b76859110
1 # Cagou: desktop/mobile frontend for Salut à Toi XMPP client
2 # Copyright (C) 2016 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 <ProfileManager>:
18 Label:
19 text: "Profile Manager"
20 size_hint: 1,0.05
21
22 <PMLabel@Label>:
23 size_hint: 1, 0.1
24
25 <PMInput@TextInput>:
26 multiline: False
27 size_hint: 1, 0.1
28 write_tab: False
29
30 <PMButton@Button>:
31 size_hint: 1, 0.2
32
33 <NewProfileScreen>:
34 profile_name: profile_name
35 jid: jid
36 password: password
37
38 BoxLayout:
39 orientation: "vertical"
40
41 Label:
42 text: "Creation of a new profile"
43 bold: True
44 size_hint: 1, 0.1
45 Label:
46 text: root.error_msg
47 bold: True
48 size_hint: 1, 0.1
49 color: 1,0,0,1
50 GridLayout:
51 cols: 2
52
53 PMLabel:
54 text: "Profile name"
55 PMInput:
56 id: profile_name
57
58 PMLabel:
59 text: "JID"
60 PMInput:
61 id: jid
62
63 PMLabel:
64 text: "Password"
65 PMInput:
66 id: password
67 password: True
68
69 Widget:
70 size_hint: 1, 0.2
71
72 Widget:
73 size_hint: 1, 0.2
74
75 PMButton:
76 text: "Cancel"
77 on_press:
78 root.pm.screen_manager.transition.direction = 'right'
79 root.pm.screen_manager.current = 'profiles'
80
81 PMButton:
82 text: "OK"
83 on_press: root.doCreate()
84
85 Widget:
86
87 <ProfilesScreen>:
88 layout: layout
89 BoxLayout:
90 id: layout
91 orientation: 'vertical'
92
93 Label:
94 text: "Select a profile to connect with, or create a new one"
95 size_hint: 1,0.05
96
97 GridLayout:
98 cols: 2
99 size_hint: 1, 0.1
100 Button:
101 size_hint: 1, 0.1
102 text: "New"
103 on_press:
104 root.pm.screen_manager.transition.direction = 'left'
105 root.pm.screen_manager.current = 'new_profile'
106 Button:
107 text: "Delete"
108 size_hint: 1, 0.1
109
110 <ConnectButton>:
111 text: "Connect"
112 size_hint: 1, 0.1
113
114 <ProfileItem>:
115 background_normal: "button_selected.png" if self.is_selected else "button.png"
116 deselected_color: 1,1,1,1
117 selected_color: 1,1,1,1
118 color: 0,0,0,1