-
Notifications
You must be signed in to change notification settings - Fork 5
/
recv_file.kv
40 lines (39 loc) · 1.12 KB
/
recv_file.kv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#:kivy 1.9.0
<RecvFile@GridLayout>:
cols: 1
row: 8
AndCatLogo:
AndCatIPLabel:
text: 'Current IP: {0}'.format(self.get_own_ip())
text_size: self.width, None
size_hint: 1, 0.1
AndCatPortInput:
id: _recv_port
multiline: False
text: 'Port (value between 1024 and 65535)'
size_hint: 1, 0.1
AndCatTextInput:
id: _recv_filename
multiline: False
text: 'Save as...'
size_hint: 1, 0.1
RecvFileChooser:
dirselect: True
id: _recv_file_chooser
path: '/storage/emulated/0'
filters: [lambda folder, fname: False]
filters_dirs: False
on_submit: self.recv_file(_recv_port.text, _recv_filename.text)
size_hint: 1, 0.5
GridLayout:
size_hint: 1, 0.1
cols: 2
rows: 1
AndCatBtn:
text: 'Receive'
on_press: _recv_file_chooser.recv_file(_recv_port.text, _recv_filename.text)
size_hint: 1, 0.1
AndCatBtn:
text: 'Main'
on_press: root.parent.manager.current = 'main'
size_hint: 1, 0.1