mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-13 16:39:43 -05: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
@ -24,7 +24,7 @@
|
||||
#include "HelpDialog.h"
|
||||
|
||||
#include <retroshare/rsdisc.h>
|
||||
#include <retroshare/rsiface.h>
|
||||
#include <retroshare/rspeers.h>
|
||||
#include "settings/rsharesettings.h"
|
||||
|
||||
#include <QtGui/QHBoxLayout>
|
||||
@ -53,9 +53,8 @@ AboutDialog::AboutDialog(QWidget* parent)
|
||||
/* get libretroshare version */
|
||||
std::map<std::string, std::string>::iterator vit;
|
||||
std::map<std::string, std::string> versions;
|
||||
const RsConfig &conf = rsiface->getConfig();
|
||||
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);
|
||||
setWindowTitle(tr("About RetroShare %1").arg(version));
|
||||
@ -140,9 +139,8 @@ void AboutDialog::updateTitle() {
|
||||
/* get libretroshare version */
|
||||
std::map<std::string, std::string>::iterator vit;
|
||||
std::map<std::string, std::string> versions;
|
||||
const RsConfig &conf = rsiface->getConfig();
|
||||
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);
|
||||
@ -188,9 +186,8 @@ AWidget::AWidget() {
|
||||
/* get libretroshare version */
|
||||
std::map<std::string, std::string>::iterator vit;
|
||||
std::map<std::string, std::string> versions;
|
||||
const RsConfig &conf = rsiface->getConfig();
|
||||
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);
|
||||
p.drawText(QRect(10, 20, width()-10, 60), version);
|
||||
|
@ -778,7 +778,6 @@ void ConnectFriendWizard::generateCertificateCalled()
|
||||
|
||||
void ConnectFriendWizard::updatePeersList(int index)
|
||||
{
|
||||
rsiface->unlockData(); /* UnLock Interface */
|
||||
|
||||
ui->selectedPeersTW->clearContents();
|
||||
ui->selectedPeersTW->setRowCount(0);
|
||||
|
@ -31,7 +31,6 @@
|
||||
#include <retroshare/rsconfig.h>
|
||||
#include <retroshare/rspeers.h>
|
||||
#include <retroshare/rsturtle.h>
|
||||
#include <retroshare/rsiface.h>
|
||||
|
||||
#include <QTimer>
|
||||
|
||||
@ -259,31 +258,26 @@ void ServerPage::updateStatus()
|
||||
|
||||
|
||||
// Now update network bits.
|
||||
//
|
||||
rsiface->lockData(); /* Lock Interface */
|
||||
|
||||
/* now the extra bit .... switch on check boxes */
|
||||
const RsConfig &config = rsiface->getConfig();
|
||||
|
||||
RsConfigNetStatus net_status;
|
||||
rsConfig->getConfigNetStatus(net_status);
|
||||
|
||||
/******* Network Status Tab *******/
|
||||
|
||||
if(config.netUpnpOk)
|
||||
if(net_status.netUpnpOk)
|
||||
ui.iconlabel_upnp->setPixmap(QPixmap(":/images/ledon1.png"));
|
||||
else
|
||||
ui.iconlabel_upnp->setPixmap(QPixmap(":/images/ledoff1.png"));
|
||||
|
||||
if (config.netLocalOk)
|
||||
if (net_status.netLocalOk)
|
||||
ui.iconlabel_netLimited->setPixmap(QPixmap(":/images/ledon1.png"));
|
||||
else
|
||||
ui.iconlabel_netLimited->setPixmap(QPixmap(":/images/ledoff1.png"));
|
||||
|
||||
if (config.netExtraAddressOk)
|
||||
if (net_status.netExtAddressOk)
|
||||
ui.iconlabel_ext->setPixmap(QPixmap(":/images/ledon1.png"));
|
||||
else
|
||||
ui.iconlabel_ext->setPixmap(QPixmap(":/images/ledoff1.png"));
|
||||
|
||||
rsiface->unlockData(); /* UnLock Interface */
|
||||
}
|
||||
|
||||
void ServerPage::toggleUPnP()
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <QIcon>
|
||||
#include <QPixmap>
|
||||
|
||||
#include "retroshare/rsiface.h"
|
||||
#include "retroshare/rsconfig.h"
|
||||
#include "retroshare/rspeers.h"
|
||||
|
||||
#include "util/misc.h"
|
||||
@ -66,10 +66,10 @@ DHTStatus::DHTStatus(QWidget *parent)
|
||||
|
||||
void DHTStatus::getDHTStatus()
|
||||
{
|
||||
rsiface->lockData(); /* Lock Interface */
|
||||
|
||||
/* now the extra bit .... switch on check boxes */
|
||||
const RsConfig &config = rsiface->getConfig();
|
||||
RsConfigNetStatus config;
|
||||
rsConfig->getConfigNetStatus(config);
|
||||
|
||||
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->setToolTip(tr("RetroShare users in DHT (Total DHT users)") );
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -132,6 +129,4 @@ void DHTStatus::getDHTStatus()
|
||||
dhtnetworksizeLabel->setToolTip("");
|
||||
}
|
||||
}
|
||||
rsiface->unlockData(); /* UnLock Interface */
|
||||
|
||||
}
|
||||
|
@ -108,11 +108,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
Q_INIT_RESOURCE(images);
|
||||
|
||||
rsiface = NULL;
|
||||
|
||||
NotifyQt *notify = NotifyQt::Create();
|
||||
createRsIface(*notify);
|
||||
createRsControl(*rsiface, *notify);
|
||||
createRsControl(*notify);
|
||||
|
||||
/* RetroShare Core Objects */
|
||||
RsInit::InitRsConfig();
|
||||
|
Loading…
Reference in New Issue
Block a user