gui2/tgame_paths: Rename to tgame_version

This is in preparation for repurposing it into a more full-fledged game
version/build info dialog.
This commit is contained in:
Ignacio R. Morelle 2015-07-12 18:39:58 -03:00
parent 10baf45766
commit 941e983d61
8 changed files with 26 additions and 26 deletions

View file

@ -70,7 +70,7 @@
#enddef
[window]
id = "game_paths"
id = "game_version"
description = "List of paths used by the game to locate resource and configuration files."
[resolution]

View file

@ -659,10 +659,10 @@
<Unit filename="../../src/gui/dialogs/game_delete.hpp" />
<Unit filename="../../src/gui/dialogs/game_load.cpp" />
<Unit filename="../../src/gui/dialogs/game_load.hpp" />
<Unit filename="../../src/gui/dialogs/game_paths.cpp" />
<Unit filename="../../src/gui/dialogs/game_paths.hpp" />
<Unit filename="../../src/gui/dialogs/game_save.cpp" />
<Unit filename="../../src/gui/dialogs/game_save.hpp" />
<Unit filename="../../src/gui/dialogs/game_version.cpp" />
<Unit filename="../../src/gui/dialogs/game_version.hpp" />
<Unit filename="../../src/gui/dialogs/gamestate_inspector.cpp" />
<Unit filename="../../src/gui/dialogs/gamestate_inspector.hpp" />
<Unit filename="../../src/gui/dialogs/helper.hpp" />

View file

@ -870,8 +870,8 @@ set(wesnoth-main_SRC
gui/dialogs/game_cache_options.cpp
gui/dialogs/game_delete.cpp
gui/dialogs/game_load.cpp
gui/dialogs/game_paths.cpp
gui/dialogs/game_save.cpp
gui/dialogs/game_version.cpp
gui/dialogs/gamestate_inspector.cpp
gui/dialogs/language_selection.cpp
gui/dialogs/lobby/lobby_data.cpp

View file

@ -419,8 +419,8 @@ wesnoth_sources = Split("""
gui/dialogs/game_cache_options.cpp
gui/dialogs/game_delete.cpp
gui/dialogs/game_load.cpp
gui/dialogs/game_paths.cpp
gui/dialogs/game_save.cpp
gui/dialogs/game_version.cpp
gui/dialogs/gamestate_inspector.cpp
gui/dialogs/language_selection.cpp
gui/dialogs/lobby/lobby_data.cpp

View file

@ -23,7 +23,7 @@
#include "gettext.hpp"
#include "gui/dialogs/advanced_graphics_options.hpp"
#include "gui/dialogs/game_cache_options.hpp"
#include "gui/dialogs/game_paths.hpp"
#include "gui/dialogs/game_version.hpp"
#include "gui/dialogs/mp_alerts_options.hpp"
#include "gui/dialogs/simple_item_selector.hpp"
#include "gui/dialogs/theme_list.hpp"
@ -1775,7 +1775,7 @@ bool show_theme_dialog(display& disp)
void show_paths_dialog(display& disp)
{
gui2::tgame_paths::display(disp.video());
gui2::tgame_version::display(disp.video());
}
void show_mp_alerts_dialog(display & disp)

View file

@ -14,7 +14,7 @@
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "gui/dialogs/game_paths.hpp"
#include "gui/dialogs/game_version.hpp"
#include "desktop/clipboard.hpp"
#include "desktop/open.hpp"
@ -37,7 +37,7 @@ namespace gui2
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_game_paths
* @order = 2_game_version
*
* == Game paths ==
*
@ -62,9 +62,9 @@ namespace gui2
* @end{table}
*/
REGISTER_DIALOG(game_paths)
REGISTER_DIALOG(game_version)
tgame_paths::tgame_paths()
tgame_version::tgame_version()
: path_wid_stem_("path_")
, copy_wid_stem_("copy_")
, browse_wid_stem_("browse_")
@ -80,7 +80,7 @@ tgame_paths::tgame_paths()
path_map_["cache"] = filesystem::get_cache_dir();
}
void tgame_paths::pre_show(CVideo& /*video*/, twindow& window)
void tgame_version::pre_show(CVideo& /*video*/, twindow& window)
{
FOREACH(const AUTO & path_ent, path_map_)
{
@ -99,12 +99,12 @@ void tgame_paths::pre_show(CVideo& /*video*/, twindow& window)
connect_signal_mouse_left_click(
copy_w,
boost::bind(&tgame_paths::copy_to_clipboard_callback,
boost::bind(&tgame_version::copy_to_clipboard_callback,
this,
path_path));
connect_signal_mouse_left_click(
browse_w,
boost::bind(&tgame_paths::browse_directory_callback,
boost::bind(&tgame_version::browse_directory_callback,
this,
path_path));
@ -121,12 +121,12 @@ void tgame_paths::pre_show(CVideo& /*video*/, twindow& window)
}
}
void tgame_paths::browse_directory_callback(const std::string& path)
void tgame_version::browse_directory_callback(const std::string& path)
{
desktop::open_object(path);
}
void tgame_paths::copy_to_clipboard_callback(const std::string& path)
void tgame_version::copy_to_clipboard_callback(const std::string& path)
{
desktop::clipboard::copy_to_clipboard(path, false);
}

View file

@ -12,8 +12,8 @@
See the COPYING file for more details.
*/
#ifndef GUI_DIALOGS_GAME_PATHS_HPP_INCLUDED
#define GUI_DIALOGS_GAME_PATHS_HPP_INCLUDED
#ifndef GUI_DIALOGS_GAME_VERSION_HPP_INCLUDED
#define GUI_DIALOGS_GAME_VERSION_HPP_INCLUDED
#include "gui/dialogs/dialog.hpp"
@ -22,13 +22,13 @@
namespace gui2
{
class tgame_paths : public tdialog
class tgame_version : public tdialog
{
public:
/**
* Constructor.
*/
tgame_paths();
tgame_version();
/**
* The display function.
@ -37,7 +37,7 @@ public:
*/
static void display(CVideo& video)
{
tgame_paths().show(video);
tgame_version().show(video);
}
private:

View file

@ -46,7 +46,7 @@
#include "gui/dialogs/game_cache_options.hpp"
#include "gui/dialogs/game_delete.hpp"
#include "gui/dialogs/game_load.hpp"
#include "gui/dialogs/game_paths.hpp"
#include "gui/dialogs/game_version.hpp"
#include "gui/dialogs/game_save.hpp"
#include "gui/dialogs/gamestate_inspector.hpp"
#include "gui/dialogs/language_selection.hpp"
@ -393,7 +393,7 @@ BOOST_AUTO_TEST_CASE(test_gui2)
test<gui2::tgame_cache_options>();
test<gui2::tgame_delete>();
test<gui2::tgame_load>();
test<gui2::tgame_paths>();
test<gui2::tgame_version>();
test<gui2::tgame_save>();
test<gui2::tgame_save_message>();
test<gui2::tgame_save_oos>();
@ -612,11 +612,11 @@ struct twrapper<gui2::tgame_load>
};
template<>
struct twrapper<gui2::tgame_paths>
struct twrapper<gui2::tgame_version>
{
static gui2::tgame_paths* create()
static gui2::tgame_version* create()
{
return new gui2::tgame_paths();
return new gui2::tgame_version();
}
};