diff --git a/retroshare-gui/src/gui/NetworkDialog.cpp b/retroshare-gui/src/gui/NetworkDialog.cpp index 75ba489bd..7798fe0b9 100644 --- a/retroshare-gui/src/gui/NetworkDialog.cpp +++ b/retroshare-gui/src/gui/NetworkDialog.cpp @@ -150,7 +150,7 @@ NetworkDialog::NetworkDialog(QWidget *parent) getNetworkStatus(); updateNetworkStatus(); - load(); + //load(); /* Hide platform specific features */ @@ -699,9 +699,100 @@ void NetworkDialog::updateNetworkStatus() /******* Network Status Tab *******/ - - //ui.check_net->setChecked(config.netOk); - ui.check_upnp->setChecked(config.netUpnpOk); + + if(config.netUpnpOk) + { + ui.iconlabel_upnp->setPixmap(QPixmap::QPixmap(":/images/ledon1.png")); + ui.textlabel_upnp->setText(tr("UPnP active")); + } + else + { + ui.iconlabel_upnp->setPixmap(QPixmap::QPixmap(":/images/ledoff1.png")); + ui.textlabel_upnp->setText(tr("UPnP inactive")); + } + + if(config.netDhtOk) + { + ui.iconlabel_dht->setPixmap(QPixmap::QPixmap(":/images/ledon1.png")); + ui.textlabel_dht->setText(tr("DHT active")); + } + else + { + ui.iconlabel_dht->setPixmap(QPixmap::QPixmap(":/images/ledoff1.png")); + ui.textlabel_dht->setText(tr("DHT inactive")); + } + + if(config.netExtOk) + { + ui.iconlabel_ext->setPixmap(QPixmap::QPixmap(":/images/ledon1.png")); + ui.textlabel_ext->setText(tr("Stabile External IP Address")); + } + else + { + ui.iconlabel_ext->setPixmap(QPixmap::QPixmap(":/images/ledoff1.png")); + ui.textlabel_ext->setText(tr("Not Found External IP Address")); + } + + if(config.netUdpOk) + { + ui.iconlabel_udp->setPixmap(QPixmap::QPixmap(":/images/ledon1.png")); + ui.textlabel_udp->setText(tr("UDP Port is reachable")); + } + else + { + ui.iconlabel_udp->setPixmap(QPixmap::QPixmap(":/images/ledoff1.png")); + ui.textlabel_udp->setText(tr("UDP Port is not reachable")); + } + + if(config.netTcpOk) + { + ui.iconlabel_tcp->setPixmap(QPixmap::QPixmap(":/images/ledon1.png")); + ui.textlabel_tcp->setText(tr("TCP Port is reachable")); + } + else + { + ui.iconlabel_tcp->setPixmap(QPixmap::QPixmap(":/images/ledoff1.png")); + ui.textlabel_tcp->setText(tr("TCP Port is not reachable")); + } + + if (config.netExtOk) + { + if (config.netUpnpOk || config.netTcpOk) + { + ui.iconlabel_netServer->setPixmap(QPixmap::QPixmap(":/images/ledon1.png")); + + ui.iconlabel_netUdp->setPixmap(QPixmap::QPixmap(":/images/ledoff1.png")); + ui.iconlabel_netLimited->setPixmap(QPixmap::QPixmap(":/images/ledoff1.png")); + ui.iconlabel_nonet->setPixmap(QPixmap::QPixmap(":/images/ledoff1.png")); + } + else + { + ui.iconlabel_netUdp->setPixmap(QPixmap::QPixmap(":/images/ledon1.png")); + + ui.iconlabel_netServer->setPixmap(QPixmap::QPixmap(":/images/ledoff1.png")); + ui.iconlabel_netLimited->setPixmap(QPixmap::QPixmap(":/images/ledoff1.png")); + ui.iconlabel_nonet->setPixmap(QPixmap::QPixmap(":/images/ledoff1.png")); + } + } + else if (config.netOk) + { + ui.iconlabel_netLimited->setPixmap(QPixmap::QPixmap(":/images/ledon1.png")); + + ui.iconlabel_netUdp->setPixmap(QPixmap::QPixmap(":/images/ledoff1.png")); + ui.iconlabel_netServer->setPixmap(QPixmap::QPixmap(":/images/ledoff1.png")); + ui.iconlabel_nonet->setPixmap(QPixmap::QPixmap(":/images/ledoff1.png")); + } + else + { + ui.iconlabel_nonet->setPixmap(QPixmap::QPixmap(":/images/ledon1.png")); + + ui.iconlabel_netUdp->setPixmap(QPixmap::QPixmap(":/images/ledoff1.png")); + ui.iconlabel_netServer->setPixmap(QPixmap::QPixmap(":/images/ledoff1.png")); + ui.iconlabel_netLimited->setPixmap(QPixmap::QPixmap(":/images/ledoff1.png")); + } + + //ui.check_net->setChecked(config.netOk); + /*ui.check_upnp->setChecked(config.netUpnpOk); ui.check_dht->setChecked(config.netDhtOk); ui.check_ext->setChecked(config.netExtOk); ui.check_udp->setChecked(config.netUdpOk); @@ -725,12 +816,12 @@ void NetworkDialog::updateNetworkStatus() else { ui.radio_nonet->setChecked(true); - } + }*/ rsiface->unlockData(); /* UnLock Interface */ } -void NetworkDialog::load() +/*void NetworkDialog::load() { //ui.check_net->setCheckable(true); ui.check_upnp->setCheckable(true); @@ -750,7 +841,7 @@ void NetworkDialog::load() ui.radio_netLimited->setEnabled(false); ui.radio_netUdp->setEnabled(false); ui.radio_netServer->setEnabled(false); -} +}*/ void NetworkDialog::on_actionTabsright_activated() { diff --git a/retroshare-gui/src/gui/NetworkDialog.h b/retroshare-gui/src/gui/NetworkDialog.h index 4d3828664..df0530714 100644 --- a/retroshare-gui/src/gui/NetworkDialog.h +++ b/retroshare-gui/src/gui/NetworkDialog.h @@ -46,7 +46,7 @@ public: void showpeerdetails(std::string id); - void load(); + //void load(); public slots: void insertConnect(); diff --git a/retroshare-gui/src/gui/NetworkDialog.ui b/retroshare-gui/src/gui/NetworkDialog.ui index b4b625895..4de4d0ee1 100644 --- a/retroshare-gui/src/gui/NetworkDialog.ui +++ b/retroshare-gui/src/gui/NetworkDialog.ui @@ -257,88 +257,249 @@ p, li { white-space: pre-wrap; } - - - - - + + + + + + + + 16 + 16 + + - No Conectivity + + + + :/images/ledoff1.png - - + + - Limited - - - - - - - Udp - - - - - - - Retroshare Server + No Connectivity - - - - + + + + + + + 16 + 16 + + + + + + + :/images/ledoff1.png + + + + + + + Limited + + + + + + + + + + + + 16 + 16 + + + + + + + :/images/ledoff1.png + + + + + + + UDP + + + + + + + + + + + + 16 + 16 + + + + + + + :/images/ledoff1.png + + + + + + + RetroShare Server + + + + + + + + + + + + + + + + 16 + 16 + + + + + + + :/images/ledoff1.png + + + + + UDP Connections - - false - - - + + + + + + + + + 16 + 16 + + - Stable External IP Addrress + - - false + + :/images/ledoff1.png - - + + - DHT Okay - - - false + Stable External IP Address - - + + + + + + + + + 16 + 16 + + + + + + + :/images/ledoff1.png + + + + + + + DHT OK + + + + + + + + + + + + 16 + 16 + + + + + + + :/images/ledoff1.png + + + + + UPnP Active - - false + + + + + + + + + + + 16 + 16 + + + + + + + :/images/ledoff1.png - - + + - TCP server - - - false + TCP Server @@ -391,6 +552,8 @@ p, li { white-space: pre-wrap; } - + + + diff --git a/retroshare-gui/src/gui/Preferences/ServerDialog.ui b/retroshare-gui/src/gui/Preferences/ServerDialog.ui index 8ff5342fa..e2792b34c 100644 --- a/retroshare-gui/src/gui/Preferences/ServerDialog.ui +++ b/retroshare-gui/src/gui/Preferences/ServerDialog.ui @@ -488,10 +488,22 @@ Qt::NoContextMenu - + 6 - + + 6 + + + 6 + + + 6 + + + 0 + + 0 @@ -566,7 +578,7 @@ Qt::Horizontal - + 40 20 @@ -598,7 +610,7 @@ Network Configuration - + @@ -672,11 +684,11 @@ - + Qt::Vertical - + 20 40 @@ -699,7 +711,7 @@ IP check service - + @@ -712,7 +724,7 @@ behind a firewall or a VPN. Allow RetroShare to ask my ip to these websites: - true + false @@ -747,7 +759,16 @@ behind a firewall or a VPN. 6 - + + 0 + + + 0 + + + 0 + + 0 @@ -777,7 +798,16 @@ behind a firewall or a VPN. 6 - + + 0 + + + 0 + + + 0 + + 0 @@ -807,7 +837,7 @@ behind a firewall or a VPN. Qt::Horizontal - + 40 20 diff --git a/retroshare-gui/src/gui/images.qrc b/retroshare-gui/src/gui/images.qrc index a044a2341..86f9a395c 100644 --- a/retroshare-gui/src/gui/images.qrc +++ b/retroshare-gui/src/gui/images.qrc @@ -201,6 +201,8 @@ images/knewsticker24.png images/library.png images/loadcert16.png + images/ledoff1.png + images/ledon1.png images/locale.png images/looknfeel.png images/lphoto.png @@ -269,6 +271,8 @@ images/rsmessenger16.png images/rsmessenger32.png images/rstray3.png + images/rstray0.png + images/rstray1.png images/save24.png images/send24.png images/settings.png @@ -283,6 +287,7 @@ images/startall.png images/server_24x24.png images/transferupdown.png + images/typing.png images/uploads.png images/loader/16-loader.gif images/loader/32-loader.gif diff --git a/retroshare-gui/src/gui/images/ledoff1.png b/retroshare-gui/src/gui/images/ledoff1.png new file mode 100644 index 000000000..3cbc2849d Binary files /dev/null and b/retroshare-gui/src/gui/images/ledoff1.png differ diff --git a/retroshare-gui/src/gui/images/ledon1.png b/retroshare-gui/src/gui/images/ledon1.png new file mode 100644 index 000000000..450d73745 Binary files /dev/null and b/retroshare-gui/src/gui/images/ledon1.png differ diff --git a/retroshare-gui/src/gui/images/typing.png b/retroshare-gui/src/gui/images/typing.png new file mode 100644 index 000000000..316e83d60 Binary files /dev/null and b/retroshare-gui/src/gui/images/typing.png differ