mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-27 16:35:21 -04:00
added logic to stop/start FriendServer from GUI
This commit is contained in:
parent
19e42663a0
commit
d948086b5e
7 changed files with 105 additions and 17 deletions
|
@ -31,8 +31,6 @@
|
|||
|
||||
#include <iostream>
|
||||
|
||||
RsFriendServer *rsFriendServer = new RsFriendServer;
|
||||
|
||||
#define ICON_STATUS_UNKNOWN ":/images/ledoff1.png"
|
||||
#define ICON_STATUS_OK ":/images/ledon1.png"
|
||||
|
||||
|
@ -44,6 +42,7 @@ FriendServerControl::FriendServerControl(QWidget *parent)
|
|||
|
||||
mConnectionCheckTimer = new QTimer;
|
||||
|
||||
QObject::connect(friendServerOnOff_CB,SIGNAL(toggled(bool)),this,SLOT(onOnOffClick(bool)));
|
||||
QObject::connect(mConnectionCheckTimer,SIGNAL(timeout()),this,SLOT(checkServerAddress()));
|
||||
QObject::connect(torServerAddress_LE,SIGNAL(textChanged(const QString&)),this,SLOT(onOnionAddressEdit(const QString&)));
|
||||
|
||||
|
@ -62,9 +61,9 @@ FriendServerControl::~FriendServerControl()
|
|||
void FriendServerControl::onOnOffClick(bool b)
|
||||
{
|
||||
if(b)
|
||||
rsFriendServer->start();
|
||||
rsFriendServer->startServer();
|
||||
else
|
||||
rsFriendServer->stop();
|
||||
rsFriendServer->stopServer();
|
||||
}
|
||||
|
||||
void FriendServerControl::onOnionAddressEdit(const QString&)
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="torServerOnOff_CB">
|
||||
<widget class="QCheckBox" name="friendServerOnOff_CB">
|
||||
<property name="text">
|
||||
<string>On/Off</string>
|
||||
</property>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue