[Openlp-core] [Bug 1600510] Re: Deleting a songbook throws "song" attribute exception

2019-08-07 Thread Phill
** Changed in: openlp/trunk
   Status: In Progress => Fix Committed

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1600510

Title:
  Deleting a songbook throws "song" attribute exception

Status in OpenLP:
  Fix Committed
Status in OpenLP trunk series:
  Fix Committed

Bug description:
  Bug reported via support system:
  https://support.openlp.org/scp/tickets.php?id=3592

  
  **OpenLP Bug Report** 
  Version: {'version': '2.4.2', 'build': None, 'full': '2.4.2'} 

  --- Details of the Exception. ---

  After Importing songs with Songbeamer importer he added two Song books with
  nearly the same title. So I wanted to rename one to the same title of the
  second to merge them but an exception occured. So I tried to delete the
  Songbook i wnated to rename but the same exception - the actual exception -
  occured.

   --- Exception Traceback --- 
  Traceback (most recent call last): 
File "openlp\plugins\songs\forms\songmaintenanceform.py", line 493, in
  on_delete_book_button_clicked 
File "openlp\plugins\songs\forms\songmaintenanceform.py", line 110, in
  _delete_item 
  AttributeError: 'Book' object has no attribute 'songs' 

  --- System information --- 
  Plattform: Windows-10-10.0.10586-SP0 

  --- Library Versions --- 
  Python: 3.4.4 
  Qt5: 5.5.1 
  PyQt5: 5.5.1 
  QtWebkit: 538.1 
  SQLAlchemy: 1.0.13 
  SQLAlchemy Migrate: - 
  BeautifulSoup: 4.4.1 
  lxml: 3.4.4 
  Chardet: 2.3.0 
  PyEnchant: 1.6.6 
  Mako: 1.0.3 
  pyICU: 1.9.2 
  pyUNO bridge: - 
  VLC: -

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1600510/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1832942] Re: version 2880 advanced setting alignment

2019-08-07 Thread Phill
** Changed in: openlp
   Status: In Progress => Fix Committed

** Changed in: openlp
Milestone: None => 2.9.1

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1832942

Title:
  version 2880 advanced setting alignment

Status in OpenLP:
  Fix Committed

Bug description:
  Windows 10 32 bit
  Trunk Version 2880
  startup command python run_openlp.py

  The checkbox for hiding the mouse is not aligned with the left of the
  UI boxlooks to be aligned with the dropdown menu above it.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1832942/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1673113] Re: "Save & Preview" Button in Song Editor behaves in a strange way

2019-08-07 Thread Phill
** Changed in: openlp
   Status: In Progress => Fix Committed

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1673113

Title:
  "Save & Preview" Button in Song Editor behaves in a strange way

Status in OpenLP:
  Fix Committed

Bug description:
  When you get to the Song Editor by pressing the "edit and reload song
  preview" button in the Preview Section, you get three button to
  process the form "Save & Preview", "Save" and "Cancel".

  My issue is with the first. Upon pressing it apparently nothing happens. The 
editor remains open.
  In fact the "Save" button behaves in the way you would expect the "Save & 
Preview" button behaves. Upon clicking it, the editor closes and the preview is 
refreshed. (Note this does not happen if you press "Save" when accessing the 
Editor from any other place)

  Can I remove the Save & Preview button and all related code?

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1673113/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1799005] Re: Searching for Bible Book of "Job" in Brazilian Portuguese (Jo) returns the wrong book. Returns Joshua.

2019-08-07 Thread Phill
** Changed in: openlp
   Status: In Progress => Fix Committed

** Changed in: openlp
Milestone: None => 2.9.1

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1799005

Title:
  Searching for Bible Book of "Job" in Brazilian Portuguese (Jo) returns
  the wrong book. Returns Joshua.

Status in OpenLP:
  Fix Committed

Bug description:
  In PT-BR, The book of Job is spelled "Jo", when selecting the search
  and searching for Jo 1, OpenLP returns Joshua (Josué 1). This only
  happens on the Fast Search. Does not happen in Advanced search.
  Happens in any bible version tested.

  OpenLP Version: 2.4.6
  Windows 7

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1799005/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


Re: [Openlp-core] [Merge] lp:~johnmfl/openlp/developer_readme into lp:openlp

2019-08-07 Thread Phill
I'm not sure about this. This is the page that will show up on GitLab? Has it 
been discussed in IRC? There seems to be some duplication with the wiki. Will 
this be removed from the wiki?
-- 
https://code.launchpad.net/~johnmfl/openlp/developer_readme/+merge/371011
Your team OpenLP Core is requested to review the proposed merge of 
lp:~johnmfl/openlp/developer_readme into lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~phill-ridout/openlp/fixes-IV into lp:openlp

2019-08-06 Thread Phill
Phill has proposed merging lp:~phill-ridout/openlp/fixes-IV into lp:openlp.

Commit message:
Refactors and fixes

Requested reviews:
  OpenLP Core (openlp-core)
Related bugs:
  Bug #1600510 in OpenLP: "Deleting a songbook throws "song" attribute 
exception"
  https://bugs.launchpad.net/openlp/+bug/1600510
  Bug #1673113 in OpenLP: ""Save & Preview" Button in Song Editor behaves in a 
strange way"
  https://bugs.launchpad.net/openlp/+bug/1673113
  Bug #1799005 in OpenLP: "Searching for Bible Book of "Job" in Brazilian 
Portuguese (Jo) returns the wrong book. Returns Joshua."
  https://bugs.launchpad.net/openlp/+bug/1799005
  Bug #1832942 in OpenLP: "version 2880 advanced setting alignment"
  https://bugs.launchpad.net/openlp/+bug/1832942

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/fixes-IV/+merge/371023

Refactor `singleton` classes to use a `singleton` metaclass
Fixes for a number of reported issues
Tidy ups, and improvements as suggested by pycharm
-- 
Your team OpenLP Core is requested to review the proposed merge of 
lp:~phill-ridout/openlp/fixes-IV into lp:openlp.
=== modified file 'openlp/core/common/__init__.py'
--- openlp/core/common/__init__.py	2019-07-19 18:43:14 +
+++ openlp/core/common/__init__.py	2019-08-06 21:48:11 +
@@ -172,6 +172,21 @@
 Next = 3
 
 
+class Singleton(type):
+"""
+Provide a `Singleton` metaclass https://stackoverflow.com/questions/6760685/creating-a-singleton-in-python
+"""
+_instances = {}
+
+def __call__(cls, *args, **kwargs):
+"""
+Create a new instance if one does not already exist.
+"""
+if cls not in cls._instances:
+cls._instances[cls] = super().__call__(*args, **kwargs)
+return cls._instances[cls]
+
+
 def de_hump(name):
 """
 Change any Camel Case string to python string
@@ -385,7 +400,7 @@
 global IMAGES_FILTER
 if not IMAGES_FILTER:
 log.debug('Generating images filter.')
-formats = list(map(bytes.decode, list(map(bytes, QtGui.QImageReader.supportedImageFormats()
+formats = list(map(bytes.decode, map(bytes, QtGui.QImageReader.supportedImageFormats(
 visible_formats = '(*.{text})'.format(text='; *.'.join(formats))
 actual_formats = '(*.{text})'.format(text=' *.'.join(formats))
 IMAGES_FILTER = '{text} {visible} {actual}'.format(text=translate('OpenLP', 'Image Files'),

=== modified file 'openlp/core/common/actions.py'
--- openlp/core/common/actions.py	2019-04-13 13:00:22 +
+++ openlp/core/common/actions.py	2019-08-06 21:48:11 +
@@ -260,7 +260,7 @@
 return
 # We have to do this to ensure that the loaded shortcut list e. g. STRG+O (German) is converted to CTRL+O,
 # which is only done when we convert the strings in this way (QKeySequencet -> uncode).
-shortcuts = list(map(QtGui.QKeySequence.toString, list(map(QtGui.QKeySequence, shortcuts
+shortcuts = list(map(QtGui.QKeySequence.toString, map(QtGui.QKeySequence, shortcuts)))
 # Check the alternate shortcut first, to avoid problems when the alternate shortcut becomes the primary shortcut
 #  after removing the (initial) primary shortcut due to conflicts.
 if len(shortcuts) == 2:

=== modified file 'openlp/core/common/i18n.py'
--- openlp/core/common/i18n.py	2019-07-03 13:23:23 +
+++ openlp/core/common/i18n.py	2019-08-06 21:48:11 +
@@ -29,7 +29,7 @@
 
 from PyQt5 import QtCore, QtWidgets
 
-from openlp.core.common import is_macosx, is_win
+from openlp.core.common import Singleton, is_macosx, is_win
 from openlp.core.common.applocation import AppLocation
 from openlp.core.common.settings import Settings
 
@@ -327,22 +327,11 @@
 return LanguageManager.__qm_list__
 
 
-class UiStrings(object):
+class UiStrings(metaclass=Singleton):
 """
 Provide standard strings for objects to use.
 """
-__instance__ = None
-
-def __new__(cls):
-"""
-Override the default object creation method to return a single instance.
-"""
-if not cls.__instance__:
-cls.__instance__ = super().__new__(cls)
-cls.__instance__.load()
-return cls.__instance__
-
-def load(self):
+def __init__(self):
 """
 These strings should need a good reason to be retranslated elsewhere.
 Should some/more/less of these have an  attached?
@@ -436,6 +425,7 @@
 self.ResetLiveBG = translate('OpenLP.Ui', 'Reset live background.')
 self.RequiredShowInFooter = translate('OpenLP.Ui', 'Required, this will be displayed in footer.')
 self.Seconds = translate('OpenLP.Ui', 's', 'The abbreviated unit for seconds')
+self.SaveAndClose = tra

Re: [Openlp-core] [Merge] lp:~trb143/openlp/alpha_fixes into lp:openlp

2019-08-04 Thread Phill
Review: Approve


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

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


Re: [Openlp-core] [Merge] lp:~john+ubuntu-g/openlp/singingthefaith into lp:openlp

2019-08-04 Thread Phill
Just a few more inline comments.

Diff comments:

> === modified file 'openlp/plugins/songs/lib/importer.py'
> --- openlp/plugins/songs/lib/importer.py  2019-04-13 13:00:22 +
> +++ openlp/plugins/songs/lib/importer.py  2019-07-28 08:47:32 +
> @@ -343,6 +345,15 @@
>  'filter': '{text} (*.pro4 *.pro5 
> *.pro6)'.format(text=translate('SongsPlugin.ImportWizardForm',
>  
> 'ProPresenter Song Files'))
>  },
> +SingingTheFaith: {
> +'class': SingingTheFaithImport,
> +'name': 'SingingTheFaith',
> +'prefix': 'singingTheFaith',
> +'filter': '%s (*.txt)' % 
> translate('SongsPlugin.ImportWizardForm', 'Singing The Faith Exported Files'),

use .format here please

> +'descriptionText': translate('SongsPlugin.ImportWizardForm',
> + 'First use Singing The Faith 
> Electonic edition to export '
> + 'the song(s) in Text format.')
> +},
>  SongBeamer: {
>  'class': SongBeamerImport,
>  'name': 'SongBeamer',
> 
> === added file 'openlp/plugins/songs/lib/importers/singingthefaith.py'
> --- openlp/plugins/songs/lib/importers/singingthefaith.py 1970-01-01 
> 00:00:00 +
> +++ openlp/plugins/songs/lib/importers/singingthefaith.py 2019-07-28 
> 08:47:32 +
> @@ -0,0 +1,409 @@
> +# -*- coding: utf-8 -*-
> +# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 
> softtabstop=4
> +
> +###
> +# OpenLP - Open Source Lyrics Projection 
>  #
> +# 
> --- #
> +# Copyright (c) 2008-2019 OpenLP Developers  
>  #
> +# 
> --- #
> +# 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 3 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 
>  #
> +###
> +"""
> +The :mod:`singingthefaith` module provides the functionality for importing 
> songs which are
> +exported from Singing The Faith - an Authorised songbook for the Methodist 
> Church of
> +Great Britain."""
> +
> +import logging
> +import re
> +from pathlib import Path
> +
> +from openlp.core.common.i18n import translate
> +from openlp.plugins.songs.lib.importers.songimport import SongImport
> +
> +log = logging.getLogger(__name__)
> +
> +
> +class SingingTheFaithImport(SongImport):
> +"""
> +Import songs exported from SingingTheFaith
> +"""
> +
> +def __init__(self, manager, **kwargs):
> +"""
> +Initialise the class.
> +"""
> +super(SingingTheFaithImport, self).__init__(manager, **kwargs)
> +self.hints_available = False
> +self.checks_needed = True
> +self.hint_line = {}
> +self.hint_file_version = '0'
> +self.hint_verse_order = ''
> +self.hint_song_title = ''
> +self.hint_comments = ''
> +self.hint_ccli = ''
> +self.hint_ignore_indent = False
> +
> +def do_import(self):
> +"""
> +Receive a single file or a list of files to import.
> +"""
> +if not isinstance(self.import_source, list):
> +return
> +self.import_wizard.progress_bar.setMaximum(len(self.import_source))
> +for file_path in self.import_source:
> +if self.stop_import_flag:
> +return
> +if isinstance(file_path, str):
> +song_file = open(file_path, 'rt', encoding='cp1251')

is *should* be a path object by here. Were you having issues where it wasn't?

> +self.do_import_file(song_file)
> +song_file.close()
> +else:
> +with file_path.open('rt', encoding='cp1251') 

Re: [Openlp-core] [Merge] lp:~trb143/openlp/alpha_fixes into lp:openlp

2019-08-04 Thread Phill
One more, sorry I didn't mention it earlier

Diff comments:

> === modified file 'openlp/core/common/settings.py'
> --- openlp/core/common/settings.py2019-06-21 20:53:42 +
> +++ openlp/core/common/settings.py2019-08-04 14:06:37 +
> @@ -90,12 +90,13 @@
>  number: {
>  'number': number,
>  geometry_key: {
> -'x': x_position,
> -'y': y_position,
> -'height': height,
> -'width': width
> +'x': int(x_position),
> +'y': int(y_position),
> +'height': int(height),
> +'width': int(width)
>  },
> -'is_display': is_display_screen
> +'is_display': is_display_screen,
> +'is_primary': number

Sorry, I'm failing to understand this line. `is_primary` would suggest Boolean. 
Looking at other uses in OpenLP this would suggest that is the case.

>  }
>  }
>  


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

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


Re: [Openlp-core] [Merge] lp:~trb143/openlp/alpha_fixes into lp:openlp

2019-08-04 Thread Phill
Review: Needs Fixing

See inlines

Diff comments:

> 
> === modified file 'openlp/core/ui/mainwindow.py'
> --- openlp/core/ui/mainwindow.py  2019-07-01 22:36:14 +
> +++ openlp/core/ui/mainwindow.py  2019-08-04 08:10:26 +
> @@ -635,7 +635,8 @@
>  # if self.live_controller.display.isVisible():
>  # self.live_controller.display.setFocus()
>  self.activateWindow()
> -if self.application.args:
> +# We will always have 1 but more need to be processed

are you sure about this? Cause it looks like we're removing the application 
name 
https://bazaar.launchpad.net/~openlp-core/openlp/trunk/view/head:/openlp/core/app.py#L96

> +if self.application.args and len(self.application.args) > 1:
>  self.open_cmd_line_files(self.application.args)
>  elif Settings().value(self.general_settings_section + '/auto open'):
>  self.service_manager_contents.load_last_file()
> 
> === modified file 'openlp/core/ui/servicemanager.py'
> --- openlp/core/ui/servicemanager.py  2019-06-11 18:40:20 +
> +++ openlp/core/ui/servicemanager.py  2019-08-04 08:10:26 +
> @@ -828,7 +829,7 @@
>  self.auto_start_action.setIcon(UiIcons().inactive)
>  
> self.auto_start_action.setText(translate('OpenLP.ServiceManager', ' 
> Start - inactive'))
>  if service_item['service_item'].is_text():
> -for plugin in self.plugin_manager.plugins:
> +for plugin in  State().list_plugins():

extra space between "in  State()"

>  if plugin.name == 'custom' and plugin.status == 
> PluginStatus.Active:
>  self.create_custom_action.setVisible(True)
>  break
> 
> === modified file 'openlp/plugins/songs/forms/editsongform.py'
> --- openlp/plugins/songs/forms/editsongform.py2019-05-22 06:47:00 
> +
> +++ openlp/plugins/songs/forms/editsongform.py2019-08-04 08:10:26 
> +
> @@ -416,7 +417,7 @@
>  Load the media files into a combobox.
>  """
>  self.from_media_button.setVisible(False)
> -for plugin in self.plugin_manager.plugins:
> +for plugin in  State().list_plugins():

extra space here too "in  State()"

>  if plugin.name == 'media' and plugin.status == 
> PluginStatus.Active:
>  self.from_media_button.setVisible(True)
>  
> self.media_form.populate_files(plugin.media_item.get_list(MediaType.Audio))


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

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1320631] Re: Need to run DB Migrations on example data

2019-08-04 Thread Phill
** Changed in: openlp/ftw-data
   Status: New => Fix Released

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1320631

Title:
  Need to run DB Migrations on example data

Status in OpenLP:
  Invalid
Status in OpenLP ftw-data series:
  Fix Released

Bug description:
  Since there have been some changes on the database structure, we need
  to update the example data also.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1320631/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1694713] Re: FRW themes are xml based

2019-08-04 Thread Phill
** Changed in: openlp
   Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1694713

Title:
  FRW themes are xml based

Status in OpenLP:
  Fix Released

Bug description:
  The FRW themes are xml based. These should be changed over to the json
  format.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1694713/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1391015] Re: Add song topics with CCLI USR file import

2019-08-03 Thread Phill
It appears this has been long supported. Tested with trunk and imports
fine.

** Changed in: openlp
   Status: Confirmed => Fix Released

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1391015

Title:
  Add song topics with CCLI USR file import

Status in OpenLP:
  Fix Released

Bug description:
  I noticed that .usr files from SongSelect contain song topics. (The
  text files do not however).

  Could the SongSelect import be expanded to add this field as well?

  I'm using OpenLP beta 2.1.1. build 2455 on Mac OS X 10.10 Yosemite.

  For the record, here's a sample SongSelect .usr file: (I'll leave out
  the lyrics for fear of copyright infringement)

  [File]
  Type=SongSelect Import File
  Version=3.0
  [S A6016351]
  Title=10,000 Reasons (Bless The Lord)
  Author=Jonas Myrin | Matt Redman
  Copyright=2011 Said And Done Music | sixsteps Music | Thankyou Music | 
worshiptogether.com songs | SHOUT! Music Publishing (Admin. by Crossroad 
Distributors Pty. Ltd.) | (Admin. by Crossroad Distributors Pty. Ltd.) | 
(Admin. by Crossroad Distributors Pty. Ltd.) | (Admin. by Crossroad 
Distributors Pty. Ltd.) | 
  Admin=SHOUT! Music Publishing/tCrossroad Distributors Pty. Ltd.
  Themes=Adoration/tBlessing/tChristian Life/tPraise
  Keys=G
  Fields=Verse 1/tVerse 2/tChorus 1/tVerse 3/tMisc 1
  Words=*

  
  Best regards,

  Aaron

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1391015/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1827792] Re: Bible Import Crashes OpenLP

2019-08-03 Thread Phill
This error is caused because we assume that the book name is the same as
that used in the url.

OpenLP gets the book name here:
https://bazaar.launchpad.net/~openlp-core/openlp/trunk/view/head:/openlp/plugins/bibles/lib/importers/http.py#L521
reading the content in the h4 tag, but in the case of the Chinese bible the 
book name does not match url component. Instead we should be getting that from 
anchor href tag:


https://www.biblestudytools.com/cuv/chuangshiji/;>
創世記


Unfortunately its not that quite simple as the http importers currently
make no provision for the url component being different to the book
name, and there's no column in the db to store it.

** Changed in: openlp
   Status: New => Confirmed

** Changed in: openlp
   Importance: Undecided => Medium

** Summary changed:

- Bible Import Crashes OpenLP
+ Crosswalk importer uses different urls to book names

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1827792

Title:
  Crosswalk importer uses different urls to book names

Status in OpenLP:
  Confirmed

Bug description:
  OpenLP crash with the following error when using Crosswalk -> Chinese
  Union Version

  
  Traceback (most recent call last):
File "openlp\core\ui\wizard.py", line 216, in on_current_id_changed
File "openlp\plugins\bibles\forms\bibleimportform.py", line 632, in 
perform_wizard
File "openlp\plugins\bibles\lib\http.py", line 641, in do_import
File "openlp\plugins\bibles\lib\db.py", line 312, in get_book_ref_id_by_name
File "openlp\plugins\bibles\lib\db.py", line 878, in get_book_reference_id
File "openlp\plugins\bibles\lib\db.py", line 858, in run_sql
File "openlp\plugins\bibles\lib\db.py", line 839, in get_cursor
  sqlite3.OperationalError: unable to open database file

  Operating System: Windows 10 (32-bit)
  OpenLP version 2.4.6

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1827792/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1701879] Re: Import from OpenLP xml sometimes skips "-" inside text (non english text)

2019-08-01 Thread Phill
** Changed in: openlp
   Status: New => Incomplete

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1701879

Title:
  Import from OpenLP xml sometimes skips "-" inside text (non english
  text)

Status in OpenLP:
  Incomplete

Bug description:
  OpenLP on windows (latest 2 versions) on import from OpenLP xml
  format, sometimes skips dashes (-) inside verses.

  Example:

  xml: ne-a
  Imported displays: nea

  We comfirmed that the xml file contains the dash.
  If edited in OpenLP and exported to xml it now shows: ne--a.

  We compared with Beyond Compare and looks like those are two different
  characters.

  One is skiped and one is parsed and imported.

  As this is UTF8 it looks like the importer only accepts one character
  code for dash.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1701879/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1817433] Re: fonts separated with white-spaces are not supported

2019-08-01 Thread Phill
Hi Maarts,

Which version of OpenLP is this and which file?

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1817433

Title:
  fonts separated with white-spaces are not supported

Status in OpenLP:
  New

Bug description:
  Hi,

  fonts separated with white-spaces are not supported under Linux. The
  css font-family description says:

  "Note: If a font name contains white-space, it must be quoted. Single
  quotes must be used when using the "style" attribute in HTML."

  In build_footer_css and build_lyrics_format_css is these information
  missing...

  Here a short fix for both:

  ...
  lyrics = '%s word-wrap: break-word; ' \
   'text-align: %s; vertical-align: %s; font-family: %s; ' \
   'font-size: %spt; color: %s; line-height: %d%%; margin: 0;' \
   'padding: 0; padding-bottom: %s; padding-left: %spx; width: 
%spx; height: %spx; ' % \
  (justify, align, valign, "\"" + theme_data.font_main_name + "\"", 
theme_data.font_main_size,
   theme_data.font_main_color, 100 + 
int(theme_data.font_main_line_adjustment), padding_bottom,
  ...
  lyrics_html = style % (item.footer.x(), bottom, item.footer.width(),
 "\"" + theme.font_footer_name + "\"", 
theme.font_footer_size,
  ...

  I'm a python noob, sorry...

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1817433/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1796506] Re: Making listening network connections opt-in

2019-08-01 Thread Phill
** Changed in: openlp
   Importance: Undecided => Wishlist

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1796506

Title:
  Making listening network connections opt-in

Status in OpenLP:
  Confirmed

Bug description:
  On trunk OpenLP establishes listening network sockets for the
  projector component, the web remote control, and the websockets API. I
  cannot disable any of them. In version 2.4.6 there are no listening
  connections if you do not explicitly enable the remote control.

  The user should be able to disable the connections and they should be
  disabled by default (opt-in). If you do not want to disable by
  default, the default listening IP should at least not be the world
  (0.0.0.0) but localhost (127.0.0.1).

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1796506/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1823811] Re: The presentation xxxx.odp is incomplete, please reload

2019-08-01 Thread Phill
Hi Derek,
Our forums are our primary place for support. If you are still having this 
issue please submit a debug log.

Follow these instructions and try to recreate the issue.
http://manual.openlp.org/troubleshooting.html#linux-freebsd

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1823811

Title:
  The presentation .odp is incomplete, please reload

Status in OpenLP:
  New

Bug description:
  I am using Linux Mint 19. My version of openlp is 2.4.6 and I have a
  full installation of Libre Office 6.2

  I am unable to add either odp or ppt(x) presentations to the service
  order, getting the error

  The presentation .odp is incomplete, please reload

  I can add the presentation to the available presentations but any
  attempt to add it to the service results in the error.

  The presentations which I try all load perfectly in Libre Office.
  Ideas?

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1823811/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1827792] Re: Bible Import Crashes OpenLP

2019-08-01 Thread Phill
Simotsa, have you resolved this issue? if not can you try deleting the
bible database file.

Open the data folder ( http://manual.openlp.org/faq.html#id4 ) open
bibles and delete the selected bible and try again.

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1827792

Title:
  Bible Import Crashes OpenLP

Status in OpenLP:
  New

Bug description:
  OpenLP crash with the following error when using Crosswalk -> Chinese
  Union Version

  
  Traceback (most recent call last):
File "openlp\core\ui\wizard.py", line 216, in on_current_id_changed
File "openlp\plugins\bibles\forms\bibleimportform.py", line 632, in 
perform_wizard
File "openlp\plugins\bibles\lib\http.py", line 641, in do_import
File "openlp\plugins\bibles\lib\db.py", line 312, in get_book_ref_id_by_name
File "openlp\plugins\bibles\lib\db.py", line 878, in get_book_reference_id
File "openlp\plugins\bibles\lib\db.py", line 858, in run_sql
File "openlp\plugins\bibles\lib\db.py", line 839, in get_cursor
  sqlite3.OperationalError: unable to open database file

  Operating System: Windows 10 (32-bit)
  OpenLP version 2.4.6

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1827792/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1832129] Re: Import from PowerPoint fails due to non xml characters

2019-08-01 Thread Phill
*** This bug is a duplicate of bug 1698021 ***
https://bugs.launchpad.net/bugs/1698021

99% Sure this is fixed in trunk...

** This bug has been marked a duplicate of bug 1698021
   Copying and Pasting from Word inserts invalid characters

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1832129

Title:
  Import from PowerPoint fails due to non xml characters

Status in OpenLP:
  New

Bug description:
  Windows 10
  OpenLP 2.4.6

  reported in the forum https://forums.openlp.org/discussion/4322/error-
  message-while-adding-songs#latest

  This is NOT a 100% failure.  Some presentations will import to songs without 
error and others fail.
  Please verify on OpenLP 3.0

  Bug reports in the forum

  From Forum:
  I've noticed that it 70% of the time gives an error when I try to copy and 
paste lyrics onto the software, forcing me to manually type in the lyrics 
(which to be honest can be such a hassle).

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1832129/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1838558] Re: Feature Request presentation thumbnail view

2019-08-01 Thread Phill
** Changed in: openlp
   Importance: Undecided => Wishlist

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1838558

Title:
  Feature Request presentation thumbnail view

Status in OpenLP:
  New

Bug description:
  A user in the forum requested a "slide sorter" view of presentations
  The idea appears to be similar to the slide sorter view in PowerPoint

  https://forums.openlp.org/discussion/4408/user-interface-
  presentations-thumbnails-arrangement#latest

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1838558/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1674130] Re: QAction object does not support indexing

2019-08-01 Thread Phill
** Branch linked: lp:~raoul-snyman/openlp/webengine-migrate

** Changed in: openlp
   Status: New => Fix Committed

** Changed in: openlp
 Assignee: (unassigned) => Raoul Snyman (raoul-snyman)

** Changed in: openlp
Milestone: None => 2.9.1

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1674130

Title:
  QAction object does not support indexing

Status in OpenLP:
  Fix Committed

Bug description:
  Reported via the support system:
  https://support.openlp.org/scp/tickets.php?id=4134

  Traceback (most recent call last):
File "openlp/core/ui/mainwindow.py", line 1107, in closeEvent
File "openlp/core/ui/mainwindow.py", line 1129, in clean_up
File "openlp/core/lib/pluginmanager.py", line 189, in finalise_plugins
File "/Volumes/OpenLP 
2.4.5/OpenLP.app/Contents/MacOS/plugins/songs/songsplugin.py", line 333, in 
finalise
  action_list.remove_action(self.song_import_item, UiStrings().Import)
File "openlp/core/utils/actions.py", line 300, in remove_action
File "openlp/core/utils/actions.py", line 117, in remove
  TypeError: 'QAction' object does not support indexing

  "I saved the service file (going to file - save as) and shut the
  programme down, but when I went to open it again it would not open and
  kept coming up with the bug error. I had to restart my computer to
  reopen the file and I've since been able to open it again with no
  problems."

  This was on macOS.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1674130/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1674130] Re: QAction object does not support indexing

2019-07-31 Thread Phill
There are quite a few instances of this bug in the support system all
appear to be on MacOS

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1674130

Title:
  QAction object does not support indexing

Status in OpenLP:
  New

Bug description:
  Reported via the support system:
  https://support.openlp.org/scp/tickets.php?id=4134

  Traceback (most recent call last):
File "openlp/core/ui/mainwindow.py", line 1107, in closeEvent
File "openlp/core/ui/mainwindow.py", line 1129, in clean_up
File "openlp/core/lib/pluginmanager.py", line 189, in finalise_plugins
File "/Volumes/OpenLP 
2.4.5/OpenLP.app/Contents/MacOS/plugins/songs/songsplugin.py", line 333, in 
finalise
  action_list.remove_action(self.song_import_item, UiStrings().Import)
File "openlp/core/utils/actions.py", line 300, in remove_action
File "openlp/core/utils/actions.py", line 117, in remove
  TypeError: 'QAction' object does not support indexing

  "I saved the service file (going to file - save as) and shut the
  programme down, but when I went to open it again it would not open and
  kept coming up with the bug error. I had to restart my computer to
  reopen the file and I've since been able to open it again with no
  problems."

  This was on macOS.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1674130/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1673113] Re: "Save & Preview" Button in Song Editor behaves in a strange way

2019-07-31 Thread Phill
** Changed in: openlp
   Status: Confirmed => In Progress

** Changed in: openlp
 Assignee: (unassigned) => Phill (phill-ridout)

** Changed in: openlp
Milestone: None => 2.9.1

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1673113

Title:
  "Save & Preview" Button in Song Editor behaves in a strange way

Status in OpenLP:
  In Progress

Bug description:
  When you get to the Song Editor by pressing the "edit and reload song
  preview" button in the Preview Section, you get three button to
  process the form "Save & Preview", "Save" and "Cancel".

  My issue is with the first. Upon pressing it apparently nothing happens. The 
editor remains open.
  In fact the "Save" button behaves in the way you would expect the "Save & 
Preview" button behaves. Upon clicking it, the editor closes and the preview is 
refreshed. (Note this does not happen if you press "Save" when accessing the 
Editor from any other place)

  Can I remove the Save & Preview button and all related code?

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1673113/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1673108] Re: Create New Custom Slide button is misleading

2019-07-31 Thread Phill
I cannot seem to find this menu item. Is it still there in 3.0?

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1673108

Title:
  Create New Custom Slide button is misleading

Status in OpenLP:
  Confirmed

Bug description:
  In the context menu of items in the Service Manager there is an entry
  labeled "Create New Custom Slide".

  Upon pressing it you get no visual feedback (unless you happen to have
  the Custom slides open and see that something is added there)

  The other issue I have with it, is that the label isn't very clear. I
  was wondering why I could create a new custom slide from the context
  menu of a song. It took me some time to figure out what it actually
  does. Since the space is limited I'm not sure what the best approach
  to improve this would be...

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1673108/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1652004] Re: OpenLP Importer 2 does not support author types

2019-07-30 Thread Phill
** Branch linked: lp:~raoul-snyman/openlp/fix-author-type-2.4

** Branch linked: lp:~raoul-snyman/openlp/fix-author_type

** Changed in: openlp
   Status: New => Fix Committed

** Changed in: openlp
 Assignee: (unassigned) => Raoul Snyman (raoul-snyman)

** Changed in: openlp
Milestone: None => 2.9.1

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1652004

Title:
  OpenLP Importer 2 does not support author types

Status in OpenLP:
  Fix Committed

Bug description:
  All authors will be imported as unspecified authors when imported via
  OpenLP Importer 2.

  2.4.4
  Win 10

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1652004/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1617592] Re: Delete bible confirmation box defaults to yes

2019-07-30 Thread Phill
** Branch linked: lp:~phill-ridout/openlp/bible_media_item_refactors

** Changed in: openlp
   Status: Confirmed => Fix Committed

** Changed in: openlp
 Assignee: (unassigned) => Phill (phill-ridout)

** Changed in: openlp
Milestone: None => 2.9.1

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1617592

Title:
  Delete bible confirmation box defaults to yes

Status in OpenLP:
  Fix Committed

Bug description:
  Trunk r2695
  Click on the red cross on the toolbar of the bibles tab in the media manager.
  A pop up appears to confirm the deletion. The "Yes" button receives by 
default. This should be "no" by default.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1617592/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1492605] Re: Traceback on theme creation at the naming step

2019-07-30 Thread Phill
** Branch linked: lp:~tomasgroth/openlp/fix-theme-thumb

** Changed in: openlp
   Status: Confirmed => Fix Committed

** Changed in: openlp
 Assignee: (unassigned) => Tomas Groth (tomasgroth)

** Changed in: openlp
Milestone: None => 2.9.1

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1492605

Title:
  Traceback on theme creation at the naming step

Status in OpenLP:
  Fix Committed

Bug description:
  I made a new theme using the wizard.

  OpenLP gave me a traceback after moving to the naming stage on theme creation.
  After clicking the traceback away, theme creation continued normally.

  Running portable 2.1.6 on Win 8.1

  Behind the link is log and test theme created.

  
https://drive.google.com/open?id=0B9y8rZiYItltfncxTG9GTlNHUjJLUWpmM245RXNxVzBMQVBGMVJmMENUdnE5NGc4V2FvLXc

  Traceback (most recent call last):
  File "D:\OpenLP_Development\OpenLP_Code\2.1\openlp\core\ui\themeform.py", 
line 167, in resizeEvent
  AttributeError: 'ThemeForm' object has no attribute 'display_aspect_ratio'

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1492605/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1600510] Re: Deleting a songbook throws "song" attribute exception

2019-07-30 Thread Phill
** Changed in: openlp/trunk
   Status: Confirmed => In Progress

** Changed in: openlp/trunk
 Assignee: (unassigned) => Phill (phill-ridout)

** Changed in: openlp/trunk
Milestone: None => 2.9.1

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1600510

Title:
  Deleting a songbook throws "song" attribute exception

Status in OpenLP:
  In Progress
Status in OpenLP trunk series:
  In Progress

Bug description:
  Bug reported via support system:
  https://support.openlp.org/scp/tickets.php?id=3592

  
  **OpenLP Bug Report** 
  Version: {'version': '2.4.2', 'build': None, 'full': '2.4.2'} 

  --- Details of the Exception. ---

  After Importing songs with Songbeamer importer he added two Song books with
  nearly the same title. So I wanted to rename one to the same title of the
  second to merge them but an exception occured. So I tried to delete the
  Songbook i wnated to rename but the same exception - the actual exception -
  occured.

   --- Exception Traceback --- 
  Traceback (most recent call last): 
File "openlp\plugins\songs\forms\songmaintenanceform.py", line 493, in
  on_delete_book_button_clicked 
File "openlp\plugins\songs\forms\songmaintenanceform.py", line 110, in
  _delete_item 
  AttributeError: 'Book' object has no attribute 'songs' 

  --- System information --- 
  Plattform: Windows-10-10.0.10586-SP0 

  --- Library Versions --- 
  Python: 3.4.4 
  Qt5: 5.5.1 
  PyQt5: 5.5.1 
  QtWebkit: 538.1 
  SQLAlchemy: 1.0.13 
  SQLAlchemy Migrate: - 
  BeautifulSoup: 4.4.1 
  lxml: 3.4.4 
  Chardet: 2.3.0 
  PyEnchant: 1.6.6 
  Mako: 1.0.3 
  pyICU: 1.9.2 
  pyUNO bridge: - 
  VLC: -

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1600510/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1799005] Re: Searching for Bible Book of "Job" in Brazilian Portuguese (Jo) returns the wrong book. Returns Joshua.

2019-07-29 Thread Phill
** Changed in: openlp
   Status: New => In Progress

** Changed in: openlp
   Importance: Undecided => Medium

** Changed in: openlp
 Assignee: (unassigned) => Phill (phill-ridout)

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1799005

Title:
  Searching for Bible Book of "Job" in Brazilian Portuguese (Jo) returns
  the wrong book. Returns Joshua.

Status in OpenLP:
  In Progress

Bug description:
  In PT-BR, The book of Job is spelled "Jo", when selecting the search
  and searching for Jo 1, OpenLP returns Joshua (Josué 1). This only
  happens on the Fast Search. Does not happen in Advanced search.
  Happens in any bible version tested.

  OpenLP Version: 2.4.6
  Windows 7

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1799005/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1012628] Re: Set data path via command line switch

2019-07-28 Thread Phill
** Branch linked: lp:~tomasgroth/openlp/portable-path

** Changed in: openlp
 Assignee: (unassigned) => Tomas Groth (tomasgroth)

** Changed in: openlp
Milestone: None => 2.9.1

** Changed in: openlp
   Status: Confirmed => Fix Committed

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1012628

Title:
  Set data path via command line switch

Status in OpenLP:
  Fix Committed

Bug description:
  Data path can now be changed via GUI. It could be useful if the data
  path could be set via a command line switch. This would allow
  different shortcuts to run openlp with different data sets. Could also
  be useful for testing environments.

  e.g.
  $ openlp -dp "D:\worship\openlp data"
  $ openlp --data-path "D:\worship\openlp data"

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1012628/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1832942] Re: version 2880 advanced setting alignment

2019-07-27 Thread Phill
** Changed in: openlp
 Assignee: (unassigned) => Phill (phill-ridout)

** Changed in: openlp
   Importance: Undecided => Low

** Changed in: openlp
   Status: New => In Progress

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1832942

Title:
  version 2880 advanced setting alignment

Status in OpenLP:
  In Progress

Bug description:
  Windows 10 32 bit
  Trunk Version 2880
  startup command python run_openlp.py

  The checkbox for hiding the mouse is not aligned with the left of the
  UI boxlooks to be aligned with the dropdown menu above it.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1832942/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1832954] Re: V2880 images plugin fails on startup

2019-07-27 Thread Phill
Hi Johnathan,

I can't reproduce this issue on trunk 2887.

Do you have a copy of the original database available? and the log file?

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1832954

Title:
  V2880 images plugin fails on startup

Status in OpenLP:
  New

Bug description:
  Windows 10 32 bit
  Trunk Version 2880
  startup command python run_openlp.py

  When The system tried to start up there was a popup error message.
  error message;

  Error
  Unable to initialise the following plugins:Images

  See the log file for more details
 OK

  I found that the sqlite database was NOT being updatedso I deleted
  it.  The next start of the program did not show the error message and
  the Images plugin was shown and functional.

  It appears there is a problem in validating the database.  the
  previous install of OpenLP was 2.4.6

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1832954/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1206096] Re: Themes should maintain a link to the original background file

2019-07-21 Thread Phill
** Changed in: openlp/trunk
 Assignee: Phill (phill-ridout) => (unassigned)

** Changed in: openlp/trunk
   Status: In Progress => New

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1206096

Title:
  Themes should maintain a link to the original background file

Status in OpenLP:
  New
Status in OpenLP trunk series:
  New

Bug description:
  When editing a a theme with a background image the path changes to the
  cached copy of the background image.

  Whilst OpenLP should used the cached image, I would be more "user
  friendly" to maintain the path in the background image line edit to
  the original.

  We should only validate that the image is valid if the lineEdit /
  fileDialog selection has changed

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1206096/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1095742] Re: Portable apps storing drive letter in db

2019-07-21 Thread Phill
** Changed in: openlp/trunk
   Status: In Progress => Fix Committed

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1095742

Title:
  Portable apps storing drive letter in db

Status in OpenLP:
  Fix Committed
Status in OpenLP 2.0 series:
  Won't Fix
Status in OpenLP trunk series:
  Fix Committed

Bug description:
  From Bob Donkin
  
http://forums.openlp.org/discussion/2014/portable-app-assigning-drive-letter-in-sqlite-database

  I am using the portable app version of openlp.  I have linked many songs
  to audio files(mp3). 

  The problem I have is the sqlite database has 
  given an absolute address for the audio file eg:  
F:\PortableApps\OpenLPPortable\Data\songs\audio\205\09-I cannot tell.mp3 .

  However
  when I plug in the USB stick at Church the computer assigns it the 
  drive letter E: so none of the audio works.  Would it be possible on the
  next release to use a relative address eg: songs\audio\205\09-I cannot 
  tell.mp3

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1095742/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1608024] Re: DVD Media Time Stamps Not Working

2019-07-21 Thread Phill
** Changed in: openlp
 Assignee: Phill (phill-ridout) => (unassigned)

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1608024

Title:
  DVD Media Time Stamps Not Working

Status in OpenLP:
  New

Bug description:
  Windows 7 Professional and Windows 10 Professional
  OpenLP 2.4.2
  VLC media player 2.2.4

  
  Click the DVD icon to add a DVD video then start playing the video the timer 
does not show the time of the video.  The endpoint is not set when video is 
loaded and clicking the set start time or end time do not work as the video 
main timer does not work.

  Start times and end times can be set manually and work fine but
  without a preview video timer its hard to know what times to set.

  Note that tested with OpenLP 2.2 and it works fine on these systems
  and will even carry the video time over and play properly after
  upgrading to 2.4.2 but no new video clips added in 2.4.2 will work due
  to above issue.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1608024/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1694713] Re: FRW themes are xml based

2019-07-21 Thread Phill
** Branch linked: lp:~phill-ridout/openlp/ftw-update

** Changed in: openlp
   Status: New => In Progress

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1694713

Title:
  FRW themes are xml based

Status in OpenLP:
  In Progress

Bug description:
  The FRW themes are xml based. These should be changed over to the json
  format.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1694713/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1320631] Re: Need to run DB Migrations on example data

2019-07-21 Thread Phill
** Branch linked: lp:~phill-ridout/openlp/ftw-update

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1320631

Title:
  Need to run DB Migrations on example data

Status in OpenLP:
  Invalid
Status in OpenLP ftw-data series:
  New

Bug description:
  Since there have been some changes on the database structure, we need
  to update the example data also.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1320631/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~phill-ridout/openlp/ftw-update into lp:openlp/ftw-data

2019-07-20 Thread Phill
Phill has proposed merging lp:~phill-ridout/openlp/ftw-update into 
lp:openlp/ftw-data.

Commit message:
Update all resources to the latest versions. Put them in folders identifying 
their version number, so as to avoid overwriting data that previous versions of 
OpenLP use.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/ftw-update/+merge/370402
-- 
Your team OpenLP Core is requested to review the proposed merge of 
lp:~phill-ridout/openlp/ftw-update into lp:openlp/ftw-data.
=== added directory 'bibles/v2'
=== added file 'bibles/v2/ASV.sqlite'
Binary files bibles/v2/ASV.sqlite	1970-01-01 00:00:00 + and bibles/v2/ASV.sqlite	2019-07-20 21:21:13 + differ
=== added file 'bibles/v2/Afrikaans_Bybel.sqlite'
Binary files bibles/v2/Afrikaans_Bybel.sqlite	1970-01-01 00:00:00 + and bibles/v2/Afrikaans_Bybel.sqlite	2019-07-20 21:21:13 + differ
=== added file 'bibles/v2/Ang_Dating_Biblia.sqlite'
Binary files bibles/v2/Ang_Dating_Biblia.sqlite	1970-01-01 00:00:00 + and bibles/v2/Ang_Dating_Biblia.sqlite	2019-07-20 21:21:13 + differ
=== added file 'bibles/v2/Bible_Preklad_21_stoleti.sqlite'
Binary files bibles/v2/Bible_Preklad_21_stoleti.sqlite	1970-01-01 00:00:00 + and bibles/v2/Bible_Preklad_21_stoleti.sqlite	2019-07-20 21:21:13 + differ
=== added file 'bibles/v2/Cesky_studijni_preklad.sqlite'
Binary files bibles/v2/Cesky_studijni_preklad.sqlite	1970-01-01 00:00:00 + and bibles/v2/Cesky_studijni_preklad.sqlite	2019-07-20 21:21:13 + differ
=== added file 'bibles/v2/Elberfelder_1905.sqlite'
Binary files bibles/v2/Elberfelder_1905.sqlite	1970-01-01 00:00:00 + and bibles/v2/Elberfelder_1905.sqlite	2019-07-20 21:21:13 + differ
=== added file 'bibles/v2/Esperanto_Bible.sqlite'
Binary files bibles/v2/Esperanto_Bible.sqlite	1970-01-01 00:00:00 + and bibles/v2/Esperanto_Bible.sqlite	2019-07-20 21:21:13 + differ
=== added file 'bibles/v2/FI_33_38_OpenLP.sqlite'
Binary files bibles/v2/FI_33_38_OpenLP.sqlite	1970-01-01 00:00:00 + and bibles/v2/FI_33_38_OpenLP.sqlite	2019-07-20 21:21:13 + differ
=== added file 'bibles/v2/FI_92_OpenLP.sqlite'
Binary files bibles/v2/FI_92_OpenLP.sqlite	1970-01-01 00:00:00 + and bibles/v2/FI_92_OpenLP.sqlite	2019-07-20 21:21:13 + differ
=== added file 'bibles/v2/FI_Raamattu_Kansalle_OpenLP.sqlite'
Binary files bibles/v2/FI_Raamattu_Kansalle_OpenLP.sqlite	1970-01-01 00:00:00 + and bibles/v2/FI_Raamattu_Kansalle_OpenLP.sqlite	2019-07-20 21:21:13 + differ
=== added file 'bibles/v2/Jo_o_Ferreira_de_Almeida_Atualizada.sqlite'
Binary files bibles/v2/Jo_o_Ferreira_de_Almeida_Atualizada.sqlite	1970-01-01 00:00:00 + and bibles/v2/Jo_o_Ferreira_de_Almeida_Atualizada.sqlite	2019-07-20 21:21:13 + differ
=== added file 'bibles/v2/KJV.sqlite'
Binary files bibles/v2/KJV.sqlite	1970-01-01 00:00:00 + and bibles/v2/KJV.sqlite	2019-07-20 21:21:13 + differ
=== added file 'bibles/v2/Ketab-EL-Hayat.sqlite'
Binary files bibles/v2/Ketab-EL-Hayat.sqlite	1970-01-01 00:00:00 + and bibles/v2/Ketab-EL-Hayat.sqlite	2019-07-20 21:21:13 + differ
=== added file 'bibles/v2/Kralicka_Bible_1613.sqlite'
Binary files bibles/v2/Kralicka_Bible_1613.sqlite	1970-01-01 00:00:00 + and bibles/v2/Kralicka_Bible_1613.sqlite	2019-07-20 21:21:13 + differ
=== added file 'bibles/v2/Las_Sagradas_Escrituras.sqlite'
Binary files bibles/v2/Las_Sagradas_Escrituras.sqlite	1970-01-01 00:00:00 + and bibles/v2/Las_Sagradas_Escrituras.sqlite	2019-07-20 21:21:13 + differ
=== added file 'bibles/v2/Louis_Segon_Bible.sqlite'
Binary files bibles/v2/Louis_Segon_Bible.sqlite	1970-01-01 00:00:00 + and bibles/v2/Louis_Segon_Bible.sqlite	2019-07-20 21:21:13 + differ
=== added file 'bibles/v2/Luther_1545.sqlite'
Binary files bibles/v2/Luther_1545.sqlite	1970-01-01 00:00:00 + and bibles/v2/Luther_1545.sqlite	2019-07-20 21:21:13 + differ
=== added file 'bibles/v2/Luther_1912.sqlite'
Binary files bibles/v2/Luther_1912.sqlite	1970-01-01 00:00:00 + and bibles/v2/Luther_1912.sqlite	2019-07-20 21:21:13 + differ
=== added file 'bibles/v2/Magyar_jford_t_s.sqlite'
Binary files bibles/v2/Magyar_jford_t_s.sqlite	1970-01-01 00:00:00 + and bibles/v2/Magyar_jford_t_s.sqlite	2019-07-20 21:21:13 + differ
=== added file 'bibles/v2/Menge_Bibel.sqlite'
Binary files bibles/v2/Menge_Bibel.sqlite	1970-01-01 00:00:00 + and bibles/v2/Menge_Bibel.sqlite	2019-07-20 21:21:13 + differ
=== added file 'bibles/v2/Norsk-NB-1930.sqlite'
Binary files bibles/v2/Norsk-NB-1930.sqlite	1970-01-01 00:00:00 + and bibles/v2/Norsk-NB-1930.sqlite	2019-07-20 21:21:13 + differ
=== added file 'bibles/v2/Norsk-SMB-1921.sqlite'
Binary files bibles/v2/Norsk-SMB-1921.sqlite	1970-01-01 00:00:00 + and bibles/v2/Norsk-SMB-1921.sqlite	2019-07-20 21:21:13 + differ
=== added file 'bibles/v2/RST.sqlite'
Binary files bibles/v2/RST.sqlite	1970-01-01 00:00:00 + and bibles/v2

[Openlp-core] [Merge] lp:~phill-ridout/openlp/ftw-update into lp:openlp

2019-07-20 Thread Phill
The proposal to merge lp:~phill-ridout/openlp/ftw-update into lp:openlp has 
been updated.

Status: Needs review => Superseded

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/ftw-update/+merge/370401
-- 
Your team OpenLP Core is requested to review the proposed merge of 
lp:~phill-ridout/openlp/ftw-update into lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~phill-ridout/openlp/ftw-update into lp:openlp

2019-07-20 Thread Phill
Phill has proposed merging lp:~phill-ridout/openlp/ftw-update into lp:openlp.

Commit message:
Update all resources to the latest versions. Put them in folders identifying 
their version number, so as to avoid overwriting data that previous versions of 
OpenLP use.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/ftw-update/+merge/370401
-- 
Your team OpenLP Core is requested to review the proposed merge of 
lp:~phill-ridout/openlp/ftw-update into lp:openlp.
=== added directory 'bibles'
=== added file 'bibles/ASV.sqlite'
Binary files bibles/ASV.sqlite	1970-01-01 00:00:00 + and bibles/ASV.sqlite	2019-07-20 21:18:16 + differ
=== added file 'bibles/Afrikaans_Bybel.sqlite'
Binary files bibles/Afrikaans_Bybel.sqlite	1970-01-01 00:00:00 + and bibles/Afrikaans_Bybel.sqlite	2019-07-20 21:18:16 + differ
=== added file 'bibles/Ang_Dating_Biblia.sqlite'
Binary files bibles/Ang_Dating_Biblia.sqlite	1970-01-01 00:00:00 + and bibles/Ang_Dating_Biblia.sqlite	2019-07-20 21:18:16 + differ
=== added file 'bibles/Bible_Preklad_21_stoleti.sqlite'
Binary files bibles/Bible_Preklad_21_stoleti.sqlite	1970-01-01 00:00:00 + and bibles/Bible_Preklad_21_stoleti.sqlite	2019-07-20 21:18:16 + differ
=== added file 'bibles/Cesky_studijni_preklad.sqlite'
Binary files bibles/Cesky_studijni_preklad.sqlite	1970-01-01 00:00:00 + and bibles/Cesky_studijni_preklad.sqlite	2019-07-20 21:18:16 + differ
=== added file 'bibles/Elberfelder_1905.sqlite'
Binary files bibles/Elberfelder_1905.sqlite	1970-01-01 00:00:00 + and bibles/Elberfelder_1905.sqlite	2019-07-20 21:18:16 + differ
=== added file 'bibles/Esperanto_Bible.sqlite'
Binary files bibles/Esperanto_Bible.sqlite	1970-01-01 00:00:00 + and bibles/Esperanto_Bible.sqlite	2019-07-20 21:18:16 + differ
=== added file 'bibles/FI_33_38_OpenLP.sqlite'
Binary files bibles/FI_33_38_OpenLP.sqlite	1970-01-01 00:00:00 + and bibles/FI_33_38_OpenLP.sqlite	2019-07-20 21:18:16 + differ
=== added file 'bibles/FI_92_OpenLP.sqlite'
Binary files bibles/FI_92_OpenLP.sqlite	1970-01-01 00:00:00 + and bibles/FI_92_OpenLP.sqlite	2019-07-20 21:18:16 + differ
=== added file 'bibles/FI_Raamattu_Kansalle_OpenLP.sqlite'
Binary files bibles/FI_Raamattu_Kansalle_OpenLP.sqlite	1970-01-01 00:00:00 + and bibles/FI_Raamattu_Kansalle_OpenLP.sqlite	2019-07-20 21:18:16 + differ
=== added file 'bibles/Jo_o_Ferreira_de_Almeida_Atualizada.sqlite'
Binary files bibles/Jo_o_Ferreira_de_Almeida_Atualizada.sqlite	1970-01-01 00:00:00 + and bibles/Jo_o_Ferreira_de_Almeida_Atualizada.sqlite	2019-07-20 21:18:16 + differ
=== added file 'bibles/KJV.sqlite'
Binary files bibles/KJV.sqlite	1970-01-01 00:00:00 + and bibles/KJV.sqlite	2019-07-20 21:18:16 + differ
=== added file 'bibles/Ketab-EL-Hayat.sqlite'
Binary files bibles/Ketab-EL-Hayat.sqlite	1970-01-01 00:00:00 + and bibles/Ketab-EL-Hayat.sqlite	2019-07-20 21:18:16 + differ
=== added file 'bibles/Kralicka_Bible_1613.sqlite'
Binary files bibles/Kralicka_Bible_1613.sqlite	1970-01-01 00:00:00 + and bibles/Kralicka_Bible_1613.sqlite	2019-07-20 21:18:16 + differ
=== added file 'bibles/Las_Sagradas_Escrituras.sqlite'
Binary files bibles/Las_Sagradas_Escrituras.sqlite	1970-01-01 00:00:00 + and bibles/Las_Sagradas_Escrituras.sqlite	2019-07-20 21:18:16 + differ
=== added file 'bibles/Louis_Segon_Bible.sqlite'
Binary files bibles/Louis_Segon_Bible.sqlite	1970-01-01 00:00:00 + and bibles/Louis_Segon_Bible.sqlite	2019-07-20 21:18:16 + differ
=== added file 'bibles/Luther_1545.sqlite'
Binary files bibles/Luther_1545.sqlite	1970-01-01 00:00:00 + and bibles/Luther_1545.sqlite	2019-07-20 21:18:16 + differ
=== added file 'bibles/Luther_1912.sqlite'
Binary files bibles/Luther_1912.sqlite	1970-01-01 00:00:00 + and bibles/Luther_1912.sqlite	2019-07-20 21:18:16 + differ
=== added file 'bibles/Magyar_jford_t_s.sqlite'
Binary files bibles/Magyar_jford_t_s.sqlite	1970-01-01 00:00:00 + and bibles/Magyar_jford_t_s.sqlite	2019-07-20 21:18:16 + differ
=== added file 'bibles/Menge_Bibel.sqlite'
Binary files bibles/Menge_Bibel.sqlite	1970-01-01 00:00:00 + and bibles/Menge_Bibel.sqlite	2019-07-20 21:18:16 + differ
=== added file 'bibles/Norsk-NB-1930.sqlite'
Binary files bibles/Norsk-NB-1930.sqlite	1970-01-01 00:00:00 + and bibles/Norsk-NB-1930.sqlite	2019-07-20 21:18:16 + differ
=== added file 'bibles/Norsk-SMB-1921.sqlite'
Binary files bibles/Norsk-SMB-1921.sqlite	1970-01-01 00:00:00 + and bibles/Norsk-SMB-1921.sqlite	2019-07-20 21:18:16 + differ
=== added file 'bibles/RST.sqlite'
Binary files bibles/RST.sqlite	1970-01-01 00:00:00 + and bibles/RST.sqlite	2019-07-20 21:18:16 + differ
=== added file 'bibles/Statenvertaling.sqlite'
Binary files bibles/Statenvertaling.sqlite	1970-01-01 00:00:00 + and bibles/Statenvertaling.sqlite	2019-07-20 21:18:16 + differ
=== added

[Openlp-core] [Bug 1065973] Re: theme list in firstime wizard not sorted alphabetically

2019-07-20 Thread Phill
Just checked, this is the case now

** Changed in: openlp/trunk
   Status: Confirmed => Fix Committed

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1065973

Title:
  theme list in firstime wizard not sorted alphabetically

Status in OpenLP:
  Fix Committed
Status in OpenLP trunk series:
  Fix Committed

Bug description:
  I think the screenshots of themes in firttime wizard should be sorted
  alphabetically.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1065973/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1397604] Re: Typo in sample songs - english

2019-07-20 Thread Phill
Looks like this was fixed before the FTW files were added to launchpad

** Changed in: openlp/ftw-data
   Status: New => Invalid

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1397604

Title:
  Typo in sample songs - english

Status in OpenLP:
  Invalid
Status in OpenLP ftw-data series:
  Invalid

Bug description:
  "And can it be" has been called "And can it bed"

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1397604/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1832993] Re: Issues affecting custom formatting tags

2019-07-20 Thread Phill
** Branch linked: lp:~phill-ridout/openlp/wow_import_fixes

** Changed in: openlp
   Status: New => Fix Committed

** Changed in: openlp
Milestone: None => 2.9.1

** Changed in: openlp
 Assignee: (unassigned) => Phill (phill-ridout)

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1832993

Title:
  Issues affecting custom formatting tags

Status in OpenLP:
  Fix Committed

Bug description:
  Add a custom formatting tag to a song causes some issues:

  1. The closing tags shows on the main display
  2. Other formatting tags do not render correctly when custom tags are used

  When inserting a custom tag by right clicking in the song editor the
  closing tag is inserted but with out the '/'

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1832993/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1746350] Re: Exception importing Words of Worship songs

2019-07-20 Thread Phill
** Changed in: openlp
 Assignee: (unassigned) => Phill (phill-ridout)

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1746350

Title:
  Exception importing Words of Worship songs

Status in OpenLP:
  Fix Committed

Bug description:
  A user is having a problem with importing his Words of Worship songs.
  Here's a traceback I was able to reproduce with his songs:

  Traceback (most recent call last):
File "openlp/core/widgets/wizard.py", line 228, in on_current_id_changed
  self.perform_wizard()
File "openlp/plugins/songs/forms/songimportform.py", line 331, in 
perform_wizard
  importer.do_import()
File "openlp/plugins/songs/lib/importers/wordsofworship.py", line 142, in 
do_import
  block_type = BLOCK_TYPES[ord(song_data.read(4)[:1])]
  IndexError: tuple index out of range

  You can get the songs from
  https://support.openlp.org/scp/tickets.php?id=4485

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1746350/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1746350] Re: Exception importing Words of Worship songs

2019-07-20 Thread Phill
** Branch linked: lp:~phill-ridout/openlp/wow_import_fixes

** Changed in: openlp
   Status: Confirmed => Fix Committed

** Changed in: openlp
Milestone: None => 2.9.1

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1746350

Title:
  Exception importing Words of Worship songs

Status in OpenLP:
  Fix Committed

Bug description:
  A user is having a problem with importing his Words of Worship songs.
  Here's a traceback I was able to reproduce with his songs:

  Traceback (most recent call last):
File "openlp/core/widgets/wizard.py", line 228, in on_current_id_changed
  self.perform_wizard()
File "openlp/plugins/songs/forms/songimportform.py", line 331, in 
perform_wizard
  importer.do_import()
File "openlp/plugins/songs/lib/importers/wordsofworship.py", line 142, in 
do_import
  block_type = BLOCK_TYPES[ord(song_data.read(4)[:1])]
  IndexError: tuple index out of range

  You can get the songs from
  https://support.openlp.org/scp/tickets.php?id=4485

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1746350/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


Re: [Openlp-core] [Merge] lp:~phill-ridout/openlp/fixes-III into lp:openlp

2019-07-18 Thread Phill



Diff comments:

> 
> === modified file 'openlp/core/common/i18n.py'
> --- openlp/core/common/i18n.py2019-06-28 18:09:25 +
> +++ openlp/core/common/i18n.py2019-07-18 19:27:49 +
> @@ -338,8 +338,8 @@
>  Override the default object creation method to return a single 
> instance.
>  """
>  if not cls.__instance__:
> -cls.__instance__ = object.__new__(cls)
> -cls.load(cls)
> +cls.__instance__ = super().__new__(cls)
> +cls.__instance__.load()

Tomas: In this case super() refers to object, as object is the super class

Tim:
"if not cls.__instance__:" is still in there, so the class is only instantiated 
once (I have tried with the print statement as you suggested too).

The only difference here is that we're calling load() on the instance, this is 
the correct way to do it as load is an instance method, not a class or static 
method, so passing cls to it is incorrect.

>  return cls.__instance__
>  
>  def load(self):
> 
> === modified file 'openlp/core/ui/icons.py'
> --- openlp/core/ui/icons.py   2019-04-13 13:00:22 +
> +++ openlp/core/ui/icons.py   2019-07-18 19:27:49 +
> @@ -45,8 +45,8 @@
>  Override the default object creation method to return a single 
> instance.
>  """
>  if not cls.__instance__:
> -cls.__instance__ = object.__new__(cls)
> -cls.load(cls)
> +cls.__instance__ = super().__new__(cls)
> +cls.__instance__.load()
>  return cls.__instance__

same as above, tried with the print statement also

>  
>  def load(self):
> 
> === modified file 'openlp/core/widgets/views.py'
> --- openlp/core/widgets/views.py  2019-05-23 19:33:46 +
> +++ openlp/core/widgets/views.py  2019-07-18 19:27:49 +
> @@ -219,7 +219,7 @@
>  slide_height = width // self.screen_ratio
>  max_img_row_height = Settings().value('advanced/slide max 
> height')
>  if isinstance(max_img_row_height, int):
> -if max_img_row_height > 0 and slide_height > 
> max_img_row_height:
> +if 0 < max_img_row_height < slide_height:

PyDev console: starting.
Python 3.7.3 (default, Apr  9 2019, 04:56:51) 
[GCC 8.3.0] on linux
1 < 2 < 3
True
1 < 1 < 3
False
1 < 3 < 3
False

Also these particular changes were done automatically by pycharm, so shouldn't 
be human error in translating them...

>  slide_height = max_img_row_height
>  elif max_img_row_height < 0:
>  # If auto setting, show that number of slides, or if 
> the resulting slides too small, 100px.


-- 
https://code.launchpad.net/~phill-ridout/openlp/fixes-III/+merge/370337
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~phill-ridout/openlp/fixes-III into lp:openlp

2019-07-18 Thread Phill
Phill has proposed merging lp:~phill-ridout/openlp/fixes-III into lp:openlp.

Commit message:
Minor fixes and changes

Requested reviews:
  Tomas Groth (tomasgroth)

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/fixes-III/+merge/370337
-- 
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/common/__init__.py'
--- openlp/core/common/__init__.py	2019-07-03 06:30:01 +
+++ openlp/core/common/__init__.py	2019-07-18 19:27:49 +
@@ -45,7 +45,7 @@
 FIRST_CAMEL_REGEX = re.compile('(.)([A-Z][a-z]+)')
 SECOND_CAMEL_REGEX = re.compile('([a-z0-9])([A-Z])')
 CONTROL_CHARS = re.compile(r'[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x9F]')
-INVALID_FILE_CHARS = re.compile(r'[\\/:\*\?"<>\|\+\[\]%]')
+INVALID_FILE_CHARS = re.compile(r'[\\/:*?"<>|+\[\]%]')
 IMAGES_FILTER = None
 REPLACMENT_CHARS_MAP = str.maketrans({'\u2018': '\'', '\u2019': '\'', '\u201c': '"', '\u201d': '"', '\u2026': '...',
   '\u2013': '-', '\u2014': '-', '\v': '\n\n', '\f': '\n\n'})
@@ -103,21 +103,21 @@
 logger.error(log_string)
 
 
-def extension_loader(glob_pattern, excluded_files=[]):
+def extension_loader(glob_pattern, excluded_files=None):
 """
 A utility function to find and load OpenLP extensions, such as plugins, presentation and media controllers and
 importers.
 
 :param str glob_pattern: A glob pattern used to find the extension(s) to be imported. Should be relative to the
 application directory. i.e. plugins/*/*plugin.py
-:param list[str] excluded_files: A list of file names to exclude that the glob pattern may find.
+:param list[str] | None excluded_files: A list of file names to exclude that the glob pattern may find.
 :rtype: None
 """
 from openlp.core.common.applocation import AppLocation
 app_dir = AppLocation.get_directory(AppLocation.AppDir)
 for extension_path in app_dir.glob(glob_pattern):
 extension_path = extension_path.relative_to(app_dir)
-if extension_path.name in excluded_files:
+if extension_path.name in (excluded_files or []):
 continue
 log.debug('Attempting to import %s', extension_path)
 module_name = path_to_module(extension_path)

=== modified file 'openlp/core/common/i18n.py'
--- openlp/core/common/i18n.py	2019-06-28 18:09:25 +
+++ openlp/core/common/i18n.py	2019-07-18 19:27:49 +
@@ -338,8 +338,8 @@
 Override the default object creation method to return a single instance.
 """
 if not cls.__instance__:
-cls.__instance__ = object.__new__(cls)
-cls.load(cls)
+cls.__instance__ = super().__new__(cls)
+cls.__instance__.load()
 return cls.__instance__
 
 def load(self):
@@ -503,7 +503,7 @@
 """
 return local_time.strftime(match.group())
 
-return re.sub(r'\%[a-zA-Z]', match_formatting, text)
+return re.sub(r'%[a-zA-Z]', match_formatting, text)
 
 
 def get_locale_key(string, numeric=False):

=== modified file 'openlp/core/lib/db.py'
--- openlp/core/lib/db.py	2019-05-22 20:46:51 +
+++ openlp/core/lib/db.py	2019-07-18 19:27:49 +
@@ -265,7 +265,7 @@
 """
 if not database_exists(url):
 log.warning("Database {db} doesn't exist - skipping upgrade checks".format(db=url))
-return (0, 0)
+return 0, 0
 
 log.debug('Checking upgrades for DB {db}'.format(db=url))
 

=== modified file 'openlp/core/lib/formattingtags.py'
--- openlp/core/lib/formattingtags.py	2019-04-13 13:00:22 +
+++ openlp/core/lib/formattingtags.py	2019-07-18 19:27:49 +
@@ -59,97 +59,98 @@
 """
 temporary_tags = [tag for tag in FormattingTags.html_expands if tag.get('temporary')]
 FormattingTags.html_expands = []
-base_tags = []
+base_tags = [
+{
+'desc': translate('OpenLP.FormattingTags', 'Red'),
+'start tag': '{r}',
+'start html': '',
+'end tag': '{/r}', 'end html': '', 'protected': True,
+'temporary': False
+}, {
+'desc': translate('OpenLP.FormattingTags', 'Black'),
+'start tag': '{b}',
+'start html': '',
+'end tag': '{/b}', 'end html': '', 'protected': True,
+'temporary': False
+}, {
+'desc': translate('OpenLP.FormattingTags', 'Blue'),
+'start tag': '{bl}',
+'start html': '',
+'end tag': '{/bl}', 'end html': '', 'protected': True,
+'temporary': False
+}, {
+'desc': translate('OpenLP.FormattingTags', 'Yellow'),
+'start tag': '{y}',
+'start html': '',
+'end tag': '{/y}', 'end html': ''

[Openlp-core] [Merge] lp:~phill-ridout/openlp/fixes-III into lp:openlp

2019-07-18 Thread Phill
The proposal to merge lp:~phill-ridout/openlp/fixes-III into lp:openlp has been 
updated.

Status: Needs review => Superseded

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/fixes-III/+merge/370336
-- 
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~phill-ridout/openlp/fixes-III into lp:openlp

2019-07-18 Thread Phill
Phill has proposed merging lp:~phill-ridout/openlp/fixes-III into lp:openlp.

Commit message:
Minor fixes and changes

Requested reviews:
  Tomas Groth (tomasgroth)

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/fixes-III/+merge/370336
-- 
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/common/__init__.py'
--- openlp/core/common/__init__.py	2019-07-03 06:30:01 +
+++ openlp/core/common/__init__.py	2019-07-18 19:17:29 +
@@ -45,7 +45,7 @@
 FIRST_CAMEL_REGEX = re.compile('(.)([A-Z][a-z]+)')
 SECOND_CAMEL_REGEX = re.compile('([a-z0-9])([A-Z])')
 CONTROL_CHARS = re.compile(r'[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x9F]')
-INVALID_FILE_CHARS = re.compile(r'[\\/:\*\?"<>\|\+\[\]%]')
+INVALID_FILE_CHARS = re.compile(r'[\\/:*?"<>|+\[\]%]')
 IMAGES_FILTER = None
 REPLACMENT_CHARS_MAP = str.maketrans({'\u2018': '\'', '\u2019': '\'', '\u201c': '"', '\u201d': '"', '\u2026': '...',
   '\u2013': '-', '\u2014': '-', '\v': '\n\n', '\f': '\n\n'})
@@ -103,21 +103,21 @@
 logger.error(log_string)
 
 
-def extension_loader(glob_pattern, excluded_files=[]):
+def extension_loader(glob_pattern, excluded_files=None):
 """
 A utility function to find and load OpenLP extensions, such as plugins, presentation and media controllers and
 importers.
 
 :param str glob_pattern: A glob pattern used to find the extension(s) to be imported. Should be relative to the
 application directory. i.e. plugins/*/*plugin.py
-:param list[str] excluded_files: A list of file names to exclude that the glob pattern may find.
+:param list[str] | None excluded_files: A list of file names to exclude that the glob pattern may find.
 :rtype: None
 """
 from openlp.core.common.applocation import AppLocation
 app_dir = AppLocation.get_directory(AppLocation.AppDir)
 for extension_path in app_dir.glob(glob_pattern):
 extension_path = extension_path.relative_to(app_dir)
-if extension_path.name in excluded_files:
+if extension_path.name in (excluded_files or []):
 continue
 log.debug('Attempting to import %s', extension_path)
 module_name = path_to_module(extension_path)

=== modified file 'openlp/core/common/i18n.py'
--- openlp/core/common/i18n.py	2019-06-28 18:09:25 +
+++ openlp/core/common/i18n.py	2019-07-18 19:17:29 +
@@ -338,8 +338,8 @@
 Override the default object creation method to return a single instance.
 """
 if not cls.__instance__:
-cls.__instance__ = object.__new__(cls)
-cls.load(cls)
+cls.__instance__ = super().__new__(cls)
+cls.__instance__.load()
 return cls.__instance__
 
 def load(self):
@@ -503,7 +503,7 @@
 """
 return local_time.strftime(match.group())
 
-return re.sub(r'\%[a-zA-Z]', match_formatting, text)
+return re.sub(r'%[a-zA-Z]', match_formatting, text)
 
 
 def get_locale_key(string, numeric=False):

=== modified file 'openlp/core/lib/db.py'
--- openlp/core/lib/db.py	2019-05-22 20:46:51 +
+++ openlp/core/lib/db.py	2019-07-18 19:17:29 +
@@ -265,7 +265,7 @@
 """
 if not database_exists(url):
 log.warning("Database {db} doesn't exist - skipping upgrade checks".format(db=url))
-return (0, 0)
+return 0, 0
 
 log.debug('Checking upgrades for DB {db}'.format(db=url))
 

=== modified file 'openlp/core/lib/formattingtags.py'
--- openlp/core/lib/formattingtags.py	2019-04-13 13:00:22 +
+++ openlp/core/lib/formattingtags.py	2019-07-18 19:17:29 +
@@ -59,97 +59,98 @@
 """
 temporary_tags = [tag for tag in FormattingTags.html_expands if tag.get('temporary')]
 FormattingTags.html_expands = []
-base_tags = []
+base_tags = [
+{
+'desc': translate('OpenLP.FormattingTags', 'Red'),
+'start tag': '{r}',
+'start html': '',
+'end tag': '{/r}', 'end html': '', 'protected': True,
+'temporary': False
+}, {
+'desc': translate('OpenLP.FormattingTags', 'Black'),
+'start tag': '{b}',
+'start html': '',
+'end tag': '{/b}', 'end html': '', 'protected': True,
+'temporary': False
+}, {
+'desc': translate('OpenLP.FormattingTags', 'Blue'),
+'start tag': '{bl}',
+'start html': '',
+'end tag': '{/bl}', 'end html': '', 'protected': True,
+'temporary': False
+}, {
+'desc': translate('OpenLP.FormattingTags', 'Yellow'),
+'start tag': '{y}',
+'start html': '',
+'end tag': '{/y}', 'end html': ''

[Openlp-core] [Merge] lp:~phill-ridout/openlp/fixes-III into lp:openlp

2019-07-18 Thread Phill
The proposal to merge lp:~phill-ridout/openlp/fixes-III into lp:openlp has been 
updated.

Status: Needs review => Superseded

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/fixes-III/+merge/369653
-- 
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


Re: [Openlp-core] [Merge] lp:~john+ubuntu-g/openlp/singingthefaith into lp:openlp

2019-07-03 Thread Phill
Review: Needs Fixing

Please change your string formatting to use the 'new' style with the format 
function. ( https://pyformat.info/ ) also string formatting is preferred over 
concatenation (i.e, "part1" + var + "part2")

single quotes for strings, not double quotes

do_import_file is very long can this be split in to smaller methods?



Diff comments:

> 
> === added file 'openlp/plugins/songs/lib/importers/singingthefaith.py'
> --- openlp/plugins/songs/lib/importers/singingthefaith.py 1970-01-01 
> 00:00:00 +
> +++ openlp/plugins/songs/lib/importers/singingthefaith.py 2019-06-30 
> 19:19:46 +
> @@ -0,0 +1,347 @@
> +# -*- coding: utf-8 -*-
> +# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 
> softtabstop=4
> +
> +###
> +# OpenLP - Open Source Lyrics Projection 
>  #
> +# 
> --- #
> +# Copyright (c) 2008-2019 OpenLP Developers  
>  #
> +# 
> --- #
> +# 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 
>  #
> +###
> +"""
> +The :mod:`singingthefaith` module provides the functionality for importing 
> songs which are
> +exported from Singing The Faith - an Authorised songbook for the Methodist 
> Church of
> +Great Britain."""
> +
> +import logging
> +import re
> +from pathlib import Path
> +
> +from openlp.core.common.i18n import translate
> +from openlp.plugins.songs.lib.importers.songimport import SongImport
> +
> +log = logging.getLogger(__name__)
> +
> +
> +class SingingTheFaithImport(SongImport):
> +"""
> +Import songs exported from SingingTheFaith
> +"""
> +
> +hints_available = False
> +checks_needed = True
> +hintline = {}

can we have some consistency here and make these hint_line

> +hintfile_version = '0'

and hint_file_version

> +hint_verseOrder = ''

also please stick to 'snake_case' variable names like hint_verse_order

> +hint_songtitle = ''

hint_song_title

> +hint_comments = ''
> +hint_ignoreIndent = False

hint_ignore_indent

> +
> +def do_import(self):
> +"""
> +Receive a single file or a list of files to import.
> +"""
> +if not isinstance(self.import_source, list):
> +return
> +self.import_wizard.progress_bar.setMaximum(len(self.import_source))
> +for file_path in self.import_source:
> +if self.stop_import_flag:
> +return
> +with file_path.open('rt', encoding='cp1251') as song_file:
> +self.do_import_file(song_file)
> +
> +def do_import_file(self, file):
> +"""
> +Process the SingingTheFaith file - pass in a file-like object, not a 
> file path.
> +"""
> +singingTheFaithVersion = 1

singing_the_faith_version

> +self.set_defaults()
> +# Setup variables
> +line_number = 0
> +old_indent = 0
> +# The chorus indent is how many spaces the chorus is indented - it 
> might be 6,
> +# but we test for >= and I do not know how consistent to formatting 
> of the
> +# exported songs is.
> +chorus_indent = 5
> +song_title = 'STF000 -'
> +song_number = '0'
> +ccli = '0'
> +current_verse = ''
> +current_verse_type = 'v'
> +current_verse_number = 1
> +# Potentially we could try to track current chorus number to 
> automatically handle
> +# more than 1 chorus, currently unused.
> +# current_chorus_number = 1
> +has_chorus = False
> +chorus_written = False
> +auto_verse_order_ok = False
> +copyright = ''
> +# the check_flag is prepended to the title, removed if the import 
> should be OK

[Openlp-core] [Merge] lp:~phill-ridout/openlp/fixes-III into lp:openlp

2019-07-03 Thread Phill
Phill has proposed merging lp:~phill-ridout/openlp/fixes-III into lp:openlp.

Commit message:
Minor fixes and changes

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/fixes-III/+merge/369653
-- 
Your team OpenLP Core is requested to review the proposed merge of 
lp:~phill-ridout/openlp/fixes-III into lp:openlp.
=== modified file 'openlp/core/common/__init__.py'
--- openlp/core/common/__init__.py	2019-06-05 04:53:18 +
+++ openlp/core/common/__init__.py	2019-07-03 13:29:54 +
@@ -45,7 +45,7 @@
 FIRST_CAMEL_REGEX = re.compile('(.)([A-Z][a-z]+)')
 SECOND_CAMEL_REGEX = re.compile('([a-z0-9])([A-Z])')
 CONTROL_CHARS = re.compile(r'[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x9F]')
-INVALID_FILE_CHARS = re.compile(r'[\\/:\*\?"<>\|\+\[\]%]')
+INVALID_FILE_CHARS = re.compile(r'[\\/:*?"<>|+\[\]%]')
 IMAGES_FILTER = None
 REPLACMENT_CHARS_MAP = str.maketrans({'\u2018': '\'', '\u2019': '\'', '\u201c': '"', '\u201d': '"', '\u2026': '...',
   '\u2013': '-', '\u2014': '-', '\v': '\n\n', '\f': '\n\n'})
@@ -112,21 +112,21 @@
 logger.error(log_string)
 
 
-def extension_loader(glob_pattern, excluded_files=[]):
+def extension_loader(glob_pattern, excluded_files=None):
 """
 A utility function to find and load OpenLP extensions, such as plugins, presentation and media controllers and
 importers.
 
 :param str glob_pattern: A glob pattern used to find the extension(s) to be imported. Should be relative to the
 application directory. i.e. plugins/*/*plugin.py
-:param list[str] excluded_files: A list of file names to exclude that the glob pattern may find.
+:param list[str] | None excluded_files: A list of file names to exclude that the glob pattern may find.
 :rtype: None
 """
 from openlp.core.common.applocation import AppLocation
 app_dir = AppLocation.get_directory(AppLocation.AppDir)
 for extension_path in app_dir.glob(glob_pattern):
 extension_path = extension_path.relative_to(app_dir)
-if extension_path.name in excluded_files:
+if extension_path.name in (excluded_files or []):
 continue
 log.debug('Attempting to import %s', extension_path)
 module_name = path_to_module(extension_path)

=== modified file 'openlp/core/common/i18n.py'
--- openlp/core/common/i18n.py	2019-06-28 18:09:25 +
+++ openlp/core/common/i18n.py	2019-07-03 13:29:54 +
@@ -338,8 +338,8 @@
 Override the default object creation method to return a single instance.
 """
 if not cls.__instance__:
-cls.__instance__ = object.__new__(cls)
-cls.load(cls)
+cls.__instance__ = super().__new__(cls)
+cls.__instance__.load()
 return cls.__instance__
 
 def load(self):
@@ -503,7 +503,7 @@
 """
 return local_time.strftime(match.group())
 
-return re.sub(r'\%[a-zA-Z]', match_formatting, text)
+return re.sub(r'%[a-zA-Z]', match_formatting, text)
 
 
 def get_locale_key(string, numeric=False):

=== modified file 'openlp/core/lib/db.py'
--- openlp/core/lib/db.py	2019-05-22 20:46:51 +
+++ openlp/core/lib/db.py	2019-07-03 13:29:54 +
@@ -265,7 +265,7 @@
 """
 if not database_exists(url):
 log.warning("Database {db} doesn't exist - skipping upgrade checks".format(db=url))
-return (0, 0)
+return 0, 0
 
 log.debug('Checking upgrades for DB {db}'.format(db=url))
 

=== modified file 'openlp/core/lib/formattingtags.py'
--- openlp/core/lib/formattingtags.py	2019-04-13 13:00:22 +
+++ openlp/core/lib/formattingtags.py	2019-07-03 13:29:54 +
@@ -59,97 +59,98 @@
 """
 temporary_tags = [tag for tag in FormattingTags.html_expands if tag.get('temporary')]
 FormattingTags.html_expands = []
-base_tags = []
+base_tags = [
+{
+'desc': translate('OpenLP.FormattingTags', 'Red'),
+'start tag': '{r}',
+'start html': '',
+'end tag': '{/r}', 'end html': '', 'protected': True,
+'temporary': False
+}, {
+'desc': translate('OpenLP.FormattingTags', 'Black'),
+'start tag': '{b}',
+'start html': '',
+'end tag': '{/b}', 'end html': '', 'protected': True,
+'temporary': False
+}, {
+'desc': translate('OpenLP.FormattingTags', 'Blue'),
+'start tag': '{bl}',
+'start html': '',
+'end tag': '{/bl}', 'end html': '', 'protected': True,
+'temporary': False
+}, {
+'desc': translate('OpenLP.FormattingTags', 'Yellow'),
+'start tag': '{y}',
+

[Openlp-core] [Merge] lp:~phill-ridout/openlp/wow_import_fixes into lp:openlp

2019-06-28 Thread Phill
The proposal to merge lp:~phill-ridout/openlp/wow_import_fixes into lp:openlp 
has been updated.

Commit message changed to:

Fix up and improve the Words Of Worship importer

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/wow_import_fixes/+merge/369468
-- 
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


Re: [Openlp-core] [Merge] lp:~john+ubuntu-g/openlp/singingthefaith into lp:openlp

2019-06-28 Thread Phill
A few in-line comments. Also you don't need to use parenthesis around the 
expressions in the if statements.

Diff comments:

> 
> === added file 'openlp/plugins/songs/lib/importers/singingthefaith.py'
> --- openlp/plugins/songs/lib/importers/singingthefaith.py 1970-01-01 
> 00:00:00 +
> +++ openlp/plugins/songs/lib/importers/singingthefaith.py 2019-06-27 
> 12:35:49 +
> @@ -0,0 +1,389 @@
> +# -*- coding: utf-8 -*-
> +# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 
> softtabstop=4
> +
> +###
> +# OpenLP - Open Source Lyrics Projection 
>  #
> +# 
> --- #
> +# Copyright (c) 2008-2019 OpenLP Developers  
>  #
> +# 
> --- #
> +# 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 
>  #
> +###
> +"""
> +The :mod:`singingthefaith` module provides the functionality for importing 
> songs which are
> +exported from Singing The Faith - an Authorised songbook for the Methodist 
> Church of
> +Great Britain."""
> +
> +
> +import logging
> +import re
> +
> +import os
> +
> +from openlp.core.common.i18n import translate
> +from openlp.plugins.songs.lib.importers.songimport import SongImport
> +
> +log = logging.getLogger(__name__)
> +
> +
> +class SingingTheFaithImport(SongImport):
> +"""
> +Import songs exported from SingingTheFaith
> +"""
> +
> +hints_available = False
> +checks_needed = True
> +hintline = {}
> +hintfile_version = '0'
> +hint_verseOrder = ''
> +hint_songtitle = ''
> +hint_comments = ''
> +hint_ignoreIndent = False
> +
> +def __init__(self, manager, **kwargs):

No need to re implement __init__ here as its not doing anything

> +"""
> +Initialise the class.
> +"""
> +super(SingingTheFaithImport, self).__init__(manager, **kwargs)
> +
> +def do_import(self):
> +"""
> +Receive a single file or a list of files to import.
> +"""
> +if not isinstance(self.import_source, list):
> +return
> +self.import_wizard.progress_bar.setMaximum(len(self.import_source))
> +for filename in self.import_source:

file_path would be more descriptive, as it should be a Path object here...

> +if self.stop_import_flag:
> +return
> +song_file = open(filename, 'rt', encoding='cp1251')

a context manager here would be better as it would close the file even if an 
exception were raised. Also the Path object has the open method built 
(https://docs.python.org/3/library/pathlib.html#pathlib.Path.open) in Ex.:

with file_path.open('rt', encoding='cp1251'):

> +self.do_import_file(song_file)
> +song_file.close()
> +
> +def do_import_file(self, file):
> +"""
> +Process the SingingTheFaith file - pass in a file-like object, not a 
> file path.
> +"""
> +singingTheFaithVersion = 1
> +self.set_defaults()
> +# Setup variables
> +line_number = 0
> +old_indent = 0
> +chorus_indent = 5   # It might be 6, but we test for >=
> +song_title = 'STF000 -'
> +song_number = '0'
> +ccli = '0'
> +current_verse = ''
> +current_verse_type = 'v'
> +current_verse_number = 1
> +has_chorus = False
> +chorus_written = False
> +verses = []
> +author = ''
> +copyright = ''
> +check_flag = 'z'# Prepended to title, remove if we think 
> import should be OK
> +
> +
> +self.add_comment("Imported with Singing The Faith Importer v 
> "+str(singingTheFaithVersion))
> +
> +# Get the file_song_number - so we can use it for hints

[Openlp-core] [Merge] lp:~phill-ridout/openlp/wow_import_fixes into lp:openlp

2019-06-28 Thread Phill
Phill has proposed merging lp:~phill-ridout/openlp/wow_import_fixes into 
lp:openlp.

Requested reviews:
  Tim Bentley (trb143)

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/wow_import_fixes/+merge/369468
-- 
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/common/i18n.py'
--- openlp/core/common/i18n.py	2019-04-13 13:00:22 +
+++ openlp/core/common/i18n.py	2019-06-28 19:29:36 +
@@ -385,7 +385,8 @@
 self.Error = translate('OpenLP.Ui', 'Error')
 self.Export = translate('OpenLP.Ui', 'Export')
 self.File = translate('OpenLP.Ui', 'File')
-self.FontSizePtUnit = translate('OpenLP.Ui', 'pt', 'Abbreviated font pointsize unit')
+self.FileCorrupt = translate('OpenLP.Ui', 'File appears to be corrupt.')
+self.FontSizePtUnit = translate('OpenLP.Ui', 'pt', 'Abbreviated font point size unit')
 self.Help = translate('OpenLP.Ui', 'Help')
 self.Hours = translate('OpenLP.Ui', 'h', 'The abbreviated unit for hours')
 self.IFdSs = translate('OpenLP.Ui', 'Invalid Folder Selected', 'Singular')

=== modified file 'openlp/core/lib/__init__.py'
--- openlp/core/lib/__init__.py	2019-06-11 19:48:34 +
+++ openlp/core/lib/__init__.py	2019-06-28 19:29:36 +
@@ -24,15 +24,23 @@
 OpenLP work.
 """
 import logging
+import os
+from enum import IntEnum
 from pathlib import Path
 
 from PyQt5 import QtCore, QtGui, QtWidgets
 
-from openlp.core.common.i18n import translate
+from openlp.core.common.i18n import UiStrings, translate
 
 log = logging.getLogger(__name__ + '.__init__')
 
 
+class DataType(IntEnum):
+U8 = 1
+U16 = 2
+U32 = 4
+
+
 class ServiceItemContext(object):
 """
 The context in which a Service Item is being generated
@@ -397,3 +405,48 @@
 else:
 list_to_string = ''
 return list_to_string
+
+
+def read_or_fail(file_object, length):
+"""
+Ensure that the data read is as the exact length requested. Otherwise raise an OSError.
+
+:param io.IOBase file_object: The file-lke object ot read from.
+:param int length: The length of the data to read.
+:return: The data read.
+"""
+data = file_object.read(length)
+if len(data) != length:
+raise OSError(UiStrings().FileCorrupt)
+return data
+
+
+def read_int(file_object, data_type, endian='big'):
+"""
+Read the correct amount of data from a file-like object to decode it to the specified type.
+
+:param io.IOBase file_object: The file-like object to read from.
+:param DataType data_type: A member from the :enum:`DataType`
+:param endian: The endianess of the data to be read
+:return int: The decoded int
+"""
+data = read_or_fail(file_object, data_type)
+return int.from_bytes(data, endian)
+
+
+def seek_or_fail(file_object, offset, how=os.SEEK_SET):
+"""
+See to a set position and return an error if the cursor has not moved to that position.
+
+:param io.IOBase file_object: The file-like object to attempt to seek.
+:param int offset: The offset / position to seek by / to.
+:param [os.SEEK_CUR | os.SEEK_SET how: Currently only supports os.SEEK_CUR (0) or os.SEEK_SET (1)
+:return int: The new position in the file.
+"""
+if how not in (os.SEEK_CUR, os.SEEK_SET):
+raise NotImplementedError
+prev_pos = file_object.tell()
+new_pos = file_object.seek(offset, how)
+if how == os.SEEK_SET and new_pos != offset or how == os.SEEK_CUR and new_pos != prev_pos + offset:
+raise OSError(UiStrings().FileCorrupt)
+return new_pos

=== modified file 'openlp/core/ui/formattingtagcontroller.py'
--- openlp/core/ui/formattingtagcontroller.py	2019-04-13 13:00:22 +
+++ openlp/core/ui/formattingtagcontroller.py	2019-06-28 19:29:36 +
@@ -84,7 +84,7 @@
 'desc': desc,
 'start tag': '{{{tag}}}'.format(tag=tag),
 'start html': start_html,
-'end tag': '{{{tag}}}'.format(tag=tag),
+'end tag': '{{/{tag}}}'.format(tag=tag),
 'end html': end_html,
 'protected': False,
 'temporary': False

=== modified file 'openlp/core/widgets/edits.py'
--- openlp/core/widgets/edits.py	2019-05-22 20:46:51 +
+++ openlp/core/widgets/edits.py	2019-06-28 19:29:36 +
@@ -353,7 +353,7 @@
 :rtype: None
 """
 if self._path != path:
-self._path = path
+self.path = path
 self.pathChanged.emit(path)
 
 

=== modified file 'openlp/plugins/songs/lib/importers/wordsofworship.py'
--- openlp/plugins/songs/lib/importers/wordsofworship.py	2019-04-13 13:00:22 +
+++ openlp/plugins/songs/lib/importers/wordsofworship.py	2019-06-28 19:29:36 +
@@ -26,7 +26,8 @@
 import logging
 import os
 
-from openlp.core.common.i18n import translat

[Openlp-core] [Merge] lp:~phill-ridout/openlp/wow_import_fixes into lp:openlp

2019-06-28 Thread Phill
The proposal to merge lp:~phill-ridout/openlp/wow_import_fixes into lp:openlp 
has been updated.

Status: Needs review => Superseded

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/wow_import_fixes/+merge/369467
-- 
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~phill-ridout/openlp/wow_import_fixes into lp:openlp

2019-06-28 Thread Phill
Phill has proposed merging lp:~phill-ridout/openlp/wow_import_fixes into 
lp:openlp.

Requested reviews:
  Tim Bentley (trb143)

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/wow_import_fixes/+merge/369467
-- 
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/common/i18n.py'
--- openlp/core/common/i18n.py	2019-04-13 13:00:22 +
+++ openlp/core/common/i18n.py	2019-06-28 19:28:41 +
@@ -385,7 +385,8 @@
 self.Error = translate('OpenLP.Ui', 'Error')
 self.Export = translate('OpenLP.Ui', 'Export')
 self.File = translate('OpenLP.Ui', 'File')
-self.FontSizePtUnit = translate('OpenLP.Ui', 'pt', 'Abbreviated font pointsize unit')
+self.FileCorrupt = translate('OpenLP.Ui', 'File appears to be corrupt.')
+self.FontSizePtUnit = translate('OpenLP.Ui', 'pt', 'Abbreviated font point size unit')
 self.Help = translate('OpenLP.Ui', 'Help')
 self.Hours = translate('OpenLP.Ui', 'h', 'The abbreviated unit for hours')
 self.IFdSs = translate('OpenLP.Ui', 'Invalid Folder Selected', 'Singular')

=== modified file 'openlp/core/lib/__init__.py'
--- openlp/core/lib/__init__.py	2019-06-11 19:48:34 +
+++ openlp/core/lib/__init__.py	2019-06-28 19:28:41 +
@@ -24,15 +24,23 @@
 OpenLP work.
 """
 import logging
+import os
+from enum import IntEnum
 from pathlib import Path
 
 from PyQt5 import QtCore, QtGui, QtWidgets
 
-from openlp.core.common.i18n import translate
+from openlp.core.common.i18n import UiStrings, translate
 
 log = logging.getLogger(__name__ + '.__init__')
 
 
+class DataType(IntEnum):
+U8 = 1
+U16 = 2
+U32 = 4
+
+
 class ServiceItemContext(object):
 """
 The context in which a Service Item is being generated
@@ -397,3 +405,48 @@
 else:
 list_to_string = ''
 return list_to_string
+
+
+def read_or_fail(file_object, length):
+"""
+Ensure that the data read is as the exact length requested. Otherwise raise an OSError.
+
+:param io.IOBase file_object: The file-lke object ot read from.
+:param int length: The length of the data to read.
+:return: The data read.
+"""
+data = file_object.read(length)
+if len(data) != length:
+raise OSError(UiStrings().FileCorrupt)
+return data
+
+
+def read_int(file_object, data_type, endian='big'):
+"""
+Read the correct amount of data from a file-like object to decode it to the specified type.
+
+:param io.IOBase file_object: The file-like object to read from.
+:param DataType data_type: A member from the :enum:`DataType`
+:param endian: The endianess of the data to be read
+:return int: The decoded int
+"""
+data = read_or_fail(file_object, data_type)
+return int.from_bytes(data, endian)
+
+
+def seek_or_fail(file_object, offset, how=os.SEEK_SET):
+"""
+See to a set position and return an error if the cursor has not moved to that position.
+
+:param io.IOBase file_object: The file-like object to attempt to seek.
+:param int offset: The offset / position to seek by / to.
+:param [os.SEEK_CUR | os.SEEK_SET how: Currently only supports os.SEEK_CUR (0) or os.SEEK_SET (1)
+:return int: The new position in the file.
+"""
+if how not in (os.SEEK_CUR, os.SEEK_SET):
+raise NotImplementedError
+prev_pos = file_object.tell()
+new_pos = file_object.seek(offset, how)
+if how == os.SEEK_SET and new_pos != offset or how == os.SEEK_CUR and new_pos != prev_pos + offset:
+raise OSError(UiStrings().FileCorrupt)
+return new_pos

=== modified file 'openlp/core/ui/formattingtagcontroller.py'
--- openlp/core/ui/formattingtagcontroller.py	2019-04-13 13:00:22 +
+++ openlp/core/ui/formattingtagcontroller.py	2019-06-28 19:28:41 +
@@ -84,7 +84,7 @@
 'desc': desc,
 'start tag': '{{{tag}}}'.format(tag=tag),
 'start html': start_html,
-'end tag': '{{{tag}}}'.format(tag=tag),
+'end tag': '{{/{tag}}}'.format(tag=tag),
 'end html': end_html,
 'protected': False,
 'temporary': False

=== modified file 'openlp/core/widgets/edits.py'
--- openlp/core/widgets/edits.py	2019-05-22 20:46:51 +
+++ openlp/core/widgets/edits.py	2019-06-28 19:28:41 +
@@ -353,7 +353,7 @@
 :rtype: None
 """
 if self._path != path:
-self._path = path
+self.path = path
 self.pathChanged.emit(path)
 
 

=== modified file 'openlp/plugins/songs/lib/importers/wordsofworship.py'
--- openlp/plugins/songs/lib/importers/wordsofworship.py	2019-04-13 13:00:22 +
+++ openlp/plugins/songs/lib/importers/wordsofworship.py	2019-06-28 19:28:41 +
@@ -26,7 +26,8 @@
 import logging
 import os
 
-from openlp.core.common.i18n import translat

[Openlp-core] [Merge] lp:~phill-ridout/openlp/wow_import_fixes into lp:openlp

2019-06-28 Thread Phill
The proposal to merge lp:~phill-ridout/openlp/wow_import_fixes into lp:openlp 
has been updated.

Status: Needs review => Superseded

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/wow_import_fixes/+merge/369466
-- 
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~phill-ridout/openlp/wow_import_fixes into lp:openlp

2019-06-28 Thread Phill
Phill has proposed merging lp:~phill-ridout/openlp/wow_import_fixes into 
lp:openlp.

Requested reviews:
  Tim Bentley (trb143)

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/wow_import_fixes/+merge/369466
-- 
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/common/i18n.py'
--- openlp/core/common/i18n.py	2019-04-13 13:00:22 +
+++ openlp/core/common/i18n.py	2019-06-28 19:27:37 +
@@ -385,7 +385,8 @@
 self.Error = translate('OpenLP.Ui', 'Error')
 self.Export = translate('OpenLP.Ui', 'Export')
 self.File = translate('OpenLP.Ui', 'File')
-self.FontSizePtUnit = translate('OpenLP.Ui', 'pt', 'Abbreviated font pointsize unit')
+self.FileCorrupt = translate('OpenLP.Ui', 'File appears to be corrupt.')
+self.FontSizePtUnit = translate('OpenLP.Ui', 'pt', 'Abbreviated font point size unit')
 self.Help = translate('OpenLP.Ui', 'Help')
 self.Hours = translate('OpenLP.Ui', 'h', 'The abbreviated unit for hours')
 self.IFdSs = translate('OpenLP.Ui', 'Invalid Folder Selected', 'Singular')

=== modified file 'openlp/core/lib/__init__.py'
--- openlp/core/lib/__init__.py	2019-06-11 19:48:34 +
+++ openlp/core/lib/__init__.py	2019-06-28 19:27:37 +
@@ -24,15 +24,23 @@
 OpenLP work.
 """
 import logging
+import os
+from enum import IntEnum
 from pathlib import Path
 
 from PyQt5 import QtCore, QtGui, QtWidgets
 
-from openlp.core.common.i18n import translate
+from openlp.core.common.i18n import UiStrings, translate
 
 log = logging.getLogger(__name__ + '.__init__')
 
 
+class DataType(IntEnum):
+U8 = 1
+U16 = 2
+U32 = 4
+
+
 class ServiceItemContext(object):
 """
 The context in which a Service Item is being generated
@@ -397,3 +405,48 @@
 else:
 list_to_string = ''
 return list_to_string
+
+
+def read_or_fail(file_object, length):
+"""
+Ensure that the data read is as the exact length requested. Otherwise raise an OSError.
+
+:param io.IOBase file_object: The file-lke object ot read from.
+:param int length: The length of the data to read.
+:return: The data read.
+"""
+data = file_object.read(length)
+if len(data) != length:
+raise OSError(UiStrings().FileCorrupt)
+return data
+
+
+def read_int(file_object, data_type, endian='big'):
+"""
+Read the correct amount of data from a file-like object to decode it to the specified type.
+
+:param io.IOBase file_object: The file-like object to read from.
+:param DataType data_type: A member from the :enum:`DataType`
+:param endian: The endianess of the data to be read
+:return int: The decoded int
+"""
+data = read_or_fail(file_object, data_type)
+return int.from_bytes(data, endian)
+
+
+def seek_or_fail(file_object, offset, how=os.SEEK_SET):
+"""
+See to a set position and return an error if the cursor has not moved to that position.
+
+:param io.IOBase file_object: The file-like object to attempt to seek.
+:param int offset: The offset / position to seek by / to.
+:param [os.SEEK_CUR | os.SEEK_SET how: Currently only supports os.SEEK_CUR (0) or os.SEEK_SET (1)
+:return int: The new position in the file.
+"""
+if how not in (os.SEEK_CUR, os.SEEK_SET):
+raise NotImplementedError
+prev_pos = file_object.tell()
+new_pos = file_object.seek(offset, how)
+if how == os.SEEK_SET and new_pos != offset or how == os.SEEK_CUR and new_pos != prev_pos + offset:
+raise OSError(UiStrings().FileCorrupt)
+return new_pos

=== modified file 'openlp/core/ui/formattingtagcontroller.py'
--- openlp/core/ui/formattingtagcontroller.py	2019-04-13 13:00:22 +
+++ openlp/core/ui/formattingtagcontroller.py	2019-06-28 19:27:37 +
@@ -84,7 +84,7 @@
 'desc': desc,
 'start tag': '{{{tag}}}'.format(tag=tag),
 'start html': start_html,
-'end tag': '{{{tag}}}'.format(tag=tag),
+'end tag': '{{/{tag}}}'.format(tag=tag),
 'end html': end_html,
 'protected': False,
 'temporary': False

=== modified file 'openlp/core/widgets/edits.py'
--- openlp/core/widgets/edits.py	2019-05-22 20:46:51 +
+++ openlp/core/widgets/edits.py	2019-06-28 19:27:37 +
@@ -353,7 +353,7 @@
 :rtype: None
 """
 if self._path != path:
-self._path = path
+self.path = path
 self.pathChanged.emit(path)
 
 

=== modified file 'openlp/plugins/songs/lib/importers/wordsofworship.py'
--- openlp/plugins/songs/lib/importers/wordsofworship.py	2019-04-13 13:00:22 +
+++ openlp/plugins/songs/lib/importers/wordsofworship.py	2019-06-28 19:27:37 +
@@ -26,7 +26,8 @@
 import logging
 import os
 
-from openlp.core.common.i18n import translat

[Openlp-core] [Merge] lp:~phill-ridout/openlp/wow_import_fixes into lp:openlp

2019-06-28 Thread Phill
The proposal to merge lp:~phill-ridout/openlp/wow_import_fixes into lp:openlp 
has been updated.

Status: Needs review => Superseded

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/wow_import_fixes/+merge/369463
-- 
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~phill-ridout/openlp/wow_import_fixes into lp:openlp

2019-06-28 Thread Phill
Phill has proposed merging lp:~phill-ridout/openlp/wow_import_fixes into 
lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/wow_import_fixes/+merge/369463
-- 
Your team OpenLP Core is requested to review the proposed merge of 
lp:~phill-ridout/openlp/wow_import_fixes into lp:openlp.
=== modified file 'openlp/core/common/i18n.py'
--- openlp/core/common/i18n.py	2019-04-13 13:00:22 +
+++ openlp/core/common/i18n.py	2019-06-28 18:40:35 +
@@ -385,7 +385,8 @@
 self.Error = translate('OpenLP.Ui', 'Error')
 self.Export = translate('OpenLP.Ui', 'Export')
 self.File = translate('OpenLP.Ui', 'File')
-self.FontSizePtUnit = translate('OpenLP.Ui', 'pt', 'Abbreviated font pointsize unit')
+self.FileCorrupt = translate('OpenLP.Ui', 'File appears to be corrupt.')
+self.FontSizePtUnit = translate('OpenLP.Ui', 'pt', 'Abbreviated font point size unit')
 self.Help = translate('OpenLP.Ui', 'Help')
 self.Hours = translate('OpenLP.Ui', 'h', 'The abbreviated unit for hours')
 self.IFdSs = translate('OpenLP.Ui', 'Invalid Folder Selected', 'Singular')

=== modified file 'openlp/core/lib/__init__.py'
--- openlp/core/lib/__init__.py	2019-06-11 19:48:34 +
+++ openlp/core/lib/__init__.py	2019-06-28 18:40:35 +
@@ -24,15 +24,23 @@
 OpenLP work.
 """
 import logging
+import os
+from enum import IntEnum
 from pathlib import Path
 
 from PyQt5 import QtCore, QtGui, QtWidgets
 
-from openlp.core.common.i18n import translate
+from openlp.core.common.i18n import UiStrings, translate
 
 log = logging.getLogger(__name__ + '.__init__')
 
 
+class DataType(IntEnum):
+U8 = 1
+U16 = 2
+U32 = 4
+
+
 class ServiceItemContext(object):
 """
 The context in which a Service Item is being generated
@@ -397,3 +405,48 @@
 else:
 list_to_string = ''
 return list_to_string
+
+
+def read_or_fail(file_object, length):
+"""
+Ensure that the data read is as the exact length requested. Otherwise raise an OSError.
+
+:param io.IOBase file_object: The file-lke object ot read from.
+:param int length: The length of the data to read.
+:return: The data read.
+"""
+data = file_object.read(length)
+if len(data) != length:
+raise OSError(UiStrings().FileCorrupt)
+return data
+
+
+def read_int(file_object, data_type, endian='big'):
+"""
+Read the correct amount of data from a file-like object to decode it to the specified type.
+
+:param io.IOBase file_object: The file-like object to read from.
+:param DataType data_type: A member from the :enum:`DataType`
+:param endian: The endianess of the data to be read
+:return int: The decoded int
+"""
+data = read_or_fail(file_object, data_type)
+return int.from_bytes(data, endian)
+
+
+def seek_or_fail(file_object, offset, how=os.SEEK_SET):
+"""
+See to a set position and return an error if the cursor has not moved to that position.
+
+:param io.IOBase file_object: The file-like object to attempt to seek.
+:param int offset: The offset / position to seek by / to.
+:param [os.SEEK_CUR | os.SEEK_SET how: Currently only supports os.SEEK_CUR (0) or os.SEEK_SET (1)
+:return int: The new position in the file.
+"""
+if how not in (os.SEEK_CUR, os.SEEK_SET):
+raise NotImplementedError
+prev_pos = file_object.tell()
+new_pos = file_object.seek(offset, how)
+if how == os.SEEK_SET and new_pos != offset or how == os.SEEK_CUR and new_pos != prev_pos + offset:
+raise OSError(UiStrings().FileCorrupt)
+return new_pos

=== modified file 'openlp/core/ui/formattingtagcontroller.py'
--- openlp/core/ui/formattingtagcontroller.py	2019-04-13 13:00:22 +
+++ openlp/core/ui/formattingtagcontroller.py	2019-06-28 18:40:35 +
@@ -84,7 +84,7 @@
 'desc': desc,
 'start tag': '{{{tag}}}'.format(tag=tag),
 'start html': start_html,
-'end tag': '{{{tag}}}'.format(tag=tag),
+'end tag': '{{/{tag}}}'.format(tag=tag),
 'end html': end_html,
 'protected': False,
 'temporary': False

=== modified file 'openlp/core/widgets/edits.py'
--- openlp/core/widgets/edits.py	2019-05-22 20:46:51 +
+++ openlp/core/widgets/edits.py	2019-06-28 18:40:35 +
@@ -353,7 +353,7 @@
 :rtype: None
 """
 if self._path != path:
-self._path = path
+self.path = path
 self.pathChanged.emit(path)
 
 

=== modified file 'openlp/plugins/songs/lib/importers/wordsofworship.py'
--- openlp/plugins/songs/lib/importers/wordsofworship.py	2019-04-13 13:00:22 +
+++ openlp/plugins/songs/lib/importers/wordsofworship.py	2019-06-28 18:40:35 +
@@ -26,7 +26,8 @@
 imp

[Openlp-core] [Merge] lp:~phill-ridout/openlp/wow_import_fixes into lp:openlp

2019-06-28 Thread Phill
Phill has proposed merging lp:~phill-ridout/openlp/wow_import_fixes into 
lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/wow_import_fixes/+merge/369462
-- 
Your team OpenLP Core is requested to review the proposed merge of 
lp:~phill-ridout/openlp/wow_import_fixes into lp:openlp.
=== modified file 'openlp/core/common/i18n.py'
--- openlp/core/common/i18n.py	2019-04-13 13:00:22 +
+++ openlp/core/common/i18n.py	2019-06-28 18:31:26 +
@@ -385,7 +385,8 @@
 self.Error = translate('OpenLP.Ui', 'Error')
 self.Export = translate('OpenLP.Ui', 'Export')
 self.File = translate('OpenLP.Ui', 'File')
-self.FontSizePtUnit = translate('OpenLP.Ui', 'pt', 'Abbreviated font pointsize unit')
+self.FileCorrupt = translate('OpenLP.Ui', 'File appears to be corrupt.')
+self.FontSizePtUnit = translate('OpenLP.Ui', 'pt', 'Abbreviated font point size unit')
 self.Help = translate('OpenLP.Ui', 'Help')
 self.Hours = translate('OpenLP.Ui', 'h', 'The abbreviated unit for hours')
 self.IFdSs = translate('OpenLP.Ui', 'Invalid Folder Selected', 'Singular')

=== modified file 'openlp/core/lib/__init__.py'
--- openlp/core/lib/__init__.py	2019-06-11 19:48:34 +
+++ openlp/core/lib/__init__.py	2019-06-28 18:31:26 +
@@ -24,15 +24,23 @@
 OpenLP work.
 """
 import logging
+import os
+from enum import IntEnum
 from pathlib import Path
 
 from PyQt5 import QtCore, QtGui, QtWidgets
 
-from openlp.core.common.i18n import translate
+from openlp.core.common.i18n import UiStrings, translate
 
 log = logging.getLogger(__name__ + '.__init__')
 
 
+class DataType(IntEnum):
+U8 = 1
+U16 = 2
+U32 = 4
+
+
 class ServiceItemContext(object):
 """
 The context in which a Service Item is being generated
@@ -397,3 +405,48 @@
 else:
 list_to_string = ''
 return list_to_string
+
+
+def read_or_fail(file_object, length):
+"""
+Ensure that the data read is as the exact length requested. Otherwise raise an OSError.
+
+:param io.IOBase file_object: The file-lke object ot read from.
+:param int length: The length of the data to read.
+:return: The data read.
+"""
+data = file_object.read(length)
+if len(data) != length:
+raise OSError(UiStrings().FileCorrupt)
+return data
+
+
+def read_int(file_object, data_type, endian='big'):
+"""
+Read the correct amount of data from a file-like object to decode it to the specified type.
+
+:param io.IOBase file_object: The file-like object to read from.
+:param DataType data_type: A member from the :enum:`DataType`
+:param endian: The endianess of the data to be read
+:return int: The decoded int
+"""
+data = read_or_fail(file_object, data_type)
+return int.from_bytes(data, endian)
+
+
+def seek_or_fail(file_object, offset, how=os.SEEK_SET):
+"""
+See to a set position and return an error if the cursor has not moved to that position.
+
+:param io.IOBase file_object: The file-like object to attempt to seek.
+:param int offset: The offset / position to seek by / to.
+:param [os.SEEK_CUR | os.SEEK_SET how: Currently only supports os.SEEK_CUR (0) or os.SEEK_SET (1)
+:return int: The new position in the file.
+"""
+if how not in (os.SEEK_CUR, os.SEEK_SET):
+raise NotImplementedError
+prev_pos = file_object.tell()
+new_pos = file_object.seek(offset, how)
+if how == os.SEEK_SET and new_pos != offset or how == os.SEEK_CUR and new_pos != prev_pos + offset:
+raise OSError(UiStrings().FileCorrupt)
+return new_pos

=== modified file 'openlp/core/ui/formattingtagcontroller.py'
--- openlp/core/ui/formattingtagcontroller.py	2019-04-13 13:00:22 +
+++ openlp/core/ui/formattingtagcontroller.py	2019-06-28 18:31:26 +
@@ -84,7 +84,7 @@
 'desc': desc,
 'start tag': '{{{tag}}}'.format(tag=tag),
 'start html': start_html,
-'end tag': '{{{tag}}}'.format(tag=tag),
+'end tag': '{{/{tag}}}'.format(tag=tag),
 'end html': end_html,
 'protected': False,
 'temporary': False

=== modified file 'openlp/core/widgets/edits.py'
--- openlp/core/widgets/edits.py	2019-05-22 20:46:51 +
+++ openlp/core/widgets/edits.py	2019-06-28 18:31:26 +
@@ -353,7 +353,7 @@
 :rtype: None
 """
 if self._path != path:
-self._path = path
+self.path = path
 self.pathChanged.emit(path)
 
 

=== modified file 'openlp/plugins/songs/lib/importers/wordsofworship.py'
--- openlp/plugins/songs/lib/importers/wordsofworship.py	2019-04-13 13:00:22 +
+++ openlp/plugins/songs/lib/importers/wordsofworship.py	2019-06-28 18:31:26 +
@@ -26,7 +26,8 @@
 imp

[Openlp-core] [Merge] lp:~phill-ridout/openlp/wow_import_fixes into lp:openlp

2019-06-28 Thread Phill
The proposal to merge lp:~phill-ridout/openlp/wow_import_fixes into lp:openlp 
has been updated.

Status: Needs review => Superseded

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/wow_import_fixes/+merge/369462
-- 
Your team OpenLP Core is requested to review the proposed merge of 
lp:~phill-ridout/openlp/wow_import_fixes into lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~phill-ridout/openlp/wow_import_fixes into lp:openlp

2019-06-28 Thread Phill
The proposal to merge lp:~phill-ridout/openlp/wow_import_fixes into lp:openlp 
has been updated.

Status: Work in progress => Superseded

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/wow_import_fixes/+merge/369460
-- 
Your team OpenLP Core is requested to review the proposed merge of 
lp:~phill-ridout/openlp/wow_import_fixes into lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~phill-ridout/openlp/path_fixes into lp:openlp

2019-06-21 Thread Phill
Phill has proposed merging lp:~phill-ridout/openlp/path_fixes into lp:openlp.

Commit message:
Path fix ups

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/path_fixes/+merge/369195
-- 
Your team OpenLP Core is requested to review the proposed merge of 
lp:~phill-ridout/openlp/path_fixes into lp:openlp.
=== modified file 'openlp/core/common/json.py'
--- openlp/core/common/json.py	2019-05-26 10:30:37 +
+++ openlp/core/common/json.py	2019-06-21 22:10:16 +
@@ -111,6 +111,8 @@
 :param dict obj: A decoded JSON object
 :return: The custom object from the serialized data if the custom object is registered, else obj
 """
+if '__Path__' in obj:
+return PathSerializer.encode_json(obj, **self.kwargs)
 try:
 key = obj['json_meta']['class']
 except KeyError:
@@ -150,8 +152,8 @@
 if isinstance(obj, JSONMixin):
 return obj.json_object()
 elif obj.__class__.__name__ in _registered_classes:
-return _registered_classes[obj.__class__.__name__].json_object(obj)
-return super().default(obj)
+return _registered_classes[obj.__class__.__name__].json_object(obj, **self.kwargs)
+return super().default(obj, **self.kwargs)
 
 
 def is_serializable(obj):
@@ -174,17 +176,22 @@
 :param kwargs: Contains any extra parameters. Not used!
 :return Path: The deserialized Path object
 """
-path = Path(*obj['parts'])
+if '__Path__' in obj:
+parts = obj['__Path__']
+else:
+parts = obj['parts']
+path = Path(*parts)
 if base_path and not path.is_absolute():
 return base_path / path
 return path
 
 @classmethod
-def json_object(cls, obj, base_path=None, **kwargs):
+def json_object(cls, obj, base_path=None, is_js=False, **kwargs):
 """
 Create a dictionary that can be JSON decoded.
 
 :param Path base_path: If specified, an absolute path to make a relative path from.
+:param bool is_js: Encode the path as a uri. For example for use in the js rendering code.
 :param kwargs: Contains any extra parameters. Not used!
 :return: The dictionary representation of this Path object.
 :rtype: dict[tuple]
@@ -193,6 +200,8 @@
 if base_path:
 with suppress(ValueError):
 path = path.relative_to(base_path)
+if is_js is True:
+return path.as_uri()
 json_dict = {'parts': path.parts}
 cls.attach_meta(json_dict)
 return json_dict

=== modified file 'openlp/core/common/settings.py'
--- openlp/core/common/settings.py	2019-06-14 17:54:04 +
+++ openlp/core/common/settings.py	2019-06-21 22:10:16 +
@@ -612,7 +612,7 @@
 elif isinstance(default_value, dict):
 return {}
 elif isinstance(setting, str):
-if 'json_meta' in setting or setting.startswith('{'):
+if 'json_meta' in setting or '__Path__' in setting or setting.startswith('{'):
 return json.loads(setting, cls=OpenLPJSONDecoder)
 # Convert the setting to the correct type.
 if isinstance(default_value, bool):

=== modified file 'openlp/core/display/html/display.js'
--- openlp/core/display/html/display.js	2019-03-16 10:26:05 +
+++ openlp/core/display/html/display.js	2019-06-21 22:10:16 +
@@ -118,20 +118,6 @@
 }
 
 /**
- * The paths we get are JSON versions of Python Path objects, so let's just fix that.
- * @private
- * @param {object} path - The Path object
- * @returns {string} The actual file path
- */
-function _pathToString(path) {
-var filename = path.__Path__.join("/").replace("//", "/");
-if (!filename.startsWith("/")) {
-filename = "/" + filename;
-}
-return filename;
-}
-
-/**
  * An audio player with a play list
  */
 var AudioPlayer = function (audioElement) {
@@ -676,13 +662,13 @@
 }
 break;
   case BackgroundType.Image:
-background_filename = _pathToString(theme.background_filename);
-backgroundStyle["background-image"] = "url('file://" + background_filename + "')";
+backgroundStyle["background-image"] = "url('" + theme.background_filename + "')";
+console.warn(backgroundStyle["background-image"]);
 break;
   case BackgroundType.Video:
-background_filename = _pathToString(theme.background_filename);
 backgroundStyle["background-color"] = theme.background_border_color;
-backgroundHtml = "";
+backgroundHtml = "";
+console.warn(backgroundHtml);
 break;
   default:
 backgroundStyle["background

[Openlp-core] [Merge] lp:~phill-ridout/openlp/path_fixes into lp:openlp

2019-06-21 Thread Phill
The proposal to merge lp:~phill-ridout/openlp/path_fixes into lp:openlp has 
been updated.

Status: Needs review => Superseded

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/path_fixes/+merge/369192
-- 
Your team OpenLP Core is requested to review the proposed merge of 
lp:~phill-ridout/openlp/path_fixes into lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~phill-ridout/openlp/path_fixes into lp:openlp

2019-06-21 Thread Phill
Phill has proposed merging lp:~phill-ridout/openlp/path_fixes into lp:openlp.

Commit message:
Path fix ups

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/path_fixes/+merge/369192
-- 
Your team OpenLP Core is requested to review the proposed merge of 
lp:~phill-ridout/openlp/path_fixes into lp:openlp.
=== modified file 'openlp/core/common/json.py'
--- openlp/core/common/json.py	2019-05-26 10:30:37 +
+++ openlp/core/common/json.py	2019-06-21 21:10:01 +
@@ -111,6 +111,8 @@
 :param dict obj: A decoded JSON object
 :return: The custom object from the serialized data if the custom object is registered, else obj
 """
+if '__Path__' in obj:
+return PathSerializer.encode_json(obj, **self.kwargs)
 try:
 key = obj['json_meta']['class']
 except KeyError:
@@ -150,8 +152,8 @@
 if isinstance(obj, JSONMixin):
 return obj.json_object()
 elif obj.__class__.__name__ in _registered_classes:
-return _registered_classes[obj.__class__.__name__].json_object(obj)
-return super().default(obj)
+return _registered_classes[obj.__class__.__name__].json_object(obj, **self.kwargs)
+return super().default(obj, **self.kwargs)
 
 
 def is_serializable(obj):
@@ -174,17 +176,22 @@
 :param kwargs: Contains any extra parameters. Not used!
 :return Path: The deserialized Path object
 """
-path = Path(*obj['parts'])
+if '__Path__' in obj:
+parts = obj['__Path__']
+else:
+parts = obj['parts']
+path = Path(*parts)
 if base_path and not path.is_absolute():
 return base_path / path
 return path
 
 @classmethod
-def json_object(cls, obj, base_path=None, **kwargs):
+def json_object(cls, obj, base_path=None, js_use=False, **kwargs):
 """
 Create a dictionary that can be JSON decoded.
 
 :param Path base_path: If specified, an absolute path to make a relative path from.
+:param bool js_use: Encode the path as a uri. For example for use in the js rendering code.
 :param kwargs: Contains any extra parameters. Not used!
 :return: The dictionary representation of this Path object.
 :rtype: dict[tuple]
@@ -193,6 +200,8 @@
 if base_path:
 with suppress(ValueError):
 path = path.relative_to(base_path)
+if js_use is True:
+return path.as_uri()
 json_dict = {'parts': path.parts}
 cls.attach_meta(json_dict)
 return json_dict

=== modified file 'openlp/core/common/settings.py'
--- openlp/core/common/settings.py	2019-06-14 17:54:04 +
+++ openlp/core/common/settings.py	2019-06-21 21:10:01 +
@@ -612,7 +612,7 @@
 elif isinstance(default_value, dict):
 return {}
 elif isinstance(setting, str):
-if 'json_meta' in setting or setting.startswith('{'):
+if 'json_meta' in setting or '__Path__' in setting or setting.startswith('{'):
 return json.loads(setting, cls=OpenLPJSONDecoder)
 # Convert the setting to the correct type.
 if isinstance(default_value, bool):

=== modified file 'openlp/core/display/html/display.js'
--- openlp/core/display/html/display.js	2019-03-16 10:26:05 +
+++ openlp/core/display/html/display.js	2019-06-21 21:10:01 +
@@ -118,20 +118,6 @@
 }
 
 /**
- * The paths we get are JSON versions of Python Path objects, so let's just fix that.
- * @private
- * @param {object} path - The Path object
- * @returns {string} The actual file path
- */
-function _pathToString(path) {
-var filename = path.__Path__.join("/").replace("//", "/");
-if (!filename.startsWith("/")) {
-filename = "/" + filename;
-}
-return filename;
-}
-
-/**
  * An audio player with a play list
  */
 var AudioPlayer = function (audioElement) {
@@ -676,13 +662,13 @@
 }
 break;
   case BackgroundType.Image:
-background_filename = _pathToString(theme.background_filename);
-backgroundStyle["background-image"] = "url('file://" + background_filename + "')";
+backgroundStyle["background-image"] = "url('" + theme.background_filename + "')";
+console.warn(backgroundStyle["background-image"]);
 break;
   case BackgroundType.Video:
-background_filename = _pathToString(theme.background_filename);
 backgroundStyle["background-color"] = theme.background_border_color;
-backgroundHtml = "";
+backgroundHtml = "";
+console.warn(backgroundHtml);
 break;
   default:
 backgroundStyle["background

[Openlp-core] [Merge] lp:~phill-ridout/openlp/path_fixes into lp:openlp

2019-06-21 Thread Phill
The proposal to merge lp:~phill-ridout/openlp/path_fixes into lp:openlp has 
been updated.

Status: Needs review => Superseded

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/path_fixes/+merge/369191
-- 
Your team OpenLP Core is requested to review the proposed merge of 
lp:~phill-ridout/openlp/path_fixes into lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~phill-ridout/openlp/path_fixes into lp:openlp

2019-06-21 Thread Phill
Phill has proposed merging lp:~phill-ridout/openlp/path_fixes into lp:openlp.

Commit message:
Path fix ups

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/path_fixes/+merge/369191
-- 
Your team OpenLP Core is requested to review the proposed merge of 
lp:~phill-ridout/openlp/path_fixes into lp:openlp.
=== modified file 'openlp/core/common/json.py'
--- openlp/core/common/json.py	2019-05-26 10:30:37 +
+++ openlp/core/common/json.py	2019-06-21 20:57:21 +
@@ -111,6 +111,8 @@
 :param dict obj: A decoded JSON object
 :return: The custom object from the serialized data if the custom object is registered, else obj
 """
+if '__Path__' in obj:
+return PathSerializer.encode_json(obj, **self.kwargs)
 try:
 key = obj['json_meta']['class']
 except KeyError:
@@ -150,8 +152,8 @@
 if isinstance(obj, JSONMixin):
 return obj.json_object()
 elif obj.__class__.__name__ in _registered_classes:
-return _registered_classes[obj.__class__.__name__].json_object(obj)
-return super().default(obj)
+return _registered_classes[obj.__class__.__name__].json_object(obj, **self.kwargs)
+return super().default(obj, **self.kwargs)
 
 
 def is_serializable(obj):
@@ -174,17 +176,22 @@
 :param kwargs: Contains any extra parameters. Not used!
 :return Path: The deserialized Path object
 """
-path = Path(*obj['parts'])
+if '__Path__' in obj:
+parts = obj['__Path__']
+else:
+parts = obj['parts']
+path = Path(*parts)
 if base_path and not path.is_absolute():
 return base_path / path
 return path
 
 @classmethod
-def json_object(cls, obj, base_path=None, **kwargs):
+def json_object(cls, obj, base_path=None, js_use=False, **kwargs):
 """
 Create a dictionary that can be JSON decoded.
 
 :param Path base_path: If specified, an absolute path to make a relative path from.
+:param bool js_use: Encode the path as a uri. For example for use in the js rendering code.
 :param kwargs: Contains any extra parameters. Not used!
 :return: The dictionary representation of this Path object.
 :rtype: dict[tuple]
@@ -193,6 +200,8 @@
 if base_path:
 with suppress(ValueError):
 path = path.relative_to(base_path)
+if js_use is True:
+return path.as_uri()
 json_dict = {'parts': path.parts}
 cls.attach_meta(json_dict)
 return json_dict

=== modified file 'openlp/core/common/settings.py'
--- openlp/core/common/settings.py	2019-06-14 17:54:04 +
+++ openlp/core/common/settings.py	2019-06-21 20:57:21 +
@@ -612,7 +612,7 @@
 elif isinstance(default_value, dict):
 return {}
 elif isinstance(setting, str):
-if 'json_meta' in setting or setting.startswith('{'):
+if 'json_meta' in setting or '__Path__' in setting or setting.startswith('{'):
 return json.loads(setting, cls=OpenLPJSONDecoder)
 # Convert the setting to the correct type.
 if isinstance(default_value, bool):

=== modified file 'openlp/core/display/html/display.js'
--- openlp/core/display/html/display.js	2019-03-16 10:26:05 +
+++ openlp/core/display/html/display.js	2019-06-21 20:57:21 +
@@ -118,20 +118,6 @@
 }
 
 /**
- * The paths we get are JSON versions of Python Path objects, so let's just fix that.
- * @private
- * @param {object} path - The Path object
- * @returns {string} The actual file path
- */
-function _pathToString(path) {
-var filename = path.__Path__.join("/").replace("//", "/");
-if (!filename.startsWith("/")) {
-filename = "/" + filename;
-}
-return filename;
-}
-
-/**
  * An audio player with a play list
  */
 var AudioPlayer = function (audioElement) {
@@ -676,13 +662,13 @@
 }
 break;
   case BackgroundType.Image:
-background_filename = _pathToString(theme.background_filename);
-backgroundStyle["background-image"] = "url('file://" + background_filename + "')";
+backgroundStyle["background-image"] = "url('" + theme.background_filename + "')";
+console.warn(backgroundStyle["background-image"]);
 break;
   case BackgroundType.Video:
-background_filename = _pathToString(theme.background_filename);
 backgroundStyle["background-color"] = theme.background_border_color;
-backgroundHtml = "";
+backgroundHtml = "";
+console.warn(backgroundHtml);
 break;
   default:
 backgroundStyle["background

[Openlp-core] [Bug 1833620] [NEW] Issues exporting songs with square brackets.

2019-06-20 Thread Phill
Public bug reported:

Songs with custom tags and square brackets cannot be exported.


For example, songs with the following snippets fail to export:


[Openlp-core] [Bug 1832993] [NEW] Issues affecting custom formatting tags

2019-06-16 Thread Phill
Public bug reported:

Add a custom formatting tag to a song causes some issues:

1. The closing tags shows on the main display
2. Other formatting tags do not render correctly when custom tags are used

When inserting a custom tag by right clicking in the song editor the
closing tag is inserted but with out the '/'

** Affects: openlp
 Importance: Medium
 Status: New

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1832993

Title:
  Issues affecting custom formatting tags

Status in OpenLP:
  New

Bug description:
  Add a custom formatting tag to a song causes some issues:

  1. The closing tags shows on the main display
  2. Other formatting tags do not render correctly when custom tags are used

  When inserting a custom tag by right clicking in the song editor the
  closing tag is inserted but with out the '/'

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1832993/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


Re: [Openlp-core] [Merge] lp:~trb143/openlp/more_media into lp:openlp

2019-06-14 Thread Phill
Review: Approve


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

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


Re: [Openlp-core] [Merge] lp:~trb143/openlp/more_media into lp:openlp

2019-06-14 Thread Phill
Review: Approve


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

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


Re: [Openlp-core] [Merge] lp:~trb143/openlp/more_media into lp:openlp

2019-06-14 Thread Phill
Review: Needs Fixing

Just one inconsistency with text labels (see inline) and the failed linting, 
but other than that looks ok!

Diff comments:

> 
> === modified file 'openlp/core/ui/media/mediatab.py'
> --- openlp/core/ui/media/mediatab.py  2019-05-04 19:47:06 +
> +++ openlp/core/ui/media/mediatab.py  2019-06-14 18:00:17 +
> @@ -68,11 +68,15 @@
>  self.left_layout.addWidget(self.live_media_group_box)
>  self.stream_media_group_box = QtWidgets.QGroupBox(self.left_column)
>  self.stream_media_group_box.setObjectName('stream_media_group_box')
> -self.stream_media_layout = 
> QtWidgets.QHBoxLayout(self.stream_media_group_box)
> +self.stream_media_layout = 
> QtWidgets.QFormLayout(self.stream_media_group_box)
>  self.stream_media_layout.setObjectName('stream_media_layout')
>  self.stream_media_layout.setContentsMargins(0, 0, 0, 0)
> -self.stream_edit = QtWidgets.QLabel(self)
> -self.stream_media_layout.addWidget(self.stream_edit)
> +self.video_edit = QtWidgets.QLineEdit(self)
> +self.stream_media_layout.addRow(translate('MediaPlugin.MediaTab', 
> 'Video:'), self.video_edit)

colon here

> +self.audio_edit = QtWidgets.QLineEdit(self)
> +self.stream_media_layout.addRow(translate('MediaPlugin.MediaTab', 
> 'Audio'), self.audio_edit)

but not here

> +self.stream_cmd = QtWidgets.QLabel(self)
> +self.stream_media_layout.addWidget(self.stream_cmd)
>  self.left_layout.addWidget(self.stream_media_group_box)
>  self.vlc_arguments_group_box = QtWidgets.QGroupBox(self.left_column)
>  self.vlc_arguments_group_box.setObjectName('vlc_arguments_group_box')


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

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1790942] Re: SongSelect dialog should be closeable

2019-06-05 Thread Phill
** Changed in: openlp
   Importance: Undecided => Medium

** Changed in: openlp
   Status: New => Confirmed

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1790942

Title:
  SongSelect dialog should be closeable

Status in OpenLP:
  Confirmed

Bug description:
  When using the SongSelect import, there should be a way to close the
  import window without logging out, and the Escape key on the keyboard
  should perform this action.

  Windows 10
  OpenLP 2.4.6

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1790942/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1823021] Re: import CCLI song has no cancel option

2019-06-05 Thread Phill
*** This bug is a duplicate of bug 1790942 ***
https://bugs.launchpad.net/bugs/1790942

** This bug has been marked a duplicate of bug 1790942
   SongSelect dialog should be closeable

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1823021

Title:
  import CCLI song has no cancel option

Status in OpenLP:
  New

Bug description:
  I clicked `File->Import->CCLI SongSelect` and the dialog asked me to
  put my login details in. I don't have a login, there was no way to
  close the dialog and return to the main window. The close button was
  greyed out. I had to kill the app.

  Windows 8, OpenLP 2.4.6

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1823021/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1617592] Re: Delete bible confirmation box defaults to yes

