From c43dfb815a4951b8248f4f0e98babe4f80204f03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Fri, 3 Apr 2015 13:14:53 +0200 Subject: Imported Upstream version 0.22.0 --- src/camera/Branch.vala | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'src/camera/Branch.vala') diff --git a/src/camera/Branch.vala b/src/camera/Branch.vala index 63a5443..83f3f56 100644 --- a/src/camera/Branch.vala +++ b/src/camera/Branch.vala @@ -1,17 +1,17 @@ -/* Copyright 2011-2014 Yorba Foundation +/* Copyright 2011-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. */ public class Camera.Branch : Sidebar.Branch { - internal static Icon? cameras_icon = null; + internal static string? cameras_icon = Resources.ICON_CAMERAS; private Gee.HashMap camera_map = new Gee.HashMap< DiscoveredCamera, Camera.SidebarEntry>(); public Branch() { - base (new Camera.Grouping(), + base (new Camera.Header(), Sidebar.Branch.Options.HIDE_IF_EMPTY | Sidebar.Branch.Options.AUTO_OPEN_ON_NEW_CHILD, camera_comparator); @@ -23,11 +23,9 @@ public class Camera.Branch : Sidebar.Branch { } internal static void init() { - cameras_icon = new GLib.ThemedIcon(Resources.ICON_CAMERAS); } internal static void terminate() { - cameras_icon = null; } private static int camera_comparator(Sidebar.Entry a, Sidebar.Entry b) { @@ -82,9 +80,9 @@ public class Camera.Branch : Sidebar.Branch { } } -public class Camera.Grouping : Sidebar.Grouping { - public Grouping() { - base (_("Cameras"), Camera.Branch.cameras_icon); +public class Camera.Header : Sidebar.Header { + public Header() { + base (_("Cameras")); } } @@ -101,7 +99,7 @@ public class Camera.SidebarEntry : Sidebar.SimplePageEntry { return camera.display_name ?? _("Camera"); } - public override Icon? get_sidebar_icon() { + public override string? get_sidebar_icon() { return camera.icon ?? Camera.Branch.cameras_icon; } -- cgit v1.2.3