diff options
author | Stefan Dombrowski <stefan@uni-bonn.de> | 2010-08-25 20:38:06 +0200 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-08-25 12:59:25 -0600 |
commit | 627e1271f0ac2e7bd95a83f521ecbcf1b554ba80 (patch) | |
tree | 5071591268bdfa40add8a07b859fb1bf4d123db4 /src/gui/textdialog.cpp | |
parent | 38474d0c3c14cf595aed61ee1e4a69d48abbcf92 (diff) | |
download | mana-627e1271f0ac2e7bd95a83f521ecbcf1b554ba80.tar.gz mana-627e1271f0ac2e7bd95a83f521ecbcf1b554ba80.tar.bz2 mana-627e1271f0ac2e7bd95a83f521ecbcf1b554ba80.tar.xz mana-627e1271f0ac2e7bd95a83f521ecbcf1b554ba80.zip |
Adding autoComplete for invite
Signed-off-by: Jared Adams <jaxad0127@gmail.com>
Diffstat (limited to 'src/gui/textdialog.cpp')
-rw-r--r-- | src/gui/textdialog.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/textdialog.cpp b/src/gui/textdialog.cpp index 6faa1162..28792a0b 100644 --- a/src/gui/textdialog.cpp +++ b/src/gui/textdialog.cpp @@ -30,14 +30,18 @@ int TextDialog::instances = 0; TextDialog::TextDialog(const std::string &title, const std::string &msg, - Window *parent): - Window(title, true, parent), - mTextField(new TextField) + Window *parent, bool autoCompleteEnabled): + Window(title, true, parent) { gcn::Label *textLabel = new Label(msg); mOkButton = new Button(_("OK"), "OK", this); gcn::Button *cancelButton = new Button(_("Cancel"), "CANCEL", this); + // In TextField the escape key will either cause autoComplete or lose focus + mTextField = new TextField("", ! autoCompleteEnabled); + if (autoCompleteEnabled) + mTextField->setAutoComplete(true); + mTextField->addActionListener(this); place(0, 0, textLabel, 4); |