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

statusnotifier: Handle middle clicks

This commit is contained in:
tux3 2015-02-22 01:40:37 +01:00
parent c3700fdfec
commit fa57206620
No known key found for this signature in database
GPG Key ID: 7E086DD661263264

View File

@ -101,6 +101,12 @@ void SystemTrayIcon::setContextMenu(QMenu* menu)
((SystemTrayIcon*)data)->activated(QSystemTrayIcon::Trigger);
};
g_signal_connect(statusNotifier, "activate", G_CALLBACK(callbackClick), this);
void (*callbackMiddleClick)(StatusNotifier*, gint, gint, gpointer) =
[](StatusNotifier*, gint, gint, gpointer data)
{
((SystemTrayIcon*)data)->activated(QSystemTrayIcon::MiddleClick);
};
g_signal_connect(statusNotifier, "secondary_activate", G_CALLBACK(callbackMiddleClick), this);
for (QAction* a : menu->actions())
{