From f97e5ee9c22cccfb27a3634e814ad9b01edc3195 Mon Sep 17 00:00:00 2001 From: Stefan Dombrowski Date: Tue, 2 Nov 2010 10:42:39 +0100 Subject: Adding double-click to server dialog and world select dialog This resolves http://bugs.manasource.org/view.php?id=259 Reviewed-by: Thorbjorn --- src/gui/serverdialog.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/gui/serverdialog.cpp') diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp index e377042a..d1eece56 100644 --- a/src/gui/serverdialog.cpp +++ b/src/gui/serverdialog.cpp @@ -430,6 +430,16 @@ void ServerDialog::valueChanged(const gcn::SelectionEvent &) mDeleteButton->setEnabled(myServer.save); } +void ServerDialog::mouseClicked(gcn::MouseEvent &mouseEvent) +{ + if (mouseEvent.getSource() == mServersList && + isDoubleClick(mServersList->getSelected())) + { + action(gcn::ActionEvent(mConnectButton, + mConnectButton->getActionEventId())); + } +} + void ServerDialog::logic() { { -- cgit v1.2.3-70-g09d2