Commit d82735fa authored by Dan Pascu's avatar Dan Pascu

Removed unused class attributes from ChatSessionItem

parent 67291fd4
...@@ -17,7 +17,7 @@ from operator import attrgetter ...@@ -17,7 +17,7 @@ from operator import attrgetter
from PyQt4 import uic from PyQt4 import uic
from PyQt4.QtCore import Qt, QAbstractListModel, QByteArray, QEasingCurve, QEvent, QMimeData, QModelIndex, QObject, QPointF, QPropertyAnimation, QRect, QSize, QTimer, pyqtSignal from PyQt4.QtCore import Qt, QAbstractListModel, QByteArray, QEasingCurve, QEvent, QMimeData, QModelIndex, QObject, QPointF, QPropertyAnimation, QRect, QSize, QTimer, pyqtSignal
from PyQt4.QtGui import QApplication, QBrush, QColor, QDrag, QIcon, QLinearGradient, QListView, QMenu, QPainter, QPalette, QPen, QPixmap, QPolygonF, QShortcut, QStyle, QStyledItemDelegate from PyQt4.QtGui import QApplication, QBrush, QColor, QDrag, QLinearGradient, QListView, QMenu, QPainter, QPalette, QPen, QPixmap, QPolygonF, QShortcut, QStyle, QStyledItemDelegate
from application.notification import IObserver, NotificationCenter, NotificationData from application.notification import IObserver, NotificationCenter, NotificationData
from application.python import Null, limit from application.python import Null, limit
...@@ -2204,30 +2204,11 @@ class AudioSessionListView(QListView): ...@@ -2204,30 +2204,11 @@ class AudioSessionListView(QListView):
# Chat sessions # Chat sessions
# #
class IconDescriptor(object):
def __init__(self, filename):
self.filename = filename
self.icon = None
def __get__(self, obj, objtype):
if self.icon is None:
self.icon = QIcon(self.filename)
self.icon.filename = self.filename
return self.icon
def __set__(self, obj, value):
raise AttributeError("attribute cannot be set")
def __delete__(self, obj):
raise AttributeError("attribute cannot be deleted")
class ChatSessionItem(object): class ChatSessionItem(object):
implements(IObserver) implements(IObserver)
size_hint = QSize(200, 36) size_hint = QSize(200, 36)
default_user_icon = IconDescriptor(Resources.get('icons/default-avatar.png'))
stylish_icons = True
def __init__(self, blink_session): def __init__(self, blink_session):
self.blink_session = blink_session self.blink_session = blink_session
self.blink_session.items.chat = self self.blink_session.items.chat = self
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment