From 26c2fff7d051f869ef40f65016e848b331529895 Mon Sep 17 00:00:00 2001 From: David Capello Date: Sun, 7 Aug 2011 22:22:48 -0300 Subject: [PATCH] Add ComboBox::Change signal (to replace JI_SIGNAL_COMBOBOX_SELECT in the future). --- src/gui/combobox.cpp | 4 +++- src/gui/combobox.h | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gui/combobox.cpp b/src/gui/combobox.cpp index 2f58c154b..20a67618d 100644 --- a/src/gui/combobox.cpp +++ b/src/gui/combobox.cpp @@ -390,8 +390,10 @@ static bool combobox_listbox_msg_proc(JWidget widget, Message* msg) combobox->closeListBox(); - if (IS_VALID_ITEM(combobox, index)) + if (IS_VALID_ITEM(combobox, index)) { + combobox->Change(); jwidget_emit_signal(combobox, JI_SIGNAL_COMBOBOX_SELECT); + } } return true; diff --git a/src/gui/combobox.h b/src/gui/combobox.h index 685a26a25..5cacd7c81 100644 --- a/src/gui/combobox.h +++ b/src/gui/combobox.h @@ -8,6 +8,7 @@ #define GUI_COMBOBOX_H_INCLUDED #include "base/compiler_specific.h" +#include "base/signal.h" #include "gui/widget.h" #include @@ -56,6 +57,9 @@ public: void switchListBox(); JRect getListBoxPos(); + // Signals + Signal0 Change; + protected: bool onProcessMessage(Message* msg) OVERRIDE; void onPreferredSize(PreferredSizeEvent& ev) OVERRIDE;