add chatlobby option to disable sending typing notifications

This commit is contained in:
RetroPooh 2017-01-20 22:26:50 +03:00
parent f3b3d2b262
commit 0ca477d01b
5 changed files with 24 additions and 2 deletions

View File

@ -1088,8 +1088,8 @@ void ChatWidget::updateStatusTyping()
#ifdef ONLY_FOR_LINGUIST
tr("is typing...");
#endif
rsMsgs->sendStatusString(chatId, "is typing...");
if(!Settings->getChatDoNotSendIsTyping())
rsMsgs->sendStatusString(chatId, "is typing...");
lastStatusSendTime = time(NULL) ;
}
}

View File

@ -131,6 +131,7 @@ ChatPage::save(QString &/*errmsg*/)
Settings->setChatSendMessageWithCtrlReturn(ui.sendMessageWithCtrlReturn->isChecked());
Settings->setChatSendAsPlainTextByDef(ui.sendAsPlainTextByDef->isChecked());
Settings->setChatLoadEmbeddedImages(ui.loadEmbeddedImages->isChecked());
Settings->setChatDoNotSendIsTyping(ui.DontSendTyping->isChecked());
Settings->setChatSearchCharToStartSearch(ui.sbSearch_CharToStart->value());
Settings->setChatSearchCaseSensitively(ui.cbSearch_CaseSensitively->isChecked());
@ -240,6 +241,7 @@ ChatPage::load()
ui.sendMessageWithCtrlReturn->setChecked(Settings->getChatSendMessageWithCtrlReturn());
ui.sendAsPlainTextByDef->setChecked(Settings->getChatSendAsPlainTextByDef());
ui.loadEmbeddedImages->setChecked(Settings->getChatLoadEmbeddedImages());
ui.DontSendTyping->setChecked(Settings->getChatDoNotSendIsTyping());
ui.sbSearch_CharToStart->setValue(Settings->getChatSearchCharToStartSearch());
ui.cbSearch_CaseSensitively->setChecked(Settings->getChatSearchCaseSensitively());

View File

@ -271,6 +271,13 @@
</item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="DontSendTyping">
<property name="text">
<string>Do not send typing notifications</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>

View File

@ -514,6 +514,16 @@ void RshareSettings::setChatSendMessageWithCtrlReturn(bool bValue)
setValueToGroup("Chat", "SendMessageWithCtrlReturn", bValue);
}
bool RshareSettings::getChatDoNotSendIsTyping()
{
return valueFromGroup("Chat", "DoNotSendIsTyping", false).toBool();
}
void RshareSettings::setChatDoNotSendIsTyping(bool bValue)
{
setValueToGroup("Chat", "DoNotSendIsTyping", bValue);
}
bool RshareSettings::getChatSendAsPlainTextByDef()
{
return valueFromGroup("Chat", "SendAsPlainTextByDef", false).toBool();

View File

@ -210,6 +210,9 @@ public:
bool getChatSendMessageWithCtrlReturn();
void setChatSendMessageWithCtrlReturn(bool bValue);
bool getChatDoNotSendIsTyping();
void setChatDoNotSendIsTyping(bool bValue);
bool getChatSendAsPlainTextByDef();
void setChatSendAsPlainTextByDef(bool bValue);