Parcourir la source

Borderless window, status item, context menu

Thomas Buck il y a 9 ans
Parent
révision
cdae1d14eb
29 fichiers modifiés avec 438 ajouts et 806 suppressions
  1. 28
    126
      OtaClock.xcodeproj/project.pbxproj
  2. 69
    0
      OtaClock.xcodeproj/xcuserdata/thomas.xcuserdatad/xcschemes/OtaClock.xcscheme
  3. 2
    0
      OtaClock/AppDelegate.h
  4. 11
    2
      OtaClock/AppDelegate.m
  5. 51
    600
      OtaClock/Base.lproj/MainMenu.xib
  6. 20
    10
      OtaClock/Images.xcassets/AppIcon.appiconset/Contents.json
  7. BIN
      OtaClock/Images.xcassets/AppIcon.appiconset/icon_1024.png
  8. BIN
      OtaClock/Images.xcassets/AppIcon.appiconset/icon_128.png
  9. BIN
      OtaClock/Images.xcassets/AppIcon.appiconset/icon_16.png
  10. BIN
      OtaClock/Images.xcassets/AppIcon.appiconset/icon_256-1.png
  11. BIN
      OtaClock/Images.xcassets/AppIcon.appiconset/icon_256.png
  12. BIN
      OtaClock/Images.xcassets/AppIcon.appiconset/icon_32-1.png
  13. BIN
      OtaClock/Images.xcassets/AppIcon.appiconset/icon_32.png
  14. BIN
      OtaClock/Images.xcassets/AppIcon.appiconset/icon_512-1.png
  15. BIN
      OtaClock/Images.xcassets/AppIcon.appiconset/icon_512.png
  16. BIN
      OtaClock/Images.xcassets/AppIcon.appiconset/icon_64.png
  17. 22
    0
      OtaClock/Images.xcassets/Menu.imageset/Contents.json
  18. BIN
      OtaClock/Images.xcassets/Menu.imageset/menu16.png
  19. BIN
      OtaClock/Images.xcassets/Menu.imageset/menu32.png
  20. 22
    0
      OtaClock/Images.xcassets/otacon.imageset/Contents.json
  21. BIN
      OtaClock/Images.xcassets/otacon.imageset/otacon.png
  22. BIN
      OtaClock/Images.xcassets/otacon.imageset/otacon2.png
  23. 4
    4
      OtaClock/Info.plist
  24. 15
    0
      OtaClock/MainView.h
  25. 46
    0
      OtaClock/MainView.m
  26. 18
    0
      OtaClock/MainWindow.h
  27. 130
    0
      OtaClock/MainWindow.m
  28. 0
    24
      OtaClockTests/Info.plist
  29. 0
    40
      OtaClockTests/OtaClockTests.m

+ 28
- 126
OtaClock.xcodeproj/project.pbxproj Voir le fichier

@@ -11,19 +11,10 @@
11 11
 		E92321CC1B8128E700D79B33 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = E92321CB1B8128E700D79B33 /* main.m */; };
12 12
 		E92321CE1B8128E700D79B33 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E92321CD1B8128E700D79B33 /* Images.xcassets */; };
13 13
 		E92321D11B8128E700D79B33 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = E92321CF1B8128E700D79B33 /* MainMenu.xib */; };
14
-		E92321DD1B8128E700D79B33 /* OtaClockTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E92321DC1B8128E700D79B33 /* OtaClockTests.m */; };
14
+		E92321E81B8129FD00D79B33 /* MainView.m in Sources */ = {isa = PBXBuildFile; fileRef = E92321E71B8129FD00D79B33 /* MainView.m */; };
15
+		E92321EB1B812A1000D79B33 /* MainWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = E92321EA1B812A1000D79B33 /* MainWindow.m */; };
15 16
 /* End PBXBuildFile section */
16 17
 
17
-/* Begin PBXContainerItemProxy section */
18
-		E92321D71B8128E700D79B33 /* PBXContainerItemProxy */ = {
19
-			isa = PBXContainerItemProxy;
20
-			containerPortal = E92321BB1B8128E700D79B33 /* Project object */;
21
-			proxyType = 1;
22
-			remoteGlobalIDString = E92321C21B8128E700D79B33;
23
-			remoteInfo = OtaClock;
24
-		};
25
-/* End PBXContainerItemProxy section */
26
-
27 18
 /* Begin PBXFileReference section */
28 19
 		E92321C31B8128E700D79B33 /* OtaClock.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OtaClock.app; sourceTree = BUILT_PRODUCTS_DIR; };
29 20
 		E92321C71B8128E700D79B33 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
@@ -32,9 +23,10 @@
32 23
 		E92321CB1B8128E700D79B33 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
33 24
 		E92321CD1B8128E700D79B33 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
34 25
 		E92321D01B8128E700D79B33 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
35
-		E92321D61B8128E700D79B33 /* OtaClockTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = OtaClockTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
36
-		E92321DB1B8128E700D79B33 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
37
-		E92321DC1B8128E700D79B33 /* OtaClockTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OtaClockTests.m; sourceTree = "<group>"; };
26
+		E92321E61B8129FD00D79B33 /* MainView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainView.h; sourceTree = "<group>"; };
27
+		E92321E71B8129FD00D79B33 /* MainView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainView.m; sourceTree = "<group>"; };
28
+		E92321E91B812A1000D79B33 /* MainWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainWindow.h; sourceTree = "<group>"; };
29
+		E92321EA1B812A1000D79B33 /* MainWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainWindow.m; sourceTree = "<group>"; };
38 30
 /* End PBXFileReference section */
39 31
 
40 32
 /* Begin PBXFrameworksBuildPhase section */
@@ -45,13 +37,6 @@
45 37
 			);
46 38
 			runOnlyForDeploymentPostprocessing = 0;
47 39
 		};
48
-		E92321D31B8128E700D79B33 /* Frameworks */ = {
49
-			isa = PBXFrameworksBuildPhase;
50
-			buildActionMask = 2147483647;
51
-			files = (
52
-			);
53
-			runOnlyForDeploymentPostprocessing = 0;
54
-		};
55 40
 /* End PBXFrameworksBuildPhase section */
56 41
 
57 42
 /* Begin PBXGroup section */
@@ -59,7 +44,6 @@
59 44
 			isa = PBXGroup;
60 45
 			children = (
61 46
 				E92321C51B8128E700D79B33 /* OtaClock */,
62
-				E92321D91B8128E700D79B33 /* OtaClockTests */,
63 47
 				E92321C41B8128E700D79B33 /* Products */,
64 48
 			);
65 49
 			sourceTree = "<group>";
@@ -68,7 +52,6 @@
68 52
 			isa = PBXGroup;
69 53
 			children = (
70 54
 				E92321C31B8128E700D79B33 /* OtaClock.app */,
71
-				E92321D61B8128E700D79B33 /* OtaClockTests.xctest */,
72 55
 			);
73 56
 			name = Products;
74 57
 			sourceTree = "<group>";
@@ -80,6 +63,10 @@
80 63
 				E92321C91B8128E700D79B33 /* AppDelegate.m */,
81 64
 				E92321CD1B8128E700D79B33 /* Images.xcassets */,
82 65
 				E92321CF1B8128E700D79B33 /* MainMenu.xib */,
66
+				E92321E61B8129FD00D79B33 /* MainView.h */,
67
+				E92321E71B8129FD00D79B33 /* MainView.m */,
68
+				E92321E91B812A1000D79B33 /* MainWindow.h */,
69
+				E92321EA1B812A1000D79B33 /* MainWindow.m */,
83 70
 				E92321C61B8128E700D79B33 /* Supporting Files */,
84 71
 			);
85 72
 			path = OtaClock;
@@ -94,23 +81,6 @@
94 81
 			name = "Supporting Files";
95 82
 			sourceTree = "<group>";
96 83
 		};
97
-		E92321D91B8128E700D79B33 /* OtaClockTests */ = {
98
-			isa = PBXGroup;
99
-			children = (
100
-				E92321DC1B8128E700D79B33 /* OtaClockTests.m */,
101
-				E92321DA1B8128E700D79B33 /* Supporting Files */,
102
-			);
103
-			path = OtaClockTests;
104
-			sourceTree = "<group>";
105
-		};
106
-		E92321DA1B8128E700D79B33 /* Supporting Files */ = {
107
-			isa = PBXGroup;
108
-			children = (
109
-				E92321DB1B8128E700D79B33 /* Info.plist */,
110
-			);
111
-			name = "Supporting Files";
112
-			sourceTree = "<group>";
113
-		};
114 84
 /* End PBXGroup section */
115 85
 
116 86
 /* Begin PBXNativeTarget section */
@@ -121,6 +91,7 @@
121 91
 				E92321BF1B8128E700D79B33 /* Sources */,
122 92
 				E92321C01B8128E700D79B33 /* Frameworks */,
123 93
 				E92321C11B8128E700D79B33 /* Resources */,
94
+				E92321EC1B8136C200D79B33 /* ShellScript */,
124 95
 			);
125 96
 			buildRules = (
126 97
 			);
@@ -131,24 +102,6 @@
131 102
 			productReference = E92321C31B8128E700D79B33 /* OtaClock.app */;
132 103
 			productType = "com.apple.product-type.application";
133 104
 		};
134
-		E92321D51B8128E700D79B33 /* OtaClockTests */ = {
135
-			isa = PBXNativeTarget;
136
-			buildConfigurationList = E92321E31B8128E700D79B33 /* Build configuration list for PBXNativeTarget "OtaClockTests" */;
137
-			buildPhases = (
138
-				E92321D21B8128E700D79B33 /* Sources */,
139
-				E92321D31B8128E700D79B33 /* Frameworks */,
140
-				E92321D41B8128E700D79B33 /* Resources */,
141
-			);
142
-			buildRules = (
143
-			);
144
-			dependencies = (
145
-				E92321D81B8128E700D79B33 /* PBXTargetDependency */,
146
-			);
147
-			name = OtaClockTests;
148
-			productName = OtaClockTests;
149
-			productReference = E92321D61B8128E700D79B33 /* OtaClockTests.xctest */;
150
-			productType = "com.apple.product-type.bundle.unit-test";
151
-		};
152 105
 /* End PBXNativeTarget section */
