This commit is contained in:
rimach 2011-11-24 22:09:26 +01:00
commit dcbff07f29
4 changed files with 9 additions and 6 deletions

View File

@ -118,6 +118,7 @@ class ServiceItem(object):
self.from_service = False
self.image_border = u'#000000'
self.background_audio = []
self.theme_overwritten = False
self._new_item()
def _new_item(self):
@ -273,7 +274,8 @@ class ServiceItem(object):
u'start_time': self.start_time,
u'end_time': self.end_time,
u'media_length': self.media_length,
u'background_audio': self.background_audio
u'background_audio': self.background_audio,
u'theme_overwritten': self.theme_overwritten
}
service_data = []
if self.service_item_type == ServiceItemType.Text:
@ -323,6 +325,7 @@ class ServiceItem(object):
self.media_length = header[u'media_length']
if u'background_audio' in header:
self.background_audio = header[u'background_audio']
self.theme_overwritten = header.get(u'theme_overwritten', False)
if self.service_item_type == ServiceItemType.Text:
for slide in serviceitem[u'serviceitem'][u'data']:
self._raw_frames.append(slide)
@ -484,6 +487,7 @@ class ServiceItem(object):
``theme``
The new theme to be replaced in the service item
"""
self.theme_overwritten = (theme == None)
self.theme = theme
self._new_item()
self.render()

View File

@ -123,7 +123,7 @@ class Ui_AboutDialog(object):
testers = [u'Philip "Phill" Ridout', u'Wesley "wrst" Stout',
u'John "jseagull1" Cegalis (lead)']
packagers = ['Thomas "tabthorpe" Abthorpe (FreeBSD)',
u'Tim "TRB143" Bentley (Fedora)',
u'Tim "TRB143" Bentley (Fedora and Android)',
u'Matthias "matthub" Hub (Mac OS X)',
u'Stevan "ElderP" Pettit (Windows)',
u'Raoul "superfly" Snyman (Ubuntu)']

View File

@ -300,7 +300,6 @@ class ThemeManager(QtGui.QWidget):
if self.checkIfThemeExists(newThemeName):
themeData = self.getThemeData(oldThemeName)
self.cloneThemeData(themeData, newThemeName)
self.loadThemes()
def cloneThemeData(self, themeData, newThemeName):
"""
@ -370,7 +369,7 @@ class ThemeManager(QtGui.QWidget):
def onExportTheme(self):
"""
Save the theme in a zip file
Export the theme in a zip file
"""
item = self.themeListWidget.currentItem()
if item is None:
@ -625,7 +624,7 @@ class ThemeManager(QtGui.QWidget):
theme_dir = os.path.join(self.path, name)
check_directory_exists(theme_dir)
theme_file = os.path.join(theme_dir, name + u'.xml')
if imageTo and self.oldBackgroundImage and \
if self.oldBackgroundImage and \
imageTo != self.oldBackgroundImage:
delete_file(self.oldBackgroundImage)
outfile = None

View File

@ -411,7 +411,7 @@ class HttpConnection(object):
``action``
This is the action, either ``hide`` or ``show``.
"""
event = u'maindisplay_%s' % action
event = u'live_display_%s' % action
Receiver.send_message(event, HideMode.Blank)
return HttpResponse(json.dumps({u'results': {u'success': True}}),
{u'Content-Type': u'application/json'})