From 4eb5246b8b5ab9ff0e25c3f5c43fce357a9e9526 Mon Sep 17 00:00:00 2001 From: Marco Genise Date: Sun, 12 Nov 2006 19:17:11 +0000 Subject: [PATCH] Added performlist support. --- Makefile | 5 ++++- core/server.cpp | 8 ++++++++ gui/serverlist.cpp | 3 +++ gui/ui/networkeditdlg.ui | 11 ++++------- 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 694bd065..81821bcf 100644 --- a/Makefile +++ b/Makefile @@ -19,8 +19,11 @@ default: run_cmake: cd build && cmake .. && make +build_mono_windows: + cd build && cmake -DBUILD="mono" .. -G "MinGW Makefiles" && mingw32-make + build_windows: - cd build && cmake .. -G "MinGW Makefiles" && mingw32-make + cd build && cmake -DBUILD="core gui" .. -G "MinGW Makefiles" && mingw32-make clean: rm -rf build/* diff --git a/core/server.cpp b/core/server.cpp index eeb46934..541816b2 100644 --- a/core/server.cpp +++ b/core/server.cpp @@ -565,6 +565,14 @@ void Server::handleServer001(QString prefix, QStringList params) { emit ownNickSet(network, ownNick); emit nickAdded(network, ownNick, VarMap()); emit displayMsg(Message::server("", params[1], prefix)); + // send performlist + QStringList performList = networkSettings["Perform"].toString().split( "\n" ); + int count = performList.count(); + for ( int a = 0; a < count; a++ ) { + if ( !performList[a].isEmpty() ) { + userInput( network, "", performList[a] ); + } + } } /* RPL_ISUPPORT */ diff --git a/gui/serverlist.cpp b/gui/serverlist.cpp index 146203eb..55200e81 100644 --- a/gui/serverlist.cpp +++ b/gui/serverlist.cpp @@ -231,6 +231,8 @@ void NetworkEditDlg::updateWidgets() { //if(server["Exclude"].toBool()) item->setCheckState(Qt::Checked); ui.serverList->addItem(item); } + ui.performEdit->clear(); + ui.performEdit->setText( network["Perform"].toString() ); updateServerButtons(); } @@ -258,6 +260,7 @@ void NetworkEditDlg::accept() { /*if(ui.networkGroup->currentText() == "") network["Group"] = ""; else */ network["Group"] = ui.networkGroup->currentText(); network["AutoConnect"] = ui.enableAutoConnect->isChecked(); + network["Perform"] = ui.performEdit->toPlainText(); if(ui.identityList->currentIndex()) network["Identity"] = ui.identityList->currentText(); else network["Identity"] = "Default"; QDialog::accept(); diff --git a/gui/ui/networkeditdlg.ui b/gui/ui/networkeditdlg.ui index 178df876..e069ec16 100644 --- a/gui/ui/networkeditdlg.ui +++ b/gui/ui/networkeditdlg.ui @@ -114,7 +114,7 @@ true - 0 + 1 @@ -215,13 +215,10 @@ - false + true - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Not implemented yet</span></p></body></html> + + QTextEdit::NoWrap -- 2.20.1