Skip to content

Commit

Permalink
Merge branch 'develop' - v0.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
lhc70000 committed Mar 28, 2017
2 parents 0e0d56f + 93b08de commit 60bf51f
Show file tree
Hide file tree
Showing 190 changed files with 10,593 additions and 1,512 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,5 @@ other/*.swift
psd/
temp/

# FileMerge backup
*.orig
5 changes: 0 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ First of all, please be tolerant. I'm not a professional in Cocoa development or

If you believe the code structures can be improved, please raise an issue.

## Issues

- Please use English for both the title and the details. 请在标题和正文都使用英文。
- Before opening an issue, please check whether a similar one already exists.

## Some Guidelines

- IINA is for modern macOS.
Expand Down
26 changes: 17 additions & 9 deletions ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<!-- Please use English, if possible. If you really feel the need to use a different language to get your point across, you may add a description in your native language to supplement your report. -->
<!-- Please also try to search for your issue to avoid it being closed as a duplicate. -->

<!-- Change these to match your system. If you're using a version compiled from source, please mention so here along with the commit you're using. -->
**System and IINA version:**

- macOS 10.12.3
Expand All @@ -6,23 +10,27 @@
**Expected behavior:**



<!-- If this is feature request, please use this section to explain the rationale behind your idea and why you believe it would be beneficial. -->
**Actual behavior:**

(N/A for feature requests)

<!-- If it crashes, please upload the report (you can also find them in Console.app) -->
<!-- If you're reporting a crash, please copy the stack trace below, between the backticks (you can find these in ~/Library/Logs/DiagnosticReports/; the filename should prefixed with IINA and include the crash time). If not, feel free to delete this section. -->
- Crash report:
<!-- Please provide mpv log if possible (you can enable logging in Preference>Advanced) -->
```
```
<!-- Please provide mpv log if applicable (if you haven't done so already, you can enable logging in Preferences > Advanced). -->
- MPV log:
```
```

<!-- N/A if this is a feature request -->
**Steps to reproduce:**

(N/A for feature requests)

<!-- If it's related to playback, please check whether mpv having the same problem. If so, it might be mpv's problem. -->
<!-- If your issue is related to playback, please check whether mpv has the same problem. If so, this might not be an issue with IINA but rather an bug with mpv. Try reporting an issue there. -->
- [x] MPV does not have this problem.

**How often does this happen?**

(N/A for feature requests)
<!-- Again, N/A for feature requests -->
**How often does this happen?**
4 changes: 4 additions & 0 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ target 'iina' do
# Pods for iina
pod 'MASPreferences'
pod 'Just'
pod 'AEXML'
pod "PromiseKit", "~> 4.0"
pod 'GzipSwift'
pod 'GRMustache.swift'

# target 'iinaTests' do
# inherit! :search_paths
Expand Down
24 changes: 23 additions & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,15 +1,37 @@
PODS:
- AEXML (4.0.1)
- GRMustache.swift (2.0.0)
- GzipSwift (3.1.2)
- Just (0.5.7)
- MASPreferences (1.1.4)
- PromiseKit (4.1.0):
- PromiseKit/Foundation (= 4.1.0)
- PromiseKit/QuartzCore (= 4.1.0)
- PromiseKit/UIKit (= 4.1.0)
- PromiseKit/CorePromise (4.1.0)
- PromiseKit/Foundation (4.1.0):
- PromiseKit/CorePromise
- PromiseKit/QuartzCore (4.1.0):
- PromiseKit/CorePromise
- PromiseKit/UIKit (4.1.0):
- PromiseKit/CorePromise

DEPENDENCIES:
- AEXML
- GRMustache.swift
- GzipSwift
- Just
- MASPreferences
- PromiseKit (~> 4.0)

SPEC CHECKSUMS:
AEXML: 905e50474c0a261d335aa8be4ee32d22d69b6fd5
GRMustache.swift: 8a547c12bea16052071b2b540af83d770075f0eb
GzipSwift: 86700e6530b3aa5e782ed7107cde2deea6b16688
Just: d19e769d86b965e39ae58cb3c0cbad07706634a8
MASPreferences: 7bdcfe891d7840453cf48f95fa866c3e152ace7a
PromiseKit: c98453ff78544c0ad5bb0ea980782e6875f47978

PODFILE CHECKSUM: 1660afcf8e29f4d915d2c02e6adc97cd9068a0dd
PODFILE CHECKSUM: 7bc6111c191d1fa43fa2a156023797fa28b7e775

COCOAPODS: 1.2.0
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ Releases: [https://github.com/lhc70000/iina/releases](https://github.com/lhc7000
Telegram group:
[https://t.me/joinchat/AAAAAEBemW7dU8X7IHShwQ](https://t.me/joinchat/AAAAAEBemW7dU8X7IHShwQ)

---

When raising an issue, please **use English** if possible.

在提 issue 时,请尽量使用**英文**

# Features

- Based on [mpv](https://github.com/mpv-player/mpv), a powerful media player
Expand Down
189 changes: 184 additions & 5 deletions iina.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

28 changes: 11 additions & 17 deletions iina/AboutWindowController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,16 @@ class AboutWindowController: NSWindowController {


@IBOutlet weak var iconImageView: NSImageView!
@IBOutlet weak var iinaLabel: NSTextField! {
didSet {
if #available(OSX 10.11, *) {
iinaLabel.font = NSFont.systemFont(ofSize: 24, weight: NSFontWeightLight)
}
}
}
@IBOutlet weak var versionLabel: NSTextField!
@IBOutlet weak var mpvVersionLabel: NSTextField!
@IBOutlet weak var copyRightLabel: NSTextField!
@IBOutlet weak var githubLabel: NSTextField!
@IBOutlet weak var websiteLabel: NSTextField!
@IBOutlet weak var emailLabel: NSTextField!
@IBOutlet var detailTextView: NSTextView!


override func windowDidLoad() {
Expand All @@ -32,22 +36,12 @@ class AboutWindowController: NSWindowController {
let version = infoDic["CFBundleShortVersionString"] as! String
let build = infoDic["CFBundleVersion"] as! String
versionLabel.stringValue = "\(version) Build \(build)"
let copyright = infoDic["NSHumanReadableCopyright"] as! String
copyRightLabel.stringValue = copyright
// let copyright = infoDic["NSHumanReadableCopyright"] as! String

mpvVersionLabel.stringValue = PlayerCore.shared.mpvController.mpvVersion

githubLabel.allowsEditingTextAttributes = true
githubLabel.isSelectable = true
githubLabel.attributedStringValue = NSMutableAttributedString(linkTo: AppData.githubLink, text: AppData.githubLink, font: githubLabel.font!)!

websiteLabel.allowsEditingTextAttributes = true
websiteLabel.isSelectable = true
websiteLabel.attributedStringValue = NSMutableAttributedString(linkTo: AppData.websiteLink, text: AppData.websiteLink, font: websiteLabel.font!)!

emailLabel.allowsEditingTextAttributes = true
emailLabel.isSelectable = true
emailLabel.attributedStringValue = NSMutableAttributedString(linkTo: "mailto:\(AppData.emailLink)", text: AppData.emailLink, font: emailLabel.font!)!
let contrubutionFile = Bundle.main.path(forResource: "Contribution", ofType: "rtf")!
detailTextView.readRTFD(fromFile: contrubutionFile)

}

Expand Down
11 changes: 5 additions & 6 deletions iina/AppData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,9 @@ struct AppData {
static let rotations: [Int] = [0, 90, 180, 270]

/** Seek amount */
static let seekAmountMap: [Int: Double] = [
1: 0.001,
2: 0.01,
3: 0.1,
4: 0.5
]
static let seekAmountMap = [0, 0.001, 0.01, 0.1, 0.5]
static let seekAmountMapMouse = [0, 0.5, 1, 2, 4]
static let volumeMap = [0, 0.25, 0.5, 0.75, 1]