2019-06-05 Thread Phill
** Changed in: openlp
   Status: In Progress => Confirmed

** Changed in: openlp
   Importance: Undecided => Low

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1617592

Title:
  Delete bible confirmation box defaults to yes

Status in OpenLP:
  Confirmed

Bug description:
  Trunk r2695
  Click on the red cross on the toolbar of the bibles tab in the media manager.
  A pop up appears to confirm the deletion. The "Yes" button receives by 
default. This should be "no" by default.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1617592/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1314131] Re: Screenshots link broken on Launchpad

2019-06-05 Thread Phill
** Changed in: openlp/website
   Status: Confirmed => Won't Fix

-- 
You received this bug notification because you are a member of OpenLP
Core, which is a bug assignee.
https://bugs.launchpad.net/bugs/1314131

Title:
  Screenshots link broken on Launchpad

Status in OpenLP:
  Invalid
Status in OpenLP website series:
  Won't Fix

Bug description:
  https://launchpad.net/openlp
  The "Screenshots" link below the project description is broken.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1314131/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


Re: [Openlp-core] [Merge] lp:~raoul-snyman/openlp/packaging-macos-pyro into lp:openlp/packaging

2019-06-05 Thread Phill
Review: Approve

Looks ok to me, but I cant test it!!!
-- 
https://code.launchpad.net/~raoul-snyman/openlp/packaging-macos-pyro/+merge/368364
Your team OpenLP Core is subscribed to branch lp:openlp/packaging.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