153 106
 
154 107
 /* Begin PBXProject section */
@@ -161,10 +114,6 @@
161 114
 					E92321C21B8128E700D79B33 = {
162 115
 						CreatedOnToolsVersion = 6.4;
163 116
 					};
164
-					E92321D51B8128E700D79B33 = {
165
-						CreatedOnToolsVersion = 6.4;
166
-						TestTargetID = E92321C21B8128E700D79B33;
167
-					};
168 117
 				};
169 118
 			};
170 119
 			buildConfigurationList = E92321BE1B8128E700D79B33 /* Build configuration list for PBXProject "OtaClock" */;
@@ -181,7 +130,6 @@
181 130
 			projectRoot = "";
182 131
 			targets = (
183 132
 				E92321C21B8128E700D79B33 /* OtaClock */,
184
-				E92321D51B8128E700D79B33 /* OtaClockTests */,
185 133
 			);
186 134
 		};
187 135
 /* End PBXProject section */
@@ -196,43 +144,38 @@
196 144
 			);
197 145
 			runOnlyForDeploymentPostprocessing = 0;
198 146
 		};
199
-		E92321D41B8128E700D79B33 /* Resources */ = {
200
-			isa = PBXResourcesBuildPhase;
147
+/* End PBXResourcesBuildPhase section */
148
+
149
+/* Begin PBXShellScriptBuildPhase section */
150
+		E92321EC1B8136C200D79B33 /* ShellScript */ = {
151
+			isa = PBXShellScriptBuildPhase;
201 152
 			buildActionMask = 2147483647;
202 153
 			files = (
203 154
 			);
155
+			inputPaths = (
156
+			);
157
+			outputPaths = (
158
+			);
204 159
 			runOnlyForDeploymentPostprocessing = 0;
160
+			shellPath = /bin/sh;
161
+			shellScript = "#!/bin/bash\nbuildNumber=$(/usr/libexec/PlistBuddy -c \"Print CFBundleVersion\" \"$INFOPLIST_FILE\")\nbuildNumber=$(($buildNumber + 1))\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $buildNumber\" \"$INFOPLIST_FILE\"";
205 162
 		};
206
-/* End PBXResourcesBuildPhase section */
163
+/* End PBXShellScriptBuildPhase section */
207 164
 
208 165
 /* Begin PBXSourcesBuildPhase section */
209 166
 		E92321BF1B8128E700D79B33 /* Sources */ = {
210 167
 			isa = PBXSourcesBuildPhase;
211 168
 			buildActionMask = 2147483647;
212 169
 			files = (
170
+				E92321EB1B812A1000D79B33 /* MainWindow.m in Sources */,
213 171
 				E92321CC1B8128E700D79B33 /* main.m in Sources */,
214 172
 				E92321CA1B8128E700D79B33 /* AppDelegate.m in Sources */,
215
-			);
216
-			runOnlyForDeploymentPostprocessing = 0;
217
-		};
218
-		E92321D21B8128E700D79B33 /* Sources */ = {
219
-			isa = PBXSourcesBuildPhase;
220
-			buildActionMask = 2147483647;
221
-			files = (
222
-				E92321DD1B8128E700D79B33 /* OtaClockTests.m in Sources */,
173
+				E92321E81B8129FD00D79B33 /* MainView.m in Sources */,
223 174
 			);
224 175
 			runOnlyForDeploymentPostprocessing = 0;
225 176
 		};
226 177
 /* End PBXSourcesBuildPhase section */
227 178
 
228
-/* Begin PBXTargetDependency section */
229
-		E92321D81B8128E700D79B33 /* PBXTargetDependency */ = {
230
-			isa = PBXTargetDependency;
231
-			target = E92321C21B8128E700D79B33 /* OtaClock */;
232
-			targetProxy = E92321D71B8128E700D79B33 /* PBXContainerItemProxy */;
233
-		};
234
-/* End PBXTargetDependency section */
235
-
236 179
 /* Begin PBXVariantGroup section */
237 180
 		E92321CF1B8128E700D79B33 /* MainMenu.xib */ = {
238 181
 			isa = PBXVariantGroup;
@@ -331,6 +274,7 @@
331 274
 				COMBINE_HIDPI_IMAGES = YES;
332 275
 				INFOPLIST_FILE = OtaClock/Info.plist;
333 276
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
277
+				MACOSX_DEPLOYMENT_TARGET = 10.7;
334 278
 				PRODUCT_NAME = "$(TARGET_NAME)";
335 279
 			};
336 280
 			name = Debug;
@@ -342,46 +286,11 @@
342 286
 				COMBINE_HIDPI_IMAGES = YES;
343 287
 				INFOPLIST_FILE = OtaClock/Info.plist;
344 288
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
289
+				MACOSX_DEPLOYMENT_TARGET = 10.7;
345 290
 				PRODUCT_NAME = "$(TARGET_NAME)";
346 291
 			};
347 292
 			name = Release;
348 293
 		};
349
-		E92321E41B8128E700D79B33 /* Debug */ = {
350
-			isa = XCBuildConfiguration;
351
-			buildSettings = {
352
-				BUNDLE_LOADER = "$(TEST_HOST)";
353
-				COMBINE_HIDPI_IMAGES = YES;
354
-				FRAMEWORK_SEARCH_PATHS = (
355
-					"$(DEVELOPER_FRAMEWORKS_DIR)",
356
-					"$(inherited)",
357
-				);
358
-				GCC_PREPROCESSOR_DEFINITIONS = (
359
-					"DEBUG=1",
360
-					"$(inherited)",
361
-				);
362
-				INFOPLIST_FILE = OtaClockTests/Info.plist;
363
-				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
364
-				PRODUCT_NAME = "$(TARGET_NAME)";
365
-				TEST_HOST = "$(BUILT_PRODUCTS_DIR)/OtaClock.app/Contents/MacOS/OtaClock";
366
-			};
367
-			name = Debug;
368
-		};
369
-		E92321E51B8128E700D79B33 /* Release */ = {
370
-			isa = XCBuildConfiguration;
371
-			buildSettings = {
372
-				BUNDLE_LOADER = "$(TEST_HOST)";
373
-				COMBINE_HIDPI_IMAGES = YES;
374
-				FRAMEWORK_SEARCH_PATHS = (
375
-					"$(DEVELOPER_FRAMEWORKS_DIR)",
376
-					"$(inherited)",
377
-				);
378
-				INFOPLIST_FILE = OtaClockTests/Info.plist;
379
-				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
380
-				PRODUCT_NAME = "$(TARGET_NAME)";
381
-				TEST_HOST = "$(BUILT_PRODUCTS_DIR)/OtaClock.app/Contents/MacOS/OtaClock";
382
-			};
383
-			name = Release;
384
-		};
385 294
 /* End XCBuildConfiguration section */
386 295
 
387 296
 /* Begin XCConfigurationList section */
@@ -401,14 +310,7 @@
401 310
 				E92321E21B8128E700D79B33 /* Release */,
402 311
 			);
403 312
 			defaultConfigurationIsVisible = 0;
404
-		};
405
-		E92321E31B8128E700D79B33 /* Build configuration list for PBXNativeTarget "OtaClockTests" */ = {
406
-			isa = XCConfigurationList;
407
-			buildConfigurations = (
408
-				E92321E41B8128E700D79B33 /* Debug */,
409
-				E92321E51B8128E700D79B33 /* Release */,
410
-			);
411
-			defaultConfigurationIsVisible = 0;
313
+			defaultConfigurationName = Release;
412 314
 		};
413 315
 /* End XCConfigurationList section */
414 316
 	};

+ 69
- 0
OtaClock.xcodeproj/xcuserdata/thomas.xcuserdatad/xcschemes/OtaClock.xcscheme Voir le fichier

@@ -5,6 +5,36 @@
5 5
    <BuildAction
6 6
       parallelizeBuildables = "YES"
7 7
       buildImplicitDependencies = "YES">
8
+      <BuildActionEntries>
9
+         <BuildActionEntry
10
+            buildForTesting = "YES"
11
+            buildForRunning = "YES"
12
+            buildForProfiling = "YES"
13
+            buildForArchiving = "YES"
14
+            buildForAnalyzing = "YES">
15
+            <BuildableReference
16
+               BuildableIdentifier = "primary"
17
+               BlueprintIdentifier = "E92321C21B8128E700D79B33"
18
+               BuildableName = "OtaClock.app"
19
+               BlueprintName = "OtaClock"
20
+               ReferencedContainer = "container:OtaClock.xcodeproj">
21
+            </BuildableReference>
22
+         </BuildActionEntry>
23
+         <BuildActionEntry
24
+            buildForTesting = "YES"
25
+            buildForRunning = "YES"
26
+            buildForProfiling = "NO"
27
+            buildForArchiving = "NO"
28
+            buildForAnalyzing = "YES">
29
+            <BuildableReference
30
+               BuildableIdentifier = "primary"
31
+               BlueprintIdentifier = "E92321D51B8128E700D79B33"
32
+               BuildableName = "OtaClockTests.xctest"
33
+               BlueprintName = "OtaClockTests"
34
+               ReferencedContainer = "container:OtaClock.xcodeproj">
35
+            </BuildableReference>
36
+         </BuildActionEntry>
37
+      </BuildActionEntries>
8 38
    </BuildAction>
9 39
    <TestAction
10 40
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
@@ -12,7 +42,26 @@
12 42
       shouldUseLaunchSchemeArgsEnv = "YES"
13 43
       buildConfiguration = "Debug">
14 44
       <Testables>
