Strip trailing whitespace.

This commit is contained in:
Mark de Wever 2011-03-06 18:27:54 +00:00
parent 579c62e1a3
commit b06e17931a
11 changed files with 47 additions and 47 deletions

View file

@ -2688,7 +2688,7 @@ void apply_shroud_changes(undo_list &undos, int side)
//Doing it not is also problematic since any units there gets replaced with the
//temp_unit for the cause of that loop step - we'll see
//if (*step != unit_itor->get_location() && units.find(*step) != units.end()) continue;
// We have to swap out any unit that is already in the hex,
// so we can put our unit there, then we'll swap back at the end.
const temporary_unit_placer unit_placer(units, *step, temp_unit);

View file

@ -1879,7 +1879,7 @@ void display::redraw_everything()
foreach (boost::function<void(display&)> f, redraw_observers_) {
f(*this);
}
complete_redraw_event_.notify_observers();
}

View file

@ -417,7 +417,7 @@ public:
/** Expose the event, so observers can be notified about map scrolling. */
events::generic_event &scroll_event() const { return scroll_event_; }
events::generic_event& complete_redraw_event() { return complete_redraw_event_; }
/** Check if a tile is fully visible on screen. */
@ -561,7 +561,7 @@ protected:
/** Event raised when the map is being scrolled */
mutable events::generic_event scroll_event_;
/**
* notify observers that the screen has been redrawn completely
* atm this is used for replay_controller to add replay controls to the standard theme

View file

@ -45,12 +45,12 @@ namespace editor {
* Include in the brushall hexes that are this or closer to the center
* of the brush, excluding the (0,0) point. $
* [relative] & node & 1 & & Include in the brush a single hex with
* coordinates relative from the center of the brush. $
* coordinates relative from the center of the brush. $
*
* @begin{description}{wml_reference}
* x & int & 0 & & The relative x coordinate. $
* y & int & 0 & & The relative y coordinate. $
* @end{description}
* @end{description}
*
* @end{description}
* A brush that has neither a radius nor any [relative] hexes will be empty

View file

@ -374,9 +374,9 @@ build_event_chain<tsignal_notification_function>(
* assumption might change, but is valid for now. The function doesn't build an
* event chain from @p dispatcher to @p widget but from @p widget to its
* toplevel item (the first one without a parent) which we call @p window.
*
*
* @pre dispatcher == widget
*
*
* @returns The list of widgets with a handler.
* The order will be (assuming all have a
* handler):

View file

@ -57,7 +57,7 @@ namespace { \
/**
* Registers a window for a dialog.
*
*
* Call this function to register a window. In the header of the class it adds
* the following code:
*@code
@ -112,7 +112,7 @@ type::window_id() const \
*
* The 'in + out parameters' are used as initial value and final value when the
* OK button is pressed. The 'in parameters' are just extra parameters for
* showing.
* showing.
*
* When a function only has 'in parameters' it should return a void value and
* the function should be called @p display, if it has 'in + out parameters' it

View file

@ -426,7 +426,7 @@ private:
};
/**
* The mode in which the window is shown.
* The mode in which the window is shown.
*
* This is used to determine whether or not to remove the tip.
*/

View file

@ -760,7 +760,7 @@ lobby::lobby(game_display& disp, const config& cfg, chat& c, config& gamelist) :
friends_in_game_.set_check(preferences::fi_friends_in_game());
friends_in_game_.set_help_string(_("Only show games that are played or observed by at least one of your friends"));
friends_in_game_.enable(apply_filter_.checked());
filter_label_.enable(apply_filter_.checked());
filter_text_.set_text(search_string_);

View file

