From b8be372c4dcb77edb8105a293b37fce1d50df622 Mon Sep 17 00:00:00 2001 From: joss17 Date: Fri, 30 Oct 2009 00:36:33 +0000 Subject: [PATCH] changed net status gui git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1753 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/NetworkDialog.cpp | 58 ++------------- retroshare-gui/src/gui/NetworkDialog.ui | 74 +++---------------- .../src/gui/statusbar/natstatus.cpp | 64 ++++++++-------- 3 files changed, 48 insertions(+), 148 deletions(-) diff --git a/retroshare-gui/src/gui/NetworkDialog.cpp b/retroshare-gui/src/gui/NetworkDialog.cpp index 83833d339..ff1189d41 100644 --- a/retroshare-gui/src/gui/NetworkDialog.cpp +++ b/retroshare-gui/src/gui/NetworkDialog.cpp @@ -797,109 +797,63 @@ void NetworkDialog::updateNetworkStatus() 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 active ( UDP Connections )")); } else { ui.iconlabel_udp->setPixmap(QPixmap::QPixmap(":/images/ledoff1.png")); - ui.textlabel_udp->setText(tr("UDP Port is not active")); } if (config.netExtOk) { if (config.netUpnpOk) { - 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")); + ui.iconlabel_netUdp->setPixmap(QPixmap::QPixmap(":/images/ledon1.png")); + ui.iconlabel_netLimited->setPixmap(QPixmap::QPixmap(":/images/ledon1.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")); - } + ui.iconlabel_netLimited->setPixmap(QPixmap::QPixmap(":/images/ledon1.png")); + } } else if (config.netOk) { - ui.iconlabel_netLimited->setPixmap(QPixmap::QPixmap(":/images/ledon1.png")); + 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); - ui.check_tcp->setChecked(config.netTcpOk); - - if (config.netExtOk) - { - if (config.netUpnpOk || config.netTcpOk) - { - ui.radio_netServer->setChecked(true); - } - else - { - ui.radio_netUdp->setChecked(true); - } - } - else if (config.netOk) - { - ui.radio_netLimited->setChecked(true); - } - else - { - ui.radio_nonet->setChecked(true); - }*/ rsiface->unlockData(); /* UnLock Interface */ } diff --git a/retroshare-gui/src/gui/NetworkDialog.ui b/retroshare-gui/src/gui/NetworkDialog.ui index 53fa7626c..5a4de370b 100644 --- a/retroshare-gui/src/gui/NetworkDialog.ui +++ b/retroshare-gui/src/gui/NetworkDialog.ui @@ -183,33 +183,6 @@ - - - - - - 16 - 16 - - - - - - - :/images/ledoff1.png - - - - - - - No Connectivity - - - - - - @@ -230,13 +203,13 @@ - Limited + Local network - + @@ -257,16 +230,16 @@ - UDP + Internet connection - + - + 16 @@ -282,9 +255,9 @@ - + - RetroShare Server + UPnP @@ -315,7 +288,7 @@ - UDP Connections + UDP stun external ip address @@ -342,7 +315,7 @@ - Stable External IP Address + Stable external IP address @@ -369,34 +342,7 @@ - DHT OK - - - - - - - - - - - - 16 - 16 - - - - - - - :/images/ledoff1.png - - - - - - - UPnP Active + DHT diff --git a/retroshare-gui/src/gui/statusbar/natstatus.cpp b/retroshare-gui/src/gui/statusbar/natstatus.cpp index 9025a67fc..6486a9d30 100644 --- a/retroshare-gui/src/gui/statusbar/natstatus.cpp +++ b/retroshare-gui/src/gui/statusbar/natstatus.cpp @@ -70,38 +70,38 @@ void NATStatus::getNATStatus() /* now the extra bit .... switch on check boxes */ const RsConfig &config = rsiface->getConfig(); - if(config.netUpnpOk) - { - iconLabel->setPixmap(QPixmap::QPixmap(":/images/greenled.png")); - iconLabel->setToolTip(tr("UPNP is active.")); - } - else - { - iconLabel->setPixmap(QPixmap::QPixmap(":/images/yellowled.png")); - iconLabel->setToolTip(tr("UPNP NOT FOUND.")); - } - - if(config.netExtOk) - { - iconLabel->setPixmap(QPixmap::QPixmap(":/images/greenled.png")); - iconLabel->setToolTip(tr("Stable External IP Address")); - } - else - { - iconLabel->setPixmap(QPixmap::QPixmap(":/images/yellowled.png")); - iconLabel->setToolTip(tr("Not Found External Address")); - } - - if(config.netUdpOk) - { - iconLabel->setPixmap(QPixmap::QPixmap(":/images/greenled.png")); - iconLabel->setToolTip(tr("UDP Port is reachable")); - } - else - { - iconLabel->setPixmap(QPixmap::QPixmap(":/images/yellowled.png")); - iconLabel->setToolTip(tr("UDP Port is not reachable")); - } +// if(config.netUpnpOk) +// { +// iconLabel->setPixmap(QPixmap::QPixmap(":/images/greenled.png")); +// iconLabel->setToolTip(tr("UPNP is active.")); +// } +// else +// { +// iconLabel->setPixmap(QPixmap::QPixmap(":/images/yellowled.png")); +// iconLabel->setToolTip(tr("UPNP NOT FOUND.")); +// } +// +// if(config.netExtOk) +// { +// iconLabel->setPixmap(QPixmap::QPixmap(":/images/greenled.png")); +// iconLabel->setToolTip(tr("Stable External IP Address")); +// } +// else +// { +// iconLabel->setPixmap(QPixmap::QPixmap(":/images/yellowled.png")); +// iconLabel->setToolTip(tr("Not Found External Address")); +// } +// +// if(config.netUdpOk) +// { +// iconLabel->setPixmap(QPixmap::QPixmap(":/images/yellowled.png")); +// iconLabel->setToolTip(tr("UDP Port is reachable")); +// } +// else +// { +// iconLabel->setPixmap(QPixmap::QPixmap(":/images/grayled.png")); +// iconLabel->setToolTip(tr("UDP Port is not reachable")); +// } if (config.netExtOk) {