summaryrefslogtreecommitdiff
path: root/src/gui/widgets/popup.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2010-03-24 22:55:57 +0100
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2010-03-31 17:57:30 +0200
commit9a0f5327c25c57963af837439d23a61c9510a6ac (patch)
treeb185f39126080409d981fd83e657a7e963804b0f /src/gui/widgets/popup.cpp
parent2053bb3a588b504f255e83b1e7b4f9b935a5cbf3 (diff)
downloadmana-client-9a0f5327c25c57963af837439d23a61c9510a6ac.tar.gz
mana-client-9a0f5327c25c57963af837439d23a61c9510a6ac.tar.bz2
mana-client-9a0f5327c25c57963af837439d23a61c9510a6ac.tar.xz
mana-client-9a0f5327c25c57963af837439d23a61c9510a6ac.zip
Removed the ability to assign custom skins to windows/popups
Old settings are causing it to fall back on the wrong combination of files if old data is in the search path. Reviewed-by: Jared Adams
Diffstat (limited to 'src/gui/widgets/popup.cpp')
-rw-r--r--src/gui/widgets/popup.cpp33
1 files changed, 1 insertions, 32 deletions
diff --git a/src/gui/widgets/popup.cpp b/src/gui/widgets/popup.cpp
index 5cc8fad6..4dc58f72 100644
--- a/src/gui/widgets/popup.cpp
+++ b/src/gui/widgets/popup.cpp
@@ -37,7 +37,6 @@
Popup::Popup(const std::string &name, const std::string &skin):
mPopupName(name),
- mDefaultSkinPath(skin),
mMinWidth(100),
mMinHeight(40),
mMaxWidth(graphics->getWidth()),
@@ -51,7 +50,7 @@ Popup::Popup(const std::string &name, const std::string &skin):
setPadding(3);
// Loads the skin
- mSkin = Theme::instance()->load(skin, mDefaultSkinPath);
+ mSkin = Theme::instance()->load(skin);
// Add this window to the window container
windowContainer->add(this);
@@ -64,8 +63,6 @@ Popup::~Popup()
{
logger->log("Popup::~Popup(\"%s\")", mPopupName.c_str());
- savePopupConfiguration();
-
mSkin->instances--;
}
@@ -74,34 +71,6 @@ void Popup::setWindowContainer(WindowContainer *wc)
windowContainer = wc;
}
-void Popup::loadPopupConfiguration()
-{
- if (mPopupName.empty())
- return;
-
- const std::string &name = mPopupName;
- const std::string &skinName = config.getValue(name + "Skin",
- mSkin->getFilePath());
-
- if (skinName.compare(mSkin->getFilePath()) != 0)
- {
- mSkin->instances--;
- mSkin = Theme::instance()->load(skinName, mDefaultSkinPath);
- }
-}
-
-void Popup::savePopupConfiguration()
-{
- if (mPopupName.empty())
- return;
-
- const std::string &name = mPopupName;
-
- // Saves the skin path in a config file (which allows for skins to be
- // changed from the default path)
- config.setValue(name + "Skin", mSkin->getFilePath());
-}
-
void Popup::draw(gcn::Graphics *graphics)
{
Graphics *g = static_cast<Graphics*>(graphics);