Merge lp:~phill-ridout/openlp/1204629 into lp:openlp

Proposed by Phill
Status: Merged
Approved by: Andreas Preikschat
Approved revision: 2284
Merged at revision: 2284
Proposed branch: lp:~phill-ridout/openlp/1204629
Merge into: lp:openlp
Diff against target: 33 lines (+8/-1)
1 file modified
openlp/core/ui/themeform.py (+8/-1)
To merge this branch: bzr merge lp:~phill-ridout/openlp/1204629
Reviewer Review Type Date Requested Status
Andreas Preikschat (community) Approve
Tim Bentley Pending
Review via email: mp+177213@code.launchpad.net

This proposal supersedes a proposal from 2013-07-25.

Description of the change

Fixed #1204629 so that typing an image path actually changes the background.
Made the page validation more robust by including the fileDialog

To post a comment you must log in.
Revision history for this message
Tim Bentley (trb143) wrote : Posted in a previous version of this proposal

did you miss a line

review: Needs Information
Revision history for this message
Phill (phill-ridout) wrote : Posted in a previous version of this proposal

Tim, you're right!

Revision history for this message
Tim Bentley (trb143) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
Andreas Preikschat (googol-deactivatedaccount) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openlp/core/ui/themeform.py'
2--- openlp/core/ui/themeform.py 2013-07-11 20:58:15 +0000
3+++ openlp/core/ui/themeform.py 2013-07-26 20:20:36 +0000
4@@ -71,6 +71,7 @@
5 self.gradientStartButton.clicked.connect(self.onGradientStartButtonClicked)
6 self.gradientEndButton.clicked.connect(self.onGradientEndButtonClicked)
7 self.imageBrowseButton.clicked.connect(self.onImageBrowseButtonClicked)
8+ self.imageFileEdit.editingFinished.connect(self.onImageFileEditEditingFinished)
9 self.mainColorButton.clicked.connect(self.onMainColorButtonClicked)
10 self.outlineColorButton.clicked.connect(self.onOutlineColorButtonClicked)
11 self.shadowColorButton.clicked.connect(self.onShadowColorButtonClicked)
12@@ -178,7 +179,7 @@
13 """
14 background_image = BackgroundType.to_string(BackgroundType.Image)
15 if self.page(self.currentId()) == self.backgroundPage and \
16- self.theme.background_type == background_image and is_not_image_file(self.imageFileEdit.text()):
17+ self.theme.background_type == background_image and is_not_image_file(self.theme.background_filename):
18 QtGui.QMessageBox.critical(self, translate('OpenLP.ThemeWizard', 'Background Image Empty'),
19 translate('OpenLP.ThemeWizard', 'You have not selected a '
20 'background image. Please select one before continuing.'))
21@@ -441,6 +442,12 @@
22 self.theme.background_filename = unicode(filename)
23 self.setBackgroundPageValues()
24
25+ def onImageFileEditEditingFinished(self):
26+ """
27+ Background image path edited
28+ """
29+ self.theme.background_filename = unicode(self.imageFileEdit.text())
30+
31 def onMainColorButtonClicked(self):
32 """
33 Set the main colour value