45
+         <TestableReference
46
+            skipped = "NO">
47
+            <BuildableReference
48
+               BuildableIdentifier = "primary"
49
+               BlueprintIdentifier = "E92321D51B8128E700D79B33"
50
+               BuildableName = "OtaClockTests.xctest"
51
+               BlueprintName = "OtaClockTests"
52
+               ReferencedContainer = "container:OtaClock.xcodeproj">
53
+            </BuildableReference>
54
+         </TestableReference>
15 55
       </Testables>
56
+      <MacroExpansion>
57
+         <BuildableReference
58
+            BuildableIdentifier = "primary"
59
+            BlueprintIdentifier = "E92321C21B8128E700D79B33"
60
+            BuildableName = "OtaClock.app"
61
+            BlueprintName = "OtaClock"
62
+            ReferencedContainer = "container:OtaClock.xcodeproj">
63
+         </BuildableReference>
64
+      </MacroExpansion>
16 65
    </TestAction>
17 66
    <LaunchAction
18 67
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
@@ -23,6 +72,16 @@
23 72
       ignoresPersistentStateOnLaunch = "NO"
24 73
       debugDocumentVersioning = "YES"
25 74
       allowLocationSimulation = "YES">
75
+      <BuildableProductRunnable
76
+         runnableDebuggingMode = "0">
77
+         <BuildableReference
78
+            BuildableIdentifier = "primary"
79
+            BlueprintIdentifier = "E92321C21B8128E700D79B33"
80
+            BuildableName = "OtaClock.app"
81
+            BlueprintName = "OtaClock"
82
+            ReferencedContainer = "container:OtaClock.xcodeproj">
83
+         </BuildableReference>
84
+      </BuildableProductRunnable>
26 85
       <AdditionalOptions>
27 86
       </AdditionalOptions>
28 87
    </LaunchAction>
@@ -32,6 +91,16 @@
32 91
       useCustomWorkingDirectory = "NO"
33 92
       buildConfiguration = "Release"
34 93
       debugDocumentVersioning = "YES">
94
+      <BuildableProductRunnable
95
+         runnableDebuggingMode = "0">
96
+         <BuildableReference
97
+            BuildableIdentifier = "primary"
98
+            BlueprintIdentifier = "E92321C21B8128E700D79B33"
99
+            BuildableName = "OtaClock.app"
100
+            BlueprintName = "OtaClock"
101
+            ReferencedContainer = "container:OtaClock.xcodeproj">
102
+         </BuildableReference>
103
+      </BuildableProductRunnable>
35 104
    </ProfileAction>
36 105
    <AnalyzeAction
37 106
       buildConfiguration = "Debug">

+ 2
- 0
OtaClock/AppDelegate.h Voir le fichier

@@ -10,6 +10,8 @@
10 10
 
11 11
 @interface AppDelegate : NSObject <NSApplicationDelegate>
12 12
 
13
+@property (strong) NSStatusItem *statusItem;
14
+@property (weak) IBOutlet NSMenu *mainMenu;
13 15
 
14 16
 @end
15 17
 

+ 11
- 2
OtaClock/AppDelegate.m Voir le fichier

@@ -11,16 +11,25 @@
11 11
 @interface AppDelegate ()
12 12
 
13 13
 @property (weak) IBOutlet NSWindow *window;
14
+
14 15
 @end
15 16
 
16 17
 @implementation AppDelegate
17 18
 
19
+@synthesize statusItem;
20
+@synthesize mainMenu;
21
+
18 22
 - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
19
-    // Insert code here to initialize your application
23
+    // Create Status Bar Item
24
+    statusItem = [[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength];
25
+    statusItem.image = [NSImage imageNamed:@"Menu"];
26
+    statusItem.highlightMode = YES;
27
+    statusItem.menu = mainMenu; // Use same menu used for right-clicks
20 28
 }
21 29
 
22 30
 - (void)applicationWillTerminate:(NSNotification *)aNotification {
23
-    // Insert code here to tear down your application
31
+    // Remove Status Bar Item
32
+    [[NSStatusBar systemStatusBar] removeStatusItem:statusItem];
24 33
 }
25 34
 
26 35
 @end

+ 51
- 600
OtaClock/Base.lproj/MainMenu.xib Voir le fichier

@@ -1,7 +1,8 @@
1 1
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6233" systemVersion="14A329f" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
2
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="7706" systemVersion="14F27" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
3 3
     <dependencies>
4
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="6233"/>
4
+        <deployment identifier="macosx"/>
5
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="7706"/>
5 6
     </dependencies>
6 7
     <objects>
7 8
         <customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
@@ -11,8 +12,9 @@
11 12
         </customObject>
12 13
         <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
13 14
         <customObject id="-3" userLabel="Application" customClass="NSObject"/>
14
-        <customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModuleProvider="">
15
+        <customObject id="Voe-Tx-rLC" customClass="AppDelegate">
15 16
             <connections>
17
+                <outlet property="mainMenu" destination="v1Z-w4-vhP" id="3dc-uQ-ZW1"/>
16 18
                 <outlet property="window" destination="QvC-M9-y7g" id="gIp-Ho-8D9"/>
17 19
             </connections>
18 20
         </customObject>
@@ -30,20 +32,23 @@
30 32
                                 </connections>
31 33
                             </menuItem>
32 34
                             <menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/>
33
-                            <menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW"/>
35
+                            <menuItem title="Preferences…" id="BOF-NM-1cW">
36
+                                <modifierMask key="keyEquivalentModifierMask"/>
37
+                            </menuItem>
34 38
                             <menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/>
35 39
                             <menuItem title="Services" id="NMo-om-nkz">
36 40
                                 <modifierMask key="keyEquivalentModifierMask"/>
37 41
                                 <menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/>
38 42
                             </menuItem>
39 43
                             <menuItem isSeparatorItem="YES" id="4je-JR-u6R"/>
40
-                            <menuItem title="Hide OtaClock" keyEquivalent="h" id="Olw-nP-bQN">
44
+                            <menuItem title="Hide OtaClock" id="Olw-nP-bQN">
45
+                                <modifierMask key="keyEquivalentModifierMask"/>
41 46
                                 <connections>
42 47
                                     <action selector="hide:" target="-1" id="PnN-Uc-m68"/>
43 48
                                 </connections>
44 49
                             </menuItem>
45
-                            <menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO">
46
-                                <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
50
+                            <menuItem title="Hide Others" id="Vdr-fp-XzO">
51
+                                <modifierMask key="keyEquivalentModifierMask"/>
47 52
                                 <connections>
48 53
                                     <action selector="hideOtherApplications:" target="-1" id="VT4-aY-XCT"/>
49 54
                                 </connections>
@@ -63,618 +68,64 @@
63 68
                         </items>
64 69
                     </menu>
65 70
                 </menuItem>
66
-                <menuItem title="File" id="dMs-cI-mzQ">
71
+            </items>
72
+        </menu>
73
+        <window title="OtaClock" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="QvC-M9-y7g" customClass="MainWindow">
74
+            <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
75
+            <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
76
+            <rect key="contentRect" x="335" y="390" width="235" height="196"/>
77
+            <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1057"/>
78
+            <view key="contentView" id="EiT-Mj-1SZ" customClass="MainView">
79
+                <rect key="frame" x="0.0" y="1" width="235" height="196"/>
80
+                <autoresizingMask key="autoresizingMask"/>
81
+                <connections>
82
+                    <outlet property="menu" destination="v1Z-w4-vhP" id="c20-yu-LsO"/>
83
+                </connections>
84
+            </view>
85
+            <point key="canvasLocation" x="129.5" y="81"/>
86
+        </window>
87
+        <menu id="v1Z-w4-vhP">
88
+            <items>
89
+                <menuItem title="Change Size" id="msY-7t-C9j">
67 90
                     <modifierMask key="keyEquivalentModifierMask"/>
68
-                    <menu key="submenu" title="File" id="bib-Uj-vzu">
91
+                    <menu key="submenu" title="Change Size" id="b3j-Lp-Mui">
69 92
                         <items>
70
-                            <menuItem title="New" keyEquivalent="n" id="Was-JA-tGl">
71
-                                <connections>
72
-                                    <action selector="newDocument:" target="-1" id="4Si-XN-c54"/>
73
-                                </connections>
74
-                            </menuItem>
75
-                            <menuItem title="Open…" keyEquivalent="o" id="IAo-SY-fd9">
76
-                                <connections>
77
-                                    <action selector="openDocument:" target="-1" id="bVn-NM-KNZ"/>
78
-                                </connections>
79
-                            </menuItem>
80
-                            <menuItem title="Open Recent" id="tXI-mr-wws">
81
-                                <modifierMask key="keyEquivalentModifierMask"/>
82
-                                <menu key="submenu" title="Open Recent" systemMenu="recentDocuments" id="oas-Oc-fiZ">
83
-                                    <items>
84
-                                        <menuItem title="Clear Menu" id="vNY-rz-j42">
85
-                                            <modifierMask key="keyEquivalentModifierMask"/>
86
-                                            <connections>
87
-                                                <action selector="clearRecentDocuments:" target="-1" id="Daa-9d-B3U"/>
88
-                                            </connections>
89
-                                        </menuItem>
90
-                                    </items>
91
-                                </menu>
92
-                            </menuItem>
93
-                            <menuItem isSeparatorItem="YES" id="m54-Is-iLE"/>
94
-                            <menuItem title="Close" keyEquivalent="w" id="DVo-aG-piG">
95
-                                <connections>
96
-                                    <action selector="performClose:" target="-1" id="HmO-Ls-i7Q"/>
97
-                                </connections>
98
-                            </menuItem>
99
-                            <menuItem title="Save…" keyEquivalent="s" id="pxx-59-PXV">
100
-                                <connections>
101
-                                    <action selector="saveDocument:" target="-1" id="teZ-XB-qJY"/>
102
-                                </connections>
103
-                            </menuItem>
104
-                            <menuItem title="Save As…" keyEquivalent="S" id="Bw7-FT-i3A">
105
-                                <connections>
106
-                                    <action selector="saveDocumentAs:" target="-1" id="mDf-zr-I0C"/>
107
-                                </connections>
108
-                            </menuItem>
109
-                            <menuItem title="Revert to Saved" id="KaW-ft-85H">
93
+                            <menuItem title="1x" id="Acr-Ff-Lm2">
110 94
                                 <modifierMask key="keyEquivalentModifierMask"/>
