mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-07-03 14:15:08 +02:00
custom context menus (including tray menu for windows) done
This commit is contained in:
@@ -1038,7 +1038,7 @@ void OverviewInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
|
||||
AudioLink *lnkAudio = dynamic_cast<AudioLink*>(_contextMenuLnk.data());
|
||||
DocumentLink *lnkDocument = dynamic_cast<DocumentLink*>(_contextMenuLnk.data());
|
||||
if (lnkPhoto || lnkVideo || lnkAudio || lnkDocument) {
|
||||
_menu = new QMenu(_overview);
|
||||
_menu = new ContextMenu(_overview);
|
||||
if (App::hoveredLinkItem()) {
|
||||
_menu->addAction(lang(lng_context_to_msg), this, SLOT(goToMessage()))->setEnabled(true);
|
||||
}
|
||||
@@ -1068,7 +1068,7 @@ void OverviewInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
|
||||
App::contextItem(App::hoveredLinkItem());
|
||||
}
|
||||
if (_menu) {
|
||||
_menu->setAttribute(Qt::WA_DeleteOnClose);
|
||||
_menu->deleteOnHide();
|
||||
connect(_menu, SIGNAL(destroyed(QObject*)), this, SLOT(onMenuDestroy(QObject*)));
|
||||
_menu->popup(e->globalPos());
|
||||
e->accept();
|
||||
|
||||
Reference in New Issue
Block a user