diff options
Diffstat (limited to 'src/camera')
-rw-r--r-- | src/camera/Branch.vala | 16 | ||||
-rw-r--r-- | src/camera/Camera.vala | 2 | ||||
-rw-r--r-- | src/camera/CameraTable.vala | 12 | ||||
-rw-r--r-- | src/camera/GPhoto.vala | 2 | ||||
-rw-r--r-- | src/camera/ImportPage.vala | 16 |
5 files changed, 24 insertions, 24 deletions
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<DiscoveredCamera, Camera.SidebarEntry> 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; } diff --git a/src/camera/Camera.vala b/src/camera/Camera.vala index f6d1f4b..84fff8e 100644 --- a/src/camera/Camera.vala +++ b/src/camera/Camera.vala @@ -1,4 +1,4 @@ -/* 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. diff --git a/src/camera/CameraTable.vala b/src/camera/CameraTable.vala index 8466388..bdeac54 100644 --- a/src/camera/CameraTable.vala +++ b/src/camera/CameraTable.vala @@ -1,4 +1,4 @@ -/* Copyright 2009-2014 Yorba Foundation +/* Copyright 2009-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. @@ -8,9 +8,9 @@ public class DiscoveredCamera { public GPhoto.Camera gcamera; public string uri; public string display_name; - public GLib.Icon? icon; + public string? icon; - public DiscoveredCamera(GPhoto.Camera gcamera, string uri, string display_name, GLib.Icon? icon) { + public DiscoveredCamera(GPhoto.Camera gcamera, string uri, string display_name, string? icon) { this.gcamera = gcamera; this.uri = uri; this.display_name = display_name; @@ -221,10 +221,10 @@ public class CameraTable { return null; } - private GLib.Icon? get_icon_for_uuid(string uuid) { + private string? get_icon_for_uuid(string uuid) { foreach (Volume volume in volume_monitor.get_volumes()) { if (volume.get_identifier(VolumeIdentifier.UUID) == uuid) { - return volume.get_icon(); + return volume.get_icon().to_string(); } } return null; @@ -323,7 +323,7 @@ public class CameraTable { foreach (string port in detected_map.keys) { string name = detected_map.get(port); string display_name = null; - GLib.Icon? icon = null; + string? icon = null; string uri = get_port_uri(port); if (camera_map.has_key(uri)) { diff --git a/src/camera/GPhoto.vala b/src/camera/GPhoto.vala index a1a46cb..41af0b2 100644 --- a/src/camera/GPhoto.vala +++ b/src/camera/GPhoto.vala @@ -1,4 +1,4 @@ -/* Copyright 2009-2014 Yorba Foundation +/* Copyright 2009-2015 Yorba Foundation * * This software is licensed under the GNU LGPL (version 2.1 or later). * See the COPYING file in this distribution. diff --git a/src/camera/ImportPage.vala b/src/camera/ImportPage.vala index 823a458..ba66990 100644 --- a/src/camera/ImportPage.vala +++ b/src/camera/ImportPage.vala @@ -1,4 +1,4 @@ -/* Copyright 2009-2014 Yorba Foundation +/* Copyright 2009-2015 Yorba Foundation * * This software is licensed under the GNU LGPL (version 2.1 or later). * See the COPYING file in this distribution. @@ -289,7 +289,7 @@ class ImportPreview : MediaSourceItem { bool using_placeholder = (pixbuf == null); if (pixbuf == null) { if (placeholder_preview == null) { - placeholder_preview = AppWindow.get_instance().render_icon(Gtk.Stock.MISSING_IMAGE, + placeholder_preview = AppWindow.get_instance().render_icon("image-missing", Gtk.IconSize.DIALOG, null); placeholder_preview = scale_pixbuf(placeholder_preview, MAX_SCALE, Gdk.InterpType.BILINEAR, true); @@ -691,7 +691,7 @@ public class ImportPage : CheckerboardPage { private string camera_name; private VolumeMonitor volume_monitor = null; private ImportPage? local_ref = null; - private GLib.Icon? icon; + private string? icon; private ImportPageSearchViewFilter search_filter = new ImportPageSearchViewFilter(); private HideImportedViewFilter hide_imported_filter = new HideImportedViewFilter(); private CameraViewTracker tracker; @@ -707,7 +707,7 @@ public class ImportPage : CheckerboardPage { LIBRARY_ERROR } - public ImportPage(GPhoto.Camera camera, string uri, string? display_name = null, GLib.Icon? icon = null) { + public ImportPage(GPhoto.Camera camera, string uri, string? display_name = null, string? icon = null) { base(_("Camera")); this.camera = camera; this.uri = uri; @@ -810,13 +810,15 @@ public class ImportPage : CheckerboardPage { toolbar.insert(new Gtk.SeparatorToolItem(), -1); // Import selected - Gtk.ToolButton import_selected_button = new Gtk.ToolButton.from_stock(Resources.IMPORT); + Gtk.ToolButton import_selected_button = new Gtk.ToolButton(null, null); + import_selected_button.set_icon_name(Resources.IMPORT); import_selected_button.set_related_action(get_action("ImportSelected")); toolbar.insert(import_selected_button, -1); // Import all - Gtk.ToolButton import_all_button = new Gtk.ToolButton.from_stock(Resources.IMPORT_ALL); + Gtk.ToolButton import_all_button = new Gtk.ToolButton(null, null); + import_all_button.set_icon_name(Resources.IMPORT_ALL); import_all_button.set_related_action(get_action("ImportAll")); toolbar.insert(import_all_button, -1); @@ -1736,7 +1738,7 @@ public class ImportPage : CheckerboardPage { photos_string, videos_string, both_string, neither_string); ImportUI.QuestionParams question = new ImportUI.QuestionParams( - question_string, Gtk.Stock.DELETE, _("_Keep")); + question_string, Resources.DELETE_LABEL, _("_Keep")); if (!ImportUI.report_manifest(manifest, false, question)) return; |