Skip to content

Commit

Permalink
Fix missed wizard dialog for #WriteDialog
Browse files Browse the repository at this point in the history
  • Loading branch information
dgdavid committed Aug 9, 2018
1 parent 94aea8f commit 75121bb
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/include/squid/complex.rb
Original file line number Diff line number Diff line change
Expand Up @@ -330,20 +330,23 @@ def ReadDialog
end

# Write settings dialog
# @return `abort if aborted and `next otherwise
#
# @return [Symbol] :abort if aborted, :next otherwise
def WriteDialog
Wizard.RestoreHelp(Ops.get_string(@HELPS, "write", ""))
help = @HELPS.fetch("write") { "" }

Wizard.CreateDialog
Wizard.RestoreHelp(help)
Squid.AbortFunction = fun_ref(method(:PollAbort), "boolean ()")
ret = Squid.Write
ret ? :next : :abort
result = Squid.Write
Wizard.CloseDialog

return :next if result
:abort
end

def SaveAndRestart
Wizard.CreateDialog
WriteDialog()
UI.CloseDialog

nil
end

def MainDialog
Expand Down

0 comments on commit 75121bb

Please sign in to comment.