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())
|
||||
whileBlocking(ui.password_LE)->setText(QString::fromStdString(it->second));
|
||||
else
|
||||
whileBlocking(ui.enableWebUI_CB)->setChecked(false);
|
||||
|
||||
if(rsWebUi->isRunning())
|
||||
ui.statusLabelLED->setPixmap(FilesDefs::getPixmapFromQtResourcePath(IMAGE_LEDON)) ;
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include "util/stacktrace.h"
|
||||
#include "util/argstream.h"
|
||||
#include "retroshare/rswebui.h"
|
||||
|
||||
CrashStackTrace gCrashStackTrace;
|
||||
|
||||
@ -380,7 +381,7 @@ feenableexcept(FE_INVALID | FE_DIVBYZERO);
|
||||
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);
|
||||
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.
|
||||
|
||||
#ifdef RS_JSONAPI
|
||||
JsonApiPage::checkStartJsonApi();
|
||||
// Read webui params in settings. We cannot save them to some webui.cfg because cfg needs the node id and
|
||||
// jsonapi is started before node ID selection in retroshare-service.
|
||||
|
||||
#ifdef RS_JSONAPI
|
||||
#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 // RS_JSONAPI
|
||||
|
||||
/* dive into the endless loop */
|
||||
int ti = rshare.exec();
|
||||
|
Loading…
Reference in New Issue
Block a user