self.create_status_label.setMinimumHeight(font_metrics.height()+2*(font_metrics.height()+font_metrics.leading()))# reserve space for 3 lines
font_metrics=self.email_note_label.fontMetrics()
self.email_note_label.setMinimumWidth(font_metrics.width(u'The E-mail address is used when sending voicemail'))# hack to make text justification look nice everywhere
self.email_note_label.setMinimumWidth(font_metrics.width('The E-mail address is used when sending voicemail'))# hack to make text justification look nice everywhere
@@ -409,20 +407,18 @@ class ChatInputLock(base_class, ui_class):
painter.drawPrimitive(QStyle.PE_Widget,option)
classLockType(object):
__metaclass__=MarkerType
classLockType(object,metaclass=MarkerType):
note_text=None
button_text=None
classEncryptionLock(LockType):
note_text=u'Encryption has been terminated by the other party'
button_text=u'Confirm'
note_text='Encryption has been terminated by the other party'
button_text='Confirm'
classChatTextInput(QTextEdit):
textEntered=pyqtSignal(unicode)
textEntered=pyqtSignal(str)
lockEngaged=pyqtSignal(object)
lockReleased=pyqtSignal(object)
...
...
@@ -710,8 +706,8 @@ class ChatWidget(base_class, ui_class):
def_print_scrollbar_position(self):
frame=self.chat_view.page().mainFrame()
print"%d out of %d, %d+%d=%d (%d)"%(frame.scrollBarValue(Qt.Vertical),frame.scrollBarMaximum(Qt.Vertical),frame.scrollBarValue(Qt.Vertical),self.chat_view.size().height(),
print("%d out of %d, %d+%d=%d (%d)"%(frame.scrollBarValue(Qt.Vertical),frame.scrollBarMaximum(Qt.Vertical),frame.scrollBarValue(Qt.Vertical),self.chat_view.size().height(),
@@ -2581,7 +2577,7 @@ class HtmlProcessor(object):
@classmethod
defautolink(cls,content):
ifisinstance(content,basestring):
ifisinstance(content,str):
doc=html.fromstring(content)
autolink(doc,link_regexes=cls._autolink_re)
returnhtml.tostring(doc,encoding='unicode')# add method='xml' to get <br/> xhtml style tags and doctype=doc.getroottree().docinfo.doctype for prepending the DOCTYPE line
self.audio_output_device_button.setItemData(1,Separator)# prevent the separator from being selected (must have different itemData than the None device)