Commit e0f50b8d authored by Dan Pascu's avatar Dan Pascu

Moves Status class from sessions to blink/widgets/labels.py

parent 1a327b59
......@@ -35,13 +35,7 @@ from blink.configuration.datatypes import DefaultPath
from blink.resources import Resources
from blink.util import call_later, run_in_gui_thread
from blink.widgets.buttons import LeftSegment, MiddleSegment, RightSegment, SwitchViewButton
class Status(unicode):
def __new__(cls, value, color='black'):
instance = unicode.__new__(cls, value)
instance.color = color
return instance
from blink.widgets.labels import Status
class SessionItem(QObject):
......
# Copyright (c) 2010 AG Projects. See LICENSE for details.
#
__all__ = ['DurationLabel', 'IconSelector', 'LatencyLabel', 'PacketLossLabel', 'StatusLabel', 'StreamInfoLabel']
__all__ = ['DurationLabel', 'IconSelector', 'LatencyLabel', 'PacketLossLabel', 'Status', 'StatusLabel', 'StreamInfoLabel']
import os
from datetime import timedelta
......@@ -152,6 +152,13 @@ class PacketLossLabel(QLabel):
del _get_value, _set_value
class Status(unicode):
def __new__(cls, value, color='black'):
instance = unicode.__new__(cls, value)
instance.color = color
return instance
class StatusLabel(QLabel):
def __init__(self, parent=None):
super(StatusLabel, self).__init__(parent)
......
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