@@ -14,7 +14,9 @@ type send struct {
14
14
contentPicker dialog.Dialog
15
15
16
16
fileChoice * widget.Button
17
+ fileDialog * dialog.FileDialog
17
18
directoryChoice * widget.Button
19
+ directoryDialog * dialog.FileDialog
18
20
textChoice * widget.Button
19
21
20
22
contentToSend * widget.Button
@@ -32,12 +34,12 @@ func newSend(a fyne.App, w fyne.Window, b *bridge.Bridge, as *AppSettings) *send
32
34
33
35
func (s * send ) onFileSend () {
34
36
s .contentPicker .Hide ()
35
- dialog . ShowFileOpen ( s . sendList . OnFileSelect , s . window )
37
+ s . fileDialog . Show ( )
36
38
}
37
39
38
40
func (s * send ) onDirSend () {
39
41
s .contentPicker .Hide ()
40
- dialog . ShowFolderOpen ( s . sendList . OnDirSelect , s . window )
42
+ s . directoryDialog . Show ( )
41
43
}
42
44
43
45
func (s * send ) onTextSend () {
@@ -61,6 +63,9 @@ func (s *send) buildUI() *fyne.Container {
61
63
s .sendList = widgets .NewSendList (s .bridge )
62
64
s .contentToSend = & widget.Button {Text : "Add content to send" , Icon : theme .ContentAddIcon (), OnTapped : s .onContentToSend }
63
65
66
+ s .fileDialog = dialog .NewFileOpen (s .sendList .OnFileSelect , s .window )
67
+ s .directoryDialog = dialog .NewFolderOpen (s .sendList .OnDirSelect , s .window )
68
+
64
69
box := container .NewVBox (s .contentToSend , & widget.Label {})
65
70
return container .NewBorder (box , nil , nil , nil , s .sendList )
66
71
}
0 commit comments