This commit is contained in:
Kovid Goyal 2014-02-06 09:59:48 +05:30
parent 4c036eeedd
commit 0630056139

View File

@ -79,7 +79,6 @@ class MessageBox(QDialog, Ui_Dialog): # {{{
self.do_resize() self.do_resize()
def toggle_det_msg(self, *args): def toggle_det_msg(self, *args):
vis = unicode(self.det_msg_toggle.text()) == self.hide_det_msg vis = unicode(self.det_msg_toggle.text()) == self.hide_det_msg
self.det_msg_toggle.setText(self.show_det_msg if vis else self.det_msg_toggle.setText(self.show_det_msg if vis else
@ -109,7 +108,7 @@ class MessageBox(QDialog, Ui_Dialog): # {{{
self.bb.button(self.bb.Yes if self.default_yes else self.bb.No self.bb.button(self.bb.Yes if self.default_yes else self.bb.No
).setFocus(Qt.OtherFocusReason) ).setFocus(Qt.OtherFocusReason)
except: except:
pass# Buttons were changed pass # Buttons were changed
else: else:
self.bb.button(self.bb.Ok).setFocus(Qt.OtherFocusReason) self.bb.button(self.bb.Ok).setFocus(Qt.OtherFocusReason)
return ret return ret
@ -360,7 +359,8 @@ class JobError(QDialog): # {{{
self.pop() self.pop()
def pop(self): def pop(self):
if not self.queue or self.isVisible(): return if not self.queue or self.isVisible():
return
title, msg, det_msg = self.queue.pop(0) title, msg, det_msg = self.queue.pop(0)
self.setWindowTitle(title) self.setWindowTitle(title)
self.msg_label.setText(msg) self.msg_label.setText(msg)