Skip to content
Snippets Groups Projects
Commit 7bb0e06d authored by Amin Bandali's avatar Amin Bandali
Browse files

mainapplication: add "Show Jami" tray icon context menu item

On some desktop environments on GNU/Linux, left-clicking on the tray
icon does not execute the restore action.  In some environments, such
as Ubuntu and some other GNOME-based environments, double-clicking the
icon does that, but that's counter-intuitive and not obvious at all to
the user.  So, we add a 'Show Jami' menu item for the system tray
context menu, similar to how jami-gnome did, so the user can clearly
see it as a possible action.

Change-Id: I1e12ba02190c12cf40d293d61e1f023380fbfcf9
parent 262f3de5
No related branches found
No related tags found
No related merge requests found
......@@ -489,6 +489,9 @@ MainApplication::initSystray()
QAction* quitAction = new QAction(quitString, this);
connect(quitAction, &QAction::triggered, this, &MainApplication::cleanup);
QAction* restoreAction = new QAction(tr("&Show Jami"), this);
connect(restoreAction, &QAction::triggered, this, &MainApplication::restoreApp);
connect(systemTray_.get(),
&QSystemTrayIcon::activated,
[this](QSystemTrayIcon::ActivationReason reason) {
......@@ -505,6 +508,7 @@ MainApplication::initSystray()
}
});
systrayMenu->addAction(restoreAction);
systrayMenu->addAction(quitAction);
systemTray_->setContextMenu(systrayMenu);
systemTray_->show();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment