From: Jonathan Neuschäfer Date: Tue, 22 Nov 2011 21:54:55 +0000 (+0100) Subject: rename screen_message to screen_status X-Git-Tag: release-0.20~46^4 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a7ab2fcf9d02b39436e71a7a207bd13fd515958c;p=ncmpc.git rename screen_message to screen_status Its two functions are screen_status_message and screen_status_printf so this just seems logical to me. --- diff --git a/Makefile.am b/Makefile.am index dce18a5..b4207cd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -30,7 +30,7 @@ ncmpc_headers = \ src/progress_bar.h \ src/status_bar.h \ src/screen.h \ - src/screen_message.h \ + src/screen_status.h \ src/screen_interface.h \ src/screen_list.h \ src/screen_find.h \ @@ -90,7 +90,7 @@ src_ncmpc_SOURCES = \ src/progress_bar.c \ src/status_bar.c \ src/screen.c \ - src/screen_message.c \ + src/screen_status.c \ src/screen_list.c \ src/screen_find.c \ src/screen_utils.c \ diff --git a/src/list_window.c b/src/list_window.c index 66c6d21..1c143d3 100644 --- a/src/list_window.c +++ b/src/list_window.c @@ -25,7 +25,7 @@ #include "command.h" #include "colors.h" #include "paint.h" -#include "screen_message.h" +#include "screen_status.h" #include "i18n.h" #include diff --git a/src/main.c b/src/main.c index 389b8c6..60f5d21 100644 --- a/src/main.c +++ b/src/main.c @@ -27,7 +27,7 @@ #include "ncu.h" #include "screen.h" #include "screen_utils.h" -#include "screen_message.h" +#include "screen_status.h" #include "strfsong.h" #include "i18n.h" #include "player_command.h" diff --git a/src/player_command.c b/src/player_command.c index 2455c83..59c9725 100644 --- a/src/player_command.c +++ b/src/player_command.c @@ -22,7 +22,7 @@ #include "options.h" #include "i18n.h" #include "screen_client.h" -#include "screen_message.h" +#include "screen_status.h" int seek_id = -1; int seek_target_time; diff --git a/src/screen.c b/src/screen.c index fdc168a..b341a8a 100644 --- a/src/screen.c +++ b/src/screen.c @@ -21,7 +21,7 @@ #include "screen_interface.h" #include "screen_list.h" #include "screen_utils.h" -#include "screen_message.h" +#include "screen_status.h" #include "config.h" #include "i18n.h" #include "charset.h" diff --git a/src/screen_artist.c b/src/screen_artist.c index 3ae2145..2b6448e 100644 --- a/src/screen_artist.c +++ b/src/screen_artist.c @@ -19,7 +19,7 @@ #include "screen_artist.h" #include "screen_interface.h" -#include "screen_message.h" +#include "screen_status.h" #include "screen_find.h" #include "screen_browser.h" #include "screen.h" diff --git a/src/screen_browser.c b/src/screen_browser.c index 04673f4..41783b5 100644 --- a/src/screen_browser.c +++ b/src/screen_browser.c @@ -22,7 +22,7 @@ #include "screen_file.h" #include "screen_song.h" #include "screen_lyrics.h" -#include "screen_message.h" +#include "screen_status.h" #include "screen_find.h" #include "screen.h" #include "i18n.h" diff --git a/src/screen_client.c b/src/screen_client.c index f864f19..b8e936f 100644 --- a/src/screen_client.c +++ b/src/screen_client.c @@ -19,7 +19,7 @@ #include "screen_client.h" #include "screen_utils.h" -#include "screen_message.h" +#include "screen_status.h" #include "mpdclient.h" #include "i18n.h" #include "charset.h" diff --git a/src/screen_file.c b/src/screen_file.c index 73f5600..46ffdc2 100644 --- a/src/screen_file.c +++ b/src/screen_file.c @@ -20,7 +20,7 @@ #include "screen_file.h" #include "screen_browser.h" #include "screen_interface.h" -#include "screen_message.h" +#include "screen_status.h" #include "screen_queue.h" #include "screen.h" #include "config.h" diff --git a/src/screen_find.c b/src/screen_find.c index 4113c39..3fdf9f3 100644 --- a/src/screen_find.c +++ b/src/screen_find.c @@ -19,7 +19,7 @@ #include "screen_find.h" #include "screen_utils.h" -#include "screen_message.h" +#include "screen_status.h" #include "screen.h" #include "i18n.h" #include "options.h" diff --git a/src/screen_keydef.c b/src/screen_keydef.c index 8ecc003..cc3ccb5 100644 --- a/src/screen_keydef.c +++ b/src/screen_keydef.c @@ -19,7 +19,7 @@ #include "screen_keydef.h" #include "screen_interface.h" -#include "screen_message.h" +#include "screen_status.h" #include "screen_find.h" #include "i18n.h" #include "conf.h" diff --git a/src/screen_lyrics.c b/src/screen_lyrics.c index e655fc5..5c04fe2 100644 --- a/src/screen_lyrics.c +++ b/src/screen_lyrics.c @@ -19,7 +19,7 @@ #include "screen_lyrics.h" #include "screen_interface.h" -#include "screen_message.h" +#include "screen_status.h" #include "screen_file.h" #include "screen_song.h" #include "i18n.h" diff --git a/src/screen_message.c b/src/screen_message.c deleted file mode 100644 index 6bb907d..0000000 --- a/src/screen_message.c +++ /dev/null @@ -1,42 +0,0 @@ -/* ncmpc (Ncurses MPD Client) - * (c) 2004-2010 The Music Player Daemon Project - * Project homepage: http://musicpd.org - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include "screen_message.h" -#include "screen.h" - -#include - -void -screen_status_message(const char *msg) -{ - status_bar_message(&screen.status_bar, msg); -} - -void -screen_status_printf(const char *format, ...) -{ - char *msg; - va_list ap; - - va_start(ap,format); - msg = g_strdup_vprintf(format,ap); - va_end(ap); - screen_status_message(msg); - g_free(msg); -} diff --git a/src/screen_message.h b/src/screen_message.h deleted file mode 100644 index fa789a6..0000000 --- a/src/screen_message.h +++ /dev/null @@ -1,29 +0,0 @@ -/* ncmpc (Ncurses MPD Client) - * (c) 2004-2010 The Music Player Daemon Project - * Project homepage: http://musicpd.org - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#ifndef NCMPC_SCREEN_MESSAGE_H -#define NCMPC_SCREEN_MESSAGE_H - -void -screen_status_message(const char *msg); - -void -screen_status_printf(const char *format, ...); - -#endif diff --git a/src/screen_outputs.c b/src/screen_outputs.c index af0b2d3..98c4d9c 100644 --- a/src/screen_outputs.c +++ b/src/screen_outputs.c @@ -19,7 +19,7 @@ #include "screen_outputs.h" #include "screen_interface.h" -#include "screen_message.h" +#include "screen_status.h" #include "paint.h" #include "i18n.h" #include "list_window.h" diff --git a/src/screen_queue.c b/src/screen_queue.c index 31c4dcc..b21dc3a 100644 --- a/src/screen_queue.c +++ b/src/screen_queue.c @@ -20,7 +20,7 @@ #include "screen_queue.h" #include "screen_interface.h" #include "screen_file.h" -#include "screen_message.h" +#include "screen_status.h" #include "screen_find.h" #include "config.h" #include "i18n.h" diff --git a/src/screen_search.c b/src/screen_search.c index 86c2bb1..cff0b9d 100644 --- a/src/screen_search.c +++ b/src/screen_search.c @@ -19,7 +19,7 @@ #include "screen_search.h" #include "screen_interface.h" -#include "screen_message.h" +#include "screen_status.h" #include "screen.h" #include "i18n.h" #include "options.h" diff --git a/src/screen_status.c b/src/screen_status.c new file mode 100644 index 0000000..36f8753 --- /dev/null +++ b/src/screen_status.c @@ -0,0 +1,42 @@ +/* ncmpc (Ncurses MPD Client) + * (c) 2004-2010 The Music Player Daemon Project + * Project homepage: http://musicpd.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include "screen_status.h" +#include "screen.h" + +#include + +void +screen_status_message(const char *msg) +{ + status_bar_message(&screen.status_bar, msg); +} + +void +screen_status_printf(const char *format, ...) +{ + char *msg; + va_list ap; + + va_start(ap,format); + msg = g_strdup_vprintf(format,ap); + va_end(ap); + screen_status_message(msg); + g_free(msg); +} diff --git a/src/screen_status.h b/src/screen_status.h new file mode 100644 index 0000000..d951290 --- /dev/null +++ b/src/screen_status.h @@ -0,0 +1,29 @@ +/* ncmpc (Ncurses MPD Client) + * (c) 2004-2010 The Music Player Daemon Project + * Project homepage: http://musicpd.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef NCMPC_SCREEN_STATUS_H +#define NCMPC_SCREEN_STATUS_H + +void +screen_status_message(const char *msg); + +void +screen_status_printf(const char *format, ...); + +#endif