Adjusted ui
This commit is contained in:
parent
2fc6de3af0
commit
87753491a1
@ -23,17 +23,19 @@ from collections import defaultdict
|
||||
|
||||
from aqt.qt import *
|
||||
from ..lang import _
|
||||
from ..context import APP_ICON
|
||||
|
||||
|
||||
__all__ = ['ProgressWindow']
|
||||
|
||||
|
||||
_INFO_TEMPLATE = u''.join([
|
||||
_('QUERIED') + u'<br>' + 45 * u'-' + u'<br>',
|
||||
_('SUCCESS') + u' {} ' + _('WORDS') + u'<br>',
|
||||
_('SKIPED') + u' {} ' + _('WORDS') + u'<br>',
|
||||
_('UPDATE') + u' {} ' + _('FIELDS') + u'<br>',
|
||||
_('FAILURE') + u' {} ' + _('WORDS') + u''
|
||||
u'<strong>' + _('QUERIED') + u'</strong>',
|
||||
u'<p>' + 45 * u'-' + u'</p>',
|
||||
u'<p>' + _('SUCCESS') + u' <b>{}</b> ' + _('WORDS') + u'</p>',
|
||||
u'<p>' + _('SKIPED') + u' <b>{}</b> ' + _('WORDS') + u'</p>',
|
||||
u'<p>' + _('UPDATE') + u' <b>{}</b> ' + _('FIELDS') + u'</p>',
|
||||
u'<p>' + _('FAILURE') + u' <b>{}</b> ' + _('WORDS') + u'</p>',
|
||||
])
|
||||
|
||||
|
||||
@ -72,7 +74,6 @@ class ProgressWindow(object):
|
||||
fields_number,
|
||||
fails_number
|
||||
)
|
||||
|
||||
self._update(label=number_info, value=words_number+skips_number+fails_number)
|
||||
self._win.adjustSize()
|
||||
|
||||
@ -90,7 +91,13 @@ class ProgressWindow(object):
|
||||
self._win.setWindowModality(Qt.ApplicationModal)
|
||||
self._win.setCancelButton(None)
|
||||
self._win.canceled.connect(self.finish)
|
||||
self._win.setWindowTitle("Querying...")
|
||||
self._win.setWindowTitle("FastWQ - Querying...")
|
||||
self._win.setModal(True)
|
||||
self._win.setWindowFlags(
|
||||
self._win.windowFlags() &
|
||||
~Qt.WindowContextHelpButtonHint
|
||||
)
|
||||
self._win.setWindowIcon(APP_ICON)
|
||||
self._win.setAutoReset(True)
|
||||
self._win.setAutoClose(True)
|
||||
self._win.setMinimum(0)
|
||||
|
||||
@ -1,68 +1,48 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'updates.ui'
|
||||
#
|
||||
# Created: Sat Sep 10 10:16:01 2016
|
||||
# by: PyQt4 UI code generator 4.11.2
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from aqt.qt import *
|
||||
|
||||
try:
|
||||
_fromUtf8 = QtCore.QString.fromUtf8
|
||||
except AttributeError:
|
||||
def _fromUtf8(s):
|
||||
return s
|
||||
|
||||
try:
|
||||
_encoding = QtGui.QApplication.UnicodeUTF8
|
||||
_encoding = QApplication.UnicodeUTF8
|
||||
def _translate(context, text, disambig):
|
||||
return QtGui.QApplication.translate(context, text, disambig, _encoding)
|
||||
return QApplication.translate(context, text, disambig, _encoding)
|
||||
except AttributeError:
|
||||
def _translate(context, text, disambig):
|
||||
return QtGui.QApplication.translate(context, text, disambig)
|
||||
return QApplication.translate(context, text, disambig)
|
||||
|
||||
class Ui_DialogUpdates(object):
|
||||
def setupUi(self, DialogUpdates):
|
||||
DialogUpdates.setObjectName(_fromUtf8("DialogUpdates"))
|
||||
DialogUpdates.setObjectName(u"DialogUpdates")
|
||||
DialogUpdates.resize(500, 400)
|
||||
self.verticalLayout = QtGui.QVBoxLayout(DialogUpdates)
|
||||
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
|
||||
self.labelUpdates = QtGui.QLabel(DialogUpdates)
|
||||
self.verticalLayout = QVBoxLayout(DialogUpdates)
|
||||
self.verticalLayout.setObjectName(u"verticalLayout")
|
||||
self.labelUpdates = QLabel(DialogUpdates)
|
||||
self.labelUpdates.setWordWrap(True)
|
||||
self.labelUpdates.setOpenExternalLinks(True)
|
||||
self.labelUpdates.setObjectName(_fromUtf8("labelUpdates"))
|
||||
self.labelUpdates.setObjectName(u"labelUpdates")
|
||||
self.verticalLayout.addWidget(self.labelUpdates)
|
||||
self.textBrowser = QtGui.QTextBrowser(DialogUpdates)
|
||||
self.textBrowser.setObjectName(_fromUtf8("textBrowser"))
|
||||
self.textBrowser = QTextBrowser(DialogUpdates)
|
||||
self.textBrowser.setObjectName(u"textBrowser")
|
||||
self.verticalLayout.addWidget(self.textBrowser)
|
||||
self.horizontalLayout = QtGui.QHBoxLayout()
|
||||
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
|
||||
#spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||
#self.horizontalLayout.addItem(spacerItem)
|
||||
#self.always = QtGui.QPushButton(DialogUpdates)
|
||||
#self.always.setObjectName(_fromUtf8("always"))
|
||||
#self.horizontalLayout.addWidget(self.always)
|
||||
self.update = QtGui.QPushButton(DialogUpdates)
|
||||
self.update.setObjectName(_fromUtf8("update"))
|
||||
self.horizontalLayout.addWidget(self.update, 0, QtCore.Qt.AlignCenter)
|
||||
#self.dont = QtGui.QPushButton(DialogUpdates)
|
||||
#self.dont.setObjectName(_fromUtf8("dont"))
|
||||
#self.horizontalLayout.addWidget(self.dont)
|
||||
#self.never = QtGui.QPushButton(DialogUpdates)
|
||||
#self.never.setObjectName(_fromUtf8("never"))
|
||||
#self.horizontalLayout.addWidget(self.never)
|
||||
self.horizontalLayout = QHBoxLayout()
|
||||
self.horizontalLayout.setObjectName(u"horizontalLayout")
|
||||
self.update = QPushButton(DialogUpdates)
|
||||
self.update.setObjectName(u"update")
|
||||
self.horizontalLayout.addWidget(self.update, 0, Qt.AlignCenter)
|
||||
self.verticalLayout.addLayout(self.horizontalLayout)
|
||||
|
||||
self.retranslateUi(DialogUpdates)
|
||||
QtCore.QMetaObject.connectSlotsByName(DialogUpdates)
|
||||
QMetaObject.connectSlotsByName(DialogUpdates)
|
||||
|
||||
def retranslateUi(self, DialogUpdates):
|
||||
DialogUpdates.setWindowTitle(_translate("DialogUpdates", "FastWQ - Updater", None))
|
||||
self.labelUpdates.setText(_translate("DialogUpdates", "<html><head/><body><p>A new version of {0} is available for download! </p><p>Do you want to update {1}to version {2}?</p><p>Changes from your version are listed below:</p></body></html>", None))
|
||||
#self.always.setText(_translate("DialogUpdates", "Always update", None))
|
||||
self.labelUpdates.setText(_translate(
|
||||
"DialogUpdates",
|
||||
"<html><head/><body>\
|
||||
<p>A new version of {0} is available for download! </p>\
|
||||
<p>Do you want to update {1}to version {2}?</p>\
|
||||
<p>Changes from your version are listed below:</p>\
|
||||
</body></html>",
|
||||
None
|
||||
))
|
||||
self.update.setText(_translate("DialogUpdates", "Update", None))
|
||||
#self.dont.setText(_translate("DialogUpdates", "Don\'t update", None))
|
||||
#self.never.setText(_translate("DialogUpdates", "Never", None))
|
||||
|
||||
|
||||
@ -149,7 +149,7 @@ class QueryWorkerManager(object):
|
||||
else:
|
||||
self.update_progress()
|
||||
mw.app.processEvents()
|
||||
worker.wait(100)
|
||||
worker.wait(30)
|
||||
self.progress.finish()
|
||||
|
||||
@QtCore.pyqtSlot(object)
|
||||
|
||||
@ -23,17 +23,19 @@ from collections import defaultdict
|
||||
|
||||
from aqt.qt import *
|
||||
from ..lang import _
|
||||
from ..context import APP_ICON
|
||||
|
||||
|
||||
__all__ = ['ProgressWindow']
|
||||
|
||||
|
||||
_INFO_TEMPLATE = u''.join([
|
||||
_('QUERIED') + u'<br>' + 45 * u'-' + u'<br>',
|
||||
_('SUCCESS') + u' {} ' + _('WORDS') + u'<br>',
|
||||
_('SKIPED') + u' {} ' + _('WORDS') + u'<br>',
|
||||
_('UPDATE') + u' {} ' + _('FIELDS') + u'<br>',
|
||||
_('FAILURE') + u' {} ' + _('WORDS') + u''
|
||||
u'<strong>' + _('QUERIED') + u'</strong>',
|
||||
u'<p>' + 45 * u'-' + u'</p>',
|
||||
u'<p>' + _('SUCCESS') + u' <b>{}</b> ' + _('WORDS') + u'</p>',
|
||||
u'<p>' + _('SKIPED') + u' <b>{}</b> ' + _('WORDS') + u'</p>',
|
||||
u'<p>' + _('UPDATE') + u' <b>{}</b> ' + _('FIELDS') + u'</p>',
|
||||
u'<p>' + _('FAILURE') + u' <b>{}</b> ' + _('WORDS') + u'</p>',
|
||||
])
|
||||
|
||||
|
||||
@ -72,7 +74,6 @@ class ProgressWindow(object):
|
||||
fields_number,
|
||||
fails_number
|
||||
)
|
||||
|
||||
self._update(label=number_info, value=words_number+skips_number+fails_number)
|
||||
self._win.adjustSize()
|
||||
|
||||
@ -90,7 +91,13 @@ class ProgressWindow(object):
|
||||
self._win.setWindowModality(Qt.ApplicationModal)
|
||||
self._win.setCancelButton(None)
|
||||
self._win.canceled.connect(self.finish)
|
||||
self._win.setWindowTitle("Querying...")
|
||||
self._win.setWindowTitle("FastWQ - Querying...")
|
||||
self._win.setModal(True)
|
||||
self._win.setWindowFlags(
|
||||
self._win.windowFlags() &
|
||||
~Qt.WindowContextHelpButtonHint
|
||||
)
|
||||
self._win.setWindowIcon(APP_ICON)
|
||||
self._win.setAutoReset(True)
|
||||
self._win.setAutoClose(True)
|
||||
self._win.setMinimum(0)
|
||||
|
||||
@ -1,12 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'updates.ui'
|
||||
#
|
||||
# Created: Sat Sep 10 10:16:01 2016
|
||||
# by: PyQt4 UI code generator 4.11.2
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
from aqt.qt import *
|
||||
|
||||
try:
|
||||
@ -33,20 +26,9 @@ class Ui_DialogUpdates(object):
|
||||
self.verticalLayout.addWidget(self.textBrowser)
|
||||
self.horizontalLayout = QHBoxLayout()
|
||||
self.horizontalLayout.setObjectName(u"horizontalLayout")
|
||||
#spacerItem = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
|
||||
#self.horizontalLayout.addItem(spacerItem)
|
||||
#self.always = QPushButton(DialogUpdates)
|
||||
#self.always.setObjectName(u"always"))
|
||||
#self.horizontalLayout.addWidget(self.always)
|
||||
self.update = QPushButton(DialogUpdates)
|
||||
self.update.setObjectName(u"update")
|
||||
self.horizontalLayout.addWidget(self.update, 0, Qt.AlignCenter)
|
||||
#self.dont = QPushButton(DialogUpdates)
|
||||
#self.dont.setObjectName(u"dont"))
|
||||
#self.horizontalLayout.addWidget(self.dont)
|
||||
#self.never = QPushButton(DialogUpdates)
|
||||
#self.never.setObjectName(u"never"))
|
||||
#self.horizontalLayout.addWidget(self.never)
|
||||
self.verticalLayout.addLayout(self.horizontalLayout)
|
||||
|
||||
self.retranslateUi(DialogUpdates)
|
||||
@ -54,9 +36,13 @@ class Ui_DialogUpdates(object):
|
||||
|
||||
def retranslateUi(self, DialogUpdates):
|
||||
DialogUpdates.setWindowTitle(_translate("DialogUpdates", "FastWQ - Updater", None))
|
||||
self.labelUpdates.setText(_translate("DialogUpdates", "<html><head/><body><p>A new version of {0} is available for download! </p><p>Do you want to update {1}to version {2}?</p><p>Changes from your version are listed below:</p></body></html>", None))
|
||||
#self.always.setText(_translate("DialogUpdates", "Always update", None))
|
||||
self.labelUpdates.setText(_translate(
|
||||
"DialogUpdates",
|
||||
"<html><head/><body>\
|
||||
<p>A new version of {0} is available for download! </p>\
|
||||
<p>Do you want to update {1}to version {2}?</p>\
|
||||
<p>Changes from your version are listed below:</p>\
|
||||
</body></html>",
|
||||
None
|
||||
))
|
||||
self.update.setText(_translate("DialogUpdates", "Update", None))
|
||||
#self.dont.setText(_translate("DialogUpdates", "Don\'t update", None))
|
||||
#self.never.setText(_translate("DialogUpdates", "Never", None))
|
||||
|
||||
|
||||
@ -150,7 +150,7 @@ class QueryWorkerManager(object):
|
||||
else:
|
||||
self.update_progress()
|
||||
mw.app.processEvents()
|
||||
worker.wait(100)
|
||||
worker.wait(30)
|
||||
self.progress.finish()
|
||||
|
||||
def handle_flush(self, note):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user