Re: [Openlp-core] [Merge] lp:~tomasgroth/openlp/presentation-beyond-last into lp:openlp

2019-06-05 Thread Phill
Review: Approve


-- 
https://code.launchpad.net/~tomasgroth/openlp/presentation-beyond-last/+merge/368353
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


Re: [Openlp-core] [Merge] lp:~bastian-germann/openlp/dependencies into lp:openlp

2019-06-03 Thread Phill
Review: Approve

Looks ok to me...
-- 
https://code.launchpad.net/~bastian-germann/openlp/dependencies/+merge/367931
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


Re: [Openlp-core] [Merge] lp:~tomasgroth/openlp/presentation-beyond-last into lp:openlp

2019-06-03 Thread Phill
Review: Needs Fixing

See line 189 for my main comment.

Others are just me being nit-picky!

Diff comments:

> 
> === modified file 'openlp/plugins/presentations/lib/impresscontroller.py'
> --- openlp/plugins/presentations/lib/impresscontroller.py 2019-05-22 
> 06:47:00 +
> +++ openlp/plugins/presentations/lib/impresscontroller.py 2019-05-29 
> 19:24:56 +
> @@ -166,6 +187,8 @@
>  Called at system exit to clean up any running presentations.
>  """
>  log.debug('Kill OpenOffice')
> +if self.presenter_screen_disabled_by_openlp:
> +self._toggle_presentation_screen(True)

is this correct with the leading underscore? or should it be 
"self.toggle_presentation_screen(True)"

>  while self.docs:
>  self.docs[0].close_presentation()
>  desktop = None
> @@ -195,6 +218,54 @@
>  except Exception:
>  log.warning('Failed to terminate OpenOffice')
>  
> +def toggle_presentation_screen(self, target_value):

Would `set_visible` be more descriptive for `target_value`?
Can you document it? I.e. ":param bool {set_visible|target_value):  "

> +"""
> +Enable or disable the Presentation Screen/Console
> +"""
> +# Create Instance of ConfigurationProvider
> +if not self.conf_provider:
> +if is_win():
> +self.conf_provider = 
> self.manager.createInstance('com.sun.star.configuration.ConfigurationProvider')
> +else:
> +self.conf_provider = self.manager.createInstanceWithContext(
> +'com.sun.star.configuration.ConfigurationProvider', 
> uno.getComponentContext())
> +# Setup lookup properties to get Impress settings
> +properties = []
> +properties.append(self.create_property('nodepath', 
> 'org.openoffice.Office.Impress'))
> +properties = tuple(properties)
> +try:
> +# Get an updateable configuration view
> +impress_conf_props = 
> self.conf_provider.createInstanceWithArguments(
> +'com.sun.star.configuration.ConfigurationUpdateAccess', 
> properties)
> +# Get the specific setting for presentation screen
> +presenter_screen_enabled = 
> impress_conf_props.getHierarchicalPropertyValue(
> +'Misc/Start/EnablePresenterScreen')
> +# If the presentation screen is enabled we disable it
> +if presenter_screen_enabled != target_value:
> +
> impress_conf_props.setHierarchicalPropertyValue('Misc/Start/EnablePresenterScreen',
>  target_value)
> +impress_conf_props.commitChanges()
> +# if target_value is False this is an attempt to disable the 
> Presenter Screen
> +# so we make a note that it has been disabled, so it can be 
> enabled again on close.
> +if target_value is False:
> +self.presenter_screen_disabled_by_openlp = True
> +except Exception as e:
> +log.exception(e)
> +trace_error_handler(log)
> +return

Not required

> +
> +def create_property(self, name, value):
> +"""
> +Create an OOo style property object which are passed into some Uno 
> methods.
> +"""

can you document `name`, `value` and the return along with their types please?

> +log.debug('create property OpenOffice')
> +if is_win():
> +property_object = 
> self.manager.Bridge_GetStruct('com.sun.star.beans.PropertyValue')
> +else:
> +property_object = PropertyValue()
> +property_object.Name = name
> +property_object.Value = value
> +return property_object
> +
>  
>  class ImpressDocument(PresentationDocument):
>  """
> @@ -483,3 +563,97 @@
>  note = ' '
>  notes.append(note)
>  self.save_titles_and_notes(titles, notes)
> +
> +
> +class SlideShowListener(SlideShowListenerImport):
> +"""
> +Listener interface to receive global slide show events.
> +"""
> +
> +def __init__(self, document):
> +"""
> +Constructor
> +
> +:param document: The ImpressDocument being presented
> +"""
> +self.document = document
> +
> +def paused(self):
> +"""
> +Notify that the slide show is paused
> +"""
> +log.debug('LibreOffice SlideShowListener event: paused')
> +
> +def resumed(self):
> +"""
> +Notify that the slide show is resumed from a paused state
> +"""
> +log.debug('LibreOffice SlideShowListener event: resumed')
> +
> +def slideTransitionStarted(self):
> +"""
> +Notify that a new slide starts to become visible.
> +"""
> +log.debug('LibreOffice SlideShowListener event: 
> slideTransitionStarted')
> +
> +def slideTransitionEnded(self):
> +"""
> +Notify 

Re: [Openlp-core] [Merge] lp:~tomasgroth/openlp/presentation-load-speedup into lp:openlp

2019-06-03 Thread Phill
Just a comment on implementation.

Diff comments:

> 
> === modified file 'openlp/core/ui/servicemanager.py'
> --- openlp/core/ui/servicemanager.py  2019-05-24 18:50:51 +
> +++ openlp/core/ui/servicemanager.py  2019-05-27 18:44:30 +
> @@ -509,7 +510,8 @@
>  service = []
>  core = {
>  'lite-service': self._save_lite,
> -'service-theme': self.service_theme
> +'service-theme': self.service_theme,
> +'openlp-servicefile-version': 3.0

Not a fan of the name, wouldn't 'version' suffice, or using floats or the 
OpenLP version number.

If we use floats, what happens if we need to make a change in say 3.0.1? 
Secondly if we change the version of OpenLP we then need to change the version 
of the service file. I would much rather go with the incremental versioning 
scheme we already use for the databases and settings class

>  }
>  service.append({'openlp_core': core})
>  return service


-- 
https://code.launchpad.net/~tomasgroth/openlp/presentation-load-speedup/+merge/367933
Your team OpenLP Core is requested to review the proposed merge of 
lp:~tomasgroth/openlp/presentation-load-speedup into lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~phill-ridout/openlp/media_ext_refactors into lp:openlp

2019-06-01 Thread Phill
The proposal to merge lp:~phill-ridout/openlp/media_ext_refactors into 
lp:openlp has been updated.

Status: Needs review => Superseded

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/media_ext_refactors/+merge/368212
-- 
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~phill-ridout/openlp/media_ext_refactors into lp:openlp

2019-06-01 Thread Phill
Phill has proposed merging lp:~phill-ridout/openlp/media_ext_refactors into 
lp:openlp.

Commit message:
refactor media extensions

Requested reviews:
  Tim Bentley (trb143)

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/media_ext_refactors/+merge/368221
-- 
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/common/json.py'
--- openlp/core/common/json.py	2019-05-23 19:33:46 +
+++ openlp/core/common/json.py	2019-06-01 07:22:55 +
@@ -23,7 +23,6 @@
 from json import JSONDecoder, JSONEncoder
 from pathlib import Path
 
-
 _registered_classes = {}
 
 

=== modified file 'openlp/core/lib/mediamanageritem.py'
--- openlp/core/lib/mediamanageritem.py	2019-05-22 06:47:00 +
+++ openlp/core/lib/mediamanageritem.py	2019-06-01 07:22:55 +
@@ -589,7 +589,7 @@
 """
 Add this item to the current service.
 
-:param item: Item to be processed
+:param QtWidgets.QListWidgetItem | QtWidgets.QTreeWidgetItem | None item: Item to be processed
 :param replace: Replace the existing item
 :param remote: Triggered from remote
 :param position: Position to place item
@@ -627,7 +627,7 @@
 def build_service_item(self, item=None, remote=False, context=ServiceItemContext.Live):
 """
 Common method for generating a service item
-:param item: Service Item to be built.
+:param QtWidgets.QListWidgetItem | QtWidgets.QTreeWidgetItem | None item: Service Item to be built.
 :param remote: Remote triggered (False)
 :param context: The context on which this is called
 """

=== modified file 'openlp/core/lib/serviceitem.py'
--- openlp/core/lib/serviceitem.py	2019-05-22 06:47:00 +
+++ openlp/core/lib/serviceitem.py	2019-06-01 07:22:55 +
@@ -593,9 +593,11 @@
 """
 return not bool(self.slides)
 
-def validate_item(self, suffix_list=None):
+def validate_item(self, suffixes=None):
 """
 Validates a service item to make sure it is valid
+
+:param set[str] suffixes: A set of vaild suffixes
 """
 self.is_valid = True
 for slide in self.slides:
@@ -612,8 +614,8 @@
 if not os.path.exists(file_name):
 self.is_valid = False
 break
-if suffix_list and not self.is_text():
+if suffixes and not self.is_text():
 file_suffix = slide['title'].split('.')[-1]
-if file_suffix.lower() not in suffix_list:
+if file_suffix.lower() not in suffixes:
 self.is_valid = False
 break

=== modified file 'openlp/core/ui/media/mediacontroller.py'
--- openlp/core/ui/media/mediacontroller.py	2019-05-05 05:59:29 +
+++ openlp/core/ui/media/mediacontroller.py	2019-06-01 07:22:55 +
@@ -44,7 +44,7 @@
 from openlp.core.ui import DisplayControllerType
 from openlp.core.ui.media import MediaState, ItemMediaInfo, MediaType, parse_optical_path
 from openlp.core.ui.media.endpoint import media_endpoint
-from openlp.core.ui.media.vlcplayer import VlcPlayer, get_vlc
+from openlp.core.ui.media.vlcplayer import AUDIO_EXT, VIDEO_EXT, VlcPlayer, get_vlc
 
 
 log = logging.getLogger(__name__)
@@ -65,11 +65,6 @@
 current_media_players is an array of player instances keyed on ControllerType.
 
 """
-def __init__(self, parent=None):
-"""
-Constructor
-"""
-super(MediaController, self).__init__(parent)
 
 def setup(self):
 self.vlc_player = None
@@ -95,28 +90,8 @@
 Registry().register_function('songs_hide', self.media_hide)
 Registry().register_function('songs_blank', self.media_blank)
 Registry().register_function('songs_unblank', self.media_unblank)
-Registry().register_function('mediaitem_suffixes', self._generate_extensions_lists)
 register_endpoint(media_endpoint)
 
-def _generate_extensions_lists(self):
-"""
-Set the active players and available media files
-"""
-suffix_list = []
-self.audio_extensions_list = []
-if self.vlc_player.is_active:
-for item in self.vlc_player.audio_extensions_list:
-if item not in self.audio_extensions_list:
-self.audio_extensions_list.append(item)
-suffix_list.append(item[2:])
-self.video_extensions_list = []
-if self.vlc_player.is_active:
-for item in self.vlc_player.video_extensions_list:
-if item not in self.video_extensions_list:
-self.video_extensions_list.append(item)
-suffix_list.append(item[2:])

[Openlp-core] [Merge] lp:~phill-ridout/openlp/media_ext_refactors into lp:openlp

2019-05-31 Thread Phill
Phill has proposed merging lp:~phill-ridout/openlp/media_ext_refactors into 
lp:openlp.

Commit message:
refactor media extensions

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/media_ext_refactors/+merge/368212
-- 
Your team OpenLP Core is requested to review the proposed merge of 
lp:~phill-ridout/openlp/media_ext_refactors into lp:openlp.
=== modified file 'openlp/core/common/json.py'
--- openlp/core/common/json.py	2019-05-23 19:33:46 +
+++ openlp/core/common/json.py	2019-05-31 20:34:31 +
@@ -23,7 +23,6 @@
 from json import JSONDecoder, JSONEncoder
 from pathlib import Path
 
-
 _registered_classes = {}
 
 

=== modified file 'openlp/core/lib/mediamanageritem.py'
--- openlp/core/lib/mediamanageritem.py	2019-05-22 06:47:00 +
+++ openlp/core/lib/mediamanageritem.py	2019-05-31 20:34:31 +
@@ -589,7 +589,7 @@
 """
 Add this item to the current service.
 
-:param item: Item to be processed
+:param QtWidgets.QListWidgetItem | QtWidgets.QTreeWidgetItem | None item: Item to be processed
 :param replace: Replace the existing item
 :param remote: Triggered from remote
 :param position: Position to place item
@@ -627,7 +627,7 @@
 def build_service_item(self, item=None, remote=False, context=ServiceItemContext.Live):
 """
 Common method for generating a service item
-:param item: Service Item to be built.
+:param QtWidgets.QListWidgetItem | QtWidgets.QTreeWidgetItem | None item: Service Item to be built.
 :param remote: Remote triggered (False)
 :param context: The context on which this is called
 """

=== modified file 'openlp/core/lib/serviceitem.py'
--- openlp/core/lib/serviceitem.py	2019-05-22 06:47:00 +
+++ openlp/core/lib/serviceitem.py	2019-05-31 20:34:31 +
@@ -593,9 +593,11 @@
 """
 return not bool(self.slides)
 
-def validate_item(self, suffix_list=None):
+def validate_item(self, suffixes=None):
 """
 Validates a service item to make sure it is valid
+
+:param set[str] suffixes: A set of vaild suffixes
 """
 self.is_valid = True
 for slide in self.slides:
@@ -612,8 +614,8 @@
 if not os.path.exists(file_name):
 self.is_valid = False
 break
-if suffix_list and not self.is_text():
+if suffixes and not self.is_text():
 file_suffix = slide['title'].split('.')[-1]
-if file_suffix.lower() not in suffix_list:
+if file_suffix.lower() not in suffixes:
 self.is_valid = False
 break

=== modified file 'openlp/core/ui/media/mediacontroller.py'
--- openlp/core/ui/media/mediacontroller.py	2019-05-05 05:59:29 +
+++ openlp/core/ui/media/mediacontroller.py	2019-05-31 20:34:31 +
@@ -44,7 +44,7 @@
 from openlp.core.ui import DisplayControllerType
 from openlp.core.ui.media import MediaState, ItemMediaInfo, MediaType, parse_optical_path
 from openlp.core.ui.media.endpoint import media_endpoint
-from openlp.core.ui.media.vlcplayer import VlcPlayer, get_vlc
+from openlp.core.ui.media.vlcplayer import AUDIO_EXT, VIDEO_EXT, VlcPlayer, get_vlc
 
 
 log = logging.getLogger(__name__)
@@ -65,11 +65,6 @@
 current_media_players is an array of player instances keyed on ControllerType.
 
 """
-def __init__(self, parent=None):
-"""
-Constructor
-"""
-super(MediaController, self).__init__(parent)
 
 def setup(self):
 self.vlc_player = None
@@ -95,28 +90,8 @@
 Registry().register_function('songs_hide', self.media_hide)
 Registry().register_function('songs_blank', self.media_blank)
 Registry().register_function('songs_unblank', self.media_unblank)
-Registry().register_function('mediaitem_suffixes', self._generate_extensions_lists)
 register_endpoint(media_endpoint)
 
-def _generate_extensions_lists(self):
-"""
-Set the active players and available media files
-"""
-suffix_list = []
-self.audio_extensions_list = []
-if self.vlc_player.is_active:
-for item in self.vlc_player.audio_extensions_list:
-if item not in self.audio_extensions_list:
-self.audio_extensions_list.append(item)
-suffix_list.append(item[2:])
-self.video_extensions_list = []
-if self.vlc_player.is_active:
-for item in self.vlc_player.video_extensions_list:
-if item not in self.video_extensions_list:
-self.video_extensi

Re: [Openlp-core] [Merge] lp:~tomasgroth/openlp/presentation-beyond-last into lp:openlp

2019-05-23 Thread Phill
Whats happrning with the commented out code?

Diff comments:

> 
> === modified file 'openlp/plugins/presentations/lib/impresscontroller.py'
> --- openlp/plugins/presentations/lib/impresscontroller.py 2019-04-13 
> 13:00:22 +
> +++ openlp/plugins/presentations/lib/impresscontroller.py 2019-05-23 
> 20:31:03 +
> @@ -483,3 +560,100 @@
>  note = ' '
>  notes.append(note)
>  self.save_titles_and_notes(titles, notes)
> +
> +if is_win():
> +property_object = 
> self.controller.manager.Bridge_GetStruct('com.sun.star.beans.PropertyValue')
> +
> +
> +class SlideShowListener(SlideShowListenerImport):
> +"""
> +Listener interface to receive global slide show events.
> +"""
> +
> +def __init__(self, document):
> +"""
> +Constructor
> +
> +:param document: The ImpressDocument being presented
> +"""
> +self.document = document
> +
> +def paused(self):
> +"""
> +Notify that the slide show is paused
> +"""
> +log.debug('LibreOffice SlideShowListener event: paused')
> +
> +def resumed(self):
> +"""
> +Notify that the slide show is resumed from a paused state
> +"""
> +log.debug('LibreOffice SlideShowListener event: resumed')
> +
> +def slideTransitionStarted(self):
> +"""
> +Notify that a new slide starts to become visible.
> +"""
> +log.debug('LibreOffice SlideShowListener event: 
> slideTransitionStarted')
> +
> +def slideTransitionEnded(self):
> +"""
> +Notify that the slide transtion of the current slide ended.
> +"""
> +log.debug('LibreOffice SlideShowListener event: 
> slideTransitionEnded')
> +
> +def slideAnimationsEnded(self):
> +"""
> +Notify that the last animation from the main sequence of the current 
> slide has ended.
> +"""
> +log.debug('LibreOffice SlideShowListener event: 
> slideAnimationsEnded')
> +# if not Registry().get('main_window').isActiveWindow():

Commented out code?

> +#log.debug('main window is not in focus - should update 
> slidecontroller')
> +#Registry().execute('slidecontroller_live_change', 
> self.document.control.getCurrentSlideIndex() + 1)
> +
> +def slideEnded(self, reverse):
> +"""
> +Notify that the current slide has ended, e.g. the user has clicked 
> on the slide. Calling displaySlide()
> +twice will not issue this event.
> +"""
> +log.debug('LibreOffice SlideShowListener event: slideEnded %d' % 
> reverse)
> +if reverse:
> +self.document.slide_ended = False
> +self.document.slide_ended_reverse = True
> +else:
> +self.document.slide_ended = True
> +self.document.slide_ended_reverse = False
> +
> +def hyperLinkClicked(self, hyperLink):
> +"""
> +Notifies that a hyperlink has been clicked.
> +"""
> +log.debug('LibreOffice SlideShowListener event: hyperLinkClicked %s' 
> % hyperLink)
> +
> +def disposing(self, source):
> +"""
> +gets called when the broadcaster is about to be disposed.
> +:param source:
> +"""
> +log.debug('LibreOffice SlideShowListener event: disposing')
> +
> +def beginEvent(self, node):
> +"""
> +This event is raised when the element local timeline begins to play.
> +:param node:
> +"""
> +log.debug('LibreOffice SlideShowListener event: beginEvent')
> +
> +def endEvent(self, node):
> +"""
> +This event is raised at the active end of the element.
> +:param node:
> +"""
> +log.debug('LibreOffice SlideShowListener event: endEvent')
> +
> +def repeat(self, node):
> +"""
> +This event is raised when the element local timeline repeats.
> +:param node:
> +"""
> +log.debug('LibreOffice SlideShowListener event: repeat')


-- 
https://code.launchpad.net/~tomasgroth/openlp/presentation-beyond-last/+merge/367863
Your team OpenLP Core is requested to review the proposed merge of 
lp:~tomasgroth/openlp/presentation-beyond-last into lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~phill-ridout/openlp/json_refactors into lp:openlp

2019-05-23 Thread Phill
Phill has proposed merging lp:~phill-ridout/openlp/json_refactors into 
lp:openlp.

Commit message:
rework json handling for custom objects
refactor path file

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/json_refactors/+merge/367868

The standard library now has much better support for paths, so I've removed the 
patches that were implemented.
Rework the custom object json handling

-- 
Your team OpenLP Core is requested to review the proposed merge of 
lp:~phill-ridout/openlp/json_refactors into lp:openlp.
=== modified file 'openlp/core/api/deploy.py'
--- openlp/core/api/deploy.py	2019-04-13 13:00:22 +
+++ openlp/core/api/deploy.py	2019-05-23 20:08:25 +
@@ -34,7 +34,7 @@
 Process the downloaded zip file and add to the correct directory
 
 :param str zip_name: the zip file name to be processed
-:param openlp.core.common.path.Path app_root_path: The directory to expand the zip to
+:param pathlib.Path app_root_path: The directory to expand the zip to
 
 :return: None
 """

=== modified file 'openlp/core/api/endpoint/controller.py'
--- openlp/core/api/endpoint/controller.py	2019-04-13 13:00:22 +
+++ openlp/core/api/endpoint/controller.py	2019-05-23 20:08:25 +
@@ -24,11 +24,11 @@
 import os
 import urllib.error
 import urllib.request
+from pathlib import Path
 
 from openlp.core.api.http import requires_auth
 from openlp.core.api.http.endpoint import Endpoint
 from openlp.core.common.applocation import AppLocation
-from openlp.core.common.path import Path
 from openlp.core.common.registry import Registry
 from openlp.core.common.settings import Settings
 from openlp.core.lib import create_thumb

=== modified file 'openlp/core/app.py'
--- openlp/core/app.py	2019-05-04 09:13:29 +
+++ openlp/core/app.py	2019-05-23 20:08:25 +
@@ -32,6 +32,8 @@
 import time
 import os
 from datetime import datetime
+from pathlib import Path
+from shutil import copytree
 from traceback import format_exception
 
 from PyQt5 import QtCore, QtWebEngineWidgets, QtWidgets  # noqa
@@ -41,7 +43,7 @@
 from openlp.core.common.applocation import AppLocation
 from openlp.core.loader import loader
 from openlp.core.common.i18n import LanguageManager, UiStrings, translate
-from openlp.core.common.path import copytree, create_paths, Path
+from openlp.core.common.path import create_paths
 from openlp.core.common.registry import Registry
 from openlp.core.common.settings import Settings
 from openlp.core.display.screens import ScreenList
@@ -316,7 +318,7 @@
 """
 Setup our logging using log_path
 
-:param openlp.core.common.path.Path log_path: The file to save the log to.
+:param Path log_path: The file to save the log to.
 :rtype: None
 """
 create_paths(log_path, do_not_log=True)

=== modified file 'openlp/core/common/__init__.py'
--- openlp/core/common/__init__.py	2019-05-04 11:49:20 +
+++ openlp/core/common/__init__.py	2019-05-23 20:08:25 +
@@ -142,7 +142,7 @@
 """
 Convert a path to a module name (i.e openlp.core.common)
 
-:param openlp.core.common.path.Path path: The path to convert to a module name.
+:param pathlib.Path path: The path to convert to a module name.
 :return: The module name.
 :rtype: str
 """
@@ -371,7 +371,7 @@
 """
 Deletes a file from the system.
 
-:param openlp.core.common.path.Path file_path: The file, including path, to delete.
+:param pathlib.Path file_path: The file, including path, to delete.
 :return: True if the deletion was successful, or the file never existed. False otherwise.
 :rtype: bool
 """
@@ -407,7 +407,7 @@
 """
 Validate that the file is not an image file.
 
-:param openlp.core.common.path.Path file_path: The file to be checked.
+:param pathlib.Path file_path: The file to be checked.
 :return: If the file is not an image
 :rtype: bool
 """
@@ -435,7 +435,7 @@
 """
 Function that checks whether a binary exists.
 
-:param openlp.core.common.path.Path program_path: The full path to the binary to check.
+:param pathlib.Path program_path: The full path to the binary to check.
 :return: program output to be parsed
 :rtype: bytes
 """
@@ -462,7 +462,7 @@
 """
 Utility function to incrementally detect the file encoding.
 
-:param openlp.core.common.path.Path file_path: Filename for the file to determine the encoding for.
+:param pathlib.Path file_path: Filename for the file to determine the encoding for.
 :return: The name of the encoding detected
 :rtype: str
 """

=== modified file 'openlp/core/common/applocation.py'
--- openlp/core/common/applocation.py	2019-04-13 13:00:22 +
+++ openlp/core/common/applocation.p

[Openlp-core] [Bug 1660480] Re: Filetype OSZL is not named in Windows Registry

2019-05-13 Thread Phill
** Changed in: openlp
 Assignee: (unassigned) => Raoul Snyman (raoul-snyman)

** Branch linked: lp:~raoul-snyman/openlp/wix-packaging

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1660480

Title:
  Filetype OSZL is not named in Windows Registry

Status in OpenLP:
  New

Bug description:
  Platform:
  OS: Windows 10 Home
  OpenLP: 2.4.4
  Severity: Super Minor

  What happened:
  In Windows Explorer, I noticed that OSZ files are called "OpenLP Service" in 
the Type column.  OSZL files are called "OSZL File".  It seems that Reg Key 
HKEY_CLASSES_ROOT\.oszl (default) doesn't get set properly during install.

  What I expected to happen:
  I expected the (default) key for HKEY_CLASSES_ROOT\.oszl to be set to "OpenLP 
Service", similar to the OSZ filetype.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1660480/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1266270] Re: OpenLP hides dialogs whe using "play slides in loop" on OSX

2019-05-13 Thread Phill
** Changed in: openlp/trunk
   Status: Confirmed => Fix Released

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1266270

Title:
  OpenLP hides dialogs whe using "play slides in loop" on OSX

Status in OpenLP:
  Fix Released
Status in OpenLP 2.0 series:
  Won't Fix
Status in OpenLP trunk series:
  Fix Released

Bug description:
  OpenLP 2.0.3 on OSX 10.6.8

  Tested on Ubuntu 13.10 and appears fine.

  Send a group of images live and start the images looping using the
  "play slides in loop" then click on "Save as". The "Save as" dialogue
  disappears when the live image changes.

  The first time that this happened OpenLP crashed with the following
  log: http://pastebin.com/MY3NnUWK

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1266270/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1168493] Re: disappearing dialog 'Select Presentation(s)' on OSX

