|
220 | 220 |
|
221 | 221 | if (releaseInfo && releaseInfo["data"].Has("version") && releaseInfo["data"]["version"] && this.Service("VersionChecker").VersionIsOutdated(releaseInfo["data"]["version"], this.Version)) { |
222 | 222 | updateAvailable := true |
223 | | - this.Service("GuiManager").Dialog("UpdateAvailableWindow", releaseInfo) |
| 223 | + this.Service("GuiManager").Dialog(Map("type", "UpdateAvailableWindow"), releaseInfo) |
224 | 224 | } |
225 | 225 | } |
226 | 226 | } |
|
299 | 299 | configFile := this.Parameter("previous_config_file") |
300 | 300 |
|
301 | 301 | if (configFile && FileExist(configFile)) { |
302 | | - response := this.Service("GuiManager").Dialog("DialogBox", "Migrate settings?", this.appName . " uses a new configuration file format, and has detected that you have a previous configuration file.`n`nWould you like to automatically migrate your settings?`n`nChoose Yes to migrate your previous configuration. Choose no to simply delete it and start from scratch.") |
| 302 | + response := this.Service("GuiManager").Dialog(Map( |
| 303 | + "title", "Migrate settings?", |
| 304 | + "text", this.appName . " uses a new configuration file format, and has detected that you have a previous configuration file.`n`nWould you like to automatically migrate your settings?`n`nChoose Yes to migrate your previous configuration. Choose no to simply delete it and start from scratch." |
| 305 | + )) |
303 | 306 |
|
304 | 307 | if (response == "Yes") { |
305 | 308 | this.Service("LaunchpadIniMigrator").Migrate(configFile, this.Config) |
|
310 | 313 | } |
311 | 314 |
|
312 | 315 | InitialSetup(config) { |
313 | | - result := this.Service("GuiManager").Dialog("SetupWindow") |
| 316 | + result := this.Service("GuiManager").Dialog(Map("type", "SetupWindow")) |
314 | 317 |
|
315 | 318 | if (result == "Exit") { |
316 | 319 | this.ExitApp() |
|
345 | 348 | } |
346 | 349 |
|
347 | 350 | ProvideFeedback() { |
348 | | - this.Service("GuiManager").Dialog("FeedbackWindow") |
| 351 | + this.Service("GuiManager").Dialog(Map("type", "FeedbackWindow")) |
349 | 352 | } |
350 | 353 |
|
351 | 354 | RestartApp() { |
352 | | - if (this.Services.Has("GuiManager") && this.Service("GuiManager").Has("MainWindow")) { |
353 | | - this.Service("GuiManager").StoreWindowState(this.Service("GuiManager")["MainWindow"]) |
| 355 | + if (this.Services.Has("GuiManager")) { |
| 356 | + guiMgr := this.Service("GuiManager") |
| 357 | + |
| 358 | + if (guiMgr.Has("MainWindow")) { |
| 359 | + guiMgr.StoreWindowState(this.Service("GuiManager")["MainWindow"]) |
| 360 | + } |
354 | 361 | } |
355 | 362 |
|
356 | 363 | super.RestartApp() |
|
0 commit comments