self.create_status_label.setMinimumHeight(font_metrics.height()+2*(font_metrics.height()+font_metrics.leading()))# reserve space for 3 lines
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()
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):
...
@@ -409,20 +407,18 @@ class ChatInputLock(base_class, ui_class):
painter.drawPrimitive(QStyle.PE_Widget,option)
painter.drawPrimitive(QStyle.PE_Widget,option)
classLockType(object):
classLockType(object,metaclass=MarkerType):
__metaclass__=MarkerType
note_text=None
note_text=None
button_text=None
button_text=None
classEncryptionLock(LockType):
classEncryptionLock(LockType):
note_text=u'Encryption has been terminated by the other party'
note_text='Encryption has been terminated by the other party'
button_text=u'Confirm'
button_text='Confirm'
classChatTextInput(QTextEdit):
classChatTextInput(QTextEdit):
textEntered=pyqtSignal(unicode)
textEntered=pyqtSignal(str)
lockEngaged=pyqtSignal(object)
lockEngaged=pyqtSignal(object)
lockReleased=pyqtSignal(object)
lockReleased=pyqtSignal(object)
...
@@ -710,8 +706,8 @@ class ChatWidget(base_class, ui_class):
...
@@ -710,8 +706,8 @@ class ChatWidget(base_class, ui_class):
def_print_scrollbar_position(self):
def_print_scrollbar_position(self):
frame=self.chat_view.page().mainFrame()
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):
...
@@ -2581,7 +2577,7 @@ class HtmlProcessor(object):
@classmethod
@classmethod
defautolink(cls,content):
defautolink(cls,content):
ifisinstance(content,basestring):
ifisinstance(content,str):
doc=html.fromstring(content)
doc=html.fromstring(content)
autolink(doc,link_regexes=cls._autolink_re)
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
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)
self.audio_output_device_button.setItemData(1,Separator)# prevent the separator from being selected (must have different itemData than the None device)