diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-05-05 18:29:07 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-05-05 18:29:07 +0300 |
commit | 71fd4e8d3255e15c16a4f4b51c87222c661a5b33 (patch) | |
tree | 3942aec29f33b5ea2aa2e353451e10648f1bbb82 /src/gui/windows | |
parent | 45460ca58b3cbf6d92fe3cac1311bbfc9d00e841 (diff) | |
download | manaplus-71fd4e8d3255e15c16a4f4b51c87222c661a5b33.tar.gz manaplus-71fd4e8d3255e15c16a4f4b51c87222c661a5b33.tar.bz2 manaplus-71fd4e8d3255e15c16a4f4b51c87222c661a5b33.tar.xz manaplus-71fd4e8d3255e15c16a4f4b51c87222c661a5b33.zip |
Add strong typed bool type for modal bool flag.
Diffstat (limited to 'src/gui/windows')
53 files changed, 115 insertions, 73 deletions
diff --git a/src/gui/windows/bankwindow.cpp b/src/gui/windows/bankwindow.cpp index 876cf8836..09dbb7622 100644 --- a/src/gui/windows/bankwindow.cpp +++ b/src/gui/windows/bankwindow.cpp @@ -40,7 +40,7 @@ BankWindow *bankWindow = nullptr; BankWindow::BankWindow() : // TRANSLATORS: bank window name - Window(_("Bank"), false, nullptr, "bank.xml"), + Window(_("Bank"), Modal_false, nullptr, "bank.xml"), ActionListener(), BankListener(), // TRANSLATORS: bank window money label diff --git a/src/gui/windows/botcheckerwindow.cpp b/src/gui/windows/botcheckerwindow.cpp index e79a852cb..e49bd65b1 100644 --- a/src/gui/windows/botcheckerwindow.cpp +++ b/src/gui/windows/botcheckerwindow.cpp @@ -41,7 +41,7 @@ BotCheckerWindow *botCheckerWindow = nullptr; BotCheckerWindow::BotCheckerWindow() : // TRANSLATORS: bot checker window header - Window(_("Bot Checker"), false, nullptr, "botchecker.xml"), + Window(_("Bot Checker"), Modal_false, nullptr, "botchecker.xml"), ActionListener(), mTableModel(new UsersTableModel(this)), mTable(new GuiTable(this, mTableModel)), diff --git a/src/gui/windows/buydialog.cpp b/src/gui/windows/buydialog.cpp index 540baffa8..cb10adaf6 100644 --- a/src/gui/windows/buydialog.cpp +++ b/src/gui/windows/buydialog.cpp @@ -172,7 +172,7 @@ BuyDialog::DialogList BuyDialog::instances; BuyDialog::BuyDialog() : // TRANSLATORS: buy dialog name - Window(_("Create items"), false, nullptr, "buy.xml"), + Window(_("Create items"), Modal_false, nullptr, "buy.xml"), ActionListener(), SelectionListener(), mSortModel(nullptr), @@ -190,7 +190,7 @@ BuyDialog::BuyDialog() : BuyDialog::BuyDialog(const int npcId) : // TRANSLATORS: buy dialog name - Window(_("Buy"), false, nullptr, "buy.xml"), + Window(_("Buy"), Modal_false, nullptr, "buy.xml"), ActionListener(), SelectionListener(), mSortModel(nullptr), @@ -208,7 +208,7 @@ BuyDialog::BuyDialog(const int npcId) : BuyDialog::BuyDialog(std::string nick) : // TRANSLATORS: buy dialog name - Window(_("Buy"), false, nullptr, "buy.xml"), + Window(_("Buy"), Modal_false, nullptr, "buy.xml"), ActionListener(), SelectionListener(), mSortModel(new SortListModelBuy), diff --git a/src/gui/windows/buyselldialog.cpp b/src/gui/windows/buyselldialog.cpp index cead0d983..ea90f756a 100644 --- a/src/gui/windows/buyselldialog.cpp +++ b/src/gui/windows/buyselldialog.cpp @@ -37,7 +37,7 @@ BuySellDialog::DialogList BuySellDialog::dialogInstances; BuySellDialog::BuySellDialog(const int npcId) : // TRANSLATORS: shop window name - Window(_("Shop"), false, nullptr, "buysell.xml"), + Window(_("Shop"), Modal_false, nullptr, "buysell.xml"), ActionListener(), mNpcId(npcId), mNick(""), @@ -48,7 +48,7 @@ BuySellDialog::BuySellDialog(const int npcId) : BuySellDialog::BuySellDialog(const std::string &nick) : // TRANSLATORS: shop window name - Window(_("Shop"), false, nullptr, "buysell.xml"), + Window(_("Shop"), Modal_false, nullptr, "buysell.xml"), ActionListener(), mNpcId(-1), mNick(nick), diff --git a/src/gui/windows/changeemaildialog.cpp b/src/gui/windows/changeemaildialog.cpp index 80ffea7ae..953f8e75c 100644 --- a/src/gui/windows/changeemaildialog.cpp +++ b/src/gui/windows/changeemaildialog.cpp @@ -44,7 +44,7 @@ ChangeEmailDialog::ChangeEmailDialog(LoginData *const data) : // TRANSLATORS: change email dialog header - Window(_("Change Email Address"), true, nullptr, "changeemail.xml"), + Window(_("Change Email Address"), Modal_true, nullptr, "changeemail.xml"), ActionListener(), mFirstEmailField(new TextField(this)), mSecondEmailField(new TextField(this)), @@ -166,7 +166,10 @@ void ChangeEmailDialog::action(const ActionEvent &event) // TRANSLATORS: ok dialog button _("OK"), DialogType::ERROR, - true, true, nullptr, 260); + Modal_true, + true, + nullptr, + 260); dlg->addActionListener(mWrongDataNoticeListener); } else diff --git a/src/gui/windows/changepassworddialog.cpp b/src/gui/windows/changepassworddialog.cpp index 9fe950211..24f8055f6 100644 --- a/src/gui/windows/changepassworddialog.cpp +++ b/src/gui/windows/changepassworddialog.cpp @@ -45,7 +45,7 @@ ChangePasswordDialog::ChangePasswordDialog(LoginData *const data) : // TRANSLATORS: change password window name - Window(_("Change Password"), true, nullptr, "changepassword.xml"), + Window(_("Change Password"), Modal_true, nullptr, "changepassword.xml"), ActionListener(), mOldPassField(new PasswordField(this)), mFirstPassField(new PasswordField(this)), @@ -156,7 +156,10 @@ void ChangePasswordDialog::action(const ActionEvent &event) // TRANSLATORS: ok dialog button _("OK"), DialogType::ERROR, - true, true, nullptr, 260); + Modal_true, + true, + nullptr, + 260); dlg->addActionListener(mWrongDataNoticeListener); } else diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp index cb2caed4b..065e6db15 100644 --- a/src/gui/windows/charcreatedialog.cpp +++ b/src/gui/windows/charcreatedialog.cpp @@ -73,7 +73,7 @@ static const uint8_t directions[] = CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent, const int slot) : // TRANSLATORS: char create dialog name - Window(_("New Character"), true, parent, "charcreate.xml"), + Window(_("New Character"), Modal_true, parent, "charcreate.xml"), ActionListener(), KeyListener(), mCharSelectDialog(parent), @@ -379,7 +379,10 @@ void CharCreateDialog::action(const ActionEvent &event) // TRANSLATORS: ok dialog button _("OK"), DialogType::ERROR, - true, this, nullptr, 260); + Modal_true, + this, + nullptr, + 260); } } else if (id == "cancel") diff --git a/src/gui/windows/chardeleteconfirm.h b/src/gui/windows/chardeleteconfirm.h index 326f39261..822b8b4aa 100644 --- a/src/gui/windows/chardeleteconfirm.h +++ b/src/gui/windows/chardeleteconfirm.h @@ -41,7 +41,7 @@ class CharDeleteConfirm final : public ConfirmDialog ConfirmDialog(_("Confirm Character Delete"), // TRANSLATORS: char deletion message _("Are you sure you want to delete this character?"), - SOUND_REQUEST, false, false, m), + SOUND_REQUEST, false, Modal_false, m), mMaster(m), mIndex(index) { diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp index 9f51e3583..6d3c75e87 100644 --- a/src/gui/windows/charselectdialog.cpp +++ b/src/gui/windows/charselectdialog.cpp @@ -65,7 +65,9 @@ CharSelectDialog::CharSelectDialog(LoginData *const data) : // TRANSLATORS: char select dialog name Window(strprintf(_("Account %s (last login time %s)"), data->username.c_str(), data->lastLogin.c_str()), - false, nullptr, "char.xml"), + Modal_false, + nullptr, + "char.xml"), ActionListener(), KeyListener(), mLoginData(data), @@ -277,7 +279,10 @@ void CharSelectDialog::action(const ActionEvent &event) // TRANSLATORS: ok dialog button _("OK"), DialogType::SILENCE, - true, true, nullptr, 260); + Modal_true, + true, + nullptr, + 260); } } if (eventId == "switch") @@ -319,7 +324,10 @@ void CharSelectDialog::action(const ActionEvent &event) // TRANSLATORS: ok dialog button _("OK"), DialogType::ERROR, - true, true, nullptr, 260); + Modal_true, + true, + nullptr, + 260); } } mDeleteIndex = -1; diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp index 5db4b9bfd..4d822afc1 100644 --- a/src/gui/windows/chatwindow.cpp +++ b/src/gui/windows/chatwindow.cpp @@ -83,7 +83,7 @@ static const char *const ACTION_COLOR_PICKER = "color picker"; ChatWindow::ChatWindow() : // TRANSLATORS: chat window name - Window(_("Chat"), false, nullptr, "chat.xml"), + Window(_("Chat"), Modal_false, nullptr, "chat.xml"), ActionListener(), KeyListener(), AttributeListener(), diff --git a/src/gui/windows/confirmdialog.cpp b/src/gui/windows/confirmdialog.cpp index 5cce160c7..83a5a669c 100644 --- a/src/gui/windows/confirmdialog.cpp +++ b/src/gui/windows/confirmdialog.cpp @@ -37,7 +37,8 @@ ConfirmDialog::ConfirmDialog(const std::string &restrict title, const std::string &restrict msg, const std::string &restrict soundEvent, const bool ignore, - const bool modal, Window *const parent) : + const Modal modal, + Window *const parent) : Window(title, modal, parent, "confirm.xml"), ActionListener(), mTextBox(new TextBox(this)), diff --git a/src/gui/windows/confirmdialog.h b/src/gui/windows/confirmdialog.h index ea86b2d60..2b3951dad 100644 --- a/src/gui/windows/confirmdialog.h +++ b/src/gui/windows/confirmdialog.h @@ -50,7 +50,8 @@ class ConfirmDialog notfinal : public Window, ConfirmDialog(const std::string &restrict title, const std::string &restrict msg, const std::string &restrict soundEvent = SOUND_REQUEST, - const bool ignore = false, const bool modal = false, + const bool ignore = false, + const Modal modal = Modal_false, Window *const parent = nullptr); A_DELETE_COPY(ConfirmDialog) diff --git a/src/gui/windows/connectiondialog.cpp b/src/gui/windows/connectiondialog.cpp index 07d80eb8f..769b47d2f 100644 --- a/src/gui/windows/connectiondialog.cpp +++ b/src/gui/windows/connectiondialog.cpp @@ -37,7 +37,7 @@ extern bool mStatsReUpdated; ConnectionDialog::ConnectionDialog(const std::string &text, const State cancelState) : - Window("", false, nullptr, "connection.xml"), + Window("", Modal_false, nullptr, "connection.xml"), ActionListener(), mCancelState(cancelState) { diff --git a/src/gui/windows/debugwindow.cpp b/src/gui/windows/debugwindow.cpp index 4df425f26..c0081ea37 100644 --- a/src/gui/windows/debugwindow.cpp +++ b/src/gui/windows/debugwindow.cpp @@ -39,7 +39,7 @@ DebugWindow *debugWindow = nullptr; DebugWindow::DebugWindow() : // TRANSLATORS: debug window name - Window(_("Debug"), false, nullptr, "debug.xml"), + Window(_("Debug"), Modal_false, nullptr, "debug.xml"), mTabs(new TabbedArea(this)), mMapWidget(new MapDebugTab(this)), mTargetWidget(new TargetDebugTab(this)), diff --git a/src/gui/windows/didyouknowwindow.cpp b/src/gui/windows/didyouknowwindow.cpp index 4eca32380..cc7acf09b 100644 --- a/src/gui/windows/didyouknowwindow.cpp +++ b/src/gui/windows/didyouknowwindow.cpp @@ -50,7 +50,7 @@ static const int maxTip = 18; DidYouKnowWindow::DidYouKnowWindow() : // TRANSLATORS: did you know window name - Window(_("Did You Know?"), false, nullptr, "didyouknow.xml"), + Window(_("Did You Know?"), Modal_false, nullptr, "didyouknow.xml"), ActionListener(), mBrowserBox(new BrowserBox(this, BrowserBox::AUTO_SIZE, true, "browserbox.xml")), diff --git a/src/gui/windows/editdialog.cpp b/src/gui/windows/editdialog.cpp index 86a3d89f0..f69876cf7 100644 --- a/src/gui/windows/editdialog.cpp +++ b/src/gui/windows/editdialog.cpp @@ -33,7 +33,7 @@ EditDialog::EditDialog(const std::string &restrict title, const std::string &restrict eventOk, const int width, Window *const parent, - const bool modal) : + const Modal modal) : Window(title, modal, parent, "edit.xml"), ActionListener(), mEventOk(eventOk), diff --git a/src/gui/windows/editdialog.h b/src/gui/windows/editdialog.h index 640961bf4..ef77fcdcd 100644 --- a/src/gui/windows/editdialog.h +++ b/src/gui/windows/editdialog.h @@ -50,7 +50,7 @@ class EditDialog final : public Window, const std::string &restrict msg, const std::string &restrict eventOk = ACTION_EDIT_OK, const int width = 300, Window *const parent = nullptr, - const bool modal = true); + const Modal modal = Modal_true); A_DELETE_COPY(EditDialog) diff --git a/src/gui/windows/editserverdialog.cpp b/src/gui/windows/editserverdialog.cpp index 9de90ed91..5ad5c9c32 100644 --- a/src/gui/windows/editserverdialog.cpp +++ b/src/gui/windows/editserverdialog.cpp @@ -45,7 +45,7 @@ EditServerDialog::EditServerDialog(ServerDialog *const parent, ServerInfo server, const int index) : // TRANSLATORS: edit server dialog name - Window(_("Edit Server"), true, parent), + Window(_("Edit Server"), Modal_true, parent), ActionListener(), KeyListener(), mServerAddressField(new TextField(this, std::string())), @@ -216,7 +216,10 @@ void EditServerDialog::action(const ActionEvent &event) // TRANSLATORS: ok dialog button _("OK"), DialogType::ERROR, - true, true, nullptr, 260); + Modal_true, + true, + nullptr, + 260); dlg->addActionListener(this); } else diff --git a/src/gui/windows/emotewindow.cpp b/src/gui/windows/emotewindow.cpp index 5eada4176..4a5b69088 100644 --- a/src/gui/windows/emotewindow.cpp +++ b/src/gui/windows/emotewindow.cpp @@ -51,7 +51,7 @@ static const char *const fontSizeList[] = EmoteWindow::EmoteWindow() : // TRANSLATORS: emotes window name - Window(_("Emotes"), false, nullptr, "emotes.xml"), + Window(_("Emotes"), Modal_false, nullptr, "emotes.xml"), mTabs(new TabbedArea(this)), mEmotePage(new EmotePage(this)), mColorModel(ColorModel::createDefault(this)), diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp index 4d587a2e8..cc2d34991 100644 --- a/src/gui/windows/equipmentwindow.cpp +++ b/src/gui/windows/equipmentwindow.cpp @@ -64,7 +64,7 @@ EquipmentWindow::EquipmentWindow(Equipment *const equipment, Being *const being, const bool foring) : // TRANSLATORS: equipment window name - Window(_("Equipment"), false, nullptr, "equipment.xml"), + Window(_("Equipment"), Modal_false, nullptr, "equipment.xml"), ActionListener(), mEquipment(equipment), mPlayerBox(new PlayerBox(this, diff --git a/src/gui/windows/helpwindow.cpp b/src/gui/windows/helpwindow.cpp index 8a60fde30..2a5c7b943 100644 --- a/src/gui/windows/helpwindow.cpp +++ b/src/gui/windows/helpwindow.cpp @@ -50,7 +50,7 @@ HelpWindow *helpWindow = nullptr; HelpWindow::HelpWindow() : // TRANSLATORS: help window name - Window(_("Help"), false, nullptr, "help.xml"), + Window(_("Help"), Modal_false, nullptr, "help.xml"), ActionListener(), // TRANSLATORS: help window. button. mDYKButton(new Button(this, _("Did you know..."), "DYK", this)), diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp index 3ef2dec5e..da8f99c62 100644 --- a/src/gui/windows/inventorywindow.cpp +++ b/src/gui/windows/inventorywindow.cpp @@ -74,7 +74,7 @@ InventoryWindow *cartWindow = nullptr; InventoryWindow::WindowList InventoryWindow::invInstances; InventoryWindow::InventoryWindow(Inventory *const inventory) : - Window("Inventory", false, nullptr, "inventory.xml"), + Window("Inventory", Modal_false, nullptr, "inventory.xml"), ActionListener(), KeyListener(), SelectionListener(), diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp index 2933c57a1..2c6280ca7 100644 --- a/src/gui/windows/itemamountwindow.cpp +++ b/src/gui/windows/itemamountwindow.cpp @@ -107,7 +107,7 @@ void ItemAmountWindow::finish(const Item *const item, ItemAmountWindow::ItemAmountWindow(const Usage usage, Window *const parent, Item *const item, const int maxRange) : - Window("", false, parent, "amount.xml"), + Window("", Modal_false, parent, "amount.xml"), ActionListener(), KeyListener(), mItemAmountTextField(new IntTextField(this, 1)), diff --git a/src/gui/windows/killstats.cpp b/src/gui/windows/killstats.cpp index b332b961e..efb0ea0df 100644 --- a/src/gui/windows/killstats.cpp +++ b/src/gui/windows/killstats.cpp @@ -48,7 +48,7 @@ KillStats *killStats = nullptr; KillStats::KillStats() : // TRANSLATORS: kill stats window name - Window(_("Kill stats"), false, nullptr, "killstats.xml"), + Window(_("Kill stats"), Modal_false, nullptr, "killstats.xml"), ActionListener(), AttributeListener(), mKillTimer(0), diff --git a/src/gui/windows/logindialog.cpp b/src/gui/windows/logindialog.cpp index 4c59ab34d..a97a2284e 100644 --- a/src/gui/windows/logindialog.cpp +++ b/src/gui/windows/logindialog.cpp @@ -61,7 +61,7 @@ LoginDialog::LoginDialog(LoginData *const data, std::string serverName, std::string *const updateHost) : // TRANSLATORS: login dialog name - Window(_("Login"), false, nullptr, "login.xml"), + Window(_("Login"), Modal_false, nullptr, "login.xml"), ActionListener(), KeyListener(), mLoginData(data), @@ -226,7 +226,7 @@ void LoginDialog::action(const ActionEvent &event) urlListener.url = url; // TRANSLATORS: question dialog ConfirmDialog *const confirmDlg = new ConfirmDialog( - _("Open register url"), url, SOUND_REQUEST, false, true); + _("Open register url"), url, SOUND_REQUEST, false, Modal_true); confirmDlg->postInit(); confirmDlg->addActionListener(&urlListener); } diff --git a/src/gui/windows/maileditwindow.cpp b/src/gui/windows/maileditwindow.cpp index c3447fe9c..f7ea62b22 100644 --- a/src/gui/windows/maileditwindow.cpp +++ b/src/gui/windows/maileditwindow.cpp @@ -44,7 +44,7 @@ MailEditWindow *mailEditWindow = nullptr; MailEditWindow::MailEditWindow() : // TRANSLATORS: mail edit window name - Window(_("Edit mail"), false, nullptr, "mailedit.xml"), + Window(_("Edit mail"), Modal_false, nullptr, "mailedit.xml"), ActionListener(), // TRANSLATORS: mail edit window button mSendButton(new Button(this, _("Send"), "send", this)), diff --git a/src/gui/windows/mailviewwindow.cpp b/src/gui/windows/mailviewwindow.cpp index ba41a069c..1fc38c2a9 100644 --- a/src/gui/windows/mailviewwindow.cpp +++ b/src/gui/windows/mailviewwindow.cpp @@ -49,7 +49,7 @@ MailViewWindow *mailViewWindow = nullptr; MailViewWindow::MailViewWindow(const MailMessage *const message) : // TRANSLATORS: mail view window name - Window(_("View mail"), false, nullptr, "mailview.xml"), + Window(_("View mail"), Modal_false, nullptr, "mailview.xml"), ActionListener(), mMessage(message), // TRANSLATORS: mail view window button diff --git a/src/gui/windows/mailwindow.cpp b/src/gui/windows/mailwindow.cpp index 3fd61f2a3..18d0626d1 100644 --- a/src/gui/windows/mailwindow.cpp +++ b/src/gui/windows/mailwindow.cpp @@ -48,7 +48,7 @@ MailWindow *mailWindow = nullptr; MailWindow::MailWindow() : // TRANSLATORS: mail window name - Window(_("Mail"), false, nullptr, "mail.xml"), + Window(_("Mail"), Modal_false, nullptr, "mail.xml"), ActionListener(), mMessages(), mMessagesMap(), diff --git a/src/gui/windows/minimap.cpp b/src/gui/windows/minimap.cpp index 64c69b1e1..bdf9c37be 100644 --- a/src/gui/windows/minimap.cpp +++ b/src/gui/windows/minimap.cpp @@ -55,7 +55,7 @@ bool Minimap::mShow = true; Minimap::Minimap() : // TRANSLATORS: mini map window name - Window(_("Map"), false, nullptr, "map.xml"), + Window(_("Map"), Modal_false, nullptr, "map.xml"), mWidthProportion(0.5), mHeightProportion(0.5), mMapImage(nullptr), diff --git a/src/gui/windows/ministatuswindow.cpp b/src/gui/windows/ministatuswindow.cpp index ec2cf05b2..27dfc3d75 100644 --- a/src/gui/windows/ministatuswindow.cpp +++ b/src/gui/windows/ministatuswindow.cpp @@ -57,7 +57,7 @@ extern volatile int tick_time; typedef std::vector <ProgressBar*>::const_iterator ProgressBarVectorCIter; MiniStatusWindow::MiniStatusWindow() : - Window("MiniStatus", false, nullptr, "ministatus.xml"), + Window("MiniStatus", Modal_false, nullptr, "ministatus.xml"), InventoryListener(), AttributeListener(), StatListener(), diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp index 6207a9bd7..04d66114a 100644 --- a/src/gui/windows/npcdialog.cpp +++ b/src/gui/windows/npcdialog.cpp @@ -83,7 +83,7 @@ typedef std::vector<Image *>::iterator ImageVectorIter; NpcDialog::NpcDialog(const int npcId) : // TRANSLATORS: npc dialog name - Window(_("NPC"), false, nullptr, "npc.xml"), + Window(_("NPC"), Modal_false, nullptr, "npc.xml"), ActionListener(), mNpcId(npcId), mDefaultInt(0), diff --git a/src/gui/windows/npcpostdialog.cpp b/src/gui/windows/npcpostdialog.cpp index 203a5a601..5f0606bd8 100644 --- a/src/gui/windows/npcpostdialog.cpp +++ b/src/gui/windows/npcpostdialog.cpp @@ -40,7 +40,7 @@ NpcPostDialog::DialogList NpcPostDialog::instances; NpcPostDialog::NpcPostDialog(const int npcId A_UNUSED) : // TRANSLATORS: npc post dialog caption - Window(_("NPC"), false, nullptr, "npcpost.xml"), + Window(_("NPC"), Modal_false, nullptr, "npcpost.xml"), ActionListener(), mText(new TextBox(this)), mSender(new TextField(this)) diff --git a/src/gui/windows/npcselldialog.cpp b/src/gui/windows/npcselldialog.cpp index 24a3a442a..881e15254 100644 --- a/src/gui/windows/npcselldialog.cpp +++ b/src/gui/windows/npcselldialog.cpp @@ -67,7 +67,10 @@ void NpcSellDialog::sellAction(const ActionEvent &event) _("sell item"), // TRANSLATORS: sell confirmation message strprintf(_("Do you really want to sell %s?"), - info.getName().c_str()), SOUND_REQUEST, false, true); + info.getName().c_str()), + SOUND_REQUEST, + false, + Modal_true); dialog->postInit(); dialog->addActionListener(this); return; diff --git a/src/gui/windows/okdialog.cpp b/src/gui/windows/okdialog.cpp index a1601dddb..1f77af3f9 100644 --- a/src/gui/windows/okdialog.cpp +++ b/src/gui/windows/okdialog.cpp @@ -37,8 +37,10 @@ OkDialog::OkDialog(const std::string &restrict title, const std::string &restrict msg, const std::string &restrict button, - const int soundEvent, const bool modal, - const bool showCenter, Window *const parent, + const int soundEvent, + const Modal modal, + const bool showCenter, + Window *const parent, const int minWidth) : Window(title, modal, parent, "ok.xml"), ActionListener(), diff --git a/src/gui/windows/okdialog.h b/src/gui/windows/okdialog.h index e3f7fa928..3d7fd140b 100644 --- a/src/gui/windows/okdialog.h +++ b/src/gui/windows/okdialog.h @@ -49,7 +49,7 @@ class OkDialog final : public Window, const std::string &restrict msg, const std::string &restrict button, const int soundEvent, - const bool modal, + const Modal modal, const bool showCenter, Window *const parent, const int minWidth); diff --git a/src/gui/windows/outfitwindow.cpp b/src/gui/windows/outfitwindow.cpp index 59734edca..7080ee133 100644 --- a/src/gui/windows/outfitwindow.cpp +++ b/src/gui/windows/outfitwindow.cpp @@ -52,7 +52,7 @@ OutfitWindow *outfitWindow = nullptr; OutfitWindow::OutfitWindow() : // TRANSLATORS: outfits window name - Window(_("Outfits"), false, nullptr, "outfits.xml"), + Window(_("Outfits"), Modal_false, nullptr, "outfits.xml"), ActionListener(), // TRANSLATORS: outfits window button mPreviousButton(new Button(this, _("<"), "previous", this)), diff --git a/src/gui/windows/questswindow.cpp b/src/gui/windows/questswindow.cpp index fed9e36c6..d5fdf895a 100644 --- a/src/gui/windows/questswindow.cpp +++ b/src/gui/windows/questswindow.cpp @@ -62,7 +62,7 @@ QuestsWindow *questsWindow = nullptr; QuestsWindow::QuestsWindow() : // TRANSLATORS: quests window name - Window(_("Quests"), false, nullptr, "quests.xml"), + Window(_("Quests"), Modal_false, nullptr, "quests.xml"), ActionListener(), mQuestsModel(new QuestsModel), mQuestsListBox(new ExtendedListBox(this, diff --git a/src/gui/windows/quitdialog.cpp b/src/gui/windows/quitdialog.cpp index 6091d7d9d..9a08951c7 100644 --- a/src/gui/windows/quitdialog.cpp +++ b/src/gui/windows/quitdialog.cpp @@ -49,7 +49,7 @@ QuitDialog::QuitDialog(QuitDialog **const pointerToMe) : // TRANSLATORS: quit dialog name - Window(_("Quit"), true, nullptr, "quit.xml"), + Window(_("Quit"), Modal_true, nullptr, "quit.xml"), ActionListener(), KeyListener(), mOptions(), diff --git a/src/gui/windows/registerdialog.cpp b/src/gui/windows/registerdialog.cpp index fdddfec6f..dca38dad6 100644 --- a/src/gui/windows/registerdialog.cpp +++ b/src/gui/windows/registerdialog.cpp @@ -51,7 +51,7 @@ RegisterDialog::RegisterDialog(LoginData *const data) : // TRANSLATORS: register dialog name - Window(_("Register"), false, nullptr, "register.xml"), + Window(_("Register"), Modal_false, nullptr, "register.xml"), ActionListener(), KeyListener(), mLoginData(data), @@ -242,7 +242,10 @@ void RegisterDialog::action(const ActionEvent &event) // TRANSLATORS: error message _("Error"), errorMsg, _("OK"), DialogType::ERROR, - true, true, nullptr, 260); + Modal_true, + true, + nullptr, + 260); dlg->addActionListener(mWrongDataNoticeListener); } else diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp index 6c72301ca..57a8af078 100644 --- a/src/gui/windows/serverdialog.cpp +++ b/src/gui/windows/serverdialog.cpp @@ -102,7 +102,7 @@ static uint16_t defaultPortForServerType(const ServerType::Type type) ServerDialog::ServerDialog(ServerInfo *const serverInfo, const std::string &dir) : // TRANSLATORS: servers dialog name - Window(_("Choose Your Server"), false, nullptr, "server.xml"), + Window(_("Choose Your Server"), Modal_false, nullptr, "server.xml"), ActionListener(), KeyListener(), SelectionListener(), diff --git a/src/gui/windows/setupwindow.cpp b/src/gui/windows/setupwindow.cpp index d92ff0560..95b4c50cd 100644 --- a/src/gui/windows/setupwindow.cpp +++ b/src/gui/windows/setupwindow.cpp @@ -59,7 +59,7 @@ SetupWindow *setupWindow = nullptr; SetupWindow::SetupWindow() : // TRANSLATORS: setup window name - Window(_("Setup"), false, nullptr, "setup.xml"), + Window(_("Setup"), Modal_false, nullptr, "setup.xml"), ActionListener(), mTabs(), mWindowsToReset(), diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp index 4afe10845..529b8131e 100644 --- a/src/gui/windows/shopwindow.cpp +++ b/src/gui/windows/shopwindow.cpp @@ -98,7 +98,7 @@ ShopWindow::DialogList ShopWindow::instances; ShopWindow::ShopWindow() : // TRANSLATORS: shop window name - Window(_("Personal Shop"), false, nullptr, "shop.xml"), + Window(_("Personal Shop"), Modal_false, nullptr, "shop.xml"), #ifdef EATHENA_SUPPORT VendingModeListener(), VendingSlotsListener(), @@ -952,9 +952,12 @@ void ShopWindow::processRequest(const std::string &nick, std::string data, { ConfirmDialog *const confirmDlg = new ConfirmDialog // TRANSLATORS: shop window dialog - (_("Request for Trade"), strprintf(_("%s wants to %s %s do you " - "accept?"), nick.c_str(), msg.c_str(), - mTradeItem->getInfo().getName().c_str()), SOUND_REQUEST, true); + (_("Request for Trade"), + strprintf(_("%s wants to %s %s do you accept?"), + nick.c_str(), msg.c_str(), + mTradeItem->getInfo().getName().c_str()), + SOUND_REQUEST, + true); confirmDlg->postInit(); confirmDlg->addActionListener(this); } diff --git a/src/gui/windows/shortcutwindow.cpp b/src/gui/windows/shortcutwindow.cpp index d84a01e05..85fb2e2ff 100644 --- a/src/gui/windows/shortcutwindow.cpp +++ b/src/gui/windows/shortcutwindow.cpp @@ -49,7 +49,7 @@ ShortcutWindow::ShortcutWindow(const std::string &restrict title, ShortcutContainer *restrict const content, const std::string &restrict skinFile, int width, int height) : - Window("Window", false, nullptr, skinFile), + Window("Window", Modal_false, nullptr, skinFile), mItems(content), mScrollArea(new ScrollArea(this, mItems, false)), mTabs(nullptr), @@ -105,7 +105,7 @@ ShortcutWindow::ShortcutWindow(const std::string &restrict title, ShortcutWindow::ShortcutWindow(const std::string &restrict title, const std::string &restrict skinFile, const int width, const int height) : - Window("Window", false, nullptr, skinFile), + Window("Window", Modal_false, nullptr, skinFile), mItems(nullptr), mScrollArea(nullptr), mTabs(new TabbedArea(this)), diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp index 2cf84c54c..b9af88a06 100644 --- a/src/gui/windows/skilldialog.cpp +++ b/src/gui/windows/skilldialog.cpp @@ -68,7 +68,7 @@ static SkillOwner::Type parseOwner(const std::string &str) SkillDialog::SkillDialog() : // TRANSLATORS: skills dialog name - Window(_("Skills"), false, nullptr, "skills.xml"), + Window(_("Skills"), Modal_false, nullptr, "skills.xml"), ActionListener(), mSkills(), mDurations(), diff --git a/src/gui/windows/socialwindow.cpp b/src/gui/windows/socialwindow.cpp index ad1745287..f1d5550dd 100644 --- a/src/gui/windows/socialwindow.cpp +++ b/src/gui/windows/socialwindow.cpp @@ -53,7 +53,7 @@ SocialWindow *socialWindow = nullptr; SocialWindow::SocialWindow() : // TRANSLATORS: social window name - Window(_("Social"), false, nullptr, "social.xml"), + Window(_("Social"), Modal_false, nullptr, "social.xml"), ActionListener(), PlayerRelationsListener(), mGuildInvited(0), @@ -427,7 +427,7 @@ void SocialWindow::showGuildInvite(const std::string &restrict guildName, // TRANSLATORS: guild invite message mGuildAcceptDialog = new ConfirmDialog(_("Accept Guild Invite"), - msg, SOUND_REQUEST, false, false, this); + msg, SOUND_REQUEST, false, Modal_false, this); mGuildAcceptDialog->postInit(); mGuildAcceptDialog->addActionListener(this); mGuildInvited = guildId; @@ -486,7 +486,7 @@ void SocialWindow::showPartyInvite(const std::string &restrict partyName, // show invite // TRANSLATORS: party invite message mPartyAcceptDialog = new ConfirmDialog(_("Accept Party Invite"), - msg, SOUND_REQUEST, false, false, this); + msg, SOUND_REQUEST, false, Modal_false, this); mPartyAcceptDialog->postInit(); mPartyAcceptDialog->addActionListener(this); mPartyInviter = inviter; @@ -506,7 +506,10 @@ void SocialWindow::showPartyCreate() // TRANSLATORS: ok dialog button _("OK"), DialogType::ERROR, - true, true, this, 260); + Modal_true, + true, + this, + 260); return; } diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp index 14a81b003..aa62aae4c 100644 --- a/src/gui/windows/statuswindow.cpp +++ b/src/gui/windows/statuswindow.cpp @@ -63,7 +63,7 @@ StatusWindow *statusWindow = nullptr; StatusWindow::StatusWindow() : Window(localPlayer ? localPlayer->getName() : - "?", false, nullptr, "status.xml"), + "?", Modal_false, nullptr, "status.xml"), ActionListener(), AttributeListener(), StatListener(), diff --git a/src/gui/windows/textcommandeditor.cpp b/src/gui/windows/textcommandeditor.cpp index e5dbb26b7..a8a7eccfc 100644 --- a/src/gui/windows/textcommandeditor.cpp +++ b/src/gui/windows/textcommandeditor.cpp @@ -44,7 +44,7 @@ TextCommandEditor::TextCommandEditor(TextCommand *const command) : // TRANSLATORS: command editor name - Window(_("Command Editor"), false, nullptr, "commandeditor.xml"), + Window(_("Command Editor"), Modal_false, nullptr, "commandeditor.xml"), ActionListener(), mIsMagicCommand(command->getCommandType() == TEXT_COMMAND_MAGIC), mCommand(command), diff --git a/src/gui/windows/textdialog.cpp b/src/gui/windows/textdialog.cpp index d36fa1d96..51e6768e8 100644 --- a/src/gui/windows/textdialog.cpp +++ b/src/gui/windows/textdialog.cpp @@ -40,7 +40,7 @@ TextDialog::TextDialog(const std::string &restrict title, const std::string &restrict msg, Window *const parent, const bool isPassword) : - Window(title, true, parent, "textdialog.xml"), + Window(title, Modal_true, parent, "textdialog.xml"), ActionListener(), mTextField(nullptr), mPasswordField(nullptr), diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp index 5d95c0a4f..7dadbb18c 100644 --- a/src/gui/windows/tradewindow.cpp +++ b/src/gui/windows/tradewindow.cpp @@ -71,7 +71,7 @@ TradeWindow *tradeWindow = nullptr; TradeWindow::TradeWindow() : // TRANSLATORS: trade window caption - Window(_("Trade: You"), false, nullptr, "trade.xml"), + Window(_("Trade: You"), Modal_false, nullptr, "trade.xml"), ActionListener(), SelectionListener(), mMyInventory(new Inventory(InventoryType::TRADE)), diff --git a/src/gui/windows/unregisterdialog.cpp b/src/gui/windows/unregisterdialog.cpp index 24ce90108..7dc18da4e 100644 --- a/src/gui/windows/unregisterdialog.cpp +++ b/src/gui/windows/unregisterdialog.cpp @@ -44,7 +44,7 @@ UnRegisterDialog::UnRegisterDialog(LoginData *const data) : // TRANSLATORS: unregister dialog name - Window(_("Unregister"), true, nullptr, "unregister.xml"), + Window(_("Unregister"), Modal_true, nullptr, "unregister.xml"), ActionListener(), mLoginData(data), mPasswordField(new PasswordField(this, mLoginData->password)), @@ -145,7 +145,10 @@ void UnRegisterDialog::action(const ActionEvent &event) // TRANSLATORS: ok dialog button _("OK"), DialogType::ERROR, - true, true, nullptr, 260); + Modal_true, + true, + nullptr, + 260); dlg->addActionListener(mWrongDataNoticeListener); } else diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp index 5ea107f35..6a9ad373c 100644 --- a/src/gui/windows/updaterwindow.cpp +++ b/src/gui/windows/updaterwindow.cpp @@ -168,7 +168,7 @@ UpdaterWindow::UpdaterWindow(const std::string &restrict updateHost, const bool applyUpdates, const int updateType) : // TRANSLATORS: updater window name - Window(_("Updating..."), false, nullptr, "update.xml"), + Window(_("Updating..."), Modal_false, nullptr, "update.xml"), ActionListener(), KeyListener(), mDownloadProgress(0.0F), diff --git a/src/gui/windows/whoisonline.cpp b/src/gui/windows/whoisonline.cpp index 88e4441be..dacb28385 100644 --- a/src/gui/windows/whoisonline.cpp +++ b/src/gui/windows/whoisonline.cpp @@ -90,7 +90,10 @@ namespace WhoIsOnline::WhoIsOnline() : // TRANSLATORS: who is online window name - Window(_("Who Is Online - Updating"), false, nullptr, "whoisonline.xml"), + Window(_("Who Is Online - Updating"), + Modal_false, + nullptr, + "whoisonline.xml"), mUpdateTimer(0), mThread(nullptr), mMemoryBuffer(nullptr), diff --git a/src/gui/windows/worldselectdialog.cpp b/src/gui/windows/worldselectdialog.cpp index cd3942659..81b8e3c7e 100644 --- a/src/gui/windows/worldselectdialog.cpp +++ b/src/gui/windows/worldselectdialog.cpp @@ -45,7 +45,7 @@ extern WorldInfo **server_info; WorldSelectDialog::WorldSelectDialog(Worlds worlds) : // TRANSLATORS: world select dialog name - Window(_("Select World"), false, nullptr, "world.xml"), + Window(_("Select World"), Modal_false, nullptr, "world.xml"), ActionListener(), KeyListener(), mWorldListModel(new WorldListModel(worlds)), |