From 0c7c32bc9fad29629e1108bd045471f47b973eb5 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 6 Sep 2024 19:51:03 +0200 Subject: [PATCH] Options: remove option "text-editor-ask" This option seems useless to me. --- NEWS | 1 + doc/config.sample | 3 --- doc/index.rst | 2 -- src/ConfigParser.cxx | 5 +---- src/LyricsPage.cxx | 8 -------- src/Options.hxx | 1 - 6 files changed, 2 insertions(+), 18 deletions(-) diff --git a/NEWS b/NEWS index d8b364cf..7cc080e3 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ ncmpc 0.50 - not yet released * require libfmt 9 * draw progress bar as Unicode double line * add color style "text" for input text controls +* remove option "text-editor-ask" * lyrics/musixmatch: add new lyrics extension * lyrics/google: fix partial loading of lyrics diff --git a/doc/config.sample b/doc/config.sample index d2b2ba22..2764a625 100644 --- a/doc/config.sample +++ b/doc/config.sample @@ -119,9 +119,6 @@ ## The text editor used for editing lyrics. #text-editor = emacs -## Ask before starting an editor. -#text-editor-ask = yes - ## The prefix of chat messages #chat-prefix = " " diff --git a/doc/index.rst b/doc/index.rst index b4d39dbf..a6997b65 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -168,8 +168,6 @@ used to receive lyrics on the lyrics screen. :command:`text-editor = EDITOR` - The text editor used for editing lyrics. -:command:`text-editor-ask = yes|no` - Ask before starting an editor. - :command:`chat-prefix = PREFIX` - Prefix messages send with the chat screen with PREFIX. By default they are prefixed with the current user name enclosed by ``<`` and ``>`` and a space (i.e. " "). diff --git a/src/ConfigParser.cxx b/src/ConfigParser.cxx index 74e00088..6e529a6d 100644 --- a/src/ConfigParser.cxx +++ b/src/ConfigParser.cxx @@ -734,11 +734,8 @@ parse_line(char *line) {} #endif else if (StringIsEqualIgnoreCase(name, CONF_TEXT_EDITOR_ASK)) -#ifdef ENABLE_LYRICS_SCREEN - options.text_editor_ask = str2bool(value); -#else + /* obsolete, ignore */ {} -#endif else if (StringIsEqualIgnoreCase(name, CONF_CHAT_PREFIX)) #ifdef ENABLE_CHAT_SCREEN options.chat_prefix = GetStringValue(value); diff --git a/src/LyricsPage.cxx b/src/LyricsPage.cxx index 1b827021..7b7c7e37 100644 --- a/src/LyricsPage.cxx +++ b/src/LyricsPage.cxx @@ -15,7 +15,6 @@ #include "screen.hxx" #include "plugin.hxx" #include "TextPage.hxx" -#include "screen_utils.hxx" #include "ncu.hxx" #include "lib/fmt/ToSpan.hxx" #include "util/StringAPI.hxx" @@ -349,13 +348,6 @@ LyricsPage::Edit() } const char *editor = options.text_editor.c_str(); - if (options.text_editor_ask) { - const char *prompt = - _("Do you really want to start an editor and edit these lyrics?"); - bool really = screen_get_yesno(screen, prompt, false); - if (!really) - return; - } if (!Save()) return; diff --git a/src/Options.hxx b/src/Options.hxx index 7d1fbf0f..1794a0c9 100644 --- a/src/Options.hxx +++ b/src/Options.hxx @@ -55,7 +55,6 @@ struct Options { std::chrono::steady_clock::duration lyrics_timeout = std::chrono::minutes(1); bool lyrics_autosave = false; bool lyrics_show_plugin = false; - bool text_editor_ask = false; #endif bool auto_center;