diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-01-10 17:31:10 -0800 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-01-10 17:31:10 -0800 |
| commit | 14d144ea2251c5b7ae80c7dbbd4f8907bcfa232b (patch) | |
| tree | 6996764dc27ab2b714ef08516456ea5dc019c4e2 /ZeroTierUI/mainwindow.cpp | |
| parent | 305ed0b3c5e59c1ba70b221e135edcdb09499d0a (diff) | |
| download | infinitytier-14d144ea2251c5b7ae80c7dbbd4f8907bcfa232b.tar.gz infinitytier-14d144ea2251c5b7ae80c7dbbd4f8907bcfa232b.zip | |
UI stuff, re-launch app from AppleScript after install (still needs a bit of work)
Diffstat (limited to 'ZeroTierUI/mainwindow.cpp')
| -rw-r--r-- | ZeroTierUI/mainwindow.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ZeroTierUI/mainwindow.cpp b/ZeroTierUI/mainwindow.cpp index 913ced1c..fc434782 100644 --- a/ZeroTierUI/mainwindow.cpp +++ b/ZeroTierUI/mainwindow.cpp @@ -82,7 +82,7 @@ static void handleZTMessage(void *arg,unsigned long id,const char *line) MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow), - pollServiceTimerId(0) + pollServiceTimerId(-1) { ui->setupUi(this); if (ui->networkListWidget->verticalScrollBar()) @@ -112,6 +112,8 @@ void MainWindow::timerEvent(QTimerEvent *event) if (this->isHidden()) return; + if (pollServiceTimerId < 0) + return; if (!zeroTierClient) { std::string authToken; @@ -331,7 +333,10 @@ void MainWindow::doInstallDialog() { #ifdef __APPLE__ this->setEnabled(false); - this->setHidden(true); + if (pollServiceTimerId >= 0) { + this->killTimer(pollServiceTimerId); + pollServiceTimerId = -1; + } InstallDialog *id = new InstallDialog(this); id->setModal(true); |
