|
|
@ -16,6 +16,7 @@ |
|
|
|
#include <QStyleHints> |
|
|
|
#include <QStyleHints> |
|
|
|
#include <QScreen> |
|
|
|
#include <QScreen> |
|
|
|
#include <QWindow> |
|
|
|
#include <QWindow> |
|
|
|
|
|
|
|
#include <QMessageBox> |
|
|
|
|
|
|
|
|
|
|
|
#include <assert.h> |
|
|
|
#include <assert.h> |
|
|
|
|
|
|
|
|
|
|
@ -68,6 +69,7 @@ MainWindow::MainWindow(std::shared_ptr<std::iostream> logStream_, QWidget *paren |
|
|
|
,tunconfpath() |
|
|
|
,tunconfpath() |
|
|
|
,tunnelConfigs() |
|
|
|
,tunnelConfigs() |
|
|
|
,tunnelsPageUpdateListener(this) |
|
|
|
,tunnelsPageUpdateListener(this) |
|
|
|
|
|
|
|
,preventSaveTunnelsBool(false) |
|
|
|
,saverPtr( |
|
|
|
,saverPtr( |
|
|
|
new SaverImpl(this, |
|
|
|
new SaverImpl(this, |
|
|
|
&configItems, |
|
|
|
&configItems, |
|
|
@ -778,6 +780,10 @@ void MainWindow::loadAllConfigs(SaverImpl* saverPtr){ |
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::DisableTunnelsPage() { |
|
|
|
void MainWindow::DisableTunnelsPage() { |
|
|
|
ui->tunnelsScrollAreaWidgetContents->setEnabled(false); |
|
|
|
ui->tunnelsScrollAreaWidgetContents->setEnabled(false); |
|
|
|
|
|
|
|
ui->tunnelsScrollArea->setEnabled(false); |
|
|
|
|
|
|
|
ui->addClientTunnelPushButton->setEnabled(false); |
|
|
|
|
|
|
|
ui->addServerTunnelPushButton->setEnabled(false); |
|
|
|
|
|
|
|
preventSaveTunnels(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::layoutTunnels() { |
|
|
|
void MainWindow::layoutTunnels() { |
|
|
@ -1135,3 +1141,14 @@ void MainWindow::syncLogLevel (int /*comboBoxIndex*/) { |
|
|
|
i2p::log::Logger().Reopen (); |
|
|
|
i2p::log::Logger().Reopen (); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::preventSaveTunnels() { |
|
|
|
|
|
|
|
preventSaveTunnelsBool = true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool MainWindow::isPreventSaveTunnelsMode() { |
|
|
|
|
|
|
|
return preventSaveTunnelsBool; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::showTunnelsPagePreventedMessage() { |
|
|
|
|
|
|
|
QMessageBox::critical(this,QObject::tr("Error"),QObject::tr("Not saving tunnels configuration due to previous errors with it.")); |
|
|
|
|
|
|
|
} |
|
|
|