Skip to content

Commit cdd45ee

Browse files
committed
formatting, nullability & speed up with C array
Update SquirrelPanel.m
1 parent 4cc3894 commit cdd45ee

23 files changed

Lines changed: 1660 additions & 1129 deletions

Assets.xcassets/Symbols/arrow.down.and.line.horizontal.and.arrow.up.svg

Lines changed: 160 additions & 0 deletions
Loading

Assets.xcassets/Symbols/chevron.down.symbolset/Contents.json renamed to Assets.xcassets/Symbols/arrow.down.and.line.horizontal.and.arrow.up.symbolset/Contents.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"symbols" : [
1010
{
11-
"filename" : "chevron.down.svg",
11+
"filename" : "arrow.down.and.line.horizontal.and.arrow.up.svg",
1212
"idiom" : "universal"
1313
}
1414
]

Assets.xcassets/Symbols/arrow.down.and.line.horizontal.and.arrow.up.symbolset/arrow.down.and.line.horizontal.and.arrow.up.svg

Lines changed: 160 additions & 0 deletions
Loading

Assets.xcassets/Symbols/arrow.up.and.line.horizontal.and.arrow.down.svg

Lines changed: 160 additions & 0 deletions
Loading

Assets.xcassets/Symbols/chevron.up.symbolset/Contents.json renamed to Assets.xcassets/Symbols/arrow.up.and.line.horizontal.and.arrow.down.symbolset/Contents.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"symbols" : [
1010
{
11-
"filename" : "chevron.up.svg",
11+
"filename" : "arrow.up.and.line.horizontal.and.arrow.down.svg",
1212
"idiom" : "universal"
1313
}
1414
]

Assets.xcassets/Symbols/arrow.up.and.line.horizontal.and.arrow.down.symbolset/arrow.up.and.line.horizontal.and.arrow.down.svg

Lines changed: 160 additions & 0 deletions
Loading

Assets.xcassets/Symbols/chevron.down.symbolset/chevron.down.svg

Lines changed: 0 additions & 160 deletions
This file was deleted.

Assets.xcassets/Symbols/chevron.up.symbolset/chevron.up.svg

Lines changed: 0 additions & 160 deletions
This file was deleted.

Squirrel.xcodeproj/project.pbxproj

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@
273273
7BDB21211C6EF1BE0025E351 /* SquirrelConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SquirrelConfig.h; sourceTree = "<group>"; };
274274
7BDB21221C6EF1BE0025E351 /* SquirrelConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SquirrelConfig.m; sourceTree = "<group>"; };
275275
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
276-
A44571AB0DBF42C200F793F9 /* macos_keycode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = macos_keycode.h; sourceTree = "<group>"; };
276+
A44571AB0DBF42C200F793F9 /* macos_keycode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = macos_keycode.h; sourceTree = "<group>"; usesTabs = 0; };
277277
A47C48DE105E8CE8006D528B /* macos_keycode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = macos_keycode.m; sourceTree = "<group>"; };
278278
A4B8E1B20F645B870094E08B /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
279279
A4FC48CA0F6530EF0069BE81 /* en */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
@@ -507,7 +507,8 @@
507507
29B97313FDCFA39411CA2CEA /* Project object */ = {
508508
isa = PBXProject;
509509
attributes = {
510-
LastUpgradeCheck = 1220;
510+
BuildIndependentTargetsInParallel = YES;
511+
LastUpgradeCheck = 1530;
511512
};
512513
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Squirrel" */;
513514
compatibilityVersion = "Xcode 10.0";
@@ -704,6 +705,7 @@
704705
buildSettings = {
705706
ALWAYS_SEARCH_USER_PATHS = NO;
706707
ASSETCATALOG_COMPILER_APPICON_NAME = RimeIcon;
708+
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
707709
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
708710
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
709711
CLANG_WARN_BOOL_CONVERSION = YES;
@@ -760,6 +762,7 @@
760762
buildSettings = {
761763
ALWAYS_SEARCH_USER_PATHS = NO;
762764
ASSETCATALOG_COMPILER_APPICON_NAME = RimeIcon;
765+
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
763766
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
764767
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
765768
CLANG_WARN_BOOL_CONVERSION = YES;

SquirrelApplicationDelegate.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,35 +15,35 @@ typedef NS_ENUM(NSUInteger, SquirrelNotificationPolicy) {
1515
kShowNotificationsAlways = 2
1616
};
1717

18-
@property(nonatomic, copy) IBOutlet NSMenu* menu;
19-
@property(nonatomic, strong) IBOutlet SquirrelPanel* panel;
20-
@property(nonatomic, strong) IBOutlet id updater;
18+
@property(nonatomic, weak, nullable) IBOutlet NSMenu* menu;
19+
@property(nonatomic, weak, nullable) IBOutlet SquirrelPanel* panel;
20+
@property(nonatomic, weak, nullable) IBOutlet id updater;
2121

22-
@property(nonatomic, strong, readonly) SquirrelConfig* config;
22+
@property(nonatomic, strong, readonly, nullable) SquirrelConfig* config;
2323
@property(nonatomic, readonly) SquirrelNotificationPolicy showNotifications;
2424

25-
- (IBAction)deploy:(id)sender;
26-
- (IBAction)syncUserData:(id)sender;
27-
- (IBAction)configure:(id)sender;
28-
- (IBAction)openWiki:(id)sender;
25+
- (IBAction)deploy:(id _Nullable)sender;
26+
- (IBAction)syncUserData:(id _Nullable)sender;
27+
- (IBAction)configure:(id _Nullable)sender;
28+
- (IBAction)openWiki:(id _Nullable)sender;
2929

3030
- (void)setupRime;
3131
- (void)startRimeWithFullCheck:(BOOL)fullCheck;
3232
- (void)loadSettings;
33-
- (void)loadSchemaSpecificSettings:(NSString*)schemaId
33+
- (void)loadSchemaSpecificSettings:(NSString* _Nonnull)schemaId
3434
withRimeSession:(RimeSessionId)sessionId;
35-
- (void)loadSchemaSpecificLabels:(NSString*)schemaId;
35+
- (void)loadSchemaSpecificLabels:(NSString* _Nonnull)schemaId;
3636

3737
@property(nonatomic, readonly) BOOL problematicLaunchDetected;
3838

3939
@end // SquirrelApplicationDelegate
4040

4141
@interface NSApplication (SquirrelApp)
4242

43-
@property(nonatomic, strong, readonly)
43+
@property(nonatomic, strong, readonly, nonnull)
4444
SquirrelApplicationDelegate* squirrelAppDelegate;
4545

4646
@end // NSApplication (SquirrelApp)
4747

4848
// also used in main.m
49-
extern void show_notification(const char* msg_text);
49+
extern void show_notification(const char* _Nonnull msg_text);

0 commit comments

Comments
 (0)