~ubuntu-branches/debian/wheezy/openlp/wheezy

« back to all changes in this revision

Viewing changes to openlp/plugins/bibles/lib/biblestab.py

  • Committer: Package Import Robot
  • Author(s): Raoul Snyman
  • Date: 2012-06-23 21:54:30 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120623215430-8qrmxy3d7jwv3jvn
Tags: 1.9.10-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
# --------------------------------------------------------------------------- #
7
7
# Copyright (c) 2008-2012 Raoul Snyman                                        #
8
8
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan      #
9
 
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan,      #
10
 
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias     #
11
 
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith,    #
12
 
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund             #
 
9
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 
10
# Meinert Jordan, Armin Köhler, Edwin Lunando, Joshua Miller, Stevan Pettit,  #
 
11
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout,      #
 
12
# Simon Scudder, Jeffrey Smith, Maikel Stuivenberg, Martin Thompson, Jon      #
 
13
# Tibble, Dave Warnock, Frode Woldsund                                        #
13
14
# --------------------------------------------------------------------------- #
14
15
# This program is free software; you can redistribute it and/or modify it     #
15
16
# under the terms of the GNU General Public License as published by the Free  #
31
32
 
32
33
from openlp.core.lib import Receiver, SettingsTab, translate
33
34
from openlp.core.lib.ui import UiStrings, find_and_set_in_combo_box
 
35
from openlp.core.lib.settings import Settings
34
36
from openlp.plugins.bibles.lib import LayoutStyle, DisplayStyle, \
35
37
    update_reference_separators, get_reference_separator, LanguageSelection
36
38
 
276
278
                'end marks may be defined.\nThey have to be separated by a '
277
279
                'vertical bar "|".\nPlease clear this edit line to use the '
278
280
                'default value.'))
279
 
        self.languageSelectionGroupBox.setTitle(
280
 
            translate('BiblesPlugin.BiblesTab', 'Preferred Bookname Language'))
 
281
        self.languageSelectionGroupBox.setTitle(translate(
 
282
            'BiblesPlugin.BiblesTab', 'Default Bible Language'))
281
283
        self.languageSelectionLabel.setText(translate('BiblesPlugin.BiblesTab',
282
 
            'Choose the language in which the book names of the\nBible should '
283
 
            'be displayed in the Bible search:'))
 
284
            'Book name language in search field,\nsearch results and on '
 
285
            'display:'))
284
286
        self.languageSelectionComboBox.setItemText(LanguageSelection.Bible,
285
 
            translate('BiblesPlugin.BiblesTab', 'Bible language'))
 
287
            translate('BiblesPlugin.BiblesTab', 'Bible Language'))
286
288
        self.languageSelectionComboBox.setItemText(
287
289
            LanguageSelection.Application,
288
 
            translate('BiblesPlugin.BiblesTab', 'Application language'))
 
290
            translate('BiblesPlugin.BiblesTab', 'Application Language'))
289
291
        self.languageSelectionComboBox.setItemText(LanguageSelection.English,
290
292
            translate('BiblesPlugin.BiblesTab', 'English'))
291
 
        self.languageSelectionComboBox.setToolTip(
292
 
            translate('BiblesPlugin.BiblesTab', 'Multiple options:\n '
293
 
            'Bible language - the language in which the Bible book names '
294
 
            'were imported\n Application language - the language you have '
295
 
            'chosen for OpenLP\n English - always use English book names'))
296
293
 
297
294
    def onBibleThemeComboBoxChanged(self):
298
295
        self.bible_theme = self.bibleThemeComboBox.currentText()
419
416
                    self.getGreyTextPalette(True))
420
417
 
421
418
    def load(self):
422
 
        settings = QtCore.QSettings()
 
419
        settings = Settings()
423
420
        settings.beginGroup(self.settingsSection)
424
421
        self.show_new_chapters = settings.value(
425
422
            u'display new chapter', QtCore.QVariant(False)).toBool()
488
485
                self.getGreyTextPalette(False))
489
486
            self.endSeparatorCheckBox.setChecked(True)
490
487
        self.language_selection = settings.value(
491
 
            u'bookname language', QtCore.QVariant(0)).toInt()[0]
 
488
            u'book name language', QtCore.QVariant(0)).toInt()[0]
492
489
        self.languageSelectionComboBox.setCurrentIndex(self.language_selection)
493
490
        settings.endGroup()
494
491
 
495
492
    def save(self):
496
 
        settings = QtCore.QSettings()
 
493
        settings = Settings()
497
494
        settings.beginGroup(self.settingsSection)
498
495
        settings.setValue(u'display new chapter',
499
496
            QtCore.QVariant(self.show_new_chapters))
501
498
            QtCore.QVariant(self.display_style))
502
499
        settings.setValue(u'verse layout style',
503
500
            QtCore.QVariant(self.layout_style))
504
 
        settings.setValue(u'bookname language',
 
501
        settings.setValue(u'book name language',
505
502
            QtCore.QVariant(self.language_selection))
506
503
        settings.setValue(u'second bibles', QtCore.QVariant(self.second_bibles))
507
504
        settings.setValue(u'bible theme', QtCore.QVariant(self.bible_theme))