Mercurial > libervia-desktop-kivy
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 |
rev | line source |
---|---|
0 | 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 | |
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 | 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" | |
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 | 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 |