add disable tearoffmenu option (#3826)

This commit is contained in:
ebbit1q 2019-10-02 20:58:22 +02:00 committed by Zach H
parent bcf505c98b
commit cd29e2f252
11 changed files with 90 additions and 40 deletions

View file

@ -50,6 +50,7 @@ signals:
void chatMentionCompleterChanged();
void downloadSpoilerTimeIndexChanged();
void downloadSpoilerStatusChanged();
void useTearOffMenusChanged(bool state);
private:
QSettings *settings;
@ -102,6 +103,7 @@ private:
QString clientID;
QString clientVersion;
QString knownMissingFeatures;
bool useTearOffMenus;
int pixmapCacheSize;
bool scaleCards;
bool showMessagePopups;
@ -398,9 +400,10 @@ public:
{
return maxFontSize;
}
void setClientID(QString clientID);
void setClientVersion(QString clientVersion);
void setKnownMissingFeatures(QString _knownMissingFeatures);
void setClientID(const QString &clientID);
void setClientVersion(const QString &clientVersion);
void setKnownMissingFeatures(const QString &_knownMissingFeatures);
void setUseTearOffMenus(bool _useTearOffMenus);
QString getClientID()
{
return clientID;
@ -413,6 +416,10 @@ public:
{
return knownMissingFeatures;
}
bool getUseTearOffMenus()
{
return useTearOffMenus;
}
ShortcutsSettings &shortcuts() const
{
return *shortcutsSettings;