UI stuff, re-launch app from AppleScript after install (still needs a bit of work)

This commit is contained in:
Adam Ierymenko 2014-01-10 17:31:10 -08:00
parent 305ed0b3c5
commit 14d144ea22
3 changed files with 8 additions and 3 deletions

View File

@ -42,7 +42,7 @@
<key>positionOfDivider</key> <key>positionOfDivider</key>
<real>333</real> <real>333</real>
<key>savedFrame</key> <key>savedFrame</key>
<string>57 445 602 597 0 0 1920 1058 </string> <string>180 90 602 597 0 0 1280 778 </string>
<key>selectedTabView</key> <key>selectedTabView</key>
<string>event log</string> <string>event log</string>
</dict> </dict>

View File

@ -82,7 +82,7 @@ static void handleZTMessage(void *arg,unsigned long id,const char *line)
MainWindow::MainWindow(QWidget *parent) : MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent), QMainWindow(parent),
ui(new Ui::MainWindow), ui(new Ui::MainWindow),
pollServiceTimerId(0) pollServiceTimerId(-1)
{ {
ui->setupUi(this); ui->setupUi(this);
if (ui->networkListWidget->verticalScrollBar()) if (ui->networkListWidget->verticalScrollBar())
@ -112,6 +112,8 @@ void MainWindow::timerEvent(QTimerEvent *event)
if (this->isHidden()) if (this->isHidden())
return; return;
if (pollServiceTimerId < 0)
return;
if (!zeroTierClient) { if (!zeroTierClient) {
std::string authToken; std::string authToken;
@ -331,7 +333,10 @@ void MainWindow::doInstallDialog()
{ {
#ifdef __APPLE__ #ifdef __APPLE__
this->setEnabled(false); this->setEnabled(false);
this->setHidden(true); if (pollServiceTimerId >= 0) {
this->killTimer(pollServiceTimerId);
pollServiceTimerId = -1;
}
InstallDialog *id = new InstallDialog(this); InstallDialog *id = new InstallDialog(this);
id->setModal(true); id->setModal(true);