mirror of
https://github.com/kavishdevar/librepods.git
synced 2026-02-03 00:29:16 +00:00
[Linux] Add reopen to tray options, enhance app tray, add ability to detect duplicate app instances, prevent duplicate app instances, and allow for original instance to be brought to front using the sockets
This commit is contained in:
@@ -56,6 +56,19 @@ void TrayIconManager::updateConversationalAwareness(bool enabled)
|
||||
|
||||
void TrayIconManager::setupMenuActions()
|
||||
{
|
||||
// Open action
|
||||
QAction *openAction = new QAction("Open", trayMenu);
|
||||
trayMenu->addAction(openAction);
|
||||
connect(openAction, &QAction::triggered, qApp, [this](){emit openApp();});
|
||||
|
||||
// Settings Menu
|
||||
|
||||
QAction *settingsMenu = new QAction("Settings", trayMenu);
|
||||
trayMenu->addAction(settingsMenu);
|
||||
connect(settingsMenu, &QAction::triggered, qApp, [this](){emit openSettings();});
|
||||
|
||||
trayMenu->addSeparator();
|
||||
|
||||
// Conversational Awareness Toggle
|
||||
caToggleAction = new QAction("Toggle Conversational Awareness", trayMenu);
|
||||
caToggleAction->setCheckable(true);
|
||||
@@ -63,6 +76,8 @@ void TrayIconManager::setupMenuActions()
|
||||
connect(caToggleAction, &QAction::triggered, this, [this](bool checked)
|
||||
{ emit conversationalAwarenessToggled(checked); });
|
||||
|
||||
trayMenu->addSeparator();
|
||||
|
||||
// Noise Control Options
|
||||
noiseControlGroup = new QActionGroup(trayMenu);
|
||||
const QPair<QString, NoiseControlMode> noiseOptions[] = {
|
||||
@@ -82,6 +97,8 @@ void TrayIconManager::setupMenuActions()
|
||||
{ emit noiseControlChanged(mode); });
|
||||
}
|
||||
|
||||
trayMenu->addSeparator();
|
||||
|
||||
// Quit action
|
||||
QAction *quitAction = new QAction("Quit", trayMenu);
|
||||
trayMenu->addAction(quitAction);
|
||||
|
||||
Reference in New Issue
Block a user