-
Notifications
You must be signed in to change notification settings - Fork 0
/
find_artist_list_ILO.cpp
52 lines (37 loc) · 1.18 KB
/
find_artist_list_ILO.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#include "stdafx.h"
#include "find_artist_list.h"
#include "find_artist_list_ILO.h"
#include "find_release_dialog.h"
CArtistList* ILOD_artist_list::get_uilist() {
return dynamic_cast<CArtistList*>(ilo_get_uilist());
}
// IListControlOwnerDataSource overrides
size_t ILOD_artist_list::listGetItemCount(ctx_t ctx) {
return get_uilist()->Get_Artists().get_count();
}
pfc::string8 ILOD_artist_list::listGetSubItemText(ctx_t ctx, size_t item, size_t subItem) {
auto artists = get_uilist()->Get_Artists();
if (item < artists.get_count()) {
return artists[item]->name;
}
else {
return "";
}
}
void ILOD_artist_list::listItemAction(ctx_t, size_t) {
get_uilist()->Default_Action();
}
void ILOD_artist_list::listSelChanged(ctx_t) {
bool bva = false;
if (get_uilist()->Get_Artists().get_count() == 1) {
auto artist = get_uilist()->Get_Artists()[0];
if (artist->id.equals("194")/*various artists*/) {
get_uilist()->Default_Action();
return;
}
}
cupdRelSrc in_cupdsrc(updRelSrc::ArtistProfile);
in_cupdsrc.extended = (ol::full_cache() && CONF.auto_rel_load_on_select);
auto dlg = dynamic_cast<CFindReleaseDialog*>(this);
dlg->convey_artist_list_selection(in_cupdsrc);
}