Author: mordante
Date: Sun May 18 16:25:08 2008
New Revision: 26698
URL: http://svn.gna.org/viewcvs/wesnoth?rev=26698&view=rev
Log:
Remove a bunch of std:cerr debug statements which are no longer needed.
Modified:
trunk/src/gui/widgets/control.cpp
trunk/src/gui/widgets/grid.cpp
trunk/src/gui/widgets/listbox.cpp
trunk/src/gui/widgets/scrollbar.cpp
Modified: trunk/src/gui/widgets/control.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/control.cpp?rev=26698&r1=26697&r2=26698&view=diff
==============================================================================
--- trunk/src/gui/widgets/control.cpp (original)
+++ trunk/src/gui/widgets/control.cpp Sun May 18 16:25:08 2008
@@ -204,7 +204,6 @@
surface surf = font::get_rendered_text(wrapped_message,
config_->text_font_size, col);
assert(surf);
- std::cerr << "Multiline size for width: " << width << " surface size: "
<< surf->w << ',' << surf->h << ".\n";
return tpoint(surf->w + config_->text_extra_width, surf->h +
config_->text_extra_height);
}
Modified: trunk/src/gui/widgets/grid.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/grid.cpp?rev=26698&r1=26697&r2=26698&view=diff
==============================================================================
--- trunk/src/gui/widgets/grid.cpp (original)
+++ trunk/src/gui/widgets/grid.cpp Sun May 18 16:25:08 2008
@@ -203,11 +203,6 @@
itor != children_.end(); ++itor) {
// FIXME we should check per row and the entire row
// should have the flag!!!!
- if(itor->widget()) {
- std::cerr << "Widget type " <<
typeid(*(itor->widget())).name()
- << "has scrollbar "
- << itor->widget()->has_vertical_scrollbar() <<
".\n";
- }
if(itor->widget() && itor->widget()->has_vertical_scrollbar()) {
return true;
}
Modified: trunk/src/gui/widgets/listbox.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/listbox.cpp?rev=26698&r1=26697&r2=26698&view=diff
==============================================================================
--- trunk/src/gui/widgets/listbox.cpp (original)
+++ trunk/src/gui/widgets/listbox.cpp Sun May 18 16:25:08 2008
@@ -471,12 +471,6 @@
bool tlistbox::select_row(const unsigned row, const bool select)
{
-/*
- std::cerr << "Selecting row " << row << " select " << select
- << " must_select " << must_select_
- << " multi_select " << multi_select_
- << " selection_count " << selection_count_ << ".\n";
-*/
if(!select && must_select_ && selection_count_ < 2) {
return false;
}
Modified: trunk/src/gui/widgets/scrollbar.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/scrollbar.cpp?rev=26698&r1=26697&r2=26698&view=diff
==============================================================================
--- trunk/src/gui/widgets/scrollbar.cpp (original)
+++ trunk/src/gui/widgets/scrollbar.cpp Sun May 18 16:25:08 2008
@@ -139,11 +139,9 @@
item_count_ - visible_items_ : item_position;
item_position_ = (item_position_ + step_size_ - 1) / step_size_;
- std::cerr << "Item position: " << item_position_ << ".\n";
// Determine the pixel offset of the item position.
positioner_offset_ = static_cast<unsigned>(item_position_ *
pixels_per_step_);
- std::cerr << "Positioner offset: " << positioner_offset_ << ".\n";
update_canvas();
}
@@ -223,13 +221,10 @@
int available_length =
get_length() - offset_before() - minimum_positioner_length() -
offset_after();
- std::cerr << "Available length: " << available_length << ".\n";
-
assert(available_length > 0);
// All visible.
if(item_count_ <= visible_items_) {
- std::cerr << "Show all.\n";
positioner_offset_ = offset_before();
positioner_length_ = available_length +
minimum_positioner_length();
item_position_ = 0;
@@ -240,37 +235,25 @@
assert(step_size_);
assert(visible_items_);
- const unsigned steps =
- (item_count_ + step_size_ - 1) / step_size_;
- std::cerr << "Steps: " << steps << "\n";
- std::cerr << "Step size: " << step_size_ << ".\n";
+ const unsigned steps = (item_count_ + step_size_ - 1) / step_size_;
+
if(steps < available_length) {
// We can show them all.
- std::cerr << "All steps can be shown.\n";
-
available_length += minimum_positioner_length();
pixels_per_step_ = available_length / steps;
- std::cerr << "Pixels per step: " << pixels_per_step_ << ".\n";
positioner_length_ = static_cast<unsigned>(pixels_per_step_ *
visible_items_) + available_length % steps;
- std::cerr << "Positioner length: " << positioner_length_ <<
".\n";
} else {
// We'll skip some.
- std::cerr << "Some steps will be skipped.\n";
-
WRN_G << "The scrollbar is too small for the"
" number of items, movement might seem jerky.\n";
pixels_per_step_ = available_length / steps;
- std::cerr << "Pixels per step: " << pixels_per_step_ << ".\n";
-
positioner_length_ = minimum_positioner_length();
- std::cerr << "Positioner length: " << positioner_length_ <<
".\n";
-
}
set_item_position(item_position_);
@@ -287,9 +270,6 @@
void tscrollbar_::move_positioner(const int distance)
{
-
- std::cerr << "Positioner at " << positioner_offset_ << " move for " <<
distance;
-
if(distance < 0 && -distance > positioner_offset_) {
positioner_offset_ = 0;
} else {
@@ -301,8 +281,6 @@
positioner_offset_ = length - positioner_length_;
}
- std::cerr << " sets positioner at " << positioner_offset_ << ".\n";
-
const unsigned position =
static_cast<unsigned>(positioner_offset_ / pixels_per_step_);
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits