Repository: plone.app.portlets
Branch: refs/heads/master
Date: 2014-12-30T09:15:57+01:00
Author: Philip Bauer (pbauer) <bauer@starzel.de>
Commit: https://github.com/plone/plone.app.portlets/commit/1be9f86b239f140af529f319d368d38cad3e066f

Use plone_layout for getIcon to get rid of deprecation-messages.

Files changed:
M CHANGES.rst
M plone/app/portlets/browser/manage.py
M plone/app/portlets/portlets/navigation.py
M plone/app/portlets/portlets/news.pt
M plone/app/portlets/portlets/recent.pt
M plone/app/portlets/portlets/review.py

diff --git a/CHANGES.rst b/CHANGES.rst
index 40d1c0d..3a4ad10 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -4,7 +4,8 @@ Changelog
 3.0.3 (unreleased)
 ------------------
 
-- Nothing changed yet.
+- Use plone_layout for getIcon.
+  [pbauer]
 
 
 3.0.2 (2014-10-23)
diff --git a/plone/app/portlets/browser/manage.py b/plone/app/portlets/browser/manage.py
index b987ce8..a5f8458 100644
--- a/plone/app/portlets/browser/manage.py
+++ b/plone/app/portlets/browser/manage.py
@@ -281,8 +281,9 @@ def portal_type(self):
         return self.fti().Title()
 
     def portal_type_icon(self):
-        ploneview = getMultiAdapter((self.context, self.request), name=u"plone")
-        return ploneview.getIcon(self.fti())
+        plone_layout = getMultiAdapter((self.context, self.request),
+            name=u"plone_layout")
+        return plone_layout.getIcon(self.fti())
 
     @memoize
     def fti(self):
diff --git a/plone/app/portlets/portlets/navigation.py b/plone/app/portlets/portlets/navigation.py
index 178137d..e0ca269 100644
--- a/plone/app/portlets/portlets/navigation.py
+++ b/plone/app/portlets/portlets/navigation.py
@@ -216,8 +216,9 @@ def root_item_class(self):
         return ''
 
     def root_icon(self):
-        ploneview = getMultiAdapter((self.context, self.request), name='plone')
-        icon = ploneview.getIcon(self.getNavRoot())
+        plone_layout = getMultiAdapter((self.context, self.request),
+            name='plone_layout')
+        icon = plone_layout.getIcon(self.getNavRoot())
         return icon
 
     def root_is_portal(self):
diff --git a/plone/app/portlets/portlets/news.pt b/plone/app/portlets/portlets/news.pt
index 0c88966..7462cf5 100644
--- a/plone/app/portlets/portlets/news.pt
+++ b/plone/app/portlets/portlets/news.pt
@@ -16,8 +16,8 @@
   <section class="portletContent">
     <ul>
       <tal:newsitems  tal:define="toLocalizedTime nocall:context/@@plone/toLocalizedTime;
-                                  plone_view context/@@plone;
-                                  getIcon nocall:plone_view/getIcon;"
+                                  plone_layout context/@@plone_layout;
+                                  getIcon nocall:plone_layout/getIcon;"
                       tal:repeat="obj view/published_news_items">
       <li tal:define="oddrow repeat/obj/odd;
                       item_icon python:getIcon(obj);"
diff --git a/plone/app/portlets/portlets/recent.pt b/plone/app/portlets/portlets/recent.pt
index fe6de41..f5c0a26 100644
--- a/plone/app/portlets/portlets/recent.pt
+++ b/plone/app/portlets/portlets/recent.pt
@@ -14,8 +14,8 @@
     <section class="portletContent"
         tal:condition="view/recent_items">
       <ul>
-        <tal:items tal:define="plone_view context/@@plone;
-                           getIcon nocall:plone_view/getIcon;
+        <tal:items tal:define="plone_layout context/@@plone_layout;
+                           getIcon nocall:plone_layout/getIcon;
                            normalizeString nocall:plone_view/normalizeString;
                            toLocalizedTime nocall:plone_view/toLocalizedTime;"
                tal:repeat="obj view/recent_items">
@@ -35,7 +35,7 @@
                  <tal:title content="obj/pretty_title_or_id">
                      Title
                  </tal:title>
-                 
+
              </a>
              <time class="portletItemDetails"
                        tal:content="python:toLocalizedTime(obj.ModificationDate)"
diff --git a/plone/app/portlets/portlets/review.py b/plone/app/portlets/portlets/review.py
index c56cec7..caac7a6 100644
--- a/plone/app/portlets/portlets/review.py
+++ b/plone/app/portlets/portlets/review.py
@@ -60,8 +60,9 @@ def _data(self):
         workflow = getToolByName(context, 'portal_workflow')
 
         plone_view = getMultiAdapter((context, self.request), name='plone')
+        plone_layout = getMultiAdapter((context, self.request), name='plone_layout')
         getMember = getToolByName(context, 'portal_membership').getMemberById
-        getIcon = plone_view.getIcon
+        getIcon = plone_layout.getIcon
         toLocalizedTime = plone_view.toLocalizedTime
 
         idnormalizer = queryUtility(IIDNormalizer)