More beeping
This commit is contained in:
parent
7f66f801f4
commit
c5fcc1c8c1
48
nncmpp.c
48
nncmpp.c
@ -1609,33 +1609,32 @@ app_process_action (enum action action)
|
|||||||
{
|
{
|
||||||
case ACTION_QUIT:
|
case ACTION_QUIT:
|
||||||
app_quit ();
|
app_quit ();
|
||||||
break;
|
return true;
|
||||||
case ACTION_REDRAW:
|
case ACTION_REDRAW:
|
||||||
clear ();
|
clear ();
|
||||||
app_invalidate ();
|
app_invalidate ();
|
||||||
break;
|
return true;
|
||||||
case ACTION_LAST_TAB:
|
case ACTION_LAST_TAB:
|
||||||
if (!g.last_tab)
|
if (!g.last_tab)
|
||||||
return false;
|
return false;
|
||||||
app_switch_tab (g.last_tab);
|
app_switch_tab (g.last_tab);
|
||||||
break;
|
return true;
|
||||||
case ACTION_HELP_TAB:
|
case ACTION_HELP_TAB:
|
||||||
app_switch_tab (g.help_tab);
|
app_switch_tab (g.help_tab);
|
||||||
break;
|
return true;
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
case ACTION_MPD_TOGGLE:
|
case ACTION_MPD_TOGGLE:
|
||||||
if (g.state == PLAYER_PLAYING) MPD_SIMPLE ("pause", "1");
|
if (g.state == PLAYER_PLAYING) return MPD_SIMPLE ("pause", "1");
|
||||||
else if (g.state == PLAYER_PAUSED) MPD_SIMPLE ("pause", "0");
|
if (g.state == PLAYER_PAUSED) return MPD_SIMPLE ("pause", "0");
|
||||||
else MPD_SIMPLE ("play");
|
return MPD_SIMPLE ("play");
|
||||||
break;
|
case ACTION_MPD_STOP: return MPD_SIMPLE ("stop");
|
||||||
case ACTION_MPD_STOP: MPD_SIMPLE ("stop"); break;
|
case ACTION_MPD_PREVIOUS: return MPD_SIMPLE ("previous");
|
||||||
case ACTION_MPD_PREVIOUS: MPD_SIMPLE ("previous"); break;
|
case ACTION_MPD_NEXT: return MPD_SIMPLE ("next");
|
||||||
case ACTION_MPD_NEXT: MPD_SIMPLE ("next"); break;
|
case ACTION_MPD_FORWARD: return MPD_SIMPLE ("seekcur", "+10");
|
||||||
case ACTION_MPD_FORWARD: MPD_SIMPLE ("seekcur", "+10"); break;
|
case ACTION_MPD_BACKWARD: return MPD_SIMPLE ("seekcur", "-10");
|
||||||
case ACTION_MPD_BACKWARD: MPD_SIMPLE ("seekcur", "-10"); break;
|
case ACTION_MPD_UPDATE_DB: return MPD_SIMPLE ("update");
|
||||||
case ACTION_MPD_UPDATE_DB: MPD_SIMPLE ("update"); break;
|
|
||||||
case ACTION_MPD_VOLUME_UP:
|
case ACTION_MPD_VOLUME_UP:
|
||||||
if (g.volume >= 0)
|
if (g.volume >= 0)
|
||||||
{
|
{
|
||||||
@ -1643,7 +1642,7 @@ app_process_action (enum action action)
|
|||||||
MPD_SIMPLE ("setvol", volume);
|
MPD_SIMPLE ("setvol", volume);
|
||||||
free (volume);
|
free (volume);
|
||||||
}
|
}
|
||||||
break;
|
return true;
|
||||||
case ACTION_MPD_VOLUME_DOWN:
|
case ACTION_MPD_VOLUME_DOWN:
|
||||||
if (g.volume >= 0)
|
if (g.volume >= 0)
|
||||||
{
|
{
|
||||||
@ -1651,13 +1650,13 @@ app_process_action (enum action action)
|
|||||||
MPD_SIMPLE ("setvol", volume);
|
MPD_SIMPLE ("setvol", volume);
|
||||||
free (volume);
|
free (volume);
|
||||||
}
|
}
|
||||||
break;
|
return true;
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
// XXX: these should rather be parametrized
|
// XXX: these should rather be parametrized
|
||||||
case ACTION_SCROLL_UP: app_scroll (-3); break;
|
case ACTION_SCROLL_UP: return app_scroll (-3);
|
||||||
case ACTION_SCROLL_DOWN: app_scroll (3); break;
|
case ACTION_SCROLL_DOWN: return app_scroll (3);
|
||||||
|
|
||||||
case ACTION_GOTO_TOP:
|
case ACTION_GOTO_TOP:
|
||||||
if (tab->item_count)
|
if (tab->item_count)
|
||||||
@ -1666,7 +1665,7 @@ app_process_action (enum action action)
|
|||||||
app_ensure_selection_visible ();
|
app_ensure_selection_visible ();
|
||||||
app_invalidate ();
|
app_invalidate ();
|
||||||
}
|
}
|
||||||
break;
|
return true;
|
||||||
case ACTION_GOTO_BOTTOM:
|
case ACTION_GOTO_BOTTOM:
|
||||||
if (tab->item_count)
|
if (tab->item_count)
|
||||||
{
|
{
|
||||||
@ -1675,7 +1674,7 @@ app_process_action (enum action action)
|
|||||||
app_ensure_selection_visible ();
|
app_ensure_selection_visible ();
|
||||||
app_invalidate ();
|
app_invalidate ();
|
||||||
}
|
}
|
||||||
break;
|
return true;
|
||||||
|
|
||||||
case ACTION_GOTO_ITEM_PREVIOUS:
|
case ACTION_GOTO_ITEM_PREVIOUS:
|
||||||
return app_move_selection (-1);
|
return app_move_selection (-1);
|
||||||
@ -1702,7 +1701,7 @@ app_process_action (enum action action)
|
|||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
case ACTION_NONE:
|
case ACTION_NONE:
|
||||||
break;
|
return true;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -1944,8 +1943,8 @@ current_tab_on_action (enum action action)
|
|||||||
// with multiple items we need to use all number indexes, but "moveid"
|
// with multiple items we need to use all number indexes, but "moveid"
|
||||||
switch (action)
|
switch (action)
|
||||||
{
|
{
|
||||||
case ACTION_CHOOSE: MPD_SIMPLE ("playid", id); return true;
|
case ACTION_CHOOSE: return MPD_SIMPLE ("playid", id);
|
||||||
case ACTION_DELETE: MPD_SIMPLE ("deleteid", id); return true;
|
case ACTION_DELETE: return MPD_SIMPLE ("deleteid", id);
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2265,8 +2264,7 @@ library_tab_on_action (enum action action)
|
|||||||
if (x.type != LIBRARY_DIR && x.type != LIBRARY_FILE)
|
if (x.type != LIBRARY_DIR && x.type != LIBRARY_FILE)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
MPD_SIMPLE ("add", x.path);
|
return MPD_SIMPLE ("add", x.path);
|
||||||
return true;
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user