actions: Separate data from action string

Modules now no longer need to manually parse the action string and
extract data from it.
This commit is contained in:
patrick96
2020-05-24 00:36:16 +02:00
committed by Patrick Ziegler
parent 8acedeef87
commit bc1b86c584
33 changed files with 124 additions and 142 deletions

View File

@ -72,7 +72,7 @@ namespace modules {
bool date_module::build(builder* builder, const string& tag) const {
if (tag == TAG_LABEL) {
if (!m_dateformat_alt.empty() || !m_timeformat_alt.empty()) {
builder->action(mousebtn::LEFT, *this, EVENT_TOGGLE, m_label);
builder->action(mousebtn::LEFT, *this, EVENT_TOGGLE, "", m_label);
} else {
builder->node(m_label);
}
@ -83,7 +83,7 @@ namespace modules {
return true;
}
bool date_module::input(string&& action) {
bool date_module::input(string&& action, string&&) {
if (action != EVENT_TOGGLE) {
return false;
}