mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Get rid of redudant cmake options
This commit is contained in:
@@ -43,20 +43,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
|
||||
namespace Settings {
|
||||
|
||||
bool HasConnectionType() {
|
||||
#ifndef TDESKTOP_DISABLE_NETWORK_PROXY
|
||||
return true;
|
||||
#endif // TDESKTOP_DISABLE_NETWORK_PROXY
|
||||
return false;
|
||||
}
|
||||
|
||||
void SetupConnectionType(
|
||||
not_null<Main::Account*> account,
|
||||
not_null<Ui::VerticalLayout*> container) {
|
||||
if (!HasConnectionType()) {
|
||||
return;
|
||||
}
|
||||
#ifndef TDESKTOP_DISABLE_NETWORK_PROXY
|
||||
const auto connectionType = [=] {
|
||||
const auto transport = account->mtp().dctransport();
|
||||
if (Global::ProxySettings() != MTP::ProxyData::Settings::Enabled) {
|
||||
@@ -81,7 +70,6 @@ void SetupConnectionType(
|
||||
button->addClickHandler([=] {
|
||||
Ui::show(ProxiesBoxController::CreateOwningBox(account));
|
||||
});
|
||||
#endif // TDESKTOP_DISABLE_NETWORK_PROXY
|
||||
}
|
||||
|
||||
bool HasUpdate() {
|
||||
@@ -571,13 +559,11 @@ void Advanced::setupContent(not_null<Window::SessionController*> controller) {
|
||||
if (!cAutoUpdate()) {
|
||||
addUpdate();
|
||||
}
|
||||
if (HasConnectionType()) {
|
||||
addDivider();
|
||||
AddSkip(content);
|
||||
AddSubsectionTitle(content, tr::lng_settings_network_proxy());
|
||||
SetupConnectionType(&controller->session().account(), content);
|
||||
AddSkip(content);
|
||||
}
|
||||
addDivider();
|
||||
AddSkip(content);
|
||||
AddSubsectionTitle(content, tr::lng_settings_network_proxy());
|
||||
SetupConnectionType(&controller->session().account(), content);
|
||||
AddSkip(content);
|
||||
SetupDataStorage(controller, content);
|
||||
SetupAutoDownload(controller, content);
|
||||
SetupSystemIntegration(content, [=](Type type) {
|
||||
|
@@ -15,7 +15,6 @@ class Account;
|
||||
|
||||
namespace Settings {
|
||||
|
||||
bool HasConnectionType();
|
||||
void SetupConnectionType(
|
||||
not_null<Main::Account*> account,
|
||||
not_null<Ui::VerticalLayout*> container);
|
||||
|
@@ -128,13 +128,10 @@ auto GenerateCodes() {
|
||||
Ui::hideLayer();
|
||||
}));
|
||||
});
|
||||
|
||||
#ifndef TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME
|
||||
codes.emplace(qsl("registertg"), [](SessionController *window) {
|
||||
Platform::RegisterCustomScheme(true);
|
||||
Ui::Toast::Show("Forced custom scheme register.");
|
||||
});
|
||||
#endif // !TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME
|
||||
|
||||
#if defined Q_OS_WIN || defined Q_OS_MAC
|
||||
codes.emplace(qsl("freetype"), [](SessionController *window) {
|
||||
|
@@ -65,9 +65,7 @@ object_ptr<Ui::RpWidget> CreateIntroSettings(
|
||||
AddDivider(result);
|
||||
AddSkip(result);
|
||||
SetupLanguageButton(result, false);
|
||||
if (HasConnectionType()) {
|
||||
SetupConnectionType(&window->account(), result);
|
||||
}
|
||||
SetupConnectionType(&window->account(), result);
|
||||
AddSkip(result);
|
||||
if (HasUpdate()) {
|
||||
AddDivider(result);
|
||||
|
Reference in New Issue
Block a user