diff options
author | Reid <reidyaro@gmail.com> | 2012-03-01 22:03:01 +0100 |
---|---|---|
committer | Reid <reidyaro@gmail.com> | 2012-03-01 22:03:01 +0100 |
commit | 490862919d79369112c75955a9c36ff8a081efd3 (patch) | |
tree | 6fe89466b9c53ba811f298174e6d787bbae71e09 /src/gui/setup_theme.cpp | |
parent | dff814619d63496acd3c4e8730b828b5d4d931fb (diff) | |
parent | d873da3e8e57480016596f714845c1bc7e712e68 (diff) | |
download | plus-490862919d79369112c75955a9c36ff8a081efd3.tar.gz plus-490862919d79369112c75955a9c36ff8a081efd3.tar.bz2 plus-490862919d79369112c75955a9c36ff8a081efd3.tar.xz plus-490862919d79369112c75955a9c36ff8a081efd3.zip |
Merge branch 'master' of gitorious.org:manaplus/manaplus
Diffstat (limited to 'src/gui/setup_theme.cpp')
-rw-r--r-- | src/gui/setup_theme.cpp | 40 |
1 files changed, 7 insertions, 33 deletions
diff --git a/src/gui/setup_theme.cpp b/src/gui/setup_theme.cpp index 67936f698..7386f496a 100644 --- a/src/gui/setup_theme.cpp +++ b/src/gui/setup_theme.cpp @@ -1,8 +1,8 @@ /* * The ManaPlus Client * Copyright (C) 2009 The Mana World Development Team - * Copyright (C) 2010 Andrei Karas - * Copyright (C) 2011 ManaPlus developers + * Copyright (C) 2009-2010 Andrei Karas + * Copyright (C) 2011-2012 The ManaPlus developers * * This file is part of The ManaPlus Client. * @@ -17,8 +17,7 @@ * 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 + * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "gui/setup_theme.h" @@ -30,10 +29,11 @@ #include "gui/widgets/button.h" #include "gui/widgets/checkbox.h" +#include "gui/widgets/dropdown.h" #include "gui/widgets/label.h" #include "gui/widgets/layouthelper.h" +#include "gui/widgets/namesmodel.h" #include "gui/widgets/textfield.h" -#include "gui/widgets/dropdown.h" #include "configuration.h" #include "localplayer.h" @@ -54,32 +54,6 @@ const char* ACTION_HELP_FONT = "help font"; const char* ACTION_SECURE_FONT = "secure font"; const char* ACTION_JAPAN_FONT = "japan font"; -class NamesModel : public gcn::ListModel -{ -public: - NamesModel() - { - } - - virtual ~NamesModel() { } - - virtual int getNumberOfElements() - { - return static_cast<int>(mNames.size()); - } - - virtual std::string getElementAt(int i) - { - if (i >= getNumberOfElements() || i < 0) - return _("???"); - - return mNames[i]; - } - -protected: - std::vector<std::string> mNames; -}; - class ThemesModel : public NamesModel { public: @@ -375,8 +349,8 @@ void Setup_Theme::apply() if (config.getValue("theme", config.getValue("selectedSkin", "")) != mTheme) { - new OkDialog(_("Theme Changed"), - _("Restart your client for the change to take effect.")); + new OkDialog(_("Theme Changed"), _("Restart your client for " + "the change to take effect.")); } config.setValue("selectedSkin", ""); |