From 873e16f3a6f54695d740b3a7e4cc42a8da47ea64 Mon Sep 17 00:00:00 2001 From: Jon Tibble Date: Tue, 22 Sep 2009 00:11:50 +0100 Subject: [PATCH 1/6] Double space cleanup --- openlp/core/lib/renderer.py | 2 +- openlp/core/lib/rendermanager.py | 3 ++- openlp/core/lib/serviceitem.py | 2 +- openlp/core/ui/amendthemeform.py | 16 ++++++++-------- openlp/core/ui/thememanager.py | 6 +++--- openlp/migration/migratesongs.py | 4 ++-- openlp/plugins/bibles/lib/bibleDBimpl.py | 2 +- openlp/plugins/bibles/lib/bibleHTTPimpl.py | 4 ++-- openlp/plugins/bibles/lib/bibleOSISimpl.py | 2 +- openlp/plugins/bibles/lib/manager.py | 18 +++++++++--------- openlp/plugins/bibles/lib/mediaitem.py | 10 +++++----- openlp/plugins/custom/forms/editcustomform.py | 2 +- .../presentations/lib/impresscontroller.py | 12 ++++++------ openlp/plugins/songs/forms/editsongform.py | 2 +- openlp/plugins/songs/lib/mediaitem.py | 2 +- 15 files changed, 44 insertions(+), 43 deletions(-) diff --git a/openlp/core/lib/renderer.py b/openlp/core/lib/renderer.py index 368589515..3d463ead1 100644 --- a/openlp/core/lib/renderer.py +++ b/openlp/core/lib/renderer.py @@ -192,7 +192,7 @@ class Renderer(object): #Find the next space to the left pos = line[:pos].rfind(u' ') #no more spaces found - if pos == 0: + if pos == 0: split_text = line while metrics.width(split_text, -1) > line_width: split_text = split_text[:-1] diff --git a/openlp/core/lib/rendermanager.py b/openlp/core/lib/rendermanager.py index 751397562..191e3483d 100644 --- a/openlp/core/lib/rendermanager.py +++ b/openlp/core/lib/rendermanager.py @@ -78,7 +78,8 @@ class RenderManager(object): log.debug(u'Update Display') if self.current_display != screen_number: self.current_display = screen_number - self.calculate_default(self.screen_list[self.current_display][u'size']) + self.calculate_default( + self.screen_list[self.current_display][u'size']) def set_global_theme(self, global_theme, global_style=u'Global'): """ diff --git a/openlp/core/lib/serviceitem.py b/openlp/core/lib/serviceitem.py index a6e163951..7996fe788 100644 --- a/openlp/core/lib/serviceitem.py +++ b/openlp/core/lib/serviceitem.py @@ -101,7 +101,7 @@ class ServiceItem(object): for line in format: lines += line + u'\n' title = lines.split(u'\n')[0] - self.frames.append({u'title': title ,u'text':lines, + self.frames.append({u'title': title, u'text': lines, u'image': frame}) elif self.service_item_type == ServiceType.Command: self.frames = self.service_frames diff --git a/openlp/core/ui/amendthemeform.py b/openlp/core/ui/amendthemeform.py index 913995722..368d334a6 100644 --- a/openlp/core/ui/amendthemeform.py +++ b/openlp/core/ui/amendthemeform.py @@ -43,9 +43,9 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog): self.setupUi(self) #define signals #Buttons - QtCore.QObject.connect(self.Color1PushButton , + QtCore.QObject.connect(self.Color1PushButton, QtCore.SIGNAL(u'pressed()'), self.onColor1PushButtonClicked) - QtCore.QObject.connect(self.Color2PushButton , + QtCore.QObject.connect(self.Color2PushButton, QtCore.SIGNAL(u'pressed()'), self.onColor2PushButtonClicked) QtCore.QObject.connect(self.FontMainColorPushButton, QtCore.SIGNAL(u'pressed()'), self.onFontMainColorPushButtonClicked) @@ -250,13 +250,13 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog): self.previewTheme(self.theme) def onFontMainWeightComboBoxSelected(self, value): - if value ==0: + if value == 0: self.theme.font_main_weight = u'Normal' self.theme.font_main_italics = False - elif value == 1: + elif value == 1: self.theme.font_main_weight = u'Bold' self.theme.font_main_italics = False - elif value == 2: + elif value == 2: self.theme.font_main_weight = u'Normal' self.theme.font_main_italics = True else: @@ -327,13 +327,13 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog): self.previewTheme(self.theme) def onFontFooterWeightComboBoxSelected(self, value): - if value == 0: + if value == 0: self.theme.font_footer_weight = u'Normal' self.theme.font_footer_italics = False - elif value == 1: + elif value == 1: self.theme.font_footer_weight = u'Bold' self.theme.font_footer_italics = False - elif value == 2: + elif value == 2: self.theme.font_footer_weight = u'Normal' self.theme.font_footer_italics = True else: diff --git a/openlp/core/ui/thememanager.py b/openlp/core/ui/thememanager.py index 6772c8655..346299186 100644 --- a/openlp/core/ui/thememanager.py +++ b/openlp/core/ui/thememanager.py @@ -105,7 +105,7 @@ class ThemeManager(QtGui.QWidget): if oldName != newName: self.ThemeListWidget.item(count).setText(newName) #Set the new name - if themeName == newName: + if themeName == newName: name = u'%s (%s)' % (newName, translate(u'ThemeManager', u'default')) self.ThemeListWidget.item(count).setText(name) @@ -120,7 +120,7 @@ class ThemeManager(QtGui.QWidget): self.ThemeListWidget.item(count).setText( unicode(item.data(QtCore.Qt.UserRole).toString())) #Set the new name - if count == index.row(): + if count == index.row(): self.global_theme = unicode( self.ThemeListWidget.item(count).text()) name = u'%s (%s)' % (self.global_theme, @@ -158,7 +158,7 @@ class ThemeManager(QtGui.QWidget): QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok)) else: self.themelist.remove(theme) - th = theme + u'.png' + th = theme + u'.png' row = self.ThemeListWidget.row(item) self.ThemeListWidget.takeItem(row) try: diff --git a/openlp/migration/migratesongs.py b/openlp/migration/migratesongs.py index 965cf3113..9f52c9fdc 100644 --- a/openlp/migration/migratesongs.py +++ b/openlp/migration/migratesongs.py @@ -155,13 +155,13 @@ class MigrateSongs(): song.search_title = u'' song.search_lyrics = u'' print songs_temp.songtitle - aa = self.session.execute( + aa = self.session.execute( u'select * from songauthors_temp where songid =' + \ unicode(songs_temp.songid) ) for row in aa: a = row['authorid'] authors_temp = self.session.query(TAuthor).get(a) - bb = self.session.execute( + bb = self.session.execute( u'select * from authors where display_name = \"%s\"' % \ unicode(authors_temp.authorname) ).fetchone() if bb is None: diff --git a/openlp/plugins/bibles/lib/bibleDBimpl.py b/openlp/plugins/bibles/lib/bibleDBimpl.py index 322109bd4..79d20859f 100644 --- a/openlp/plugins/bibles/lib/bibleDBimpl.py +++ b/openlp/plugins/bibles/lib/bibleDBimpl.py @@ -41,7 +41,7 @@ class BibleDBImpl(BibleCommon): log.debug(u'Load bible %s on path %s', biblename, self.biblefile) db_type = self.config.get_config(u'db type', u'sqlite') db_url = u'' - if db_type == u'sqlite': + if db_type == u'sqlite': db_url = u'sqlite:///' + self.biblefile else: db_url = u'%s://%s:%s@%s/%s' % \ diff --git a/openlp/plugins/bibles/lib/bibleHTTPimpl.py b/openlp/plugins/bibles/lib/bibleHTTPimpl.py index 4e32b5462..2176964ce 100644 --- a/openlp/plugins/bibles/lib/bibleHTTPimpl.py +++ b/openlp/plugins/bibles/lib/bibleHTTPimpl.py @@ -73,11 +73,11 @@ class BGExtract(BibleCommon): verseText = '' # clear out string versePos = xml_string.find(u' 0 and j < i: i = j verseText = xml_string[versePos + 7 : i ] diff --git a/openlp/plugins/bibles/lib/bibleOSISimpl.py b/openlp/plugins/bibles/lib/bibleOSISimpl.py index 0d795c27d..550c86e6b 100644 --- a/openlp/plugins/bibles/lib/bibleOSISimpl.py +++ b/openlp/plugins/bibles/lib/bibleOSISimpl.py @@ -141,7 +141,7 @@ class BibleOSISImpl(): # first time through if book_ptr == None: # set the max book size depending on the first book read - if p[0] == u'Gen': + if p[0] == u'Gen': dialogobject.setMax(65) else: dialogobject.setMax(27) diff --git a/openlp/plugins/bibles/lib/manager.py b/openlp/plugins/bibles/lib/manager.py index 75fb1d9a3..62d3ff2e3 100644 --- a/openlp/plugins/bibles/lib/manager.py +++ b/openlp/plugins/bibles/lib/manager.py @@ -61,7 +61,7 @@ class BibleManager(object): # dict of bible database objects self.bible_db_cache = None # dict of bible http readers - self.bible_http_cache = None + self.bible_http_cache = None self.biblePath = self.config.get_data_path() #get proxy name for screen self.proxyname = self.config.get_config(u'proxy name') @@ -83,12 +83,12 @@ class BibleManager(object): files = self.config.get_files(self.bibleSuffix) log.debug(u'Bible Files %s', files ) self.bible_db_cache = {} - self.bible_http_cache = {} + self.bible_http_cache = {} # books of the bible with testaments self.book_testaments = {} # books of the bible with abbreviation self.book_abbreviations = {} - self.web_bibles_present = False + self.web_bibles_present = False for f in files: nme = f.split(u'.') bname = nme[0] @@ -97,7 +97,7 @@ class BibleManager(object): # look to see if lazy load bible exists and get create getter. biblesource = self.bible_db_cache[bname].get_meta(u'WEB') if biblesource: - self.web_bibles_present = True + self.web_bibles_present = True nhttp = BibleHTTPImpl() # tell The Server where to get the verses from. nhttp.set_bible_source(biblesource.value) @@ -226,7 +226,7 @@ class BibleManager(object): viewer. If the database exists it is deleted and the database is reloaded from scratch. """ - log.debug(u'register_OSIS_file_bible %s , %s', biblename, osisfile) + log.debug(u'register_OSIS_file_bible %s, %s', biblename, osisfile) if self._is_new_bible(biblename): # Create new Bible nbible = BibleDBImpl(self.biblePath, biblename, self.config) @@ -240,7 +240,7 @@ class BibleManager(object): return True else: log.debug( - u'register_OSIS_file_bible %s , %s not created already exists', + u'register_OSIS_file_bible %s, %s not created already exists', biblename, osisfile) return False @@ -324,7 +324,7 @@ c Rest can be guessed at ! """ - text = [] + text = [] self.media.setQuickMsg1(u'') self.media.setQuickMsg2(u'') log.debug(u'get_verse_text %s,%s,%s,%s,%s,%s', @@ -355,7 +355,7 @@ c book = self.bible_db_cache[bible].create_book( bookname, self.book_abbreviations[bookname], self.book_testaments[bookname]) - log.debug(u'New http book %s , %s, %s', + log.debug(u'New http book %s, %s, %s', book, book.id, book.name) self.bible_db_cache[bible].create_chapter( book.id, search_results.get_chapter(), @@ -414,7 +414,7 @@ c """ Check cache to see if new bible """ - for b , o in self.bible_db_cache.iteritems(): + for b, o in self.bible_db_cache.iteritems(): log.debug(u'Bible from cache in is_new_bible %s', b ) if b == name : return False diff --git a/openlp/plugins/bibles/lib/mediaitem.py b/openlp/plugins/bibles/lib/mediaitem.py index 59b4e2af7..4d1bfd9a9 100644 --- a/openlp/plugins/bibles/lib/mediaitem.py +++ b/openlp/plugins/bibles/lib/mediaitem.py @@ -407,7 +407,7 @@ class BibleMediaItem(MediaManagerItem): raw_footer.index(footer) except: raw_footer.append(footer) - if len(self.parent.bibles_tab.bible_theme) == 0: + if len(self.parent.bibles_tab.bible_theme) == 0: service_item.theme = None else: service_item.theme = self.parent.bibles_tab.bible_theme @@ -446,7 +446,7 @@ class BibleMediaItem(MediaManagerItem): self.initialiseChapterVerse(bible, book.name) def initialiseChapterVerse(self, bible, book): - log.debug(u'initialiseChapterVerse %s , %s', bible, book) + log.debug(u'initialiseChapterVerse %s, %s', bible, book) self.chapters_from = self.parent.biblemanager.get_book_chapter_count( bible, book) self.verses = self.parent.biblemanager.get_book_verse_count(bible, @@ -456,8 +456,8 @@ class BibleMediaItem(MediaManagerItem): self.adjustComboBox(1, self.verses, self.AdvancedFromVerse) self.adjustComboBox(1, self.verses, self.AdvancedToVerse) - def adjustComboBox(self, frm, to , combo): - log.debug(u'adjustComboBox %s , %s , %s', combo, frm, to) + def adjustComboBox(self, frm, to, combo): + log.debug(u'adjustComboBox %s, %s, %s', combo, frm, to) combo.clear() for i in range(int(frm), int(to) + 1): combo.addItem(unicode(i)) @@ -475,7 +475,7 @@ class BibleMediaItem(MediaManagerItem): cr.setSelected(True) def searchByReference(self, bible, search): - log.debug(u'searchByReference %s ,%s', bible, search) + log.debug(u'searchByReference %s, %s', bible, search) book = u'' start_chapter = u'' end_chapter = u'' diff --git a/openlp/plugins/custom/forms/editcustomform.py b/openlp/plugins/custom/forms/editcustomform.py index 562f3b796..1ebeda7c8 100644 --- a/openlp/plugins/custom/forms/editcustomform.py +++ b/openlp/plugins/custom/forms/editcustomform.py @@ -115,7 +115,7 @@ class EditCustomForm(QtGui.QDialog, Ui_customEditDialog): self.ThemeComboBox.setCurrentIndex(0) def accept(self): - valid , message = self._validate() + valid, message = self._validate() if not valid: QtGui.QMessageBox.critical(self, translate(u'customEditDialog', u'Error'), message, diff --git a/openlp/plugins/presentations/lib/impresscontroller.py b/openlp/plugins/presentations/lib/impresscontroller.py index a15d97049..be6b0b213 100644 --- a/openlp/plugins/presentations/lib/impresscontroller.py +++ b/openlp/plugins/presentations/lib/impresscontroller.py @@ -27,7 +27,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA # http://nxsy.org/comparing-documents-with-openoffice-and-python import logging -import os , subprocess +import os, subprocess import time import sys @@ -41,9 +41,9 @@ from PyQt4 import QtCore class ImpressController(object): """ - Class to control interactions with Impress Presentations - It creates the runtime Environment , Loads the and Closes the Presentation - As well as trigggering the correct activities based on the users input + Class to control interactions with Impress presentations. + It creates the runtime environment, loads and closes the presentation as + well as triggering the correct activities based on the users input """ global log log = logging.getLogger(u'ImpressController') @@ -57,8 +57,8 @@ class ImpressController(object): def startOpenoffice(self): """ - Loads a running version of OpenOffice inthe background. - It is not displayed to the user but is available to the Uno interface + Loads a running version of OpenOffice in the background. + It is not displayed to the user but is available to the UNO interface when required. """ log.debug(u'start Openoffice') diff --git a/openlp/plugins/songs/forms/editsongform.py b/openlp/plugins/songs/forms/editsongform.py index fc7a130a8..df4b0ad1d 100644 --- a/openlp/plugins/songs/forms/editsongform.py +++ b/openlp/plugins/songs/forms/editsongform.py @@ -459,7 +459,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog): text = text.replace(u'{', u'') text = text.replace(u'}', u'') text = text.replace(u'?', u'') - self.song.search_lyrics = unicode(text) + self.song.search_lyrics = unicode(text) self.song.lyrics = unicode(sxml.extract_xml()) def processTitle(self): diff --git a/openlp/plugins/songs/lib/mediaitem.py b/openlp/plugins/songs/lib/mediaitem.py index c18d8d91c..dd41deca5 100644 --- a/openlp/plugins/songs/lib/mediaitem.py +++ b/openlp/plugins/songs/lib/mediaitem.py @@ -178,7 +178,7 @@ class SongMediaItem(MediaManagerItem): def onSearchTextButtonClick(self): search_keywords = unicode(self.SearchTextEdit.displayText()) - search_results = [] + search_results = [] search_type = self.SearchTypeComboBox.currentIndex() if search_type == 0: log.debug(u'Titles Search') From 69de990aa574ff68ab82b3179a5683af9fd43187 Mon Sep 17 00:00:00 2001 From: Jon Tibble Date: Tue, 22 Sep 2009 18:43:07 +0100 Subject: [PATCH 2/6] More spacing --- openlp/plugins/custom/forms/editcustomform.py | 4 ++-- openlp/plugins/custom/lib/mediaitem.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openlp/plugins/custom/forms/editcustomform.py b/openlp/plugins/custom/forms/editcustomform.py index 1ebeda7c8..6ead917e2 100644 --- a/openlp/plugins/custom/forms/editcustomform.py +++ b/openlp/plugins/custom/forms/editcustomform.py @@ -102,7 +102,7 @@ class EditCustomForm(QtGui.QDialog, Ui_customEditDialog): self.TitleEdit.setText(self.customSlide.title) self.CreditEdit.setText(self.customSlide.credits) - songXML=SongXMLParser(self.customSlide.text) + songXML = SongXMLParser(self.customSlide.text) verseList = songXML.get_verses() for verse in verseList: self.VerseListView.addItem(verse[1]) @@ -121,7 +121,7 @@ class EditCustomForm(QtGui.QDialog, Ui_customEditDialog): translate(u'customEditDialog', u'Error'), message, QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok)) return - sxml=SongXMLBuilder() + sxml = SongXMLBuilder() sxml.new_document() sxml.add_lyrics_to_song() count = 1 diff --git a/openlp/plugins/custom/lib/mediaitem.py b/openlp/plugins/custom/lib/mediaitem.py index 8551c3ae0..d2614435d 100644 --- a/openlp/plugins/custom/lib/mediaitem.py +++ b/openlp/plugins/custom/lib/mediaitem.py @@ -105,7 +105,7 @@ class CustomMediaItem(MediaManagerItem): theme = customSlide.theme_name if len(theme) is not 0 : service_item.theme = theme - songXML=SongXMLParser(customSlide.text) + songXML = SongXMLParser(customSlide.text) verseList = songXML.get_verses() for verse in verseList: raw_slides.append(verse[1]) From 85b647e3c36ea616c8b17b8aefbba2aa5004829a Mon Sep 17 00:00:00 2001 From: Jonathan Corwin Date: Wed, 23 Sep 2009 21:40:19 +0100 Subject: [PATCH 3/6] Fix to pick up 2007 viewer correctly. Assembly now built as "release" with Visual C++ Express 2008 and with any luck will now work on other Window PC's --- .../lib/pptviewlib/pptviewlib.cpp | 8 +- .../lib/pptviewlib/pptviewlib.dll | Bin 81408 -> 46080 bytes .../presentations/lib/pptviewlib/pptviewlib.h | 2 +- .../lib/pptviewlib/pptviewlib.vcproj | 405 +++++++++--------- 4 files changed, 208 insertions(+), 207 deletions(-) diff --git a/openlp/plugins/presentations/lib/pptviewlib/pptviewlib.cpp b/openlp/plugins/presentations/lib/pptviewlib/pptviewlib.cpp index 336241fd0..8e4cc7e82 100644 --- a/openlp/plugins/presentations/lib/pptviewlib/pptviewlib.cpp +++ b/openlp/plugins/presentations/lib/pptviewlib/pptviewlib.cpp @@ -27,6 +27,7 @@ #include #include "pptviewlib.h" + // Because of the callbacks used by SetWindowsHookEx, the memory used needs to be // sharable across processes (the callbacks are done from a different process) // Therefore use data_seg with RWS memory. @@ -310,9 +311,10 @@ BOOL GetPPTViewerPath(char *pptviewerpath, int strsize) LRESULT lresult; DEBUG("GetPPTViewerPath: start\n"); - if(RegOpenKeyEx(HKEY_CLASSES_ROOT, "Applications\\PPTVIEW.EXE\\shell\\open\\command", 0, KEY_READ, &hkey)!=ERROR_SUCCESS) - if(RegOpenKeyEx(HKEY_CLASSES_ROOT, "Applications\\PPTVIEW.EXE\\shell\\Show\\command", 0, KEY_READ, &hkey)!=ERROR_SUCCESS) - return FALSE; + if(RegOpenKeyEx(HKEY_CLASSES_ROOT, "PowerPointViewer.Show.12\\shell\\Show\\command", 0, KEY_READ, &hkey)!=ERROR_SUCCESS) + if(RegOpenKeyEx(HKEY_CLASSES_ROOT, "Applications\\PPTVIEW.EXE\\shell\\open\\command", 0, KEY_READ, &hkey)!=ERROR_SUCCESS) + if(RegOpenKeyEx(HKEY_CLASSES_ROOT, "Applications\\PPTVIEW.EXE\\shell\\Show\\command", 0, KEY_READ, &hkey)!=ERROR_SUCCESS) + return FALSE; dwtype = REG_SZ; dwsize = (DWORD)strsize; lresult = RegQueryValueEx(hkey, NULL, NULL, &dwtype, (LPBYTE)pptviewerpath, &dwsize ); diff --git a/openlp/plugins/presentations/lib/pptviewlib/pptviewlib.dll b/openlp/plugins/presentations/lib/pptviewlib/pptviewlib.dll index 13ea7d1828e7bc2f361ea48b5d98a95396eb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viewlib/pptviewlib.h b/openlp/plugins/presentations/lib/pptviewlib/pptviewlib.h index 5b33576af..3e365215b 100644 --- a/openlp/plugins/presentations/lib/pptviewlib/pptviewlib.h +++ b/openlp/plugins/presentations/lib/pptviewlib/pptviewlib.h @@ -51,4 +51,4 @@ struct PPTVIEWOBJ char filename[MAX_PATH]; char previewpath[MAX_PATH]; PPTVIEWSTATE state; -}; \ No newline at end of file +}; diff --git a/openlp/plugins/presentations/lib/pptviewlib/pptviewlib.vcproj b/openlp/plugins/presentations/lib/pptviewlib/pptviewlib.vcproj index 040898672..f20db6c8f 100644 --- a/openlp/plugins/presentations/lib/pptviewlib/pptviewlib.vcproj +++ b/openlp/plugins/presentations/lib/pptviewlib/pptviewlib.vcproj @@ -1,203 +1,202 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 4ca4fa8f23ec394ad1fdf42cfba9b8a857ad60ed Mon Sep 17 00:00:00 2001 From: Jonathan Corwin Date: Wed, 23 Sep 2009 23:39:37 +0100 Subject: [PATCH 4/6] Update PptviewController as per ImpressController --- openlp/plugins/presentations/lib/__init__.py | 1 + .../presentations/lib/pptviewcontroller.py | 227 +++++++++--------- .../presentations/presentationplugin.py | 7 +- 3 files changed, 122 insertions(+), 113 deletions(-) diff --git a/openlp/plugins/presentations/lib/__init__.py b/openlp/plugins/presentations/lib/__init__.py index 2ee88aaba..de2b19ce1 100644 --- a/openlp/plugins/presentations/lib/__init__.py +++ b/openlp/plugins/presentations/lib/__init__.py @@ -24,6 +24,7 @@ from impresscontroller import ImpressController #from powerpointcontroller import PowerpointController +from pptviewcontroller import PptviewController from messagelistener import MessageListener from mediaitem import PresentationMediaItem from presentationtab import PresentationTab diff --git a/openlp/plugins/presentations/lib/pptviewcontroller.py b/openlp/plugins/presentations/lib/pptviewcontroller.py index 324119fc0..d466e28f3 100644 --- a/openlp/plugins/presentations/lib/pptviewcontroller.py +++ b/openlp/plugins/presentations/lib/pptviewcontroller.py @@ -22,128 +22,137 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### +import logging +import os , subprocess +import time import sys -import win32api -from PyQt4 import QtGui, QtCore -from ctypes import * -from ctypes.wintypes import RECT -pptdll = cdll.LoadLibrary(r'C:\Documents and Settings\jonathan\My Documents\Personal\openlp\openlp-2\trunk\openlp\libraries\pptviewlib\pptviewlib.dll') +if os.name == u'nt': + import win32api + from ctypes import * + from ctypes.wintypes import RECT -class BoxLayout(QtGui.QWidget): - def __init__(self, parent=None): - QtGui.QWidget.__init__(self, parent) +from PyQt4 import QtCore + +class PptviewController(object): + """ + Class to control interactions with PowerPOint Viewer Presentations + It creates the runtime Environment , Loads the and Closes the Presentation + As well as trigggering the correct activities based on the users input + """ + global log + log = logging.getLogger(u'PptviewController') + + def __init__(self): + log.debug(u'Initialising') + self.process = None + self.document = None + self.presentation = None + self.pptid = None + self.startPPTView() + + def startPPTView(self): + """ + Loads the PPTVIEWLIB library + """ + log.debug(u'start PPTView') + self.presentation = cdll.LoadLibrary(r'openlp\plugins\presentations\lib\pptviewlib\pptviewlib.dll') + + def kill(self): + """ + Called at system exit to clean up any running presentations + """ + log.debug(u'Kill') + self.closePresentation() + + def loadPresentation(self, presentation): + """ + Called when a presentation is added to the SlideController. + It builds the environment, starts communcations with the background + OpenOffice task started earlier. If OpenOffice is not present is is + started. Once the environment is available the presentation is loaded + and started. + + ``presentation`` + The file name of the presentatios to the run. + """ + log.debug(u'LoadPresentation') + if(self.pptid>=0): + self.CloseClick() + rect = RECT() + rect.left = 0 + rect.top = 0 + rect.width = 0 + rect.hight = 0 + try: + tempfolder = None #r'c:\temp\pptviewlib\' + presentation + self.pptid = self.presentation.OpenPPT(presentation, None, rect, tempfolder) + except: + log.exception(u'Failed to load presentation') + #self.slidecount = pptdll.GetSlideCount(self.pptid) + + def closePresentation(self): + """ + Close presentation and clean up objects + Triggerent by new object being added to SlideController orOpenLP + being shut down + """ + if(self.pptid<0): return + self.presentation.Close(self.pptid) self.pptid = -1 - self.setWindowTitle(u'box layout') - PPTLabel = QtGui.QLabel(u'Open PowerPoint file') - slideLabel = QtGui.QLabel(u'Go to slide #') - self.PPTEdit = QtGui.QLineEdit() - self.slideEdit = QtGui.QLineEdit() - self.total = QtGui.QLabel() - PPTBtn = QtGui.QPushButton(u'Open') - PPTDlgBtn = QtGui.QPushButton(u'...') - slideBtn = QtGui.QPushButton(u'Go') - prev = QtGui.QPushButton(u'Prev') - next = QtGui.QPushButton(u'Next') - blank = QtGui.QPushButton(u'Blank') - unblank = QtGui.QPushButton(u'Unblank') - restart = QtGui.QPushButton(u'Restart') - close = QtGui.QPushButton(u'Close') - resume = QtGui.QPushButton(u'Resume') - stop = QtGui.QPushButton(u'Stop') - pptwindow = QtGui.QWidget() + def isActive(self): + return self.pptid >= 0 - grid = QtGui.QGridLayout() - grid.addWidget(PPTLabel, 0, 0) - grid.addWidget(self.PPTEdit, 0, 1) - grid.addWidget(PPTDlgBtn, 0, 2) - grid.addWidget(PPTBtn, 0, 3) - grid.addWidget(slideLabel, 1, 0) - grid.addWidget(self.slideEdit, 1, 1) - grid.addWidget(slideBtn, 1, 3) - grid.addWidget(prev, 2, 0) - grid.addWidget(next, 2, 1) - grid.addWidget(blank, 3, 0) - grid.addWidget(unblank, 3, 1) - grid.addWidget(restart, 4, 0) - grid.addWidget(stop, 4, 1) - grid.addWidget(resume, 4, 2) - grid.addWidget(pptwindow, 5, 0, 10, 3) - self.connect(PPTBtn, QtCore.SIGNAL(u'clicked()'), self.OpenClick) - self.connect(PPTDlgBtn, QtCore.SIGNAL(u'clicked()'), self.OpenDialog) - self.connect(slideBtn, QtCore.SIGNAL(u'clicked()'), self.GotoClick) - self.connect(prev, QtCore.SIGNAL(u'clicked()'), self.PrevClick) - self.connect(next, QtCore.SIGNAL(u'clicked()'), self.NextClick) - self.connect(blank, QtCore.SIGNAL(u'clicked()'), self.BlankClick) - self.connect(unblank, QtCore.SIGNAL(u'clicked()'), self.UnblankClick) - self.connect(restart, QtCore.SIGNAL(u'clicked()'), self.RestartClick) - self.connect(close, QtCore.SIGNAL(u'clicked()'), self.CloseClick) - self.connect(stop, QtCore.SIGNAL(u'clicked()'), self.StopClick) - self.connect(resume, QtCore.SIGNAL(u'clicked()'), self.ResumeClick) + def resume(self): + if(self.pptid<0): return + self.presentation.Resume(self.pptid) - self.setLayout(grid) + def pause(self): + return - self.resize(300, 150) + def blankScreen(self): + if(self.pptid<0): return + self.presentation.Blank(self.pptid) - def PrevClick(self): + def unblankScreen(self): + if(self.pptid<0): return + self.presentation.Unblank(self.pptid) + + def stop(self): + if(self.pptid<0): return + self.presentation.Stop(self.pptid) + + def go(self): + if(self.pptid<0): return + self.presentation.RestartShow(self.pptid) + + def getSlideNumber(self): + if(self.pptid<0): return -1 + return self.presentation.GetCurrentSlide(self.pptid) + + def setSlideNumber(self, slideno): + if(self.pptid<0): return + self.presentation.GotoSlide(self.pptid, slideno) + + slideNumber = property(getSlideNumber, setSlideNumber) + + def nextStep(self): + """ + Triggers the next effect of slide on the running presentation + """ + if(self.pptid<0): return + self.presentation.NextStep(self.pptid) + + def previousStep(self): + """ + Triggers the previous slide on the running presentation + """ if self.pptid<0: return - pptdll.PrevStep(self.pptid) - self.slideEdit.setText(pptdll.GetCurrentSlide(self.pptid)) + self.presentation.PrevStep(self.pptid) def NextClick(self): if(self.pptid<0): return pptdll.NextStep(self.pptid) self.slideEdit.setText(pptdll.GetCurrentSlide(self.pptid)) - def BlankClick(self): - if(self.pptid<0): return - pptdll.Blank(self.pptid) - - def UnblankClick(self): - if(self.pptid<0): return - pptdll.Unblank(self.pptid) - - def RestartClick(self): - if(self.pptid<0): return - pptdll.RestartShow(self.pptid) - self.slideEdit.setText(pptdll.GetCurrentSlide(self.pptid)) - - def StopClick(self): - if(self.pptid<0): return - pptdll.Stop(self.pptid) - - def ResumeClick(self): - if(self.pptid<0): return - pptdll.Resume(self.pptid) - - def CloseClick(self): - if(self.pptid<0): return - pptdll.Close(self.pptid) - self.pptid = -1 - - def OpenClick(self): - if(self.pptid>=0): - self.CloseClick() - rect = RECT() - rect.left = 100 - rect.top = 100 - rect.width = 900 - rect.hight = 700 - #self.pptid = pptdll.OpenPPT(self.PPTEdit.text, None, rect, "c:\temp\slide') - self.pptid = pptdll.OpenPPT(u'C:\\test 1.ppt', None, rect, 'c:\temp\slide') - self.total.setText(pptdll.GetSlideCount(self.pptid)) - self.slideEdit.setText(unicode(pptdll.GetCurrentSlide(self.pptid))) - - def GotoClick(self): - if(self.pptid<0): return - pptdll.GotoSlide(self.pptid, self.slideEdit.text) - self.slideEdit.setText(pptdll.GetCurrentSlide(self.pptid)) - - def OpenDialog(self): - self.PPTEdit.setText(QtGui.QFileDialog.getOpenFileName(self, 'Open file')) - -app = QtGui.QApplication(sys.argv) -qb = BoxLayout() -qb.show() -sys.exit(app.exec_()) diff --git a/openlp/plugins/presentations/presentationplugin.py b/openlp/plugins/presentations/presentationplugin.py index d76e9a493..86aa87632 100644 --- a/openlp/plugins/presentations/presentationplugin.py +++ b/openlp/plugins/presentations/presentationplugin.py @@ -35,6 +35,7 @@ try: from openlp.plugins.presentations.lib import PowerpointController except: pass +from openlp.plugins.presentations.lib import PptviewController class PresentationPlugin(Plugin): @@ -105,10 +106,8 @@ class PresentationPlugin(Plugin): if int(self.config.get_config( u'Powerpoint Viewer', QtCore.Qt.Unchecked)) == QtCore.Qt.Checked: try: - #Check to see if we are Win32 - from win32com.client import Dispatch - powerpoint = PowerpointController() - self.registerControllers(u'Powerpoint Viewer', powerpoint) + pptview = PptviewController() + self.registerControllers(u'Powerpoint Viewer', pptview) except: log.exception(u'Failed to set up plugin for Powerpoint Viewer') #If we have no available controllers disable plugin From 26bd337f7de71cf291fe992524932f38a8874a60 Mon Sep 17 00:00:00 2001 From: Jon Tibble Date: Thu, 24 Sep 2009 02:37:21 +0100 Subject: [PATCH 5/6] Remove duplicate and redundant Theme code --- openlp/core/ui/amendthemeform.py | 63 +------------------------------- openlp/core/ui/thememanager.py | 6 +-- 2 files changed, 4 insertions(+), 65 deletions(-) diff --git a/openlp/core/ui/amendthemeform.py b/openlp/core/ui/amendthemeform.py index 368d334a6..9e9e36cbb 100644 --- a/openlp/core/ui/amendthemeform.py +++ b/openlp/core/ui/amendthemeform.py @@ -180,62 +180,18 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog): def loadTheme(self, theme): log.debug(u'LoadTheme %s', theme) if theme == None: - self.theme.parse(self.baseTheme()) + self.theme.parse(self.thememanager.baseTheme()) else: xml_file = os.path.join(self.path, theme, theme + u'.xml') xml = file_to_xml(xml_file) self.theme.parse(xml) self.theme.extend_image_filename(self.path) - self.cleanTheme(self.theme) + self.thememanager.cleanTheme(self.theme) self.allowPreview = False self.paintUi(self.theme) self.allowPreview = True self.previewTheme(self.theme) - def cleanTheme(self, theme): - self.theme.background_color = theme.background_color.strip() - self.theme.background_direction = theme.background_direction.strip() - self.theme.background_endColor = theme.background_endColor.strip() - if theme.background_filename: - self.theme.background_filename = theme.background_filename.strip() - #self.theme.background_mode - self.theme.background_startColor = theme.background_startColor.strip() - #self.theme.background_type - if theme.display_display: - self.theme.display_display = theme.display_display.strip() - self.theme.display_horizontalAlign = \ - theme.display_horizontalAlign.strip() - self.theme.display_outline = str_to_bool(theme.display_outline) - #self.theme.display_outline_color - self.theme.display_shadow = str_to_bool(theme.display_shadow) - #self.theme.display_shadow_color - self.theme.display_verticalAlign = \ - theme.display_verticalAlign.strip() - self.theme.display_wrapStyle = theme.display_wrapStyle.strip() - self.theme.font_footer_color = theme.font_footer_color.strip() - self.theme.font_footer_height = theme.font_footer_height.strip() - self.theme.font_footer_italics = str_to_bool(theme.font_footer_italics) - self.theme.font_footer_name = theme.font_footer_name.strip() - #self.theme.font_footer_override - self.theme.font_footer_proportion = \ - theme.font_footer_proportion.strip() - self.theme.font_footer_weight = theme.font_footer_weight.strip() - self.theme.font_footer_width = theme.font_footer_width.strip() - self.theme.font_footer_x = theme.font_footer_x.strip() - self.theme.font_footer_y = theme.font_footer_y.strip() - self.theme.font_main_color = theme.font_main_color.strip() - self.theme.font_main_height = theme.font_main_height.strip() - self.theme.font_main_italics = str_to_bool(theme.font_main_italics) - self.theme.font_main_name = theme.font_main_name.strip() - #self.theme.font_main_override - self.theme.font_main_proportion = theme.font_main_proportion.strip() - self.theme.font_main_weight = theme.font_main_weight.strip() - self.theme.font_main_x = theme.font_main_x.strip() - self.theme.font_main_y = theme.font_main_y.strip() - #self.theme.theme_mode - self.theme.theme_name = theme.theme_name.strip() - #self.theme.theme_version - def onImageToolButtonClicked(self): filename = QtGui.QFileDialog.getOpenFileName(self, 'Open file') if filename != "": @@ -508,21 +464,6 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog): # #Local Methods # - def baseTheme(self): - log.debug(u'base theme created') - newtheme = ThemeXML() - newtheme.new_document(u'New Theme') - newtheme.add_background_solid(unicode(u'#000000')) - newtheme.add_font(unicode(QtGui.QFont().family()), unicode(u'#FFFFFF'), - unicode(30), u'False') - newtheme.add_font(unicode(QtGui.QFont().family()), unicode(u'#FFFFFF'), - unicode(12), u'False', u'footer') - newtheme.add_display(u'False', unicode(u'#FFFFFF'), u'False', - unicode(u'#FFFFFF'), - unicode(0), unicode(0), unicode(0)) - - return newtheme.extract_xml() - def paintUi(self, theme): self.stateChanging(theme) self.ThemeNameEdit.setText(self.theme.theme_name) diff --git a/openlp/core/ui/thememanager.py b/openlp/core/ui/thememanager.py index 346299186..d26702ca7 100644 --- a/openlp/core/ui/thememanager.py +++ b/openlp/core/ui/thememanager.py @@ -132,7 +132,6 @@ class ThemeManager(QtGui.QWidget): self.pushThemes() def onAddTheme(self): - self.amendThemeForm.theme.parse(self.baseTheme()) self.amendThemeForm.loadTheme(None) self.amendThemeForm.exec_() @@ -215,9 +214,8 @@ class ThemeManager(QtGui.QWidget): def loadThemes(self): """ - Loads the theme lists and triggers updates accross - the whole system using direct calls or core functions - and events for the plugins. + Loads the theme lists and triggers updates accross the whole system + using direct calls or core functions and events for the plugins. The plugins will call back in to get the real list if they want it. """ log.debug(u'Load themes from dir') From 6421f1d49337801bbf3c44107dd52efedf4e3875 Mon Sep 17 00:00:00 2001 From: Jonathan Corwin Date: Thu, 24 Sep 2009 08:35:30 +0100 Subject: [PATCH 6/6] Minor adjustments --- .../presentations/lib/pptviewcontroller.py | 10 ++-- .../presentations/presentationplugin.py | 48 ++++++++++--------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/openlp/plugins/presentations/lib/pptviewcontroller.py b/openlp/plugins/presentations/lib/pptviewcontroller.py index d466e28f3..a772c62cd 100644 --- a/openlp/plugins/presentations/lib/pptviewcontroller.py +++ b/openlp/plugins/presentations/lib/pptviewcontroller.py @@ -23,14 +23,12 @@ ############################################################################### import logging -import os , subprocess +import os, subprocess import time import sys - -if os.name == u'nt': - import win32api - from ctypes import * - from ctypes.wintypes import RECT +import win32api +from ctypes import * +from ctypes.wintypes import RECT from PyQt4 import QtCore diff --git a/openlp/plugins/presentations/presentationplugin.py b/openlp/plugins/presentations/presentationplugin.py index 86aa87632..ec1578b82 100644 --- a/openlp/plugins/presentations/presentationplugin.py +++ b/openlp/plugins/presentations/presentationplugin.py @@ -31,11 +31,12 @@ from PyQt4 import QtCore, QtGui from openlp.core.lib import Plugin, MediaManagerItem from openlp.plugins.presentations.lib import PresentationMediaItem, \ PresentationTab, ImpressController -try: - from openlp.plugins.presentations.lib import PowerpointController -except: - pass -from openlp.plugins.presentations.lib import PptviewController +if os.name == u'nt': + try: + from openlp.plugins.presentations.lib import PowerpointController + except: + pass + from openlp.plugins.presentations.lib import PptviewController class PresentationPlugin(Plugin): @@ -92,24 +93,25 @@ class PresentationPlugin(Plugin): self.registerControllers(u'Impress', openoffice) except: log.exception(u'Failed to set up plugin for Impress') - #Lets see if Powerpoint is required (Default is Not wanted) - if int(self.config.get_config( - u'Powerpoint', QtCore.Qt.Unchecked)) == QtCore.Qt.Checked: - try: - #Check to see if we are Win32 - from win32com.client import Dispatch - powerpoint = PowerpointController() - self.registerControllers(u'Powerpoint', powerpoint) - except: - log.exception(u'Failed to set up plugin for Powerpoint') - #Lets see if Powerpoint Viewer is required (Default is Not wanted) - if int(self.config.get_config( - u'Powerpoint Viewer', QtCore.Qt.Unchecked)) == QtCore.Qt.Checked: - try: - pptview = PptviewController() - self.registerControllers(u'Powerpoint Viewer', pptview) - except: - log.exception(u'Failed to set up plugin for Powerpoint Viewer') + if os.name == u'nt': + #Lets see if Powerpoint is required (Default is Not wanted) + if int(self.config.get_config( + u'Powerpoint', QtCore.Qt.Unchecked)) == QtCore.Qt.Checked: + try: + #Check to see if we are Win32 + from win32com.client import Dispatch + powerpoint = PowerpointController() + self.registerControllers(u'Powerpoint', powerpoint) + except: + log.exception(u'Failed to set up plugin for Powerpoint') + #Lets see if Powerpoint Viewer is required (Default is Not wanted) + if int(self.config.get_config( + u'Powerpoint Viewer', QtCore.Qt.Unchecked)) == QtCore.Qt.Checked: + try: + pptview = PptviewController() + self.registerControllers(u'Powerpoint Viewer', pptview) + except: + log.exception(u'Failed to set up plugin for Powerpoint Viewer') #If we have no available controllers disable plugin if len(self.controllers) > 0: return True