From 1fff3c6294774e7c08de5a0a3e32adbdd6220cb7 Mon Sep 17 00:00:00 2001 From: Neil Jagdish Patel Date: Tue, 31 Aug 2010 10:03:54 -0400 Subject: Add support for latest asset pool (bzr r474.1.1) --- .../places/places-place-home-renderer.vala | 26 +++------------------- .../places/places-volume-child-controller.vala | 19 ++-------------- 2 files changed, 5 insertions(+), 40 deletions(-) (limited to 'unity-private') diff --git a/unity-private/places/places-place-home-renderer.vala b/unity-private/places/places-place-home-renderer.vala index 360a5e269..259f258b4 100644 --- a/unity-private/places/places-place-home-renderer.vala +++ b/unity-private/places/places-place-home-renderer.vala @@ -94,7 +94,7 @@ namespace Unity.Places activate_place (APPS_PLACE, 5); }); - icon = new HomeButton (_("Files & Folders"), filename_for_icon ("work"), ""); + icon = new HomeButton (_("Files & Folders"), filename_for_icon ("filesandfolders"), ""); icon_view.add_actor (icon); icon.show (); icon.clicked.connect (() => { @@ -168,28 +168,8 @@ namespace Unity.Places private string filename_for_icon (string icon) { - if (theme == null) - { - theme = new Gtk.IconTheme (); - theme.set_custom_theme ("unity-icon-theme"); - } - - string icon_file = ""; - if (theme.has_icon (icon)) - { - var info = theme.lookup_icon (icon, 128, 0); - if (info != null) - { - var filename = info.get_filename (); - if (FileUtils.test(filename, FileTest.IS_REGULAR)) - { - icon_file = filename; - } - } - - } - - return icon_file; + /* FIXME: We'll autoget this from the theme before release */ + return "/usr/share/icons/unity-icon-theme/apps/128/" + icon + ".svg"; } } diff --git a/unity-private/places/places-volume-child-controller.vala b/unity-private/places/places-volume-child-controller.vala index 9d587895c..0e46203d9 100644 --- a/unity-private/places/places-volume-child-controller.vala +++ b/unity-private/places/places-volume-child-controller.vala @@ -24,7 +24,7 @@ namespace Unity.Places { public class VolumeChildController : ScrollerChildController { - public static const string ICON = "/usr/share/unity/trash.png"; + public static const string ICON = "/usr/share/unity/devices.png"; public Volume volume { get; construct; } @@ -37,22 +37,7 @@ namespace Unity.Places construct { name = volume.get_name (); - - var icon = volume.get_icon (); - var icon_name = ""; - if (icon is ThemedIcon) - { - icon_name = (icon as ThemedIcon).get_names ()[0]; - } - else if (icon is FileIcon) - { - icon_name = (icon as FileIcon).get_file ().get_path (); - } - else - { - icon_name = ICON; - } - load_icon_from_icon_name (icon_name); + load_icon_from_icon_name (ICON); child.group_type = ScrollerChild.GroupType.DEVICE; child.drag_removed.connect (eject_volume); -- cgit v1.2.3