diff options
author | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2009-10-04 13:23:47 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2009-10-04 13:23:47 +0200 |
commit | 7b6ddb687ceb1faf1b100929c501ab403e3e63de (patch) | |
tree | 82ea5890bb700799540bdb39f1ae066a6431f3b6 /src/gui/serverdialog.h | |
parent | 69217e82e8631bbb2183a1322d0985a495c52f5e (diff) | |
download | mana-client-7b6ddb687ceb1faf1b100929c501ab403e3e63de.tar.gz mana-client-7b6ddb687ceb1faf1b100929c501ab403e3e63de.tar.bz2 mana-client-7b6ddb687ceb1faf1b100929c501ab403e3e63de.tar.xz mana-client-7b6ddb687ceb1faf1b100929c501ab403e3e63de.zip |
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.
Diffstat (limited to 'src/gui/serverdialog.h')
-rw-r--r-- | src/gui/serverdialog.h | 12 |
1 files changed, 10 insertions, 2 deletions
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 <guichan/actionlistener.hpp> #include <guichan/listmodel.hpp> +#include <guichan/selectionlistener.hpp> #include <string> #include <vector> @@ -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; |