111 95
                                 <connections>
112
-                                    <action selector="revertDocumentToSaved:" target="-1" id="iJ3-Pv-kwq"/>
113
-                                </connections>
114
-                            </menuItem>
115
-                            <menuItem isSeparatorItem="YES" id="aJh-i4-bef"/>
116
-                            <menuItem title="Page Setup…" keyEquivalent="P" id="qIS-W8-SiK">
117
-                                <modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
118
-                                <connections>
119
-                                    <action selector="runPageLayout:" target="-1" id="Din-rz-gC5"/>
120
-                                </connections>
121
-                            </menuItem>
122
-                            <menuItem title="Print…" keyEquivalent="p" id="aTl-1u-JFS">
123
-                                <connections>
124
-                                    <action selector="print:" target="-1" id="qaZ-4w-aoO"/>
125
-                                </connections>
126
-                            </menuItem>
127
-                        </items>
128
-                    </menu>
129
-                </menuItem>
130
-                <menuItem title="Edit" id="5QF-Oa-p0T">
131
-                    <modifierMask key="keyEquivalentModifierMask"/>
132
-                    <menu key="submenu" title="Edit" id="W48-6f-4Dl">
133
-                        <items>
134
-                            <menuItem title="Undo" keyEquivalent="z" id="dRJ-4n-Yzg">
135
-                                <connections>
136
-                                    <action selector="undo:" target="-1" id="M6e-cu-g7V"/>
137
-                                </connections>
138
-                            </menuItem>
139
-                            <menuItem title="Redo" keyEquivalent="Z" id="6dh-zS-Vam">
140
-                                <connections>
141
-                                    <action selector="redo:" target="-1" id="oIA-Rs-6OD"/>
142
-                                </connections>
143
-                            </menuItem>
144
-                            <menuItem isSeparatorItem="YES" id="WRV-NI-Exz"/>
145
-                            <menuItem title="Cut" keyEquivalent="x" id="uRl-iY-unG">
146
-                                <connections>
147
-                                    <action selector="cut:" target="-1" id="YJe-68-I9s"/>
148
-                                </connections>
149
-                            </menuItem>
150
-                            <menuItem title="Copy" keyEquivalent="c" id="x3v-GG-iWU">
151
-                                <connections>
152
-                                    <action selector="copy:" target="-1" id="G1f-GL-Joy"/>
153
-                                </connections>
154
-                            </menuItem>
155
-                            <menuItem title="Paste" keyEquivalent="v" id="gVA-U4-sdL">
156
-                                <connections>
157
-                                    <action selector="paste:" target="-1" id="UvS-8e-Qdg"/>
158
-                                </connections>
159
-                            </menuItem>
160
-                            <menuItem title="Paste and Match Style" keyEquivalent="V" id="WeT-3V-zwk">
161
-                                <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
162
-                                <connections>
163
-                                    <action selector="pasteAsPlainText:" target="-1" id="cEh-KX-wJQ"/>
96
+                                    <action selector="changeSize:" target="QvC-M9-y7g" id="LdY-jb-6Tw"/>
164 97
                                 </connections>
165 98
                             </menuItem>
166
-                            <menuItem title="Delete" id="pa3-QI-u2k">
99
+                            <menuItem title="2x" id="sRn-WM-cKW">
167 100
                                 <modifierMask key="keyEquivalentModifierMask"/>
168 101
                                 <connections>
169
-                                    <action selector="delete:" target="-1" id="0Mk-Ml-PaM"/>
102
+                                    <action selector="changeSize:" target="QvC-M9-y7g" id="Nvd-gD-ixJ"/>
170 103
                                 </connections>
171 104
                             </menuItem>
172
-                            <menuItem title="Select All" keyEquivalent="a" id="Ruw-6m-B2m">
173
-                                <connections>
174
-                                    <action selector="selectAll:" target="-1" id="VNm-Mi-diN"/>
175
-                                </connections>
176
-                            </menuItem>
177
-                            <menuItem isSeparatorItem="YES" id="uyl-h8-XO2"/>
178
-                            <menuItem title="Find" id="4EN-yA-p0u">
179
-                                <modifierMask key="keyEquivalentModifierMask"/>
180
-                                <menu key="submenu" title="Find" id="1b7-l0-nxx">
181
-                                    <items>
182
-                                        <menuItem title="Find…" tag="1" keyEquivalent="f" id="Xz5-n4-O0W">
183
-                                            <connections>
184
-                                                <action selector="performFindPanelAction:" target="-1" id="cD7-Qs-BN4"/>
185
-                                            </connections>
186
-                                        </menuItem>
187
-                                        <menuItem title="Find and Replace…" tag="12" keyEquivalent="f" id="YEy-JH-Tfz">
188
-                                            <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
189
-                                            <connections>
190
-                                                <action selector="performFindPanelAction:" target="-1" id="WD3-Gg-5AJ"/>
191
-                                            </connections>
192
-                                        </menuItem>
193
-                                        <menuItem title="Find Next" tag="2" keyEquivalent="g" id="q09-fT-Sye">
194
-                                            <connections>
195
-                                                <action selector="performFindPanelAction:" target="-1" id="NDo-RZ-v9R"/>
196
-                                            </connections>
197
-                                        </menuItem>
198
-                                        <menuItem title="Find Previous" tag="3" keyEquivalent="G" id="OwM-mh-QMV">
199
-                                            <connections>
200
-                                                <action selector="performFindPanelAction:" target="-1" id="HOh-sY-3ay"/>
201
-                                            </connections>
202
-                                        </menuItem>
203
-                                        <menuItem title="Use Selection for Find" tag="7" keyEquivalent="e" id="buJ-ug-pKt">
204
-                                            <connections>
205
-                                                <action selector="performFindPanelAction:" target="-1" id="U76-nv-p5D"/>
206
-                                            </connections>
207
-                                        </menuItem>
208
-                                        <menuItem title="Jump to Selection" keyEquivalent="j" id="S0p-oC-mLd">
209
-                                            <connections>
210
-                                                <action selector="centerSelectionInVisibleArea:" target="-1" id="IOG-6D-g5B"/>
211
-                                            </connections>
212
-                                        </menuItem>
213
-                                    </items>
214
-                                </menu>
215
-                            </menuItem>
216
-                            <menuItem title="Spelling and Grammar" id="Dv1-io-Yv7">
217
-                                <modifierMask key="keyEquivalentModifierMask"/>
218
-                                <menu key="submenu" title="Spelling" id="3IN-sU-3Bg">
219
-                                    <items>
220
-                                        <menuItem title="Show Spelling and Grammar" keyEquivalent=":" id="HFo-cy-zxI">
221
-                                            <connections>
222
-                                                <action selector="showGuessPanel:" target="-1" id="vFj-Ks-hy3"/>
223
-                                            </connections>
224
-                                        </menuItem>
225
-                                        <menuItem title="Check Document Now" keyEquivalent=";" id="hz2-CU-CR7">
226
-                                            <connections>
227
-                                                <action selector="checkSpelling:" target="-1" id="fz7-VC-reM"/>
228
-                                            </connections>
229
-                                        </menuItem>
230
-                                        <menuItem isSeparatorItem="YES" id="bNw-od-mp5"/>
231
-                                        <menuItem title="Check Spelling While Typing" id="rbD-Rh-wIN">
232
-                                            <modifierMask key="keyEquivalentModifierMask"/>
233
-                                            <connections>
234
-                                                <action selector="toggleContinuousSpellChecking:" target="-1" id="7w6-Qz-0kB"/>
235
-                                            </connections>
236
-                                        </menuItem>
237
-                                        <menuItem title="Check Grammar With Spelling" id="mK6-2p-4JG">
238
-                                            <modifierMask key="keyEquivalentModifierMask"/>
239
-                                            <connections>
240
-                                                <action selector="toggleGrammarChecking:" target="-1" id="muD-Qn-j4w"/>
241
-                                            </connections>
242
-                                        </menuItem>
243
-                                        <menuItem title="Correct Spelling Automatically" id="78Y-hA-62v">
244
-                                            <modifierMask key="keyEquivalentModifierMask"/>
245
-                                            <connections>
246
-                                                <action selector="toggleAutomaticSpellingCorrection:" target="-1" id="2lM-Qi-WAP"/>
247
-                                            </connections>
248
-                                        </menuItem>
249
-                                    </items>
250
-                                </menu>
251
-                            </menuItem>
252
-                            <menuItem title="Substitutions" id="9ic-FL-obx">
253
-                                <modifierMask key="keyEquivalentModifierMask"/>
254
-                                <menu key="submenu" title="Substitutions" id="FeM-D8-WVr">
255
-                                    <items>
256
-                                        <menuItem title="Show Substitutions" id="z6F-FW-3nz">
257
-                                            <modifierMask key="keyEquivalentModifierMask"/>
258
-                                            <connections>
259
-                                                <action selector="orderFrontSubstitutionsPanel:" target="-1" id="oku-mr-iSq"/>
260
-                                            </connections>
261
-                                        </menuItem>
262
-                                        <menuItem isSeparatorItem="YES" id="gPx-C9-uUO"/>
263
-                                        <menuItem title="Smart Copy/Paste" id="9yt-4B-nSM">
264
-                                            <modifierMask key="keyEquivalentModifierMask"/>
265
-                                            <connections>
266
-                                                <action selector="toggleSmartInsertDelete:" target="-1" id="3IJ-Se-DZD"/>
267
-                                            </connections>
268
-                                        </menuItem>
269
-                                        <menuItem title="Smart Quotes" id="hQb-2v-fYv">
270
-                                            <modifierMask key="keyEquivalentModifierMask"/>
271
-                                            <connections>
272
-                                                <action selector="toggleAutomaticQuoteSubstitution:" target="-1" id="ptq-xd-QOA"/>
273
-                                            </connections>
274
-                                        </menuItem>
275
-                                        <menuItem title="Smart Dashes" id="rgM-f4-ycn">
276
-                                            <modifierMask key="keyEquivalentModifierMask"/>
277
-                                            <connections>
278
-                                                <action selector="toggleAutomaticDashSubstitution:" target="-1" id="oCt-pO-9gS"/>
279
-                                            </connections>
280
-                                        </menuItem>
281
-                                        <menuItem title="Smart Links" id="cwL-P1-jid">
282
-                                            <modifierMask key="keyEquivalentModifierMask"/>
283
-                                            <connections>
284
-                                                <action selector="toggleAutomaticLinkDetection:" target="-1" id="Gip-E3-Fov"/>
285
-                                            </connections>
286
-                                        </menuItem>
287
-                                        <menuItem title="Data Detectors" id="tRr-pd-1PS">
288
-                                            <modifierMask key="keyEquivalentModifierMask"/>
289
-                                            <connections>
290
-                                                <action selector="toggleAutomaticDataDetection:" target="-1" id="R1I-Nq-Kbl"/>
291
-                                            </connections>
292
-                                        </menuItem>
293
-                                        <menuItem title="Text Replacement" id="HFQ-gK-NFA">
294
-                                            <modifierMask key="keyEquivalentModifierMask"/>
295
-                                            <connections>
296
-                                                <action selector="toggleAutomaticTextReplacement:" target="-1" id="DvP-Fe-Py6"/>
297
-                                            </connections>
298
-                                        </menuItem>
299
-                                    </items>
300
-                                </menu>
301
-                            </menuItem>
302
-                            <menuItem title="Transformations" id="2oI-Rn-ZJC">
303
-                                <modifierMask key="keyEquivalentModifierMask"/>
304
-                                <menu key="submenu" title="Transformations" id="c8a-y6-VQd">
305
-                                    <items>
306
-                                        <menuItem title="Make Upper Case" id="vmV-6d-7jI">
307
-                                            <modifierMask key="keyEquivalentModifierMask"/>
308
-                                            <connections>
309
-                                                <action selector="uppercaseWord:" target="-1" id="sPh-Tk-edu"/>
310
-                                            </connections>
311
-                                        </menuItem>
312
-                                        <menuItem title="Make Lower Case" id="d9M-CD-aMd">
313
-                                            <modifierMask key="keyEquivalentModifierMask"/>
314
-                                            <connections>
315
-                                                <action selector="lowercaseWord:" target="-1" id="iUZ-b5-hil"/>
316
-                                            </connections>
317
-                                        </menuItem>
318
-                                        <menuItem title="Capitalize" id="UEZ-Bs-lqG">
319
-                                            <modifierMask key="keyEquivalentModifierMask"/>
320
-                                            <connections>
321
-                                                <action selector="capitalizeWord:" target="-1" id="26H-TL-nsh"/>
322
-                                            </connections>
323
-                                        </menuItem>
324
-                                    </items>
325
-                                </menu>
326
-                            </menuItem>
327
-                            <menuItem title="Speech" id="xrE-MZ-jX0">
328
-                                <modifierMask key="keyEquivalentModifierMask"/>
329
-                                <menu key="submenu" title="Speech" id="3rS-ZA-NoH">
330
-                                    <items>
331
-                                        <menuItem title="Start Speaking" id="Ynk-f8-cLZ">
332
-                                            <modifierMask key="keyEquivalentModifierMask"/>
333
-                                            <connections>
334
-                                                <action selector="startSpeaking:" target="-1" id="654-Ng-kyl"/>
335
-                                            </connections>
336
-                                        </menuItem>
337
-                                        <menuItem title="Stop Speaking" id="Oyz-dy-DGm">
338
-                                            <modifierMask key="keyEquivalentModifierMask"/>
339
-                                            <connections>
340
-                                                <action selector="stopSpeaking:" target="-1" id="dX8-6p-jy9"/>
341
-                                            </connections>
342
-                                        </menuItem>
343
-                                    </items>
344
-                                </menu>
345
-                            </menuItem>
346 105
                         </items>
