mirror of
https://github.com/polybar/polybar.git
synced 2026-02-23 04:35:28 +00:00
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:
committed by
Patrick Ziegler
parent
8acedeef87
commit
bc1b86c584
@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user