2019-05-13 Thread Phill
2.4.x is running PyQt5 could somebody test if this bug still exists?

** Changed in: openlp
   Status: Confirmed => Fix Released

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1168493

Title:
  disappearing dialog 'Select Presentation(s)' on OSX

Status in OpenLP:
  Fix Released

Bug description:
  With the development version on OS X I'm not able to load images or
  any media since dialog 'Select Presentation(s)' and similar dialogs by
  media and image plugins disappear immediately without any time to be
  able to select any file.

  - It happens mostly when the powerpoint integration is disabled.
  - also last time it happened even with presentations plugin disabled.
  - so it seems it's not related to the powerpoint integration

  My guess would be that something is stealing focus of the openlp
  window or pyqt generates any signals that causes this dialog to
  disappear.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1168493/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


Re: [Openlp-core] [Merge] lp:~alisonken1/openlp/pjlink2-v07 into lp:openlp

2019-05-13 Thread Phill
Review: Needs Fixing

You have quite a few "assert (chk == E_NO_AUTHENTICATION), ''" the brackets 
are not needed.

Also you're "@patch.object(openlp.core.projectors.pjlinkcommands, 'log')" a 
lot, have you considered putting it in the setUp method?

Other than that looks good to me!
-- 
https://code.launchpad.net/~alisonken1/openlp/pjlink2-v07/+merge/367304
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~phill-ridout/openlp/fixes-II into lp:openlp

