From 166432764d34d7dd42142b9fcd7069b927f00e3e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 17 May 2014 18:11:29 +0300 Subject: Move updatefile into separate file. --- src/CMakeLists.txt | 1 + src/Makefile.am | 1 + src/gui/windows/updaterwindow.h | 22 ++----------------- src/resources/updatefile.h | 48 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 52 insertions(+), 20 deletions(-) create mode 100644 src/resources/updatefile.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2d816cb98..c75791cb4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -583,6 +583,7 @@ SET(SRCS resources/subimage.h resources/surfaceimagehelper.cpp resources/surfaceimagehelper.h + resources/updatefile.h resources/wallpaper.cpp resources/wallpaper.h utils/translation/podict.cpp diff --git a/src/Makefile.am b/src/Makefile.am index 616c8d99b..2802cb926 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -97,6 +97,7 @@ dyecmd_SOURCES += dyetool/dyemain.cpp \ resources/subimage.h \ resources/surfaceimagehelper.cpp \ resources/surfaceimagehelper.h \ + resources/updatefile.h \ resources/spritedef.cpp \ resources/spritedef.h \ utils/mkdir.cpp \ diff --git a/src/gui/windows/updaterwindow.h b/src/gui/windows/updaterwindow.h index d73da1e3e..144e0903a 100644 --- a/src/gui/windows/updaterwindow.h +++ b/src/gui/windows/updaterwindow.h @@ -28,6 +28,8 @@ #include "net/download.h" +#include "resources/updatefile.h" + #include "utils/mutex.h" #include "listeners/actionlistener.h" @@ -43,26 +45,6 @@ class ProgressBar; class ResourceManager; class ScrollArea; -struct UpdateFile final -{ - public: - UpdateFile() : - name(), - hash(), - type(), - desc(), - group(), - required(false) - { - } - std::string name; - std::string hash; - std::string type; - std::string desc; - std::string group; - bool required; -}; - /** * Update progress window GUI * diff --git a/src/resources/updatefile.h b/src/resources/updatefile.h new file mode 100644 index 000000000..0e07fc112 --- /dev/null +++ b/src/resources/updatefile.h @@ -0,0 +1,48 @@ +/* + * The ManaPlus Client + * Copyright (C) 2004-2009 The Mana World Development Team + * Copyright (C) 2009-2010 The Mana Developers + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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, see . + */ + +#ifndef GUI_RESOURCES_UPDATEFILE_H +#define GUI_RESOURCES_UPDATEFILE_H + +#include + +struct UpdateFile final +{ + public: + UpdateFile() : + name(), + hash(), + type(), + desc(), + group(), + required(false) + { + } + std::string name; + std::string hash; + std::string type; + std::string desc; + std::string group; + bool required; +}; + +#endif // GUI_RESOURCES_UPDATEFILE_H -- cgit v1.2.3-70-g09d2