tdesktop/Telegram/SourceFiles/settings.cpp

103 lines
2.6 KiB
C++
Raw Normal View History

/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "settings.h"
bool gRtl = false;
2015-10-06 19:49:23 +00:00
Qt::LayoutDirection gLangDir = gRtl ? Qt::RightToLeft : Qt::LeftToRight;
2015-04-19 10:29:19 +00:00
bool gAlphaVersion = AppAlphaVersion;
uint64 gBetaVersion = AppBetaVersion;
uint64 gRealBetaVersion = AppBetaVersion;
QByteArray gBetaPrivateKey;
bool gTestMode = false;
bool gDebug = false;
bool gManyInstance = false;
QString gKeyFile;
2014-11-27 18:20:48 +00:00
QString gWorkingDir, gExeDir, gExeName;
QStringList gSendPaths;
QString gStartUrl;
QString gDialogLastPath, gDialogHelperPath; // optimize QFileDialog
bool gStartMinimized = false;
bool gStartInTray = false;
bool gAutoStart = false;
bool gSendToMenu = false;
bool gUseExternalVideoPlayer = false;
bool gAutoUpdate = true;
TWindowPos gWindowPos;
LaunchMode gLaunchMode = LaunchModeNormal;
bool gSupportTray = true;
bool gSeenTrayTooltip = false;
bool gRestartingUpdate = false, gRestarting = false, gRestartingToSettings = false, gWriteProtected = false;
int32 gLastUpdateCheck = 0;
bool gNoStartUpdate = false;
bool gStartToSettings = false;
bool gCtrlEnter = false;
2015-02-03 15:02:46 +00:00
uint32 gConnectionsInSession = 1;
QString gLoggedPhoneNumber;
QByteArray gLocalSalt;
DBIScale gRealScale = dbisAuto;
DBIScale gScreenScale = dbisOne;
DBIScale gConfigScale = dbisAuto;
QString gTimeFormat = qsl("hh:mm");
RecentEmojiPack gRecentEmoji;
RecentEmojiPreload gRecentEmojiPreload;
2015-05-08 12:45:14 +00:00
EmojiColorVariants gEmojiVariants;
2015-05-19 15:46:45 +00:00
RecentStickerPreload gRecentStickersPreload;
RecentStickerPack gRecentStickers;
RecentHashtagPack gRecentWriteHashtags, gRecentSearchHashtags;
RecentInlineBots gRecentInlineBots;
bool gPasswordRecovered = false;
2015-04-04 20:01:34 +00:00
int32 gPasscodeBadTries = 0;
2016-12-01 19:20:33 +00:00
TimeMs gPasscodeLastTry = 0;
2014-06-14 19:32:11 +00:00
bool gRetina = false;
float64 gRetinaFactor = 1.;
int32 gIntRetinaFactor = 1;
2014-06-14 19:32:11 +00:00
#ifdef Q_OS_WIN
DBIPlatform gPlatform = dbipWindows;
#elif defined OS_MAC_OLD
DBIPlatform gPlatform = dbipMacOld;
2014-06-14 19:32:11 +00:00
#elif defined Q_OS_MAC
DBIPlatform gPlatform = dbipMac;
#elif defined Q_OS_LINUX64
DBIPlatform gPlatform = dbipLinux64;
2016-02-02 11:48:46 +00:00
#elif defined Q_OS_LINUX32
DBIPlatform gPlatform = dbipLinux32;
2014-06-14 19:32:11 +00:00
#else
#error Unknown platform
#endif
2016-02-02 11:48:46 +00:00
QString gPlatformString;
bool gIsElCapitan = false;
bool gIsSnowLeopard = false;
2014-06-14 19:32:11 +00:00
int gOtherOnline = 0;
SavedPeers gSavedPeers;
SavedPeersByTime gSavedPeersByTime;
2015-09-08 17:22:29 +00:00
ReportSpamStatuses gReportSpamStatuses;
int32 gAutoDownloadPhoto = 0; // all auto download
int32 gAutoDownloadAudio = 0;
int32 gAutoDownloadGif = 0;
2015-12-27 21:37:48 +00:00
bool gAutoPlayGif = true;