openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #17376
[Merge] lp:~googol/openlp/bug-1014422 into lp:openlp
Andreas Preikschat has proposed merging lp:~googol/openlp/bug-1014422 into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Related bugs:
Bug #1014422 in OpenLP: "X11 Over ride being on by default causes gnome-shell to become unusable"
https://bugs.launchpad.net/openlp/+bug/1014422
For more details, see:
https://code.launchpad.net/~googol/openlp/bug-1014422/+merge/128502
Hello,
- fixed bug 1014422 ('X11 Over ride being on by default causes gnome-shell to become unusable')
I asked wrst to test this, but I thought I asked you for feedback anyhow. I have some concerns with how we fix such bugs. When I look at the maindisplay I see a couple of other fixes of the same kind. And I don't think that we actually want to fix bugs like this. (In a few years time our logic is still the same (and hopefully makes sense), but what is with such fixes? Who knows when what fix is not needed anylonger (because gnome/qt fixed it)?)
What do you think? What is the best thing to do?
--
https://code.launchpad.net/~googol/openlp/bug-1014422/+merge/128502
Your team OpenLP Core is requested to review the proposed merge of lp:~googol/openlp/bug-1014422 into lp:openlp.
=== modified file 'openlp/core/ui/advancedtab.py'
--- openlp/core/ui/advancedtab.py 2012-09-17 22:20:38 +0000
+++ openlp/core/ui/advancedtab.py 2012-10-08 14:24:27 +0000
@@ -29,12 +29,12 @@
The :mod:`advancedtab` provides an advanced settings facility.
"""
from datetime import datetime, timedelta
-
-from PyQt4 import QtCore, QtGui
-
import logging
import os
import sys
+
+from PyQt4 import QtCore, QtGui
+
from openlp.core.lib import SettingsTab, translate, build_icon, Receiver
from openlp.core.lib.settings import Settings
from openlp.core.lib.ui import UiStrings
@@ -432,8 +432,7 @@
translate('OpenLP.AdvancedTab',
'<strong>WARNING:</strong> New data directory location contains '
'OpenLP data files. These files WILL be replaced during a copy.'))
- self.x11GroupBox.setTitle(translate('OpenLP.AdvancedTab',
- 'X11'))
+ self.x11GroupBox.setTitle(translate('OpenLP.AdvancedTab', 'X11'))
self.x11BypassCheckBox.setText(translate('OpenLP.AdvancedTab',
'Bypass X11 Window Manager'))
# Slide Limits
@@ -493,8 +492,14 @@
QtCore.QVariant(True)).toBool()
self.serviceNameCheckBox.setChecked(default_service_enabled)
self.serviceNameCheckBoxToggled(default_service_enabled)
- self.x11BypassCheckBox.setChecked(
- settings.value(u'x11 bypass wm', QtCore.QVariant(True)).toBool())
+ # Fix for bug #1014422.
+ x11_bypass_default = True
+ if sys.platform.startswith(u'linux'):
+ # Default to False on Gnome.
+ x11_bypass_default = bool(not
+ os.environ.get(u'GNOME_DESKTOP_SESSION_ID'))
+ self.x11BypassCheckBox.setChecked(settings.value(
+ u'x11 bypass wm', QtCore.QVariant(x11_bypass_default)).toBool())
self.defaultColor = settings.value(u'default color',
QtCore.QVariant(u'#ffffff')).toString()
self.defaultFileEdit.setText(settings.value(u'default image',
@@ -766,7 +771,7 @@
self.dataExists = False
self.dataDirectoryCopyCheckBox.setChecked(True)
self.newDataDirectoryHasFilesLabel.hide()
-
+
def onDataDirectoryCancelButtonClicked(self):
"""
Cancel the data directory location change
=== modified file 'openlp/core/ui/maindisplay.py'
--- openlp/core/ui/maindisplay.py 2012-09-12 21:43:31 +0000
+++ openlp/core/ui/maindisplay.py 2012-10-08 14:24:27 +0000
@@ -31,6 +31,7 @@
"""
import cgi
import logging
+import os
import sys
from PyQt4 import QtCore, QtGui, QtWebKit, QtOpenGL
@@ -135,8 +136,14 @@
self.setStyleSheet(u'border: 0px; margin: 0px; padding: 0px;')
windowFlags = QtCore.Qt.FramelessWindowHint | QtCore.Qt.Tool | \
QtCore.Qt.WindowStaysOnTopHint
+ # Fix for bug #1014422.
+ x11_bypass_default = True
+ if sys.platform.startswith(u'linux'):
+ # Default to False on Gnome.
+ x11_bypass_default = bool(not
+ os.environ.get(u'GNOME_DESKTOP_SESSION_ID'))
if Settings().value(u'advanced/x11 bypass wm',
- QtCore.QVariant(True)).toBool():
+ QtCore.QVariant(x11_bypass_default)).toBool():
windowFlags |= QtCore.Qt.X11BypassWindowManagerHint
# TODO: The following combination of windowFlags works correctly
# on Mac OS X. For next OpenLP version we should test it on other
Follow ups