1
/* Copyright 2012-2013 Yorba Foundation
3
* This software is licensed under the GNU Lesser General Public License
4
* (version 2.1 or later). See the COPYING file in this distribution.
7
public class Folders.Page : CollectionPage {
8
private class FolderViewManager : CollectionViewManager {
11
public FolderViewManager(Folders.Page owner, File dir) {
17
public override bool include_in_view(DataSource source) {
21
File myfile = ((MediaSource) source).get_file();
23
while (myfile.has_parent(null) && depth < maxdepth) {
24
if (myfile.get_parent().equal(dir))
27
myfile = myfile.get_parent();
35
private FolderViewManager view_manager;
37
public Page(File dir) {
38
base (dir.get_path());
40
view_manager = new FolderViewManager(this, dir);
42
foreach (MediaSourceCollection sources in MediaCollectionRegistry.get_instance().get_all())
43
get_view().monitor_source_collection(sources, view_manager, null);
46
protected override void get_config_photos_sort(out bool sort_order, out int sort_by) {
47
Config.Facade.get_instance().get_library_photos_sort(out sort_order, out sort_by);
50
protected override void set_config_photos_sort(bool sort_order, int sort_by) {
51
Config.Facade.get_instance().set_library_photos_sort(sort_order, sort_by);