mirror of
https://github.com/tnodir/fort
synced 2024-11-15 09:36:28 +00:00
UI: TrayIcon: Reorganize menu items.
This commit is contained in:
parent
f271eb4de1
commit
774aae6cdc
@ -135,7 +135,7 @@ void StatisticsWindow::retranslateUi()
|
||||
|
||||
m_appInfoRow->retranslateUi();
|
||||
|
||||
this->setWindowTitle(tr("Connections"));
|
||||
this->setWindowTitle(tr("Statistics"));
|
||||
}
|
||||
|
||||
void StatisticsWindow::setupUi()
|
||||
@ -165,7 +165,7 @@ void StatisticsWindow::setupUi()
|
||||
this->setFont(QFont("Tahoma", 9));
|
||||
|
||||
// Icon
|
||||
this->setWindowIcon(GuiUtil::overlayIcon(":/icons/sheild-96.png", ":/icons/connect.png"));
|
||||
this->setWindowIcon(GuiUtil::overlayIcon(":/icons/sheild-96.png", ":/icons/line-bar.png"));
|
||||
|
||||
// Size
|
||||
this->setMinimumSize(500, 400);
|
||||
|
@ -125,8 +125,7 @@ void TrayIcon::updateTrayMenu(bool onlyFlags)
|
||||
void TrayIcon::setupController()
|
||||
{
|
||||
connect(fortManager(), &FortManager::optWindowChanged, this, &TrayIcon::updateTrayMenuFlags);
|
||||
connect(fortManager(), &FortManager::graphWindowChanged, m_graphWindowAction,
|
||||
&QAction::setChecked);
|
||||
connect(fortManager(), &FortManager::graphWindowChanged, m_graphAction, &QAction::setChecked);
|
||||
|
||||
connect(settings(), &FortSettings::passwordCheckedChanged, this,
|
||||
&TrayIcon::updateTrayMenuFlags);
|
||||
@ -140,9 +139,9 @@ void TrayIcon::retranslateUi()
|
||||
{
|
||||
m_programsAction->setText(tr("Programs"));
|
||||
m_optionsAction->setText(tr("Options"));
|
||||
m_statisticsAction->setText(tr("Statistics"));
|
||||
m_zonesAction->setText(tr("Zones"));
|
||||
m_graphWindowAction->setText(tr("Traffic Graph"));
|
||||
m_connectionsAction->setText(tr("Connections"));
|
||||
m_graphAction->setText(tr("Traffic Graph"));
|
||||
|
||||
m_filterEnabledAction->setText(tr("Filter Enabled"));
|
||||
m_stopTrafficAction->setText(tr("Stop Traffic"));
|
||||
@ -174,18 +173,18 @@ void TrayIcon::setupTrayMenu()
|
||||
SLOT(showOptionsWindow()));
|
||||
addHotKey(m_optionsAction, iniUser()->hotKeyOptions());
|
||||
|
||||
m_statisticsAction = addAction(menu, IconCache::icon(":/icons/line-bar.png"), QString(),
|
||||
fortManager(), SLOT(showStatisticsWindow()));
|
||||
addHotKey(m_statisticsAction, iniUser()->hotKeyStatistics());
|
||||
|
||||
m_graphAction = addAction(menu, IconCache::icon(":/icons/line-graph.png"), QString(),
|
||||
fortManager(), SLOT(switchGraphWindow()), true, !!fortManager()->graphWindow());
|
||||
addHotKey(m_graphAction, iniUser()->hotKeyGraph());
|
||||
|
||||
m_zonesAction = addAction(menu, IconCache::icon(":/icons/map-map-marker.png"), QString(),
|
||||
fortManager(), SLOT(showZonesWindow()));
|
||||
addHotKey(m_zonesAction, iniUser()->hotKeyZones());
|
||||
|
||||
m_graphWindowAction = addAction(menu, IconCache::icon(":/icons/line-graph.png"), QString(),
|
||||
fortManager(), SLOT(switchGraphWindow()), true, !!fortManager()->graphWindow());
|
||||
addHotKey(m_graphWindowAction, iniUser()->hotKeyGraph());
|
||||
|
||||
m_connectionsAction = addAction(menu, IconCache::icon(":/icons/connect.png"), QString(),
|
||||
fortManager(), SLOT(showConnectionsWindow()));
|
||||
addHotKey(m_connectionsAction, iniUser()->hotKeyConnections());
|
||||
|
||||
menu->addSeparator();
|
||||
|
||||
m_filterEnabledAction = addAction(menu, QIcon(), QString(), this, SLOT(saveTrayFlags()), true);
|
||||
|
@ -58,9 +58,9 @@ private:
|
||||
private:
|
||||
QAction *m_programsAction = nullptr;
|
||||
QAction *m_optionsAction = nullptr;
|
||||
QAction *m_statisticsAction = nullptr;
|
||||
QAction *m_graphAction = nullptr;
|
||||
QAction *m_zonesAction = nullptr;
|
||||
QAction *m_graphWindowAction = nullptr;
|
||||
QAction *m_connectionsAction = nullptr;
|
||||
QAction *m_filterEnabledAction = nullptr;
|
||||
QAction *m_stopTrafficAction = nullptr;
|
||||
QAction *m_stopInetTrafficAction = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user