54 lines
1.3 KiB
Plaintext
54 lines
1.3 KiB
Plaintext
|
#:import os os
|
||
|
<Fnt_SpinnerOption>:
|
||
|
font_name: self.text
|
||
|
|
||
|
<LoadDialog>:
|
||
|
title: filechooser.path
|
||
|
choosen_file: None
|
||
|
BoxLayout:
|
||
|
size: root.size
|
||
|
pos: root.pos
|
||
|
orientation: "vertical"
|
||
|
FileChooserListView:
|
||
|
id: filechooser
|
||
|
path: os.getcwd()
|
||
|
|
||
|
BoxLayout:
|
||
|
size_hint_y: None
|
||
|
height: 30
|
||
|
Button:
|
||
|
text: "Cancel"
|
||
|
on_release: root.cancel()
|
||
|
|
||
|
Button:
|
||
|
text: "Load"
|
||
|
on_release: root.load(filechooser.path, filechooser.selection)
|
||
|
|
||
|
<SaveDialog>:
|
||
|
text_input: text_input
|
||
|
BoxLayout:
|
||
|
size: root.size
|
||
|
pos: root.pos
|
||
|
orientation: "vertical"
|
||
|
FileChooserListView:
|
||
|
id: filechooser
|
||
|
path: os.getcwd()
|
||
|
on_selection: text_input.text = self.selection and self.selection[0] or ''
|
||
|
|
||
|
TextInput:
|
||
|
id: text_input
|
||
|
size_hint_y: None
|
||
|
height: 30
|
||
|
multiline: False
|
||
|
|
||
|
BoxLayout:
|
||
|
size_hint_y: None
|
||
|
height: 30
|
||
|
Button:
|
||
|
text: "Cancel"
|
||
|
on_release: root.cancel()
|
||
|
|
||
|
Button:
|
||
|
text: "Save"
|
||
|
on_release: root.save(filechooser.path, text_input.text)
|