Skip to content

Commit

Permalink
added brew info in update dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
D0miH committed Jul 23, 2019
1 parent 66b5a5b commit a1157f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions iGlance/iGlance/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,12 @@ class AppDelegate: NSObject, NSApplicationDelegate {
if onlyversion != AppDelegate.VERSION {
let alert = NSAlert()
alert.messageText = ""
alert.informativeText = "A new version (" + onlyversion + ") is available at: \n\n https://github.com/iglance/iGlance"
alert.informativeText = "A new version (" + onlyversion + ") is available at: \n\n https://github.com/iglance/iGlance/releases \n\n If you installed iGlance via Homebrew run:\n brew update && brew cask upgrade"
alert.alertStyle = .informational
alert.addButton(withTitle: "Visit Website")
alert.addButton(withTitle: "OK")
if alert.runModal() == .alertFirstButtonReturn {
if let url = URL(string: "https://github.com/iglance/iGlance"), NSWorkspace.shared.open(url) {}
if let url = URL(string: "https://github.com/iglance/iGlance/releases"), NSWorkspace.shared.open(url) {}
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions iGlance/iGlance/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class ViewController: NSViewController {
if let error = error {
let alert = NSAlert()
alert.messageText = "Error"
alert.informativeText = "Unable to check for updates. Please check yourself on https://github.com/iglance/iGlance\n\n\(error)"
alert.informativeText = "Unable to check for updates. Please check yourself on https://github.com/iglance/iGlance/releases\n\n\(error)"
alert.alertStyle = .warning
alert.addButton(withTitle: "OK")
alert.runModal()
Expand All @@ -153,7 +153,7 @@ class ViewController: NSViewController {
if res.count != 1 {
let alert = NSAlert()
alert.messageText = "Error"
alert.informativeText = "Unable to check for updates. Please check yourself on https://github.com/iglance/iGlance\n\nError: Version.txt incompatible"
alert.informativeText = "Unable to check for updates. Please check yourself on https://github.com/iglance/iGlance/releases\n\nError: Version.txt incompatible"
alert.alertStyle = .warning
alert.addButton(withTitle: "OK")
alert.runModal()
Expand All @@ -162,12 +162,12 @@ class ViewController: NSViewController {
if onlyversion != AppDelegate.VERSION {
let alert = NSAlert()
alert.messageText = ""
alert.informativeText = "A new version (" + onlyversion + ") is available at: \n\n https://github.com/iglance/iGlance"
alert.informativeText = "A new version (" + onlyversion + ") is available at: \n\n https://github.com/iglance/iGlance/releases \n\n If you installed iGlance via Homebrew run:\n brew update && brew cask upgrade"
alert.alertStyle = .informational
alert.addButton(withTitle: "Visit Website")
alert.addButton(withTitle: "OK")
if alert.runModal() == .alertFirstButtonReturn {
if let url = URL(string: "https://github.com/iglance/iGlance"), NSWorkspace.shared.open(url) {}
if let url = URL(string: "https://github.com/iglance/iGlance/releases"), NSWorkspace.shared.open(url) {}
}
} else {
let alert = NSAlert()
Expand Down

0 comments on commit a1157f2

Please sign in to comment.