callbacks: Remove on_pq_track_changed()
It's been replaced with a function int he QNotifier class. Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
parent
44c702a302
commit
c068cbb736
|
@ -5,14 +5,11 @@
|
|||
#include <core/callback.h>
|
||||
|
||||
|
||||
static void no_op(Queue *, unsigned int) {}
|
||||
static void no_op(Queue *) {}
|
||||
|
||||
|
||||
static struct Callbacks callbacks = {
|
||||
.on_pq_removed = no_op,
|
||||
|
||||
.on_queue_track_changed = no_op,
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -180,10 +180,8 @@ void Queue :: del(Track *track)
|
|||
void Queue :: updated(Track *track)
|
||||
{
|
||||
for (unsigned int i = 0; i < _tracks.size(); i++) {
|
||||
if (_tracks[i] == track) {
|
||||
if (_tracks[i] == track)
|
||||
_notify->on_track_updated(i);
|
||||
get_callbacks()->on_queue_track_changed(this, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -253,7 +251,7 @@ void Queue :: sort(sort_t field, bool reset)
|
|||
std::stable_sort(_tracks.begin(), _tracks.end(), SortTracks(_sort_order));
|
||||
|
||||
for (unsigned int i = 0; i < _tracks.size(); i++)
|
||||
get_callbacks()->on_queue_track_changed(this, i);
|
||||
_notify->on_track_updated(i);
|
||||
}
|
||||
|
||||
Track *Queue :: operator[](unsigned int index)
|
||||
|
|
|
@ -22,15 +22,6 @@ struct Callbacks {
|
|||
*/
|
||||
void (*on_pq_removed)(Queue *);
|
||||
|
||||
/* Queue callbacks */
|
||||
|
||||
/**
|
||||
* Called when a track's metadata changes.
|
||||
*
|
||||
* @param queue The queue containing the track.
|
||||
* @param row The current index of the track.
|
||||
*/
|
||||
void (*on_queue_track_changed)(Queue *, unsigned int);
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue