Move text changes

This commit is contained in:
Tim Bentley 2013-01-21 17:22:10 +00:00
parent 2bbe629c43
commit 895215715c
2 changed files with 8 additions and 2 deletions

View File

@ -1523,6 +1523,9 @@ class ServiceManager(QtGui.QWidget):
self.regenerateServiceItems() self.regenerateServiceItems()
def onThemeChangeAction(self): def onThemeChangeAction(self):
"""
Handles theme change events
"""
theme = self.sender().objectName() theme = self.sender().objectName()
# No object name means that the "Default" theme is supposed to be used. # No object name means that the "Default" theme is supposed to be used.
if not theme: if not theme:
@ -1532,6 +1535,9 @@ class ServiceManager(QtGui.QWidget):
self.regenerateServiceItems(True) self.regenerateServiceItems(True)
def _get_parent_item_data(self, item): def _get_parent_item_data(self, item):
"""
Finds and returns the parent item for any item
"""
parent_item = item.parent() parent_item = item.parent()
if parent_item is None: if parent_item is None:
return item.data(0, QtCore.Qt.UserRole) return item.data(0, QtCore.Qt.UserRole)

View File

@ -206,7 +206,7 @@ class TestServiceItem(TestCase):
# service_item.set_from_service(line) # service_item.set_from_service(line)
# THEN: We should get back a valid service item # THEN: We should get back a valid service item
#assert service_item.is_valid is True, u'The new service item should be valid' assert service_item.is_valid is True, u'The new service item should be valid'
#assert len(service_item._display_frames) == 0, u'The service item has no display frames' #assert len(service_item._display_frames) == 0, u'The service item has no display frames'
#assert len(service_item.capabilities) == 5, u'There are 5 default custom item capabilities' #assert len(service_item.capabilities) == 5, u'There are 5 default custom item capabilities'
#assert (service_item.get_display_title()) == u'Test Custom', u'The custom title is correct' #assert (service_item.get_display_title()) == u'Test Custom', u'The custom title is correct'
@ -219,4 +219,4 @@ class TestServiceItem(TestCase):
first_line = items[0] first_line = items[0]
except: except:
first_line = u'' first_line = u''
return first_line return first_line