mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-24 23:19:29 -05:00
added web interface to tray menu
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8181 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
bb2f131464
commit
7ba6b24122
@ -108,6 +108,7 @@
|
||||
#include "gui/common/RsCollectionFile.h"
|
||||
#include "settings/rsettingswin.h"
|
||||
#include "settings/rsharesettings.h"
|
||||
#include "settings/WebuiPage.h"
|
||||
#include "common/StatusDefs.h"
|
||||
#include "gui/notifyqt.h"
|
||||
|
||||
@ -605,6 +606,7 @@ void MainWindow::createTrayIcon()
|
||||
trayMenu->addSeparator();
|
||||
//trayMenu->addAction(QIcon(IMAGE_RSM16), tr("Open Messenger"), this, SLOT(showMessengerWindow()));
|
||||
trayMenu->addAction(QIcon(IMAGE_MESSAGES), tr("Open Messages"), this, SLOT(showMess()));
|
||||
trayMenu->addAction(QIcon(":/images/emblem-web.png"), tr("Show web interface"), this, SLOT(showWebinterface()));
|
||||
trayMenu->addAction(QIcon(IMAGE_BWGRAPH), tr("Bandwidth Graph"), _bandwidthGraph, SLOT(showWindow()));
|
||||
trayMenu->addAction(QIcon(IMAGE_DHT), tr("Statistics"), this, SLOT(showStatisticsWindow()));
|
||||
|
||||
@ -1093,7 +1095,11 @@ void MainWindow::showMessengerWindow()
|
||||
void MainWindow::showStatisticsWindow()
|
||||
{
|
||||
StatisticsWindow::showYourself();
|
||||
}
|
||||
|
||||
void MainWindow::showWebinterface()
|
||||
{
|
||||
WebuiPage::showWebui();
|
||||
}
|
||||
|
||||
/** Shows Application window */
|
||||
|
@ -207,6 +207,7 @@ private slots:
|
||||
void newRsCollection();
|
||||
void showMessengerWindow();
|
||||
void showStatisticsWindow();
|
||||
void showWebinterface();
|
||||
//void servicePermission();
|
||||
|
||||
#ifdef UNFINISHED
|
||||
|
@ -109,6 +109,18 @@ QString WebuiPage::helpText() const
|
||||
}
|
||||
}
|
||||
|
||||
/*static*/ void WebuiPage::showWebui()
|
||||
{
|
||||
if(Settings->getWebinterfaceEnabled())
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl(QString("http://localhost:")+QString::number(Settings->getWebinterfacePort())));
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::warning(0, tr("Webinterface not enabled"), "The webinterface is not enabled. Enable it in Settings -> Webinterface.");
|
||||
}
|
||||
}
|
||||
|
||||
void WebuiPage::onEnableCBClicked(bool checked)
|
||||
{
|
||||
if(checked)
|
||||
|
@ -35,6 +35,9 @@ public:
|
||||
// it stops the webinterface if its running
|
||||
static void checkShutdownWebui();
|
||||
|
||||
// show webinterface in default browser (if enabled)
|
||||
static void showWebui();
|
||||
|
||||
public slots:
|
||||
void onEnableCBClicked(bool checked);
|
||||
void onApplyClicked();
|
||||
|
Loading…
Reference in New Issue
Block a user