summaryrefslogtreecommitdiff
path: root/noncore/net/opieirc/ircserverlist.cpp
Side-by-side diff
Diffstat (limited to 'noncore/net/opieirc/ircserverlist.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/opieirc/ircserverlist.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/noncore/net/opieirc/ircserverlist.cpp b/noncore/net/opieirc/ircserverlist.cpp
index 62bfc17..3e78469 100644
--- a/noncore/net/opieirc/ircserverlist.cpp
+++ b/noncore/net/opieirc/ircserverlist.cpp
@@ -79,12 +79,17 @@ IRCServerList::IRCServerList(QWidget* parent, const char *name, bool modal, WFla
server.setChannels(m_config->readEntry("Channels"));
m_list->insertItem(new IRCListBoxServer(server));
}
}
}
+ connect(m_list, SIGNAL(doubleClicked(QListBoxItem*)),
+ this, SLOT(acceptOnClick(QListBoxItem *)));
+ connect(m_list, SIGNAL(returnPressed(QListBoxItem*)),
+ this, SLOT(acceptOnClick(QListBoxItem*)));
+
QPEApplication::showDialog( this );
}
void IRCServerList::addServer()
{
IRCServer server;
@@ -119,12 +124,16 @@ void IRCServerList::editServer()
server = editor.getServer();
item->setServer(server);
}
}
}
+void IRCServerList::acceptOnClick( QListBoxItem* ) {
+ accept();
+}
+
int IRCServerList::exec()
{
int returncode = QDialog::exec();
/* Now save the changes */
m_config->setGroup("OpieIRC");
m_config->writeEntry("ServerCount", QString::number(m_list->count()));