895
m_pEnableSTARTTLSCheck = new QCheckBox(__tr2qs_ctx("Switch to SSL/TLS by using the STARTTLS extension","options"),tab);
896
gl->addWidget(m_pEnableSTARTTLSCheck,iRow,0,1,2);
897
KviTalToolTip::add(m_pEnableSTARTTLSCheck,__tr2qs_ctx("<center>This check enables the use of the <b>Transport Layer Security</b> " \
898
"protocol. If you enable the Extended Capabilities below then the TLS protocol support will be detected by using " \
899
"a CAP LS command. Without Extended Capabilities the STARTTLS command will be forcibly sent at the beginning of the " \
900
"connection.</center>","options"));
901
#ifndef COMPILE_SSL_SUPPORT
902
m_pEnableSTARTTLSCheck->setEnabled(false);
904
m_pEnableSTARTTLSCheck->setChecked(s->enabledSTARTTLS());
895
909
QGroupBox * pCapGroup = new QGroupBox(__tr2qs_ctx("Extended Capabilities","options"),tab);
896
910
gl->addWidget(pCapGroup,iRow,0,1,2);
906
920
m_pEnableCAPCheck->setChecked(s->enabledCAP());
910
m_pEnableSTARTTLSCheck = new QCheckBox(__tr2qs_ctx("Switch to SSL/TLS by using the STARTTLS extension","options"),tab);
911
pCapLayout->addWidget(m_pEnableSTARTTLSCheck,1,0);
913
m_pEnableSTARTTLSCheck->setEnabled(s->enabledCAP());
914
QObject::connect(m_pEnableCAPCheck,SIGNAL(toggled(bool)),m_pEnableSTARTTLSCheck,SLOT(setEnabled(bool)));
915
KviTalToolTip::add(m_pEnableSTARTTLSCheck,__tr2qs_ctx("<center>This check enables the use of the <b>Transport Layer Security</b> " \
916
"protocol. If you enable the proper global option in the Connection/SSL tab, the TLS protocol will be used for this server if available.</center>","options"));
917
#ifndef COMPILE_SSL_SUPPORT
918
m_pEnableSTARTTLSCheck->setEnabled(false);
920
m_pEnableSTARTTLSCheck->setChecked(s->enabledCAP() && s->enabledSTARTTLS());
923
923
QGroupBox * pSASLGroup = new QGroupBox(__tr2qs_ctx("SASL Authentication","options"),tab);
924
924
pCapLayout->addWidget(pSASLGroup,2,0);
1259
1259
createLayout();
1261
m_pContextPopup = new KviTalPopupMenu(this);
1262
m_pImportPopup = new KviTalPopupMenu(this);
1261
m_pContextPopup = new QMenu(this);
1262
m_pImportPopup = new QMenu(this);
1264
1264
connect(m_pImportPopup,SIGNAL(aboutToShow()),this,SLOT(importPopupAboutToShow()));
1265
connect(m_pImportPopup,SIGNAL(activated(int)),this,SLOT(importPopupActivated(int)));
1265
connect(m_pImportPopup,SIGNAL(triggered(QAction *)),this,SLOT(importPopupActivated(QAction *)));
1267
1267
m_pServerDetailsDialog = 0;
1268
1268
m_pNetworkDetailsDialog = 0;
1371
1371
connect(m_pDetailsButton,SIGNAL(clicked()),this,SLOT(detailsClicked()));
1372
1372
KviTalToolTip::add(m_pDetailsButton,__tr2qs_ctx("<center>Click here to edit advanced options for this entry</center>","options"));
1374
m_pRecentPopup = new KviTalPopupMenu(gbox);
1374
m_pRecentPopup = new QMenu(gbox);
1375
1375
connect(m_pRecentPopup,SIGNAL(aboutToShow()),this,SLOT(recentServersPopupAboutToShow()));
1376
connect(m_pRecentPopup,SIGNAL(activated(int)),this,SLOT(recentServersPopupClicked(int)));
1376
connect(m_pRecentPopup,SIGNAL(triggered(QAction *)),this,SLOT(recentServersPopupClicked(QAction *)));
1378
1378
QToolButton * tb = new QToolButton(gbox);
1379
1379
tb->setIcon(QIcon(*(g_pIconManager->getSmallIcon(KviIconManager::Time))));
1799
1799
void OptionsWidget_servers::customContextMenuRequested(const QPoint &pnt)
1802
1801
QTreeWidgetItem *it=(QTreeWidgetItem *) m_pTreeWidget->itemAt(pnt);
1803
1802
bool bServer = (it && ((IrcServerOptionsTreeWidgetItem *)it)->m_pServerData);
1804
1803
m_pContextPopup->clear();
1805
m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KviIconManager::World)),__tr2qs_ctx("New Network","options"),this,SLOT(newNetwork()));
1806
id = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KviIconManager::Cut)),__tr2qs_ctx("Remove Network","options"),this,SLOT(removeCurrent()));
1807
m_pContextPopup->setItemEnabled(id,!bServer);
1808
m_pContextPopup->insertSeparator();
1809
id = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KviIconManager::Server)),__tr2qs_ctx("&New Server","options"),this,SLOT(newServer()));
1810
id = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KviIconManager::Cut)),__tr2qs_ctx("Re&move Server","options"),this,SLOT(removeCurrent()));
1811
m_pContextPopup->setItemEnabled(id,bServer);
1812
id = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KviIconManager::Copy)),__tr2qs_ctx("&Copy Server","options"),this,SLOT(copyServer()));
1813
m_pContextPopup->setItemEnabled(id,bServer);
1814
id = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KviIconManager::Paste)),__tr2qs_ctx("&Paste Server","options"),this,SLOT(pasteServer()));
1815
m_pContextPopup->setItemEnabled(id,m_pClipboard);
1804
m_pContextPopup->addAction(*(g_pIconManager->getSmallIcon(KviIconManager::World)),__tr2qs_ctx("New Network","options"),this,SLOT(newNetwork()));
1805
m_pContextPopup->addAction(*(g_pIconManager->getSmallIcon(KviIconManager::Cut)),__tr2qs_ctx("Remove Network","options"),this,SLOT(removeCurrent()))
1806
->setEnabled(!bServer);
1807
m_pContextPopup->addSeparator();
1808
m_pContextPopup->addAction(*(g_pIconManager->getSmallIcon(KviIconManager::Server)),__tr2qs_ctx("&New Server","options"),this,SLOT(newServer()));
1809
m_pContextPopup->addAction(*(g_pIconManager->getSmallIcon(KviIconManager::Cut)),__tr2qs_ctx("Re&move Server","options"),this,SLOT(removeCurrent()))
1810
->setEnabled(bServer);
1811
m_pContextPopup->addAction(*(g_pIconManager->getSmallIcon(KviIconManager::Copy)),__tr2qs_ctx("&Copy Server","options"),this,SLOT(copyServer()));
1812
m_pContextPopup->setEnabled(bServer);
1813
m_pContextPopup->addAction(*(g_pIconManager->getSmallIcon(KviIconManager::Paste)),__tr2qs_ctx("&Paste Server","options"),this,SLOT(pasteServer()))
1814
->setEnabled(m_pClipboard);
1817
m_pContextPopup->insertSeparator();
1818
// m_pContextPopup->insertItem(__c2q(__tr("Merge list from server.ini","options")),this,SLOT(importFromIni()));
1819
m_pContextPopup->insertItem(__tr2qs_ctx("Clear List","options"),this,SLOT(clearList()));
1820
m_pContextPopup->insertSeparator();
1821
m_pContextPopup->insertItem(__tr2qs_ctx("Import List","options"),m_pImportPopup);
1816
m_pContextPopup->addSeparator();
1817
// m_pContextPopup->addAction(__c2q(__tr("Merge list from server.ini","options")),this,SLOT(importFromIni()));
1818
m_pContextPopup->addAction(__tr2qs_ctx("Clear List","options"),this,SLOT(clearList()));
1819
m_pContextPopup->addSeparator();
1820
m_pContextPopup->addAction(__tr2qs_ctx("Import List","options"))->setMenu(m_pImportPopup);
1822
1821
m_pContextPopup->popup(QCursor::pos());
1836
1835
for(KviModuleExtensionDescriptor * d = l->first();d;d = l->next())
1839
id = m_pImportPopup->insertItem(*(d->icon()),d->visibleName());
1838
pAction = m_pImportPopup->addAction(*(d->icon()),d->visibleName());
1841
id = m_pImportPopup->insertItem(d->visibleName());
1842
m_pImportPopup->setItemParameter(id,d->id());
1840
pAction = m_pImportPopup->addAction(d->visibleName());
1841
pAction->setData(d->id());
1846
void OptionsWidget_servers::importPopupActivated(int id)
1845
void OptionsWidget_servers::importPopupActivated(QAction *pAction)
1848
1847
// ensure that we have all the modules : they could have been unloaded while the popup was displayed
1849
1848
g_pModuleManager->loadModulesByCaps("serverimport");