Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/beautiful_correct_lines into lp:widelands
The crash doesn't sound as if it is connected to this bug. Can you run Widelands in gdb to get a stack trace, and create a new bug report? We will also need the savegame. -- https://code.launchpad.net/~widelands-dev/widelands/beautiful_correct_lines/+merge/284517 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/beautiful_correct_lines. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1542238-log into lp:widelands
LGTM, but I think we need some log output in the classes that call this function as well, in case the non-matching Immovable == nullptr. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1542238-log/+merge/285237 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1542238-log into lp:widelands. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/simplify_setbobdescription into lp:widelands
Review: Approve Tested and code LGTM. How about we add some more consistency in worker/production program names? e.g. we have: check_soldier playFX create_bob geologist-find The underscores are most common, so I am in favour of renaming playFX -> play_sound geologist-find -> geologist_find -- https://code.launchpad.net/~widelands-dev/widelands/simplify_setbobdescription/+merge/285236 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/simplify_setbobdescription. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/fix_removal_of_ports into lp:widelands
Review: Approve Tested and code LGTM :) -- https://code.launchpad.net/~widelands-dev/widelands/fix_removal_of_ports/+merge/285235 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/fix_removal_of_ports. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1542214 into lp:widelands
GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1542214 into lp:widelands. Commit message: Consistent ordering of OK/Cancel buttons - the OK button is always on the right for LTR languages, and on the left for RTL languages. Requested reviews: Widelands Developers (widelands-dev) For more details, see: https://code.launchpad.net/~widelands-dev/widelands/bug-1542214/+merge/285260 Consistent ordering of OK/Cancel buttons - the OK button is always on the right for LTR languages, and on the left for RTL languages. It would be nice to have a specialized Box object for button rows, but that's something I can look into for Build 20. -- Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1542214 into lp:widelands. === modified file 'src/editor/ui_menus/editor_main_menu_load_or_save_map.cc' --- src/editor/ui_menus/editor_main_menu_load_or_save_map.cc 2016-01-29 08:37:22 + +++ src/editor/ui_menus/editor_main_menu_load_or_save_map.cc 2016-02-06 11:02:27 + @@ -25,6 +25,7 @@ #include "base/i18n.h" #include "base/wexception.h" #include "editor/editorinteractive.h" +#include "graphic/font_handler1.h" #include "graphic/graphic.h" #include "io/filesystem/filesystem.h" #include "io/filesystem/layered_filesystem.h" @@ -50,7 +51,7 @@ this, right_column_x_, tabley_, get_inner_w() - right_column_x_ - padding_, tableh_), ok_(this, "ok", - get_inner_w() / 2 - butw_ - padding_, + UI::g_fh1->fontset().is_rtl() ? get_inner_w() / 2 - butw_ - padding_ : get_inner_w() / 2 + padding_, get_inner_h() - padding_ - buth_, butw_, buth_, @@ -58,7 +59,9 @@ _("OK")), cancel_(this, "cancel", - get_inner_w() / 2 + padding_, + UI::g_fh1->fontset().is_rtl() ? + get_inner_w() / 2 + padding_ : + get_inner_w() / 2 - butw_ - padding_, get_inner_h() - padding_ - buth_, butw_, buth_, === modified file 'src/editor/ui_menus/editor_main_menu_map_options.cc' --- src/editor/ui_menus/editor_main_menu_map_options.cc 2016-01-31 10:57:58 + +++ src/editor/ui_menus/editor_main_menu_map_options.cc 2016-02-06 11:02:27 + @@ -26,6 +26,7 @@ #include "base/i18n.h" #include "editor/editorinteractive.h" +#include "graphic/font_handler1.h" #include "graphic/graphic.h" #include "logic/map.h" #include "ui_basic/editbox.h" @@ -57,13 +58,15 @@ max_w_(get_inner_w() - 2 * padding_), ok_( this, "ok", - padding_, get_inner_h() - padding_ - buth_, + UI::g_fh1->fontset().is_rtl() ? padding_ : butw_ + 2 * padding_, + get_inner_h() - padding_ - buth_, butw_, buth_, g_gr->images().get("images/ui_basic/but5.png"), _("OK")), cancel_( this, "cancel", - butw_ + 2 * padding_, get_inner_h() - padding_ - buth_, + UI::g_fh1->fontset().is_rtl() ? butw_ + 2 * padding_ : padding_, + get_inner_h() - padding_ - buth_, butw_, buth_, g_gr->images().get("images/ui_basic/but1.png"), _("Cancel")), === modified file 'src/editor/ui_menus/editor_main_menu_new_map.cc' --- src/editor/ui_menus/editor_main_menu_new_map.cc 2016-01-29 08:37:22 + +++ src/editor/ui_menus/editor_main_menu_new_map.cc 2016-02-06 11:02:27 + @@ -28,6 +28,7 @@ #include "base/i18n.h" #include "base/macros.h" #include "editor/editorinteractive.h" +#include "graphic/font_handler1.h" #include "graphic/graphic.h" #include "graphic/image.h" #include "graphic/texture.h" @@ -92,8 +93,13 @@ cancel_button_.sigclicked.connect(boost::bind(&MainMenuNewMap::clicked_cancel, this)); ok_button_.sigclicked.connect(boost::bind(&MainMenuNewMap::clicked_create_map, this)); - button_box_.add(&cancel_button_, UI::Align::kLeft); - button_box_.add(&ok_button_, UI::Align::kLeft); + if (UI::g_fh1->fontset().is_rtl()) { + button_box_.add(&ok_button_, UI::Align::kLeft); + button_box_.add(&cancel_button_, UI::Align::kLeft); + } else { + button_box_.add(&cancel_button_, UI::Align::kLeft); + button_box_.add(&ok_button_, UI::Align::kLeft); + } box_.add(&button_box_, UI::Align::kLeft); box_.set_size(box_width_, === modified file 'src/editor/ui_menus/editor_main_menu_random_map.cc' --- src/editor/ui_menus/editor_main_menu_random_map.cc 2016-01-31 10:57:58 + +++ src/editor/ui_menus/editor_main_menu_random_map.cc 2016-02-06 11:02:27 + @@ -292,8 +292,13 @@ // -- "Generate Map" button -- cancel_button_.sigclicked.connect(boost::bind(&MainMenuNewRandomMap::clicked_cancel, this)); ok_button_.sigclicked.connect(boost::bind(&MainMenuNewRandomMap::clicked_create_map, this)); - button_box_.add(&cancel_button_, UI::Align::kLeft); - button_box_.add(&ok_button_, UI::Align::kLeft); + if (UI::g_fh1->fontset().is_rtl()) { + button_box_.add(&ok_button_, UI::Align::kLeft); + button_box_.add(&cancel_button_, UI::Align::kLeft); + } else { + button_box_.add(&cancel_button_, UI::Align::kLeft); + button_box_.add(&ok_button_, U
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/fix_removal_of_ports into lp:widelands
@bunnybot merge -- https://code.launchpad.net/~widelands-dev/widelands/fix_removal_of_ports/+merge/285235 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/fix_removal_of_ports. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/fix_removal_of_ports into lp:widelands
Continuous integration builds have changed state: Travis build 589. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/107325134. Appveyor build 451. State: failed. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_fix_removal_of_ports-451. -- https://code.launchpad.net/~widelands-dev/widelands/fix_removal_of_ports/+merge/285235 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/fix_removal_of_ports. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/simplify_setbobdescription into lp:widelands
Continuous integration builds have changed state: Travis build 588. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/107324945. Appveyor build 450. State: failed. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_simplify_setbobdescription-450. -- https://code.launchpad.net/~widelands-dev/widelands/simplify_setbobdescription/+merge/285236 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/simplify_setbobdescription. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/add_hint_to_map_info into lp:widelands
Continuous integration builds have changed state: Travis build 586. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/107308861. Appveyor build 448. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_add_hint_to_map_info-448. -- https://code.launchpad.net/~widelands-dev/widelands/add_hint_to_map_info/+merge/285228 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/add_hint_to_map_info. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/fix_removal_of_ports into lp:widelands
The proposal to merge lp:~widelands-dev/widelands/fix_removal_of_ports into lp:widelands has been updated. Status: Needs review => Merged For more details, see: https://code.launchpad.net/~widelands-dev/widelands/fix_removal_of_ports/+merge/285235 -- Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/fix_removal_of_ports. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/add_hint_to_map_info into lp:widelands
@bunnybot merge -- https://code.launchpad.net/~widelands-dev/widelands/add_hint_to_map_info/+merge/285228 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/add_hint_to_map_info. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/add_hint_to_map_info into lp:widelands
The proposal to merge lp:~widelands-dev/widelands/add_hint_to_map_info into lp:widelands has been updated. Status: Needs review => Merged For more details, see: https://code.launchpad.net/~widelands-dev/widelands/add_hint_to_map_info/+merge/285228 -- Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/add_hint_to_map_info. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/different_replay_names into lp:widelands
The proposal to merge lp:~widelands-dev/widelands/different_replay_names into lp:widelands has been updated. Commit Message changed to: Give syncstreams and replays predictable names for each client instance. Before, when one two clients joined the same network game from one computer, those clients would want to write to the same replay/syncstream file. In the best case this was a race condition, in the worst it could lead to crashes and corrupted replay/syncstrem files. For more details, see: https://code.launchpad.net/~widelands-dev/widelands/different_replay_names/+merge/285265 -- Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/different_replay_names into lp:widelands. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/different_replay_names into lp:widelands
SirVer has proposed merging lp:~widelands-dev/widelands/different_replay_names into lp:widelands. Commit message: Give syncstreams and replays predictable names for each client instance. Before, when one two clients joined the same network game from one computer, those clients would want to write to the same replay/syncstream file. In the best case this was a race condition, in the worst it could lead to crashes and corrupted replay/syncstrem files. Requested reviews: Widelands Developers (widelands-dev) Related bugs: Bug #1413577 in widelands: "Multiplayer client crashes - problem with file/directory: /binary/" https://bugs.launchpad.net/widelands/+bug/1413577 For more details, see: https://code.launchpad.net/~widelands-dev/widelands/different_replay_names/+merge/285265 -- Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/different_replay_names into lp:widelands. === modified file 'src/logic/game.cc' --- src/logic/game.cc 2016-01-29 13:43:56 + +++ src/logic/game.cc 2016-02-06 15:29:39 + @@ -24,6 +24,7 @@ #include #include +#include #ifndef _WIN32 #include // for a dirty hack. #include // for usleep @@ -73,10 +74,7 @@ //#define SYNC_DEBUG Game::SyncWrapper::~SyncWrapper() { - if (m_dump) { - delete m_dump; - m_dump = nullptr; - + if (m_dump != nullptr) { if (!m_syncstreamsave) g_fs->fs_unlink(m_dumpfname); } @@ -84,7 +82,7 @@ void Game::SyncWrapper::start_dump(const std::string & fname) { m_dumpfname = fname + ".wss"; - m_dump = g_fs->open_stream_write(m_dumpfname); + m_dump.reset(g_fs->open_stream_write(m_dumpfname)); } static const unsigned long long MINIMUM_DISK_SPACE = 256 * 1024 * 1024; @@ -98,29 +96,21 @@ log("\n"); #endif - if - (m_dump && - static_cast(m_counter - m_next_diskspacecheck) >= 0) - { + if (m_dump != nullptr && static_cast(m_counter - m_next_diskspacecheck) >= 0) { m_next_diskspacecheck = m_counter + 16 * 1024 * 1024; if (g_fs->disk_space() < MINIMUM_DISK_SPACE) { log("Stop writing to syncstream file: disk is getting full.\n"); - delete m_dump; - m_dump = nullptr; + m_dump.reset(); } } - if (m_dump) { + if (m_dump != nullptr) { try { m_dump->data(sync_data, size); } catch (const WException &) { - log -("Writing to syncstream file %s failed. Stop synctream dump.\n", - m_dumpfname.c_str()); - - delete m_dump; - m_dump = nullptr; + log("Writing to syncstream file %s failed. Stop synctream dump.\n", m_dumpfname.c_str()); + m_dump.reset(); } } @@ -137,7 +127,6 @@ m_writesyncstream (false), m_state (gs_notrunning), m_cmdqueue(*this), - m_replaywriter(nullptr), /** TRANSLATORS: Win condition for this game has not been set. */ m_win_condition_displayname(_("Not set")) { @@ -145,7 +134,6 @@ Game::~Game() { - delete m_replaywriter; } @@ -259,7 +247,7 @@ set_game_controller(new SinglePlayerGameController(*this, true, 1)); try { - bool const result = run(&loaderUI, NewSPScenario, script_to_run, false); + bool const result = run(&loaderUI, NewSPScenario, script_to_run, false, "single_player"); delete m_ctrl; m_ctrl = nullptr; return result; @@ -427,7 +415,7 @@ set_game_controller(new SinglePlayerGameController(*this, true, player_nr)); try { - bool const result = run(&loaderUI, Loaded, script_to_run, false); + bool const result = run(&loaderUI, Loaded, script_to_run, false, "single_player"); delete m_ctrl; m_ctrl = nullptr; return result; @@ -478,7 +466,7 @@ */ bool Game::run (UI::ProgressWindow * loader_ui, StartGameType const start_game_type, - const std::string& script_to_run, bool replay) + const std::string& script_to_run, bool replay, const std::string& prefix_for_replays) { m_replay = replay; postload(); @@ -547,16 +535,13 @@ if (m_writereplay || m_writesyncstream) { // Derive a replay filename from the current time - std::string fname(REPLAY_DIR); - fname += '/'; - fname += timestring(); - fname += REPLAY_SUFFIX; - + const std::string fname = (boost::format("%s/%s_%s%s") % REPLAY_DIR % timestring() % + prefix_for_replays % REPLAY_SUFFIX).str(); if (m_writereplay) { log("Starting replay writer\n"); assert(!m_replaywriter); - m_replaywriter = new ReplayWriter(*this, fname); + m_replaywriter.reset(new ReplayWriter(*this, fname)); log("Replay writer has started\n"); } === modified file 'src/logic/game.h' --- src/logic/game.h 2015-11-11 09:53:54 + +++ src/logic/game.h 2016-02-06 15:29:39 + @@ -20,6 +20,8 @@ #ifndef WL_LOGIC_GAME_H #define WL_LOGIC_GAME_H +#include + #include "base/md5.h" #include "io/streamwrite.h" #include "logic/cmd_queue.h" @@ -108,7 +110,11 @@ void init_newgame (UI::ProgressWindow *, const GameSettings &); void init_savegame(UI::ProgressWindow *, const GameSettings &); enum StartGameType {NewSPScenario, New
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/dedicated_out_of_main into lp:widelands
SirVer has proposed merging lp:~widelands-dev/widelands/dedicated_out_of_main into lp:widelands. Commit message: Remove --dedicated commandline option and associated code. Rational: --dedicated allowed people who could host a game to keep a server running that people who could not host could control to play games. This is a great feature, but it came at a price: dedicated required a lot of if () else () in many places, i.e. it was very widespread in the code. One of the most pervasive problems was that dedicated could not spin up a Graphic() instance, therfore g_gr == nullptr and a lot of code did not check for that - since g_gr is never null if the game is run normally. Therefore it was easily broken - I am not sure if it worked in b18, but it has not worked for at least a year. Another problem was that dedicated is essentially a host instance, i.e. it has to run the full game logic for each game that is played. So it is prohibitively expensive to run it (for example) on the server. So we would have needed a donator to even provide another instance that could be used. We also have a plan of fixing the hosting problem in a principled way: through the proxy server that is spawned by the metaserver that will forward packets between players. Unfortunately, this is not implemented yet and it will not be for b19. Requested reviews: Widelands Developers (widelands-dev) Related bugs: Bug #1322869 in widelands: "dedicated server broken due to calls to g_gr" https://bugs.launchpad.net/widelands/+bug/1322869 Bug #1330068 in widelands: "Widelands should never run as a daemon" https://bugs.launchpad.net/widelands/+bug/1330068 Bug #1355397 in widelands: "Dedication server (cli option) core dumps on non-existing files" https://bugs.launchpad.net/widelands/+bug/1355397 Bug #1416864 in widelands: "--dedicated issues: needs X, not killable, thrashes X" https://bugs.launchpad.net/widelands/+bug/1416864 For more details, see: https://code.launchpad.net/~widelands-dev/widelands/dedicated_out_of_main/+merge/285268 Requires https://code.launchpad.net/~widelands-dev/widelands/different_replay_names/+merge/285265 to be merged first. Spend an hour today trying to fix --dedicated. Then decided it was too difficult after I could not follow the various state machines anymore and after it kept crashing. Now I ripped it out. This closes a few bugs related to --dedicated and simplifies the code, but of course the dedicated feature is gone for good. -- Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/dedicated_out_of_main into lp:widelands. === modified file 'src/CMakeLists.txt' --- src/CMakeLists.txt 2014-12-06 12:22:35 + +++ src/CMakeLists.txt 2016-02-06 16:06:14 + @@ -106,7 +106,6 @@ graphic_text graphic_text_layout helper -io_dedicated_log io_filesystem logic logic_game_controller @@ -130,8 +129,6 @@ base_exceptions ) - - if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "OpenBSD") target_link_libraries(widelands_ball_of_mud ${EXECINFO_LIBRARY}) endif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "OpenBSD") === modified file 'src/io/CMakeLists.txt' --- src/io/CMakeLists.txt 2014-11-28 16:40:55 + +++ src/io/CMakeLists.txt 2016-02-06 16:06:14 + @@ -44,16 +44,3 @@ io_stream third_party_minizip ) - - -wl_library(io_dedicated_log - SRCS -dedicated_log.h -dedicated_log.cc - DEPENDS -base_i18n -base_log -chat -io_fileread -io_filesystem -) === removed file 'src/io/dedicated_log.cc' --- src/io/dedicated_log.cc 2014-09-30 05:41:55 + +++ src/io/dedicated_log.cc 1970-01-01 00:00:00 + @@ -1,342 +0,0 @@ -/* - * Copyright (C) 2012-2013 by the Widelands Development Team - * - * 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 (at your option) 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, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - */ - -#include "io/dedicated_log.h" - -#include - -#include - -#include "base/i18n.h" -#include "base/log.h" -#include "io/filesystem/layered_filesystem.h" - -/// The dedicated server logger -static DedicatedLog * logger; - -extern std::ostream & wout; - -void dedicatedlog(const char * const fmt, ...) { - char buffer[2048]; - va_list va; - - va_start(va, fmt); - vsnprintf(buffer, sizeof(buffer),
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/beautiful_correct_lines into lp:widelands
Review: Approve testing Revied the code and plyed for quit a while, all fine for me -- https://code.launchpad.net/~widelands-dev/widelands/beautiful_correct_lines/+merge/284517 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/beautiful_correct_lines. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1289943 into lp:widelands
Bunnybot encountered an error while working on this merge proposal: -- https://code.launchpad.net/~widelands-dev/widelands/bug-1289943/+merge/285201 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1289943 into lp:widelands. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/parent_directory into lp:widelands
SirVer has proposed merging lp:~widelands-dev/widelands/parent_directory into lp:widelands. Commit message: create_parent_directory() uses the code from FileSystem now instead of rolling its own. Also cleaned up mapdata.h and moved implementation into the new mapdata.cc. Requested reviews: Widelands Developers (widelands-dev) Related bugs: Bug #1422147 in widelands: "Parent directory can't be navigated while saveloading" https://bugs.launchpad.net/widelands/+bug/1422147 For more details, see: https://code.launchpad.net/~widelands-dev/widelands/parent_directory/+merge/285276 Should fix the attached bug, though I have no windows system for testing. Mac OS X still works unaffacted, so Linux should to. -- Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/parent_directory into lp:widelands. === modified file 'src/io/filesystem/filesystem.h' --- src/io/filesystem/filesystem.h 2014-12-03 07:15:40 + +++ src/io/filesystem/filesystem.h 2016-02-06 19:02:37 + @@ -122,6 +122,9 @@ ///Given a filename, return the name with any path stripped off. static const char * fs_filename(const char * n); + + // Everything before the final separator (/ or \) in 'full_path'. The + // returned value is either the empty string or ends with a separator. static std::string fs_dirname(const std::string& full_path); ///Given a filename (without any path), return the extension, if any. === modified file 'src/wui/CMakeLists.txt' --- src/wui/CMakeLists.txt 2016-01-18 19:35:25 + +++ src/wui/CMakeLists.txt 2016-02-06 19:02:37 + @@ -58,6 +58,7 @@ SRCS mapdetails.cc mapdetails.h +mapdata.cc mapdata.h maptable.cc maptable.h === added file 'src/wui/mapdata.cc' --- src/wui/mapdata.cc 1970-01-01 00:00:00 + +++ src/wui/mapdata.cc 2016-02-06 19:02:37 + @@ -0,0 +1,140 @@ +/* + * Copyright (C) 2006-2016 by the Widelands Development Team + * + * 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 (at your option) 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, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ + +#include "io/filesystem/filesystem.h" +#include "wui/mapdata.h" + +MapData::MapData() : authors(""), nrplayers(0), width(0), height(0), + maptype(MapData::MapType::kNormal), displaytype(MapData::DisplayType::kMapnamesLocalized) {} + + MapData::MapData(const Widelands::Map& map, const std::string& init_filename, + const MapData::MapType& init_maptype, + const MapData::DisplayType& init_displaytype) : + MapData() { + i18n::Textdomain td("maps"); + filename = init_filename; + name = map.get_name(); + localized_name = name.empty() ? "" : _(name); + authors = MapAuthorData(map.get_author()); + description = map.get_description().empty() ? "" : _(map.get_description()); + hint = map.get_hint().empty() ? "" : _(map.get_hint()); + nrplayers = map.get_nrplayers(); + width = map.get_width(); + height = map.get_height(); + suggested_teams = map.get_suggested_teams(); + tags = map.get_tags(); + maptype = init_maptype; + displaytype = init_displaytype; + + if (maptype == MapData::MapType::kScenario) { + tags.insert("scenario"); + } + } + +MapData::MapData(const std::string& init_filename, const std::string& init_localized_name) : + MapData() { + filename = init_filename; + name = init_localized_name; + localized_name = init_localized_name; + maptype = MapData::MapType::kDirectory; + } + +bool MapData::compare_names(const MapData& other) { + // The parent directory gets special treatment. + if (localized_name == parent_name() && maptype == MapData::MapType::kDirectory) { + return true; + } else if (other.localized_name == parent_name() && + other.maptype == MapData::MapType::kDirectory) { + return false; + } + + std::string this_name; + std::string other_name; + switch (displaytype) { + case MapData::DisplayType::kFilenames: + this_name = filename; + other_name = other.filename; + break; + + case MapData::DisplayType::kMapnames: + this_name = name; + other_name = other.name; + break; + + case MapData::DisplayType::kMapnamesLocalized: + this_name = localized_name; + other_name = other.localized_name; + break; + } + + // If there is no width, we have a directory - we want them first. + if (!width && !other.width) { + return this_name < other_name; + } else if (!width && other.width) { + return true; + } else if (width && !other.wi
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/parent_directory into lp:widelands
MapData::create_parent_dir() is the only function that changed, evreything else are just moves from .h -> .cc. -- https://code.launchpad.net/~widelands-dev/widelands/parent_directory/+merge/285276 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/parent_directory into lp:widelands. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/string-fixes into lp:widelands
Review: Approve You should probably use another branch name in the future. This one has all those fixed bugs attached. One tiny nit, otherwise lgtm. Diff comments: > > === modified file 'src/ui_basic/progresswindow.cc' > --- src/ui_basic/progresswindow.cc2016-01-31 21:03:15 + > +++ src/ui_basic/progresswindow.cc2016-02-04 16:17:22 + > @@ -92,6 +92,7 @@ > } > > void ProgressWindow::step(const std::string & description) { > + remove empty line? > RenderTarget & rt = *g_gr->get_render_target(); > > const uint32_t xres = g_gr->get_xres(); -- https://code.launchpad.net/~widelands-dev/widelands/string-fixes/+merge/285088 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/string-fixes. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/string-fixes into lp:widelands
This is sort of my catch-all branch for string issues - I just fix whatever gets reported on Transifex here. It would be hard to come up with a good branch name each time. Is reusing the branch a problem for the commit history? -- https://code.launchpad.net/~widelands-dev/widelands/string-fixes/+merge/285088 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/string-fixes. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/parent_directory into lp:widelands
Review: Approve functional test Compiles and going back to parent dir works now fine on windows! -- https://code.launchpad.net/~widelands-dev/widelands/parent_directory/+merge/285276 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/parent_directory. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1289943 into lp:widelands
Review: Disapprove I disagree with this change. It tightly couples the child to its containing window while our UI hierarchy usually goes the other way around. Instead the Window should know that it is minimized, and therefore the children should not draw themselves automatically. I found the issue in set_desired_size() in window.cc and proposed another fix here: https://code.launchpad.net/~widelands-dev/widelands/do_not_update_size_when_minimized/+merge/285277 -- https://code.launchpad.net/~widelands-dev/widelands/bug-1289943/+merge/285201 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1289943. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/do_not_update_size_when_minimized into lp:widelands
SirVer has proposed merging lp:~widelands-dev/widelands/do_not_update_size_when_minimized into lp:widelands. Commit message: Windows should not update their size when minimized, but instead when they get restored. Requested reviews: Widelands Developers (widelands-dev) Related bugs: Bug #1289943 in widelands: "minimized construction window contents get leaked out" https://bugs.launchpad.net/widelands/+bug/1289943 For more details, see: https://code.launchpad.net/~widelands-dev/widelands/do_not_update_size_when_minimized/+merge/285277 -- Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/do_not_update_size_when_minimized into lp:widelands. === modified file 'src/ui_basic/window.cc' --- src/ui_basic/window.cc 2016-01-31 21:03:15 + +++ src/ui_basic/window.cc 2016-02-06 19:35:23 + @@ -131,7 +131,7 @@ */ void Window::update_desired_size() { - if (m_center_panel) { + if (m_center_panel && !_is_minimal) { int innerw, innerh; m_center_panel->get_desired_size(&innerw, &innerh); set_desired_size @@ -488,6 +488,7 @@ (get_lborder(), get_rborder(), get_tborder(), BT_B_PIXMAP_THICKNESS); set_inner_size(get_inner_w(), _oldh); + update_desired_size(); move_inside_parent(); } void Window::minimize() { ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/string-fixes into lp:widelands
Review: Approve no, not that I know. I am just bugged by seeing fixed bugs attached to a branch. I'll get over it I guess :) @bunnybot merge -- https://code.launchpad.net/~widelands-dev/widelands/string-fixes/+merge/285088 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/string-fixes. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1289943 into lp:widelands
Your solution is definitely better - will test :) -- https://code.launchpad.net/~widelands-dev/widelands/bug-1289943/+merge/285201 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1289943. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1289943 into lp:widelands
The proposal to merge lp:~widelands-dev/widelands/bug-1289943 into lp:widelands has been updated. Status: Needs review => Rejected For more details, see: https://code.launchpad.net/~widelands-dev/widelands/bug-1289943/+merge/285201 -- Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1289943. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/simplify_setbobdescription into lp:widelands
Cleanups are always a good idea. This might affect savegame compatibility though, so we need to do if before b19. I filed: https://bugs.launchpad.net/widelands/+bug/1542705 @bunnybot merge -- https://code.launchpad.net/~widelands-dev/widelands/simplify_setbobdescription/+merge/285236 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/simplify_setbobdescription. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1542214 into lp:widelands
Continuous integration builds have changed state: Travis build 591. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/107439111. Appveyor build 453. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_1542214-453. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1542214/+merge/285260 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1542214 into lp:widelands. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/simplify_setbobdescription into lp:widelands
The proposal to merge lp:~widelands-dev/widelands/simplify_setbobdescription into lp:widelands has been updated. Status: Needs review => Merged For more details, see: https://code.launchpad.net/~widelands-dev/widelands/simplify_setbobdescription/+merge/285236 -- Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/simplify_setbobdescription. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/string-fixes into lp:widelands
The proposal to merge lp:~widelands-dev/widelands/string-fixes into lp:widelands has been updated. Status: Needs review => Merged For more details, see: https://code.launchpad.net/~widelands-dev/widelands/string-fixes/+merge/285088 -- Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/string-fixes. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1397500 into lp:widelands
Review: Approve Looks great. I fixed a couple of small nits while testing - see last commit. If you are happy, feel free to merge. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1397500/+merge/284574 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1397500. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1542238-log into lp:widelands
For now I would merge it as it is now and proceed when we get at least one log output -- https://code.launchpad.net/~widelands-dev/widelands/bug-1542238-log/+merge/285237 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1542238-log into lp:widelands. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/do_not_update_size_when_minimized into lp:widelands
Bunnybot encountered an error while working on this merge proposal: -- https://code.launchpad.net/~widelands-dev/widelands/do_not_update_size_when_minimized/+merge/285277 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/do_not_update_size_when_minimized into lp:widelands. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/do_not_update_size_when_minimized into lp:widelands
Review: Approve LGTM :) -- https://code.launchpad.net/~widelands-dev/widelands/do_not_update_size_when_minimized/+merge/285277 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/do_not_update_size_when_minimized. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1397500 into lp:widelands
Yes, that looks much better :) @bunnybot merge -- https://code.launchpad.net/~widelands-dev/widelands/bug-1397500/+merge/284574 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1397500. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1397500 into lp:widelands
The proposal to merge lp:~widelands-dev/widelands/bug-1397500 into lp:widelands has been updated. Status: Needs review => Merged For more details, see: https://code.launchpad.net/~widelands-dev/widelands/bug-1397500/+merge/284574 -- Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1397500. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/parent_directory into lp:widelands
Review: Approve Works on Ubuntu as well, code LGTM :) Still has a codecheck error though - I will fix it. -- https://code.launchpad.net/~widelands-dev/widelands/parent_directory/+merge/285276 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/parent_directory. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/dedicated_out_of_main into lp:widelands
Review: Approve Please have a look at my code review commit - there is a NOCOM question in there. Also pinging Tino, because some WIN32 includes have been removed. -- https://code.launchpad.net/~widelands-dev/widelands/dedicated_out_of_main/+merge/285268 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/dedicated_out_of_main. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1542238-log into lp:widelands
Review: Approve OK, let's do that then :) @bunnybot merge -- https://code.launchpad.net/~widelands-dev/widelands/bug-1542238-log/+merge/285237 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1542238-log. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp