summaryrefslogtreecommitdiff
path: root/client/Dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'client/Dialog.cpp')
-rw-r--r--client/Dialog.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/client/Dialog.cpp b/client/Dialog.cpp
index b08213a..ab3f66e 100644
--- a/client/Dialog.cpp
+++ b/client/Dialog.cpp
@@ -22,6 +22,8 @@ ProxyDialog::ProxyDialog(QWidget *parent): QDialog(parent)
return;
}
+ connect(this, SIGNAL(finished(int)), this, SLOT(Closed(int)));
+
/* generic proxy panel */
topLabel = new QLabel(QString::fromLocal8Bit(cfg->TopPanelText.c_str()));
topLabel->setObjectName("topLabel");
@@ -111,6 +113,19 @@ ProxyDialog::ProxyDialog(QWidget *parent): QDialog(parent)
setLayout(mainLayout);
}
+void ProxyDialog::Closed(int i)
+{
+ Logger::Trace("Dialog closed\n");
+ Proxifier *proxifier = Proxifier::GetInstance();
+ if (!proxifier->IsValid())
+ {
+ Logger::Fatal("No valid proxifier configuration file found!\n");
+ }
+ if (!proxifier->Restart())
+ {
+ Logger::Error("Unable to restart Proxifier process!\n");
+ }
+}
void ProxyDialog::ProxyToggled(bool on)
{