CKeyboardInput: add signal OnAfterSave()

supplementing for notifier handling
This commit is contained in:
2019-03-17 11:18:44 +01:00
parent 91854a4d81
commit 6bf13f6d6b
2 changed files with 10 additions and 3 deletions

View File

@@ -578,8 +578,13 @@ int CKeyboardInput::exec(CMenuTarget* parent, const std::string &)
delete inputString;
inputString = NULL;
if ((observ) && (msg == CRCInput::RC_red))
observ->changeNotify(title, (void *) valueString->c_str());
if (msg == CRCInput::RC_red)
{
if (observ)
observ->changeNotify(title, (void *) valueString->c_str());
if (msg == CRCInput::RC_red)
OnAfterSave();
}
return res;
}

View File

@@ -29,6 +29,7 @@
#include <system/localize.h>
#include <string>
#include <sigc++/signal.h>
#define KEY_ROWS 4
#define KEY_COLUMNS 14
@@ -59,7 +60,7 @@ class CInputString
std::string &getValue();
};
class CKeyboardInput : public CMenuTarget
class CKeyboardInput : public CMenuTarget, public sigc::trackable
{
protected:
CFrameBuffer *frameBuffer;
@@ -137,6 +138,7 @@ class CKeyboardInput : public CMenuTarget
int exec( CMenuTarget* parent, const std::string & actionKey );
void forceSaveScreen(bool enable);
sigc::signal<void> OnAfterSave;
};
#endif