예제 #1
0
void playlist_shift (gint offset)
{
    gint list = aud_playlist_get_active ();
    gint focus = playlist_get_focus (list);

    if (focus < 0 || ! aud_playlist_entry_get_selected (list, focus))
        return;

    focus += aud_playlist_shift (list, focus, offset);
    playlist_set_focus (list, focus);
}
예제 #2
0
static void shift_rows (void * user, gint row, gint before)
{
    gint list = ((PlaylistWidgetData *) user)->list;

    /* Adjust the shift amount so that the selected entry closest to the
     * destination ends up at the destination. */
    if (before > row)
        before -= playlist_count_selected_in_range (list, row, before - row);
    else
        before += playlist_count_selected_in_range (list, before, row - before);

    aud_playlist_shift (list, row, before - row);
}