2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-02 07:35:12 +00:00

fixed copy selected text, post author display added, post links handling added, windows bingmaps opening added, sticker previews from mentionsdropdown and stickersetbox added

This commit is contained in:
John Preston
2016-02-17 19:37:21 +03:00
parent 6a299e32d3
commit 7433cea0fd
34 changed files with 1009 additions and 425 deletions

View File

@@ -1306,16 +1306,17 @@ void OverviewInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
if (_selectedMsgId) repaintItem(_selectedMsgId, -1);
} else if (!ignoreMousedItem && App::mousedItem() && App::mousedItem()->channelId() == itemChannel(_mousedItem) && App::mousedItem()->id == itemMsgId(_mousedItem)) {
_menu = new PopupMenu();
if ((_contextMenuLnk && dynamic_cast<TextLink*>(_contextMenuLnk.data()))) {
QLatin1String linktype = _contextMenuLnk ? _contextMenuLnk->type() : qstr("");
if (linktype == qstr("TextLink") || linktype == qstr("LocationLink")) {
_menu->addAction(lang(lng_context_open_link), this, SLOT(openContextUrl()))->setEnabled(true);
_menu->addAction(lang(lng_context_copy_link), this, SLOT(copyContextUrl()))->setEnabled(true);
} else if ((_contextMenuLnk && dynamic_cast<EmailLink*>(_contextMenuLnk.data()))) {
} else if (linktype == qstr("EmailLink")) {
_menu->addAction(lang(lng_context_open_email), this, SLOT(openContextUrl()))->setEnabled(true);
_menu->addAction(lang(lng_context_copy_email), this, SLOT(copyContextUrl()))->setEnabled(true);
} else if (_contextMenuLnk && dynamic_cast<MentionLink*>(_contextMenuLnk.data())) {
} else if (linktype == qstr("MentionLink")) {
_menu->addAction(lang(lng_context_open_mention), this, SLOT(openContextUrl()))->setEnabled(true);
_menu->addAction(lang(lng_context_copy_mention), this, SLOT(copyContextUrl()))->setEnabled(true);
} else if (_contextMenuLnk && dynamic_cast<HashtagLink*>(_contextMenuLnk.data())) {
} else if (linktype == qstr("HashtagLink")) {
_menu->addAction(lang(lng_context_open_hashtag), this, SLOT(openContextUrl()))->setEnabled(true);
_menu->addAction(lang(lng_context_copy_hashtag), this, SLOT(copyContextUrl()))->setEnabled(true);
} else {