• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-cqtcocoa誰得pythonphprubygameguibathyscaphec翻訳計画中(planning stage)omegatframeworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

macOSのスクリーンショットの保存場所を変更するメニュバーエクストラ


Commit MetaInfo

Revision72b006520a50aa75212394f4a4ae06eb722451f5 (tree)
Time2017-11-04 23:35:51
Authormasakih <masakih@user...>
Commitermasakih

Log Message

Swift4に更新

Change Summary

Incremental Difference

--- a/GoInto.xcodeproj/project.pbxproj
+++ b/GoInto.xcodeproj/project.pbxproj
@@ -180,7 +180,7 @@
180180 isa = PBXProject;
181181 attributes = {
182182 LastSwiftUpdateCheck = 0830;
183- LastUpgradeCheck = 0830;
183+ LastUpgradeCheck = 0910;
184184 ORGANIZATIONNAME = "Hori,Masaki";
185185 TargetAttributes = {
186186 F47B06E61E9A5DF9006711D9 = {
@@ -314,7 +314,9 @@
314314 CLANG_CXX_LIBRARY = "libc++";
315315 CLANG_ENABLE_MODULES = YES;
316316 CLANG_ENABLE_OBJC_ARC = YES;
317+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
317318 CLANG_WARN_BOOL_CONVERSION = YES;
319+ CLANG_WARN_COMMA = YES;
318320 CLANG_WARN_CONSTANT_CONVERSION = YES;
319321 CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
320322 CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
@@ -322,7 +324,11 @@
322324 CLANG_WARN_ENUM_CONVERSION = YES;
323325 CLANG_WARN_INFINITE_RECURSION = YES;
324326 CLANG_WARN_INT_CONVERSION = YES;
327+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
328+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
325329 CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
330+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
331+ CLANG_WARN_STRICT_PROTOTYPES = YES;
326332 CLANG_WARN_SUSPICIOUS_MOVE = YES;
327333 CLANG_WARN_UNREACHABLE_CODE = YES;
328334 CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -345,7 +351,7 @@
345351 GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
346352 GCC_WARN_UNUSED_FUNCTION = YES;
347353 GCC_WARN_UNUSED_VARIABLE = YES;
348- MACOSX_DEPLOYMENT_TARGET = 10.10;
354+ MACOSX_DEPLOYMENT_TARGET = 10.12;
349355 MTL_ENABLE_DEBUG_INFO = YES;
350356 ONLY_ACTIVE_ARCH = YES;
351357 SDKROOT = macosx;
@@ -365,7 +371,9 @@
365371 CLANG_CXX_LIBRARY = "libc++";
366372 CLANG_ENABLE_MODULES = YES;
367373 CLANG_ENABLE_OBJC_ARC = YES;
374+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
368375 CLANG_WARN_BOOL_CONVERSION = YES;
376+ CLANG_WARN_COMMA = YES;
369377 CLANG_WARN_CONSTANT_CONVERSION = YES;
370378 CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
371379 CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
@@ -373,7 +381,11 @@
373381 CLANG_WARN_ENUM_CONVERSION = YES;
374382 CLANG_WARN_INFINITE_RECURSION = YES;
375383 CLANG_WARN_INT_CONVERSION = YES;
384+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
385+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
376386 CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
387+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
388+ CLANG_WARN_STRICT_PROTOTYPES = YES;
377389 CLANG_WARN_SUSPICIOUS_MOVE = YES;
378390 CLANG_WARN_UNREACHABLE_CODE = YES;
379391 CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -390,7 +402,7 @@
390402 GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
391403 GCC_WARN_UNUSED_FUNCTION = YES;
392404 GCC_WARN_UNUSED_VARIABLE = YES;
393- MACOSX_DEPLOYMENT_TARGET = 10.10;
405+ MACOSX_DEPLOYMENT_TARGET = 10.12;
394406 MTL_ENABLE_DEBUG_INFO = NO;
395407 SDKROOT = macosx;
396408 SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
@@ -406,7 +418,7 @@
406418 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
407419 PRODUCT_BUNDLE_IDENTIFIER = com.masakih.GoInto;
408420 PRODUCT_NAME = "$(TARGET_NAME)";
409- SWIFT_VERSION = 3.0;
421+ SWIFT_VERSION = 4.0;
410422 };
411423 name = Debug;
412424 };
@@ -419,7 +431,7 @@
419431 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
420432 PRODUCT_BUNDLE_IDENTIFIER = com.masakih.GoInto;
421433 PRODUCT_NAME = "$(TARGET_NAME)";
422- SWIFT_VERSION = 3.0;
434+ SWIFT_VERSION = 4.0;
423435 };
424436 name = Release;
425437 };
@@ -433,7 +445,7 @@
433445 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
434446 PRODUCT_BUNDLE_IDENTIFIER = com.masakih.GoIntoTests;
435447 PRODUCT_NAME = "$(TARGET_NAME)";
436- SWIFT_VERSION = 3.0;
448+ SWIFT_VERSION = 4.0;
437449 TEST_HOST = "$(BUILT_PRODUCTS_DIR)/GoInto.app/Contents/MacOS/GoInto";
438450 };
439451 name = Debug;
@@ -448,7 +460,7 @@
448460 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
449461 PRODUCT_BUNDLE_IDENTIFIER = com.masakih.GoIntoTests;
450462 PRODUCT_NAME = "$(TARGET_NAME)";
451- SWIFT_VERSION = 3.0;
463+ SWIFT_VERSION = 4.0;
452464 TEST_HOST = "$(BUILT_PRODUCTS_DIR)/GoInto.app/Contents/MacOS/GoInto";
453465 };
454466 name = Release;
--- a/GoInto.xcodeproj/xcuserdata/masaki.xcuserdatad/xcschemes/GoInto.xcscheme
+++ b/GoInto.xcodeproj/xcuserdata/masaki.xcuserdatad/xcschemes/GoInto.xcscheme
@@ -1,6 +1,6 @@
11 <?xml version="1.0" encoding="UTF-8"?>
22 <Scheme
3- LastUpgradeVersion = "0830"
3+ LastUpgradeVersion = "0910"
44 version = "1.3">
55 <BuildAction
66 parallelizeBuildables = "YES"
--- a/GoInto/ChooseFolderItem.swift
+++ b/GoInto/ChooseFolderItem.swift
@@ -20,7 +20,7 @@ extension ActionListener {
2020 panel.title = NSLocalizedString("Choose Folder", comment: "Choose Folder Open Panel Title")
2121 panel.message = NSLocalizedString("Choose Folder for Save Screenshot", comment: "Choose Folder Open Panel Message")
2222
23- guard panel.runModal() == NSFileHandlingPanelOKButton,
23+ guard panel.runModal() == NSApplication.ModalResponse(NSFileHandlingPanelOKButton),
2424 let url = panel.directoryURL else { return }
2525 owner.urlSelector(url)
2626 }
--- a/GoInto/FolderItem.swift
+++ b/GoInto/FolderItem.swift
@@ -30,7 +30,7 @@ final class FolderItem: StatusItem {
3030 menuItem.title = FileManager.default.displayName(atPath: url.path)
3131 }
3232
33- let work = NSWorkspace.shared()
33+ let work = NSWorkspace.shared
3434 menuItem.image = fitSize(work.icon(forFile: url.path))
3535 menuItem.action = #selector(ActionListener.changeFolder(_:))
3636 menuItem.target = listener
@@ -53,7 +53,7 @@ final class FolderItem: StatusItem {
5353 }
5454
5555 func update(_ url: URL) {
56- menuItem.state = (self.url == url ? NSOnState : NSOffState)
56+ menuItem.state = (self.url == url ? .on : .off)
5757 }
5858 }
5959
--- a/GoInto/ImageTypeItem.swift
+++ b/GoInto/ImageTypeItem.swift
@@ -35,7 +35,7 @@ class ImageTypeItem: StatusItem {
3535
3636 menuItem.title = NSLocalizedString("Image Type", comment: "Image Type MenuItem")
3737
38- let ws = NSWorkspace.shared()
38+ let ws = NSWorkspace.shared
3939 menuItem.submenu = NSMenu()
4040
4141 supportTypes
@@ -56,9 +56,9 @@ class ImageTypeItem: StatusItem {
5656 menuItem.submenu?.items.forEach {
5757 if let type = $0.representedObject as? String,
5858 type == current {
59- $0.state = NSOnState
59+ $0.state = .on
6060 } else {
61- $0.state = NSOffState
61+ $0.state = .off
6262 }
6363 }
6464 }
--- a/GoInto/QuitItem.swift
+++ b/GoInto/QuitItem.swift
@@ -10,7 +10,7 @@ import Cocoa
1010
1111 extension ActionListener {
1212 @IBAction func quit(_ sender: Any?) {
13- NSApplication.shared().terminate(nil)
13+ NSApplication.shared.terminate(nil)
1414 }
1515 }
1616
--- a/GoInto/StatusBar.swift
+++ b/GoInto/StatusBar.swift
@@ -9,7 +9,7 @@
99 import Cocoa
1010
1111 final class StatusBar: NSObject {
12- let myStatusBar = NSStatusBar.system().statusItem(withLength: NSSquareStatusItemLength)
12+ let myStatusBar = NSStatusBar.system.statusItem(withLength: NSStatusItem.squareLength)
1313 let menu = NSMenu()
1414 private(set) var items: [StatusItem] = []
1515 private(set) var recentItems = LimitedArray<FolderItem>(5) {