2019-05-04 Thread Phill
Phill has proposed merging lp:~phill-ridout/openlp/fixes-II into lp:openlp.

Commit message:
Just to trigger the tests :-)

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/fixes-II/+merge/366951
-- 
Your team OpenLP Core is requested to review the proposed merge of 
lp:~phill-ridout/openlp/fixes-II into lp:openlp.
=== modified file 'openlp/core/app.py'
--- openlp/core/app.py	2019-05-01 19:22:01 +
+++ openlp/core/app.py	2019-05-04 18:27:23 +
@@ -287,12 +287,12 @@
 return QtWidgets.QApplication.event(self, event)
 
 
-def parse_options(args=None):
+def parse_options():
 """
 Parse the command line arguments
 
-:param args: list of command line arguments
-:return: a tuple of parsed options of type optparse.Value and a list of remaining argsZ
+:return: An :object:`argparse.Namespace` insatnce containing the parsed args.
+:rtype: argparse.Namespace
 """
 # Set up command line options.
 parser = argparse.ArgumentParser(prog='openlp')
@@ -307,9 +307,9 @@
 dir_name=os.path.join('', '..', '..')))
 parser.add_argument('-w', '--no-web-server', dest='no_web_server', action='store_true',
 help='Turn off the Web and Socket Server ')
