Mercurial > trustbridge
diff ui/mainwindow.cpp @ 956:879a634d0a40
(issue41) Add proxy support
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Wed, 27 Aug 2014 16:31:40 +0200 |
parents | 7c89c5dc2200 |
children | 423e31ac656e |
line wrap: on
line diff
--- a/ui/mainwindow.cpp Wed Aug 27 16:31:11 2014 +0200 +++ b/ui/mainwindow.cpp Wed Aug 27 16:31:40 2014 +0200 @@ -43,6 +43,7 @@ #include "processhelp.h" #include "processwaitdialog.h" #include "trayicon.h" +#include "proxysettingsdlg.h" // The amount of time in minutes stay silent if we have // something to say @@ -528,6 +529,12 @@ QPushButton *helpButton = new QPushButton(tr("Show Help")); connect(helpButton, SIGNAL(clicked()), this, SLOT(showHelp())); helpButtonLayout->addWidget(helpButton); +#ifdef USE_CURL + QPushButton *proxySettingsButton = new QPushButton(tr("Proxy settings")); + proxySettingsButton->setIcon(QIcon(":/img/preferences-network_16.png")); + connect(proxySettingsButton, SIGNAL(clicked()), this, SLOT(showProxySettings())); + helpButtonLayout->addWidget(proxySettingsButton); +#endif helpButtonLayout->addStretch(); infoCenterLayout->addLayout(helpButtonLayout); @@ -1393,6 +1400,12 @@ } } +void MainWindow::showProxySettings() +{ + ProxySettingsDlg *dlg = new ProxySettingsDlg(this); + dlg->exec(); +} + void MainWindow::showHelp() { char *inst_dir = get_install_dir();