~suutari-olli/openlp/escape-fixes-1294111-1497637

« back to all changes in this revision

Viewing changes to openlp/plugins/remotes/remoteplugin.py

  • Committer: suutari-olli
  • Date: 2016-01-07 02:53:59 UTC
  • mfrom: (2557.2.31 openlp)
  • Revision ID: suutari.olli@gmail.com-20160107025359-q2feybbwxaoihqxr
Merge to trunk on 1/7/2015.

I noticed this branch also seems to be fixing this bug:
https://bugs.launchpad.net/openlp/+bug/1531691

However, escape item still remains buggy with problems related to resuming
video and presentations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
###############################################################################
5
5
# OpenLP - Open Source Lyrics Projection                                      #
6
6
# --------------------------------------------------------------------------- #
7
 
# Copyright (c) 2008-2015 OpenLP Developers                                   #
 
7
# Copyright (c) 2008-2016 OpenLP Developers                                   #
8
8
# --------------------------------------------------------------------------- #
9
9
# This program is free software; you can redistribute it and/or modify it     #
10
10
# under the terms of the GNU General Public License as published by the Free  #
22
22
 
23
23
import logging
24
24
 
25
 
from PyQt4 import QtGui
 
25
from PyQt5 import QtWidgets
26
26
 
27
27
from openlp.core.lib import Plugin, StringContent, translate, build_icon
28
28
from openlp.plugins.remotes.lib import RemoteTab, OpenLPServer
63
63
        super(RemotesPlugin, self).initialise()
64
64
        self.server = OpenLPServer()
65
65
        if not hasattr(self, 'remote_server_icon'):
66
 
            self.remote_server_icon = QtGui.QLabel(self.main_window.status_bar)
67
 
            size_policy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
 
66
            self.remote_server_icon = QtWidgets.QLabel(self.main_window.status_bar)
 
67
            size_policy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
68
68
            size_policy.setHorizontalStretch(0)
69
69
            size_policy.setVerticalStretch(0)
70
70
            size_policy.setHeightForWidth(self.remote_server_icon.sizePolicy().hasHeightForWidth())
71
71
            self.remote_server_icon.setSizePolicy(size_policy)
72
 
            self.remote_server_icon.setFrameShadow(QtGui.QFrame.Plain)
 
72
            self.remote_server_icon.setFrameShadow(QtWidgets.QFrame.Plain)
73
73
            self.remote_server_icon.setLineWidth(1)
74
74
            self.remote_server_icon.setScaledContents(True)
75
75
            self.remote_server_icon.setFixedSize(20, 20)
117
117
        Called when Config is changed to requests a restart with the server on new address or port
118
118
        """
119
119
        log.debug('remote config changed')
120
 
        QtGui.QMessageBox.information(self.main_window,
121
 
                                      translate('RemotePlugin', 'Server Config Change'),
122
 
                                      translate('RemotePlugin', 'Server configuration changes will require a restart '
123
 
                                                'to take effect.'),
124
 
                                      QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
 
120
        QtWidgets.QMessageBox.information(self.main_window,
 
121
                                          translate('RemotePlugin', 'Server Config Change'),
 
122
                                          translate('RemotePlugin',
 
123
                                                    'Server configuration changes will require a restart '
 
124
                                                    'to take effect.'),
 
125
                                          QtWidgets.QMessageBox.StandardButtons(QtWidgets.QMessageBox.Ok))