doc(actions): Point user to doc when using legacy actions

This commit is contained in:
patrick96 2020-11-22 23:18:52 +01:00 committed by Patrick Ziegler
parent 191fb2972c
commit 1afb333858
2 changed files with 7 additions and 6 deletions

View File

@ -241,8 +241,8 @@ custom/menu
The data has the form ``N-M`` and the action will execute the command
in ``menu-N-M-exec``.
Legacy Action Names
-------------------
Deprecated Action Names
-----------------------
.. deprecated:: 3.5.0
@ -281,7 +281,7 @@ Afterwards build the complete action string as described in
Please see :ref:`below <menu-example>` for an example of migrating a typical menu module.
+-------------------------+-----------------------+---------------+
|Module Type |Legacy Action Name |New Action Name|
|Module Type |Deprecated Action Name |New Action Name|
+=========================+=======================+===============+
|``internal/date`` |``datetoggle`` |``toggle`` |
+-------------------------+-----------------------+---------------+
@ -352,9 +352,9 @@ Please see :ref:`below <menu-example>` for an example of migrating a typical men
.. note::
Some legacy action names are suffixed with ``N``, this means that action has
some additional data (represented by that ``N``), in the new action names,
this data will appear in exactly the same way, after a period.
Some deprecated action names are suffixed with ``N``, this means that that
action has some additional data (represented by that ``N``), in the new
action names this data will appear in exactly the same way, after a period.
.. _menu-example:

View File

@ -479,6 +479,7 @@ bool controller::try_forward_legacy_action(const string& cmd) {
} else {
m_log.warn("The action '%s' is deprecated, use '#%s.%s.%s' instead!", cmd, module_name, action, data);
}
m_log.warn("Consult the 'Actions' page in the polybar documentation for more information.");
m_log.info(
"Forwarding legacy action '%s' to module '%s' as '%s' with data '%s'", cmd, module_name, action, data);
if (!module->input(action, data)) {