10 import os |
10 import os |
11 import mimetypes |
11 import mimetypes |
12 import smtplib |
12 import smtplib |
13 import socket |
13 import socket |
14 |
14 |
15 from PyQt4.QtCore import Qt, pyqtSlot |
15 from PyQt4.QtCore import Qt, pyqtSlot, qVersion |
16 from PyQt4.QtGui import QCursor, QHeaderView, QLineEdit, QDialog, QInputDialog, \ |
16 from PyQt4.QtGui import QCursor, QHeaderView, QLineEdit, QDialog, QInputDialog, \ |
17 QApplication, QDialogButtonBox, QTreeWidgetItem |
17 QApplication, QDialogButtonBox, QTreeWidgetItem |
18 |
18 |
19 from E5Gui import E5MessageBox, E5FileDialog |
19 from E5Gui import E5MessageBox, E5FileDialog |
20 |
20 |
91 |
91 |
92 height = self.height() |
92 height = self.height() |
93 self.mainSplitter.setSizes([int(0.7 * height), int(0.3 * height)]) |
93 self.mainSplitter.setSizes([int(0.7 * height), int(0.3 * height)]) |
94 |
94 |
95 self.attachments.headerItem().setText(self.attachments.columnCount(), "") |
95 self.attachments.headerItem().setText(self.attachments.columnCount(), "") |
96 self.attachments.header().setResizeMode(QHeaderView.Interactive) |
96 if qVersion() >= "5.0.0": |
|
97 self.attachments.header().setSectionResizeMode(QHeaderView.Interactive) |
|
98 else: |
|
99 self.attachments.header().setResizeMode(QHeaderView.Interactive) |
97 |
100 |
98 sig = Preferences.getUser("Signature") |
101 sig = Preferences.getUser("Signature") |
99 if sig: |
102 if sig: |
100 self.message.setPlainText(sig) |
103 self.message.setPlainText(sig) |
101 cursor = self.message.textCursor() |
104 cursor = self.message.textCursor() |