mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-05 21:29:23 -04:00
Tweaks to the GUI for removal of RsIface class.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6585 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
f93ed1fb6e
commit
a45a70a1d5
5 changed files with 13 additions and 31 deletions
|
@ -24,7 +24,7 @@
|
||||||
#include "HelpDialog.h"
|
#include "HelpDialog.h"
|
||||||
|
|
||||||
#include <retroshare/rsdisc.h>
|
#include <retroshare/rsdisc.h>
|
||||||
#include <retroshare/rsiface.h>
|
#include <retroshare/rspeers.h>
|
||||||
#include "settings/rsharesettings.h"
|
#include "settings/rsharesettings.h"
|
||||||
|
|
||||||
#include <QtGui/QHBoxLayout>
|
#include <QtGui/QHBoxLayout>
|
||||||
|
@ -53,9 +53,8 @@ AboutDialog::AboutDialog(QWidget* parent)
|
||||||
/* get libretroshare version */
|
/* get libretroshare version */
|
||||||
std::map<std::string, std::string>::iterator vit;
|
std::map<std::string, std::string>::iterator vit;
|
||||||
std::map<std::string, std::string> versions;
|
std::map<std::string, std::string> versions;
|
||||||
const RsConfig &conf = rsiface->getConfig();
|
|
||||||
bool retv = rsDisc->getDiscVersions(versions);
|
bool retv = rsDisc->getDiscVersions(versions);
|
||||||
if (retv && versions.end() != (vit = versions.find(conf.ownId)))
|
if (retv && versions.end() != (vit = versions.find(rsPeers->getOwnId())))
|
||||||
{
|
{
|
||||||
QString version = QString::fromStdString(vit->second);
|
QString version = QString::fromStdString(vit->second);
|
||||||
setWindowTitle(tr("About RetroShare %1").arg(version));
|
setWindowTitle(tr("About RetroShare %1").arg(version));
|
||||||
|
@ -140,9 +139,8 @@ void AboutDialog::updateTitle() {
|
||||||
/* get libretroshare version */
|
/* get libretroshare version */
|
||||||
std::map<std::string, std::string>::iterator vit;
|
std::map<std::string, std::string>::iterator vit;
|
||||||
std::map<std::string, std::string> versions;
|
std::map<std::string, std::string> versions;
|
||||||
const RsConfig &conf = rsiface->getConfig();
|
|
||||||
bool retv = rsDisc->getDiscVersions(versions);
|
bool retv = rsDisc->getDiscVersions(versions);
|
||||||
if (retv && versions.end() != (vit = versions.find(conf.ownId)))
|
if (retv && versions.end() != (vit = versions.find(rsPeers->getOwnId())))
|
||||||
{
|
{
|
||||||
|
|
||||||
QString version = QString::fromStdString(vit->second);
|
QString version = QString::fromStdString(vit->second);
|
||||||
|
@ -188,9 +186,8 @@ AWidget::AWidget() {
|
||||||
/* get libretroshare version */
|
/* get libretroshare version */
|
||||||
std::map<std::string, std::string>::iterator vit;
|
std::map<std::string, std::string>::iterator vit;
|
||||||
std::map<std::string, std::string> versions;
|
std::map<std::string, std::string> versions;
|
||||||
const RsConfig &conf = rsiface->getConfig();
|
|
||||||
bool retv = rsDisc->getDiscVersions(versions);
|
bool retv = rsDisc->getDiscVersions(versions);
|
||||||
if (retv && versions.end() != (vit = versions.find(conf.ownId)))
|
if (retv && versions.end() != (vit = versions.find(rsPeers->getOwnId())))
|
||||||
{
|
{
|
||||||
QString version = QString::fromStdString("RetroShare version : \n") + QString::fromStdString(vit->second);
|
QString version = QString::fromStdString("RetroShare version : \n") + QString::fromStdString(vit->second);
|
||||||
p.drawText(QRect(10, 20, width()-10, 60), version);
|
p.drawText(QRect(10, 20, width()-10, 60), version);
|
||||||
|
|
|
@ -778,7 +778,6 @@ void ConnectFriendWizard::generateCertificateCalled()
|
||||||
|
|
||||||
void ConnectFriendWizard::updatePeersList(int index)
|
void ConnectFriendWizard::updatePeersList(int index)
|
||||||
{
|
{
|
||||||
rsiface->unlockData(); /* UnLock Interface */
|
|
||||||
|
|
||||||
ui->selectedPeersTW->clearContents();
|
ui->selectedPeersTW->clearContents();
|
||||||
ui->selectedPeersTW->setRowCount(0);
|
ui->selectedPeersTW->setRowCount(0);
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
#include <retroshare/rsconfig.h>
|
#include <retroshare/rsconfig.h>
|
||||||
#include <retroshare/rspeers.h>
|
#include <retroshare/rspeers.h>
|
||||||
#include <retroshare/rsturtle.h>
|
#include <retroshare/rsturtle.h>
|
||||||
#include <retroshare/rsiface.h>
|
|
||||||
|
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
|
@ -259,31 +258,26 @@ void ServerPage::updateStatus()
|
||||||
|
|
||||||
|
|
||||||
// Now update network bits.
|
// Now update network bits.
|
||||||
//
|
RsConfigNetStatus net_status;
|
||||||
rsiface->lockData(); /* Lock Interface */
|
rsConfig->getConfigNetStatus(net_status);
|
||||||
|
|
||||||
/* now the extra bit .... switch on check boxes */
|
|
||||||
const RsConfig &config = rsiface->getConfig();
|
|
||||||
|
|
||||||
|
|
||||||
/******* Network Status Tab *******/
|
/******* Network Status Tab *******/
|
||||||
|
|
||||||
if(config.netUpnpOk)
|
if(net_status.netUpnpOk)
|
||||||
ui.iconlabel_upnp->setPixmap(QPixmap(":/images/ledon1.png"));
|
ui.iconlabel_upnp->setPixmap(QPixmap(":/images/ledon1.png"));
|
||||||
else
|
else
|
||||||
ui.iconlabel_upnp->setPixmap(QPixmap(":/images/ledoff1.png"));
|
ui.iconlabel_upnp->setPixmap(QPixmap(":/images/ledoff1.png"));
|
||||||
|
|
||||||
if (config.netLocalOk)
|
if (net_status.netLocalOk)
|
||||||
ui.iconlabel_netLimited->setPixmap(QPixmap(":/images/ledon1.png"));
|
ui.iconlabel_netLimited->setPixmap(QPixmap(":/images/ledon1.png"));
|
||||||
else
|
else
|
||||||
ui.iconlabel_netLimited->setPixmap(QPixmap(":/images/ledoff1.png"));
|
ui.iconlabel_netLimited->setPixmap(QPixmap(":/images/ledoff1.png"));
|
||||||
|
|
||||||
if (config.netExtraAddressOk)
|
if (net_status.netExtAddressOk)
|
||||||
ui.iconlabel_ext->setPixmap(QPixmap(":/images/ledon1.png"));
|
ui.iconlabel_ext->setPixmap(QPixmap(":/images/ledon1.png"));
|
||||||
else
|
else
|
||||||
ui.iconlabel_ext->setPixmap(QPixmap(":/images/ledoff1.png"));
|
ui.iconlabel_ext->setPixmap(QPixmap(":/images/ledoff1.png"));
|
||||||
|
|
||||||
rsiface->unlockData(); /* UnLock Interface */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ServerPage::toggleUPnP()
|
void ServerPage::toggleUPnP()
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
|
|
||||||
#include "retroshare/rsiface.h"
|
#include "retroshare/rsconfig.h"
|
||||||
#include "retroshare/rspeers.h"
|
#include "retroshare/rspeers.h"
|
||||||
|
|
||||||
#include "util/misc.h"
|
#include "util/misc.h"
|
||||||
|
@ -66,10 +66,10 @@ DHTStatus::DHTStatus(QWidget *parent)
|
||||||
|
|
||||||
void DHTStatus::getDHTStatus()
|
void DHTStatus::getDHTStatus()
|
||||||
{
|
{
|
||||||
rsiface->lockData(); /* Lock Interface */
|
|
||||||
|
|
||||||
/* now the extra bit .... switch on check boxes */
|
/* now the extra bit .... switch on check boxes */
|
||||||
const RsConfig &config = rsiface->getConfig();
|
RsConfigNetStatus config;
|
||||||
|
rsConfig->getConfigNetStatus(config);
|
||||||
|
|
||||||
if (!(config.DHTActive))
|
if (!(config.DHTActive))
|
||||||
{
|
{
|
||||||
|
@ -114,9 +114,6 @@ void DHTStatus::getDHTStatus()
|
||||||
dhtnetworksizeLabel->setText(QString("%1 (%2)").arg(misc::userFriendlyUnit(config.netDhtRsNetSize, 1)).arg(misc::userFriendlyUnit(config.netDhtNetSize, 1)));
|
dhtnetworksizeLabel->setText(QString("%1 (%2)").arg(misc::userFriendlyUnit(config.netDhtRsNetSize, 1)).arg(misc::userFriendlyUnit(config.netDhtNetSize, 1)));
|
||||||
dhtnetworksizeLabel->setToolTip(tr("RetroShare users in DHT (Total DHT users)") );
|
dhtnetworksizeLabel->setToolTip(tr("RetroShare users in DHT (Total DHT users)") );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -132,6 +129,4 @@ void DHTStatus::getDHTStatus()
|
||||||
dhtnetworksizeLabel->setToolTip("");
|
dhtnetworksizeLabel->setToolTip("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rsiface->unlockData(); /* UnLock Interface */
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,11 +108,8 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
Q_INIT_RESOURCE(images);
|
Q_INIT_RESOURCE(images);
|
||||||
|
|
||||||
rsiface = NULL;
|
|
||||||
|
|
||||||
NotifyQt *notify = NotifyQt::Create();
|
NotifyQt *notify = NotifyQt::Create();
|
||||||
createRsIface(*notify);
|
createRsControl(*notify);
|
||||||
createRsControl(*rsiface, *notify);
|
|
||||||
|
|
||||||
/* RetroShare Core Objects */
|
/* RetroShare Core Objects */
|
||||||
RsInit::InitRsConfig();
|
RsInit::InitRsConfig();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue