Enable the scrollwheel for the scroll label.

Also update the changelog regarding this change for the tree view.
This commit is contained in:
Mark de Wever 2010-03-07 20:03:12 +00:00
parent 32459dac71
commit db122c3fca
3 changed files with 26 additions and 0 deletions

View file

@ -33,6 +33,8 @@ Version 1.7.13+svn:
* Fix a crash when using the scrollwheel (bug #15156)
* Fix an issue where the lobby chat log didn't resize properly
* Fix the translation of certain lobby strings
* Enable the scrollwheel for the tree view
* Enable the scrollwheel for the scroll label
* Miscellaneous and bug fixes:
* Fix bug #15429 (Units created by WML can only get the Neutral alignment);
this also affected MP leaders

View file

@ -17,14 +17,28 @@
#include "gui/widgets/scroll_label.hpp"
#include "gui/widgets/label.hpp"
#include "gui/auxiliary/log.hpp"
#include "gui/widgets/scrollbar.hpp"
#include "gui/widgets/spacer.hpp"
#include "gui/widgets/window.hpp"
#include <boost/bind.hpp>
#define LOG_SCOPE_HEADER get_control_type() + " [" + id() + "] " + __func__
#define LOG_HEADER LOG_SCOPE_HEADER + ':'
namespace gui2 {
tscroll_label::tscroll_label()
: tscrollbar_container(COUNT)
, state_(ENABLED)
{
connect_signal<event::LEFT_BUTTON_DOWN>(
boost::bind(
&tscroll_label::signal_handler_left_button_down
, this
, _2)
, event::tdispatcher::back_pre_child);
}
void tscroll_label::set_label(const t_string& label)
@ -76,5 +90,12 @@ const std::string& tscroll_label::get_control_type() const
return type;
}
void tscroll_label::signal_handler_left_button_down(const event::tevent event)
{
DBG_GUI_E << LOG_HEADER << ' ' << event << ".\n";
get_window()->keyboard_capture(this);
}
} // namespace gui2

View file

@ -82,6 +82,9 @@ private:
/** Inherited from tcontrol. */
const std::string& get_control_type() const;
/***** ***** ***** signal handlers ***** ****** *****/
void signal_handler_left_button_down(const event::tevent event);
};
} // namespace gui2