mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-02 19:26:31 -04:00
Moved #ifdef RS_WEBUI inside RS_JSONAPI ifdefs so that the webui files cannot be requested unless jsonapi files are compiled
This commit is contained in:
parent
50529654f8
commit
9a24af87a4
8 changed files with 32 additions and 17 deletions
|
@ -23,7 +23,9 @@
|
|||
#include "HelpDialog.h"
|
||||
#include "rshare.h"
|
||||
|
||||
#ifdef RS_JSONAPI
|
||||
#include "restbed"
|
||||
#endif
|
||||
|
||||
#include <retroshare/rsiface.h>
|
||||
#include <retroshare/rsplugin.h>
|
||||
|
@ -970,13 +972,13 @@ void AboutWidget::on_copy_button_clicked()
|
|||
RsControl::instance()->getLibraries(libraries);
|
||||
verInfo+=addLibraries("libretroshare", libraries);
|
||||
|
||||
// #ifdef RS_WEBUI
|
||||
// /* Add version numbers of RetroShare */
|
||||
// // Add versions here. Find a better place.
|
||||
// libraries.clear();
|
||||
// libraries.push_back(RsLibraryInfo("RestBed", restbed::get_version()));
|
||||
// verInfo+=addLibraries("RetroShare", libraries);
|
||||
// #endif
|
||||
#ifdef RS_JSONAPI
|
||||
/* Add version numbers of RetroShare */
|
||||
// Add versions here. Find a better place.
|
||||
libraries.clear();
|
||||
libraries.push_back(RsLibraryInfo("RestBed", restbed::get_version()));
|
||||
verInfo+=addLibraries("RetroShare", libraries);
|
||||
#endif
|
||||
|
||||
/* Add version numbers of plugins */
|
||||
if (rsPlugins) {
|
||||
|
|
|
@ -606,8 +606,10 @@ void MainWindow::createTrayIcon()
|
|||
trayMenu->addAction(QIcon(IMAGE_MESSENGER), tr("Open Messenger"), this, SLOT(showMessengerWindow()));
|
||||
#endif
|
||||
trayMenu->addAction(QIcon(IMAGE_MESSAGES), tr("Open Messages"), this, SLOT(showMess()));
|
||||
#ifdef RS_JSONAPI
|
||||
#ifdef RS_WEBUI
|
||||
trayMenu->addAction(QIcon(":/images/emblem-web.png"), tr("Show web interface"), this, SLOT(showWebinterface()));
|
||||
#endif
|
||||
#endif
|
||||
trayMenu->addAction(QIcon(IMAGE_BWGRAPH), tr("Bandwidth Graph"), this, SLOT(showBandwidthGraph()));
|
||||
trayMenu->addAction(QIcon(IMAGE_STATS), tr("Statistics"), this, SLOT(showStatisticsWindow()));
|
||||
|
@ -1117,12 +1119,14 @@ void MainWindow::showStatisticsWindow()
|
|||
StatisticsWindow::showYourself();
|
||||
}
|
||||
|
||||
#ifdef RS_JSONAPI
|
||||
#ifdef RS_WEBUI
|
||||
void MainWindow::showWebinterface()
|
||||
{
|
||||
WebuiPage::showWebui();
|
||||
}
|
||||
#endif // ENABLE_WEBUI
|
||||
#endif
|
||||
|
||||
/** Shows Application window */
|
||||
#ifdef UNFINISHED
|
||||
|
|
|
@ -230,8 +230,10 @@ private slots:
|
|||
void showMessengerWindow();
|
||||
#endif
|
||||
void showStatisticsWindow();
|
||||
#ifdef RS_JSONAPI
|
||||
#ifdef RS_WEBUI
|
||||
void showWebinterface();
|
||||
#endif
|
||||
#endif
|
||||
//void servicePermission();
|
||||
|
||||
|
|
|
@ -30,8 +30,9 @@
|
|||
#include "rsharesettings.h"
|
||||
#include "gui/MainWindow.h"
|
||||
|
||||
// for this one, we'd rather use a file in retroshare/*h list.
|
||||
#include <jsonapi/jsonapi.h>
|
||||
#ifdef RS_JSONAPI
|
||||
#include <retroshare/rsjsonapi.h>
|
||||
#endif
|
||||
|
||||
#include <retroshare/rsnotify.h>
|
||||
#include <retroshare/rspeers.h>
|
||||
|
|
|
@ -574,11 +574,11 @@ feenableexcept(FE_INVALID | FE_DIVBYZERO);
|
|||
|
||||
#ifdef RS_JSONAPI
|
||||
JsonApiPage::checkStartJsonApi();
|
||||
#endif // RS_JSONAPI
|
||||
|
||||
#ifdef RS_WEBUI
|
||||
WebuiPage::checkStartWebui(); // normally we should rather save the UI flags internally to p3webui
|
||||
#endif
|
||||
#endif // RS_JSONAPI
|
||||
|
||||
// This is done using a timer, because the passphrase request from notify is asynchrouneous and therefore clearing the
|
||||
// passphrase here makes it request for a passphrase when creating the default chat identity.
|
||||
|
|
|
@ -31,10 +31,12 @@ INCLUDEPATH *= $${PWD} retroshare-gui
|
|||
!include("../../libretroshare/src/use_libretroshare.pri"):error("Including")
|
||||
|
||||
rs_webui {
|
||||
rs_jsonapi {
|
||||
HEADERS *= gui/settings/WebuiPage.h
|
||||
SOURCES *= gui/settings/WebuiPage.cpp
|
||||
FORMS *= gui/settings/WebuiPage.ui
|
||||
}
|
||||
}
|
||||
|
||||
rs_jsonapi {
|
||||
HEADERS *= gui/settings/JsonApiPage.h
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue