← Back to team overview

openlp-core team mailing list archive

Re: [Merge] lp:~trb143/openlp/latest-fixes into lp:openlp

 

Review: Needs Fixing

See inline comments

Diff comments:

> === modified file 'openlp/core/display/render.py'
> --- openlp/core/display/render.py	2019-08-06 20:46:41 +0000
> +++ openlp/core/display/render.py	2019-08-25 16:15:40 +0000
> @@ -503,6 +503,26 @@
>          self.force_page = False
>          return None
>  
> +    def get_theme(self, item):
> +        """
> +        :param item: The :class:`~openlp.core.lib.serviceitem.ServiceItem` item object
> +        :return string: The name of the theme to be used
> +
> +        """
> +        # Just assume we use the global theme.
> +        theme_name = Registry().get('theme_manager').global_theme
> +        # The theme level is either set to Service or Item. Use the service theme if one is set. We also have to use the
> +        # service theme, even when the theme level is set to Item, because the item does not necessarily have to have a
> +        # theme.
> +        if self.theme_level != ThemeLevel.Global:
> +            # When the theme level is at Service and we actually have a service theme then use it.
> +            if self.theme_level != ThemeLevel.Service:
> +                theme_name = Registry().get('service_manager').service_theme

I'm confused. If the theme level is NOT Service, then get the service theme? I think your logic is inverse here.

> +        # If we have Item level and have an item theme then use it.
> +        if self.theme_level == ThemeLevel.Song and item.theme:
> +            theme_name = item.theme
> +        return theme_name
> +
>      def format_slide(self, text, item):
>          """
>          Calculate how much text can fit on a slide.
> 
> === modified file 'openlp/core/ui/mainwindow.py'
> --- openlp/core/ui/mainwindow.py	2019-08-04 13:13:33 +0000
> +++ openlp/core/ui/mainwindow.py	2019-08-25 16:15:40 +0000
> @@ -546,7 +546,8 @@
>          Wait for the threads
>          """
>          # Sometimes the threads haven't finished, let's wait for them
> -        wait_dialog = QtWidgets.QProgressDialog('Waiting for some things to finish...', '', 0, 0, self)
> +        wait_dialog = QtWidgets.QProgressDialog(translate('OpenLP.MainWindow', 'Waiting for some things to finish...'),
> +                                                '', 0, 0, self)

Thanks! I missed that :-(

>          wait_dialog.setWindowModality(QtCore.Qt.WindowModal)
>          wait_dialog.setAutoClose(False)
>          wait_dialog.setCancelButton(None)


-- 
https://code.launchpad.net/~trb143/openlp/latest-fixes/+merge/371774
Your team OpenLP Core is subscribed to branch lp:openlp.


References