def retranslateUi(self, edit_verse_dialog):
     edit_verse_dialog.setWindowTitle(
         translate('SongsPlugin.EditVerseForm', 'Edit Verse'))
     self.verse_type_label.setText(
         translate('SongsPlugin.EditVerseForm', '&Verse type:'))
     self.verse_type_combo_box.setItemText(
         VerseType.Verse, VerseType.translated_names[VerseType.Verse])
     self.verse_type_combo_box.setItemText(
         VerseType.Chorus, VerseType.translated_names[VerseType.Chorus])
     self.verse_type_combo_box.setItemText(
         VerseType.Bridge, VerseType.translated_names[VerseType.Bridge])
     self.verse_type_combo_box.setItemText(
         VerseType.PreChorus,
         VerseType.translated_names[VerseType.PreChorus])
     self.verse_type_combo_box.setItemText(
         VerseType.Intro, VerseType.translated_names[VerseType.Intro])
     self.verse_type_combo_box.setItemText(
         VerseType.Ending, VerseType.translated_names[VerseType.Ending])
     self.verse_type_combo_box.setItemText(
         VerseType.Other, VerseType.translated_names[VerseType.Other])
     self.split_button.setText(UiStrings().Split)
     self.split_button.setToolTip(UiStrings().SplitToolTip)
     self.insert_button.setText(
         translate('SongsPlugin.EditVerseForm', '&Insert'))
     self.insert_button.setToolTip(
         translate('SongsPlugin.EditVerseForm',
                   'Split a slide into two by inserting a verse splitter.'))
示例#2
0
 def retranslateUi(self, edit_verse_dialog):
     edit_verse_dialog.setWindowTitle(
         translate('SongsPlugin.EditVerseChordsForm',
                   'Edit Verse and Chords'))
     self.chord_hint_label.setText(
         translate(
             'SongsPlugin.EditVerseChordsForm',
             'Chord lines must finish with an @ and be put on the line above the corresponding lyrics.\nTo pad out lyrics to fit the chords use the # symbol.'
         ))
     self.verse_type_label.setText(
         translate('SongsPlugin.EditVerseChordsForm', '&Verse type:'))
     self.verse_type_combo_box.setItemText(
         VerseType.Verse, VerseType.translated_names[VerseType.Verse])
     self.verse_type_combo_box.setItemText(
         VerseType.Chorus, VerseType.translated_names[VerseType.Chorus])
     self.verse_type_combo_box.setItemText(
         VerseType.Bridge, VerseType.translated_names[VerseType.Bridge])
     self.verse_type_combo_box.setItemText(
         VerseType.PreChorus,
         VerseType.translated_names[VerseType.PreChorus])
     self.verse_type_combo_box.setItemText(
         VerseType.Intro, VerseType.translated_names[VerseType.Intro])
     self.verse_type_combo_box.setItemText(
         VerseType.Ending, VerseType.translated_names[VerseType.Ending])
     self.verse_type_combo_box.setItemText(
         VerseType.Other, VerseType.translated_names[VerseType.Other])
     self.split_button.setText(UiStrings().Split)
     self.split_button.setToolTip(UiStrings().SplitToolTip)
     self.force_split_button.setText(UiStrings().ForcedSplit)
     self.force_split_button.setToolTip(UiStrings().ForcedSplitToolTip)
     self.insert_button.setText(
         translate('SongsPlugin.EditVerseChordsForm', '&Insert'))
     self.insert_button.setToolTip(
         translate('SongsPlugin.EditVerseChordsForm',
                   'Split a slide into two by inserting a verse splitter.'))
示例#3
0
 def initialise(self):
     """
     Initialise plugin
     """
     log.info('Alerts Initialising')
     super(AlertsPlugin, self).initialise()
     self.tools_alert_item.setVisible(True)
     action_list = ActionList.get_instance()
     action_list.add_action(self.tools_alert_item, UiStrings().Tools)
示例#4
0
 def finalise(self):
     """
     Tidy up on exit
     """
     log.info('Plugin Finalise')
     self.manager.finalise()
     Plugin.finalise(self)
     action_list = ActionList.get_instance()
     action_list.remove_action(self.import_bible_item, UiStrings().Import)
     self.import_bible_item.setVisible(False)
     self.export_bible_item.setVisible(False)
示例#5
0
 def initialise(self):
     """
     Initialise the Bible plugin.
     """
     log.info('bibles Initialising')
     super(BiblePlugin, self).initialise()
     self.import_bible_item.setVisible(True)
     action_list = ActionList.get_instance()
     action_list.add_action(self.import_bible_item, UiStrings().Import)
     # Set to invisible until we can export bibles
     self.export_bible_item.setVisible(False)
 def show_error_msg(self):
     """
     Stop presentation and display an error message.
     """
     try:
         self.presentation.SlideShowWindow.View.Exit()
     except (AttributeError, pywintypes.com_error) as e:
         log.exception('Failed to exit Powerpoint presentation after error')
         log.exception(e)
     critical_error_message_box(UiStrings().Error, translate('PresentationPlugin.PowerpointDocument',
                                                             'An error occurred in the Powerpoint integration '
                                                             'and the presentation will be stopped. '
                                                             'Restart the presentation if you wish to present it.'))
示例#7
0
    def main_window_title_test(self):
        """
        Test that running a new instance of OpenLP set the window title correctly
        """
        # GIVEN a newly opened OpenLP instance

        # WHEN no changes are made to the service

        # THEN the main window's title shoud be the same as the OLPV2x string in the UiStrings class
        self.assertEqual(
            self.main_window.windowTitle(),
            UiStrings().OLPV2x,
            'The main window\'s title should be the same as the OLPV2x string in UiStrings class'
        )
示例#8
0
    def set_service_unmodified_test(self):
        """
        Test that when setting the service's title the main window's title is set correctly
        """
        # GIVEN a newly opened OpenLP instance

        # WHEN set_service_modified is called with with the modified flag set False and a file name
        self.main_window.set_service_modified(False, 'test.osz')

        # THEN the main window's title should be set to the
        self.assertEqual(
            self.main_window.windowTitle(),
            '%s - %s' % (UiStrings().OLPV2x, 'test.osz'),
            'The main window\'s title should be set to "<the contents of UiStrings().OLPV2x> - test.osz"'
        )