5 Commits

5 changed files with 39 additions and 12 deletions

View File

@@ -98,8 +98,8 @@ endforeach (page)
# CPack
set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "MPD client")
set (CPACK_PACKAGE_VENDOR "Premysl Janouch")
set (CPACK_PACKAGE_CONTACT "Přemysl Janouch <p@janouch.name>")
set (CPACK_PACKAGE_VENDOR "Premysl Eric Janouch")
set (CPACK_PACKAGE_CONTACT "Přemysl Eric Janouch <p@janouch.name>")
set (CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
set (CPACK_PACKAGE_VERSION_MAJOR ${project_VERSION_MAJOR})
set (CPACK_PACKAGE_VERSION_MINOR ${project_VERSION_MINOR})

View File

@@ -1,4 +1,4 @@
Copyright (c) 2016 - 2018, Přemysl Janouch <p@janouch.name>
Copyright (c) 2016 - 2020, Přemysl Eric Janouch <p@janouch.name>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

Submodule liberty updated: bb30c7d86e...1a76b2032e

View File

@@ -1,7 +1,7 @@
/*
* line-editor.c: a line editor component for the TUI part of liberty
*
* Copyright (c) 2017 - 2018, Přemysl Janouch <p@janouch.name>
* Copyright (c) 2017 - 2018, Přemysl Eric Janouch <p@janouch.name>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted.

View File

@@ -1,7 +1,7 @@
/*
* nncmpp -- the MPD client you never knew you needed
*
* Copyright (c) 2016 - 2018, Přemysl Janouch <p@janouch.name>
* Copyright (c) 2016 - 2020, Přemysl Eric Janouch <p@janouch.name>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted.
@@ -286,6 +286,9 @@ poller_curl_on_socket_action (CURL *easy, curl_socket_t s, int what,
}
if (what == CURL_POLL_REMOVE)
{
// Some annoying cURL bug. Never trust libraries.
fd->fd.closed = fcntl(fd->fd.fd, F_GETFL) < 0 && errno == EBADF;
poller_fd_reset (&fd->fd);
LIST_UNLINK (self->fds, fd);
free (fd);
@@ -1532,8 +1535,10 @@ app_goto_tab (int tab_index)
\
XX( QUIT, "Quit" ) \
XX( REDRAW, "Redraw screen" ) \
XX( HELP_TAB, "Switch to help tab" ) \
XX( LAST_TAB, "Switch to previous tab" ) \
XX( TAB_HELP, "Switch to help tab" ) \
XX( TAB_LAST, "Switch to last tab" ) \
XX( TAB_PREVIOUS, "Switch to previous tab" ) \
XX( TAB_NEXT, "Switch to next tab" ) \
\
XX( MPD_TOGGLE, "Toggle play/pause" ) \
XX( MPD_STOP, "Stop playback" ) \
@@ -1759,14 +1764,30 @@ app_process_action (enum action action)
tab->item_mark = tab->item_selected;
return true;
case ACTION_LAST_TAB:
case ACTION_TAB_LAST:
if (!g.last_tab)
return false;
app_switch_tab (g.last_tab);
return true;
case ACTION_HELP_TAB:
case ACTION_TAB_HELP:
app_switch_tab (g.help_tab);
return true;
case ACTION_TAB_PREVIOUS:
if (g.active_tab == g.help_tab)
return false;
if (!g.active_tab->prev)
app_switch_tab (g.help_tab);
else
app_switch_tab (g.active_tab->prev);
return true;
case ACTION_TAB_NEXT:
if (g.active_tab == g.help_tab)
app_switch_tab (g.tabs);
else if (g.active_tab->next)
app_switch_tab (g.active_tab->next);
else
return false;
return true;
case ACTION_MPD_TOGGLE:
if (g.state == PLAYER_PLAYING) return MPD_SIMPLE ("pause", "1");
@@ -1987,8 +2008,12 @@ g_normal_defaults[] =
{ "Escape", ACTION_QUIT },
{ "q", ACTION_QUIT },
{ "C-l", ACTION_REDRAW },
{ "M-Tab", ACTION_LAST_TAB },
{ "F1", ACTION_HELP_TAB },
{ "M-Tab", ACTION_TAB_LAST },
{ "F1", ACTION_TAB_HELP },
{ "C-Left", ACTION_TAB_PREVIOUS },
{ "C-Right", ACTION_TAB_NEXT },
{ "C-PageUp", ACTION_TAB_PREVIOUS },
{ "C-PageDown", ACTION_TAB_NEXT },
{ "Home", ACTION_GOTO_TOP },
{ "End", ACTION_GOTO_BOTTOM },
@@ -2008,6 +2033,8 @@ g_normal_defaults[] =
{ "C-n", ACTION_GOTO_ITEM_NEXT },
{ "C-b", ACTION_GOTO_PAGE_PREVIOUS },
{ "C-f", ACTION_GOTO_PAGE_NEXT },
{ "C-y", ACTION_SCROLL_UP },
{ "C-e", ACTION_SCROLL_DOWN },
{ "H", ACTION_GOTO_VIEW_TOP },
{ "M", ACTION_GOTO_VIEW_CENTER },