forked from openlp/openlp
Update the credits in the About dialog
This commit is contained in:
parent
911e18b3a3
commit
3774cf3704
@ -34,14 +34,16 @@ from openlp.core.lib import build_icon
|
|||||||
from openlp.core.lib.ui import create_button, create_button_box
|
from openlp.core.lib.ui import create_button, create_button_box
|
||||||
|
|
||||||
|
|
||||||
class Ui_AboutDialog(object):
|
class UiAboutDialog(object):
|
||||||
"""
|
"""
|
||||||
The actual GUI widgets for the About form.
|
The actual GUI widgets for the About form.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def setupUi(self, about_dialog):
|
def setup_ui(self, about_dialog):
|
||||||
"""
|
"""
|
||||||
Set up the UI for the dialog.
|
Set up the UI for the dialog.
|
||||||
|
|
||||||
|
:param about_dialog: The QDialog object to set up.
|
||||||
"""
|
"""
|
||||||
about_dialog.setObjectName('about_dialog')
|
about_dialog.setObjectName('about_dialog')
|
||||||
about_dialog.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
|
about_dialog.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
|
||||||
@ -84,12 +86,14 @@ class Ui_AboutDialog(object):
|
|||||||
self.volunteer_button = create_button(None, 'volunteer_button', icon=':/system/system_volunteer.png')
|
self.volunteer_button = create_button(None, 'volunteer_button', icon=':/system/system_volunteer.png')
|
||||||
self.button_box = create_button_box(about_dialog, 'button_box', ['close'], [self.volunteer_button])
|
self.button_box = create_button_box(about_dialog, 'button_box', ['close'], [self.volunteer_button])
|
||||||
self.about_dialog_layout.addWidget(self.button_box)
|
self.about_dialog_layout.addWidget(self.button_box)
|
||||||
self.retranslateUi(about_dialog)
|
self.retranslate_ui(about_dialog)
|
||||||
self.about_notebook.setCurrentIndex(0)
|
self.about_notebook.setCurrentIndex(0)
|
||||||
|
|
||||||
def retranslateUi(self, about_dialog):
|
def retranslate_ui(self, about_dialog):
|
||||||
"""
|
"""
|
||||||
Dynamically translate the UI.
|
Dynamically translate the UI.
|
||||||
|
|
||||||
|
:param about_dialog: The QDialog object to translate
|
||||||
"""
|
"""
|
||||||
about_dialog.setWindowTitle('%s OpenLP' % UiStrings().About)
|
about_dialog.setWindowTitle('%s OpenLP' % UiStrings().About)
|
||||||
self.about_text_edit.setPlainText(
|
self.about_text_edit.setPlainText(
|
||||||
@ -109,30 +113,27 @@ class Ui_AboutDialog(object):
|
|||||||
'consider volunteering by using the button below.'))
|
'consider volunteering by using the button below.'))
|
||||||
self.about_notebook.setTabText(self.about_notebook.indexOf(self.about_tab), UiStrings().About)
|
self.about_notebook.setTabText(self.about_notebook.indexOf(self.about_tab), UiStrings().About)
|
||||||
lead = 'Raoul "superfly" Snyman'
|
lead = 'Raoul "superfly" Snyman'
|
||||||
developers = ['Tim "TRB143" Bentley', 'Jonathan "gushie" Corwin',
|
developers = ['Tim "TRB143" Bentley', 'Tomas "tgc" Groth', 'Samuel "samuel_m" Mehrbrodt',
|
||||||
'Michael "cocooncrash" Gorven',
|
'Andreas "googol" Preikschat', 'Ken "alisonken1" Roberts', 'Raoul "superfly" Snyman',
|
||||||
'Andreas "googol" Preikschat', 'Raoul "superfly" Snyman',
|
'Jonathan "springermac" Springer', 'Philip "Phill" Ridout']
|
||||||
'Martin "mijiti" Thompson', 'Jon "Meths" Tibble']
|
contributors = ['Stuart "sibecker" Becker', 'Gerald "jerryb" Britton', 'Jonathan "gushie" Corwin',
|
||||||
contributors = ['Gerald "jerryb" Britton',
|
'Samuel "MrGamgee" Findlay', 'Michael "cocooncrash" Gorven', 'Scott "sguerrieri" Guerrieri',
|
||||||
'Samuel "MrGamgee" Findlay', 'Scott "sguerrieri" Guerrieri',
|
'Matthias "matthub" Hub', 'Meinert "m2j" Jordan', 'Armin "orangeshirt" K\xf6hler',
|
||||||
'Matthias "matthub" Hub', 'Meinert "m2j" Jordan',
|
'Rafael "rafaellerm" Lerm', 'Erik "luen" Lundin', 'Edwin "edwinlunando" Lunando',
|
||||||
'Armin "orangeshirt" K\xf6hler', 'Erik "luen" Lundin',
|
'Dmitriy Marmyshev', 'Brian "brianmeyer" Meyer', 'Joshua "milleja46" Miller',
|
||||||
'Edwin "edwinlunando" Lunando', 'Brian "brianmeyer" Meyer',
|
'Stevan "ElderP" Pettit', 'Mattias "mahfiaz" P\xf5ldaru', 'Felipe Polo-Wood',
|
||||||
'Joshua "milleja46" Miller', 'Stevan "ElderP" Pettit',
|
'Christian "crichter" Richter', 'Arjan "arjans" Schrijver', 'Simon "samscudder" Scudder',
|
||||||
'Mattias "mahfiaz" P\xf5ldaru', 'Christian "crichter" Richter',
|
'Jeffrey "whydoubt" Smith', 'Stefan Strasser', 'Maikel Stuivenberg', 'Martin "mijiti" Thompson',
|
||||||
'Philip "Phill" Ridout', 'Simon "samscudder" Scudder',
|
'Jon "Meths" Tibble', 'Dave "Dave42W" Warnock', 'Oliver "OliWie" Wieland',
|
||||||
'Jeffrey "whydoubt" Smith', 'Maikel Stuivenberg',
|
'Frode "frodus" Woldsund', 'Martin "matysek" Zibricky', 'Patrick "mohij" Zimmermann']
|
||||||
'Dave "Dave42W" Warnock', 'Frode "frodus" Woldsund',
|
|
||||||
'Martin "matysek" Zibricky', 'Patrick "mohij" Zimmermann']
|
|
||||||
testers = ['Philip "Phill" Ridout', 'Wesley "wrst" Stout',
|
testers = ['Philip "Phill" Ridout', 'Wesley "wrst" Stout',
|
||||||
'John "jseagull1" Cegalis (lead)']
|
'John "jseagull1" Cegalis (lead)']
|
||||||
packagers = ['Thomas "tabthorpe" Abthorpe (FreeBSD)',
|
packagers = ['Thomas "tabthorpe" Abthorpe (FreeBSD)',
|
||||||
'Tim "TRB143" Bentley (Fedora and Android)',
|
'Tim "TRB143" Bentley (Fedora and Android)',
|
||||||
'Matthias "matthub" Hub (Mac OS X)',
|
|
||||||
'Joseph "jdmulloy" Mulloy (openSUSE)',
|
'Joseph "jdmulloy" Mulloy (openSUSE)',
|
||||||
'Stevan "ElderP" Pettit (Windows)',
|
'Stevan "ElderP" Pettit (Windows)',
|
||||||
'Raoul "superfly" Snyman (Debian, Ubuntu)',
|
'Raoul "superfly" Snyman (Mac OS X, Debian, Ubuntu)',
|
||||||
'Garrett "floft" Wilson (Arch Linux)']
|
'Wesley "wrst" Stout (Arch Linux)']
|
||||||
translators = {
|
translators = {
|
||||||
'af': ['Johan "nuvolari" Mynhardt'],
|
'af': ['Johan "nuvolari" Mynhardt'],
|
||||||
'cs': ['Martin "matysek" Zibricky'],
|
'cs': ['Martin "matysek" Zibricky'],
|
||||||
@ -140,7 +141,7 @@ class Ui_AboutDialog(object):
|
|||||||
'de': ['Patrick "madmuffin" Br\xfcckner', 'Meinert "m2j" Jordan', 'Andreas "googol" Preikschat',
|
'de': ['Patrick "madmuffin" Br\xfcckner', 'Meinert "m2j" Jordan', 'Andreas "googol" Preikschat',
|
||||||
'Christian "crichter" Richter'],
|
'Christian "crichter" Richter'],
|
||||||
'en_GB': ['Tim "TRB143" Bentley', 'Jonathan "gushie" Corwin'],
|
'en_GB': ['Tim "TRB143" Bentley', 'Jonathan "gushie" Corwin'],
|
||||||
'en_ZA': ['Raoul "superfly" Snyman', 'Johan "nuvolari" Mynhardt'],
|
'en_ZA': ['Raoul "superfly" Snyman'],
|
||||||
'el': ['Alexander Siozos'],
|
'el': ['Alexander Siozos'],
|
||||||
'es': ['Josu\xe9 Z\xfa\xf1iga', 'Christian Gonzalez'],
|
'es': ['Josu\xe9 Z\xfa\xf1iga', 'Christian Gonzalez'],
|
||||||
'et': ['Mattias "mahfiaz" P\xf5ldaru'],
|
'et': ['Mattias "mahfiaz" P\xf5ldaru'],
|
||||||
@ -151,8 +152,9 @@ class Ui_AboutDialog(object):
|
|||||||
'ja': ['Kunio "Kunio" Nakamaru', 'Chris Haris'],
|
'ja': ['Kunio "Kunio" Nakamaru', 'Chris Haris'],
|
||||||
'nb': ['Atle "pendlaren" Weibell', 'Frode "frodus" Woldsund'],
|
'nb': ['Atle "pendlaren" Weibell', 'Frode "frodus" Woldsund'],
|
||||||
'nl': ['Arjen "typovar" van Voorst'],
|
'nl': ['Arjen "typovar" van Voorst'],
|
||||||
|
'pl': ['Agata \u017B\u0105d\u0142o', 'Piotr Karze\u0142ek'],
|
||||||
'pt_BR': ['David Mederiros', 'Rafael "rafaellerm" Lerm', 'Eduardo Levi Chaves',
|
'pt_BR': ['David Mederiros', 'Rafael "rafaellerm" Lerm', 'Eduardo Levi Chaves',
|
||||||
'Gustavo Bim', 'Rog\xeanio Bel\xe9m', 'Samuel Simon "samscudder" Scudder', 'Van Der Fran'],
|
'Gustavo Bim', 'Rog\xeanio Bel\xe9m', 'Simon "samscudder" Scudder', 'Van Der Fran'],
|
||||||
'ru': ['Sergey "ratz" Ratz'],
|
'ru': ['Sergey "ratz" Ratz'],
|
||||||
'sv': ['Erik "luen" Lundin'],
|
'sv': ['Erik "luen" Lundin'],
|
||||||
'ta_LK': ['"Prasad"'],
|
'ta_LK': ['"Prasad"'],
|
||||||
@ -209,6 +211,8 @@ class Ui_AboutDialog(object):
|
|||||||
' %s\n'
|
' %s\n'
|
||||||
' Dutch (nl)\n'
|
' Dutch (nl)\n'
|
||||||
' %s\n'
|
' %s\n'
|
||||||
|
' Polish (pl)\n'
|
||||||
|
' %s\n'
|
||||||
' Portuguese, Brazil (pt_BR)\n'
|
' Portuguese, Brazil (pt_BR)\n'
|
||||||
' %s\n'
|
' %s\n'
|
||||||
' Russian (ru)\n'
|
' Russian (ru)\n'
|
||||||
@ -258,6 +262,7 @@ class Ui_AboutDialog(object):
|
|||||||
'\n '.join(translators['ja']),
|
'\n '.join(translators['ja']),
|
||||||
'\n '.join(translators['nb']),
|
'\n '.join(translators['nb']),
|
||||||
'\n '.join(translators['nl']),
|
'\n '.join(translators['nl']),
|
||||||
|
'\n '.join(translators['pl']),
|
||||||
'\n '.join(translators['pt_BR']),
|
'\n '.join(translators['pt_BR']),
|
||||||
'\n '.join(translators['ru']),
|
'\n '.join(translators['ru']),
|
||||||
'\n '.join(translators['sv']),
|
'\n '.join(translators['sv']),
|
||||||
@ -267,8 +272,8 @@ class Ui_AboutDialog(object):
|
|||||||
self.about_notebook.setTabText(self.about_notebook.indexOf(self.credits_tab),
|
self.about_notebook.setTabText(self.about_notebook.indexOf(self.credits_tab),
|
||||||
translate('OpenLP.AboutForm', 'Credits'))
|
translate('OpenLP.AboutForm', 'Credits'))
|
||||||
copyright_note = translate('OpenLP.AboutForm',
|
copyright_note = translate('OpenLP.AboutForm',
|
||||||
'Copyright \xa9 2004-2014 %s\n'
|
'Copyright \xa9 2004-2015 %s\n'
|
||||||
'Portions copyright \xa9 2004-2014 %s') % \
|
'Portions copyright \xa9 2004-2015 %s') % \
|
||||||
('Raoul Snyman',
|
('Raoul Snyman',
|
||||||
'Tim Bentley, Gerald Britton, Jonathan Corwin, Samuel Findlay, '
|
'Tim Bentley, Gerald Britton, Jonathan Corwin, Samuel Findlay, '
|
||||||
'Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, '
|
'Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, '
|
||||||
|
@ -29,15 +29,16 @@
|
|||||||
"""
|
"""
|
||||||
The About dialog.
|
The About dialog.
|
||||||
"""
|
"""
|
||||||
|
import webbrowser
|
||||||
|
|
||||||
from PyQt4 import QtGui
|
from PyQt4 import QtGui
|
||||||
|
|
||||||
from .aboutdialog import Ui_AboutDialog
|
|
||||||
from openlp.core.lib import translate
|
from openlp.core.lib import translate
|
||||||
from openlp.core.utils import get_application_version
|
from openlp.core.utils import get_application_version
|
||||||
|
from .aboutdialog import UiAboutDialog
|
||||||
|
|
||||||
|
|
||||||
class AboutForm(QtGui.QDialog, Ui_AboutDialog):
|
class AboutForm(QtGui.QDialog, UiAboutDialog):
|
||||||
"""
|
"""
|
||||||
The About dialog
|
The About dialog
|
||||||
"""
|
"""
|
||||||
@ -47,8 +48,14 @@ class AboutForm(QtGui.QDialog, Ui_AboutDialog):
|
|||||||
Do some initialisation stuff
|
Do some initialisation stuff
|
||||||
"""
|
"""
|
||||||
super(AboutForm, self).__init__(parent)
|
super(AboutForm, self).__init__(parent)
|
||||||
|
self._setup()
|
||||||
|
|
||||||
|
def _setup(self):
|
||||||
|
"""
|
||||||
|
Set up the dialog. This method is mocked out in tests.
|
||||||
|
"""
|
||||||
|
self.setup_ui(self)
|
||||||
application_version = get_application_version()
|
application_version = get_application_version()
|
||||||
self.setupUi(self)
|
|
||||||
about_text = self.about_text_edit.toPlainText()
|
about_text = self.about_text_edit.toPlainText()
|
||||||
about_text = about_text.replace('<version>', application_version['version'])
|
about_text = about_text.replace('<version>', application_version['version'])
|
||||||
if application_version['build']:
|
if application_version['build']:
|
||||||
@ -63,5 +70,4 @@ class AboutForm(QtGui.QDialog, Ui_AboutDialog):
|
|||||||
"""
|
"""
|
||||||
Launch a web browser and go to the contribute page on the site.
|
Launch a web browser and go to the contribute page on the site.
|
||||||
"""
|
"""
|
||||||
import webbrowser
|
|
||||||
webbrowser.open_new('http://openlp.org/en/contribute')
|
webbrowser.open_new('http://openlp.org/en/contribute')
|
||||||
|
@ -36,7 +36,7 @@ from PyQt4 import QtCore
|
|||||||
from openlp.core.common import Registry
|
from openlp.core.common import Registry
|
||||||
from openlp.core.lib import Renderer, ScreenList, ServiceItem
|
from openlp.core.lib import Renderer, ScreenList, ServiceItem
|
||||||
|
|
||||||
from tests.interfaces import MagicMock
|
from tests.functional import MagicMock
|
||||||
|
|
||||||
SCREEN = {
|
SCREEN = {
|
||||||
'primary': False,
|
'primary': False,
|
||||||
|
54
tests/functional/openlp_core_ui/test_aboutform.py
Normal file
54
tests/functional/openlp_core_ui/test_aboutform.py
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
|
# --------------------------------------------------------------------------- #
|
||||||
|
# Copyright (c) 2008-2015 Raoul Snyman #
|
||||||
|
# Portions copyright (c) 2008-2015 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
# Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||||
|
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Dave Warnock, #
|
||||||
|
# Frode Woldsund, Martin Zibricky, Patrick Zimmermann #
|
||||||
|
# --------------------------------------------------------------------------- #
|
||||||
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
# Software Foundation; version 2 of the License. #
|
||||||
|
# #
|
||||||
|
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
||||||
|
# more details. #
|
||||||
|
# #
|
||||||
|
# You should have received a copy of the GNU General Public License along #
|
||||||
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
|
###############################################################################
|
||||||
|
"""
|
||||||
|
Package to test the openlp.core.ui.firsttimeform package.
|
||||||
|
"""
|
||||||
|
from unittest import TestCase
|
||||||
|
|
||||||
|
from openlp.core.ui.aboutform import AboutForm
|
||||||
|
|
||||||
|
from tests.functional import patch
|
||||||
|
from tests.helpers.testmixin import TestMixin
|
||||||
|
|
||||||
|
|
||||||
|
class TestFirstTimeForm(TestCase, TestMixin):
|
||||||
|
|
||||||
|
def test_on_volunteer_button_clicked(self):
|
||||||
|
"""
|
||||||
|
Test that clicking on the "Volunteer" button opens a web page.
|
||||||
|
"""
|
||||||
|
# GIVEN: A new About dialog and a mocked out webbrowser module
|
||||||
|
with patch('openlp.core.ui.aboutform.webbrowser') as mocked_webbrowser:
|
||||||
|
about_form = AboutForm(None)
|
||||||
|
|
||||||
|
# WHEN: The "Volunteer" button is "clicked"
|
||||||
|
about_form.on_volunteer_button_clicked()
|
||||||
|
|
||||||
|
# THEN: A web browser is opened
|
||||||
|
mocked_webbrowser.open_new.assert_called_with('http://openlp.org/en/contribute')
|
@ -29,7 +29,6 @@
|
|||||||
"""
|
"""
|
||||||
Package to test the openlp.core.ui.firsttimeform package.
|
Package to test the openlp.core.ui.firsttimeform package.
|
||||||
"""
|
"""
|
||||||
from configparser import ConfigParser
|
|
||||||
import os
|
import os
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ from openlp.core.ui import MainDisplay
|
|||||||
from openlp.core.ui.maindisplay import TRANSPARENT_STYLESHEET, OPAQUE_STYLESHEET
|
from openlp.core.ui.maindisplay import TRANSPARENT_STYLESHEET, OPAQUE_STYLESHEET
|
||||||
|
|
||||||
from tests.helpers.testmixin import TestMixin
|
from tests.helpers.testmixin import TestMixin
|
||||||
from tests.interfaces import MagicMock
|
from tests.functional import MagicMock
|
||||||
|
|
||||||
SCREEN = {
|
SCREEN = {
|
||||||
'primary': False,
|
'primary': False,
|
||||||
|
@ -37,7 +37,7 @@ from openlp.core.lib import ServiceItemAction
|
|||||||
from openlp.core.ui import SlideController
|
from openlp.core.ui import SlideController
|
||||||
from openlp.core.ui.slidecontroller import InfoLabel, WIDE_MENU, NON_TEXT_MENU
|
from openlp.core.ui.slidecontroller import InfoLabel, WIDE_MENU, NON_TEXT_MENU
|
||||||
|
|
||||||
from tests.interfaces import MagicMock, patch
|
from tests.functional import MagicMock, patch
|
||||||
|
|
||||||
|
|
||||||
class TestSlideController(TestCase):
|
class TestSlideController(TestCase):
|
||||||
|
@ -34,14 +34,14 @@ import os
|
|||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
from tests.interfaces import MagicMock
|
from tests.functional import MagicMock
|
||||||
from tempfile import mkdtemp
|
from tempfile import mkdtemp
|
||||||
|
|
||||||
from openlp.core.ui import ThemeManager
|
from openlp.core.ui import ThemeManager
|
||||||
from openlp.core.common import Registry
|
from openlp.core.common import Registry
|
||||||
|
|
||||||
from tests.utils.constants import TEST_RESOURCES_PATH
|
from tests.utils.constants import TEST_RESOURCES_PATH
|
||||||
from tests.interfaces import MagicMock, patch
|
from tests.functional import MagicMock, patch
|
||||||
|
|
||||||
|
|
||||||
class TestThemeManager(TestCase):
|
class TestThemeManager(TestCase):
|
||||||
|
Loading…
Reference in New Issue
Block a user