347 106
                     </menu>
348 107
                 </menuItem>
349
-                <menuItem title="Format" id="jxT-CU-nIS">
108
+                <menuItem isSeparatorItem="YES" id="reI-n6-U2e"/>
109
+                <menuItem title="Lock position" id="YfQ-b7-bXC">
350 110
                     <modifierMask key="keyEquivalentModifierMask"/>
351
-                    <menu key="submenu" title="Format" id="GEO-Iw-cKr">
352
-                        <items>
353
-                            <menuItem title="Font" id="Gi5-1S-RQB">
354
-                                <modifierMask key="keyEquivalentModifierMask"/>
355
-                                <menu key="submenu" title="Font" systemMenu="font" id="aXa-aM-Jaq">
356
-                                    <items>
357
-                                        <menuItem title="Show Fonts" keyEquivalent="t" id="Q5e-8K-NDq">
358
-                                            <connections>
359
-                                                <action selector="orderFrontFontPanel:" target="YLy-65-1bz" id="WHr-nq-2xA"/>
360
-                                            </connections>
361
-                                        </menuItem>
362
-                                        <menuItem title="Bold" tag="2" keyEquivalent="b" id="GB9-OM-e27">
363
-                                            <connections>
364
-                                                <action selector="addFontTrait:" target="YLy-65-1bz" id="hqk-hr-sYV"/>
365
-                                            </connections>
366
-                                        </menuItem>
367
-                                        <menuItem title="Italic" tag="1" keyEquivalent="i" id="Vjx-xi-njq">
368
-                                            <connections>
369
-                                                <action selector="addFontTrait:" target="YLy-65-1bz" id="IHV-OB-c03"/>
370
-                                            </connections>
371
-                                        </menuItem>
372
-                                        <menuItem title="Underline" keyEquivalent="u" id="WRG-CD-K1S">
373
-                                            <connections>
374
-                                                <action selector="underline:" target="-1" id="FYS-2b-JAY"/>
375
-                                            </connections>
376
-                                        </menuItem>
377
-                                        <menuItem isSeparatorItem="YES" id="5gT-KC-WSO"/>
378
-                                        <menuItem title="Bigger" tag="3" keyEquivalent="+" id="Ptp-SP-VEL">
379
-                                            <connections>
380
-                                                <action selector="modifyFont:" target="YLy-65-1bz" id="Uc7-di-UnL"/>
381
-                                            </connections>
382
-                                        </menuItem>
383
-                                        <menuItem title="Smaller" tag="4" keyEquivalent="-" id="i1d-Er-qST">
384
-                                            <connections>
385
-                                                <action selector="modifyFont:" target="YLy-65-1bz" id="HcX-Lf-eNd"/>
386
-                                            </connections>
387
-                                        </menuItem>
388
-                                        <menuItem isSeparatorItem="YES" id="kx3-Dk-x3B"/>
389
-                                        <menuItem title="Kern" id="jBQ-r6-VK2">
390
-                                            <modifierMask key="keyEquivalentModifierMask"/>
391
-                                            <menu key="submenu" title="Kern" id="tlD-Oa-oAM">
392
-                                                <items>
393
-                                                    <menuItem title="Use Default" id="GUa-eO-cwY">
394
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
395
-                                                        <connections>
396
-                                                            <action selector="useStandardKerning:" target="-1" id="6dk-9l-Ckg"/>
397
-                                                        </connections>
398
-                                                    </menuItem>
399
-                                                    <menuItem title="Use None" id="cDB-IK-hbR">
400
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
401
-                                                        <connections>
402
-                                                            <action selector="turnOffKerning:" target="-1" id="U8a-gz-Maa"/>
403
-                                                        </connections>
404
-                                                    </menuItem>
405
-                                                    <menuItem title="Tighten" id="46P-cB-AYj">
406
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
407
-                                                        <connections>
408
-                                                            <action selector="tightenKerning:" target="-1" id="hr7-Nz-8ro"/>
409
-                                                        </connections>
410
-                                                    </menuItem>
411
-                                                    <menuItem title="Loosen" id="ogc-rX-tC1">
412
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
413
-                                                        <connections>
414
-                                                            <action selector="loosenKerning:" target="-1" id="8i4-f9-FKE"/>
415
-                                                        </connections>
416
-                                                    </menuItem>
417
-                                                </items>
418
-                                            </menu>
419
-                                        </menuItem>
420
-                                        <menuItem title="Ligatures" id="o6e-r0-MWq">
421
-                                            <modifierMask key="keyEquivalentModifierMask"/>
422
-                                            <menu key="submenu" title="Ligatures" id="w0m-vy-SC9">
423
-                                                <items>
424
-                                                    <menuItem title="Use Default" id="agt-UL-0e3">
425
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
426
-                                                        <connections>
427
-                                                            <action selector="useStandardLigatures:" target="-1" id="7uR-wd-Dx6"/>
428
-                                                        </connections>
429
-                                                    </menuItem>
430
-                                                    <menuItem title="Use None" id="J7y-lM-qPV">
431
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
432
-                                                        <connections>
433
-                                                            <action selector="turnOffLigatures:" target="-1" id="iX2-gA-Ilz"/>
434
-                                                        </connections>
435
-                                                    </menuItem>
436
-                                                    <menuItem title="Use All" id="xQD-1f-W4t">
437
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
438
-                                                        <connections>
439
-                                                            <action selector="useAllLigatures:" target="-1" id="KcB-kA-TuK"/>
440
-                                                        </connections>
441
-                                                    </menuItem>
442
-                                                </items>
443
-                                            </menu>
444
-                                        </menuItem>
445
-                                        <menuItem title="Baseline" id="OaQ-X3-Vso">
446
-                                            <modifierMask key="keyEquivalentModifierMask"/>
447
-                                            <menu key="submenu" title="Baseline" id="ijk-EB-dga">
448
-                                                <items>
449
-                                                    <menuItem title="Use Default" id="3Om-Ey-2VK">
450
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
451
-                                                        <connections>
452
-                                                            <action selector="unscript:" target="-1" id="0vZ-95-Ywn"/>
453
-                                                        </connections>
454
-                                                    </menuItem>
455
-                                                    <menuItem title="Superscript" id="Rqc-34-cIF">
456
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
457
-                                                        <connections>
458
-                                                            <action selector="superscript:" target="-1" id="3qV-fo-wpU"/>
459
-                                                        </connections>
460
-                                                    </menuItem>
461
-                                                    <menuItem title="Subscript" id="I0S-gh-46l">
462
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
463
-                                                        <connections>
464
-                                                            <action selector="subscript:" target="-1" id="Q6W-4W-IGz"/>
465
-                                                        </connections>
466
-                                                    </menuItem>
467
-                                                    <menuItem title="Raise" id="2h7-ER-AoG">
468
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
469
-                                                        <connections>
470
-                                                            <action selector="raiseBaseline:" target="-1" id="4sk-31-7Q9"/>
471
-                                                        </connections>
472
-                                                    </menuItem>
473
-                                                    <menuItem title="Lower" id="1tx-W0-xDw">
474
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
475
-                                                        <connections>
476
-                                                            <action selector="lowerBaseline:" target="-1" id="OF1-bc-KW4"/>
477
-                                                        </connections>
478
-                                                    </menuItem>
479
-                                                </items>
480
-                                            </menu>
481
-                                        </menuItem>
482
-                                        <menuItem isSeparatorItem="YES" id="Ndw-q3-faq"/>
483
-                                        <menuItem title="Show Colors" keyEquivalent="C" id="bgn-CT-cEk">
484
-                                            <connections>
485
-                                                <action selector="orderFrontColorPanel:" target="-1" id="mSX-Xz-DV3"/>
486
-                                            </connections>
487
-                                        </menuItem>
488
-                                        <menuItem isSeparatorItem="YES" id="iMs-zA-UFJ"/>
489
-                                        <menuItem title="Copy Style" keyEquivalent="c" id="5Vv-lz-BsD">
490
-                                            <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
491
-                                            <connections>
492
-                                                <action selector="copyFont:" target="-1" id="GJO-xA-L4q"/>
493
-                                            </connections>
494
-                                        </menuItem>
495
-                                        <menuItem title="Paste Style" keyEquivalent="v" id="vKC-jM-MkH">
496
-                                            <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
497
-                                            <connections>
498
-                                                <action selector="pasteFont:" target="-1" id="JfD-CL-leO"/>
499
-                                            </connections>
500
-                                        </menuItem>
501
-                                    </items>
502
-                                </menu>
503
-                            </menuItem>
504
-                            <menuItem title="Text" id="Fal-I4-PZk">
505
-                                <modifierMask key="keyEquivalentModifierMask"/>
506
-                                <menu key="submenu" title="Text" id="d9c-me-L2H">
507
-                                    <items>
508
-                                        <menuItem title="Align Left" keyEquivalent="{" id="ZM1-6Q-yy1">
509
-                                            <connections>
510
-                                                <action selector="alignLeft:" target="-1" id="zUv-R1-uAa"/>
511
-                                            </connections>
512
-                                        </menuItem>
513
-                                        <menuItem title="Center" keyEquivalent="|" id="VIY-Ag-zcb">
514
-                                            <connections>
515
-                                                <action selector="alignCenter:" target="-1" id="spX-mk-kcS"/>
516
-                                            </connections>
517
-                                        </menuItem>
518
-                                        <menuItem title="Justify" id="J5U-5w-g23">
519
-                                            <modifierMask key="keyEquivalentModifierMask"/>
520
-                                            <connections>
521
-                                                <action selector="alignJustified:" target="-1" id="ljL-7U-jND"/>
522
-                                            </connections>
523
-                                        </menuItem>
524
-                                        <menuItem title="Align Right" keyEquivalent="}" id="wb2-vD-lq4">
525
-                                            <connections>
526
-                                                <action selector="alignRight:" target="-1" id="r48-bG-YeY"/>
527
-                                            </connections>
528
-                                        </menuItem>
529
-                                        <menuItem isSeparatorItem="YES" id="4s2-GY-VfK"/>
530
-                                        <menuItem title="Writing Direction" id="H1b-Si-o9J">
531
-                                            <modifierMask key="keyEquivalentModifierMask"/>
532
-                                            <menu key="submenu" title="Writing Direction" id="8mr-sm-Yjd">
533
-                                                <items>
534
-                                                    <menuItem title="Paragraph" enabled="NO" id="ZvO-Gk-QUH">
535
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
536
-                                                    </menuItem>
537
-                                                    <menuItem id="YGs-j5-SAR">
538
-                                                        <string key="title">	Default</string>
539
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
540
-                                                        <connections>
541
-                                                            <action selector="makeBaseWritingDirectionNatural:" target="-1" id="qtV-5e-UBP"/>
542
-                                                        </connections>
543
-                                                    </menuItem>
544
-                                                    <menuItem id="Lbh-J2-qVU">
545
-                                                        <string key="title">	Left to Right</string>
546
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
547
-                                                        <connections>
548
-                                                            <action selector="makeBaseWritingDirectionLeftToRight:" target="-1" id="S0X-9S-QSf"/>
549
-                                                        </connections>
550
-                                                    </menuItem>
551
-                                                    <menuItem id="jFq-tB-4Kx">
552
-                                                        <string key="title">	Right to Left</string>
553
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
554
-                                                        <connections>
555
-                                                            <action selector="makeBaseWritingDirectionRightToLeft:" target="-1" id="5fk-qB-AqJ"/>
556
-                                                        </connections>
557
-                                                    </menuItem>
558
-                                                    <menuItem isSeparatorItem="YES" id="swp-gr-a21"/>
559
-                                                    <menuItem title="Selection" enabled="NO" id="cqv-fj-IhA">
560
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
561
-                                                    </menuItem>
562
-                                                    <menuItem id="Nop-cj-93Q">
563
-                                                        <string key="title">	Default</string>
564
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
565
-                                                        <connections>
566
-                                                            <action selector="makeTextWritingDirectionNatural:" target="-1" id="lPI-Se-ZHp"/>
567
-                                                        </connections>
568
-                                                    </menuItem>
569
-                                                    <menuItem id="BgM-ve-c93">
570
-                                                        <string key="title">	Left to Right</string>
571
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
572
-                                                        <connections>
573
-                                                            <action selector="makeTextWritingDirectionLeftToRight:" target="-1" id="caW-Bv-w94"/>
574
-                                                        </connections>
575
-                                                    </menuItem>
576
-                                                    <menuItem id="RB4-Sm-HuC">
577
-                                                        <string key="title">	Right to Left</string>
578
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
579
-                                                        <connections>
580
-                                                            <action selector="makeTextWritingDirectionRightToLeft:" target="-1" id="EXD-6r-ZUu"/>
581
-                                                        </connections>
582
-                                                    </menuItem>
583
-                                                </items>
584
-                                            </menu>
585
-                                        </menuItem>
586
-                                        <menuItem isSeparatorItem="YES" id="fKy-g9-1gm"/>
587
-                                        <menuItem title="Show Ruler" id="vLm-3I-IUL">
588
-                                            <modifierMask key="keyEquivalentModifierMask"/>
589
-                                            <connections>
590
-                                                <action selector="toggleRuler:" target="-1" id="FOx-HJ-KwY"/>
591
-                                            </connections>
592
-                                        </menuItem>
593
-                                        <menuItem title="Copy Ruler" keyEquivalent="c" id="MkV-Pr-PK5">
594
-                                            <modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
595
-                                            <connections>
596
-                                                <action selector="copyRuler:" target="-1" id="71i-fW-3W2"/>
597
-                                            </connections>
598
-                                        </menuItem>
599
-                                        <menuItem title="Paste Ruler" keyEquivalent="v" id="LVM-kO-fVI">
600
-                                            <modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
601
-                                            <connections>
602
-                                                <action selector="pasteRuler:" target="-1" id="cSh-wd-qM2"/>
603
-                                            </connections>
604
-                                        </menuItem>
605
-                                    </items>
606
-                                </menu>
607
-                            </menuItem>
608
-                        </items>
609
-                    </menu>
610
-                </menuItem>
611
-                <menuItem title="View" id="H8h-7b-M4v">
612
-                    <modifierMask key="keyEquivalentModifierMask"/>
613
-                    <menu key="submenu" title="View" id="HyV-fh-RgO">
614
-                        <items>
615
-                            <menuItem title="Show Toolbar" keyEquivalent="t" id="snW-S8-Cw5">
616
-                                <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
617
-                                <connections>
618
-                                    <action selector="toggleToolbarShown:" target="-1" id="BXY-wc-z0C"/>
619
-                                </connections>
620
-                            </menuItem>
621
-                            <menuItem title="Customize Toolbar…" id="1UK-8n-QPP">
622
-                                <modifierMask key="keyEquivalentModifierMask"/>
623
-                                <connections>
624
-                                    <action selector="runToolbarCustomizationPalette:" target="-1" id="pQI-g3-MTW"/>
625
-                                </connections>
626
-                            </menuItem>
627
-                        </items>
628
-                    </menu>
111
+                    <connections>
112
+                        <action selector="lockPosition:" target="QvC-M9-y7g" id="l9S-pc-JSb"/>
113
+                    </connections>
629 114
                 </menuItem>
