nurupo / ProjectTox-Qt-GUI

A cross-platform front end for ProjectTox Core library, written in C++11 with use of Qt5
GNU General Public License v3.0
342 stars 116 forks source link

Minimize to tray #114

Closed zimnx closed 10 years ago

zimnx commented 10 years ago

On Linux there is a bug that tray icon does not show always due to XEmbed issue. On Windows 8.1 works fine. More: http://www.qtcentre.org/threads/56459-QSystemTrayIcon-and-linux https://bugreports.qt-project.org/browse/QTBUG-34364

Small modification to set up behaviour on close window button. 516e7e97-4700-42fa-8a32-de4a3ebcc4b4 Tray support ContextMenu where user can set his status. Right now Tray Icon shows only static icon. Icon should reflect status that user has. Maybe add small rectangle in the corner of logo to reflect status(green for Online, red for Busy etc). e038aa23-3550-4a21-901b-c02690a9d7f7

Sorry for close/reopen, missclicked ;)

nurupo commented 10 years ago

Looks good.

Up-voted the bugreports.qt-project issue.

Will check your PR when will get a chance : )

nurupo commented 10 years ago

@Zimnx there is a bug: when clicking on Quit while the application is hidden, it asks if you want to quit or not, and if you answer No it still quits.

nurupo commented 10 years ago

Not really sure what causes the application to exit.

Here is a minimal example https://gist.github.com/nurupo/7a635f40c2bcb02101b4 Even if we remove the MainWindow::closeEvent() override and just do w.hide() right after w.show(); in main.cpp, it still happens. I think that the dialog window is considered to be the only open window, even though we ignored the closeEvent of mainwindow, and by default Qt exits when the last window (QDialog in that case) is closed.

nurupo commented 10 years ago

Anyway, I know how to fix it in a clean enough manner. Tell me if you find anything cleaner : )

nurupo commented 10 years ago

Also, you totally don't follow the coding style.