diff options
Diffstat (limited to 'src/gui/widgets/popup.cpp')
-rw-r--r-- | src/gui/widgets/popup.cpp | 33 |
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); |