mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Show main window with click on system icon when the main window is minimized.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4688 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
379927a846
commit
a124c928d5
@ -1209,13 +1209,13 @@ void MainWindow::closeEvent(QCloseEvent *e)
|
|||||||
|
|
||||||
void MainWindow::updateMenu()
|
void MainWindow::updateMenu()
|
||||||
{
|
{
|
||||||
toggleVisibilityAction->setText(isVisible() ? tr("Hide") : tr("Show"));
|
toggleVisibilityAction->setText(isVisible() && !isMinimized() ? tr("Hide") : tr("Show"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::toggleVisibility(QSystemTrayIcon::ActivationReason e)
|
void MainWindow::toggleVisibility(QSystemTrayIcon::ActivationReason e)
|
||||||
{
|
{
|
||||||
if (e == QSystemTrayIcon::Trigger || e == QSystemTrayIcon::DoubleClick) {
|
if (e == QSystemTrayIcon::Trigger || e == QSystemTrayIcon::DoubleClick) {
|
||||||
if(isHidden()){
|
if (isHidden() || isMinimized()) {
|
||||||
show();
|
show();
|
||||||
if (isMinimized()) {
|
if (isMinimized()) {
|
||||||
if (isMaximized()) {
|
if (isMaximized()) {
|
||||||
@ -1277,7 +1277,7 @@ void MainWindow::trayIconTransfersClicked(QSystemTrayIcon::ActivationReason e)
|
|||||||
|
|
||||||
void MainWindow::toggleVisibilitycontextmenu()
|
void MainWindow::toggleVisibilitycontextmenu()
|
||||||
{
|
{
|
||||||
if (isVisible())
|
if (isVisible() && !isMinimized())
|
||||||
hide();
|
hide();
|
||||||
else
|
else
|
||||||
show();
|
show();
|
||||||
|
Loading…
Reference in New Issue
Block a user