Skip to content

Commit

Permalink
Merge from 3.x: PR #4749
Browse files Browse the repository at this point in the history
Fixes #3609
  • Loading branch information
ccordoba12 committed Jul 26, 2017
2 parents 1ef3a74 + 8716f06 commit 9a89f78
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 2 additions & 4 deletions spyder/app/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -2807,14 +2807,12 @@ def _check_updates_ready(self):
url_i = 'http://pythonhosted.org/spyder/installation.html'

# Define the custom QMessageBox
box = MessageCheckBox()
box = MessageCheckBox(icon=QMessageBox.Information,
parent=self)
box.setWindowTitle(_("Spyder updates"))
box.set_checkbox_text(_("Check for updates on startup"))
box.setStandardButtons(QMessageBox.Ok)
box.setDefaultButton(QMessageBox.Ok)
# The next line is commented because it freezes the dialog.
# For now there is then no info icon. This solves issue #3609.
# box.setIcon(QMessageBox.Information)

# Adjust the checkbox depending on the stored configuration
section, option = 'main', 'check_updates_on_startup'
Expand Down
6 changes: 5 additions & 1 deletion spyder/widgets/helperwidgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"""

# Third party imports
from qtpy import PYQT5
from qtpy.QtCore import QPoint, QSize, Qt
from qtpy.QtGui import QAbstractTextDocumentLayout, QPainter, QTextDocument
from qtpy.QtWidgets import (QApplication, QCheckBox, QLineEdit, QMessageBox,
Expand Down Expand Up @@ -72,7 +73,10 @@ def __init__(self, *args, **kwargs):

# Access the Layout of the MessageBox to add the Checkbox
layout = self.layout()
layout.addLayout(check_layout, 1, 1)
if PYQT5:
layout.addLayout(check_layout, 1, 2)
else:
layout.addLayout(check_layout, 1, 1)

# --- Public API
# Methods to access the checkbox
Expand Down

0 comments on commit 9a89f78

Please sign in to comment.