630
-                <menuItem title="Window" id="aUF-d1-5bR">
115
+                <menuItem title="Keep on top" id="bk2-WG-9eq">
631 116
                     <modifierMask key="keyEquivalentModifierMask"/>
632
-                    <menu key="submenu" title="Window" systemMenu="window" id="Td7-aD-5lo">
633
-                        <items>
634
-                            <menuItem title="Minimize" keyEquivalent="m" id="OY7-WF-poV">
635
-                                <connections>
636
-                                    <action selector="performMiniaturize:" target="-1" id="VwT-WD-YPe"/>
637
-                                </connections>
638
-                            </menuItem>
639
-                            <menuItem title="Zoom" id="R4o-n2-Eq4">
640
-                                <modifierMask key="keyEquivalentModifierMask"/>
641
-                                <connections>
642
-                                    <action selector="performZoom:" target="-1" id="DIl-cC-cCs"/>
643
-                                </connections>
644
-                            </menuItem>
645
-                            <menuItem isSeparatorItem="YES" id="eu3-7i-yIM"/>
646
-                            <menuItem title="Bring All to Front" id="LE2-aR-0XJ">
647
-                                <modifierMask key="keyEquivalentModifierMask"/>
648
-                                <connections>
649
-                                    <action selector="arrangeInFront:" target="-1" id="DRN-fu-gQh"/>
650
-                                </connections>
651
-                            </menuItem>
652
-                        </items>
653
-                    </menu>
117
+                    <connections>
118
+                        <action selector="keepOnTop:" target="QvC-M9-y7g" id="b6a-ad-4oz"/>
119
+                    </connections>
654 120
                 </menuItem>
