diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-08-19 17:42:17 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-08-19 17:42:17 -0700 |
| commit | 351b7f3a09cfffa04dc5b62349806f256b9f3d2d (patch) | |
| tree | 8d91b60f6eaf06892e32a749ab54ec20eff35e36 /ZeroTierUI/mainwindow.cpp | |
| parent | 721625d51248bb7152bce7ed9b5eadab324d43dd (diff) | |
| download | infinitytier-351b7f3a09cfffa04dc5b62349806f256b9f3d2d.tar.gz infinitytier-351b7f3a09cfffa04dc5b62349806f256b9f3d2d.zip | |
UI stuff and sign .dmg on build.
Diffstat (limited to 'ZeroTierUI/mainwindow.cpp')
| -rw-r--r-- | ZeroTierUI/mainwindow.cpp | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/ZeroTierUI/mainwindow.cpp b/ZeroTierUI/mainwindow.cpp index 9a38bec5..46b5e9e0 100644 --- a/ZeroTierUI/mainwindow.cpp +++ b/ZeroTierUI/mainwindow.cpp @@ -216,8 +216,9 @@ void MainWindow::timerEvent(QTimerEvent *event) // event can be null since code } if (++this->cyclesSinceResponseFromService >= 3) { - if (this->cyclesSinceResponseFromService == 3) + if (this->cyclesSinceResponseFromService == 3) { QMessageBox::warning(this,"Service Not Running","Can't connect to the ZeroTier One service. Is it running?",QMessageBox::Ok); + } ui->noNetworksLabel->setVisible(true); ui->noNetworksLabel->setText("Connecting to Service..."); ui->bottomContainerWidget->setVisible(false); @@ -255,8 +256,8 @@ void MainWindow::customEvent(QEvent *event) std::map< std::string,std::vector<std::string> > newNetworks; for(unsigned long i=1;i<m->ztMessage.size();++i) { std::vector<std::string> l(ZeroTier::Node::NodeControlClient::splitLine(m->ztMessage[i])); - // 200 listnetworks <nwid> <name> <status> <config age> <type> <dev> <ips> - if ((l.size() == 9)&&(l[2].length() == 16)) + // 200 listnetworks <nwid> <name> <mac> <status> <config age> <type> <dev> <ips> + if ((l.size() == 10)&&(l[2].length() == 16)) newNetworks[l[2]] = l; } @@ -283,10 +284,11 @@ void MainWindow::customEvent(QEvent *event) alreadyDisplayed.insert(nw->networkId()); std::vector<std::string> &l = networks[nw->networkId()]; nw->setNetworkName(l[3]); - nw->setStatus(l[4],l[5]); - nw->setNetworkType(l[6]); - nw->setNetworkDeviceName(l[7]); - nw->setIps(l[8]); + nw->setMAC(l[4]); + nw->setStatus(l[5],l[6]); + nw->setNetworkType(l[7]); + nw->setNetworkDeviceName(l[8]); + nw->setIps(l[9]); } } for(std::map< std::string,std::vector<std::string> >::iterator nwdata(networks.begin());nwdata!=networks.end();++nwdata) { @@ -294,10 +296,11 @@ void MainWindow::customEvent(QEvent *event) std::vector<std::string> &l = nwdata->second; NetworkWidget *nw = new NetworkWidget((QWidget *)0,nwdata->first); nw->setNetworkName(l[3]); - nw->setStatus(l[4],l[5]); - nw->setNetworkType(l[6]); - nw->setNetworkDeviceName(l[7]); - nw->setIps(l[8]); + nw->setMAC(l[4]); + nw->setStatus(l[5],l[6]); + nw->setNetworkType(l[7]); + nw->setNetworkDeviceName(l[8]); + nw->setIps(l[9]); QListWidgetItem *item = new QListWidgetItem(); item->setSizeHint(nw->sizeHint()); ui->networkListWidget->addItem(item); |
