diff --git a/resources/graphics/icons/mini-kfaenza/view-switch.png b/resources/graphics/icons/mini-kfaenza/view-switch.png new file mode 100644 index 000000000..636917de7 Binary files /dev/null and b/resources/graphics/icons/mini-kfaenza/view-switch.png differ diff --git a/src/gui/formmain.cpp b/src/gui/formmain.cpp index 69e0ace11..1d80151a5 100755 --- a/src/gui/formmain.cpp +++ b/src/gui/formmain.cpp @@ -101,6 +101,8 @@ void FormMain::prepareMenus() { #endif // Add needed items to the menu. + m_trayMenu->addAction(m_ui->m_actionSwitchMainWindow); + m_trayMenu->addSeparator(); m_trayMenu->addAction(m_ui->m_actionUpdateAllFeeds); m_trayMenu->addAction(m_ui->m_actionMarkAllFeedsRead); m_trayMenu->addSeparator(); @@ -221,6 +223,7 @@ void FormMain::setupIcons() { m_ui->m_actionImport->setIcon(icon_theme_factory->fromTheme("document-import")); m_ui->m_actionExport->setIcon(icon_theme_factory->fromTheme("document-export")); m_ui->m_actionFullscreen->setIcon(icon_theme_factory->fromTheme("view-fullscreen")); + m_ui->m_actionSwitchMainWindow->setIcon(icon_theme_factory->fromTheme("view-switch")); // Web browser. m_ui->m_actionAddBrowser->setIcon(icon_theme_factory->fromTheme("list-add")); @@ -306,6 +309,7 @@ void FormMain::createConnections() { // Menu "View" connections. connect(m_ui->m_actionFullscreen, SIGNAL(triggered()), this, SLOT(switchFullscreenMode())); + connect(m_ui->m_actionSwitchMainWindow, SIGNAL(triggered()), this, SLOT(switchVisibility())); // Menu "Tools" connections. connect(m_ui->m_actionSettings, SIGNAL(triggered()), this, SLOT(showSettings())); diff --git a/src/gui/formmain.ui b/src/gui/formmain.ui index 6f532771d..f0eac861d 100644 --- a/src/gui/formmain.ui +++ b/src/gui/formmain.ui @@ -436,6 +436,17 @@ + + + Switch visibility of main window + + + Hides main window if it is visible and shows it if it is hidden. + + + + +