655
-                <menuItem title="Help" id="wpr-3q-Mcd">
656
-                    <modifierMask key="keyEquivalentModifierMask"/>
657
-                    <menu key="submenu" title="Help" systemMenu="help" id="F2S-fz-NVQ">
658
-                        <items>
659
-                            <menuItem title="OtaClock Help" keyEquivalent="?" id="FKE-Sm-Kum">
660
-                                <connections>
661
-                                    <action selector="showHelp:" target="-1" id="y7X-2Q-9no"/>
662
-                                </connections>
663
-                            </menuItem>
664
-                        </items>
665
-                    </menu>
121
+                <menuItem isSeparatorItem="YES" id="aVS-e6-OtM"/>
122
+                <menuItem title="Quit OtaClock" keyEquivalent="q" id="BNj-pS-CpH">
123
+                    <connections>
124
+                        <action selector="terminate:" target="-1" id="19f-sZ-hYK"/>
125
+                    </connections>
666 126
                 </menuItem>
667 127
             </items>
128
+            <point key="canvasLocation" x="376" y="304.5"/>
668 129
         </menu>
669
-        <window title="OtaClock" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="QvC-M9-y7g">
670
-            <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
671
-            <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
672
-            <rect key="contentRect" x="335" y="390" width="480" height="360"/>
673
-            <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1177"/>
674
-            <view key="contentView" id="EiT-Mj-1SZ">
675
-                <rect key="frame" x="0.0" y="0.0" width="480" height="360"/>
676
-                <autoresizingMask key="autoresizingMask"/>
677
-            </view>
678
-        </window>
679 130
     </objects>
680 131
 </document>

+ 20
- 10
OtaClock/Images.xcassets/AppIcon.appiconset/Contents.json Voir le fichier

