Skip to content

Commit

Permalink
Options: remove option "text-editor-ask"
Browse files Browse the repository at this point in the history
This option seems useless to me.
  • Loading branch information
MaxKellermann committed Sep 6, 2024
1 parent ad9dced commit 0c7c32b
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 18 deletions.
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 0 additions & 3 deletions doc/config.sample
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "<user> "

Expand Down
2 changes: 0 additions & 2 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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. "<name> ").
Expand Down
5 changes: 1 addition & 4 deletions src/ConfigParser.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 0 additions & 8 deletions src/LyricsPage.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/Options.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0c7c32b

Please sign in to comment.