static let encodings = CharEncoding.list

Expand All @@ -44,6 +41,7 @@ struct AppData {

static let githubLink = "https://github.com/lhc70000/iina"
static let githubReleaseLink = "https://github.com/lhc70000/iina/releases"
static let wikiLink = "https://github.com/lhc70000/iina/wiki"
static let websiteLink = "https://lhc70000.github.io/iina/"
static let emailLink = "[email protected]"

Expand Down Expand Up @@ -84,6 +82,7 @@ struct Constants {
static let vfChanged = Notification.Name("IINAVfChanged")
static let afChanged = Notification.Name("IINAAfChanged")
static let fsChanged = Notification.Name("IINAFullscreenChanged")
static let ontopChanged = Notification.Name("IINAOnTopChanged")
static let keyBindingInputChanged = Notification.Name("IINAkeyBindingInputChanged")
static let fileLoaded = Notification.Name("IINAFileLoaded")
}
Expand Down
21 changes: 18 additions & 3 deletions iina/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ class AppDelegate: NSObject, NSApplicationDelegate {

lazy var inspector: InspectorWindowController = InspectorWindowController()

lazy var subSelectWindow: SubSelectWindowController = SubSelectWindowController()

lazy var vfWindow: FilterWindowController = {
let w = FilterWindowController()
w.filterType = MPVProperty.vf
Expand Down Expand Up @@ -179,8 +181,21 @@ class AppDelegate: NSObject, NSApplicationDelegate {
}

@IBAction func openURL(_ sender: NSMenuItem) {
let _ = Utility.quickPromptPanel(messageText: "Open URL", informativeText: "Please enter the url:") { str in
playerCore.openURLString(str)
let panel = NSAlert()
panel.messageText = "Open URL"
panel.informativeText = "Please enter the URL:"
let inputViewController = OpenURLAccessoryViewController()
panel.accessoryView = inputViewController.view
panel.addButton(withTitle: "OK")
panel.addButton(withTitle: "Cancel")
panel.window.initialFirstResponder = inputViewController.urlField
let response = panel.runModal()
if response == NSAlertFirstButtonReturn {
if let url = inputViewController.url {
playerCore.openURL(url)
} else {
Utility.showAlert("wrong_url_format")
}
}
}

Expand Down Expand Up @@ -214,7 +229,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
}

@IBAction func helpAction(_ sender: AnyObject) {
NSWorkspace.shared().open(URL(string: AppData.websiteLink)!.appendingPathComponent("documentation"))
NSWorkspace.shared().open(URL(string: AppData.wikiLink)!)
}

@IBAction func githubAction(_ sender: AnyObject) {
Expand Down
21 changes: 21 additions & 0 deletions iina/Assets.xcassets/trackpad.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "trackpad.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 60bf51f

Please sign in to comment.