"I still do not agree with using settings for temporary flags. Find another 
way." 

Well I can't think of an other way.

I tried to fix: https://bugs.launchpad.net/openlp/+bug/1531691 without settings,
but it didn't work properly and was way more complex.

Since we need to trigger actions in many files/functions based on temporary 
flags, 
what would be a proper solution without the use of settings?

Also replied to diff comments.

Thank you for your review.

Diff comments:

> === modified file 'openlp/core/common/settings.py'
> --- openlp/core/common/settings.py    2016-04-21 21:16:24 +0000
> +++ openlp/core/common/settings.py    2016-04-27 20:53:26 +0000
> @@ -163,6 +164,8 @@
>          'core/display on monitor': True,
>          'core/override position': False,
>          'core/application version': '0.0',
> +        'core/is live item edited and replaced': False,

When item is sent to Live from Service, display gets unblanked if the song is 
edited and display is blanked.

The Process updates the lyrics on Live, this is used to prevent unblanking the 
display when the update action is called.

Other solution I came up didn't involve a setting but as result, Live was shown 
shortly before reblanking the display happend.

This is used to fix bug:
https://bugs.launchpad.net/openlp/+bug/1531691

> +        'core/has doubleclicking preview added item to service': False,

This is used to fix bug:
https://bugs.launchpad.net/openlp/+bug/1462420

It prevents the item from being added to Service multiple times by 
doupleclicking preview.

>          'images/background color': '#000000',
>          'media/players': 'system,webkit',
>          'media/override player': QtCore.Qt.Unchecked,
> 
> === modified file 'openlp/core/lib/mediamanageritem.py'
> --- openlp/core/lib/mediamanageritem.py       2016-04-17 19:32:15 +0000
> +++ openlp/core/lib/mediamanageritem.py       2016-04-27 20:53:26 +0000
> @@ -482,6 +482,9 @@
>                                                          'You must select one 
> or more items to preview.'))
>          else:
>              log.debug('%s Preview requested' % self.plugin.name)
> +            # If ('advanced/double click live') is not enabled, double 
> clicking preview adds the item to Service.
> +            # This setting prevents it from being sent to Service multiple 
> times, in here it is reset to False.
> +            Settings().setValue('core/has doubleclicking preview added item 
> to service', False)

This is used to fix bug:
https://bugs.launchpad.net/openlp/+bug/1462420

It prevents the item from being added to Service multiple times by 
doupleclicking preview.

This resets the flag to "False" every time a new preview is generated, thus 
making it possible to add the item to Service by doupleclicking in preview.

>              service_item = self.build_service_item()
>              if service_item:
>                  service_item.from_plugin = True


-- 
https://code.launchpad.net/~suutari-olli/openlp/click-slide-to-go-live-from-blank/+merge/293173
Your team OpenLP Core is subscribed to branch lp:openlp.

_______________________________________________
Mailing list: https://launchpad.net/~openlp-core
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp

Reply via email to