Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove deprecated contenttype icons #10

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Fixes:

- *add item here*

- cleanup old getIcon see https://github.com/plone/Products.CMFPlone/issues/1151
[fgrcon]

1.2.2 (2015-09-20)
------------------
Expand Down
6 changes: 0 additions & 6 deletions plone/app/contentlisting/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,6 @@ def uuid(self):
return uuid
return self.getPath()

def getIcon(self):
return queryMultiAdapter(
(self._brain, self.request, self._brain),
interface=IContentIcon
)()

def getSize(self):
return self._brain.getObjSize

Expand Down
3 changes: 0 additions & 3 deletions plone/app/contentlisting/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ def getURL(relative=False):
def uuid():
"""Unique content identifier."""

def getIcon():
"""icon for the object."""

def getSize():
"""size in bytes."""

Expand Down
6 changes: 0 additions & 6 deletions plone/app/contentlisting/realobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,6 @@ def uuid(self):
return uuid
return self.getPath()

def getIcon(self):
obj = self.getObject()
return queryMultiAdapter(
(obj, self.request, obj),
interface=IContentIcon)()

def review_state(self):
obj = self.getObject()
wftool = getToolByName(obj, "portal_workflow")
Expand Down
22 changes: 0 additions & 22 deletions plone/app/contentlisting/tests/test_integration_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,6 @@ def test_item_getURL(self):
)
self.assertEqual(self.item.getURL(), self.realitem.absolute_url())

def test_item_getIcon(self):
# since icons were changed to css sprites for most types for Plone 4,
# this one needs to use an image for the test.
self.folder.invokeFactory(
'Image', 'myimage', title='My Image', description='blah')
self.item = self.folder.restrictedTraverse('@@folderListing')()[1]
self.assertEqual(
self.item.getIcon(),
u'<img width="16" height="16" src="http://nohost/plone/png.png" '
u'alt="Image" />')

def test_item_getSize(self):
self.assertEqual(self.item.getSize().upper(), '0 KB')
Expand Down Expand Up @@ -204,18 +194,6 @@ def test_item_getURL(self):
'http://nohost/plone/test-folder/mypage')
self.assertEqual(self.item.getURL(), self.realitem.absolute_url())

def test_item_getIcon(self):
# since icons were changed to css sprites for most types for Plone 4,
# this one needs to use an image for the test.
self.folder.invokeFactory(
'Image', 'myimage', title='My Image', description='blah')
self.item = IContentListingObject(self.folder.myimage)
self.assertEqual(
self.item.getIcon(),
u'<img width="16" height="16" src="http://nohost/plone/error_icon.png" ' # noqa
u'alt="My Image" />'
)

def test_item_reviewState(self):
wftool = getToolByName(self.realitem, "portal_workflow")
wf = wftool.getInfoFor(self.realitem, 'review_state')
Expand Down