1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Merge pull request #4906

Pavel Karelin (2):
      fix(l10n): Correction of the translation into Russian
      chore: Reorganization of the context menu for chat
This commit is contained in:
sudden6 2018-01-15 00:43:26 +01:00
commit 3966692a53
No known key found for this signature in database
GPG Key ID: 279509B499E032B9
2 changed files with 29 additions and 12 deletions

View File

@ -43,7 +43,7 @@
#include <QClipboard>
#include <QFileDialog>
#include <QKeyEvent>
#include <QShortcut>
#include <QMessageBox>
/**
* @class GenericChatForm
@ -193,25 +193,27 @@ GenericChatForm::GenericChatForm(QWidget* parent)
contentLayout->addWidget(chatWidget);
contentLayout->addLayout(mainFootLayout);
quoteAction = menu.addAction(QIcon(), QString(), this, SLOT(quoteSelectedText()),
QKeySequence(Qt::ALT + Qt::Key_Q));
addAction(quoteAction);
menu.addSeparator();
menu.addActions(chatWidget->actions());
menu.addSeparator();
saveChatAction =
menu.addAction(QIcon::fromTheme("document-save"), QString(), this, SLOT(onSaveLogClicked()));
clearAction =
menu.addAction(QIcon::fromTheme("edit-clear"), QString(), this, SLOT(clearChatArea(bool)));
quoteAction = menu.addAction(QIcon(), QString(), this, SLOT(quoteSelectedText()));
saveChatAction = menu.addAction(QIcon::fromTheme("document-save"), QString(),
this, SLOT(onSaveLogClicked()));
clearAction = menu.addAction(QIcon::fromTheme("edit-clear"), QString(),
this, SLOT(clearChatArea(bool)),
QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_L));
addAction(clearAction);
copyLinkAction = menu.addAction(QIcon(), QString(), this, SLOT(copyLink()));
menu.addSeparator();
connect(chatWidget, &ChatLog::customContextMenuRequested, this,
&GenericChatForm::onChatContextMenuRequested);
new QShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_L, this, SLOT(clearChatArea()));
new QShortcut(Qt::ALT + Qt::Key_Q, this, SLOT(quoteSelectedText()));
chatWidget->setStyleSheet(Style::getStylesheet(":/ui/chatArea/chatArea.css"));
headWidget->setStyleSheet(Style::getStylesheet(":/ui/chatArea/chatHead.css"));
@ -524,6 +526,13 @@ void GenericChatForm::clearChatArea()
void GenericChatForm::clearChatArea(bool notinform)
{
QMessageBox::StandardButton mboxResult =
QMessageBox::question(this, tr("Confirmation"),
tr("You are sure that you want to clear all displayed messages?"),
QMessageBox::Yes | QMessageBox::No, QMessageBox::No);
if (mboxResult == QMessageBox::No) {
return;
}
chatWidget->clear();
previousId = ToxPk();

12
translations/ru.ts vendored
View File

@ -591,11 +591,11 @@ which may lead to problems with video calls.</source>
</message>
<message>
<source>%1 calling</source>
<translation>%1 звонит</translation>
<translation>Входящий звонок от %1</translation>
</message>
<message>
<source>Calling %1</source>
<translation>Звонит %1</translation>
<translation>Вызов %1</translation>
</message>
<message>
<source>Failed to send file &quot;%1&quot;</source>
@ -1240,6 +1240,14 @@ instead of system taskbar.</source>
<source>Copy link address</source>
<translation>Копировать адрес ссылки</translation>
</message>
<message>
<source>Confirmation</source>
<translation>Подтверждение</translation>
</message>
<message>
<source>You are sure that you want to clear all displayed messages?</source>
<translation>Вы уверены, что хотите удалить все отображаемые сообщения?</translation>
</message>
</context>
<context>
<name>GenericNetCamView</name>