summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-04-20 23:12:28 +0200
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-04-20 23:12:28 +0200
commit3a7224117dfb6709b059fc258876699e969ec119 (patch)
treebb2207cf5c3c27fbc3cca5209b85c1746f5c087a /src
parent899f8e62b670726c61f8105f2226de448b180a19 (diff)
downloadmana-3a7224117dfb6709b059fc258876699e969ec119.tar.gz
mana-3a7224117dfb6709b059fc258876699e969ec119.tar.bz2
mana-3a7224117dfb6709b059fc258876699e969ec119.tar.xz
mana-3a7224117dfb6709b059fc258876699e969ec119.zip
Removed the unused itemshortcutwindow.{h,cpp}
Diffstat (limited to 'src')
-rw-r--r--src/game.cpp2
-rw-r--r--src/gui/itemshortcutwindow.cpp71
-rw-r--r--src/gui/itemshortcutwindow.h61
-rw-r--r--src/gui/shortcutwindow.cpp3
-rw-r--r--src/gui/shortcutwindow.h2
-rw-r--r--src/gui/widgets/window.cpp3
-rw-r--r--src/net/generalhandler.h4
7 files changed, 9 insertions, 137 deletions
diff --git a/src/game.cpp b/src/game.cpp
index dd257013..6d724c9e 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -242,7 +242,7 @@ static void createGuiWindows()
debugWindow = new DebugWindow;
itemShortcutWindow = new ShortcutWindow("ItemShortcut",
new ItemShortcutContainer);
- emoteShortcutWindow = new ShortcutWindow("emoteShortcut",
+ emoteShortcutWindow = new ShortcutWindow("EmoteShortcut",
new EmoteShortcutContainer);
localChatTab = new ChatTab(_("General"));
diff --git a/src/gui/itemshortcutwindow.cpp b/src/gui/itemshortcutwindow.cpp
deleted file mode 100644
index 6fe1a10b..00000000
--- a/src/gui/itemshortcutwindow.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * The Mana World
- * Copyright (C) 2007 The Mana World Development Team
- *
- * This file is part of The Mana World.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include "itemshortcutwindow.h"
-
-#include "itemshortcutcontainer.h"
-#include "scrollarea.h"
-
-static const int SCROLL_PADDING = 0;
-
-ItemShortcutWindow::ItemShortcutWindow()
-{
- setWindowName("ItemShortcut");
- // no title presented, title bar is padding so window can be moved.
- gcn::Window::setTitleBarHeight(gcn::Window::getPadding());
- setShowTitle(false);
- setResizable(true);
- setDefaultSize(758, 174, 42, 426);
-
- mItems = new ItemShortcutContainer;
-
- const int border = SCROLL_PADDING * 2 + getPadding() * 2;
- setMinWidth(mItems->getBoxWidth() + border);
- setMinHeight(mItems->getBoxHeight() + border);
- setMaxWidth(mItems->getBoxWidth() * mItems->getMaxItems() + border);
- setMaxHeight(mItems->getBoxHeight() * mItems->getMaxItems() + border);
-
- mScrollArea = new ScrollArea(mItems);
- mScrollArea->setPosition(SCROLL_PADDING, SCROLL_PADDING);
- mScrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
- mScrollArea->setOpaque(false);
-
- add(mScrollArea);
-
- loadWindowState();
-}
-
-ItemShortcutWindow::~ItemShortcutWindow()
-{
- delete mItems;
- delete mScrollArea;
-}
-
-void ItemShortcutWindow::widgetResized(const gcn::Event &event)
-{
- Window::widgetResized(event);
-
- const gcn::Rectangle &area = getChildrenArea();
-
- mScrollArea->setSize(
- area.width - SCROLL_PADDING,
- area.height - SCROLL_PADDING);
-}
diff --git a/src/gui/itemshortcutwindow.h b/src/gui/itemshortcutwindow.h
deleted file mode 100644
index 609d7c72..00000000
--- a/src/gui/itemshortcutwindow.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * The Mana World
- * Copyright (C) 2007 The Mana World Development Team
- *
- * This file is part of The Mana World.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef ITEMSHORTCUTWINDOW_H
-#define ITEMSHORTCUTWINDOW_H
-
-#include "gui/widgets/window.h"
-
-class ItemShortcutContainer;
-class ScrollArea;
-
-/**
- * A window around the ItemShortcutContainer.
- *
- * \ingroup Interface
- */
-class ItemShortcutWindow : public Window
-{
- public:
- /**
- * Constructor.
- */
- ItemShortcutWindow();
-
- /**
- * Destructor.
- */
- ~ItemShortcutWindow();
-
- /**
- * Called whenever the widget changes size.
- */
- void widgetResized(const gcn::Event &event);
-
- private:
- ItemShortcutContainer *mItems;
-
- ScrollArea *mScrollArea;
-};
-
-extern ItemShortcutWindow *itemShortcutWindow;
-
-#endif
diff --git a/src/gui/shortcutwindow.cpp b/src/gui/shortcutwindow.cpp
index 7d34296e..783661f6 100644
--- a/src/gui/shortcutwindow.cpp
+++ b/src/gui/shortcutwindow.cpp
@@ -32,7 +32,8 @@ static const int SCROLL_PADDING = 0;
int ShortcutWindow::mInstances = 0;
-ShortcutWindow::ShortcutWindow(const char *title, ShortcutContainer *content)
+ShortcutWindow::ShortcutWindow(const std::string &title,
+ ShortcutContainer *content)
{
setWindowName(title);
// no title presented, title bar is padding so window can be moved.
diff --git a/src/gui/shortcutwindow.h b/src/gui/shortcutwindow.h
index 7aeb5571..c069811d 100644
--- a/src/gui/shortcutwindow.h
+++ b/src/gui/shortcutwindow.h
@@ -38,7 +38,7 @@ class ShortcutWindow : public Window
/**
* Constructor.
*/
- ShortcutWindow(const char *title, ShortcutContainer *content);
+ ShortcutWindow(const std::string &title, ShortcutContainer *content);
/**
* Destructor.
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index dde455e6..fbd328d0 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -39,7 +39,8 @@
int Window::instances = 0;
int Window::mouseResize = 0;
-Window::Window(const std::string &caption, bool modal, Window *parent, const std::string &skin):
+Window::Window(const std::string &caption, bool modal, Window *parent,
+ const std::string &skin):
gcn::Window(caption),
mGrip(0),
mParent(parent),
diff --git a/src/net/generalhandler.h b/src/net/generalhandler.h
index 57599ba1..3865ca92 100644
--- a/src/net/generalhandler.h
+++ b/src/net/generalhandler.h
@@ -23,6 +23,7 @@
#define GENERALHANDLER_H
namespace Net {
+
class GeneralHandler
{
public:
@@ -40,6 +41,7 @@ class GeneralHandler
virtual void guiWindowsUnloaded() = 0;
};
-}
+
+} // namespace Net
#endif // GENERALHANDLER_H