summaryrefslogtreecommitdiff
path: root/src/gui/inventorywindow.cpp
diff options
context:
space:
mode:
authorChuck Miller <shadowmil@gmail.com>2010-11-11 21:55:25 -0500
committerChuck Miller <shadowmil@gmail.com>2010-11-11 22:45:58 -0500
commit5727a2d9eeb0688a16e5b7fe32f6d9836c4f7a4e (patch)
tree994cdeb1187a94996ca38c5e274aabaa5f1fec76 /src/gui/inventorywindow.cpp
parent3dd1baab3fb00a3aa99447430f16a431a205c614 (diff)
downloadMana-5727a2d9eeb0688a16e5b7fe32f6d9836c4f7a4e.tar.gz
Mana-5727a2d9eeb0688a16e5b7fe32f6d9836c4f7a4e.tar.bz2
Mana-5727a2d9eeb0688a16e5b7fe32f6d9836c4f7a4e.tar.xz
Mana-5727a2d9eeb0688a16e5b7fe32f6d9836c4f7a4e.zip
Have the event system channels use enums instead of strings
Reviewed-by: Freeyorp
Diffstat (limited to 'src/gui/inventorywindow.cpp')
-rw-r--r--src/gui/inventorywindow.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index 62b63f24..fab87844 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -60,7 +60,7 @@ InventoryWindow::InventoryWindow(Inventory *inventory):
mInventory(inventory),
mSplit(false)
{
- listen("Attributes");
+ listen(CHANNEL_ATTRIBUTES);
setWindowName(isMainInventory() ? "Inventory" : "Storage");
setupWindow->registerWindowForReset(this);
@@ -261,7 +261,7 @@ void InventoryWindow::mouseClicked(gcn::MouseEvent &event)
event.setInt("amount", item->getQuantity());
event.setInt("source", Inventory::INVENTORY);
event.setInt("destination", Inventory::STORAGE);
- event.trigger("Item");
+ event.trigger(CHANNEL_ITEM);
}
else
{
@@ -270,7 +270,7 @@ void InventoryWindow::mouseClicked(gcn::MouseEvent &event)
event.setInt("amount", item->getQuantity());
event.setInt("source", Inventory::STORAGE);
event.setInt("destination", Inventory::INVENTORY);
- event.trigger("Item");
+ event.trigger(CHANNEL_ITEM);
}
}
}
@@ -370,12 +370,12 @@ void InventoryWindow::close()
{
Mana::Event event("doCloseInventory");
event.setInt("type", mInventory->getType());
- event.trigger("Item");
+ event.trigger(CHANNEL_ITEM);
scheduleDelete();
}
}
-void InventoryWindow::event(const std::string &channel, const Mana::Event &event)
+void InventoryWindow::event(Channels channel, const Mana::Event &event)
{
if (event.getName() == "UpdateAttribute")
{