widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #10154
[Merge] lp:~widelands-dev/widelands/widelands_includes into lp:widelands
GunChleoc has proposed merging lp:~widelands-dev/widelands/widelands_includes into lp:widelands.
Commit message:
Removed unused references to wlapplication.h and moved Options into a separate library.
Requested reviews:
Widelands Developers (widelands-dev)
For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/widelands_includes/+merge/324029
Small dependency cleanup.
--
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/widelands_includes into lp:widelands.
=== modified file 'src/CMakeLists.txt'
--- src/CMakeLists.txt 2017-02-28 20:07:07 +0000
+++ src/CMakeLists.txt 2017-05-14 20:09:11 +0000
@@ -122,6 +122,7 @@
sound
ui_basic
ui_fsmenu
+ ui_fsmenu_options
wui
)
=== modified file 'src/editor/CMakeLists.txt'
--- src/editor/CMakeLists.txt 2017-02-28 20:07:07 +0000
+++ src/editor/CMakeLists.txt 2017-05-14 20:09:11 +0000
@@ -108,7 +108,6 @@
scripting_lua_interface
scripting_lua_table
ui_basic
- widelands_ball_of_mud
wui
wui_common
wui_field_overlay_manager
=== modified file 'src/editor/editorinteractive.cc'
--- src/editor/editorinteractive.cc 2017-05-13 11:25:24 +0000
+++ src/editor/editorinteractive.cc 2017-05-14 20:09:11 +0000
@@ -50,7 +50,6 @@
#include "scripting/lua_table.h"
#include "ui_basic/messagebox.h"
#include "ui_basic/progresswindow.h"
-#include "wlapplication.h"
#include "wui/field_overlay_manager.h"
#include "wui/game_tips.h"
#include "wui/interactive_base.h"
=== modified file 'src/editor/ui_menus/tool_place_critter_options_menu.cc'
--- src/editor/ui_menus/tool_place_critter_options_menu.cc 2017-05-13 11:25:24 +0000
+++ src/editor/ui_menus/tool_place_critter_options_menu.cc 2017-05-14 20:09:11 +0000
@@ -32,7 +32,6 @@
#include "ui_basic/button.h"
#include "ui_basic/checkbox.h"
#include "ui_basic/textarea.h"
-#include "wlapplication.h"
namespace {
UI::Checkbox* create_critter_checkbox(UI::Panel* parent,
=== modified file 'src/editor/ui_menus/tool_place_immovable_options_menu.cc'
--- src/editor/ui_menus/tool_place_immovable_options_menu.cc 2017-05-13 11:25:24 +0000
+++ src/editor/ui_menus/tool_place_immovable_options_menu.cc 2017-05-14 20:09:11 +0000
@@ -31,7 +31,6 @@
#include "ui_basic/button.h"
#include "ui_basic/checkbox.h"
#include "ui_basic/textarea.h"
-#include "wlapplication.h"
namespace {
=== modified file 'src/logic/CMakeLists.txt'
--- src/logic/CMakeLists.txt 2017-02-28 20:07:07 +0000
+++ src/logic/CMakeLists.txt 2017-05-14 20:09:11 +0000
@@ -32,7 +32,6 @@
logic_constants
profile
ui_basic
- widelands_ball_of_mud
wui
)
@@ -255,7 +254,6 @@
scripting_lua_table
sound
ui_basic
- widelands_ball_of_mud
wui
wui_mapview_pixelfunctions
)
=== modified file 'src/logic/constants.h'
--- src/logic/constants.h 2017-01-25 18:55:59 +0000
+++ src/logic/constants.h 2017-05-14 20:09:11 +0000
@@ -25,4 +25,7 @@
/// How often are statistics to be sampled.
constexpr uint32_t kStatisticsSampleTime = 30000;
+/// Default autosave interval in minutes
+constexpr int kDefaultAutosaveInterval = 15;
+
#endif // end of include guard: WL_LOGIC_CONSTANTS_H
=== modified file 'src/logic/game.cc'
--- src/logic/game.cc 2017-02-28 12:59:39 +0000
+++ src/logic/game.cc 2017-05-14 20:09:11 +0000
@@ -63,7 +63,6 @@
#include "scripting/logic.h"
#include "scripting/lua_table.h"
#include "ui_basic/progresswindow.h"
-#include "wlapplication.h"
#include "wui/game_tips.h"
#include "wui/interactive_player.h"
=== modified file 'src/logic/game.h'
--- src/logic/game.h 2017-01-25 18:55:59 +0000
+++ src/logic/game.h 2017-05-14 20:09:11 +0000
@@ -35,8 +35,6 @@
}
struct ComputerPlayer;
class InteractivePlayer;
-struct GameMainMenuLoadGame;
-struct WLApplication;
struct GameSettings;
class GameController;
@@ -97,8 +95,6 @@
friend struct GameClassPacket;
friend struct GamePlayerInfoPacket;
friend struct GameLoader;
- friend struct ::GameMainMenuLoadGame;
- friend struct ::WLApplication;
Game();
~Game();
=== modified file 'src/logic/replay_game_controller.cc'
--- src/logic/replay_game_controller.cc 2017-01-25 18:55:59 +0000
+++ src/logic/replay_game_controller.cc 2017-05-14 20:09:11 +0000
@@ -22,7 +22,6 @@
#include "logic/game.h"
#include "logic/replay.h"
#include "ui_basic/messagebox.h"
-#include "wlapplication.h"
#include "wui/interactive_base.h"
ReplayGameController::ReplayGameController(Widelands::Game& game, const std::string& filename)
=== modified file 'src/logic/save_handler.cc'
--- src/logic/save_handler.cc 2017-04-23 07:09:25 +0000
+++ src/logic/save_handler.cc 2017-05-14 20:09:11 +0000
@@ -32,9 +32,9 @@
#include "base/wexception.h"
#include "game_io/game_saver.h"
#include "io/filesystem/filesystem.h"
+#include "logic/constants.h"
#include "logic/game.h"
#include "logic/game_controller.h"
-#include "wlapplication.h"
#include "wui/interactive_base.h"
// The actual work of saving is done by the GameSaver
@@ -49,7 +49,7 @@
save_filename_(""),
autosave_filename_("wl_autosave"),
fs_type_(FileSystem::ZIP),
- autosave_interval_in_ms_(DEFAULT_AUTOSAVE_INTERVAL * 60 * 1000),
+ autosave_interval_in_ms_(kDefaultAutosaveInterval * 60 * 1000),
number_of_rolls_(5) {
}
@@ -204,7 +204,7 @@
fs_type_ = global.get_bool("nozip", false) ? FileSystem::DIR : FileSystem::ZIP;
- autosave_interval_in_ms_ = global.get_int("autosave", DEFAULT_AUTOSAVE_INTERVAL * 60) * 1000;
+ autosave_interval_in_ms_ = global.get_int("autosave", kDefaultAutosaveInterval * 60) * 1000;
next_save_realtime_ = realtime + autosave_interval_in_ms_;
=== modified file 'src/logic/save_handler.h'
--- src/logic/save_handler.h 2017-04-23 07:09:25 +0000
+++ src/logic/save_handler.h 2017-05-14 20:09:11 +0000
@@ -26,13 +26,13 @@
#include <stdint.h>
#include "io/filesystem/filesystem.h"
+#include "logic/constants.h"
namespace Widelands {
class Game;
}
-// default autosave interval in minutes
-#define DEFAULT_AUTOSAVE_INTERVAL 15
+
/**
* Takes care of manual or autosave via think().
=== modified file 'src/logic/single_player_game_controller.cc'
--- src/logic/single_player_game_controller.cc 2017-01-25 18:55:59 +0000
+++ src/logic/single_player_game_controller.cc 2017-05-14 20:09:11 +0000
@@ -25,7 +25,6 @@
#include "logic/playercommand.h"
#include "logic/playersmanager.h"
#include "profile/profile.h"
-#include "wlapplication.h"
SinglePlayerGameController::SinglePlayerGameController(Widelands::Game& game,
bool const useai,
=== modified file 'src/network/network.cc'
--- src/network/network.cc 2017-05-11 10:45:44 +0000
+++ src/network/network.cc 2017-05-14 20:09:11 +0000
@@ -20,7 +20,6 @@
#include "network/network.h"
#include "base/log.h"
-#include "wlapplication.h"
CmdNetCheckSync::CmdNetCheckSync(uint32_t const dt, SyncCallback* const cb)
: Command(dt), callback_(cb) {
=== modified file 'src/ui_basic/button.cc'
--- src/ui_basic/button.cc 2017-05-13 11:25:24 +0000
+++ src/ui_basic/button.cc 2017-05-14 20:09:11 +0000
@@ -25,7 +25,6 @@
#include "graphic/text_constants.h"
#include "graphic/text_layout.h"
#include "ui_basic/mouse_constants.h"
-#include "wlapplication.h"
namespace UI {
=== modified file 'src/ui_basic/listselect.cc'
--- src/ui_basic/listselect.cc 2017-05-13 11:25:24 +0000
+++ src/ui_basic/listselect.cc 2017-05-14 20:09:11 +0000
@@ -32,7 +32,6 @@
#include "graphic/text_constants.h"
#include "graphic/text_layout.h"
#include "ui_basic/mouse_constants.h"
-#include "wlapplication.h"
constexpr int kMargin = 2;
=== modified file 'src/ui_basic/scrollbar.cc'
--- src/ui_basic/scrollbar.cc 2017-05-13 18:48:26 +0000
+++ src/ui_basic/scrollbar.cc 2017-05-14 20:09:11 +0000
@@ -24,7 +24,6 @@
#include "graphic/graphic.h"
#include "graphic/rendertarget.h"
#include "ui_basic/mouse_constants.h"
-#include "wlapplication.h"
namespace UI {
=== modified file 'src/ui_basic/table.cc'
--- src/ui_basic/table.cc 2017-05-13 13:14:29 +0000
+++ src/ui_basic/table.cc 2017-05-14 20:09:11 +0000
@@ -32,7 +32,6 @@
#include "ui_basic/button.h"
#include "ui_basic/mouse_constants.h"
#include "ui_basic/scrollbar.h"
-#include "wlapplication.h"
namespace UI {
=== modified file 'src/ui_fsmenu/CMakeLists.txt'
--- src/ui_fsmenu/CMakeLists.txt 2017-03-29 16:20:47 +0000
+++ src/ui_fsmenu/CMakeLists.txt 2017-05-14 20:09:11 +0000
@@ -1,3 +1,27 @@
+wl_library(ui_fsmenu_options
+ SRCS
+ options.cc
+ options.h
+ DEPENDS
+ base_exceptions
+ base_i18n
+ base_log
+ graphic
+ graphic_fonthandler
+ graphic_text
+ graphic_text_constants
+ helper
+ io_filesystem
+ logic_constants
+ scripting_lua_interface
+ scripting_lua_table
+ ui_basic
+ ui_fsmenu
+ profile
+ sound
+ widelands_ball_of_mud
+)
+
wl_library(ui_fsmenu
SRCS
about.cc
@@ -32,8 +56,6 @@
multiplayer.h
netsetup_lan.cc
netsetup_lan.h
- options.cc
- options.h
singleplayer.cc
singleplayer.h
DEPENDS
@@ -49,7 +71,6 @@
graphic_image_io
graphic_playercolor
graphic_surface
- graphic_text
graphic_text_constants
helper
io_filesystem
@@ -63,9 +84,7 @@
scripting_coroutine
scripting_lua_interface
scripting_lua_table
- sound
ui_basic
- widelands_ball_of_mud
wui
wui_chat_ui
wui_common
=== modified file 'src/ui_fsmenu/options.cc'
--- src/ui_fsmenu/options.cc 2017-05-13 11:25:24 +0000
+++ src/ui_fsmenu/options.cc 2017-05-14 20:09:11 +0000
@@ -38,7 +38,7 @@
#include "graphic/text_constants.h"
#include "helper.h"
#include "io/filesystem/layered_filesystem.h"
-#include "logic/save_handler.h"
+#include "logic/constants.h"
#include "profile/profile.h"
#include "scripting/lua_interface.h"
#include "scripting/lua_table.h"
@@ -576,7 +576,7 @@
opt.message_sound = opt_section_.get_bool("sound_at_message", true);
// Saving options
- opt.autosave = opt_section_.get_int("autosave", DEFAULT_AUTOSAVE_INTERVAL * 60);
+ opt.autosave = opt_section_.get_int("autosave", kDefaultAutosaveInterval * 60);
opt.rolling_autosave = opt_section_.get_int("rolling_autosave", 5);
opt.zip = !opt_section_.get_bool("nozip", false);
opt.write_syncstreams = opt_section_.get_bool("write_syncstreams", true);
=== modified file 'src/wui/CMakeLists.txt'
--- src/wui/CMakeLists.txt 2017-03-04 06:55:30 +0000
+++ src/wui/CMakeLists.txt 2017-05-14 20:09:11 +0000
@@ -103,7 +103,6 @@
quicknavigation.h
DEPENDS
base_geometry
- widelands_ball_of_mud
wui_mapview
)
@@ -272,7 +271,6 @@
scripting_lua_table
sound
ui_basic
- widelands_ball_of_mud
wui_chat_ui
wui_economy_options
wui_edge_overlay_manager
=== modified file 'src/wui/game_summary.cc'
--- src/wui/game_summary.cc 2017-04-26 07:32:22 +0000
+++ src/wui/game_summary.cc 2017-05-14 20:09:11 +0000
@@ -34,7 +34,6 @@
#include "ui_basic/table.h"
#include "ui_basic/textarea.h"
#include "ui_basic/unique_window.h"
-#include "wlapplication.h"
#include "wui/interactive_gamebase.h"
#include "wui/interactive_player.h"
=== modified file 'src/wui/interactive_base.cc'
--- src/wui/interactive_base.cc 2017-05-13 18:48:26 +0000
+++ src/wui/interactive_base.cc 2017-05-14 20:09:11 +0000
@@ -45,7 +45,6 @@
#include "logic/player.h"
#include "profile/profile.h"
#include "scripting/lua_interface.h"
-#include "wlapplication.h"
#include "wui/edge_overlay_manager.h"
#include "wui/field_overlay_manager.h"
#include "wui/game_chat_menu.h"
=== modified file 'src/wui/quicknavigation.cc'
--- src/wui/quicknavigation.cc 2017-01-25 18:55:59 +0000
+++ src/wui/quicknavigation.cc 2017-05-14 20:09:11 +0000
@@ -19,8 +19,6 @@
#include "wui/quicknavigation.h"
-#include "wlapplication.h"
-
QuickNavigation::QuickNavigation(MapView* map_view) : map_view_(map_view), landmarks_(10) {
map_view->changeview.connect([this] { view_changed(); });
havefirst_ = false;
=== modified file 'src/wui/soldierlist.cc'
--- src/wui/soldierlist.cc 2017-05-13 18:48:26 +0000
+++ src/wui/soldierlist.cc 2017-05-14 20:09:11 +0000
@@ -33,7 +33,6 @@
#include "logic/player.h"
#include "ui_basic/box.h"
#include "ui_basic/button.h"
-#include "wlapplication.h"
#include "wui/interactive_gamebase.h"
#include "wui/soldiercapacitycontrol.h"
Follow ups