@@ -182,23 +182,26 @@ func (s *settings) verify(hash string) bool {
182182
183183// getPreferences is used to set the preferences on startup without saving at the same time.
184184func (s * settings ) getPreferences (app fyne.App ) {
185+ if build .IsFlatpak {
186+ s .askOnFileSave .Disable ()
187+ s .overwriteFiles .Disable ()
188+ s .downloadPathEntry .Disable ()
189+ s .downloadPathEntry .ActionItem .(* widget.Button ).Disable ()
190+ }
191+
185192 s .client .DownloadPath = s .preferences .StringWithFallback ("DownloadPath" , util .UserDownloadsFolder ())
186193 s .downloadPathEntry .Text = s .client .DownloadPath
187194
188195 s .client .OverwriteExisting = s .preferences .Bool ("OverwriteFiles" )
189196 s .overwriteFiles .Selected = onOrOff (s .client .OverwriteExisting )
190197
191- s .client .AskOnFileSave = s .preferences .BoolWithFallback ("AskOnFileSave" , true ) || build . IsFlatpak
198+ s .client .AskOnFileSave = build . IsFlatpak || s .preferences .BoolWithFallback ("AskOnFileSave" , true )
192199 s .askOnFileSave .Selected = onOrOff (s .client .AskOnFileSave )
193- if s .client .AskOnFileSave || build . IsFlatpak {
200+ if s .client .AskOnFileSave {
194201 s .extractRadio .SetSelected ("Off" )
195202 s .extractRadio .Disable ()
196203 }
197204
198- if build .IsFlatpak {
199- s .askOnFileSave .Disable ()
200- }
201-
202205 s .client .NoExtractDirectory = s .preferences .BoolWithFallback ("NoExtractDirectory" , build .IsFlatpak )
203206 s .extractRadio .Selected = onOrOff (! s .client .NoExtractDirectory )
204207
@@ -275,11 +278,11 @@ func (s *settings) buildUI(app fyne.App) *container.Scroll {
275278 interfaceContainer := appearance .NewSettings ().LoadAppearanceScreen (s .window )
276279
277280 dataContainer := container .NewGridWithColumns (2 ,
281+ newBoldLabel ("Send notifications" ), s .notificationRadio ,
278282 newBoldLabel ("Save files to" ), s .downloadPathEntry ,
279283 newBoldLabel ("Overwrite files" ), s .overwriteFiles ,
280284 newBoldLabel ("Ask where to save received files" ), s .askOnFileSave ,
281285 newBoldLabel ("Extract received directory" ), s .extractRadio ,
282- newBoldLabel ("Notifications" ), s .notificationRadio ,
283286 newBoldLabel ("Check for updates" ), s .checkUpdatesRadio ,
284287 )
285288
0 commit comments