From 7b6ddb687ceb1faf1b100929c501ab403e3e63de Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Sun, 4 Oct 2009 13:23:47 +0200 Subject: Made sure the server information updates when dragging the server list It was only updating on click events, due to using ActionListener instead of SelectionListener. --- src/gui/serverdialog.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/gui/serverdialog.h') diff --git a/src/gui/serverdialog.h b/src/gui/serverdialog.h index 6922f7a9..432d3a99 100644 --- a/src/gui/serverdialog.h +++ b/src/gui/serverdialog.h @@ -30,6 +30,7 @@ #include #include +#include #include #include @@ -77,7 +78,9 @@ class ServersListModel : public gcn::ListModel * * \ingroup Interface */ -class ServerDialog : public Window, public gcn::ActionListener +class ServerDialog : public Window, + public gcn::ActionListener, + public gcn::SelectionListener { public: /** @@ -97,13 +100,18 @@ class ServerDialog : public Window, public gcn::ActionListener */ void action(const gcn::ActionEvent &event); + /** + * Called when the selected value changed in the servers list box. + */ + void valueChanged(const gcn::SelectionEvent &event); + private: gcn::TextField *mServerNameField; gcn::TextField *mPortField; gcn::Button *mQuitButton; gcn::Button *mConnectButton; - ListBox *mMostUsedServersDropDown; + ListBox *mMostUsedServersList; ServersListModel *mMostUsedServersListModel; ServerInfo *mServerInfo; -- cgit v1.2.3-70-g09d2