summaryrefslogtreecommitdiff
path: root/src/folders
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2015-04-03 13:14:53 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2015-04-03 13:14:53 +0200
commitc43dfb815a4951b8248f4f0e98babe4f80204f03 (patch)
tree82745ed2353757c41ea1865bad9ac7a1b0a8a366 /src/folders
parent2785a691b958a79a1dd606c445188c71c3f58b3c (diff)
Imported Upstream version 0.22.0upstream/0.22.0
Diffstat (limited to 'src/folders')
-rw-r--r--src/folders/Branch.vala18
-rw-r--r--src/folders/Folders.vala15
-rw-r--r--src/folders/Page.vala2
3 files changed, 12 insertions, 23 deletions
diff --git a/src/folders/Branch.vala b/src/folders/Branch.vala
index bc5b578..0904e5c 100644
--- a/src/folders/Branch.vala
+++ b/src/folders/Branch.vala
@@ -1,4 +1,4 @@
-/* Copyright 2012-2014 Yorba Foundation
+/* Copyright 2012-2015 Yorba Foundation
*
* This software is licensed under the GNU Lesser General Public License
* (version 2.1 or later). See the COPYING file in this distribution.
@@ -136,9 +136,9 @@ public class Folders.Branch : Sidebar.Branch {
}
}
-private class Folders.Root : Sidebar.Grouping {
+private class Folders.Root : Sidebar.Header {
public Root() {
- base (_("Folders"), Folders.opened_icon, Folders.closed_icon);
+ base (_("Folders"));
}
}
@@ -172,22 +172,14 @@ public class Folders.SidebarEntry : Sidebar.SimplePageEntry, Sidebar.ExpandableE
return dir.get_basename();
}
- public override Icon? get_sidebar_icon() {
- return count == 0 ? closed_icon : have_photos_icon;
+ public override string? get_sidebar_icon() {
+ return count == 0 ? icon : have_photos_icon;
}
public override string to_string() {
return dir.get_path();
}
- public Icon? get_sidebar_open_icon() {
- return count == 0 ? opened_icon : have_photos_icon;
- }
-
- public Icon? get_sidebar_closed_icon() {
- return count == 0 ? closed_icon : have_photos_icon;
- }
-
public bool expand_on_select() {
return true;
}
diff --git a/src/folders/Folders.vala b/src/folders/Folders.vala
index 1cc14b1..da6f817 100644
--- a/src/folders/Folders.vala
+++ b/src/folders/Folders.vala
@@ -1,4 +1,4 @@
-/* Copyright 2012-2014 Yorba Foundation
+/* Copyright 2012-2015 Yorba Foundation
*
* This software is licensed under the GNU Lesser General Public License
* (version 2.1 or later). See the COPYING file in this distribution.
@@ -15,19 +15,16 @@
namespace Folders {
-static Icon? opened_icon = null;
-static Icon? closed_icon = null;
-static Icon? have_photos_icon = null;
+static string? icon = null;
+static string? have_photos_icon = null;
public void init() throws Error {
- opened_icon = new ThemedIcon(Resources.ICON_FOLDER_OPEN);
- closed_icon = new ThemedIcon(Resources.ICON_FOLDER_CLOSED);
- have_photos_icon = new ThemedIcon(Resources.ICON_FOLDER_DOCUMENTS);
+ icon = Resources.ICON_FOLDER;
+ have_photos_icon = Resources.ICON_FOLDER_DOCUMENTS;
}
public void terminate() {
- opened_icon = null;
- closed_icon = null;
+ icon = null;
have_photos_icon = null;
}
diff --git a/src/folders/Page.vala b/src/folders/Page.vala
index d101e88..eb3a84f 100644
--- a/src/folders/Page.vala
+++ b/src/folders/Page.vala
@@ -1,4 +1,4 @@
-/* Copyright 2012-2014 Yorba Foundation
+/* Copyright 2012-2015 Yorba Foundation
*
* This software is licensed under the GNU Lesser General Public License
* (version 2.1 or later). See the COPYING file in this distribution.