-parser.add_argument('rargs', nargs='?', default=[])
-# Parse command line options and deal with them. Use args supplied pragmatically if possible.
-return parser.parse_args(args) if args else parser.parse_args()
+parser.add_argument('rargs', nargs='*', default=[])
+# Parse command line options and deal with them.
+return parser.parse_args()
 
 
 def set_up_logging(log_path):
@@ -328,13 +328,11 @@
 print('Logging to: {name}'.format(name=file_path))
 
 
-def main(args=None):
+def main():
 """
 The main function which parses command line options and then runs
-
-:param args: Some args
 """
-args = parse_options(args)
+args = parse_options()
 qt_args = ['--disable-web-security']
 # qt_args = []
 if args and args.loglevel.lower() in ['d', 'debug']:

=== modified file 'openlp/core/common/__init__.py'
--- openlp/core/common/__init__.py	2019-04-13 13:00:22 +
+++ openlp/core/common/__init__.py	2019-05-04 18:27:23 +
@@ -134,8 +134,8 @@
 importlib.import_module(module_name)
 except (ImportError, OSError):
 # On some platforms importing vlc.py might cause OSError exceptions. (e.g. Mac OS X)
-log.warning('Failed to import {module_name} on path {extension_path}'
-.format(module_name=module_name, extension_path=extension_path))
+log.exception('Failed to import {module_name} on path {extension_path}'
+  .format(module_name=module_name, extension_path=extension_path))
 
 
 def path_to_module(path):
