~phill-ridout/openlp/fixes-I

« back to all changes in this revision

Viewing changes to openlp/plugins/songs/forms/songmaintenanceform.py

  • Committer: Raoul Snyman
  • Date: 2017-03-28 00:36:54 UTC
  • mto: This revision was merged to the branch mainline in revision 2729.
  • Revision ID: raoul@snyman.info-20170328003654-ktg74kpn09vhgisy
Fix a problem with loading Qt's translation files, bug #1676163

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
# Temple Place, Suite 330, Boston, MA 02111-1307 USA                          #
21
21
###############################################################################
22
22
import logging
23
 
import os
24
23
 
25
24
from PyQt5 import QtCore, QtWidgets
26
25
from sqlalchemy.sql import and_
184
183
                Author.display_name == new_author.display_name
185
184
            )
186
185
        )
187
 
        return self.__check_object_exists(authors, new_author, edit)
 
186
        return self._check_object_exists(authors, new_author, edit)
188
187
 
189
188
    def check_topic_exists(self, new_topic, edit=False):
190
189
        """
194
193
        :param edit: Are we editing the song?
195
194
        """
196
195
        topics = self.manager.get_all_objects(Topic, Topic.name == new_topic.name)
197
 
        return self.__check_object_exists(topics, new_topic, edit)
 
196
        return self._check_object_exists(topics, new_topic, edit)
198
197
 
199
198
    def check_song_book_exists(self, new_book, edit=False):
200
199
        """
205
204
        """
206
205
        books = self.manager.get_all_objects(
207
206
            Book, and_(Book.name == new_book.name, Book.publisher == new_book.publisher))
208
 
        return self.__check_object_exists(books, new_book, edit)
 
207
        return self._check_object_exists(books, new_book, edit)
209
208
 
210
 
    def __check_object_exists(self, existing_objects, new_object, edit):
 
209
    def _check_object_exists(self, existing_objects, new_object, edit):
211
210
        """
212
211
        Utility method to check for an existing object.
213
212