Head r709 and initial fix for theme importing

This commit is contained in:
Jon Tibble 2010-02-21 13:20:39 +00:00
commit ab43741dcb
7 changed files with 73 additions and 50 deletions

View File

@ -202,7 +202,7 @@ class MainDisplay(DisplayWidget):
if not self.primary:
self.setVisible(True)
self.showFullScreen()
self.generateAlert()
Receiver.send_message(u'flush_alert')
def addImageWithText(self, frame):
frame = resize_image(frame,

View File

@ -237,6 +237,8 @@ class ThemeManager(QtGui.QWidget):
if len(files) > 0:
for file in files:
self.config.set_last_dir(unicode(file))
print file
print self.path
self.unzipTheme(file, self.path)
self.loadThemes()
@ -313,13 +315,14 @@ class ThemeManager(QtGui.QWidget):
filexml = None
themename = None
for file in zip.namelist():
if file.endswith(os.path.sep):
theme_dir = os.path.join(dir, file)
osfile = unicode(QtCore.QDir.toNativeSeparators(file))
if osfile.endswith(os.path.sep):
theme_dir = os.path.join(dir, osfile)
if not os.path.exists(theme_dir):
os.mkdir(os.path.join(dir, file))
os.mkdir(os.path.join(dir, osfile))
else:
fullpath = os.path.join(dir, file)
names = file.split(os.path.sep)
fullpath = os.path.join(dir, osfile)
names = osfile.split(os.path.sep)
if len(names) > 1:
# not preview file
if themename is None:

View File

@ -42,6 +42,8 @@ class AlertsManager(QtCore.QObject):
self.parent = parent
self.timer_id = 0
self.alertList = []
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'flush_alert'), self.generateAlert)
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'alert_text'), self.displayAlert)
QtCore.QObject.connect(Receiver.get_receiver(),

View File

@ -201,7 +201,7 @@ class ImpressController(PresentationController):
try:
ctx = resolver.resolve(u'uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext')
except:
log.exception(u'Unable to fine running instance ')
log.exception(u'Unable to find running instance ')
self.start_process()
loop += 1
try:
@ -233,8 +233,8 @@ class ImpressController(PresentationController):
def close_presentation(self):
"""
Close presentation and clean up objects
Triggerent by new object being added to SlideController orOpenLP
being shut down
Triggered by new object being added to SlideController or OpenLP
being shutdown
"""
log.debug(u'close Presentation OpenOffice')
if self.document:

View File

@ -67,8 +67,8 @@ class Controller(object):
def slide(self, slide, live):
log.debug(u'Live = %s, slide' % live)
# if not isLive:
# return
if not live:
return
self.activate()
self.controller.goto_slide(int(slide) + 1)
self.controller.poll_slidenumber(live)
@ -136,11 +136,13 @@ class Controller(object):
self.controller.blank_screen()
def unblank(self):
if not self.is_live:
if not self.isLive:
return
self.activate()
self.controller.unblank_screen()
def poll(self):
self.controller.poll_slidenumber(self.isLive)
class MessageListener(object):
"""
@ -229,16 +231,10 @@ class MessageListener(object):
self.previewHandler.shutdown()
def blank(self):
if self.isLive:
self.liveHandler.blank()
else:
self.previewHandler.blank()
self.liveHandler.blank()
def unblank(self):
if self.isLive:
self.liveHandler.unblank()
else:
self.previewHandler.unblank()
self.liveHandler.unblank()
def splitMessage(self, message):
"""
@ -263,4 +259,4 @@ class MessageListener(object):
return message[0], file, message[4]
def timeout(self):
self.controller.poll_slidenumber(self.is_live)
self.liveHandler.poll()

View File

@ -1,69 +1,91 @@
# -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
# Form implementation generated from reading ui file 'songusagedetaildialog.ui'
#
# Created: Tue Feb 9 07:34:05 2010
# by: PyQt4 UI code generator 4.6.2
#
# WARNING! All changes made in this file will be lost!
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2010 Raoul Snyman #
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
# Carsten Tinggaard #
# --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it #
# under the terms of the GNU General Public License as published by the Free #
# Software Foundation; version 2 of the License. #
# #
# This program is distributed in the hope that it will be useful, but WITHOUT #
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
# more details. #
# #
# You should have received a copy of the GNU General Public License along #
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
###############################################################################
from PyQt4 import QtCore, QtGui
class Ui_SongUsageDetailDialog(object):
def setupUi(self, AuditDetailDialog):
AuditDetailDialog.setObjectName("AuditDetailDialog")
AuditDetailDialog.setObjectName(u'AuditDetailDialog')
AuditDetailDialog.resize(609, 413)
self.verticalLayout = QtGui.QVBoxLayout(AuditDetailDialog)
self.verticalLayout.setObjectName("verticalLayout")
self.verticalLayout.setObjectName(u'verticalLayout')
self.DateRangeGroupBox = QtGui.QGroupBox(AuditDetailDialog)
self.DateRangeGroupBox.setObjectName("DateRangeGroupBox")
self.DateRangeGroupBox.setObjectName(u'DateRangeGroupBox')
self.verticalLayout_2 = QtGui.QVBoxLayout(self.DateRangeGroupBox)
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.verticalLayout_2.setObjectName(u'verticalLayout_2')
self.DateHorizontalLayout = QtGui.QHBoxLayout()
self.DateHorizontalLayout.setObjectName("DateHorizontalLayout")
self.DateHorizontalLayout.setObjectName(u'DateHorizontalLayout')
self.FromDate = QtGui.QCalendarWidget(self.DateRangeGroupBox)
self.FromDate.setObjectName("FromDate")
self.FromDate.setObjectName(u'FromDate')
self.DateHorizontalLayout.addWidget(self.FromDate)
self.ToLabel = QtGui.QLabel(self.DateRangeGroupBox)
self.ToLabel.setScaledContents(False)
self.ToLabel.setAlignment(QtCore.Qt.AlignCenter)
self.ToLabel.setObjectName("ToLabel")
self.ToLabel.setObjectName(u'ToLabel')
self.DateHorizontalLayout.addWidget(self.ToLabel)
self.ToDate = QtGui.QCalendarWidget(self.DateRangeGroupBox)
self.ToDate.setObjectName("ToDate")
self.ToDate.setObjectName(u'ToDate')
self.DateHorizontalLayout.addWidget(self.ToDate)
self.verticalLayout_2.addLayout(self.DateHorizontalLayout)
self.FileGroupBox = QtGui.QGroupBox(self.DateRangeGroupBox)
self.FileGroupBox.setObjectName("FileGroupBox")
self.FileGroupBox.setObjectName(u'FileGroupBox')
self.verticalLayout_4 = QtGui.QVBoxLayout(self.FileGroupBox)
self.verticalLayout_4.setObjectName("verticalLayout_4")
self.verticalLayout_4.setObjectName(u'verticalLayout_4')
self.horizontalLayout = QtGui.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
self.horizontalLayout.setObjectName(u'horizontalLayout')
self.FileLineEdit = QtGui.QLineEdit(self.FileGroupBox)
self.FileLineEdit.setObjectName("FileLineEdit")
self.FileLineEdit.setObjectName(u'FileLineEdit')
self.horizontalLayout.addWidget(self.FileLineEdit)
self.SaveFilePushButton = QtGui.QPushButton(self.FileGroupBox)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/exports/export_load.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
icon.addPixmap(QtGui.QPixmap(u':/exports/export_load.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.SaveFilePushButton.setIcon(icon)
self.SaveFilePushButton.setObjectName("SaveFilePushButton")
self.SaveFilePushButton.setObjectName(u'SaveFilePushButton')
self.horizontalLayout.addWidget(self.SaveFilePushButton)
self.verticalLayout_4.addLayout(self.horizontalLayout)
self.verticalLayout_2.addWidget(self.FileGroupBox)
self.verticalLayout.addWidget(self.DateRangeGroupBox)
self.buttonBox = QtGui.QDialogButtonBox(AuditDetailDialog)
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
self.buttonBox.setObjectName("buttonBox")
self.buttonBox.setObjectName(u'buttonBox')
self.verticalLayout.addWidget(self.buttonBox)
self.retranslateUi(AuditDetailDialog)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("accepted()"), AuditDetailDialog.accept)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("rejected()"), AuditDetailDialog.close)
QtCore.QObject.connect(self.SaveFilePushButton, QtCore.SIGNAL("pressed()"), AuditDetailDialog.defineOutputLocation)
QtCore.QObject.connect(self.buttonBox,
QtCore.SIGNAL(u'accepted()'),
AuditDetailDialog.accept)
QtCore.QObject.connect(self.buttonBox,
QtCore.SIGNAL(u'rejected()'),
AuditDetailDialog.close)
QtCore.QObject.connect(self.SaveFilePushButton,
QtCore.SIGNAL(u'pressed()'),
AuditDetailDialog.defineOutputLocation)
QtCore.QMetaObject.connectSlotsByName(AuditDetailDialog)
def retranslateUi(self, AuditDetailDialog):
AuditDetailDialog.setWindowTitle(QtGui.QApplication.translate("AuditDetailDialog", "Audit Detail Extraction", None, QtGui.QApplication.UnicodeUTF8))
self.DateRangeGroupBox.setTitle(QtGui.QApplication.translate("AuditDetailDialog", "Select Date Range", None, QtGui.QApplication.UnicodeUTF8))
self.ToLabel.setText(QtGui.QApplication.translate("AuditDetailDialog", "to", None, QtGui.QApplication.UnicodeUTF8))
self.FileGroupBox.setTitle(QtGui.QApplication.translate("AuditDetailDialog", "Report Location", None, QtGui.QApplication.UnicodeUTF8))
AuditDetailDialog.setWindowTitle(self.trUtf8('Audit Detail Extraction'))
self.DateRangeGroupBox.setTitle(self.trUtf8('ASelect Date Range'))
self.ToLabel.setText(self.trUtf8('to'))
self.FileGroupBox.setTitle(self.trUtf8('Report Location'))

View File

@ -1 +1 @@
1.9.0-706
1.9.0-709