[Openlp-core] macOS Test Results: Passed

2019-05-29 Thread Raoul Snyman
macOS tests passed!
-- 
https://code.launchpad.net/~tomasgroth/openlp/presentation-beyond-last/+merge/368091
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] Linting: Passed

2019-05-29 Thread Raoul Snyman
Linting passed!
-- 
https://code.launchpad.net/~tomasgroth/openlp/presentation-beyond-last/+merge/368091
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] Linux Test Results: Passed

2019-05-29 Thread Raoul Snyman
Linux tests passed!
-- 
https://code.launchpad.net/~tomasgroth/openlp/presentation-beyond-last/+merge/368091
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:~tomasgroth/openlp/presentation-beyond-last into lp:openlp

2019-05-29 Thread Tomas Groth
Tomas Groth has proposed merging lp:~tomasgroth/openlp/presentation-beyond-last 
into lp:openlp.

Commit message:
Make it possible to go to next or previous service item when stepping through a 
presentation.
Disables impress and powerpoint presentation console.

Requested reviews:
  Tim Bentley (trb143)
Related bugs:
  Bug #1165855 in OpenLP: "Presentations do not advance correctly despite 
settings"
  https://bugs.launchpad.net/openlp/+bug/1165855
  Bug #1798651 in OpenLP: "Impress Presentation Console should be disabled by 
OpenLP"
  https://bugs.launchpad.net/openlp/+bug/1798651

For more details, see:
https://code.launchpad.net/~tomasgroth/openlp/presentation-beyond-last/+merge/368091
-- 
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/common/registry.py'
--- openlp/core/common/registry.py	2019-04-13 13:00:22 +
+++ openlp/core/common/registry.py	2019-05-29 19:24:56 +
@@ -146,7 +146,7 @@
 try:
 log.debug('Running function {} for {}'.format(function, event))
 result = function(*args, **kwargs)
-if result:
+if result is not None:
 results.append(result)
 except TypeError:
 # Who has called me can help in debugging

=== 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-29 19:24:56 +
@@ -976,8 +976,10 @@
 prev_item_last_slide = None
 service_iterator = QtWidgets.QTreeWidgetItemIterator(self.service_manager_list)
 while service_iterator.value():
+# Found the selected/current service item
 if service_iterator.value() == selected:
 if last_slide and prev_item_last_slide:
+# Go to the last slide of the previous service item
 pos = prev_item.data(0, QtCore.Qt.UserRole)
 check_expanded = self.service_items[pos - 1]['expanded']
 self.service_manager_list.setCurrentItem(prev_item_last_slide)
@@ -986,13 +988,17 @@
 self.make_live()
 self.service_manager_list.setCurrentItem(prev_item)
 elif prev_item:
+# Go to the first slide of the previous service item
 self.service_manager_list.setCurrentItem(prev_item)
 self.make_live()
 return
+# Found the previous service item root
 if service_iterator.value().parent() is None:
 prev_item = service_iterator.value()
+# Found the last slide of the previous item
 if service_iterator.value().parent() is prev_item:
 prev_item_last_slide = service_iterator.value()
+# Go to next item in the tree
 service_iterator += 1
 
 def on_set_item(self, message):

=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py	2019-05-22 06:47:00 +
+++ openlp/core/ui/slidecontroller.py	2019-05-29 19:24:56 +
@@ -1261,9 +1261,18 @@
 if not self.service_item:
 return
 if self.service_item.is_command():
-Registry().execute('{text}_next'.format(text=self.service_item.name.lower()),
-   [self.service_item, self.is_live])
-if self.is_live:
+past_end = Registry().execute('{text}_next'.format(text=self.service_item.name.lower()),
+  [self.service_item, self.is_live])
+# Check if we have gone past the end of the last slide
+if self.is_live and past_end and past_end[0]:
+if wrap is None:
+if self.slide_limits == SlideLimits.Wrap:
+self.on_slide_selected_index([0])
+elif self.is_live and self.slide_limits == SlideLimits.Next:
+self.service_next()
+elif wrap:
+self.on_slide_selected_index([0])
+elif self.is_live:
 self.update_preview()
 else:
 row = self.preview_widget.current_slide_number() + 1
@@ -1290,9 +1299,16 @@
 if not self.service_item:
 return
 if self.service_item.is_command():
-Registry().execute('{text}_previous'.format(text=self.service_item.name.lower()),
-   [self.service_item, self.is_live])
-if self.is_live:
+before_start = Registry().execute('{text}_previous'.format(text=self.service_item.name.lower()),
+  [self.service_item, self.is_live])
+# Check id we have tried to go before that start slide
+if self.is_live and before_start and before_start[0]:
+if 

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

2019-05-29 Thread Tomas Groth
The proposal to merge lp:~tomasgroth/openlp/presentation-beyond-last into 
lp:openlp has been updated.

Status: Needs review => Superseded

For more details, see:
https://code.launchpad.net/~tomasgroth/openlp/presentation-beyond-last/+merge/367932
-- 
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