From 780b5555d7f8eeb535d3968aa30d51a5e4dc439c Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Mon, 13 Jul 2020 17:46:50 +0300 Subject: [PATCH] Added missed OSX checking to touchbar's files. --- .../platform/mac/touchbar/items/mac_formatter_item.h | 4 ++++ .../platform/mac/touchbar/items/mac_pinned_chats_item.h | 4 ++++ .../platform/mac/touchbar/items/mac_scrubber_item.h | 4 ++++ .../SourceFiles/platform/mac/touchbar/mac_touchbar_audio.h | 4 ++++ .../SourceFiles/platform/mac/touchbar/mac_touchbar_audio.mm | 4 ++-- .../SourceFiles/platform/mac/touchbar/mac_touchbar_common.h | 4 ++++ .../SourceFiles/platform/mac/touchbar/mac_touchbar_common.mm | 4 ++++ .../SourceFiles/platform/mac/touchbar/mac_touchbar_controls.h | 4 ++++ .../platform/mac/touchbar/mac_touchbar_controls.mm | 4 ++++ .../SourceFiles/platform/mac/touchbar/mac_touchbar_main.h | 4 ++++ .../SourceFiles/platform/mac/touchbar/mac_touchbar_main.mm | 4 ++-- .../SourceFiles/platform/mac/touchbar/mac_touchbar_manager.h | 4 ++++ .../SourceFiles/platform/mac/touchbar/mac_touchbar_manager.mm | 4 ++-- 13 files changed, 46 insertions(+), 6 deletions(-) diff --git a/Telegram/SourceFiles/platform/mac/touchbar/items/mac_formatter_item.h b/Telegram/SourceFiles/platform/mac/touchbar/items/mac_formatter_item.h index a537929c84..772561490e 100644 --- a/Telegram/SourceFiles/platform/mac/touchbar/items/mac_formatter_item.h +++ b/Telegram/SourceFiles/platform/mac/touchbar/items/mac_formatter_item.h @@ -7,6 +7,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #pragma once +#ifndef OS_OSX + #import #import @@ -14,3 +16,5 @@ API_AVAILABLE(macos(10.12.2)) @interface TextFormatPopover : NSPopoverTouchBarItem - (id)init:(NSTouchBarItemIdentifier)identifier; @end + +#endif // OS_OSX diff --git a/Telegram/SourceFiles/platform/mac/touchbar/items/mac_pinned_chats_item.h b/Telegram/SourceFiles/platform/mac/touchbar/items/mac_pinned_chats_item.h index c6a4b886fc..c032be89d0 100644 --- a/Telegram/SourceFiles/platform/mac/touchbar/items/mac_pinned_chats_item.h +++ b/Telegram/SourceFiles/platform/mac/touchbar/items/mac_pinned_chats_item.h @@ -7,6 +7,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #pragma once +#ifndef OS_OSX + #include namespace Main { @@ -18,3 +20,5 @@ API_AVAILABLE(macos(10.12.2)) - (id)init:(not_null)session destroyEvent:(rpl::producer<>)touchBarSwitches; @end + +#endif // OS_OSX diff --git a/Telegram/SourceFiles/platform/mac/touchbar/items/mac_scrubber_item.h b/Telegram/SourceFiles/platform/mac/touchbar/items/mac_scrubber_item.h index 27b04467cc..126405ea27 100644 --- a/Telegram/SourceFiles/platform/mac/touchbar/items/mac_scrubber_item.h +++ b/Telegram/SourceFiles/platform/mac/touchbar/items/mac_scrubber_item.h @@ -7,6 +7,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #pragma once +#ifndef OS_OSX + #import #import @@ -19,3 +21,5 @@ API_AVAILABLE(macos(10.12.2)) - (id)init:(not_null)controller identifier:(NSTouchBarItemIdentifier)identifier; @end + +#endif // OS_OSX diff --git a/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_audio.h b/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_audio.h index ec4596c67e..87709e25e8 100644 --- a/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_audio.h +++ b/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_audio.h @@ -7,9 +7,13 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #pragma once +#ifndef OS_OSX + #import API_AVAILABLE(macos(10.12.2)) @interface TouchBarAudioPlayer : NSTouchBar - (rpl::producer<>)closeRequests; @end + +#endif // OS_OSX diff --git a/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_audio.mm b/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_audio.mm index 8dfa3d1336..3fde9b0c6a 100644 --- a/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_audio.mm +++ b/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_audio.mm @@ -7,6 +7,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #include "platform/mac/touchbar/mac_touchbar_audio.h" +#ifndef OS_OSX + #include "media/audio/media_audio.h" #include "media/player/media_player_instance.h" #include "platform/mac/touchbar/mac_touchbar_common.h" @@ -18,8 +20,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #import #import -#ifndef OS_OSX - NSImage *qt_mac_create_nsimage(const QPixmap &pm); using TouchBar::kCircleDiameter; using TouchBar::CreateNSImageFromStyleIcon; diff --git a/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_common.h b/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_common.h index 52b54de127..a00385258c 100644 --- a/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_common.h +++ b/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_common.h @@ -7,6 +7,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #pragma once +#ifndef OS_OSX + #import #import @@ -30,3 +32,5 @@ int WidthFromString(NSString *s); NSImage *CreateNSImageFromStyleIcon(const style::icon &icon, int size); } // namespace TouchBar + +#endif // OS_OSX diff --git a/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_common.mm b/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_common.mm index 4c44b79ac9..a7954218c7 100644 --- a/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_common.mm +++ b/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_common.mm @@ -7,6 +7,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #include "platform/mac/touchbar/mac_touchbar_common.h" +#ifndef OS_OSX + #import NSImage *qt_mac_create_nsimage(const QPixmap &pm); @@ -28,3 +30,5 @@ NSImage *CreateNSImageFromStyleIcon(const style::icon &icon, int size) { } } // namespace TouchBar + +#endif // OS_OSX diff --git a/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_controls.h b/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_controls.h index 1cc8c832f4..9c66744c39 100644 --- a/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_controls.h +++ b/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_controls.h @@ -7,6 +7,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #pragma once +#ifndef OS_OSX + namespace Media { namespace Player { struct TrackState; @@ -63,3 +65,5 @@ NSCustomTouchBarItem *CreateTouchBarTrackPosition( rpl::producer stateChanged); } // namespace TouchBar + +#endif // OS_OSX diff --git a/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_controls.mm b/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_controls.mm index a72072660d..8a34c996d1 100644 --- a/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_controls.mm +++ b/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_controls.mm @@ -7,6 +7,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #include "platform/mac/touchbar/mac_touchbar_controls.h" +#ifndef OS_OSX + #include "base/platform/mac/base_utilities_mac.h" // Q2NSString() #include "core/sandbox.h" // Sandbox::customEnterFromEventLoop() #include "layout.h" // formatDurationText() @@ -274,3 +276,5 @@ NSCustomTouchBarItem *CreateTouchBarTrackPosition( } } // namespace TouchBar + +#endif // OS_OSX diff --git a/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_main.h b/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_main.h index f03546eafc..771935ba45 100644 --- a/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_main.h +++ b/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_main.h @@ -7,6 +7,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #pragma once +#ifndef OS_OSX + #import namespace Window { @@ -26,3 +28,5 @@ API_AVAILABLE(macos(10.12.2)) - (id)init:(not_null)controller touchBarSwitches:(rpl::producer<>)touchBarSwitches; @end + +#endif // OS_OSX diff --git a/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_main.mm b/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_main.mm index 000207e837..26044cbc41 100644 --- a/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_main.mm +++ b/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_main.mm @@ -7,6 +7,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #include "platform/mac/touchbar/mac_touchbar_main.h" +#ifndef OS_OSX + #include "platform/mac/touchbar/items/mac_formatter_item.h" #include "platform/mac/touchbar/items/mac_pinned_chats_item.h" #include "platform/mac/touchbar/items/mac_scrubber_item.h" @@ -16,8 +18,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #import -#ifndef OS_OSX - using namespace TouchBar::Main; #pragma mark - TouchBarMain diff --git a/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_manager.h b/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_manager.h index 464f87c9c1..d08ba3abc6 100644 --- a/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_manager.h +++ b/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_manager.h @@ -7,6 +7,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #pragma once +#ifndef OS_OSX + #import namespace Main { @@ -23,3 +25,5 @@ API_AVAILABLE(macos(10.12.2)) controller:(not_null)controller domain:(not_null)domain; @end + +#endif // OS_OSX diff --git a/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_manager.mm b/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_manager.mm index fb35326d3c..c26850176c 100644 --- a/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_manager.mm +++ b/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_manager.mm @@ -7,6 +7,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #include "platform/mac/touchbar/mac_touchbar_manager.h" +#ifndef OS_OSX + #include "apiwrap.h" // ApiWrap::updateStickers() #include "core/application.h" #include "data/data_peer.h" // PeerData::canWrite() @@ -24,8 +26,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #import -#ifndef OS_OSX - using namespace TouchBar::Main; namespace {