Improve phrase on copying selected items as text.

This is a better implementation of #3346.
This commit is contained in:
John Preston 2017-06-29 11:12:23 +03:00
parent 7357119b1a
commit 0b3644b334
2 changed files with 3 additions and 2 deletions

View File

@ -1051,6 +1051,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
"lng_context_unpin_msg" = "Unpin Message";
"lng_context_cancel_upload" = "Cancel Upload";
"lng_context_copy_selected" = "Copy Selected Text";
"lng_context_copy_selected_items" = "Copy Selected as Text";
"lng_context_forward_selected" = "Forward Selected";
"lng_context_delete_selected" = "Delete Selected";
"lng_context_clear_selection" = "Clear Selection";

View File

@ -1180,7 +1180,7 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
bool lnkIsSong = lnkDocument ? (lnkDocument->document()->song() != nullptr) : false;
if (lnkPhoto || lnkDocument) {
if (isUponSelected > 0) {
_menu->addAction(lang(lng_context_copy_selected), this, SLOT(copySelectedText()))->setEnabled(true);
_menu->addAction(lang((isUponSelected > 1) ? lng_context_copy_selected_items : lng_context_copy_selected), this, SLOT(copySelectedText()))->setEnabled(true);
}
if (item && item->id > 0 && isUponSelected != 2 && isUponSelected != -2) {
if (canSendMessages) {
@ -1255,7 +1255,7 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
auto msg = dynamic_cast<HistoryMessage*>(item);
if (isUponSelected > 0) {
_menu->addAction(lang(lng_context_copy_selected), this, SLOT(copySelectedText()))->setEnabled(true);
_menu->addAction(lang((isUponSelected > 1) ? lng_context_copy_selected_items : lng_context_copy_selected), this, SLOT(copySelectedText()))->setEnabled(true);
if (item && item->id > 0 && isUponSelected != 2) {
if (canSendMessages) {
_menu->addAction(lang(lng_context_reply_msg), _widget, SLOT(onReplyToMessage()));