summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c5d994b)
raw | patch | inline | side by side (parent: c5d994b)
author | Jonathan Neuschäfer <j.neuschaefer@gmx.net> | |
Sat, 17 Dec 2011 21:54:46 +0000 (22:54 +0100) | ||
committer | Jonathan Neuschäfer <j.neuschaefer@gmx.net> | |
Thu, 22 Dec 2011 12:01:20 +0000 (13:01 +0100) |
src/screen_file.c | patch | blob | history | |
src/screen_queue.c | patch | blob | history |
diff --git a/src/screen_file.c b/src/screen_file.c
index 4eb8943d1810effaa6cb1ef1c33610acb631e2ce..da7969b7221d00e1da14d845551bf6f449799a61 100644 (file)
--- a/src/screen_file.c
+++ b/src/screen_file.c
struct mpd_entity *entity;
const struct mpd_playlist *playlist;
char *str, *buf;
- int key;
if (connection == NULL)
return;
str = utf8_to_locale(g_basename(mpd_playlist_get_path(playlist)));
buf = g_strdup_printf(_("Delete playlist %s [%s/%s] ? "), str, YES, NO);
g_free(str);
- key = tolower(screen_getch(buf));
+ bool delete = screen_get_yesno(buf, false);
g_free(buf);
- if( key != YES[0] ) {
+
+ if (!delete) {
/* translators: a dialog was aborted by the user */
screen_status_printf(_("Aborted"));
return;
diff --git a/src/screen_queue.c b/src/screen_queue.c
index b21dc3aa0536d21b5365919f14e8f04880d34460..7fb3aeadf8a4097ce058e859d72d822b3b1ba541 100644 (file)
--- a/src/screen_queue.c
+++ b/src/screen_queue.c
mpd_connection_get_server_error(connection) == MPD_SERVER_ERROR_EXIST &&
mpd_connection_clear_error(connection)) {
char *buf;
- int key;
+ bool replace;
buf = g_strdup_printf(_("Replace %s [%s/%s] ? "),
filename, YES, NO);
- key = tolower(screen_getch(buf));
+ replace = screen_get_yesno(buf, false);
g_free(buf);
- if (key != YES[0]) {
+ if (!replace) {
g_free(filename_utf8);
g_free(filename);
screen_status_printf(_("Aborted"));