Merge lp:~raoul-snyman/openlp/songmaintenance into lp:openlp

Proposed by Raoul Snyman
Status: Merged
Merged at revision: not available
Proposed branch: lp:~raoul-snyman/openlp/songmaintenance
Merge into: lp:openlp
Diff against target: None lines
To merge this branch: bzr merge lp:~raoul-snyman/openlp/songmaintenance
Reviewer Review Type Date Requested Status
Tim Bentley Approve
Review via email: mp+9555@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Tim Bentley (trb143) wrote :

Go got it.

review: Approve
498. By Raoul Snyman

Merged in some changes for the song maintenance form.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openlp/plugins/songs/forms/authorsform.py'
2--- openlp/plugins/songs/forms/authorsform.py 2009-07-26 10:02:18 +0000
3+++ openlp/plugins/songs/forms/authorsform.py 2009-07-26 13:51:32 +0000
4@@ -18,7 +18,7 @@
5 """
6 from PyQt4 import QtGui, QtCore
7 from openlp.core.lib import translate
8-from authorsdialog import Ui_AuthorsDialog
9+from openlp.plugins.songs.forms.authorsdialog import Ui_AuthorsDialog
10
11 class AuthorsForm(QtGui.QDialog, Ui_AuthorsDialog):
12 """
13@@ -67,21 +67,21 @@
14 self.autoDisplayName = on
15
16 def accept(self):
17- if self.FirstNameEdit.text() == u'':
18+ if not self.FirstNameEdit.text():
19 QtGui.QMessageBox.critical(self,
20 translate(u'AuthorsDialog', u'Error'),
21 translate(u'AuthorsDialog', u'You need to type in the first name of the author.'),
22 QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
23 self.FirstNameEdit.setFocus()
24 return False
25- elif self.LastNameEdit.text() == u'':
26+ elif not self.LastNameEdit.text():
27 QtGui.QMessageBox.critical(self,
28 translate(u'AuthorsDialog', u'Error'),
29 translate(u'AuthorsDialog', u'You need to type in the last name of the author.'),
30 QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
31 self.LastNameEdit.setFocus()
32 return False
33- elif self.DisplayEdit.text() == u'':
34+ elif not self.DisplayEdit.text():
35 if QtGui.QMessageBox.critical(self,
36 translate(u'AuthorsDialog', u'Error'),
37 translate(u'AuthorsDialog', u'You haven\'t set a display name for the author, would you like me to combine the first and last names for you?'),
38
39=== modified file 'openlp/plugins/songs/forms/songbookform.py'
40--- openlp/plugins/songs/forms/songbookform.py 2009-07-26 08:36:57 +0000
41+++ openlp/plugins/songs/forms/songbookform.py 2009-07-26 13:51:32 +0000
42@@ -19,7 +19,7 @@
43
44 from PyQt4 import QtGui, QtCore
45 from openlp.core.lib import translate
46-from songbookdialog import Ui_SongBookDialog
47+from openlp.plugins.songs.forms.songbookdialog import Ui_SongBookDialog
48
49 class SongBookForm(QtGui.QDialog, Ui_SongBookDialog):
50 """
51@@ -40,7 +40,7 @@
52 return QtGui.QDialog.exec_(self)
53
54 def accept(self):
55- if self.NameEdit.text() == u'':
56+ if not self.NameEdit.text():
57 QtGui.QMessageBox.critical(self,
58 translate(u'SongBookDialog', u'Error'),
59 translate(u'SongBookDialog', u'You need to type in a book name!'),
60
61=== modified file 'openlp/plugins/songs/forms/songmaintenanceform.py'
62--- openlp/plugins/songs/forms/songmaintenanceform.py 2009-07-24 22:13:40 +0000
63+++ openlp/plugins/songs/forms/songmaintenanceform.py 2009-08-02 19:10:54 +0000
64@@ -79,15 +79,15 @@
65 item_id = self._getCurrentItemId(list_widget)
66 if item_id != -1:
67 item = get_func(item_id)
68- if QtGui.QMessageBox.warning(self, dlg_title, del_text,
69- QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.No | QtGui.QMessageBox.Yes)
70- ) == QtGui.QMessageBox.Yes:
71- if item is not None and len(item.songs) == 0:
72+ if item is not None and len(item.songs) == 0:
73+ if QtGui.QMessageBox.warning(self, dlg_title, del_text,
74+ QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.No | QtGui.QMessageBox.Yes)
75+ ) == QtGui.QMessageBox.Yes:
76 del_func(item.id)
77 reset_func()
78- else:
79- QtGui.QMessageBox.critical(self, dlg_title, err_text,
80- QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
81+ else:
82+ QtGui.QMessageBox.critical(self, dlg_title, err_text,
83+ QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
84 else:
85 QtGui.QMessageBox.critical(self, dlg_title, sel_text,
86 QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
87
88=== modified file 'openlp/plugins/songs/forms/topicsform.py'
89--- openlp/plugins/songs/forms/topicsform.py 2009-07-26 08:36:57 +0000
90+++ openlp/plugins/songs/forms/topicsform.py 2009-07-26 13:51:32 +0000
91@@ -18,7 +18,7 @@
92 """
93 from PyQt4 import QtGui, QtCore
94 from openlp.core.lib import translate
95-from topicsdialog import Ui_TopicsDialog
96+from openlp.plugins.songs.forms.topicsdialog import Ui_TopicsDialog
97
98 class TopicsForm(QtGui.QDialog, Ui_TopicsDialog):
99 """
100@@ -38,7 +38,7 @@
101 return QtGui.QDialog.exec_(self)
102
103 def accept(self):
104- if self.NameEdit.text() == u'':
105+ if not self.NameEdit.text():
106 QtGui.QMessageBox.critical(self,
107 translate(u'SongBookDialog', u'Error'),
108 translate(u'SongBookDialog', u'You need to type in a topic name!'),