diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-01-14 14:00:06 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-01-15 00:23:19 +0100 |
commit | 3567d27ac0a472c90644ea643b48f7e85c767118 (patch) | |
tree | c24281c6f1656cd98afe92439a5fa39dcaca1c06 /src/gui/textdialog.cpp | |
parent | 0abe26e7665a52440cf1ba0a5145f81f066e9ac3 (diff) | |
download | mana-3567d27ac0a472c90644ea643b48f7e85c767118.tar.gz mana-3567d27ac0a472c90644ea643b48f7e85c767118.tar.bz2 mana-3567d27ac0a472c90644ea643b48f7e85c767118.tar.xz mana-3567d27ac0a472c90644ea643b48f7e85c767118.zip |
Center the CustomServerDialog on its parent window
Also shortened the title of the Custom Server dialog to "Custom Server"
since it is also used for editing an existing custom server and not just
for adding a new one.
And used Window::center() in a bunch of places just to reduce code size.
Reviewed-by: Yohann Ferreira
Diffstat (limited to 'src/gui/textdialog.cpp')
-rw-r--r-- | src/gui/textdialog.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/textdialog.cpp b/src/gui/textdialog.cpp index f88a6afa..08dbef00 100644 --- a/src/gui/textdialog.cpp +++ b/src/gui/textdialog.cpp @@ -40,7 +40,7 @@ TextDialog::TextDialog(const std::string &title, const std::string &msg, gcn::Button *cancelButton = new Button(_("Cancel"), "CANCEL", this); // In TextField the escape key will either cause autoComplete or lose focus - mTextField = new TextField("", ! autoCompleteEnabled); + mTextField = new TextField(std::string(), ! autoCompleteEnabled); if (autoCompleteEnabled) mTextField->setAutoComplete(actorSpriteManager->getPlayerNameLister()); @@ -55,7 +55,7 @@ TextDialog::TextDialog(const std::string &title, const std::string &msg, if (getParent()) { - setLocationRelativeTo(getParent()); + center(); getParent()->moveToTop(this); } setVisible(true); |