From e9df7ac74e53d818c21b4a67e9ef0e83d9c89dd4 Mon Sep 17 00:00:00 2001 From: Ingo Ruhnke Date: Tue, 26 Aug 2014 21:51:34 +0200 Subject: [PATCH] Renamed AddonDialog to DownloadDialog, as it isn't AddonManager specific any more --- src/supertux/menu/addon_menu.cpp | 6 +++--- src/supertux/menu/{addon_dialog.cpp => download_dialog.cpp} | 12 ++++++------ src/supertux/menu/{addon_dialog.hpp => download_dialog.hpp} | 12 ++++++------ 3 files changed, 15 insertions(+), 15 deletions(-) rename src/supertux/menu/{addon_dialog.cpp => download_dialog.cpp} (85%) rename src/supertux/menu/{addon_dialog.hpp => download_dialog.hpp} (78%) diff --git a/src/supertux/menu/addon_menu.cpp b/src/supertux/menu/addon_menu.cpp index 05f3e5771..76f64f886 100644 --- a/src/supertux/menu/addon_menu.cpp +++ b/src/supertux/menu/addon_menu.cpp @@ -25,7 +25,7 @@ #include "gui/menu.hpp" #include "gui/menu_item.hpp" #include "gui/menu_manager.hpp" -#include "supertux/menu/addon_dialog.hpp" +#include "supertux/menu/download_dialog.hpp" #include "util/gettext.hpp" namespace { @@ -189,7 +189,7 @@ AddonMenu::menu_action(MenuItem* item) MenuManager::instance().set_dialog({}); refresh(); }); - std::unique_ptr dialog(new AddonDialog(status)); + std::unique_ptr dialog(new DownloadDialog(status)); dialog->set_title("Downloading Add-On Repository Index"); MenuManager::instance().set_dialog(std::move(dialog)); } @@ -240,7 +240,7 @@ AddonMenu::menu_action(MenuItem* item) refresh(); }); - std::unique_ptr dialog(new AddonDialog(status)); + std::unique_ptr dialog(new DownloadDialog(status)); dialog->set_title("Downloading " + generate_menu_item_text(addon)); MenuManager::instance().set_dialog(std::move(dialog)); } diff --git a/src/supertux/menu/addon_dialog.cpp b/src/supertux/menu/download_dialog.cpp similarity index 85% rename from src/supertux/menu/addon_dialog.cpp rename to src/supertux/menu/download_dialog.cpp index 188e8aad2..8ba7fc288 100644 --- a/src/supertux/menu/addon_dialog.cpp +++ b/src/supertux/menu/download_dialog.cpp @@ -14,14 +14,14 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -#include "supertux/menu/addon_dialog.hpp" +#include "supertux/menu/download_dialog.hpp" #include #include "gui/menu_manager.hpp" #include "util/gettext.hpp" -AddonDialog::AddonDialog(TransferStatusPtr status) : +DownloadDialog::DownloadDialog(TransferStatusPtr status) : m_status(status), m_title() { @@ -33,20 +33,20 @@ AddonDialog::AddonDialog(TransferStatusPtr status) : } void -AddonDialog::update() +DownloadDialog::update() { AddonManager::current()->update(); update_text(); } void -AddonDialog::set_title(const std::string& title) +DownloadDialog::set_title(const std::string& title) { m_title = title; } void -AddonDialog::update_text() +DownloadDialog::update_text() { std::ostringstream out; out << m_title << "\n"; @@ -65,7 +65,7 @@ AddonDialog::update_text() } void -AddonDialog::on_abort() +DownloadDialog::on_abort() { AddonManager::current()->abort_install(); } diff --git a/src/supertux/menu/addon_dialog.hpp b/src/supertux/menu/download_dialog.hpp similarity index 78% rename from src/supertux/menu/addon_dialog.hpp rename to src/supertux/menu/download_dialog.hpp index 1b9ee1279..1853ae930 100644 --- a/src/supertux/menu/addon_dialog.hpp +++ b/src/supertux/menu/download_dialog.hpp @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -#ifndef HEADER_SUPERTUX_SUPERTUX_MENU_ADDON_DIALOG_HPP -#define HEADER_SUPERTUX_SUPERTUX_MENU_ADDON_DIALOG_HPP +#ifndef HEADER_SUPERTUX_SUPERTUX_MENU_DOWNLOAD_DIALOG_HPP +#define HEADER_SUPERTUX_SUPERTUX_MENU_DOWNLOAD_DIALOG_HPP #include "addon/addon_manager.hpp" #include "addon/addon_manager.hpp" @@ -24,14 +24,14 @@ class TransferStatus; using TransferStatusPtr = std::shared_ptr; -class AddonDialog : public Dialog +class DownloadDialog : public Dialog { private: TransferStatusPtr m_status; std::string m_title; public: - AddonDialog(TransferStatusPtr status); + DownloadDialog(TransferStatusPtr status); void set_title(const std::string& title); void update() override; @@ -42,8 +42,8 @@ private: void update_text(); private: - AddonDialog(const AddonDialog&) = delete; - AddonDialog& operator=(const AddonDialog&) = delete; + DownloadDialog(const DownloadDialog&) = delete; + DownloadDialog& operator=(const DownloadDialog&) = delete; }; #endif -- 2.11.0