Skip to content

Commit 788e725

Browse files
committed
fix display error when backup path missing, allow specifying
1 parent 0017505 commit 788e725

4 files changed

Lines changed: 39 additions & 340 deletions

File tree

Frameworks/libmagic.a

151 KB
Binary file not shown.

Open Backup Extractor/AppDelegate.swift

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,39 @@ class AppDelegate: NSObject, NSApplicationDelegate {
1616
func applicationDidFinishLaunching(_ aNotification: Notification)
1717
{
1818
}
19-
19+
20+
@IBAction func openHelp(_ sender: NSMenuItem)
21+
{
22+
self.mainViewController!.getHelp(sender: sender)
23+
}
24+
25+
func dialogOKCancel(question: String, text: String) -> Bool {
26+
let alert = NSAlert()
27+
alert.messageText = question
28+
alert.informativeText = text
29+
alert.alertStyle = NSAlertStyle.warning
30+
alert.addButton(withTitle: "OK")
31+
alert.addButton(withTitle: "Cancel")
32+
return alert.runModal() == NSAlertFirstButtonReturn
33+
}
34+
35+
@IBAction func promptDirectory(_ sender: Any)
36+
{
37+
let vc = mainViewController!
38+
39+
let openPanel = NSOpenPanel()
40+
openPanel.allowsMultipleSelection = false
41+
openPanel.canChooseDirectories = true
42+
openPanel.canCreateDirectories = true
43+
openPanel.canChooseFiles = false
44+
openPanel.begin { (result) -> Void in
45+
if result == NSFileHandlingPanelOKButton {
46+
vc.ITUNES_BACKUP_PATH = "\((openPanel.url?.path)!)/"
47+
vc.refreshDevices()
48+
}
49+
}
50+
}
51+
2052
func applicationWillTerminate(_ aNotification: Notification) {
2153
// Insert code here to tear down your application
2254
}

0 commit comments

Comments
 (0)