@@ -463,8 +463,8 @@
 Utility function to incrementally detect the file encoding.
 
 :param openlp.core.common.path.Path file_path: Filename for the file to determine the encoding for.
-:return: A dict with the keys 'encoding' and 'confidence'
-:rtype: dict[str, float]
+:return: The name of the encoding detected
+:rtype: str
 """
 detector = UniversalDetector()
 try:
@@ -477,7 +477,7 @@
 except OSError:
 log.exception('Error detecting file encoding')
 finally:
-return detector.close()
+return detector.close()['encoding']
 
 
 def normalize_str(irregular_string):

=== modified file 'openlp/core/display/window.py'
--- openlp/core/display/window.py	2019-04-13 13:00:22 +
+++ openlp/core/display/window.py	2019-05-04 18:27:23 +
@@ -180,7 +180,7 @@
 """
 Set the URL of the webview
 
-:param str url: The URL to set
+:param QtCore.QUrl | str url: The URL to set
 """
 if not isinstance(url, QtCore.QUrl):
 url = QtCore.QUrl(url)

=== modified file 'openlp/core/lib/mediamanageritem.py'
--- openlp/core/lib/mediamanageritem.py	2019-04-28 19:21:23 +
+++ openlp/core/lib/mediamanageritem.py	2019-05-04 18:27:23 +
@@ -29,7 +29,6 @@
 
 from openlp.core.common.i18n import UiStrings, translate
 from openlp.core.common.mixins import RegistryProperties
-from openlp.core.common.path import path_to_str, str_to_path
 from openlp.core.common.registry import Registry
 from openlp.core.common.settings import Settings
 from openlp.core.lib import ServiceItemContext
@@ -333,7 +332,7 @@
 self.validate_and_load(file_paths)
 self.application.set_normal_cursor()
 
-def load_file(self, data):
+def handle_mime_data(self, data):
 """
 Turn file from Drag and Drop into an array so the Validate code can run it.
 
@@ -379,11 +378,11 @@
 duplicates_found = False
 files_added = Fa

[Openlp-core] [Merge] lp:~phill-ridout/openlp/fixes-II into lp:openlp

2019-05-04 Thread Phill
Phill has proposed merging lp:~phill-ridout/openlp/fixes-II into lp:openlp.

Commit message:
Just to trigger the tests :-)

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/fixes-II/+merge/366949
-- 
Your team OpenLP Core is requested to review the proposed merge of 
lp:~phill-ridout/openlp/fixes-II into lp:openlp.
=== modified file 'openlp/core/app.py'
--- openlp/core/app.py	2019-05-01 19:22:01 +
+++ openlp/core/app.py	2019-05-04 18:26:39 +
@@ -287,12 +287,12 @@
 return QtWidgets.QApplication.event(self, event)
 
 
-def parse_options(args=None):
+def parse_options():
 """
 Parse the command line arguments
 
-:param args: list of command line arguments
-:return: a tuple of parsed options of type optparse.Value and a list of remaining argsZ
+:return: An :object:`argparse.Namespace` insatnce containing the parsed args.
+:rtype: argparse.Namespace
 """
 # Set up command line options.
 parser = argparse.ArgumentParser(prog='openlp')
@@ -307,9 +307,9 @@
 dir_name=os.path.join('', '..', '..')))
 parser.add_argument('-w', '--no-web-server', dest='no_web_server', action='store_true',
 help='Turn off the Web and Socket Server ')
-parser.add_argument('rargs', nargs='?', default=[])
-# Parse command line options and deal with them. Use args supplied pragmatically if possible.
-return parser.parse_args(args) if args else parser.parse_args()
+parser.add_argument('rargs', nargs='*', default=[])
+# Parse command line options and deal with them.
+return parser.parse_args()
 
 
 def set_up_logging(log_path):
@@ -328,13 +328,11 @@
 print('Logging to: {name}'.format(name=file_path))
 
 
-def main(args=None):
+def main():
 """
 The main function which parses command line options and then runs
-
-:param args: Some args
 """
-args = parse_options(args)
+args = parse_options()
 qt_args = ['--disable-web-security']
 # qt_args = []
 if args and args.loglevel.lower() in ['d', 'debug']:

=== modified file 'openlp/core/common/__init__.py'
--- openlp/core/common/__init__.py	2019-04-13 13:00:22 +
+++ openlp/core/common/__init__.py	2019-05-04 18:26:39 +
@@ -134,8 +134,8 @@
 importlib.import_module(module_name)
 except (ImportError, OSError):
 # On some platforms importing vlc.py might cause OSError exceptions. (e.g. Mac OS X)
-log.warning('Failed to import {module_name} on path {extension_path}'
-.format(module_name=module_name, extension_path=extension_path))
+log.exception('Failed to import {module_name} on path {extension_path}'
+  .format(module_name=module_name, extension_path=extension_path))
 
 
 def path_to_module(path):
@@ -463,8 +463,8 @@
 Utility function to incrementally detect the file encoding.
 
 :param openlp.core.common.path.Path file_path: Filename for the file to determine the encoding for.
-:return: A dict with the keys 'encoding' and 'confidence'
-:rtype: dict[str, float]
+:return: The name of the encoding detected
+:rtype: str
 """
 detector = UniversalDetector()
 try:
@@ -477,7 +477,7 @@
 except OSError:
 log.exception('Error detecting file encoding')
 finally:
-return detector.close()
+return detector.close()['encoding']
 
 
 def normalize_str(irregular_string):

=== modified file 'openlp/core/display/window.py'
--- openlp/core/display/window.py	2019-04-13 13:00:22 +
+++ openlp/core/display/window.py	2019-05-04 18:26:39 +
@@ -180,7 +180,7 @@
 """
 Set the URL of the webview
 
-:param str url: The URL to set
+:param QtCore.QUrl | str url: The URL to set
 """
 if not isinstance(url, QtCore.QUrl):
 url = QtCore.QUrl(url)

=== modified file 'openlp/core/lib/mediamanageritem.py'
--- openlp/core/lib/mediamanageritem.py	2019-04-28 19:21:23 +
+++ openlp/core/lib/mediamanageritem.py	2019-05-04 18:26:39 +
@@ -29,7 +29,6 @@
 
 from openlp.core.common.i18n import UiStrings, translate
 from openlp.core.common.mixins import RegistryProperties
-from openlp.core.common.path import path_to_str, str_to_path
 from openlp.core.common.registry import Registry
 from openlp.core.common.settings import Settings
 from openlp.core.lib import ServiceItemContext
@@ -333,7 +332,7 @@
 self.validate_and_load(file_paths)
 self.application.set_normal_cursor()
 
-def load_file(self, data):
+def handle_mime_data(self, data):
 """
 Turn file from Drag and Drop into an array so the Validate code can run it.
 
@@ -379,11 +378,11 @@
 duplicates_found = False
 files_added = Fa

[Openlp-core] [Merge] lp:~phill-ridout/openlp/fixes-II into lp:openlp

2019-05-04 Thread Phill
Phill has proposed merging lp:~phill-ridout/openlp/fixes-II into lp:openlp.

Commit message:
Just to trigger the tests :-)

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/fixes-II/+merge/366950
-- 
Your team OpenLP Core is requested to review the proposed merge of 
lp:~phill-ridout/openlp/fixes-II into lp:openlp.
=== modified file 'openlp/core/app.py'
--- openlp/core/app.py	2019-05-01 19:22:01 +
+++ openlp/core/app.py	2019-05-04 18:26:49 +
@@ -287,12 +287,12 @@
 return QtWidgets.QApplication.event(self, event)
 
 
-def parse_options(args=None):
+def parse_options():
 """
 Parse the command line arguments
 
-:param args: list of command line arguments
-:return: a tuple of parsed options of type optparse.Value and a list of remaining argsZ
+:return: An :object:`argparse.Namespace` insatnce containing the parsed args.
+:rtype: argparse.Namespace
 """
 # Set up command line options.
 parser = argparse.ArgumentParser(prog='openlp')
@@ -307,9 +307,9 @@
 dir_name=os.path.join('', '..', '..')))
 parser.add_argument('-w', '--no-web-server', dest='no_web_server', action='store_true',
 help='Turn off the Web and Socket Server ')
-parser.add_argument('rargs', nargs='?', default=[])
-# Parse command line options and deal with them. Use args supplied pragmatically if possible.
-return parser.parse_args(args) if args else parser.parse_args()
+parser.add_argument('rargs', nargs='*', default=[])
+# Parse command line options and deal with them.
+return parser.parse_args()
 
 
 def set_up_logging(log_path):
@@ -328,13 +328,11 @@
 print('Logging to: {name}'.format(name=file_path))
 
 
-def main(args=None):
+def main():
 """
 The main function which parses command line options and then runs
-
-:param args: Some args
 """
-args = parse_options(args)
+args = parse_options()
 qt_args = ['--disable-web-security']
 # qt_args = []
 if args and args.loglevel.lower() in ['d', 'debug']:

=== modified file 'openlp/core/common/__init__.py'
--- openlp/core/common/__init__.py	2019-04-13 13:00:22 +
+++ openlp/core/common/__init__.py	2019-05-04 18:26:49 +
@@ -134,8 +134,8 @@
 importlib.import_module(module_name)
 except (ImportError, OSError):
 # On some platforms importing vlc.py might cause OSError exceptions. (e.g. Mac OS X)
-log.warning('Failed to import {module_name} on path {extension_path}'
-.format(module_name=module_name, extension_path=extension_path))
+log.exception('Failed to import {module_name} on path {extension_path}'
+  .format(module_name=module_name, extension_path=extension_path))
 
 
 def path_to_module(path):
@@ -463,8 +463,8 @@
 Utility function to incrementally detect the file encoding.
 
 :param openlp.core.common.path.Path file_path: Filename for the file to determine the encoding for.
-:return: A dict with the keys 'encoding' and 'confidence'
-:rtype: dict[str, float]
+:return: The name of the encoding detected
+:rtype: str
 """
 detector = UniversalDetector()
 try:
@@ -477,7 +477,7 @@
 except OSError:
 log.exception('Error detecting file encoding')
 finally:
-return detector.close()
+return detector.close()['encoding']
 
 
 def normalize_str(irregular_string):

=== modified file 'openlp/core/display/window.py'
--- openlp/core/display/window.py	2019-04-13 13:00:22 +
+++ openlp/core/display/window.py	2019-05-04 18:26:49 +
@@ -180,7 +180,7 @@
 """
 Set the URL of the webview
 
-:param str url: The URL to set
+:param QtCore.QUrl | str url: The URL to set
 """
 if not isinstance(url, QtCore.QUrl):
 url = QtCore.QUrl(url)

=== modified file 'openlp/core/lib/mediamanageritem.py'
--- openlp/core/lib/mediamanageritem.py	2019-04-28 19:21:23 +
+++ openlp/core/lib/mediamanageritem.py	2019-05-04 18:26:49 +
@@ -29,7 +29,6 @@
 
 from openlp.core.common.i18n import UiStrings, translate
 from openlp.core.common.mixins import RegistryProperties
-from openlp.core.common.path import path_to_str, str_to_path
 from openlp.core.common.registry import Registry
 from openlp.core.common.settings import Settings
 from openlp.core.lib import ServiceItemContext
@@ -333,7 +332,7 @@
 self.validate_and_load(file_paths)
 self.application.set_normal_cursor()
 
-def load_file(self, data):
+def handle_mime_data(self, data):
 """
 Turn file from Drag and Drop into an array so the Validate code can run it.
 
@@ -379,11 +378,11 @@
 duplicates_found = False
 files_added = Fa

[Openlp-core] [Merge] lp:~phill-ridout/openlp/fixes-II into lp:openlp

2019-05-04 Thread Phill
The proposal to merge lp:~phill-ridout/openlp/fixes-II into lp:openlp has been 
updated.

Status: Needs review => Superseded

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/fixes-II/+merge/366950
-- 
Your team OpenLP Core is requested to review the proposed merge of 
lp:~phill-ridout/openlp/fixes-II into lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~phill-ridout/openlp/fixes-II into lp:openlp

2019-05-04 Thread Phill
The proposal to merge lp:~phill-ridout/openlp/fixes-II into lp:openlp has been 
updated.

Status: Work in progress => Superseded

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/fixes-II/+merge/366948
-- 
Your team OpenLP Core is requested to review the proposed merge of 
lp:~phill-ridout/openlp/fixes-II into lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


Re: [Openlp-core] [Merge] lp:~alisonken1/openlp/pjlink2_v04 into lp:openlp

2019-05-04 Thread Phill
Review: Approve

Looks ok to me
-- 
https://code.launchpad.net/~alisonken1/openlp/pjlink2_v04/+merge/366946
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


Re: [Openlp-core] [Merge] lp:~bastian-germann/openlp/pymupdf into lp:openlp

2019-05-02 Thread Phill
Review: Approve


-- 
https://code.launchpad.net/~bastian-germann/openlp/pymupdf/+merge/366851
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


  1   2   3   4   5   6   7   8   9   10   >