comparison cagou/kv/profile_manager.kv @ 126:cd99f70ea592

global file reorganisation: - follow common convention by puttin cagou in "cagou" instead of "src/cagou" - added VERSION in cagou with current version - updated dates - moved main executable in /bin - moved buildozer files in root directory - temporary moved platform to assets/platform
author Goffi <goffi@goffi.org>
date Thu, 05 Apr 2018 17:11:21 +0200
parents src/cagou/kv/profile_manager.kv@1922506846be
children d1408a98c505
comparison
equal deleted inserted replaced
125:b6e6afb0dc46 126:cd99f70ea592
1 # Cagou: desktop/mobile frontend for Salut à Toi XMPP client
2 # Copyright (C) 2016-2018 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
18 <ProfileManager>:
19 Label:
20 text: "Profile Manager"
21 size_hint: 1,0.05
22
23 <PMLabel@Label>:
24 size_hint: 1, None
25 height: sp(30)
26
27 <PMInput@TextInput>:
28 multiline: False
29 size_hint: 1, None
30 height: sp(30)
31 write_tab: False
32
33 <PMButton@Button>:
34 size_hint: 1, 0.2
35
36
37 <NewProfileScreen>:
38 profile_name: profile_name
39 jid: jid
40 password: password
41
42 BoxLayout:
43 orientation: "vertical"
44
45 Label:
46 text: "Creation of a new profile"
47 bold: True
48 size_hint: 1, 0.1
49 Label:
50 text: root.error_msg
51 bold: True
52 size_hint: 1, 0.1
53 color: 1,0,0,1
54 GridLayout:
55 cols: 2
56
57 PMLabel:
58 text: "Profile name"
59 PMInput:
60 id: profile_name
61
62 PMLabel:
63 text: "JID"
64 PMInput:
65 id: jid
66
67 PMLabel:
68 text: "Password"
69 PMInput:
70 id: password
71 password: True
72
73 Widget:
74 size_hint: 1, 0.2
75
76 Widget:
77 size_hint: 1, 0.2
78
79 PMButton:
80 text: "OK"
81 on_press: root.doCreate()
82
83 PMButton:
84 text: "Cancel"
85 on_press:
86 root.pm.screen_manager.transition.direction = 'right'
87 root.pm.screen_manager.current = 'profiles'
88
89 Widget:
90
91
92 <DeleteProfilesScreen>:
93 BoxLayout:
94 orientation: "vertical"
95
96 Label:
97 text: "Are you sure you want to delete the following profiles?"
98 size_hint: 1, 0.1
99
100 Label:
101 text: u'\n'.join([i.text for i in root.pm.profiles_screen.list_adapter.selection])
102 bold: True
103
104 Label:
105 text: u'/!\\ WARNING: this operation is irreversible'
106 color: 1,0,0,1
107 bold: True
108 size_hint: 1, 0.2
109
110 GridLayout:
111 cols: 2
112
113 Button:
114 text: "Delete"
115 size_hint: 1, 0.2
116 on_press: root.doDelete()
117
118 Button:
119 text: "Cancel"
120 size_hint: 1, 0.2
121 on_press:
122 root.pm.screen_manager.transition.direction = 'right'
123 root.pm.screen_manager.current = 'profiles'
124
125 Widget:
126
127
128 <ProfilesScreen>:
129 layout: layout
130 BoxLayout:
131 id: layout
132 orientation: 'vertical'
133
134 Label:
135 text: "Select a profile or create a new one"
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"
144 on_press:
145 root.pm.screen_manager.transition.direction = 'left'
146 root.pm.screen_manager.current = 'new_profile'
147 Button:
148 disabled: not root.list_adapter.selection
149 text: "Delete"
150 size_hint: 1, 0.1
151 on_press:
152 root.pm.screen_manager.transition.direction = 'left'
153 root.pm.screen_manager.current = 'delete_profiles'
154
155
156 <ConnectButton>:
157 text: "Connect"
158 size_hint: 1, 0.1
159 disabled: not self.profile_screen.list_adapter.selection
160 on_press: self.pm._onConnectProfiles()
161
162
163 <ProfileItem>:
164 # FIXME: using cagou/images path for now, will use atlas later
165 background_normal: "cagou/images/button_selected.png" if self.is_selected else "cagou/images/button.png"
166 deselected_color: 1,1,1,1
167 selected_color: 1,1,1,1
168 color: 0,0,0,1