2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 22:55:11 +00:00

Get rid of redudant cmake options

This commit is contained in:
Ilya Fedin
2020-08-31 12:26:16 +04:00
committed by John Preston
parent f128665f6b
commit 70c993774a
9 changed files with 6 additions and 44 deletions

View File

@@ -1461,7 +1461,6 @@ void InstallMainDesktopFile() {
}
void RegisterCustomScheme(bool force) {
#ifndef TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME
if (cExeName().isEmpty()) {
return;
}
@@ -1510,7 +1509,6 @@ void RegisterCustomScheme(bool force) {
LOG(("App Error: %1").arg(error->message));
g_error_free(error);
}
#endif // !TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME
}
PermissionStatus GetPermissionStatus(PermissionType type) {

View File

@@ -158,10 +158,8 @@ std::optional<bool> IsDarkMode() {
}
void RegisterCustomScheme(bool force) {
#ifndef TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME
OSStatus result = LSSetDefaultHandlerForURLScheme(CFSTR("tg"), (CFStringRef)[[NSBundle mainBundle] bundleIdentifier]);
DEBUG_LOG(("App Info: set default handler for 'tg' scheme result: %1").arg(result));
#endif // !TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME
}
// I do check for availability, just not in the exact way clang is content with

View File

@@ -509,7 +509,6 @@ void RegisterCustomScheme(bool force) {
if (cExeName().isEmpty()) {
return;
}
#ifndef TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME
DEBUG_LOG(("App Info: Checking custom scheme 'tg'..."));
HKEY rkey;
@@ -547,7 +546,6 @@ void RegisterCustomScheme(bool force) {
if (!_psOpenRegKey(L"Software\\RegisteredApplications", &rkey)) return;
if (!_psSetKeyValue(rkey, L"Telegram Desktop", qsl("SOFTWARE\\TelegramDesktop\\Capabilities"))) return;
#endif // !TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME
}
PermissionStatus GetPermissionStatus(PermissionType type) {