GUI2: use NONE retval where applicable
This commit is contained in:
parent
3bececed7c
commit
09d3f31b48
4 changed files with 5 additions and 5 deletions
|
@ -133,7 +133,7 @@ void button::signal_handler_left_button_click(const event::ui_event event,
|
|||
sound::play_UI_sound(settings::sound_button_click);
|
||||
|
||||
// If a button has a retval do the default handling.
|
||||
if(retval_ != 0) {
|
||||
if(retval_ != retval::NONE) {
|
||||
window* window = get_window();
|
||||
if(window) {
|
||||
window->set_retval(retval_);
|
||||
|
|
|
@ -145,7 +145,7 @@ void menu_button::signal_handler_left_button_click(const event::ui_event event,
|
|||
|
||||
set_selected(selected, true);
|
||||
|
||||
if(retval_ != 0) {
|
||||
if(retval_ != retval::NONE) {
|
||||
if(window* window = get_window()) {
|
||||
window->set_retval(retval_);
|
||||
return;
|
||||
|
|
|
@ -140,7 +140,7 @@ void multimenu_button::signal_handler_left_button_click(const event::ui_event ev
|
|||
droplist.show();
|
||||
droplist_ = nullptr;
|
||||
|
||||
if(retval_ != 0) {
|
||||
if(retval_ != retval::NONE) {
|
||||
if(window* window = get_window()) {
|
||||
window->set_retval(retval_);
|
||||
return;
|
||||
|
|
|
@ -135,7 +135,7 @@ void toggle_button::set_retval(const int retval)
|
|||
}
|
||||
|
||||
retval_ = retval;
|
||||
set_wants_mouse_left_double_click(retval_ != 0);
|
||||
set_wants_mouse_left_double_click(retval_ != retval::NONE);
|
||||
}
|
||||
|
||||
void toggle_button::set_state(const state_t state)
|
||||
|
@ -179,7 +179,7 @@ void toggle_button::signal_handler_left_button_double_click(
|
|||
{
|
||||
DBG_GUI_E << LOG_HEADER << ' ' << event << ".\n";
|
||||
|
||||
if(retval_ == 0) {
|
||||
if(retval_ == retval::NONE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue