mirror of
https://github.com/ONLYOFFICE/desktop-apps.git
synced 2026-04-07 14:09:22 +08:00
[macos] refactoring
This commit is contained in:
@ -92,12 +92,13 @@
|
||||
// }];
|
||||
|
||||
NSArray * arguments = [[NSProcessInfo processInfo] arguments];
|
||||
NSArray * keysCreateNew{@[@"word",@"cell",@"slide",@"form"]};
|
||||
for (NSString * arg in arguments) {
|
||||
if ( [arg hasPrefix:@"--new:"] || [arg hasPrefix:@"--new="] ) {
|
||||
NSString * param = [arg substringFromIndex:6];
|
||||
NSLog(@"input arg new: %@", param);
|
||||
|
||||
if ( [@[@"word",@"cell",@"slide",@"form"] containsObject:param] ) {
|
||||
if ( [keysCreateNew containsObject:param] ) {
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:CEFEventNameCreateTab
|
||||
object:nil
|
||||
userInfo:@{ @"action" : @(ASCTabActionCreateLocalFile),
|
||||
|
||||
Reference in New Issue
Block a user