summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1d0e05d)
raw | patch | inline | side by side (parent: 1d0e05d)
author | Max Kellermann <max@duempel.org> | |
Fri, 3 Oct 2008 12:30:59 +0000 (14:30 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Fri, 3 Oct 2008 12:30:59 +0000 (14:30 +0200) |
None of the paint() implementations acutally uses the mpdclient
pointer. Remove it from the method signature.
pointer. Remove it from the method signature.
diff --git a/src/screen.c b/src/screen.c
index 90788b0868496a5a6a3b9f6cb422d64e24e42bbb..5345f49ef8665bca530a20689d533742797d1a64 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(c);
+ mode_fn->paint();
paint_progress_window(c);
paint_status_window(c);
diff --git a/src/screen.h b/src/screen.h
index 4ad376ba8e9d09ddb9d3d86c8fc6e658acdfd5df..976c75c9012dc0bce8b1fdfce39f0767f0da2715 100644 (file)
--- a/src/screen.h
+++ b/src/screen.h
void (*open)(struct screen *screen, mpdclient_t *c);
void (*close)(void);
void (*resize)(int cols, int rows);
- void (*paint)(mpdclient_t *c);
+ void (*paint)(void);
void (*update)(mpdclient_t *c);
int (*cmd)(struct screen *scr, mpdclient_t *c, command_t cmd);
const char *(*get_title)(char *s, size_t size);
diff --git a/src/screen_artist.c b/src/screen_artist.c
index 86291d87de633712542f7459a5a329d682ba919b..52b7eeee8727753ec4ffd92d9edf3d998f8e4dff 100644 (file)
--- a/src/screen_artist.c
+++ b/src/screen_artist.c
@@ -94,12 +94,12 @@ artist_lw_callback(unsigned idx, mpd_unused int *highlight, mpd_unused void *dat
}
static void
-paint(mpdclient_t *c);
+paint(void);
static void
artist_repaint(void)
{
- paint(NULL);
+ paint();
wrefresh(browser.lw->w);
}
}
static void
-paint(mpd_unused mpdclient_t *c)
+paint(void)
{
if (browser.filelist) {
list_window_paint(browser.lw, browser_lw_callback,
diff --git a/src/screen_file.c b/src/screen_file.c
index 3029165f2ade045a82c932805b570452f1befa0d..9dfe4ac6892d8822c7b4e0aded8326237384b353 100644 (file)
--- a/src/screen_file.c
+++ b/src/screen_file.c
static struct screen_browser browser;
static void
-browse_paint(mpdclient_t *c);
+browse_paint(void);
static void
file_repaint(void)
{
- browse_paint(NULL);
+ browse_paint();
wrefresh(browser.lw->w);
}
}
static void
-browse_paint(mpd_unused mpdclient_t *c)
+browse_paint(void)
{
list_window_paint(browser.lw, browser_lw_callback, browser.filelist);
}
.cmd = browse_cmd,
.get_title = browse_title,
};
-
diff --git a/src/screen_help.c b/src/screen_help.c
index adf9a03102fe805c194b2cc1e418f399b444aa57..fbcbf2b820f4fc40200415c93708fb2f292fea3d 100644 (file)
--- a/src/screen_help.c
+++ b/src/screen_help.c
}
static void
-help_paint(mpd_unused mpdclient_t *c)
+help_paint(void)
{
list_window_paint(lw, list_callback, NULL);
}
diff --git a/src/screen_keydef.c b/src/screen_keydef.c
index 268bc48d9ab3cd8f72a4cdaa637d7e91f4e87308..b84289d5bb1e8bdcee6767125685e7d4db9c54fb 100644 (file)
--- a/src/screen_keydef.c
+++ b/src/screen_keydef.c
}
static void
-keydef_paint(mpdclient_t *c);
+keydef_paint(void);
static void
keydef_repaint(void)
{
- keydef_paint(NULL);
+ keydef_paint();
wrefresh(lw->w);
}
}
static void
-keydef_paint(mpd_unused mpdclient_t *c)
+keydef_paint(void)
{
list_window_paint(lw, list_callback, NULL);
}
diff --git a/src/screen_lyrics.c b/src/screen_lyrics.c
index b1812de31154764efee7db1925bef9296f7d4f2f..be99e6b750847a511484f37be22053f164ce4d30 100644 (file)
--- a/src/screen_lyrics.c
+++ b/src/screen_lyrics.c
}
static void
-lyrics_paint(mpdclient_t *c);
+lyrics_paint(void);
/**
* Repaint and update the screen.
static void
lyrics_repaint(void)
{
- lyrics_paint(NULL);
+ lyrics_paint();
wrefresh(lw->w);
}
}
static void
-lyrics_paint(mpd_unused mpdclient_t *c)
+lyrics_paint(void)
{
list_window_paint(lw, list_callback, NULL);
}
diff --git a/src/screen_play.c b/src/screen_play.c
index 0fdf36746f439ae322e6a236ade4653501e90da4..4b285c533c52b9add633fc33900e49841d24517d 100644 (file)
--- a/src/screen_play.c
+++ b/src/screen_play.c
static guint timer_hide_cursor_id;
static void
-play_paint(struct mpdclient *c);
+play_paint(void);
static void
-playlist_repaint(struct mpdclient *c)
+playlist_repaint(void)
{
- play_paint(c);
+ play_paint();
wrefresh(lw->w);
}
static void
-playlist_repaint_if_active(struct mpdclient *c)
+playlist_repaint_if_active(void)
{
if (screen_is_visible(&screen_playlist))
- playlist_repaint(c);
+ playlist_repaint();
}
static void
}
list_window_check_selected(lw, c->playlist.list->len);
- playlist_repaint_if_active(c);
+ playlist_repaint_if_active();
}
static const char *
if (c->status != NULL && c->status->state == MPD_STATUS_STATE_PLAY) {
lw->flags |= LW_HIDE_CURSOR;
- playlist_repaint(c);
+ playlist_repaint();
} else
timer_hide_cursor_id = g_timeout_add(options.hide_cursor * 1000,
timer_hide_cursor, c);
}
static void
-play_paint(mpd_unused mpdclient_t *c)
+play_paint(void)
{
list_window_paint(lw, list_callback, NULL);
}
if (options.auto_center && current_song_id != -1)
center_playing_item(c);
- playlist_repaint(c);
+ playlist_repaint();
}
}
if (screen_get_mouse_event(c, &bstate, &row) ||
list_window_mouse(lw, playlist_length(playlist), bstate, row)) {
- playlist_repaint(c);
+ playlist_repaint();
return 1;
}
lw->selected = selected;
list_window_check_selected(lw, playlist_length(playlist));
- playlist_repaint(c);
+ playlist_repaint();
return 1;
}
}
if (list_window_cmd(lw, playlist_length(&c->playlist), cmd)) {
- playlist_repaint(c);
+ playlist_repaint();
return 1;
}
return 1;
case CMD_SCREEN_UPDATE:
center_playing_item(c);
- playlist_repaint(c);
+ playlist_repaint();
return 0;
case CMD_LIST_MOVE_UP:
screen_find(screen,
lw, playlist_length(&c->playlist),
cmd, list_callback, NULL);
- playlist_repaint(c);
+ playlist_repaint();
return 1;
#ifdef HAVE_GETMOUSE
diff --git a/src/screen_search.c b/src/screen_search.c
index 989ac7eaabfc170c3cb37847a3eb92947507831c..bf9278b53fa4c6280c946c486fad02ed8f042660 100644 (file)
--- a/src/screen_search.c
+++ b/src/screen_search.c
}
static void
-paint(mpdclient_t *c);
+paint(void);
static void
search_repaint(void)
{
- paint(NULL);
+ paint();
wrefresh(browser.lw->w);
}
}
static void
-paint(mpd_unused mpdclient_t *c)
+paint(void)
{
if (browser.filelist) {
browser.lw->flags = 0;