diff --git a/Frameworks/libmagic.a b/Frameworks/libmagic.a
new file mode 100644
index 0000000..5c90ab4
Binary files /dev/null and b/Frameworks/libmagic.a differ
diff --git a/Open Backup Extractor/AppDelegate.swift b/Open Backup Extractor/AppDelegate.swift
index 9c838bb..a8e84ef 100644
--- a/Open Backup Extractor/AppDelegate.swift
+++ b/Open Backup Extractor/AppDelegate.swift
@@ -16,7 +16,39 @@ class AppDelegate: NSObject, NSApplicationDelegate {
func applicationDidFinishLaunching(_ aNotification: Notification)
{
}
-
+
+ @IBAction func openHelp(_ sender: NSMenuItem)
+ {
+ self.mainViewController!.getHelp(sender: sender)
+ }
+
+ func dialogOKCancel(question: String, text: String) -> Bool {
+ let alert = NSAlert()
+ alert.messageText = question
+ alert.informativeText = text
+ alert.alertStyle = NSAlertStyle.warning
+ alert.addButton(withTitle: "OK")
+ alert.addButton(withTitle: "Cancel")
+ return alert.runModal() == NSAlertFirstButtonReturn
+ }
+
+ @IBAction func promptDirectory(_ sender: Any)
+ {
+ let vc = mainViewController!
+
+ let openPanel = NSOpenPanel()
+ openPanel.allowsMultipleSelection = false
+ openPanel.canChooseDirectories = true
+ openPanel.canCreateDirectories = true
+ openPanel.canChooseFiles = false
+ openPanel.begin { (result) -> Void in
+ if result == NSFileHandlingPanelOKButton {
+ vc.ITUNES_BACKUP_PATH = "\((openPanel.url?.path)!)/"
+ vc.refreshDevices()
+ }
+ }
+ }
+
func applicationWillTerminate(_ aNotification: Notification) {
// Insert code here to tear down your application
}
diff --git a/Open Backup Extractor/Base.lproj/Main.storyboard b/Open Backup Extractor/Base.lproj/Main.storyboard
index 8e73c21..be831e5 100644
--- a/Open Backup Extractor/Base.lproj/Main.storyboard
+++ b/Open Backup Extractor/Base.lproj/Main.storyboard
@@ -24,13 +24,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -644,7 +312,7 @@
-
+
diff --git a/Open Backup Extractor/ViewController.swift b/Open Backup Extractor/ViewController.swift
index e97ff59..3f6f513 100644
--- a/Open Backup Extractor/ViewController.swift
+++ b/Open Backup Extractor/ViewController.swift
@@ -28,7 +28,7 @@ class ViewController: NSViewController, NSTableViewDelegate, NSTableViewDataSour
var devices: [Device] = []
// the path to the itunes library
- let ITUNES_BACKUP_PATH = NSHomeDirectory() + "/Library/Application Support/MobileSync/Backup/"
+ var ITUNES_BACKUP_PATH = NSHomeDirectory() + "/Library/Application Support/MobileSync/Backup/"
// the number of cell that is being loaded
var curentCellIndex = 0
@@ -135,15 +135,14 @@ class ViewController: NSViewController, NSTableViewDelegate, NSTableViewDataSour
// reload the table view
reloadData()
-
- // enter state 1 for view
- changeState(NONE_SELECTED)
}
catch
{
// do nothing, the file list will be empty
}
+ // enter state 1 for view
+ changeState(NONE_SELECTED)
}
func changeState(_ state: Int)