openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #22591
[Merge] lp:~mzibricky/openlp/bug-1247661-2.0 into lp:openlp/2.0
matysek has proposed merging lp:~mzibricky/openlp/bug-1247661-2.0 into lp:openlp/2.0.
Requested reviews:
OpenLP Core (openlp-core)
Related bugs:
Bug #1247661 in OpenLP: "Cannot restore OpenLP after minimising on OSX"
https://bugs.launchpad.net/openlp/+bug/1247661
For more details, see:
https://code.launchpad.net/~mzibricky/openlp/bug-1247661-2.0/+merge/203884
This is a workaround for OSX for the bug #1247661 with the dock icon click.
The user has to first switch to another app for the workaround to work.
--
https://code.launchpad.net/~mzibricky/openlp/bug-1247661-2.0/+merge/203884
Your team OpenLP Core is requested to review the proposed merge of lp:~mzibricky/openlp/bug-1247661-2.0 into lp:openlp/2.0.
=== modified file 'openlp/core/__init__.py'
--- openlp/core/__init__.py 2014-01-14 19:25:18 +0000
+++ openlp/core/__init__.py 2014-01-30 07:33:45 +0000
@@ -220,8 +220,15 @@
log.debug(u'Got open file event for %s!', file_name)
self.args.insert(0, unicode(file_name))
return True
- else:
- return QtGui.QApplication.event(self, event)
+ # Mac OS X should restore app window when user clicked on the OpenLP icon
+ # in the Dock bar. However, OpenLP constists of multiple windows and this
+ # does not work. This workaround fixes that.
+ # The main OpenLP window is restored when it was previously minimized.
+ elif event.type() == QtCore.QEvent.ApplicationActivate:
+ if sys.platform.startswith('darwin') and self.mainWindow.isMinimized():
+ self.mainWindow.showNormal()
+ return True
+ return QtGui.QApplication.event(self, event)
def set_up_logging(log_path):
Follow ups