← Back to team overview

openlp-core team mailing list archive

Re: [Merge] lp:~suutari-olli/openlp/add-bible-license-field into lp:openlp

 

Thanks for the review, I've fixed them.

Diff comments:

> 
> === modified file 'openlp/plugins/bibles/forms/bibleimportform.py'
> --- openlp/plugins/bibles/forms/bibleimportform.py	2016-08-29 16:11:09 +0000
> +++ openlp/plugins/bibles/forms/bibleimportform.py	2016-12-04 03:28:05 +0000
> @@ -717,6 +725,7 @@
>          self.license_details_page.registerField('license_version', self.version_name_edit)
>          self.license_details_page.registerField('license_copyright', self.copyright_edit)
>          self.license_details_page.registerField('license_permissions', self.permissions_edit)
> +        self.license_details_page.registerField("license_full_license", self.full_license_edit, "plainText")
>  

Whoops, fixed.

>      def set_defaults(self):
>          """
> 
> === modified file 'openlp/plugins/bibles/forms/editbibleform.py'
> --- openlp/plugins/bibles/forms/editbibleform.py	2016-05-21 08:31:24 +0000
> +++ openlp/plugins/bibles/forms/editbibleform.py	2016-12-04 03:28:05 +0000
> @@ -61,10 +61,32 @@
>          """
>          log.debug('Load Bible')
>          self.bible = bible
> -        self.version_name_edit.setText(self.manager.get_meta_data(self.bible, 'name').value)
> -        self.copyright_edit.setText(self.manager.get_meta_data(self.bible, 'copyright').value)
> -        self.permissions_edit.setText(self.manager.get_meta_data(self.bible, 'permissions').value)
>          book_name_language = self.manager.get_meta_data(self.bible, 'book_name_language')
> +        """
> +        Try loading the metadata, if the field does not exist in the metadata, continue executing the code,
> +        missing fields will be created on "self.accept" (save).
> +        """

Done.

> +        try:
> +            self.version_name_edit.setText(self.manager.get_meta_data(self.bible, 'name').value)
> +        except AttributeError:
> +            pass
> +        try:
> +            self.copyright_edit.setText(self.manager.get_meta_data(self.bible, 'copyright').value)
> +        except AttributeError:
> +            pass
> +        try:
> +            self.permissions_edit.setText(self.manager.get_meta_data(self.bible, 'permissions').value)
> +        except AttributeError:
> +            pass
> +        try:
> +            self.full_license_edit.setPlainText(self.manager.get_meta_data(self.bible, 'full_license').value)
> +        except AttributeError:
> +            pass
> +        # Set placeholder texts for the fields.
> +        self.version_name_edit.setPlaceholderText(UiStrings().RequiredShowInFooter)
> +        self.copyright_edit.setPlaceholderText(UiStrings().RequiredShowInFooter)
> +        self.permissions_edit.setPlaceholderText(UiStrings().OptionalShowInFooter)
> +        self.full_license_edit.setPlaceholderText(UiStrings().OptionalHideInFooter)
>          if book_name_language and book_name_language.value != 'None':
>              self.language_selection_combo_box.setCurrentIndex(int(book_name_language.value) + 1)
>          self.books = {}
> 
> === modified file 'openlp/plugins/songs/songsplugin.py'
> --- openlp/plugins/songs/songsplugin.py	2016-09-19 18:51:48 +0000
> +++ openlp/plugins/songs/songsplugin.py	2016-12-04 03:28:05 +0000
> @@ -60,6 +60,7 @@
>      'songs/add song from service': True,
>      'songs/display songbar': True,
>      'songs/display songbook': False,
> +    'songs/display written by': False,

"Written by" was introduced in 2.3> IIRC, and people kind of got upset of it because their undefined author types now show up as "Written by" (Including me).

I think it would be better to have this behavior disabled by default,
but I've changed it to "True" for now.

>      'songs/display copyright symbol': False,
>      'songs/last directory import': '',
>      'songs/last directory export': '',


-- 
https://code.launchpad.net/~suutari-olli/openlp/add-bible-license-field/+merge/312426
Your team OpenLP Core is subscribed to branch lp:openlp.


References