@@ -1,53 +1,63 @@
1 1
 {
2 2
   "images" : [
3 3
     {
4
-      "idiom" : "mac",
5 4
       "size" : "16x16",
5
+      "idiom" : "mac",
6
+      "filename" : "icon_16.png",
6 7
       "scale" : "1x"
7 8
     },
8 9
     {
9
-      "idiom" : "mac",
10 10
       "size" : "16x16",
11
+      "idiom" : "mac",
12
+      "filename" : "icon_32-1.png",
11 13
       "scale" : "2x"
12 14
     },
13 15
     {
14
-      "idiom" : "mac",
15 16
       "size" : "32x32",
17
+      "idiom" : "mac",
18
+      "filename" : "icon_32.png",
16 19
       "scale" : "1x"
17 20
     },
18 21
     {
19
-      "idiom" : "mac",
20 22
       "size" : "32x32",
23
+      "idiom" : "mac",
24
+      "filename" : "icon_64.png",
21 25
       "scale" : "2x"
22 26
     },
23 27
     {
24
-      "idiom" : "mac",
25 28
       "size" : "128x128",
29
+      "idiom" : "mac",
30
+      "filename" : "icon_128.png",
26 31
       "scale" : "1x"
27 32
     },
28 33
     {
29
-      "idiom" : "mac",
30 34
       "size" : "128x128",
35
+      "idiom" : "mac",
36
+      "filename" : "icon_256-1.png",
31 37
       "scale" : "2x"
32 38
     },
33 39
     {
34
-      "idiom" : "mac",
35 40
       "size" : "256x256",
41
+      "idiom" : "mac",
42
+      "filename" : "icon_256.png",
36 43
       "scale" : "1x"
37 44
     },
38 45
     {
39
-      "idiom" : "mac",
40 46
       "size" : "256x256",
47
+      "idiom" : "mac",
48
+      "filename" : "icon_512-1.png",
41 49
       "scale" : "2x"
42 50
     },
43 51
     {
44
-      "idiom" : "mac",
45 52
       "size" : "512x512",
53
+      "idiom" : "mac",
54
+      "filename" : "icon_512.png",
46 55
       "scale" : "1x"
47 56
     },
48 57
     {
49
-      "idiom" : "mac",
50 58
       "size" : "512x512",
59
+      "idiom" : "mac",
60
+      "filename" : "icon_1024.png",
51 61
       "scale" : "2x"
52 62
     }
53 63
   ],

BIN
OtaClock/Images.xcassets/AppIcon.appiconset/icon_1024.png Voir le fichier


BIN
OtaClock/Images.xcassets/AppIcon.appiconset/icon_128.png Voir le fichier


BIN
OtaClock/Images.xcassets/AppIcon.appiconset/icon_16.png Voir le fichier


BIN
OtaClock/Images.xcassets/AppIcon.appiconset/icon_256-1.png Voir le fichier


BIN
OtaClock/Images.xcassets/AppIcon.appiconset/icon_256.png Voir le fichier


BIN
OtaClock/Images.xcassets/AppIcon.appiconset/icon_32-1.png Voir le fichier


BIN
OtaClock/Images.xcassets/AppIcon.appiconset/icon_32.png Voir le fichier


BIN
OtaClock/Images.xcassets/AppIcon.appiconset/icon_512-1.png Voir le fichier


BIN
OtaClock/Images.xcassets/AppIcon.appiconset/icon_512.png Voir le fichier


BIN
OtaClock/Images.xcassets/AppIcon.appiconset/icon_64.png Voir le fichier


+ 22
- 0
OtaClock/Images.xcassets/Menu.imageset/Contents.json Voir le fichier

@@ -0,0 +1,22 @@
1
+{
2
+  "images" : [
3
+    {
4
+      "idiom" : "universal",
5
+      "scale" : "1x",
6
+      "filename" : "menu16.png"
7
+    },
8
+    {
9
+      "idiom" : "universal",
10
+      "scale" : "2x",
11
+      "filename" : "menu32.png"
12
+    },
13
+    {
14
+      "idiom" : "universal",
15
+      "scale" : "3x"
16
+    }
17
+  ],
18
+  "info" : {
19
+    "version" : 1,
20
+    "author" : "xcode"
21
+  }
22
+}

BIN
OtaClock/Images.xcassets/Menu.imageset/menu16.png Voir le fichier


BIN
OtaClock/Images.xcassets/Menu.imageset/menu32.png Voir le fichier


+ 22
- 0
OtaClock/Images.xcassets/otacon.imageset/Contents.json Voir le fichier

@@ -0,0 +1,22 @@
1
+{
2
+  "images" : [
3
+    {
4
+      "idiom" : "universal",
5
+      "scale" : "1x",
6
+      "filename" : "otacon.png"
7
+    },
8
+    {
9
+      "idiom" : "universal",
10
+      "scale" : "2x",
11
+      "filename" : "otacon2.png"
12
+    },
13
+    {
14
+      "idiom" : "universal",
15
+      "scale" : "3x"
16
+    }
17
+  ],
18
+  "info" : {
19
+    "version" : 1,
20
+    "author" : "xcode"
21
+  }
22
+}

BIN
OtaClock/Images.xcassets/otacon.imageset/otacon.png Voir le fichier


BIN
OtaClock/Images.xcassets/otacon.imageset/otacon2.png Voir le fichier


+ 4
- 4
OtaClock/Info.plist Voir le fichier

@@ -6,8 +6,6 @@
6 6
 	<string>en</string>
7 7
 	<key>CFBundleExecutable</key>
8 8
 	<string>$(EXECUTABLE_NAME)</string>
9
-	<key>CFBundleIconFile</key>
10
-	<string></string>
11 9
 	<key>CFBundleIdentifier</key>
12 10
 	<string>de.xythobuz.$(PRODUCT_NAME:rfc1034identifier)</string>
13 11
 	<key>CFBundleInfoDictionaryVersion</key>
@@ -21,11 +19,13 @@
21 19
 	<key>CFBundleSignature</key>
22 20
 	<string>????</string>
23 21
 	<key>CFBundleVersion</key>
24
-	<string>1</string>
22
+	<string>30</string>
23
+	<key>LSApplicationCategoryType</key>
24
+	<string>public.app-category.utilities</string>
25 25
 	<key>LSMinimumSystemVersion</key>
26 26
 	<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
27 27
 	<key>NSHumanReadableCopyright</key>
28
-	<string>Copyright © 2015 xythobuz. All rights reserved.</string>
28
+	<string>Copyright © 2006 Konami Digital Entertainment Co., Ltd.</string>
29 29
 	<key>NSMainNibFile</key>
30 30
 	<string>MainMenu</string>
31 31
 	<key>NSPrincipalClass</key>

+ 15
- 0
OtaClock/MainView.h Voir le fichier

@@ -0,0 +1,15 @@
1
+//
2
+//  MainView.h
3
+//  OtaClock
4
+//
5
+//  Created by Thomas Buck on 16.08.15.
6
+//  Copyright (c) 2015 xythobuz. All rights reserved.
7
+//
8
+
9
+#import <Cocoa/Cocoa.h>
10
+
11
+@interface MainView : NSView
12
+
13
+@property (strong) NSImage *otaconImage;
14
+
15
+@end

+ 46
- 0
OtaClock/MainView.m Voir le fichier

@@ -0,0 +1,46 @@
1
+//
2
+//  MainView.m
3
+//  OtaClock
4
+//
5
+//  Created by Thomas Buck on 16.08.15.
6
+//  Copyright (c) 2015 xythobuz. All rights reserved.
7
+//
8
+
9
+#import "MainWindow.h"
10
+#import "MainView.h"
11
+
12
+#define BASE_IMAGE_RESIZE_FACTOR 0.2
13
+
14
+@implementation MainView
15
+
16
+@synthesize otaconImage;
17
+
18
+-(void)awakeFromNib {
19
+    NSLog(@"MainView:awakeFromNib %@ %@", self, [self window]);
20
+    
21
+    // Load background image
22
+    self.otaconImage = [NSImage imageNamed:@"Otacon"];
23
+    
24
+    // Set window to a useful default size
25
+    NSSize newSize = [otaconImage size];
26
+    newSize.width *= BASE_IMAGE_RESIZE_FACTOR;
27
+    newSize.height *= BASE_IMAGE_RESIZE_FACTOR;
28
+    [(MainWindow*)[self window] setDefaultBackgroundSize:newSize];
29
+}
30
+
31
+-(void)drawRect:(NSRect)dirtyRect {
32
+    // Clear background
33
+    [[NSColor clearColor] set];
34
+    NSRectFill([self frame]);
35
+    
36
+    // Draw main image into window bounds
37
+    [otaconImage drawInRect:[self bounds]];
38
+}
39
+
40
+-(BOOL)acceptsFirstMouse:(NSEvent *)theEvent {
41
+    // This is required so we get mouse events even if we don't have focus
42
+    // (needed to allow dragging the window without focus)
43
+    return YES;
44
+}
45
+
46
+@end

+ 18
- 0
OtaClock/MainWindow.h Voir le fichier

@@ -0,0 +1,18 @@
1
+//
2
+//  MainWindow.h
3
+//  OtaClock
4
+//
5
+//  Created by Thomas Buck on 16.08.15.
6
+//  Copyright (c) 2015 xythobuz. All rights reserved.
7
+//
8
+
9
+#import <Cocoa/Cocoa.h>
10
+
11
+@interface MainWindow : NSWindow
12
+
13
+- (void)setDefaultBackgroundSize:(NSSize)size;
14
+
15
+@property (assign) NSPoint dragStart;
16
+@property (assign) BOOL keepPosition;
17
+
18
+@end

+ 130
- 0
OtaClock/MainWindow.m Voir le fichier

@@ -0,0 +1,130 @@
1
+//
2
+//  MainWindow.m
3
+//  OtaClock
4
+//
5
+//  Created by Thomas Buck on 16.08.15.
6
+//  Copyright (c) 2015 xythobuz. All rights reserved.
7
+//
8
+
9
+#import "MainWindow.h"
10
+
11
+@interface MainWindow ()
12
+
13
+@property (assign) NSSize defaultSize;
14
+
15
+@end
16
+
17
+@implementation MainWindow
18
+
19
+@synthesize dragStart;
20
+@synthesize keepPosition;
21
+@synthesize defaultSize;
22
+
23
+- (id)initWithContentRect:(NSRect)contentRect
24
+               styleMask:(NSUInteger)aStyle
25
+                 backing:(NSBackingStoreType)bufferingType
26
+                   defer:(BOOL)flag {
27
+    self = [super initWithContentRect:contentRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO];
28
+    if (self != nil) {
29
+        [self setAlphaValue:1.0];
30
+        [self setOpaque:NO];
31
+        
32
+        // load and see if window should be kept on top
33
+        // also set proper button state
34
+        //[self setLevel:NSFloatingWindowLevel];
35
+        
36
+        // load and see if window pos should be fixed
37
+        // also set proper button state
38
+        self.keepPosition = NO;
39
+    }
40
+    return self;
41
+}
42
+
43
+- (void)setDefaultBackgroundSize:(NSSize)size {
44
+    defaultSize = size;
45
+    NSRect frame = [self frame];
46
+    frame.size = defaultSize;
47
+    [self setFrame:frame display:YES];
48
+}
49
+
50
+- (IBAction)changeSize:(NSMenuItem *)sender {
51
+    NSRect frame = [self frame];
52
+    
53
+    if ([[sender title] isEqualToString:@"1x"]) {
54
+        frame.size = defaultSize;
55
+    } else if ([[sender title] isEqualToString:@"2x"]) {
56
+        NSSize newSize = defaultSize;
57
+        newSize.height *= 2;
58
+        newSize.width *= 2;
59
+        frame.size = newSize;
60
+    } else {
61
+        NSLog(@"Unknown changeSize sender: %@", sender);
62
+        return;
63
+    }
64
+    
65
+    [self setFrame:frame display:YES];
66
+}
67
+
68
+- (IBAction)lockPosition:(NSMenuItem *)sender {
69
+    BOOL state = [sender state];
70
+    if (state == NSOffState) {
71
+        // Lock position
72
+        state = NSOnState;
73
+        [sender setState:state];
74
+        self.keepPosition = YES;
75
+        // store...
76
+    } else {
77
+        // Unlock position
78
+        state = NSOffState;
79
+        [sender setState:state];
80
+        self.keepPosition = NO;
81
+        // store...
82
+    }
83
+}
84
+
85
+- (IBAction)keepOnTop:(NSMenuItem *)sender {
86
+    BOOL state = [sender state];
87
+    if (state == NSOffState) {
88
+        // Keep window on top
89
+        state = NSOnState;
90
+        [sender setState:state];
91
+        [self setLevel:NSFloatingWindowLevel];
92
+        // store...
93
+    } else {
94
+        // Don't keep window on top
95
+        state = NSOffState;
96
+        [sender setState:state];
97
+        [self setLevel:NSNormalWindowLevel];
98
+        // store...
99
+    }
100
+}
101
+
102
+- (BOOL)canBecomeKeyWindow {
103
+    return YES;
104
+}
105
+
106
+- (void)mouseDown:(NSEvent *)theEvent {
107
+    self.dragStart = [theEvent locationInWindow];
108
+    
109
+    NSLog(@"Mouse at %f %f", self.dragStart.x, self.dragStart.y);
110
+}
111
+
112
+- (void)mouseDragged:(NSEvent *)theEvent {
113
+    NSRect screenVisibleFrame = [[NSScreen mainScreen] visibleFrame];
114
+    NSRect windowFrame = [self frame];
115
+    NSPoint newOrigin = windowFrame.origin;
116
+    
117
+    if (self.keepPosition == NO) {
118
+        NSPoint currentLocation = [theEvent locationInWindow];
119
+        newOrigin.x += (currentLocation.x - dragStart.x);
120
+        newOrigin.y += (currentLocation.y - dragStart.y);
121
+    
122
+        if ((newOrigin.y + windowFrame.size.height) > (screenVisibleFrame.origin.y + screenVisibleFrame.size.height)) {
123
+            newOrigin.y = screenVisibleFrame.origin.y + (screenVisibleFrame.size.height - windowFrame.size.height);
124
+        }
125
+    
126
+        [self setFrameOrigin:newOrigin];
127
+    }
128
+}
129
+
130
+@end

+ 0
- 24
OtaClockTests/Info.plist Voir le fichier

@@ -1,24 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
-<plist version="1.0">
4
-<dict>
5
-	<key>CFBundleDevelopmentRegion</key>
6
-	<string>en</string>
7
-	<key>CFBundleExecutable</key>
8
-	<string>$(EXECUTABLE_NAME)</string>
9
-	<key>CFBundleIdentifier</key>
10
-	<string>de.xythobuz.$(PRODUCT_NAME:rfc1034identifier)</string>
11
-	<key>CFBundleInfoDictionaryVersion</key>
12
-	<string>6.0</string>
13
-	<key>CFBundleName</key>
14
-	<string>$(PRODUCT_NAME)</string>
15
-	<key>CFBundlePackageType</key>
16
-	<string>BNDL</string>
17
-	<key>CFBundleShortVersionString</key>
18
-	<string>1.0</string>
19
-	<key>CFBundleSignature</key>
20
-	<string>????</string>
21
-	<key>CFBundleVersion</key>
22
-	<string>1</string>
23
-</dict>
24
-</plist>

+ 0
- 40
OtaClockTests/OtaClockTests.m Voir le fichier

@@ -1,40 +0,0 @@
1
-//
2
-//  OtaClockTests.m
3
-//  OtaClockTests
4
-//
5
-//  Created by Thomas Buck on 16.08.15.
6
-//  Copyright (c) 2015 xythobuz. All rights reserved.
7
-//
8
-
9
-#import <Cocoa/Cocoa.h>
10
-#import <XCTest/XCTest.h>
11
-
12
-@interface OtaClockTests : XCTestCase
13
-
14
-@end
15
-
16
-@implementation OtaClockTests
17
-
18
-- (void)setUp {
19
-    [super setUp];
20
-    // Put setup code here. This method is called before the invocation of each test method in the class.
21
-}
22
-
23
-- (void)tearDown {
24
-    // Put teardown code here. This method is called after the invocation of each test method in the class.
25
-    [super tearDown];
26
-}
27
-
28
-- (void)testExample {
29
-    // This is an example of a functional test case.
30
-    XCTAssert(YES, @"Pass");
31
-}
32
-
33
-- (void)testPerformanceExample {
34
-    // This is an example of a performance test case.
35
-    [self measureBlock:^{
36
-        // Put the code you want to measure the time of here.
37
-    }];
38
-}
39
-
40
-@end

Chargement…
Annuler
Enregistrer