summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: db3d835)
raw | patch | inline | side by side (parent: db3d835)
author | Max Kellermann <max@duempel.org> | |
Thu, 25 Sep 2008 15:40:59 +0000 (17:40 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Thu, 25 Sep 2008 15:40:59 +0000 (17:40 +0200) |
None of the paint() implementations actually use the screen pointer -
remove it from the method signature.
remove it from the method signature.
diff --git a/src/screen.c b/src/screen.c
index c7fece70eb83c4b9fd939f0ca6d84c626fb7f459..785807c2b7e6e87bfc759c6efff808df1d66c428 100644 (file)
--- a/src/screen.c
+++ b/src/screen.c
/* paint the main window */
wclear(screen.main_window.w);
if (mode_fn->paint != NULL)
- mode_fn->paint(&screen, c);
+ mode_fn->paint(c);
paint_progress_window(c);
paint_status_window(c);
diff --git a/src/screen.h b/src/screen.h
index 91ee26447d68709b99b6e35f0b9ee9a8f440eba6..8c0a947a090be8d4a9c8d8ca2b29c7d252431013 100644 (file)
--- a/src/screen.h
+++ b/src/screen.h
typedef void (*screen_open_fn_t)(struct screen *screen, mpdclient_t *c);
typedef void (*screen_close_fn_t)(void);
typedef void (*screen_resize_fn_t)(int cols, int rows);
-typedef void (*screen_paint_fn_t)(struct screen *screen, mpdclient_t *c);
+typedef void (*screen_paint_fn_t)(mpdclient_t *c);
typedef void (*screen_update_fn_t)(struct screen *screen, mpdclient_t *c);
typedef int (*screen_cmd_fn_t)(struct screen *scr, mpdclient_t *c, command_t cmd);
typedef const char *(*screen_title_fn_t)(char *s, size_t size);
diff --git a/src/screen_artist.c b/src/screen_artist.c
index 6857b66adb712e2cbe94eaa5fcdde9a614dff59a..b8f5bb018f2f6df82e90ece7afc569f7fefebd8d 100644 (file)
--- a/src/screen_artist.c
+++ b/src/screen_artist.c
}
static void
-paint(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c)
+paint(mpd_unused mpdclient_t *c)
{
if (browser.filelist) {
list_window_paint(browser.lw, browser_lw_callback,
}
static void
-update(screen_t *screen, mpdclient_t *c)
+update(mpd_unused screen_t *screen, mpdclient_t *c)
{
if (browser.filelist && !browser.filelist->updated)
list_window_paint(browser.lw, browser_lw_callback,
else if (metalist)
list_window_paint(browser.lw, artist_lw_callback, metalist);
else
- paint(screen, c);
+ paint(c);
wnoutrefresh(browser.lw->w);
}
diff --git a/src/screen_file.c b/src/screen_file.c
index a3bf192d92fd3a75324e7a17e04966393fe1d8fa..efea4db6000ad8f2bea63de4125a63e5683a7baf 100644 (file)
--- a/src/screen_file.c
+++ b/src/screen_file.c
}
static void
-browse_paint(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c)
+browse_paint(mpd_unused mpdclient_t *c)
{
list_window_paint(browser.lw, browser_lw_callback, browser.filelist);
}
static void
-browse_update(screen_t *screen, mpdclient_t *c)
+browse_update(mpd_unused screen_t *screen, mpdclient_t *c)
{
if (browser.filelist->updated) {
- browse_paint(screen, c);
+ browse_paint(c);
browser.filelist->updated = FALSE;
return;
}
diff --git a/src/screen_help.c b/src/screen_help.c
index cbdd66c62fbacec3c0a6dbcc6196e212b25b8bf0..3ac4b0543ecdbe79536d9acf3785272fb9de552b 100644 (file)
--- a/src/screen_help.c
+++ b/src/screen_help.c
}
static void
-help_paint(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c)
+help_paint(mpd_unused mpdclient_t *c)
{
list_window_paint(lw, list_callback, NULL);
}
diff --git a/src/screen_keydef.c b/src/screen_keydef.c
index f6ae3d3e950562fc5f645d0067d9ea533e4ea2ef..fbd9905cb4b23ac43762486ea5f5efcf5a7c130d 100644 (file)
--- a/src/screen_keydef.c
+++ b/src/screen_keydef.c
}
static void
-keydef_paint(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c)
+keydef_paint(mpd_unused mpdclient_t *c)
{
list_window_paint(lw, list_callback, NULL);
}
diff --git a/src/screen_lyrics.c b/src/screen_lyrics.c
index 50f41b7f6f4c83c0a27d72efbe5bb7d839b0e9dd..931b114fb86eb789d697ef4a5b7e827ac5f3361a 100644 (file)
--- a/src/screen_lyrics.c
+++ b/src/screen_lyrics.c
}
static void
-lyrics_paint(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c)
+lyrics_paint(mpd_unused mpdclient_t *c)
{
list_window_paint(lw, list_callback, NULL);
}
case CMD_LYRICS_UPDATE:
if (c->song != NULL) {
screen_lyrics_load(c->song);
- lyrics_paint(NULL, NULL);
+ lyrics_paint(NULL);
wrefresh(lw->w);
}
return 1;
diff --git a/src/screen_play.c b/src/screen_play.c
index 6eac958b6efc36e015cf8b0f5c991063c33fb1b4..3aaff229dbdaadfbe7f407ef5539679f336bb3da 100644 (file)
--- a/src/screen_play.c
+++ b/src/screen_play.c
}
static void
-play_paint(mpd_unused screen_t *screen, mpdclient_t *c)
+play_paint(mpdclient_t *c)
{
list_window_paint(lw, list_callback, (void *) c);
}
static void
-play_update(screen_t *screen, mpdclient_t *c)
+play_update(mpd_unused screen_t *screen, mpdclient_t *c)
{
/* hide the cursor when mpd are playing and the user are inactive */
if (options.hide_cursor > 0 &&
if (c->playlist.id != playlist_id) {
list_window_check_selected(lw, playlist_length(&c->playlist));
- play_paint(screen, c);
+ play_paint(c);
playlist_id = c->playlist.id;
} else {
list_window_paint(lw, list_callback, (void *) c);
diff --git a/src/screen_search.c b/src/screen_search.c
index 723409028565cde135932103b93b55f3c44d0d3f..d29c7bf9594045288602093e1a697601722802d2 100644 (file)
--- a/src/screen_search.c
+++ b/src/screen_search.c
}
static void
-paint(mpd_unused screen_t *screen, mpdclient_t *c)
+paint(mpdclient_t *c)
{
if (browser.filelist) {
browser.lw->flags = 0;
}
static void
-update(screen_t *screen, mpdclient_t *c)
+update(mpd_unused screen_t *screen, mpdclient_t *c)
{
if (browser.filelist == NULL || browser.filelist->updated) {
- paint(screen, c);
+ paint(c);
return;
}
case CMD_SELECT_ALL:
browser_handle_select_all(&browser, c);
- paint (screen, c);
+ paint(c);
return 0;
case CMD_SEARCH_MODE: