From 0b3644b334778462113f488716abb516d7709211 Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 29 Jun 2017 11:12:23 +0300 Subject: [PATCH] Improve phrase on copying selected items as text. This is a better implementation of #3346. --- Telegram/Resources/langs/lang.strings | 1 + Telegram/SourceFiles/history/history_inner_widget.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index 63ed2b3c4..d52c09e70 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -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"; diff --git a/Telegram/SourceFiles/history/history_inner_widget.cpp b/Telegram/SourceFiles/history/history_inner_widget.cpp index ad0359a6d..cc3ddd212 100644 --- a/Telegram/SourceFiles/history/history_inner_widget.cpp +++ b/Telegram/SourceFiles/history/history_inner_widget.cpp @@ -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(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()));