2
* Copyright (C) 2011, Marco Trevisan (Treviño) <mail@3v1n0.net>
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 3 as
6
* published by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
20
public class VideoLens : Lens
22
private const string ICON_PATH = "/usr/share/icons/unity-icon-theme/places/svg";
26
base("/net/3v1n0/dev/unity/lens/video", "video");
28
search_hint = _("Search Videos");
31
search_in_global = false;
37
private void setup_categories()
39
var cat = new List<Category>();
40
var icon_dir = File.new_for_path(ICON_PATH);
41
var icon_down = new FileIcon(icon_dir.get_child ("group-downloads.svg"));
43
cat.append(new Category(_("Streamable videos"), icon_down));
46
/*categories.append(new Category("Autos & Vehicles", icon_down));
47
categories.append(new Category("Art", icon_down));
48
categories.append(new Category("Comedy", icon_down));
49
categories.append(new Category("Education", icon_down));
50
categories.append(new Category("Shows", icon_down));
51
categories.append(new Category("Film & Animation", icon_down));
52
categories.append(new Category("Gaming", icon_down));
53
categories.append(new Category("Howto & Style", icon_down));
54
categories.append(new Category("Music", icon_down));
55
categories.append(new Category("News & Politics", icon_down));
56
categories.append(new Category("Non-profits & Activism", icon_down));
57
categories.append(new Category("People & Blogs", icon_down));
58
categories.append(new Category("Pets & Animals", icon_down));
59
categories.append(new Category("Science & Technology", icon_down));
60
categories.append(new Category("Sport", icon_down));
61
categories.append(new Category("Travel & Events", icon_down));
62
categories.append(new Category("Nature", icon_down));
63
categories.append(new Category("Experimental", icon_down));*/
66
private void setup_filters()
68
var f = new List<Filter>();
70
var time = new RadioOptionFilter("time", _("Uploaded time"));
71
time.add_option ("today", _("Today"));
72
time.add_option ("this-week", _("This Week"));
73
time.add_option ("this-month", _("This Month"));
76
var category = new CheckOptionFilter("category", _("Category"));
77
category.add_option("art", _("Art"));
78
category.add_option("comedy", _("Comedy"));
79
category.add_option("education", _("Education"));
80
category.add_option("shows", _("Entertainment"));
81
category.add_option("film_animation", _("Film & Animation"));
82
category.add_option("gaming", _("Gaming"));
83
category.add_option("howto", _("Howto & Style"));
84
category.add_option("music", _("Music"));
85
category.add_option("news", _("News & Politics"));
86
category.add_option("activism", _("Non-profits & Activism"));
87
category.add_option("people", _("People & Blogs"));
88
category.add_option("pets", _("Pets & Animals"));
89
category.add_option("science", _("Science & Technology"));
90
category.add_option("sport", _("Sport"));
91
category.add_option("travel", _("Travel & Events"));
92
category.add_option("nature", _("Nature"));
93
category.add_option("experimental", _("Experimental"));
96
var rating = new RatingsFilter("rating", _("Rating"));