summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-03-26 19:38:10 -0600
committerIra Rice <irarice@gmail.com>2009-03-26 19:38:10 -0600
commit5561f4355ae1b1c167cd19575527ae0eae24e029 (patch)
treeba42ced9f63a2e21fcc723e2f98380884764face
parent798e9a37aff31dad38f48ea051322b978fcf849b (diff)
downloadmana-client-5561f4355ae1b1c167cd19575527ae0eae24e029.tar.gz
mana-client-5561f4355ae1b1c167cd19575527ae0eae24e029.tar.bz2
mana-client-5561f4355ae1b1c167cd19575527ae0eae24e029.tar.xz
mana-client-5561f4355ae1b1c167cd19575527ae0eae24e029.zip
Removed getting and setting a parent window from the popup class, since
this currently does not provide any useful functionality to popups, as well as doing anything for that matter. Signed-off-by: Ira Rice <irarice@gmail.com>
-rw-r--r--src/gui/popup.cpp5
-rw-r--r--src/gui/popup.h14
-rw-r--r--src/gui/speechbubble.cpp2
3 files changed, 3 insertions, 18 deletions
diff --git a/src/gui/popup.cpp b/src/gui/popup.cpp
index 8dfc3c61..a27b1d90 100644
--- a/src/gui/popup.cpp
+++ b/src/gui/popup.cpp
@@ -25,7 +25,6 @@
#include "gui.h"
#include "skin.h"
#include "popup.h"
-#include "window.h"
#include "windowcontainer.h"
#include "../configlistener.h"
@@ -36,9 +35,7 @@
int Popup::instances = 0;
-Popup::Popup(const std::string& name, Window *parent,
- const std::string& skin):
- mParent(parent),
+Popup::Popup(const std::string& name, const std::string& skin):
mPopupName(name),
mDefaultSkinPath(skin),
mMinWidth(100),
diff --git a/src/gui/popup.h b/src/gui/popup.h
index 639f2cc9..58ccd16e 100644
--- a/src/gui/popup.h
+++ b/src/gui/popup.h
@@ -30,7 +30,6 @@
class Skin;
class SkinLoader;
-class Window;
class WindowContainer;
/**
@@ -52,12 +51,9 @@ class Popup : public gcn::Container
*
* @param name A human readable name for the popup. Only useful for
* debugging purposes.
- * @param parent The parent Window. This is the Window standing above
- * this one in the Window hiearchy. When reordering,
- * a Popup will never go below its parent Window.
* @param skin The location where the Popup's skin XML can be found.
*/
- Popup(const std::string& name = "", Window *parent = NULL,
+ Popup(const std::string& name = "",
const std::string &skin = "graphics/gui/gui.xml");
/**
@@ -156,13 +152,6 @@ class Popup : public gcn::Container
void setPadding(int padding) { mPadding = padding; }
/**
- * Returns the parent Window.
- *
- * @return The parent Window or <code>NULL</code> if there is none.
- */
- Window* getParentWindow() { return mParent; }
-
- /**
* Sets the name of the popup. This is only useful for debug purposes.
*/
void setPopupName(const std::string &name) { mPopupName = name; }
@@ -183,7 +172,6 @@ class Popup : public gcn::Container
virtual gcn::Rectangle getChildrenArea();
private:
- Window *mParent; /**< The parent Window (if there is one) */
std::string mPopupName; /**< Name of the popup */
std::string mDefaultSkinPath; /**< Default skin path for this popup */
int mMinWidth; /**< Minimum popup width */
diff --git a/src/gui/speechbubble.cpp b/src/gui/speechbubble.cpp
index ca771fce..cd483c30 100644
--- a/src/gui/speechbubble.cpp
+++ b/src/gui/speechbubble.cpp
@@ -34,7 +34,7 @@
#include "../utils/gettext.h"
SpeechBubble::SpeechBubble():
- Popup("Speech", NULL, "graphics/gui/speechbubble.xml"),
+ Popup("Speech", "graphics/gui/speechbubble.xml"),
mText("")
{
setContentSize(140, 46);