From c13d6375024984aed04a07079a28fcb9fdf410d7 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Mon, 20 Jan 2020 16:57:33 +0400 Subject: [PATCH] Fix spaces on end of lines --- .github/ISSUE_TEMPLATE/BUG_REPORT.md | 2 +- .travis/common.sh | 2 +- Telegram/Resources/winrc/Telegram.manifest | 10 ++-- .../NSObject+SPInvocationGrabbing.m | 4 +- .../ThirdParty/SPMediaKeyTap/SPMediaKeyTap.m | 54 +++++++++---------- Telegram/cmake/lib_tgvoip.cmake | 2 +- Telegram/cmake/telegram_options.cmake | 2 +- Telegram/gyp/generate.py | 8 +-- changelog.txt | 4 +- 9 files changed, 44 insertions(+), 44 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.md b/.github/ISSUE_TEMPLATE/BUG_REPORT.md index cb33b88a75..ad45b57c1e 100644 --- a/.github/ISSUE_TEMPLATE/BUG_REPORT.md +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.md @@ -8,7 +8,7 @@ about: Report errors or unexpected behavior. Thanks for reporting issues of Telegram Desktop! To make it easier for us to help you please enter detailed information below. ---> +--> ### Steps to reproduce 1. 2. diff --git a/.travis/common.sh b/.travis/common.sh index d9061ab51c..6a79baba0e 100755 --- a/.travis/common.sh +++ b/.travis/common.sh @@ -43,7 +43,7 @@ travisStartFold() { fi echo "travis_fold:start:$NAME" - sameLineInfoMessage "$TITLE" + sameLineInfoMessage "$TITLE" TRAVIS_LAST_FOLD="$NAME" } diff --git a/Telegram/Resources/winrc/Telegram.manifest b/Telegram/Resources/winrc/Telegram.manifest index da510ee486..4eba5dde52 100644 --- a/Telegram/Resources/winrc/Telegram.manifest +++ b/Telegram/Resources/winrc/Telegram.manifest @@ -1,17 +1,17 @@  - - - + + + - + - + \ No newline at end of file diff --git a/Telegram/ThirdParty/SPMediaKeyTap/SPInvocationGrabbing/NSObject+SPInvocationGrabbing.m b/Telegram/ThirdParty/SPMediaKeyTap/SPInvocationGrabbing/NSObject+SPInvocationGrabbing.m index 5f1846e4cf..b7ce592b15 100644 --- a/Telegram/ThirdParty/SPMediaKeyTap/SPInvocationGrabbing/NSObject+SPInvocationGrabbing.m +++ b/Telegram/ThirdParty/SPMediaKeyTap/SPInvocationGrabbing/NSObject+SPInvocationGrabbing.m @@ -49,7 +49,7 @@ [anInvocation retainArguments]; anInvocation.target = _object; self.invocation = anInvocation; - + if(backgroundAfterForward) [NSThread detachNewThreadSelector:@selector(runInBackground) toTarget:self withObject:nil]; else if(onMainAfterForward) @@ -59,7 +59,7 @@ NSMethodSignature *signature = [super methodSignatureForSelector:inSelector]; if (signature == NULL) signature = [_object methodSignatureForSelector:inSelector]; - + return signature; } diff --git a/Telegram/ThirdParty/SPMediaKeyTap/SPMediaKeyTap.m b/Telegram/ThirdParty/SPMediaKeyTap/SPMediaKeyTap.m index b6ad273ad0..5e7587a325 100644 --- a/Telegram/ThirdParty/SPMediaKeyTap/SPMediaKeyTap.m +++ b/Telegram/ThirdParty/SPMediaKeyTap/SPMediaKeyTap.m @@ -47,7 +47,7 @@ static CGEventRef tapEventCallback(CGEventTapProxy proxy, CGEventType type, CGEv EventTypeSpec eventType = { kEventClassApplication, kEventAppFrontSwitched }; OSStatus err = InstallApplicationEventHandler(NewEventHandlerUPP(appSwitched), 1, &eventType, self, &_app_switching_ref); assert(err == noErr); - + eventType.eventKind = kEventAppTerminated; err = InstallApplicationEventHandler(NewEventHandlerUPP(appTerminated), 1, &eventType, self, &_app_terminating_ref); assert(err == noErr); @@ -67,9 +67,9 @@ static CGEventRef tapEventCallback(CGEventTapProxy proxy, CGEventType type, CGEv { // Prevent having multiple mediaKeys threads [self stopWatchingMediaKeys]; - + [self setShouldInterceptMediaKeyEvents:YES]; - + // Add an event tap to intercept the system defined media key events _eventPort = CGEventTapCreate(kCGSessionEventTap, kCGHeadInsertEventTap, @@ -81,28 +81,28 @@ static CGEventRef tapEventCallback(CGEventTapProxy proxy, CGEventType type, CGEv [self stopWatchingMediaKeys]; return; } - + _eventPortSource = CFMachPortCreateRunLoopSource(kCFAllocatorSystemDefault, _eventPort, 0); assert(_eventPortSource != NULL); - + // Let's do this in a separate thread so that a slow app doesn't lag the event tap [NSThread detachNewThreadSelector:@selector(eventTapThread) toTarget:self withObject:nil]; } -(void)stopWatchingMediaKeys { // TODO: Shut down thread, remove event tap port and source - + if(_tapThreadRL){ CFRunLoopStop(_tapThreadRL); _tapThreadRL=nil; } - + if(_eventPort){ CFMachPortInvalidate(_eventPort); CFRelease(_eventPort); _eventPort=nil; } - + if(_eventPortSource){ CFRelease(_eventPortSource); _eventPortSource=nil; @@ -119,7 +119,7 @@ static CGEventRef tapEventCallback(CGEventTapProxy proxy, CGEventType type, CGEv return NO; #else // XXX(nevyn): MediaKey event tap doesn't work on 10.4, feel free to figure out why if you have the energy. - return + return ![[NSUserDefaults standardUserDefaults] boolForKey:kIgnoreMediaKeysDefaultsKey] && floor(NSAppKitVersionNumber) >= 949/*NSAppKitVersionNumber10_5*/; #endif @@ -194,7 +194,7 @@ static CGEventRef tapEventCallback(CGEventTapProxy proxy, CGEventType type, CGEv } } -#pragma mark +#pragma mark #pragma mark - #pragma mark Event tap callbacks @@ -231,10 +231,10 @@ static CGEventRef tapEventCallback2(CGEventTapProxy proxy, CGEventType type, CGE if (![self shouldInterceptMediaKeyEvents]) return event; - + [nsEvent retain]; // matched in handleAndReleaseMediaKeyEvent: [self performSelectorOnMainThread:@selector(handleAndReleaseMediaKeyEvent:) withObject:nsEvent waitUntilDone:NO]; - + return NULL; } @@ -250,7 +250,7 @@ static CGEventRef tapEventCallback(CGEventTapProxy proxy, CGEventType type, CGEv // event will have been retained in the other thread -(void)handleAndReleaseMediaKeyEvent:(NSEvent *)event { [event autorelease]; - + [_delegate mediaKeyTap:self receivedMediaKeyEvent:event]; } @@ -272,7 +272,7 @@ NSString *kIgnoreMediaKeysDefaultsKey = @"SPIgnoreMediaKeys"; -(void)mediaKeyAppListChanged { if([_mediaKeyAppList count] == 0) return; - + /*NSLog(@"--"); int i = 0; for (NSValue *psnv in _mediaKeyAppList) { @@ -284,20 +284,20 @@ NSString *kIgnoreMediaKeysDefaultsKey = @"SPIgnoreMediaKeys"; NSString *bundleIdentifier = [processInfo objectForKey:(id)kCFBundleIdentifierKey]; NSLog(@"%d: %@", i++, bundleIdentifier); }*/ - + ProcessSerialNumber mySerial, topSerial; GetCurrentProcess(&mySerial); [[_mediaKeyAppList objectAtIndex:0] getValue:&topSerial]; Boolean same; OSErr err = SameProcess(&mySerial, &topSerial, &same); - [self setShouldInterceptMediaKeyEvents:(err == noErr && same)]; + [self setShouldInterceptMediaKeyEvents:(err == noErr && same)]; } -(void)appIsNowFrontmost:(ProcessSerialNumber)psn { NSValue *psnv = [NSValue valueWithBytes:&psn objCType:@encode(ProcessSerialNumber)]; - + NSDictionary *processInfo = [(id)ProcessInformationCopyDictionary( &psn, kProcessDictionaryIncludeAllInformationMask @@ -324,29 +324,29 @@ static pascal OSStatus appSwitched (EventHandlerCallRef nextHandler, EventRef ev ProcessSerialNumber newSerial; GetFrontProcess(&newSerial); - + [self appIsNowFrontmost:newSerial]; - + return CallNextEventHandler(nextHandler, evt); } static pascal OSStatus appTerminated (EventHandlerCallRef nextHandler, EventRef evt, void* userData) { SPMediaKeyTap *self = (id)userData; - + ProcessSerialNumber deadPSN; GetEventParameter( - evt, - kEventParamProcessID, - typeProcessSerialNumber, - NULL, - sizeof(deadPSN), - NULL, + evt, + kEventParamProcessID, + typeProcessSerialNumber, + NULL, + sizeof(deadPSN), + NULL, &deadPSN ); - + [self appTerminated:deadPSN]; return CallNextEventHandler(nextHandler, evt); } diff --git a/Telegram/cmake/lib_tgvoip.cmake b/Telegram/cmake/lib_tgvoip.cmake index bb76f0308d..6edeca69cd 100644 --- a/Telegram/cmake/lib_tgvoip.cmake +++ b/Telegram/cmake/lib_tgvoip.cmake @@ -707,7 +707,7 @@ else() webrtc_dsp/common_audio/vad/vad_core.c webrtc_dsp/common_audio/vad/vad_sp.h webrtc_dsp/common_audio/vad/vad_filterbank.h - webrtc_dsp/common_audio/vad/vad_gmm.c + webrtc_dsp/common_audio/vad/vad_gmm.c # ARM/NEON sources # TODO check if there's a good way to make these compile with ARM ports of TDesktop diff --git a/Telegram/cmake/telegram_options.cmake b/Telegram/cmake/telegram_options.cmake index 179b27fafe..4517f4edd7 100644 --- a/Telegram/cmake/telegram_options.cmake +++ b/Telegram/cmake/telegram_options.cmake @@ -21,7 +21,7 @@ if (TDESKTOP_API_TEST) endif() if (TDESKTOP_API_ID STREQUAL "0" OR TDESKTOP_API_HASH STREQUAL "") - message(FATAL_ERROR + message(FATAL_ERROR " \n" " PROVIDE: -D TDESKTOP_API_ID=[API_ID] -D TDESKTOP_API_HASH=[API_HASH]\n" " \n" diff --git a/Telegram/gyp/generate.py b/Telegram/gyp/generate.py index 5b8ef8688c..72e45c0b1d 100644 --- a/Telegram/gyp/generate.py +++ b/Telegram/gyp/generate.py @@ -63,17 +63,17 @@ if apiId == '' or apiHash == '': > To build your version of Telegram Desktop you're required to provide > your own 'api_id' and 'api_hash' for the Telegram API access. -> +> > How to obtain your 'api_id' and 'api_hash' is described here: > https://core.telegram.org/api/obtaining_api_id -> +> > If you're building the application not for deployment, > but only for test purposes you can use TEST ONLY credentials, > which are very limited by the Telegram API server: -> +> > api_id: 17349 > api_hash: 344583e45741c457fe1862106095a5eb -> +> > Your users will start getting internal server errors on login > if you deploy an app using those 'api_id' and 'api_hash'.""") finish(0) diff --git a/changelog.txt b/changelog.txt index 5f5c67bfad..776db7fcd7 100644 --- a/changelog.txt +++ b/changelog.txt @@ -408,8 +408,8 @@ Also in this update: 1.3.11 alpha (01.08.18) -- Added a new night theme. -- You can now assign custom themes as night and day themes to quickly switch between them. +- Added a new night theme. +- You can now assign custom themes as night and day themes to quickly switch between them. 1.3.10 (13.07.18)