@ -518,7 +518,7 @@ void play_controller::init_side(const unsigned int team_index, bool is_replay){
team& current_team = teams_[team_index];
mouse_handler_.set_side(team_index + 1);
// If we are observers we move to watch next team if it is allowed
if (is_observer()
&& !current_team.get_disallow_observers()) {

View file

@ -112,7 +112,7 @@ void replay_controller::init_gui(){
for(std::vector<team>::iterator t = teams_.begin(); t != teams_.end(); ++t) {
t->reset_objectives_changed();
}
buttons_.update(gui_);
}
@ -146,29 +146,29 @@ void replay_controller::replay_buttons_wrapper::update(boost::scoped_ptr<game_di
reset_button_ = gui_->find_button("button-resetreplay");
play_turn_button_ = gui_->find_button("button-nextturn");
play_side_button_ = gui_->find_button("button-nextside");
//check if we have all buttons - if someone messed with theme then some buttons may be missing
//if any of the buttons is missing, we just disable every one
if( !play_button_ || !stop_button_ || !reset_button_ || !play_turn_button_ || !play_side_button_ ) {
is_valid_ = false;
if( play_button_ ) {
play_button_->enable(false);
}
if( stop_button_ ) {
stop_button_->enable(false);
}
if( reset_button_ ) {
reset_button_->enable(false);
}
if( play_turn_button_ ) {
play_turn_button_->enable(false);
}
if( play_side_button_ ) {
play_side_button_->enable(false);
}
@ -177,28 +177,28 @@ void replay_controller::replay_buttons_wrapper::update(boost::scoped_ptr<game_di
}
}
void replay_controller::replay_buttons_wrapper::playback_should_start()
void replay_controller::replay_buttons_wrapper::playback_should_start()
{
if( !is_valid_ )
return;
play_button_->enable(false);
reset_button_->enable(false);
play_turn_button_->enable(false);
play_side_button_->enable(false);
}
void replay_controller::replay_buttons_wrapper::playback_should_stop(bool is_playing)
void replay_controller::replay_buttons_wrapper::playback_should_stop(bool is_playing)
{
if( !is_valid_)
return;
if( !recorder.at_end() ) {
play_button_->enable(true);
reset_button_->enable(true);
play_turn_button_->enable(true);
play_side_button_->enable(true);
play_button_->release();
play_turn_button_->release();
play_side_button_->release();
@ -206,18 +206,18 @@ void replay_controller::replay_buttons_wrapper::playback_should_stop(bool is_pla
reset_button_->enable(true);
stop_button_->enable(false);
}
if( !is_playing ) {
//user interrupted
stop_button_->release();
}
}
}
void replay_controller::replay_buttons_wrapper::reset_buttons()
void replay_controller::replay_buttons_wrapper::reset_buttons()
{
if( !is_valid_ )
return;
play_button_->enable(true);
stop_button_->enable(true);
reset_button_->enable(true);
@ -263,7 +263,7 @@ void replay_controller::reset_replay(){
init_gui();
fire_start(true);
update_gui();
buttons_.reset_buttons();
}
@ -273,21 +273,21 @@ void replay_controller::stop_replay(){
void replay_controller::replay_next_turn(){
is_playing_ = true;
buttons_.playback_should_start();
buttons_.playback_should_start();
play_turn();
if (!skip_replay_ || !is_playing_){
gui_->scroll_to_leader(units_, player_number_,game_display::ONSCREEN,false);
}
buttons_.playback_should_stop(is_playing_);
}
void replay_controller::replay_next_side(){
is_playing_ = true;
buttons_.playback_should_start();
play_side(player_number_ - 1, false);
if (!skip_replay_ || !is_playing_) {
@ -351,7 +351,7 @@ void replay_controller::play_replay(){
for(; !recorder.at_end() && is_playing_; first_player_ = 1) {
play_turn();
}
if (!is_playing_) {
gui_->scroll_to_leader(units_, player_number_,game_display::ONSCREEN,false);
}
@ -359,7 +359,7 @@ void replay_controller::play_replay(){
catch(end_level_exception& e){
if (e.result == QUIT) throw;
}
buttons_.playback_should_stop(is_playing_);
}
@ -439,9 +439,9 @@ void replay_controller::update_teams(){
} else {
gui_->set_team(show_team_ - 1, show_everything_);
}
::clear_shroud(next_team);
gui_->set_playing_team(next_team - 1);
gui_->invalidate_all();
}
@ -464,12 +464,12 @@ void replay_controller::show_statistics(){
}
void replay_controller::handle_generic_event(const std::string& name){
if( name == "completely_redrawn" ) {
buttons_.update(gui_);
gui::button* skip_animation_button = gui_->find_button("skip-animation");
skip_animation_button->set_check(skip_replay_);
} else {
rebuild_replay_theme();

View file

@ -77,12 +77,12 @@ private:
bool show_everything_;
unsigned int show_team_;
class replay_buttons_wrapper {
bool is_valid_;
public:
replay_buttons_wrapper()
: is_valid_(false)
@ -93,7 +93,7 @@ private:
, play_side_button_(NULL)
{
}
gui::button* play_button_;
gui::button* stop_button_;
gui::button* reset_button_;
@ -106,7 +106,7 @@ private:
void reset_buttons();
};
replay_buttons_wrapper buttons_;
};