hannesrauhe / lunchinator

Tool to call colleagues for lunch
Other
1 stars 0 forks source link

Open up main window when launching lunchinator twice #259

Closed hannesrauhe closed 9 years ago

hannesrauhe commented 10 years ago

In a recent commit I catched the exception that is been thrown on Windows when the lock file cannot be opened. This usually means that the lunchinator is running already. On Window it is custom to open up the main Window in that case, which I do now.

Maybe you want to implement something similar on Mac? Just send HELO_OPEN_WINDOW <smth> to the local lunchinator port to show the main window.

entropia1 commented 10 years ago

You mean, if [ ERROR] stopping lunchinator because of socket error: [Errno 48] Address already in use happens?

hannesrauhe commented 10 years ago

Yes, of course only when trying to start with GUI. You have to decide if this is a good idea for Mac.

The major problem is that you cannot be sure whether it is a running and functioning lunchinator or a real error. You do not get feedback if a Window was opened.

entropia1 commented 10 years ago

For the PyInstaller build on Mac, it wouldn't change anything since you cannot open an application twice. In AppKit, you can register for a reopen event; I don't know if it is possible to do this in Qt. I'll check.

entropia1 commented 10 years ago

Implemented reopen on Mac

hannesrauhe commented 9 years ago

Changed it on Linux/Windows to open up a test-socket before initializing the logger.