From 404d3f7f2f9aa455bea423a6a00025df23cd6687 Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Sat, 9 Apr 2011 00:16:28 +0200 Subject: Removed the Mana namespace It's just an annoyance when it's only applied to a few classes. Either we place everything in this namespace or nothing, and at the moment I don't see any rationale for placing everything in a Mana namespace. Acked-by: Jared Adams --- src/gui/inventorywindow.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/gui/inventorywindow.cpp') diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp index 7a8d5f09..4ebcce8b 100644 --- a/src/gui/inventorywindow.cpp +++ b/src/gui/inventorywindow.cpp @@ -61,7 +61,7 @@ InventoryWindow::InventoryWindow(Inventory *inventory): mFilterText(new TextField), mSplit(false) { - listen(Mana::Event::AttributesChannel); + listen(Event::AttributesChannel); setWindowName(isMainInventory() ? "Inventory" : "Storage"); setupWindow->registerWindowForReset(this); @@ -195,19 +195,19 @@ void InventoryWindow::action(const gcn::ActionEvent &event) return; if (event.getId() == "activate") - item->doEvent(Mana::Event::DoUse); + item->doEvent(Event::DoUse); else if (event.getId() == "equip") { if (item->isEquippable()) { if (item->isEquipped()) - item->doEvent(Mana::Event::DoUnequip); + item->doEvent(Event::DoUnequip); else - item->doEvent(Mana::Event::DoEquip); + item->doEvent(Event::DoEquip); } else { - item->doEvent(Mana::Event::DoUse); + item->doEvent(Event::DoUse); } } else if (event.getId() == "drop") @@ -265,21 +265,21 @@ void InventoryWindow::mouseClicked(gcn::MouseEvent &event) return; if (mInventory->isMainInventory()) { - Mana::Event event(Mana::Event::DoMove); + Event event(Event::DoMove); event.setItem("item", item); event.setInt("amount", item->getQuantity()); event.setInt("source", Inventory::INVENTORY); event.setInt("destination", Inventory::STORAGE); - event.trigger(Mana::Event::ItemChannel); + event.trigger(Event::ItemChannel); } else { - Mana::Event event(Mana::Event::DoMove); + Event event(Event::DoMove); event.setItem("item", item); event.setInt("amount", item->getQuantity()); event.setInt("source", Inventory::STORAGE); event.setInt("destination", Inventory::INVENTORY); - event.trigger(Mana::Event::ItemChannel); + event.trigger(Event::ItemChannel); } } } @@ -383,16 +383,16 @@ void InventoryWindow::close() } else { - Mana::Event event(Mana::Event::DoCloseInventory); + Event event(Event::DoCloseInventory); event.setInt("type", mInventory->getType()); - event.trigger(Mana::Event::ItemChannel); + event.trigger(Event::ItemChannel); scheduleDelete(); } } -void InventoryWindow::event(Mana::Event::Channel channel, const Mana::Event &event) +void InventoryWindow::event(Event::Channel channel, const Event &event) { - if (event.getType() == Mana::Event::UpdateAttribute) + if (event.getType() == Event::UpdateAttribute) { int id = event.getInt("id"); if (id == TOTAL_WEIGHT || -- cgit v1.2.3-70-g09d2