mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
cleaning up webui/jsonapi interaction code
This commit is contained in:
parent
adf5a41a77
commit
53313670f5
@ -142,6 +142,8 @@ void WebuiPage::loadParams()
|
|||||||
|
|
||||||
if(it != smap.end())
|
if(it != smap.end())
|
||||||
whileBlocking(ui.password_LE)->setText(QString::fromStdString(it->second));
|
whileBlocking(ui.password_LE)->setText(QString::fromStdString(it->second));
|
||||||
|
else
|
||||||
|
whileBlocking(ui.enableWebUI_CB)->setChecked(false);
|
||||||
|
|
||||||
if(rsWebUi->isRunning())
|
if(rsWebUi->isRunning())
|
||||||
ui.statusLabelLED->setPixmap(FilesDefs::getPixmapFromQtResourcePath(IMAGE_LEDON)) ;
|
ui.statusLabelLED->setPixmap(FilesDefs::getPixmapFromQtResourcePath(IMAGE_LEDON)) ;
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
#include "util/stacktrace.h"
|
#include "util/stacktrace.h"
|
||||||
#include "util/argstream.h"
|
#include "util/argstream.h"
|
||||||
|
#include "retroshare/rswebui.h"
|
||||||
|
|
||||||
CrashStackTrace gCrashStackTrace;
|
CrashStackTrace gCrashStackTrace;
|
||||||
|
|
||||||
@ -380,7 +381,7 @@ feenableexcept(FE_INVALID | FE_DIVBYZERO);
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* recreate global settings object, now with correct path */
|
/* recreate global settings object, now with correct path, specific to the selected node */
|
||||||
RshareSettings::Create(true);
|
RshareSettings::Create(true);
|
||||||
Rshare::resetLanguageAndStyle();
|
Rshare::resetLanguageAndStyle();
|
||||||
|
|
||||||
@ -571,13 +572,18 @@ feenableexcept(FE_INVALID | FE_DIVBYZERO);
|
|||||||
|
|
||||||
notify->enable() ; // enable notification system after GUI creation, to avoid data races in Qt.
|
notify->enable() ; // enable notification system after GUI creation, to avoid data races in Qt.
|
||||||
|
|
||||||
#ifdef RS_JSONAPI
|
// Read webui params in settings. We cannot save them to some webui.cfg because cfg needs the node id and
|
||||||
JsonApiPage::checkStartJsonApi();
|
// jsonapi is started before node ID selection in retroshare-service.
|
||||||
|
|
||||||
|
#ifdef RS_JSONAPI
|
||||||
#ifdef RS_WEBUI
|
#ifdef RS_WEBUI
|
||||||
WebuiPage::checkStartWebui(); // normally we should rather save the UI flags internally to p3webui
|
conf.enableWebUI = Settings->getWebinterfaceEnabled();
|
||||||
|
|
||||||
|
if(!Settings->getWebinterfaceFilesDirectory().isNull())
|
||||||
|
rsWebUi->setHtmlFilesDirectory(Settings->getWebinterfaceFilesDirectory().toStdString());
|
||||||
|
#endif
|
||||||
|
RsInit::startupWebServices(conf);
|
||||||
#endif
|
#endif
|
||||||
#endif // RS_JSONAPI
|
|
||||||
|
|
||||||
/* dive into the endless loop */
|
/* dive into the endless loop */
|
||||||
int ti = rshare.exec();
|
int ti = rshare.exec();
|
||||||
|
Loading…
Reference in New Issue
Block a user