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
343 stars 117 forks source link

Don't ask again on close #115

Open zimnx opened 10 years ago

zimnx commented 10 years ago

Hey i added checkbox which can user use to determine if he want confrimation dialog when closing application. Checbox can be checked in Settings page or directly on dialog. Here is how it looks now: closedialog I also centered buttons because with checkbox when they were aligned to right whole dialog looked ugly. Maybe checkbox should be in the same line with buttons. What do you think? Change in settings page: settingswithclosedialog

I also fixed tray label. When user minimized window by clicking on close button, tray had label "hide" instead of "show"

zimnx commented 10 years ago

Second commit change layout to proposed one: closedialog2 Looks more compact, i like it more ;)

nurupo commented 10 years ago

That is kind of funny, because the close application dialog served as a work around for several things:

  1. There was no direct way to make toxcore go offline in a clean way (now there is, but it's not implemented in Qt GUI, which you could do) so I decided to just exit the client if user tries to go offline, but in order to not surprise the user with such unintuitive behavior, I made this dialog that warns the user
  2. qApp->quit() doesn't work when called in certain places of code, but it works in the close application dialog.

So it's as if you made a workaround for a workaround : )

I will look into it and probably will end up implementing the offline status the right way and removing this annoying CloseApplicationDialog at all. You can mention that PR in your proposal if you'd like, I doubt I will get chance to work on it during this week, sadly, being overly busy.

zimnx commented 10 years ago

I didn't know that, i saw comment near changing status to offline, but i thought that this window will be integrated part of Tox, some applications use this pattern when closeing ;) Maybe if i find time tomorrow ill try to implement offline status. This is good execrise on working with core.