2
* Copyright (c) 2011 Scott Ringwelski <sgringwe@mtu.edu>
4
* Originally Written by Scott Ringwelski for BeatBox Music Player
5
* BeatBox Music Player: http://www.launchpad.net/beat-box
7
* This library is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU Library General Public
9
* License as published by the Free Software Foundation; either
10
* version 2 of the License, or (at your option) any later version.
12
* This library is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
* Library General Public License for more details.
17
* You should have received a copy of the GNU Library General Public
18
* License along with this library; if not, write to the
19
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20
* Boston, MA 02111-1307, USA.
4
26
public class BeatBox.AlbumView : ContentView, ScrolledWindow {
7
HashMap<string, LinkedList<int>> medias; // album+album_artist, list of related songs
9
Collection<int> _show_next; // these are populated if necessary when user opens this view.
10
HashMap<string, LinkedList<int>> _showing_medias;
28
public signal void itemClicked(string artist, string album);
30
public IconView icons;
32
private LibraryManager lm;
33
private LibraryWindow lw;
34
private HashMap<string, LinkedList<int>> medias; // album+album_artist, list of related songs
36
private Collection<int> _show_next; // these are populated if necessary when user opens this view.
37
private HashMap<string, LinkedList<int>> _showing_medias;
11
38
private string last_search;
12
LinkedList<string> timeout_search;
14
public IconView icons;
17
Gdk.Pixbuf defaultPix;
20
bool _is_current_view;
39
private LinkedList<string> timeout_search;
41
private AlbumViewModel model;
43
private Gdk.Pixbuf defaultPix;
45
private bool _is_current;
46
private bool _is_current_view;
47
private bool needsUpdate;
23
49
private const int BORDER_WIDTH = 6;
24
50
private const int ITEM_WIDTH = Icons.ALBUM_VIEW_IMAGE_SIZE + BORDER_WIDTH;
26
public signal void itemClicked(string artist, string album);
28
52
/* medias should be mutable, as we will be sorting it */
29
53
public AlbumView(LibraryManager lmm, LibraryWindow lww, Collection<int> smedias) {