~markellmtthw/beat-box/fix-920012

« back to all changes in this revision

Viewing changes to src/Views/AlbumView/AlbumIconView.vala

  • Committer: sgringwe at gmail
  • Date: 2012-02-01 17:49:01 UTC
  • mfrom: (505.1.4 beat-box)
  • Revision ID: sgringwe@gmail.com-20120201174901-1bl290z1hwk8bvbk
merged new translations as well as victor's changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*-
 
2
 * Copyright (c) 2011       Scott Ringwelski <sgringwe@mtu.edu>
 
3
 *
 
4
 * Originally Written by Scott Ringwelski for BeatBox Music Player
 
5
 * BeatBox Music Player: http://www.launchpad.net/beat-box
 
6
 *
 
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.
 
11
 *
 
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.
 
16
 *
 
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.
 
21
 */
 
22
 
1
23
using Gtk;
2
24
using Gee;
3
25
 
4
26
public class BeatBox.AlbumView : ContentView, ScrolledWindow {
5
 
        LibraryManager lm;
6
 
        LibraryWindow lw;
7
 
        HashMap<string, LinkedList<int>> medias; // album+album_artist, list of related songs
8
 
        
9
 
        Collection<int> _show_next; // these are populated if necessary when user opens this view.
10
 
        HashMap<string, LinkedList<int>> _showing_medias;
 
27
 
 
28
        public signal void itemClicked(string artist, string album);
 
29
 
 
30
        public IconView icons;
 
31
 
 
32
        private LibraryManager lm;
 
33
        private LibraryWindow lw;
 
34
        private HashMap<string, LinkedList<int>> medias; // album+album_artist, list of related songs
 
35
 
 
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;
13
 
        
14
 
        public IconView icons;
15
 
        AlbumViewModel model;
16
 
        
17
 
        Gdk.Pixbuf defaultPix;
18
 
        
19
 
        bool _is_current;
20
 
        bool _is_current_view;
21
 
        bool needsUpdate;
 
39
        private LinkedList<string> timeout_search;
 
40
 
 
41
        private AlbumViewModel model;
 
42
        
 
43
        private Gdk.Pixbuf defaultPix;
 
44
        
 
45
        private bool _is_current;
 
46
        private bool _is_current_view;
 
47
        private bool needsUpdate;
22
48
        
23
49
        private const int BORDER_WIDTH = 6;
24
50
        private const int ITEM_WIDTH = Icons.ALBUM_VIEW_IMAGE_SIZE + BORDER_WIDTH;
25
51
        
26
 
        public signal void itemClicked(string artist, string album);
27
 
        
28
52
        /* medias should be mutable, as we will be sorting it */
29
53
        public AlbumView(LibraryManager lmm, LibraryWindow lww, Collection<int> smedias) {
30
54
                lm = lmm;