summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@araneo.si>2016-07-14 20:04:59 +0200
committerwm4 <wm4@nowhere>2016-07-14 22:37:42 +0200
commit91a1b17104e6417cb2c77c838c85fabcff9e7d11 (patch)
treed6aa52db710cc28d246b94c66b18c6c9172fcd98 /player
parent6e45e1de7778fab39e478f4e05008eb96bbec523 (diff)
downloadmpv-91a1b17104e6417cb2c77c838c85fabcff9e7d11.tar.bz2
mpv-91a1b17104e6417cb2c77c838c85fabcff9e7d11.tar.xz
Use - as command-name separator everywhere
Old-style commands using _ as separator (e.g. show_progress) were still used in some places, including documentation and configuration files. This commit updates all such instances to the new style (show-progress) so that commands are easier to find in the manual.
Diffstat (limited to 'player')
-rw-r--r--player/command.c10
-rw-r--r--player/lua/defaults.lua6
-rw-r--r--player/lua/osc.lua8
3 files changed, 12 insertions, 12 deletions
diff --git a/player/command.c b/player/command.c
index 79687fe46d..a815ae8a1d 100644
--- a/player/command.c
+++ b/player/command.c
@@ -220,7 +220,7 @@ static void mp_hook_add(struct MPContext *mpctx, char *client, char *name,
qsort(cmd->hooks, cmd->num_hooks, sizeof(cmd->hooks[0]), compare_hook);
}
-// Call before a seek, in order to allow revert_seek to undo the seek.
+// Call before a seek, in order to allow revert-seek to undo the seek.
static void mark_seek(struct MPContext *mpctx)
{
struct command_ctx *cmd = mpctx->command_ctx;
@@ -4385,15 +4385,15 @@ static int overlay_add(struct MPContext *mpctx, int id, int x, int y,
{
int r = -1;
if (strcmp(fmt, "bgra") != 0) {
- MP_ERR(mpctx, "overlay_add: unsupported OSD format '%s'\n", fmt);
+ MP_ERR(mpctx, "overlay-add: unsupported OSD format '%s'\n", fmt);
goto error;
}
if (id < 0 || id >= 64) { // arbitrary upper limit
- MP_ERR(mpctx, "overlay_add: invalid id %d\n", id);
+ MP_ERR(mpctx, "overlay-add: invalid id %d\n", id);
goto error;
}
if (w <= 0 || h <= 0 || stride < w * 4 || (stride % 4)) {
- MP_ERR(mpctx, "overlay_add: inconsistent parameters\n");
+ MP_ERR(mpctx, "overlay-add: inconsistent parameters\n");
goto error;
}
struct overlay overlay = {
@@ -4431,7 +4431,7 @@ static int overlay_add(struct MPContext *mpctx, int id, int x, int y,
p = m;
}
if (!p) {
- MP_ERR(mpctx, "overlay_add: could not open or map '%s'\n", file);
+ MP_ERR(mpctx, "overlay-add: could not open or map '%s'\n", file);
talloc_free(overlay.source);
goto error;
}
diff --git a/player/lua/defaults.lua b/player/lua/defaults.lua
index e499ecc917..901a8cf246 100644
--- a/player/lua/defaults.lua
+++ b/player/lua/defaults.lua
@@ -42,8 +42,8 @@ function mp.input_disable_section(section)
mp.commandv("disable-section", section)
end
--- For dispatching script_binding. This is sent as:
--- script_message_to $script_name $binding_name $keystate
+-- For dispatching script-binding. This is sent as:
+-- script-message-to $script_name $binding_name $keystate
-- The array is indexed by $binding_name, and has functions like this as value:
-- fn($binding_name, $keystate)
local dispatch_key_bindings = {}
@@ -412,7 +412,7 @@ mp.register_event("shutdown", function() mp.keep_running = false end)
mp.register_event("client-message", message_dispatch)
mp.register_event("property-change", property_change)
--- sent by "script_binding"
+-- sent by "script-binding"
mp.register_script_message("key-binding", dispatch_key_binding)
mp.msg = {
diff --git a/player/lua/osc.lua b/player/lua/osc.lua
index 23f7cc6d19..09142e0813 100644
--- a/player/lua/osc.lua
+++ b/player/lua/osc.lua
@@ -1383,7 +1383,7 @@ function osc_init()
ne.content = "\238\132\144"
ne.visible = have_pl
ne.eventresponder["mouse_btn0_up"] =
- function () mp.commandv("playlist_prev", "weak") end
+ function () mp.commandv("playlist-prev", "weak") end
ne.eventresponder["shift+mouse_btn0_up"] =
function () show_message(mp.get_property_osd("playlist"), 3) end
@@ -1393,7 +1393,7 @@ function osc_init()
ne.content = "\238\132\129"
ne.visible = have_pl
ne.eventresponder["mouse_btn0_up"] =
- function () mp.commandv("playlist_next", "weak") end
+ function () mp.commandv("playlist-next", "weak") end
ne.eventresponder["shift+mouse_btn0_up"] =
function () show_message(mp.get_property_osd("playlist"), 3) end
@@ -1421,7 +1421,7 @@ function osc_init()
ne.eventresponder["mouse_btn0_down"] =
function () mp.commandv("seek", -5, "relative", "keyframes") end
ne.eventresponder["shift+mouse_btn0_down"] =
- function () mp.commandv("frame_back_step") end
+ function () mp.commandv("frame-back-step") end
ne.eventresponder["mouse_btn2_down"] =
function () mp.commandv("seek", -30, "relative", "keyframes") end
@@ -1433,7 +1433,7 @@ function osc_init()
ne.eventresponder["mouse_btn0_down"] =
function () mp.commandv("seek", 10, "relative", "keyframes") end
ne.eventresponder["shift+mouse_btn0_down"] =
- function () mp.commandv("frame_step") end
+ function () mp.commandv("frame-step") end
ne.eventresponder["mouse_btn2_down"] =
function () mp.commandv("seek", 60, "relative", "keyframes") end