summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 39ebad4)
raw | patch | inline | side by side (parent: 39ebad4)
author | Max Kellermann <max@duempel.org> | |
Mon, 14 Jul 2014 08:40:18 +0000 (10:40 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Mon, 14 Jul 2014 08:41:50 +0000 (10:41 +0200) |
Regression caused by commit 4345c919f: screen_browser_paint_callback()
now expects a struct screen_browser pointer instead of a struct
filelist pointer, because it now requires access to the song format.
However, browser_lw_callback() still wants a struct filelist, and the
CMD_LIST_JUMP handler passes the former to screen_jump() for both
callbacks.
now expects a struct screen_browser pointer instead of a struct
filelist pointer, because it now requires access to the song format.
However, browser_lw_callback() still wants a struct filelist, and the
CMD_LIST_JUMP handler passes the former to screen_jump() for both
callbacks.
index a0798cd5db707beb311fd58e4d2e847ac2978861..187b72cee70d5d9f982fdc62c01c8249e665acfc 100644 (file)
--- a/NEWS
+++ b/NEWS
ncmpc 0.24 - not yet released
+* fix crash on "jump" (hotkey ".")
ncmpc 0.23 - (2014-07-10)
diff --git a/src/screen_artist.c b/src/screen_artist.c
index 3ffc931137719459e8c9f4fe75031ce18993f5ff..01b29be7d24d0fa1c0b9f42ff677bb1fea153e50 100644 (file)
--- a/src/screen_artist.c
+++ b/src/screen_artist.c
case CMD_LIST_JUMP:
switch (mode) {
case LIST_ARTISTS:
- screen_jump(browser.lw, screen_artist_lw_callback,
+ screen_jump(browser.lw,
+ screen_artist_lw_callback, artist_list,
paint_artist_callback, artist_list);
artist_repaint();
return true;
case LIST_ALBUMS:
- screen_jump(browser.lw, screen_artist_lw_callback,
+ screen_jump(browser.lw,
+ screen_artist_lw_callback, album_list,
paint_album_callback, album_list);
artist_repaint();
return true;
diff --git a/src/screen_browser.c b/src/screen_browser.c
index ff209db2bfb46146dca776b051235053a2349304..30fb726133650a05c6ad4d1b354a466c5da8a720 100644 (file)
--- a/src/screen_browser.c
+++ b/src/screen_browser.c
browser->filelist);
return true;
case CMD_LIST_JUMP:
- screen_jump(browser->lw, browser_lw_callback,
- screen_browser_paint_callback, browser->filelist);
+ screen_jump(browser->lw,
+ browser_lw_callback, browser->filelist,
+ screen_browser_paint_callback, browser);
return true;
#ifdef HAVE_GETMOUSE
diff --git a/src/screen_find.c b/src/screen_find.c
index 88872df5097e0e3ea38073b0f2a4a02bb4a90152..f131af72d482e0d52114c1b5c34b26b02f4839e8 100644 (file)
--- a/src/screen_find.c
+++ b/src/screen_find.c
* which begins with this string while the users types */
void
screen_jump(struct list_window *lw,
- list_window_callback_fn_t callback_fn,
- list_window_paint_callback_t paint_callback,
- void *callback_data)
+ list_window_callback_fn_t callback_fn, void *callback_data,
+ list_window_paint_callback_t paint_callback, void *paint_data)
{
const int WRLN_MAX_LINE_SIZE = 1024;
int key = 65;
/* repaint the list_window */
if (paint_callback != NULL)
- list_window_paint2(lw, paint_callback, callback_data);
+ list_window_paint2(lw, paint_callback, paint_data);
else
list_window_paint(lw, callback_fn, callback_data);
wrefresh(lw->w);
diff --git a/src/screen_find.h b/src/screen_find.h
index 76a2ffdc289c25355e72de03e7d34233618825ab..85a97dd3b7bb2352ac0c131a8c9b4cbb95528db8 100644 (file)
--- a/src/screen_find.h
+++ b/src/screen_find.h
* which begins with this string while the users types */
void
screen_jump(struct list_window *lw,
- list_window_callback_fn_t callback_fn,
- list_window_paint_callback_t paint_callback,
- void *callback_data);
+ list_window_callback_fn_t callback_fn, void *callback_data,
+ list_window_paint_callback_t paint_callback, void *paint_data);
#endif
diff --git a/src/screen_queue.c b/src/screen_queue.c
index 7fd73aa7080c2e1531507b0debe3a2d86217d11e..7c1041cadfe28268e5210b95c97c09c4a4c6c031 100644 (file)
--- a/src/screen_queue.c
+++ b/src/screen_queue.c
screen_queue_repaint();
return true;
case CMD_LIST_JUMP:
- screen_jump(lw, screen_queue_lw_callback, NULL, NULL);
+ screen_jump(lw, screen_queue_lw_callback, NULL, NULL, NULL);
screen_queue_save_selection();
screen_queue_repaint();
return true;