def crawl(links): blacklist = Blacklist.factory("url", list(links)) links_to_process = deque(blacklist.remove_blacklisted()) email_blacklist = Blacklist(scrub_words=[ 'example', 'email', 'support', 'domain', 'orders', 'info', 'github', 'registration', 'mozilla', 'donate', 'feedback', 'newsletter', 'name' ]) email_writer = EmailWriter(email_blacklist) processed_urls = set() emails = set() logger = logging.getLogger() while len(links_to_process): url1 = links_to_process.pop() # add to processed immediately, to support failure processed_urls.add(url1) url_extras = get_url_extras(url1) response = get_url_response(url1) if not response.ok: continue try: new_emails = get_email_set_from_response(response) except TimeoutError: continue email_writer.add_emails(new_emails) # create a beautiful soup for the html document soup = BeautifulSoup(response.text, "html.parser") # find and process all the anchors in the document for anchor in soup.find_all("a"): # extract link url from the anchor link = anchor.attrs["href"] if "href" in anchor.attrs else '' # resolve relative links if link.startswith('/'): link = url_extras[1] + link elif not link.startswith('http'): link = url_extras[2] + link # add the new url to the queue if it was not enqueued nor processed yet if link not in links_to_process and link not in processed_urls: if not blacklist.is_blacklisted(link): links_to_process.appendleft(link) # scrub linkset to ensure crawler doesn't waste time on one site # urls = scrub_linkset(urls) urls_list = list(links_to_process) scrubbed = scrub(urls_list, 4) logger.debug(scrubbed) links_to_process = deque(scrubbed) return emails
def test_blacklist(self): blacklist = Blacklist(scrub_words=['info']) self.assertTrue(blacklist.is_blacklisted("*****@*****.**")) blacklist = Blacklist(scrub_words=['guy']) self.assertTrue(blacklist.is_blacklisted("*****@*****.**")) blacklist = Blacklist(scrub_words=['something']) self.assertFalse(blacklist.is_blacklisted("*****@*****.**"))
def delete_blacklist(uid, friend_uid): appid = APPID Blacklist.delete_blacklist(db, appid, uid, friend_uid) content = { "app_id":appid, "uid": uid, "friend_uid":friend_uid, "blacklist":0, "name":Friend.RELATIONSHIP_EVENT_BLACKLIST } Friend.publish_message(rds, content)
def test_diagonal(self): bl = Blacklist() self.assertTrue(bl.contains(Tipp([1, 9, 17, 25, 33, 41]))) self.assertTrue(bl.contains(Tipp([9, 17, 25, 33, 41, 49]))) self.assertTrue(bl.contains(Tipp([1, 9, 17, 33, 41, 3]))) self.assertTrue(bl.contains(Tipp([9, 17, 25, 33, 41, 5]))) self.assertTrue(bl.contains(Tipp([29, 23, 17, 11, 5, 9])))
def __init__(self, db, config): self._db = db self.config = config if self.config["DEBUG"]: print("Initializing CallScreener") self._blacklist = Blacklist(db, config) self._whitelist = Whitelist(db, config) self._nomorobo = NomoroboService() if self.config["DEBUG"]: print("CallScreener initialized")
def crawl_by_username(username): global new_black new_black = Blacklist() if is_crawled(username): print(username, '已爬取') pass else: print('开始爬取', username) img_url_texts.clear() crawl_first(username) save_to_txt(username) pass return new_black pass
class TippGenerator: bl = Blacklist() def __init__(self): self.current_pool = neunundvierzig() self.skipped = [] self.ignore_blacklist = False def reset(self): self.skipped.clear() self.next() def _get_tipp(self): return Tipp(list(self.current_pool[:6])) def set_ignore_blacklist(self, ignore): self.ignore_blacklist = ignore def next(self): tipp = None skipp = None while True: sattolo(self.current_pool) tipp = self._get_tipp() if self.ignore_blacklist: return tipp skipp = self.bl.contains(tipp) if skipp: self.skipped.append(skipp) else: return tipp def get_skipped(self): return self.skipped def __str__(self): return "current: [%s] skipped [%s]" % (self.current_pool, self.skipped)
# Import some POX stuff import pox.lib.packet as pkt # Packet parsing/construction import pox.lib.util as poxutil # Various util functions import pox.openflow.libopenflow_01 as of # OpenFlow 1.0 library from blacklist import Blacklist from handler import BlacklistHandler from pox.core import core # Main POX object from pox.forwarding.l2_learning import LearningSwitch # Create a logger for this component LOG = core.getLogger() BLACKLIST = Blacklist() def dns_response_match(): match = of.ofp_match() match.dl_type = pkt.ethernet.IP_TYPE match.nw_proto = pkt.ipv4.UDP_PROTOCOL match.tp_src = pkt.dns.SERVER_PORT return match class BlacklistingLearningSwitch(LearningSwitch): def __init__(self, connection, *args, **kwargs): super(BlacklistingLearningSwitch, self).__init__(connection, *args, **kwargs) self.notify_on_dnslookup() def _handle_PacketIn(self, event): dns_packet = event.parsed.find('dns')
def test_little_cup(self): bl = Blacklist() self.assertTrue(bl.contains(Tipp([17, 24, 26, 32, 37, 48])))
def __init__(self, db): self._db = db self._blacklist = Blacklist(db) self._whitelist = Whitelist(db) self._nomorobo = NomoroboService()
def setupUi(self, MainWindow): MainWindow.setObjectName(_fromUtf8("MainWindow")) MainWindow.resize(885, 580) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/can-icon-24px.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) MainWindow.setWindowIcon(icon) MainWindow.setTabShape(QtGui.QTabWidget.Rounded) self.centralwidget = QtGui.QWidget(MainWindow) self.centralwidget.setObjectName(_fromUtf8("centralwidget")) self.gridLayout_10 = QtGui.QGridLayout(self.centralwidget) self.gridLayout_10.setObjectName(_fromUtf8("gridLayout_10")) self.tabWidget = QtGui.QTabWidget(self.centralwidget) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.tabWidget.sizePolicy().hasHeightForWidth()) self.tabWidget.setSizePolicy(sizePolicy) self.tabWidget.setMinimumSize(QtCore.QSize(0, 0)) self.tabWidget.setBaseSize(QtCore.QSize(0, 0)) font = QtGui.QFont() font.setPointSize(9) self.tabWidget.setFont(font) self.tabWidget.setTabPosition(QtGui.QTabWidget.North) self.tabWidget.setTabShape(QtGui.QTabWidget.Rounded) self.tabWidget.setObjectName(_fromUtf8("tabWidget")) self.inbox = QtGui.QWidget() self.inbox.setObjectName(_fromUtf8("inbox")) self.gridLayout = QtGui.QGridLayout(self.inbox) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.horizontalSplitter_3 = settingsmixin.SSplitter() self.horizontalSplitter_3.setObjectName(_fromUtf8("horizontalSplitter_3")) self.verticalSplitter_12 = settingsmixin.SSplitter() self.verticalSplitter_12.setObjectName(_fromUtf8("verticalSplitter_12")) self.verticalSplitter_12.setOrientation(QtCore.Qt.Vertical) self.treeWidgetYourIdentities = settingsmixin.STreeWidget(self.inbox) self.treeWidgetYourIdentities.setObjectName(_fromUtf8("treeWidgetYourIdentities")) self.treeWidgetYourIdentities.resize(200, self.treeWidgetYourIdentities.height()) icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/identities.png")), QtGui.QIcon.Selected, QtGui.QIcon.Off) self.treeWidgetYourIdentities.headerItem().setIcon(0, icon1) self.verticalSplitter_12.addWidget(self.treeWidgetYourIdentities) self.pushButtonNewAddress = QtGui.QPushButton(self.inbox) self.pushButtonNewAddress.setObjectName(_fromUtf8("pushButtonNewAddress")) self.pushButtonNewAddress.resize(200, self.pushButtonNewAddress.height()) self.verticalSplitter_12.addWidget(self.pushButtonNewAddress) self.verticalSplitter_12.setStretchFactor(0, 1) self.verticalSplitter_12.setStretchFactor(1, 0) self.verticalSplitter_12.setCollapsible(0, False) self.verticalSplitter_12.setCollapsible(1, False) self.verticalSplitter_12.handle(1).setEnabled(False) self.horizontalSplitter_3.addWidget(self.verticalSplitter_12) self.verticalSplitter_7 = settingsmixin.SSplitter() self.verticalSplitter_7.setObjectName(_fromUtf8("verticalSplitter_7")) self.verticalSplitter_7.setOrientation(QtCore.Qt.Vertical) self.horizontalSplitterSearch = QtGui.QSplitter() self.horizontalSplitterSearch.setObjectName(_fromUtf8("horizontalSplitterSearch")) self.inboxSearchLineEdit = QtGui.QLineEdit(self.inbox) self.inboxSearchLineEdit.setObjectName(_fromUtf8("inboxSearchLineEdit")) self.horizontalSplitterSearch.addWidget(self.inboxSearchLineEdit) self.inboxSearchOption = QtGui.QComboBox(self.inbox) self.inboxSearchOption.setObjectName(_fromUtf8("inboxSearchOption")) self.inboxSearchOption.addItem(_fromUtf8("")) self.inboxSearchOption.addItem(_fromUtf8("")) self.inboxSearchOption.addItem(_fromUtf8("")) self.inboxSearchOption.addItem(_fromUtf8("")) self.inboxSearchOption.addItem(_fromUtf8("")) self.inboxSearchOption.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToContents) self.horizontalSplitterSearch.addWidget(self.inboxSearchOption) self.horizontalSplitterSearch.handle(1).setEnabled(False) self.horizontalSplitterSearch.setStretchFactor(0, 1) self.horizontalSplitterSearch.setStretchFactor(1, 0) self.verticalSplitter_7.addWidget(self.horizontalSplitterSearch) self.tableWidgetInbox = settingsmixin.STableWidget(self.inbox) self.tableWidgetInbox.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers) self.tableWidgetInbox.setAlternatingRowColors(True) self.tableWidgetInbox.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection) self.tableWidgetInbox.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows) self.tableWidgetInbox.setWordWrap(False) self.tableWidgetInbox.setObjectName(_fromUtf8("tableWidgetInbox")) self.tableWidgetInbox.setColumnCount(4) self.tableWidgetInbox.setRowCount(0) item = QtGui.QTableWidgetItem() self.tableWidgetInbox.setHorizontalHeaderItem(0, item) item = QtGui.QTableWidgetItem() self.tableWidgetInbox.setHorizontalHeaderItem(1, item) item = QtGui.QTableWidgetItem() self.tableWidgetInbox.setHorizontalHeaderItem(2, item) item = QtGui.QTableWidgetItem() self.tableWidgetInbox.setHorizontalHeaderItem(3, item) self.tableWidgetInbox.horizontalHeader().setCascadingSectionResizes(True) self.tableWidgetInbox.horizontalHeader().setDefaultSectionSize(200) self.tableWidgetInbox.horizontalHeader().setHighlightSections(False) self.tableWidgetInbox.horizontalHeader().setMinimumSectionSize(27) self.tableWidgetInbox.horizontalHeader().setSortIndicatorShown(False) self.tableWidgetInbox.horizontalHeader().setStretchLastSection(True) self.tableWidgetInbox.verticalHeader().setVisible(False) self.tableWidgetInbox.verticalHeader().setDefaultSectionSize(26) self.verticalSplitter_7.addWidget(self.tableWidgetInbox) self.textEditInboxMessage = MessageView(self.inbox) self.textEditInboxMessage.setBaseSize(QtCore.QSize(0, 500)) self.textEditInboxMessage.setReadOnly(True) self.textEditInboxMessage.setObjectName(_fromUtf8("textEditInboxMessage")) self.verticalSplitter_7.addWidget(self.textEditInboxMessage) self.verticalSplitter_7.setStretchFactor(0, 0) self.verticalSplitter_7.setStretchFactor(1, 1) self.verticalSplitter_7.setStretchFactor(2, 2) self.verticalSplitter_7.setCollapsible(0, False) self.verticalSplitter_7.setCollapsible(1, False) self.verticalSplitter_7.setCollapsible(2, False) self.verticalSplitter_7.handle(1).setEnabled(False) self.horizontalSplitter_3.addWidget(self.verticalSplitter_7) self.horizontalSplitter_3.setStretchFactor(0, 0) self.horizontalSplitter_3.setStretchFactor(1, 1) self.horizontalSplitter_3.setCollapsible(0, False) self.horizontalSplitter_3.setCollapsible(1, False) self.gridLayout.addWidget(self.horizontalSplitter_3) icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/inbox.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.tabWidget.addTab(self.inbox, icon2, _fromUtf8("")) self.send = QtGui.QWidget() self.send.setObjectName(_fromUtf8("send")) self.gridLayout_7 = QtGui.QGridLayout(self.send) self.gridLayout_7.setObjectName(_fromUtf8("gridLayout_7")) self.horizontalSplitter = settingsmixin.SSplitter() self.horizontalSplitter.setObjectName(_fromUtf8("horizontalSplitter")) self.verticalSplitter_2 = settingsmixin.SSplitter() self.verticalSplitter_2.setObjectName(_fromUtf8("verticalSplitter_2")) self.verticalSplitter_2.setOrientation(QtCore.Qt.Vertical) self.tableWidgetAddressBook = settingsmixin.STableWidget(self.send) self.tableWidgetAddressBook.setAlternatingRowColors(True) self.tableWidgetAddressBook.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection) self.tableWidgetAddressBook.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows) self.tableWidgetAddressBook.setObjectName(_fromUtf8("tableWidgetAddressBook")) self.tableWidgetAddressBook.setColumnCount(2) self.tableWidgetAddressBook.setRowCount(0) self.tableWidgetAddressBook.resize(200, self.tableWidgetAddressBook.height()) item = QtGui.QTableWidgetItem() icon3 = QtGui.QIcon() icon3.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/addressbook.png")), QtGui.QIcon.Selected, QtGui.QIcon.Off) item.setIcon(icon3) self.tableWidgetAddressBook.setHorizontalHeaderItem(0, item) item = QtGui.QTableWidgetItem() self.tableWidgetAddressBook.setHorizontalHeaderItem(1, item) self.tableWidgetAddressBook.horizontalHeader().setCascadingSectionResizes(True) self.tableWidgetAddressBook.horizontalHeader().setDefaultSectionSize(200) self.tableWidgetAddressBook.horizontalHeader().setHighlightSections(False) self.tableWidgetAddressBook.horizontalHeader().setStretchLastSection(True) self.tableWidgetAddressBook.verticalHeader().setVisible(False) self.verticalSplitter_2.addWidget(self.tableWidgetAddressBook) self.pushButtonAddAddressBook = QtGui.QPushButton(self.send) self.pushButtonAddAddressBook.setObjectName(_fromUtf8("pushButtonAddAddressBook")) self.pushButtonAddAddressBook.resize(200, self.pushButtonAddAddressBook.height()) self.verticalSplitter_2.addWidget(self.pushButtonAddAddressBook) self.pushButtonFetchNamecoinID = QtGui.QPushButton(self.send) self.pushButtonFetchNamecoinID.resize(200, self.pushButtonFetchNamecoinID.height()) font = QtGui.QFont() font.setPointSize(9) self.pushButtonFetchNamecoinID.setFont(font) self.pushButtonFetchNamecoinID.setObjectName(_fromUtf8("pushButtonFetchNamecoinID")) self.verticalSplitter_2.addWidget(self.pushButtonFetchNamecoinID) self.verticalSplitter_2.setStretchFactor(0, 1) self.verticalSplitter_2.setStretchFactor(1, 0) self.verticalSplitter_2.setStretchFactor(2, 0) self.verticalSplitter_2.setCollapsible(0, False) self.verticalSplitter_2.setCollapsible(1, False) self.verticalSplitter_2.setCollapsible(2, False) self.verticalSplitter_2.handle(1).setEnabled(False) self.verticalSplitter_2.handle(2).setEnabled(False) self.horizontalSplitter.addWidget(self.verticalSplitter_2) self.verticalSplitter = settingsmixin.SSplitter() self.verticalSplitter.setObjectName(_fromUtf8("verticalSplitter")) self.verticalSplitter.setOrientation(QtCore.Qt.Vertical) self.tabWidgetSend = QtGui.QTabWidget(self.send) self.tabWidgetSend.setObjectName(_fromUtf8("tabWidgetSend")) self.sendDirect = QtGui.QWidget() self.sendDirect.setObjectName(_fromUtf8("sendDirect")) self.gridLayout_8 = QtGui.QGridLayout(self.sendDirect) self.gridLayout_8.setObjectName(_fromUtf8("gridLayout_8")) self.verticalSplitter_5 = settingsmixin.SSplitter() self.verticalSplitter_5.setObjectName(_fromUtf8("verticalSplitter_5")) self.verticalSplitter_5.setOrientation(QtCore.Qt.Vertical) self.gridLayout_2 = QtGui.QGridLayout() self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2")) self.label_3 = QtGui.QLabel(self.sendDirect) self.label_3.setObjectName(_fromUtf8("label_3")) self.gridLayout_2.addWidget(self.label_3, 2, 0, 1, 1) self.label_2 = QtGui.QLabel(self.sendDirect) self.label_2.setObjectName(_fromUtf8("label_2")) self.gridLayout_2.addWidget(self.label_2, 0, 0, 1, 1) self.lineEditSubject = QtGui.QLineEdit(self.sendDirect) self.lineEditSubject.setText(_fromUtf8("")) self.lineEditSubject.setObjectName(_fromUtf8("lineEditSubject")) self.gridLayout_2.addWidget(self.lineEditSubject, 2, 1, 1, 1) self.label = QtGui.QLabel(self.sendDirect) self.label.setObjectName(_fromUtf8("label")) self.gridLayout_2.addWidget(self.label, 1, 0, 1, 1) self.comboBoxSendFrom = QtGui.QComboBox(self.sendDirect) self.comboBoxSendFrom.setMinimumSize(QtCore.QSize(300, 0)) self.comboBoxSendFrom.setObjectName(_fromUtf8("comboBoxSendFrom")) self.gridLayout_2.addWidget(self.comboBoxSendFrom, 0, 1, 1, 1) self.lineEditTo = QtGui.QLineEdit(self.sendDirect) self.lineEditTo.setObjectName(_fromUtf8("lineEditTo")) self.gridLayout_2.addWidget(self.lineEditTo, 1, 1, 1, 1) self.gridLayout_2_Widget = QtGui.QWidget() self.gridLayout_2_Widget.setLayout(self.gridLayout_2) self.verticalSplitter_5.addWidget(self.gridLayout_2_Widget) self.textEditMessage = MessageCompose(self.sendDirect) self.textEditMessage.setObjectName(_fromUtf8("textEditMessage")) self.verticalSplitter_5.addWidget(self.textEditMessage) self.verticalSplitter_5.setStretchFactor(0, 0) self.verticalSplitter_5.setStretchFactor(1, 1) self.verticalSplitter_5.setCollapsible(0, False) self.verticalSplitter_5.setCollapsible(1, False) self.verticalSplitter_5.handle(1).setEnabled(False) self.gridLayout_8.addWidget(self.verticalSplitter_5, 0, 0, 1, 1) self.tabWidgetSend.addTab(self.sendDirect, _fromUtf8("")) self.sendBroadcast = QtGui.QWidget() self.sendBroadcast.setObjectName(_fromUtf8("sendBroadcast")) self.gridLayout_9 = QtGui.QGridLayout(self.sendBroadcast) self.gridLayout_9.setObjectName(_fromUtf8("gridLayout_9")) self.verticalSplitter_6 = settingsmixin.SSplitter() self.verticalSplitter_6.setObjectName(_fromUtf8("verticalSplitter_6")) self.verticalSplitter_6.setOrientation(QtCore.Qt.Vertical) self.gridLayout_5 = QtGui.QGridLayout() self.gridLayout_5.setObjectName(_fromUtf8("gridLayout_5")) self.label_8 = QtGui.QLabel(self.sendBroadcast) self.label_8.setObjectName(_fromUtf8("label_8")) self.gridLayout_5.addWidget(self.label_8, 0, 0, 1, 1) self.lineEditSubjectBroadcast = QtGui.QLineEdit(self.sendBroadcast) self.lineEditSubjectBroadcast.setText(_fromUtf8("")) self.lineEditSubjectBroadcast.setObjectName(_fromUtf8("lineEditSubjectBroadcast")) self.gridLayout_5.addWidget(self.lineEditSubjectBroadcast, 1, 1, 1, 1) self.label_7 = QtGui.QLabel(self.sendBroadcast) self.label_7.setObjectName(_fromUtf8("label_7")) self.gridLayout_5.addWidget(self.label_7, 1, 0, 1, 1) self.comboBoxSendFromBroadcast = QtGui.QComboBox(self.sendBroadcast) self.comboBoxSendFromBroadcast.setMinimumSize(QtCore.QSize(300, 0)) self.comboBoxSendFromBroadcast.setObjectName(_fromUtf8("comboBoxSendFromBroadcast")) self.gridLayout_5.addWidget(self.comboBoxSendFromBroadcast, 0, 1, 1, 1) self.gridLayout_5_Widget = QtGui.QWidget() self.gridLayout_5_Widget.setLayout(self.gridLayout_5) self.verticalSplitter_6.addWidget(self.gridLayout_5_Widget) self.textEditMessageBroadcast = MessageCompose(self.sendBroadcast) self.textEditMessageBroadcast.setObjectName(_fromUtf8("textEditMessageBroadcast")) self.verticalSplitter_6.addWidget(self.textEditMessageBroadcast) self.verticalSplitter_6.setStretchFactor(0, 0) self.verticalSplitter_6.setStretchFactor(1, 1) self.verticalSplitter_6.setCollapsible(0, False) self.verticalSplitter_6.setCollapsible(1, False) self.verticalSplitter_6.handle(1).setEnabled(False) self.gridLayout_9.addWidget(self.verticalSplitter_6, 0, 0, 1, 1) self.tabWidgetSend.addTab(self.sendBroadcast, _fromUtf8("")) self.verticalSplitter.addWidget(self.tabWidgetSend) self.horizontalSplitter_5 = QtGui.QSplitter() self.horizontalSplitter_5.setObjectName(_fromUtf8("horizontalSplitter_5")) self.pushButtonTTL = QtGui.QPushButton(self.send) # sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) # sizePolicy.setHorizontalStretch(0) # sizePolicy.setVerticalStretch(0) # sizePolicy.setHeightForWidth(self.pushButtonTTL.sizePolicy().hasHeightForWidth()) # self.pushButtonTTL.setSizePolicy(sizePolicy) palette = QtGui.QPalette() brush = QtGui.QBrush(QtGui.QColor(0, 0, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush) self.pushButtonTTL.setPalette(palette) font = QtGui.QFont() font.setUnderline(True) self.pushButtonTTL.setFont(font) self.pushButtonTTL.setFlat(True) self.pushButtonTTL.setObjectName(_fromUtf8("pushButtonTTL")) self.horizontalSplitter_5.addWidget(self.pushButtonTTL) self.horizontalSliderTTL = QtGui.QSlider(self.send) self.horizontalSliderTTL.setMinimumSize(QtCore.QSize(35, 0)) self.horizontalSliderTTL.setOrientation(QtCore.Qt.Horizontal) self.horizontalSliderTTL.setInvertedAppearance(False) self.horizontalSliderTTL.setInvertedControls(False) self.horizontalSliderTTL.setObjectName(_fromUtf8("horizontalSliderTTL")) self.horizontalSplitter_5.addWidget(self.horizontalSliderTTL) self.labelHumanFriendlyTTLDescription = QtGui.QLabel(self.send) # sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Preferred) # sizePolicy.setHorizontalStretch(0) # sizePolicy.setVerticalStretch(0) # sizePolicy.setHeightForWidth(self.labelHumanFriendlyTTLDescription.sizePolicy().hasHeightForWidth()) # self.labelHumanFriendlyTTLDescription.setSizePolicy(sizePolicy) self.labelHumanFriendlyTTLDescription.setMinimumSize(QtCore.QSize(45, 0)) self.labelHumanFriendlyTTLDescription.setObjectName(_fromUtf8("labelHumanFriendlyTTLDescription")) self.horizontalSplitter_5.addWidget(self.labelHumanFriendlyTTLDescription) self.pushButtonSend = QtGui.QPushButton(self.send) self.pushButtonSend.setObjectName(_fromUtf8("pushButtonSend")) self.horizontalSplitter_5.addWidget(self.pushButtonSend) self.pushButtonTTL.setMaximumSize(QtCore.QSize(32, self.pushButtonSend.height())) self.labelHumanFriendlyTTLDescription.setMaximumSize(QtCore.QSize(45, self.pushButtonSend.height())) self.horizontalSliderTTL.setMaximumSize(QtCore.QSize(70, self.pushButtonSend.height())) self.horizontalSplitter_5.resize(self.horizontalSplitter_5.width(), self.pushButtonSend.height()) self.horizontalSplitter_5.setStretchFactor(0, 0) self.horizontalSplitter_5.setStretchFactor(1, 0) self.horizontalSplitter_5.setStretchFactor(2, 0) self.horizontalSplitter_5.setStretchFactor(3, 1) self.horizontalSplitter_5.setCollapsible(0, False) self.horizontalSplitter_5.setCollapsible(1, False) self.horizontalSplitter_5.setCollapsible(2, False) self.horizontalSplitter_5.setCollapsible(3, False) self.horizontalSplitter_5.handle(1).setEnabled(False) self.horizontalSplitter_5.handle(2).setEnabled(False) self.horizontalSplitter_5.handle(3).setEnabled(False) self.verticalSplitter.addWidget(self.horizontalSplitter_5) self.verticalSplitter.setStretchFactor(0, 0) self.verticalSplitter.setStretchFactor(1, 1) self.verticalSplitter.setCollapsible(0, False) self.verticalSplitter.setCollapsible(1, False) self.verticalSplitter.handle(1).setEnabled(False) self.horizontalSplitter.addWidget(self.verticalSplitter) self.horizontalSplitter.setStretchFactor(0, 0) self.horizontalSplitter.setStretchFactor(1, 1) self.horizontalSplitter.setCollapsible(0, False) self.horizontalSplitter.setCollapsible(1, False) self.gridLayout_7.addWidget(self.horizontalSplitter, 0, 0, 1, 1) icon4 = QtGui.QIcon() icon4.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/send.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.tabWidget.addTab(self.send, icon4, _fromUtf8("")) self.subscriptions = QtGui.QWidget() self.subscriptions.setObjectName(_fromUtf8("subscriptions")) self.gridLayout_3 = QtGui.QGridLayout(self.subscriptions) self.gridLayout_3.setObjectName(_fromUtf8("gridLayout_3")) self.horizontalSplitter_4 = settingsmixin.SSplitter() self.horizontalSplitter_4.setObjectName(_fromUtf8("horizontalSplitter_4")) self.verticalSplitter_3 = settingsmixin.SSplitter() self.verticalSplitter_3.setObjectName(_fromUtf8("verticalSplitter_3")) self.verticalSplitter_3.setOrientation(QtCore.Qt.Vertical) self.treeWidgetSubscriptions = settingsmixin.STreeWidget(self.subscriptions) self.treeWidgetSubscriptions.setAlternatingRowColors(True) self.treeWidgetSubscriptions.setSelectionMode(QtGui.QAbstractItemView.SingleSelection) self.treeWidgetSubscriptions.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows) self.treeWidgetSubscriptions.setObjectName(_fromUtf8("treeWidgetSubscriptions")) self.treeWidgetSubscriptions.resize(200, self.treeWidgetSubscriptions.height()) icon5 = QtGui.QIcon() icon5.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/subscriptions.png")), QtGui.QIcon.Selected, QtGui.QIcon.Off) self.treeWidgetSubscriptions.headerItem().setIcon(0, icon5) self.verticalSplitter_3.addWidget(self.treeWidgetSubscriptions) self.pushButtonAddSubscription = QtGui.QPushButton(self.subscriptions) self.pushButtonAddSubscription.setObjectName(_fromUtf8("pushButtonAddSubscription")) self.pushButtonAddSubscription.resize(200, self.pushButtonAddSubscription.height()) self.verticalSplitter_3.addWidget(self.pushButtonAddSubscription) self.verticalSplitter_3.setStretchFactor(0, 1) self.verticalSplitter_3.setStretchFactor(1, 0) self.verticalSplitter_3.setCollapsible(0, False) self.verticalSplitter_3.setCollapsible(1, False) self.verticalSplitter_3.handle(1).setEnabled(False) self.horizontalSplitter_4.addWidget(self.verticalSplitter_3) self.verticalSplitter_4 = settingsmixin.SSplitter() self.verticalSplitter_4.setObjectName(_fromUtf8("verticalSplitter_4")) self.verticalSplitter_4.setOrientation(QtCore.Qt.Vertical) self.horizontalSplitter_2 = QtGui.QSplitter() self.horizontalSplitter_2.setObjectName(_fromUtf8("horizontalSplitter_2")) self.inboxSearchLineEditSubscriptions = QtGui.QLineEdit(self.subscriptions) self.inboxSearchLineEditSubscriptions.setObjectName(_fromUtf8("inboxSearchLineEditSubscriptions")) self.horizontalSplitter_2.addWidget(self.inboxSearchLineEditSubscriptions) self.inboxSearchOptionSubscriptions = QtGui.QComboBox(self.subscriptions) self.inboxSearchOptionSubscriptions.setObjectName(_fromUtf8("inboxSearchOptionSubscriptions")) self.inboxSearchOptionSubscriptions.addItem(_fromUtf8("")) self.inboxSearchOptionSubscriptions.addItem(_fromUtf8("")) self.inboxSearchOptionSubscriptions.addItem(_fromUtf8("")) self.inboxSearchOptionSubscriptions.addItem(_fromUtf8("")) self.inboxSearchOptionSubscriptions.addItem(_fromUtf8("")) self.inboxSearchOptionSubscriptions.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToContents) self.horizontalSplitter_2.addWidget(self.inboxSearchOptionSubscriptions) self.horizontalSplitter_2.handle(1).setEnabled(False) self.horizontalSplitter_2.setStretchFactor(0, 1) self.horizontalSplitter_2.setStretchFactor(1, 0) self.verticalSplitter_4.addWidget(self.horizontalSplitter_2) self.tableWidgetInboxSubscriptions = settingsmixin.STableWidget(self.subscriptions) self.tableWidgetInboxSubscriptions.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers) self.tableWidgetInboxSubscriptions.setAlternatingRowColors(True) self.tableWidgetInboxSubscriptions.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection) self.tableWidgetInboxSubscriptions.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows) self.tableWidgetInboxSubscriptions.setWordWrap(False) self.tableWidgetInboxSubscriptions.setObjectName(_fromUtf8("tableWidgetInboxSubscriptions")) self.tableWidgetInboxSubscriptions.setColumnCount(4) self.tableWidgetInboxSubscriptions.setRowCount(0) item = QtGui.QTableWidgetItem() self.tableWidgetInboxSubscriptions.setHorizontalHeaderItem(0, item) item = QtGui.QTableWidgetItem() self.tableWidgetInboxSubscriptions.setHorizontalHeaderItem(1, item) item = QtGui.QTableWidgetItem() self.tableWidgetInboxSubscriptions.setHorizontalHeaderItem(2, item) item = QtGui.QTableWidgetItem() self.tableWidgetInboxSubscriptions.setHorizontalHeaderItem(3, item) self.tableWidgetInboxSubscriptions.horizontalHeader().setCascadingSectionResizes(True) self.tableWidgetInboxSubscriptions.horizontalHeader().setDefaultSectionSize(200) self.tableWidgetInboxSubscriptions.horizontalHeader().setHighlightSections(False) self.tableWidgetInboxSubscriptions.horizontalHeader().setMinimumSectionSize(27) self.tableWidgetInboxSubscriptions.horizontalHeader().setSortIndicatorShown(False) self.tableWidgetInboxSubscriptions.horizontalHeader().setStretchLastSection(True) self.tableWidgetInboxSubscriptions.verticalHeader().setVisible(False) self.tableWidgetInboxSubscriptions.verticalHeader().setDefaultSectionSize(26) self.verticalSplitter_4.addWidget(self.tableWidgetInboxSubscriptions) self.textEditInboxMessageSubscriptions = MessageView(self.subscriptions) self.textEditInboxMessageSubscriptions.setBaseSize(QtCore.QSize(0, 500)) self.textEditInboxMessageSubscriptions.setReadOnly(True) self.textEditInboxMessageSubscriptions.setObjectName(_fromUtf8("textEditInboxMessageSubscriptions")) self.verticalSplitter_4.addWidget(self.textEditInboxMessageSubscriptions) self.verticalSplitter_4.setStretchFactor(0, 0) self.verticalSplitter_4.setStretchFactor(1, 1) self.verticalSplitter_4.setStretchFactor(2, 2) self.verticalSplitter_4.setCollapsible(0, False) self.verticalSplitter_4.setCollapsible(1, False) self.verticalSplitter_4.setCollapsible(2, False) self.verticalSplitter_4.handle(1).setEnabled(False) self.horizontalSplitter_4.addWidget(self.verticalSplitter_4) self.horizontalSplitter_4.setStretchFactor(0, 0) self.horizontalSplitter_4.setStretchFactor(1, 1) self.horizontalSplitter_4.setCollapsible(0, False) self.horizontalSplitter_4.setCollapsible(1, False) self.gridLayout_3.addWidget(self.horizontalSplitter_4, 0, 0, 1, 1) icon6 = QtGui.QIcon() icon6.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/subscriptions.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.tabWidget.addTab(self.subscriptions, icon6, _fromUtf8("")) self.chans = QtGui.QWidget() self.chans.setObjectName(_fromUtf8("chans")) self.gridLayout_4 = QtGui.QGridLayout(self.chans) self.gridLayout_4.setObjectName(_fromUtf8("gridLayout_4")) self.horizontalSplitter_7 = settingsmixin.SSplitter() self.horizontalSplitter_7.setObjectName(_fromUtf8("horizontalSplitter_7")) self.verticalSplitter_17 = settingsmixin.SSplitter() self.verticalSplitter_17.setObjectName(_fromUtf8("verticalSplitter_17")) self.verticalSplitter_17.setOrientation(QtCore.Qt.Vertical) self.treeWidgetChans = settingsmixin.STreeWidget(self.chans) self.treeWidgetChans.setFrameShadow(QtGui.QFrame.Sunken) self.treeWidgetChans.setLineWidth(1) self.treeWidgetChans.setAlternatingRowColors(True) self.treeWidgetChans.setSelectionMode(QtGui.QAbstractItemView.SingleSelection) self.treeWidgetChans.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows) self.treeWidgetChans.setObjectName(_fromUtf8("treeWidgetChans")) self.treeWidgetChans.resize(200, self.treeWidgetChans.height()) icon7 = QtGui.QIcon() icon7.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/can-icon-16px.png")), QtGui.QIcon.Selected, QtGui.QIcon.Off) self.treeWidgetChans.headerItem().setIcon(0, icon7) self.verticalSplitter_17.addWidget(self.treeWidgetChans) self.pushButtonAddChan = QtGui.QPushButton(self.chans) self.pushButtonAddChan.setObjectName(_fromUtf8("pushButtonAddChan")) self.pushButtonAddChan.resize(200, self.pushButtonAddChan.height()) self.verticalSplitter_17.addWidget(self.pushButtonAddChan) self.verticalSplitter_17.setStretchFactor(0, 1) self.verticalSplitter_17.setStretchFactor(1, 0) self.verticalSplitter_17.setCollapsible(0, False) self.verticalSplitter_17.setCollapsible(1, False) self.verticalSplitter_17.handle(1).setEnabled(False) self.horizontalSplitter_7.addWidget(self.verticalSplitter_17) self.verticalSplitter_8 = settingsmixin.SSplitter() self.verticalSplitter_8.setObjectName(_fromUtf8("verticalSplitter_8")) self.verticalSplitter_8.setOrientation(QtCore.Qt.Vertical) self.horizontalSplitter_6 = QtGui.QSplitter() self.horizontalSplitter_6.setObjectName(_fromUtf8("horizontalSplitter_6")) self.inboxSearchLineEditChans = QtGui.QLineEdit(self.chans) self.inboxSearchLineEditChans.setObjectName(_fromUtf8("inboxSearchLineEditChans")) self.horizontalSplitter_6.addWidget(self.inboxSearchLineEditChans) self.inboxSearchOptionChans = QtGui.QComboBox(self.chans) self.inboxSearchOptionChans.setObjectName(_fromUtf8("inboxSearchOptionChans")) self.inboxSearchOptionChans.addItem(_fromUtf8("")) self.inboxSearchOptionChans.addItem(_fromUtf8("")) self.inboxSearchOptionChans.addItem(_fromUtf8("")) self.inboxSearchOptionChans.addItem(_fromUtf8("")) self.inboxSearchOptionChans.addItem(_fromUtf8("")) self.inboxSearchOptionChans.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToContents) self.horizontalSplitter_6.addWidget(self.inboxSearchOptionChans) self.horizontalSplitter_6.handle(1).setEnabled(False) self.horizontalSplitter_6.setStretchFactor(0, 1) self.horizontalSplitter_6.setStretchFactor(1, 0) self.verticalSplitter_8.addWidget(self.horizontalSplitter_6) self.tableWidgetInboxChans = settingsmixin.STableWidget(self.chans) self.tableWidgetInboxChans.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers) self.tableWidgetInboxChans.setAlternatingRowColors(True) self.tableWidgetInboxChans.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection) self.tableWidgetInboxChans.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows) self.tableWidgetInboxChans.setWordWrap(False) self.tableWidgetInboxChans.setObjectName(_fromUtf8("tableWidgetInboxChans")) self.tableWidgetInboxChans.setColumnCount(4) self.tableWidgetInboxChans.setRowCount(0) item = QtGui.QTableWidgetItem() self.tableWidgetInboxChans.setHorizontalHeaderItem(0, item) item = QtGui.QTableWidgetItem() self.tableWidgetInboxChans.setHorizontalHeaderItem(1, item) item = QtGui.QTableWidgetItem() self.tableWidgetInboxChans.setHorizontalHeaderItem(2, item) item = QtGui.QTableWidgetItem() self.tableWidgetInboxChans.setHorizontalHeaderItem(3, item) self.tableWidgetInboxChans.horizontalHeader().setCascadingSectionResizes(True) self.tableWidgetInboxChans.horizontalHeader().setDefaultSectionSize(200) self.tableWidgetInboxChans.horizontalHeader().setHighlightSections(False) self.tableWidgetInboxChans.horizontalHeader().setMinimumSectionSize(27) self.tableWidgetInboxChans.horizontalHeader().setSortIndicatorShown(False) self.tableWidgetInboxChans.horizontalHeader().setStretchLastSection(True) self.tableWidgetInboxChans.verticalHeader().setVisible(False) self.tableWidgetInboxChans.verticalHeader().setDefaultSectionSize(26) self.verticalSplitter_8.addWidget(self.tableWidgetInboxChans) self.textEditInboxMessageChans = MessageView(self.chans) self.textEditInboxMessageChans.setBaseSize(QtCore.QSize(0, 500)) self.textEditInboxMessageChans.setReadOnly(True) self.textEditInboxMessageChans.setObjectName(_fromUtf8("textEditInboxMessageChans")) self.verticalSplitter_8.addWidget(self.textEditInboxMessageChans) self.verticalSplitter_8.setStretchFactor(0, 0) self.verticalSplitter_8.setStretchFactor(1, 1) self.verticalSplitter_8.setStretchFactor(2, 2) self.verticalSplitter_8.setCollapsible(0, False) self.verticalSplitter_8.setCollapsible(1, False) self.verticalSplitter_8.setCollapsible(2, False) self.verticalSplitter_8.handle(1).setEnabled(False) self.horizontalSplitter_7.addWidget(self.verticalSplitter_8) self.horizontalSplitter_7.setStretchFactor(0, 0) self.horizontalSplitter_7.setStretchFactor(1, 1) self.horizontalSplitter_7.setCollapsible(0, False) self.horizontalSplitter_7.setCollapsible(1, False) self.gridLayout_4.addWidget(self.horizontalSplitter_7, 0, 0, 1, 1) icon8 = QtGui.QIcon() icon8.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/can-icon-16px.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.tabWidget.addTab(self.chans, icon8, _fromUtf8("")) self.blackwhitelist = Blacklist() self.tabWidget.addTab(self.blackwhitelist, QtGui.QIcon(":/newPrefix/images/blacklist.png"), "") # Initialize the Blacklist or Whitelist if shared.config.get('bitmessagesettings', 'blackwhitelist') == 'white': self.blackwhitelist.radioButtonWhitelist.click() self.blackwhitelist.rerenderBlackWhiteList() self.networkstatus = NetworkStatus() self.tabWidget.addTab(self.networkstatus, QtGui.QIcon(":/newPrefix/images/networkstatus.png"), "") self.gridLayout_10.addWidget(self.tabWidget, 0, 0, 1, 1) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtGui.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 885, 27)) self.menubar.setObjectName(_fromUtf8("menubar")) self.menuFile = QtGui.QMenu(self.menubar) self.menuFile.setObjectName(_fromUtf8("menuFile")) self.menuSettings = QtGui.QMenu(self.menubar) self.menuSettings.setObjectName(_fromUtf8("menuSettings")) self.menuHelp = QtGui.QMenu(self.menubar) self.menuHelp.setObjectName(_fromUtf8("menuHelp")) MainWindow.setMenuBar(self.menubar) self.statusbar = QtGui.QStatusBar(MainWindow) self.statusbar.setMaximumSize(QtCore.QSize(16777215, 22)) self.statusbar.setObjectName(_fromUtf8("statusbar")) MainWindow.setStatusBar(self.statusbar) self.actionImport_keys = QtGui.QAction(MainWindow) self.actionImport_keys.setObjectName(_fromUtf8("actionImport_keys")) self.actionManageKeys = QtGui.QAction(MainWindow) self.actionManageKeys.setCheckable(False) self.actionManageKeys.setEnabled(True) icon = QtGui.QIcon.fromTheme(_fromUtf8("dialog-password")) self.actionManageKeys.setIcon(icon) self.actionManageKeys.setObjectName(_fromUtf8("actionManageKeys")) self.actionExit = QtGui.QAction(MainWindow) icon = QtGui.QIcon.fromTheme(_fromUtf8("application-exit")) self.actionExit.setIcon(icon) self.actionExit.setObjectName(_fromUtf8("actionExit")) self.actionHelp = QtGui.QAction(MainWindow) icon = QtGui.QIcon.fromTheme(_fromUtf8("help-contents")) self.actionHelp.setIcon(icon) self.actionHelp.setObjectName(_fromUtf8("actionHelp")) self.actionSupport = QtGui.QAction(MainWindow) icon = QtGui.QIcon.fromTheme(_fromUtf8("help-support")) self.actionSupport.setIcon(icon) self.actionSupport.setObjectName(_fromUtf8("actionSupport")) self.actionAbout = QtGui.QAction(MainWindow) icon = QtGui.QIcon.fromTheme(_fromUtf8("help-about")) self.actionAbout.setIcon(icon) self.actionAbout.setObjectName(_fromUtf8("actionAbout")) self.actionSettings = QtGui.QAction(MainWindow) icon = QtGui.QIcon.fromTheme(_fromUtf8("document-properties")) self.actionSettings.setIcon(icon) self.actionSettings.setObjectName(_fromUtf8("actionSettings")) self.actionRegenerateDeterministicAddresses = QtGui.QAction(MainWindow) icon = QtGui.QIcon.fromTheme(_fromUtf8("view-refresh")) self.actionRegenerateDeterministicAddresses.setIcon(icon) self.actionRegenerateDeterministicAddresses.setObjectName(_fromUtf8("actionRegenerateDeterministicAddresses")) self.actionDeleteAllTrashedMessages = QtGui.QAction(MainWindow) icon = QtGui.QIcon.fromTheme(_fromUtf8("user-trash")) self.actionDeleteAllTrashedMessages.setIcon(icon) self.actionDeleteAllTrashedMessages.setObjectName(_fromUtf8("actionDeleteAllTrashedMessages")) self.actionJoinChan = QtGui.QAction(MainWindow) icon = QtGui.QIcon.fromTheme(_fromUtf8("contact-new")) self.actionJoinChan.setIcon(icon) self.actionJoinChan.setObjectName(_fromUtf8("actionJoinChan")) self.menuFile.addAction(self.actionManageKeys) self.menuFile.addAction(self.actionDeleteAllTrashedMessages) self.menuFile.addAction(self.actionRegenerateDeterministicAddresses) self.menuFile.addAction(self.actionExit) self.menuSettings.addAction(self.actionSettings) self.menuHelp.addAction(self.actionHelp) self.menuHelp.addAction(self.actionSupport) self.menuHelp.addAction(self.actionAbout) self.menubar.addAction(self.menuFile.menuAction()) self.menubar.addAction(self.menuSettings.menuAction()) self.menubar.addAction(self.menuHelp.menuAction()) self.retranslateUi(MainWindow) self.tabWidget.setCurrentIndex(0) self.tabWidgetSend.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(MainWindow) MainWindow.setTabOrder(self.tableWidgetInbox, self.textEditInboxMessage) MainWindow.setTabOrder(self.textEditInboxMessage, self.comboBoxSendFrom) MainWindow.setTabOrder(self.comboBoxSendFrom, self.lineEditTo) MainWindow.setTabOrder(self.lineEditTo, self.lineEditSubject) MainWindow.setTabOrder(self.lineEditSubject, self.textEditMessage) MainWindow.setTabOrder(self.textEditMessage, self.pushButtonAddSubscription)
def setupUi(self, MainWindow): MainWindow.setObjectName(_fromUtf8("MainWindow")) MainWindow.resize(885, 580) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/can-icon-24px.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) MainWindow.setWindowIcon(icon) MainWindow.setTabShape(QtGui.QTabWidget.Rounded) self.centralwidget = QtGui.QWidget(MainWindow) self.centralwidget.setObjectName(_fromUtf8("centralwidget")) self.gridLayout_10 = QtGui.QGridLayout(self.centralwidget) self.gridLayout_10.setObjectName(_fromUtf8("gridLayout_10")) self.tabWidget = QtGui.QTabWidget(self.centralwidget) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.tabWidget.sizePolicy().hasHeightForWidth()) self.tabWidget.setSizePolicy(sizePolicy) self.tabWidget.setMinimumSize(QtCore.QSize(0, 0)) self.tabWidget.setBaseSize(QtCore.QSize(0, 0)) font = QtGui.QFont() font.setPointSize(9) self.tabWidget.setFont(font) self.tabWidget.setTabPosition(QtGui.QTabWidget.North) self.tabWidget.setTabShape(QtGui.QTabWidget.Rounded) self.tabWidget.setObjectName(_fromUtf8("tabWidget")) self.inbox = QtGui.QWidget() self.inbox.setObjectName(_fromUtf8("inbox")) self.gridLayout = QtGui.QGridLayout(self.inbox) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.horizontalSplitter_3 = settingsmixin.SSplitter() self.horizontalSplitter_3.setObjectName(_fromUtf8("horizontalSplitter_3")) self.verticalSplitter_12 = settingsmixin.SSplitter() self.verticalSplitter_12.setObjectName(_fromUtf8("verticalSplitter_12")) self.verticalSplitter_12.setOrientation(QtCore.Qt.Vertical) self.treeWidgetYourIdentities = settingsmixin.STreeWidget(self.inbox) self.treeWidgetYourIdentities.setObjectName(_fromUtf8("treeWidgetYourIdentities")) self.treeWidgetYourIdentities.resize(200, self.treeWidgetYourIdentities.height()) icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/identities.png")), QtGui.QIcon.Selected, QtGui.QIcon.Off) self.treeWidgetYourIdentities.headerItem().setIcon(0, icon1) self.verticalSplitter_12.addWidget(self.treeWidgetYourIdentities) self.pushButtonNewAddress = QtGui.QPushButton(self.inbox) self.pushButtonNewAddress.setObjectName(_fromUtf8("pushButtonNewAddress")) self.pushButtonNewAddress.resize(200, self.pushButtonNewAddress.height()) self.verticalSplitter_12.addWidget(self.pushButtonNewAddress) self.verticalSplitter_12.setStretchFactor(0, 1) self.verticalSplitter_12.setStretchFactor(1, 0) self.verticalSplitter_12.setCollapsible(0, False) self.verticalSplitter_12.setCollapsible(1, False) self.verticalSplitter_12.handle(1).setEnabled(False) self.horizontalSplitter_3.addWidget(self.verticalSplitter_12) self.verticalSplitter_7 = settingsmixin.SSplitter() self.verticalSplitter_7.setObjectName(_fromUtf8("verticalSplitter_7")) self.verticalSplitter_7.setOrientation(QtCore.Qt.Vertical) self.horizontalSplitterSearch = QtGui.QSplitter() self.horizontalSplitterSearch.setObjectName(_fromUtf8("horizontalSplitterSearch")) self.inboxSearchLineEdit = QtGui.QLineEdit(self.inbox) self.inboxSearchLineEdit.setObjectName(_fromUtf8("inboxSearchLineEdit")) self.horizontalSplitterSearch.addWidget(self.inboxSearchLineEdit) self.inboxSearchOption = QtGui.QComboBox(self.inbox) self.inboxSearchOption.setObjectName(_fromUtf8("inboxSearchOption")) self.inboxSearchOption.addItem(_fromUtf8("")) self.inboxSearchOption.addItem(_fromUtf8("")) self.inboxSearchOption.addItem(_fromUtf8("")) self.inboxSearchOption.addItem(_fromUtf8("")) self.inboxSearchOption.addItem(_fromUtf8("")) self.inboxSearchOption.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToContents) self.horizontalSplitterSearch.addWidget(self.inboxSearchOption) self.horizontalSplitterSearch.handle(1).setEnabled(False) self.horizontalSplitterSearch.setStretchFactor(0, 1) self.horizontalSplitterSearch.setStretchFactor(1, 0) self.verticalSplitter_7.addWidget(self.horizontalSplitterSearch) self.tableWidgetInbox = settingsmixin.STableWidget(self.inbox) self.tableWidgetInbox.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers) self.tableWidgetInbox.setAlternatingRowColors(True) self.tableWidgetInbox.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection) self.tableWidgetInbox.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows) self.tableWidgetInbox.setWordWrap(False) self.tableWidgetInbox.setObjectName(_fromUtf8("tableWidgetInbox")) self.tableWidgetInbox.setColumnCount(4) self.tableWidgetInbox.setRowCount(0) item = QtGui.QTableWidgetItem() self.tableWidgetInbox.setHorizontalHeaderItem(0, item) item = QtGui.QTableWidgetItem() self.tableWidgetInbox.setHorizontalHeaderItem(1, item) item = QtGui.QTableWidgetItem() self.tableWidgetInbox.setHorizontalHeaderItem(2, item) item = QtGui.QTableWidgetItem() self.tableWidgetInbox.setHorizontalHeaderItem(3, item) self.tableWidgetInbox.horizontalHeader().setCascadingSectionResizes(True) self.tableWidgetInbox.horizontalHeader().setDefaultSectionSize(200) self.tableWidgetInbox.horizontalHeader().setHighlightSections(False) self.tableWidgetInbox.horizontalHeader().setMinimumSectionSize(27) self.tableWidgetInbox.horizontalHeader().setSortIndicatorShown(False) self.tableWidgetInbox.horizontalHeader().setStretchLastSection(True) self.tableWidgetInbox.verticalHeader().setVisible(False) self.tableWidgetInbox.verticalHeader().setDefaultSectionSize(26) self.verticalSplitter_7.addWidget(self.tableWidgetInbox) self.textEditInboxMessage = MessageView(self.inbox) self.textEditInboxMessage.setBaseSize(QtCore.QSize(0, 500)) self.textEditInboxMessage.setReadOnly(True) self.textEditInboxMessage.setObjectName(_fromUtf8("textEditInboxMessage")) self.verticalSplitter_7.addWidget(self.textEditInboxMessage) self.verticalSplitter_7.setStretchFactor(0, 0) self.verticalSplitter_7.setStretchFactor(1, 1) self.verticalSplitter_7.setStretchFactor(2, 2) self.verticalSplitter_7.setCollapsible(0, False) self.verticalSplitter_7.setCollapsible(1, False) self.verticalSplitter_7.setCollapsible(2, False) self.verticalSplitter_7.handle(1).setEnabled(False) self.horizontalSplitter_3.addWidget(self.verticalSplitter_7) self.horizontalSplitter_3.setStretchFactor(0, 0) self.horizontalSplitter_3.setStretchFactor(1, 1) self.horizontalSplitter_3.setCollapsible(0, False) self.horizontalSplitter_3.setCollapsible(1, False) self.gridLayout.addWidget(self.horizontalSplitter_3) icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/inbox.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.tabWidget.addTab(self.inbox, icon2, _fromUtf8("")) self.send = QtGui.QWidget() self.send.setObjectName(_fromUtf8("send")) self.gridLayout_7 = QtGui.QGridLayout(self.send) self.gridLayout_7.setObjectName(_fromUtf8("gridLayout_7")) self.horizontalSplitter = settingsmixin.SSplitter() self.horizontalSplitter.setObjectName(_fromUtf8("horizontalSplitter")) self.verticalSplitter_2 = settingsmixin.SSplitter() self.verticalSplitter_2.setObjectName(_fromUtf8("verticalSplitter_2")) self.verticalSplitter_2.setOrientation(QtCore.Qt.Vertical) self.tableWidgetAddressBook = settingsmixin.STableWidget(self.send) self.tableWidgetAddressBook.setAlternatingRowColors(True) self.tableWidgetAddressBook.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection) self.tableWidgetAddressBook.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows) self.tableWidgetAddressBook.setObjectName(_fromUtf8("tableWidgetAddressBook")) self.tableWidgetAddressBook.setColumnCount(2) self.tableWidgetAddressBook.setRowCount(0) self.tableWidgetAddressBook.resize(200, self.tableWidgetAddressBook.height()) item = QtGui.QTableWidgetItem() icon3 = QtGui.QIcon() icon3.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/addressbook.png")), QtGui.QIcon.Selected, QtGui.QIcon.Off) item.setIcon(icon3) self.tableWidgetAddressBook.setHorizontalHeaderItem(0, item) item = QtGui.QTableWidgetItem() self.tableWidgetAddressBook.setHorizontalHeaderItem(1, item) self.tableWidgetAddressBook.horizontalHeader().setCascadingSectionResizes(True) self.tableWidgetAddressBook.horizontalHeader().setDefaultSectionSize(200) self.tableWidgetAddressBook.horizontalHeader().setHighlightSections(False) self.tableWidgetAddressBook.horizontalHeader().setStretchLastSection(True) self.tableWidgetAddressBook.verticalHeader().setVisible(False) self.verticalSplitter_2.addWidget(self.tableWidgetAddressBook) self.addressBookCompleter = AddressBookCompleter() self.addressBookCompleter.setCompletionMode(QtGui.QCompleter.PopupCompletion) self.addressBookCompleter.setCaseSensitivity(QtCore.Qt.CaseInsensitive) self.addressBookCompleterModel = QtGui.QStringListModel() self.addressBookCompleter.setModel(self.addressBookCompleterModel) self.pushButtonAddAddressBook = QtGui.QPushButton(self.send) self.pushButtonAddAddressBook.setObjectName(_fromUtf8("pushButtonAddAddressBook")) self.pushButtonAddAddressBook.resize(200, self.pushButtonAddAddressBook.height()) self.verticalSplitter_2.addWidget(self.pushButtonAddAddressBook) self.verticalSplitter_2.setStretchFactor(0, 1) self.verticalSplitter_2.setStretchFactor(1, 0) self.verticalSplitter_2.setCollapsible(0, False) self.verticalSplitter_2.setCollapsible(1, False) self.verticalSplitter_2.handle(1).setEnabled(False) self.horizontalSplitter.addWidget(self.verticalSplitter_2) self.verticalSplitter = settingsmixin.SSplitter() self.verticalSplitter.setObjectName(_fromUtf8("verticalSplitter")) self.verticalSplitter.setOrientation(QtCore.Qt.Vertical) self.tabWidgetSend = QtGui.QTabWidget(self.send) self.tabWidgetSend.setObjectName(_fromUtf8("tabWidgetSend")) self.sendDirect = QtGui.QWidget() self.sendDirect.setObjectName(_fromUtf8("sendDirect")) self.gridLayout_8 = QtGui.QGridLayout(self.sendDirect) self.gridLayout_8.setObjectName(_fromUtf8("gridLayout_8")) self.verticalSplitter_5 = settingsmixin.SSplitter() self.verticalSplitter_5.setObjectName(_fromUtf8("verticalSplitter_5")) self.verticalSplitter_5.setOrientation(QtCore.Qt.Vertical) self.gridLayout_2 = QtGui.QGridLayout() self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2")) self.label_3 = QtGui.QLabel(self.sendDirect) self.label_3.setObjectName(_fromUtf8("label_3")) self.gridLayout_2.addWidget(self.label_3, 2, 0, 1, 1) self.label_2 = QtGui.QLabel(self.sendDirect) self.label_2.setObjectName(_fromUtf8("label_2")) self.gridLayout_2.addWidget(self.label_2, 0, 0, 1, 1) self.lineEditSubject = QtGui.QLineEdit(self.sendDirect) self.lineEditSubject.setText(_fromUtf8("")) self.lineEditSubject.setObjectName(_fromUtf8("lineEditSubject")) self.gridLayout_2.addWidget(self.lineEditSubject, 2, 1, 1, 1) self.label = QtGui.QLabel(self.sendDirect) self.label.setObjectName(_fromUtf8("label")) self.gridLayout_2.addWidget(self.label, 1, 0, 1, 1) self.comboBoxSendFrom = QtGui.QComboBox(self.sendDirect) self.comboBoxSendFrom.setMinimumSize(QtCore.QSize(300, 0)) self.comboBoxSendFrom.setObjectName(_fromUtf8("comboBoxSendFrom")) self.gridLayout_2.addWidget(self.comboBoxSendFrom, 0, 1, 1, 1) self.lineEditTo = QtGui.QLineEdit(self.sendDirect) self.lineEditTo.setObjectName(_fromUtf8("lineEditTo")) self.gridLayout_2.addWidget(self.lineEditTo, 1, 1, 1, 1) self.lineEditTo.setCompleter(self.addressBookCompleter) self.gridLayout_2_Widget = QtGui.QWidget() self.gridLayout_2_Widget.setLayout(self.gridLayout_2) self.verticalSplitter_5.addWidget(self.gridLayout_2_Widget) self.textEditMessage = MessageCompose(self.sendDirect) self.textEditMessage.setObjectName(_fromUtf8("textEditMessage")) self.verticalSplitter_5.addWidget(self.textEditMessage) self.verticalSplitter_5.setStretchFactor(0, 0) self.verticalSplitter_5.setStretchFactor(1, 1) self.verticalSplitter_5.setCollapsible(0, False) self.verticalSplitter_5.setCollapsible(1, False) self.verticalSplitter_5.handle(1).setEnabled(False) self.gridLayout_8.addWidget(self.verticalSplitter_5, 0, 0, 1, 1) self.tabWidgetSend.addTab(self.sendDirect, _fromUtf8("")) self.sendBroadcast = QtGui.QWidget() self.sendBroadcast.setObjectName(_fromUtf8("sendBroadcast")) self.gridLayout_9 = QtGui.QGridLayout(self.sendBroadcast) self.gridLayout_9.setObjectName(_fromUtf8("gridLayout_9")) self.verticalSplitter_6 = settingsmixin.SSplitter() self.verticalSplitter_6.setObjectName(_fromUtf8("verticalSplitter_6")) self.verticalSplitter_6.setOrientation(QtCore.Qt.Vertical) self.gridLayout_5 = QtGui.QGridLayout() self.gridLayout_5.setObjectName(_fromUtf8("gridLayout_5")) self.label_8 = QtGui.QLabel(self.sendBroadcast) self.label_8.setObjectName(_fromUtf8("label_8")) self.gridLayout_5.addWidget(self.label_8, 0, 0, 1, 1) self.lineEditSubjectBroadcast = QtGui.QLineEdit(self.sendBroadcast) self.lineEditSubjectBroadcast.setText(_fromUtf8("")) self.lineEditSubjectBroadcast.setObjectName(_fromUtf8("lineEditSubjectBroadcast")) self.gridLayout_5.addWidget(self.lineEditSubjectBroadcast, 1, 1, 1, 1) self.label_7 = QtGui.QLabel(self.sendBroadcast) self.label_7.setObjectName(_fromUtf8("label_7")) self.gridLayout_5.addWidget(self.label_7, 1, 0, 1, 1) self.comboBoxSendFromBroadcast = QtGui.QComboBox(self.sendBroadcast) self.comboBoxSendFromBroadcast.setMinimumSize(QtCore.QSize(300, 0)) self.comboBoxSendFromBroadcast.setObjectName(_fromUtf8("comboBoxSendFromBroadcast")) self.gridLayout_5.addWidget(self.comboBoxSendFromBroadcast, 0, 1, 1, 1) self.gridLayout_5_Widget = QtGui.QWidget() self.gridLayout_5_Widget.setLayout(self.gridLayout_5) self.verticalSplitter_6.addWidget(self.gridLayout_5_Widget) self.textEditMessageBroadcast = MessageCompose(self.sendBroadcast) self.textEditMessageBroadcast.setObjectName(_fromUtf8("textEditMessageBroadcast")) self.verticalSplitter_6.addWidget(self.textEditMessageBroadcast) self.verticalSplitter_6.setStretchFactor(0, 0) self.verticalSplitter_6.setStretchFactor(1, 1) self.verticalSplitter_6.setCollapsible(0, False) self.verticalSplitter_6.setCollapsible(1, False) self.verticalSplitter_6.handle(1).setEnabled(False) self.gridLayout_9.addWidget(self.verticalSplitter_6, 0, 0, 1, 1) self.tabWidgetSend.addTab(self.sendBroadcast, _fromUtf8("")) self.verticalSplitter.addWidget(self.tabWidgetSend) self.tTLContainer = QtGui.QWidget() self.tTLContainer.setSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed) self.horizontalLayout_5 = QtGui.QHBoxLayout() self.tTLContainer.setLayout(self.horizontalLayout_5) self.horizontalLayout_5.setObjectName(_fromUtf8("horizontalLayout_5")) self.pushButtonTTL = QtGui.QPushButton(self.send) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.pushButtonTTL.sizePolicy().hasHeightForWidth()) self.pushButtonTTL.setSizePolicy(sizePolicy) palette = QtGui.QPalette() brush = QtGui.QBrush(QtGui.QColor(0, 0, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush) self.pushButtonTTL.setPalette(palette) font = QtGui.QFont() font.setUnderline(True) self.pushButtonTTL.setFont(font) self.pushButtonTTL.setFlat(True) self.pushButtonTTL.setObjectName(_fromUtf8("pushButtonTTL")) self.horizontalLayout_5.addWidget(self.pushButtonTTL, 0, QtCore.Qt.AlignRight) self.horizontalSliderTTL = QtGui.QSlider(self.send) self.horizontalSliderTTL.setMinimumSize(QtCore.QSize(70, 0)) self.horizontalSliderTTL.setOrientation(QtCore.Qt.Horizontal) self.horizontalSliderTTL.setInvertedAppearance(False) self.horizontalSliderTTL.setInvertedControls(False) self.horizontalSliderTTL.setObjectName(_fromUtf8("horizontalSliderTTL")) self.horizontalLayout_5.addWidget(self.horizontalSliderTTL, 0, QtCore.Qt.AlignLeft) self.labelHumanFriendlyTTLDescription = QtGui.QLabel(self.send) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.labelHumanFriendlyTTLDescription.sizePolicy().hasHeightForWidth()) self.labelHumanFriendlyTTLDescription.setSizePolicy(sizePolicy) self.labelHumanFriendlyTTLDescription.setMinimumSize(QtCore.QSize(45, 0)) self.labelHumanFriendlyTTLDescription.setObjectName(_fromUtf8("labelHumanFriendlyTTLDescription")) self.horizontalLayout_5.addWidget(self.labelHumanFriendlyTTLDescription, 1, QtCore.Qt.AlignLeft) self.pushButtonSend = QtGui.QPushButton(self.send) self.pushButtonSend.setObjectName(_fromUtf8("pushButtonSend")) self.horizontalLayout_5.addWidget(self.pushButtonSend, 0, QtCore.Qt.AlignRight) self.horizontalSliderTTL.setMaximumSize(QtCore.QSize(105, self.pushButtonSend.height())) self.verticalSplitter.addWidget(self.tTLContainer) self.tTLContainer.adjustSize() self.verticalSplitter.setStretchFactor(1, 0) self.verticalSplitter.setStretchFactor(0, 1) self.verticalSplitter.setCollapsible(0, False) self.verticalSplitter.setCollapsible(1, False) self.verticalSplitter.handle(1).setEnabled(False) self.horizontalSplitter.addWidget(self.verticalSplitter) self.horizontalSplitter.setStretchFactor(0, 0) self.horizontalSplitter.setStretchFactor(1, 1) self.horizontalSplitter.setCollapsible(0, False) self.horizontalSplitter.setCollapsible(1, False) self.gridLayout_7.addWidget(self.horizontalSplitter, 0, 0, 1, 1) icon4 = QtGui.QIcon() icon4.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/send.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.tabWidget.addTab(self.send, icon4, _fromUtf8("")) self.subscriptions = QtGui.QWidget() self.subscriptions.setObjectName(_fromUtf8("subscriptions")) self.gridLayout_3 = QtGui.QGridLayout(self.subscriptions) self.gridLayout_3.setObjectName(_fromUtf8("gridLayout_3")) self.horizontalSplitter_4 = settingsmixin.SSplitter() self.horizontalSplitter_4.setObjectName(_fromUtf8("horizontalSplitter_4")) self.verticalSplitter_3 = settingsmixin.SSplitter() self.verticalSplitter_3.setObjectName(_fromUtf8("verticalSplitter_3")) self.verticalSplitter_3.setOrientation(QtCore.Qt.Vertical) self.treeWidgetSubscriptions = settingsmixin.STreeWidget(self.subscriptions) self.treeWidgetSubscriptions.setAlternatingRowColors(True) self.treeWidgetSubscriptions.setSelectionMode(QtGui.QAbstractItemView.SingleSelection) self.treeWidgetSubscriptions.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows) self.treeWidgetSubscriptions.setObjectName(_fromUtf8("treeWidgetSubscriptions")) self.treeWidgetSubscriptions.resize(200, self.treeWidgetSubscriptions.height()) icon5 = QtGui.QIcon() icon5.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/subscriptions.png")), QtGui.QIcon.Selected, QtGui.QIcon.Off) self.treeWidgetSubscriptions.headerItem().setIcon(0, icon5) self.verticalSplitter_3.addWidget(self.treeWidgetSubscriptions) self.pushButtonAddSubscription = QtGui.QPushButton(self.subscriptions) self.pushButtonAddSubscription.setObjectName(_fromUtf8("pushButtonAddSubscription")) self.pushButtonAddSubscription.resize(200, self.pushButtonAddSubscription.height()) self.verticalSplitter_3.addWidget(self.pushButtonAddSubscription) self.verticalSplitter_3.setStretchFactor(0, 1) self.verticalSplitter_3.setStretchFactor(1, 0) self.verticalSplitter_3.setCollapsible(0, False) self.verticalSplitter_3.setCollapsible(1, False) self.verticalSplitter_3.handle(1).setEnabled(False) self.horizontalSplitter_4.addWidget(self.verticalSplitter_3) self.verticalSplitter_4 = settingsmixin.SSplitter() self.verticalSplitter_4.setObjectName(_fromUtf8("verticalSplitter_4")) self.verticalSplitter_4.setOrientation(QtCore.Qt.Vertical) self.horizontalSplitter_2 = QtGui.QSplitter() self.horizontalSplitter_2.setObjectName(_fromUtf8("horizontalSplitter_2")) self.inboxSearchLineEditSubscriptions = QtGui.QLineEdit(self.subscriptions) self.inboxSearchLineEditSubscriptions.setObjectName(_fromUtf8("inboxSearchLineEditSubscriptions")) self.horizontalSplitter_2.addWidget(self.inboxSearchLineEditSubscriptions) self.inboxSearchOptionSubscriptions = QtGui.QComboBox(self.subscriptions) self.inboxSearchOptionSubscriptions.setObjectName(_fromUtf8("inboxSearchOptionSubscriptions")) self.inboxSearchOptionSubscriptions.addItem(_fromUtf8("")) self.inboxSearchOptionSubscriptions.addItem(_fromUtf8("")) self.inboxSearchOptionSubscriptions.addItem(_fromUtf8("")) self.inboxSearchOptionSubscriptions.addItem(_fromUtf8("")) self.inboxSearchOptionSubscriptions.addItem(_fromUtf8("")) self.inboxSearchOptionSubscriptions.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToContents) self.horizontalSplitter_2.addWidget(self.inboxSearchOptionSubscriptions) self.horizontalSplitter_2.handle(1).setEnabled(False) self.horizontalSplitter_2.setStretchFactor(0, 1) self.horizontalSplitter_2.setStretchFactor(1, 0) self.verticalSplitter_4.addWidget(self.horizontalSplitter_2) self.tableWidgetInboxSubscriptions = settingsmixin.STableWidget(self.subscriptions) self.tableWidgetInboxSubscriptions.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers) self.tableWidgetInboxSubscriptions.setAlternatingRowColors(True) self.tableWidgetInboxSubscriptions.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection) self.tableWidgetInboxSubscriptions.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows) self.tableWidgetInboxSubscriptions.setWordWrap(False) self.tableWidgetInboxSubscriptions.setObjectName(_fromUtf8("tableWidgetInboxSubscriptions")) self.tableWidgetInboxSubscriptions.setColumnCount(4) self.tableWidgetInboxSubscriptions.setRowCount(0) item = QtGui.QTableWidgetItem() self.tableWidgetInboxSubscriptions.setHorizontalHeaderItem(0, item) item = QtGui.QTableWidgetItem() self.tableWidgetInboxSubscriptions.setHorizontalHeaderItem(1, item) item = QtGui.QTableWidgetItem() self.tableWidgetInboxSubscriptions.setHorizontalHeaderItem(2, item) item = QtGui.QTableWidgetItem() self.tableWidgetInboxSubscriptions.setHorizontalHeaderItem(3, item) self.tableWidgetInboxSubscriptions.horizontalHeader().setCascadingSectionResizes(True) self.tableWidgetInboxSubscriptions.horizontalHeader().setDefaultSectionSize(200) self.tableWidgetInboxSubscriptions.horizontalHeader().setHighlightSections(False) self.tableWidgetInboxSubscriptions.horizontalHeader().setMinimumSectionSize(27) self.tableWidgetInboxSubscriptions.horizontalHeader().setSortIndicatorShown(False) self.tableWidgetInboxSubscriptions.horizontalHeader().setStretchLastSection(True) self.tableWidgetInboxSubscriptions.verticalHeader().setVisible(False) self.tableWidgetInboxSubscriptions.verticalHeader().setDefaultSectionSize(26) self.verticalSplitter_4.addWidget(self.tableWidgetInboxSubscriptions) self.textEditInboxMessageSubscriptions = MessageView(self.subscriptions) self.textEditInboxMessageSubscriptions.setBaseSize(QtCore.QSize(0, 500)) self.textEditInboxMessageSubscriptions.setReadOnly(True) self.textEditInboxMessageSubscriptions.setObjectName(_fromUtf8("textEditInboxMessageSubscriptions")) self.verticalSplitter_4.addWidget(self.textEditInboxMessageSubscriptions) self.verticalSplitter_4.setStretchFactor(0, 0) self.verticalSplitter_4.setStretchFactor(1, 1) self.verticalSplitter_4.setStretchFactor(2, 2) self.verticalSplitter_4.setCollapsible(0, False) self.verticalSplitter_4.setCollapsible(1, False) self.verticalSplitter_4.setCollapsible(2, False) self.verticalSplitter_4.handle(1).setEnabled(False) self.horizontalSplitter_4.addWidget(self.verticalSplitter_4) self.horizontalSplitter_4.setStretchFactor(0, 0) self.horizontalSplitter_4.setStretchFactor(1, 1) self.horizontalSplitter_4.setCollapsible(0, False) self.horizontalSplitter_4.setCollapsible(1, False) self.gridLayout_3.addWidget(self.horizontalSplitter_4, 0, 0, 1, 1) icon6 = QtGui.QIcon() icon6.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/subscriptions.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.tabWidget.addTab(self.subscriptions, icon6, _fromUtf8("")) self.chans = QtGui.QWidget() self.chans.setObjectName(_fromUtf8("chans")) self.gridLayout_4 = QtGui.QGridLayout(self.chans) self.gridLayout_4.setObjectName(_fromUtf8("gridLayout_4")) self.horizontalSplitter_7 = settingsmixin.SSplitter() self.horizontalSplitter_7.setObjectName(_fromUtf8("horizontalSplitter_7")) self.verticalSplitter_17 = settingsmixin.SSplitter() self.verticalSplitter_17.setObjectName(_fromUtf8("verticalSplitter_17")) self.verticalSplitter_17.setOrientation(QtCore.Qt.Vertical) self.treeWidgetChans = settingsmixin.STreeWidget(self.chans) self.treeWidgetChans.setFrameShadow(QtGui.QFrame.Sunken) self.treeWidgetChans.setLineWidth(1) self.treeWidgetChans.setAlternatingRowColors(True) self.treeWidgetChans.setSelectionMode(QtGui.QAbstractItemView.SingleSelection) self.treeWidgetChans.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows) self.treeWidgetChans.setObjectName(_fromUtf8("treeWidgetChans")) self.treeWidgetChans.resize(200, self.treeWidgetChans.height()) icon7 = QtGui.QIcon() icon7.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/can-icon-16px.png")), QtGui.QIcon.Selected, QtGui.QIcon.Off) self.treeWidgetChans.headerItem().setIcon(0, icon7) self.verticalSplitter_17.addWidget(self.treeWidgetChans) self.pushButtonAddChan = QtGui.QPushButton(self.chans) self.pushButtonAddChan.setObjectName(_fromUtf8("pushButtonAddChan")) self.pushButtonAddChan.resize(200, self.pushButtonAddChan.height()) self.verticalSplitter_17.addWidget(self.pushButtonAddChan) self.verticalSplitter_17.setStretchFactor(0, 1) self.verticalSplitter_17.setStretchFactor(1, 0) self.verticalSplitter_17.setCollapsible(0, False) self.verticalSplitter_17.setCollapsible(1, False) self.verticalSplitter_17.handle(1).setEnabled(False) self.horizontalSplitter_7.addWidget(self.verticalSplitter_17) self.verticalSplitter_8 = settingsmixin.SSplitter() self.verticalSplitter_8.setObjectName(_fromUtf8("verticalSplitter_8")) self.verticalSplitter_8.setOrientation(QtCore.Qt.Vertical) self.horizontalSplitter_6 = QtGui.QSplitter() self.horizontalSplitter_6.setObjectName(_fromUtf8("horizontalSplitter_6")) self.inboxSearchLineEditChans = QtGui.QLineEdit(self.chans) self.inboxSearchLineEditChans.setObjectName(_fromUtf8("inboxSearchLineEditChans")) self.horizontalSplitter_6.addWidget(self.inboxSearchLineEditChans) self.inboxSearchOptionChans = QtGui.QComboBox(self.chans) self.inboxSearchOptionChans.setObjectName(_fromUtf8("inboxSearchOptionChans")) self.inboxSearchOptionChans.addItem(_fromUtf8("")) self.inboxSearchOptionChans.addItem(_fromUtf8("")) self.inboxSearchOptionChans.addItem(_fromUtf8("")) self.inboxSearchOptionChans.addItem(_fromUtf8("")) self.inboxSearchOptionChans.addItem(_fromUtf8("")) self.inboxSearchOptionChans.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToContents) self.horizontalSplitter_6.addWidget(self.inboxSearchOptionChans) self.horizontalSplitter_6.handle(1).setEnabled(False) self.horizontalSplitter_6.setStretchFactor(0, 1) self.horizontalSplitter_6.setStretchFactor(1, 0) self.verticalSplitter_8.addWidget(self.horizontalSplitter_6) self.tableWidgetInboxChans = settingsmixin.STableWidget(self.chans) self.tableWidgetInboxChans.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers) self.tableWidgetInboxChans.setAlternatingRowColors(True) self.tableWidgetInboxChans.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection) self.tableWidgetInboxChans.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows) self.tableWidgetInboxChans.setWordWrap(False) self.tableWidgetInboxChans.setObjectName(_fromUtf8("tableWidgetInboxChans")) self.tableWidgetInboxChans.setColumnCount(4) self.tableWidgetInboxChans.setRowCount(0) item = QtGui.QTableWidgetItem() self.tableWidgetInboxChans.setHorizontalHeaderItem(0, item) item = QtGui.QTableWidgetItem() self.tableWidgetInboxChans.setHorizontalHeaderItem(1, item) item = QtGui.QTableWidgetItem() self.tableWidgetInboxChans.setHorizontalHeaderItem(2, item) item = QtGui.QTableWidgetItem() self.tableWidgetInboxChans.setHorizontalHeaderItem(3, item) self.tableWidgetInboxChans.horizontalHeader().setCascadingSectionResizes(True) self.tableWidgetInboxChans.horizontalHeader().setDefaultSectionSize(200) self.tableWidgetInboxChans.horizontalHeader().setHighlightSections(False) self.tableWidgetInboxChans.horizontalHeader().setMinimumSectionSize(27) self.tableWidgetInboxChans.horizontalHeader().setSortIndicatorShown(False) self.tableWidgetInboxChans.horizontalHeader().setStretchLastSection(True) self.tableWidgetInboxChans.verticalHeader().setVisible(False) self.tableWidgetInboxChans.verticalHeader().setDefaultSectionSize(26) self.verticalSplitter_8.addWidget(self.tableWidgetInboxChans) self.textEditInboxMessageChans = MessageView(self.chans) self.textEditInboxMessageChans.setBaseSize(QtCore.QSize(0, 500)) self.textEditInboxMessageChans.setReadOnly(True) self.textEditInboxMessageChans.setObjectName(_fromUtf8("textEditInboxMessageChans")) self.verticalSplitter_8.addWidget(self.textEditInboxMessageChans) self.verticalSplitter_8.setStretchFactor(0, 0) self.verticalSplitter_8.setStretchFactor(1, 1) self.verticalSplitter_8.setStretchFactor(2, 2) self.verticalSplitter_8.setCollapsible(0, False) self.verticalSplitter_8.setCollapsible(1, False) self.verticalSplitter_8.setCollapsible(2, False) self.verticalSplitter_8.handle(1).setEnabled(False) self.horizontalSplitter_7.addWidget(self.verticalSplitter_8) self.horizontalSplitter_7.setStretchFactor(0, 0) self.horizontalSplitter_7.setStretchFactor(1, 1) self.horizontalSplitter_7.setCollapsible(0, False) self.horizontalSplitter_7.setCollapsible(1, False) self.gridLayout_4.addWidget(self.horizontalSplitter_7, 0, 0, 1, 1) icon8 = QtGui.QIcon() icon8.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/can-icon-16px.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.tabWidget.addTab(self.chans, icon8, _fromUtf8("")) self.blackwhitelist = Blacklist() self.tabWidget.addTab(self.blackwhitelist, QtGui.QIcon(":/newPrefix/images/blacklist.png"), "") # Initialize the Blacklist or Whitelist if BMConfigParser().get('bitmessagesettings', 'blackwhitelist') == 'white': self.blackwhitelist.radioButtonWhitelist.click() self.blackwhitelist.rerenderBlackWhiteList() self.networkstatus = NetworkStatus() self.tabWidget.addTab(self.networkstatus, QtGui.QIcon(":/newPrefix/images/networkstatus.png"), "") self.gridLayout_10.addWidget(self.tabWidget, 0, 0, 1, 1) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtGui.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 885, 27)) self.menubar.setObjectName(_fromUtf8("menubar")) self.menuFile = QtGui.QMenu(self.menubar) self.menuFile.setObjectName(_fromUtf8("menuFile")) self.menuSettings = QtGui.QMenu(self.menubar) self.menuSettings.setObjectName(_fromUtf8("menuSettings")) self.menuHelp = QtGui.QMenu(self.menubar) self.menuHelp.setObjectName(_fromUtf8("menuHelp")) MainWindow.setMenuBar(self.menubar) self.statusbar = QtGui.QStatusBar(MainWindow) self.statusbar.setMaximumSize(QtCore.QSize(16777215, 22)) self.statusbar.setObjectName(_fromUtf8("statusbar")) MainWindow.setStatusBar(self.statusbar) self.actionImport_keys = QtGui.QAction(MainWindow) self.actionImport_keys.setObjectName(_fromUtf8("actionImport_keys")) self.actionManageKeys = QtGui.QAction(MainWindow) self.actionManageKeys.setCheckable(False) self.actionManageKeys.setEnabled(True) icon = QtGui.QIcon.fromTheme(_fromUtf8("dialog-password")) self.actionManageKeys.setIcon(icon) self.actionManageKeys.setObjectName(_fromUtf8("actionManageKeys")) self.actionExit = QtGui.QAction(MainWindow) icon = QtGui.QIcon.fromTheme(_fromUtf8("application-exit")) self.actionExit.setIcon(icon) self.actionExit.setObjectName(_fromUtf8("actionExit")) self.actionHelp = QtGui.QAction(MainWindow) icon = QtGui.QIcon.fromTheme(_fromUtf8("help-contents")) self.actionHelp.setIcon(icon) self.actionHelp.setObjectName(_fromUtf8("actionHelp")) self.actionAbout = QtGui.QAction(MainWindow) icon = QtGui.QIcon.fromTheme(_fromUtf8("help-about")) self.actionAbout.setIcon(icon) self.actionAbout.setObjectName(_fromUtf8("actionAbout")) self.actionSettings = QtGui.QAction(MainWindow) icon = QtGui.QIcon.fromTheme(_fromUtf8("document-properties")) self.actionSettings.setIcon(icon) self.actionSettings.setObjectName(_fromUtf8("actionSettings")) self.actionRegenerateDeterministicAddresses = QtGui.QAction(MainWindow) icon = QtGui.QIcon.fromTheme(_fromUtf8("view-refresh")) self.actionRegenerateDeterministicAddresses.setIcon(icon) self.actionRegenerateDeterministicAddresses.setObjectName(_fromUtf8("actionRegenerateDeterministicAddresses")) self.actionDeleteAllTrashedMessages = QtGui.QAction(MainWindow) icon = QtGui.QIcon.fromTheme(_fromUtf8("user-trash")) self.actionDeleteAllTrashedMessages.setIcon(icon) self.actionDeleteAllTrashedMessages.setObjectName(_fromUtf8("actionDeleteAllTrashedMessages")) self.actionJoinChan = QtGui.QAction(MainWindow) icon = QtGui.QIcon.fromTheme(_fromUtf8("contact-new")) self.actionJoinChan.setIcon(icon) self.actionJoinChan.setObjectName(_fromUtf8("actionJoinChan")) self.menuFile.addAction(self.actionManageKeys) self.menuFile.addAction(self.actionDeleteAllTrashedMessages) self.menuFile.addAction(self.actionRegenerateDeterministicAddresses) self.menuFile.addAction(self.actionExit) self.menuSettings.addAction(self.actionSettings) self.menuHelp.addAction(self.actionHelp) self.menuHelp.addAction(self.actionAbout) self.menubar.addAction(self.menuFile.menuAction()) self.menubar.addAction(self.menuSettings.menuAction()) self.menubar.addAction(self.menuHelp.menuAction()) self.retranslateUi(MainWindow) self.tabWidget.setCurrentIndex(0) self.tabWidgetSend.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(MainWindow) MainWindow.setTabOrder(self.tableWidgetInbox, self.textEditInboxMessage) MainWindow.setTabOrder(self.textEditInboxMessage, self.comboBoxSendFrom) MainWindow.setTabOrder(self.comboBoxSendFrom, self.lineEditTo) MainWindow.setTabOrder(self.lineEditTo, self.lineEditSubject) MainWindow.setTabOrder(self.lineEditSubject, self.textEditMessage) MainWindow.setTabOrder(self.textEditMessage, self.pushButtonAddSubscription)
def test_email_blacklist(self): blacklist = Blacklist.factory("emails") self.assertTrue(blacklist.is_blacklisted("*****@*****.**")) self.assertFalse(blacklist.is_blacklisted("*****@*****.**"))
class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName(_fromUtf8("MainWindow")) MainWindow.resize(885, 580) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/can-icon-24px.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) MainWindow.setWindowIcon(icon) MainWindow.setTabShape(QtGui.QTabWidget.Rounded) self.centralwidget = QtGui.QWidget(MainWindow) self.centralwidget.setObjectName(_fromUtf8("centralwidget")) self.gridLayout_10 = QtGui.QGridLayout(self.centralwidget) self.gridLayout_10.setObjectName(_fromUtf8("gridLayout_10")) self.tabWidget = QtGui.QTabWidget(self.centralwidget) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.tabWidget.sizePolicy().hasHeightForWidth()) self.tabWidget.setSizePolicy(sizePolicy) self.tabWidget.setMinimumSize(QtCore.QSize(0, 0)) self.tabWidget.setBaseSize(QtCore.QSize(0, 0)) font = QtGui.QFont() font.setPointSize(9) self.tabWidget.setFont(font) self.tabWidget.setTabPosition(QtGui.QTabWidget.North) self.tabWidget.setTabShape(QtGui.QTabWidget.Rounded) self.tabWidget.setObjectName(_fromUtf8("tabWidget")) self.inbox = QtGui.QWidget() self.inbox.setObjectName(_fromUtf8("inbox")) self.gridLayout = QtGui.QGridLayout(self.inbox) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.horizontalSplitter_3 = settingsmixin.SSplitter() self.horizontalSplitter_3.setObjectName(_fromUtf8("horizontalSplitter_3")) self.verticalSplitter_12 = settingsmixin.SSplitter() self.verticalSplitter_12.setObjectName(_fromUtf8("verticalSplitter_12")) self.verticalSplitter_12.setOrientation(QtCore.Qt.Vertical) self.treeWidgetYourIdentities = settingsmixin.STreeWidget(self.inbox) self.treeWidgetYourIdentities.setObjectName(_fromUtf8("treeWidgetYourIdentities")) self.treeWidgetYourIdentities.resize(200, self.treeWidgetYourIdentities.height()) icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/identities.png")), QtGui.QIcon.Selected, QtGui.QIcon.Off) self.treeWidgetYourIdentities.headerItem().setIcon(0, icon1) self.verticalSplitter_12.addWidget(self.treeWidgetYourIdentities) self.pushButtonNewAddress = QtGui.QPushButton(self.inbox) self.pushButtonNewAddress.setObjectName(_fromUtf8("pushButtonNewAddress")) self.pushButtonNewAddress.resize(200, self.pushButtonNewAddress.height()) self.verticalSplitter_12.addWidget(self.pushButtonNewAddress) self.verticalSplitter_12.setStretchFactor(0, 1) self.verticalSplitter_12.setStretchFactor(1, 0) self.verticalSplitter_12.setCollapsible(0, False) self.verticalSplitter_12.setCollapsible(1, False) self.verticalSplitter_12.handle(1).setEnabled(False) self.horizontalSplitter_3.addWidget(self.verticalSplitter_12) self.verticalSplitter_7 = settingsmixin.SSplitter() self.verticalSplitter_7.setObjectName(_fromUtf8("verticalSplitter_7")) self.verticalSplitter_7.setOrientation(QtCore.Qt.Vertical) self.horizontalSplitterSearch = QtGui.QSplitter() self.horizontalSplitterSearch.setObjectName(_fromUtf8("horizontalSplitterSearch")) self.inboxSearchLineEdit = QtGui.QLineEdit(self.inbox) self.inboxSearchLineEdit.setObjectName(_fromUtf8("inboxSearchLineEdit")) self.horizontalSplitterSearch.addWidget(self.inboxSearchLineEdit) self.inboxSearchOption = QtGui.QComboBox(self.inbox) self.inboxSearchOption.setObjectName(_fromUtf8("inboxSearchOption")) self.inboxSearchOption.addItem(_fromUtf8("")) self.inboxSearchOption.addItem(_fromUtf8("")) self.inboxSearchOption.addItem(_fromUtf8("")) self.inboxSearchOption.addItem(_fromUtf8("")) self.inboxSearchOption.addItem(_fromUtf8("")) self.inboxSearchOption.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToContents) self.horizontalSplitterSearch.addWidget(self.inboxSearchOption) self.horizontalSplitterSearch.handle(1).setEnabled(False) self.horizontalSplitterSearch.setStretchFactor(0, 1) self.horizontalSplitterSearch.setStretchFactor(1, 0) self.verticalSplitter_7.addWidget(self.horizontalSplitterSearch) self.tableWidgetInbox = settingsmixin.STableWidget(self.inbox) self.tableWidgetInbox.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers) self.tableWidgetInbox.setAlternatingRowColors(True) self.tableWidgetInbox.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection) self.tableWidgetInbox.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows) self.tableWidgetInbox.setWordWrap(False) self.tableWidgetInbox.setObjectName(_fromUtf8("tableWidgetInbox")) self.tableWidgetInbox.setColumnCount(4) self.tableWidgetInbox.setRowCount(0) item = QtGui.QTableWidgetItem() self.tableWidgetInbox.setHorizontalHeaderItem(0, item) item = QtGui.QTableWidgetItem() self.tableWidgetInbox.setHorizontalHeaderItem(1, item) item = QtGui.QTableWidgetItem() self.tableWidgetInbox.setHorizontalHeaderItem(2, item) item = QtGui.QTableWidgetItem() self.tableWidgetInbox.setHorizontalHeaderItem(3, item) self.tableWidgetInbox.horizontalHeader().setCascadingSectionResizes(True) self.tableWidgetInbox.horizontalHeader().setDefaultSectionSize(200) self.tableWidgetInbox.horizontalHeader().setHighlightSections(False) self.tableWidgetInbox.horizontalHeader().setMinimumSectionSize(27) self.tableWidgetInbox.horizontalHeader().setSortIndicatorShown(False) self.tableWidgetInbox.horizontalHeader().setStretchLastSection(True) self.tableWidgetInbox.verticalHeader().setVisible(False) self.tableWidgetInbox.verticalHeader().setDefaultSectionSize(26) self.verticalSplitter_7.addWidget(self.tableWidgetInbox) self.textEditInboxMessage = MessageView(self.inbox) self.textEditInboxMessage.setBaseSize(QtCore.QSize(0, 500)) self.textEditInboxMessage.setReadOnly(True) self.textEditInboxMessage.setObjectName(_fromUtf8("textEditInboxMessage")) self.verticalSplitter_7.addWidget(self.textEditInboxMessage) self.verticalSplitter_7.setStretchFactor(0, 0) self.verticalSplitter_7.setStretchFactor(1, 1) self.verticalSplitter_7.setStretchFactor(2, 2) self.verticalSplitter_7.setCollapsible(0, False) self.verticalSplitter_7.setCollapsible(1, False) self.verticalSplitter_7.setCollapsible(2, False) self.verticalSplitter_7.handle(1).setEnabled(False) self.horizontalSplitter_3.addWidget(self.verticalSplitter_7) self.horizontalSplitter_3.setStretchFactor(0, 0) self.horizontalSplitter_3.setStretchFactor(1, 1) self.horizontalSplitter_3.setCollapsible(0, False) self.horizontalSplitter_3.setCollapsible(1, False) self.gridLayout.addWidget(self.horizontalSplitter_3) icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/inbox.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.tabWidget.addTab(self.inbox, icon2, _fromUtf8("")) self.send = QtGui.QWidget() self.send.setObjectName(_fromUtf8("send")) self.gridLayout_7 = QtGui.QGridLayout(self.send) self.gridLayout_7.setObjectName(_fromUtf8("gridLayout_7")) self.horizontalSplitter = settingsmixin.SSplitter() self.horizontalSplitter.setObjectName(_fromUtf8("horizontalSplitter")) self.verticalSplitter_2 = settingsmixin.SSplitter() self.verticalSplitter_2.setObjectName(_fromUtf8("verticalSplitter_2")) self.verticalSplitter_2.setOrientation(QtCore.Qt.Vertical) self.tableWidgetAddressBook = settingsmixin.STableWidget(self.send) self.tableWidgetAddressBook.setAlternatingRowColors(True) self.tableWidgetAddressBook.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection) self.tableWidgetAddressBook.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows) self.tableWidgetAddressBook.setObjectName(_fromUtf8("tableWidgetAddressBook")) self.tableWidgetAddressBook.setColumnCount(2) self.tableWidgetAddressBook.setRowCount(0) self.tableWidgetAddressBook.resize(200, self.tableWidgetAddressBook.height()) item = QtGui.QTableWidgetItem() icon3 = QtGui.QIcon() icon3.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/addressbook.png")), QtGui.QIcon.Selected, QtGui.QIcon.Off) item.setIcon(icon3) self.tableWidgetAddressBook.setHorizontalHeaderItem(0, item) item = QtGui.QTableWidgetItem() self.tableWidgetAddressBook.setHorizontalHeaderItem(1, item) self.tableWidgetAddressBook.horizontalHeader().setCascadingSectionResizes(True) self.tableWidgetAddressBook.horizontalHeader().setDefaultSectionSize(200) self.tableWidgetAddressBook.horizontalHeader().setHighlightSections(False) self.tableWidgetAddressBook.horizontalHeader().setStretchLastSection(True) self.tableWidgetAddressBook.verticalHeader().setVisible(False) self.verticalSplitter_2.addWidget(self.tableWidgetAddressBook) self.pushButtonAddAddressBook = QtGui.QPushButton(self.send) self.pushButtonAddAddressBook.setObjectName(_fromUtf8("pushButtonAddAddressBook")) self.pushButtonAddAddressBook.resize(200, self.pushButtonAddAddressBook.height()) self.verticalSplitter_2.addWidget(self.pushButtonAddAddressBook) self.pushButtonFetchNamecoinID = QtGui.QPushButton(self.send) self.pushButtonFetchNamecoinID.resize(200, self.pushButtonFetchNamecoinID.height()) font = QtGui.QFont() font.setPointSize(9) self.pushButtonFetchNamecoinID.setFont(font) self.pushButtonFetchNamecoinID.setObjectName(_fromUtf8("pushButtonFetchNamecoinID")) self.verticalSplitter_2.addWidget(self.pushButtonFetchNamecoinID) self.verticalSplitter_2.setStretchFactor(0, 1) self.verticalSplitter_2.setStretchFactor(1, 0) self.verticalSplitter_2.setStretchFactor(2, 0) self.verticalSplitter_2.setCollapsible(0, False) self.verticalSplitter_2.setCollapsible(1, False) self.verticalSplitter_2.setCollapsible(2, False) self.verticalSplitter_2.handle(1).setEnabled(False) self.verticalSplitter_2.handle(2).setEnabled(False) self.horizontalSplitter.addWidget(self.verticalSplitter_2) self.verticalSplitter = settingsmixin.SSplitter() self.verticalSplitter.setObjectName(_fromUtf8("verticalSplitter")) self.verticalSplitter.setOrientation(QtCore.Qt.Vertical) self.tabWidgetSend = QtGui.QTabWidget(self.send) self.tabWidgetSend.setObjectName(_fromUtf8("tabWidgetSend")) self.sendDirect = QtGui.QWidget() self.sendDirect.setObjectName(_fromUtf8("sendDirect")) self.gridLayout_8 = QtGui.QGridLayout(self.sendDirect) self.gridLayout_8.setObjectName(_fromUtf8("gridLayout_8")) self.verticalSplitter_5 = settingsmixin.SSplitter() self.verticalSplitter_5.setObjectName(_fromUtf8("verticalSplitter_5")) self.verticalSplitter_5.setOrientation(QtCore.Qt.Vertical) self.gridLayout_2 = QtGui.QGridLayout() self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2")) self.label_3 = QtGui.QLabel(self.sendDirect) self.label_3.setObjectName(_fromUtf8("label_3")) self.gridLayout_2.addWidget(self.label_3, 2, 0, 1, 1) self.label_2 = QtGui.QLabel(self.sendDirect) self.label_2.setObjectName(_fromUtf8("label_2")) self.gridLayout_2.addWidget(self.label_2, 0, 0, 1, 1) self.lineEditSubject = QtGui.QLineEdit(self.sendDirect) self.lineEditSubject.setText(_fromUtf8("")) self.lineEditSubject.setObjectName(_fromUtf8("lineEditSubject")) self.gridLayout_2.addWidget(self.lineEditSubject, 2, 1, 1, 1) self.label = QtGui.QLabel(self.sendDirect) self.label.setObjectName(_fromUtf8("label")) self.gridLayout_2.addWidget(self.label, 1, 0, 1, 1) self.comboBoxSendFrom = QtGui.QComboBox(self.sendDirect) self.comboBoxSendFrom.setMinimumSize(QtCore.QSize(300, 0)) self.comboBoxSendFrom.setObjectName(_fromUtf8("comboBoxSendFrom")) self.gridLayout_2.addWidget(self.comboBoxSendFrom, 0, 1, 1, 1) self.lineEditTo = QtGui.QLineEdit(self.sendDirect) self.lineEditTo.setObjectName(_fromUtf8("lineEditTo")) self.gridLayout_2.addWidget(self.lineEditTo, 1, 1, 1, 1) self.gridLayout_2_Widget = QtGui.QWidget() self.gridLayout_2_Widget.setLayout(self.gridLayout_2) self.verticalSplitter_5.addWidget(self.gridLayout_2_Widget) self.textEditMessage = MessageCompose(self.sendDirect) self.textEditMessage.setObjectName(_fromUtf8("textEditMessage")) self.verticalSplitter_5.addWidget(self.textEditMessage) self.verticalSplitter_5.setStretchFactor(0, 0) self.verticalSplitter_5.setStretchFactor(1, 1) self.verticalSplitter_5.setCollapsible(0, False) self.verticalSplitter_5.setCollapsible(1, False) self.verticalSplitter_5.handle(1).setEnabled(False) self.gridLayout_8.addWidget(self.verticalSplitter_5, 0, 0, 1, 1) self.tabWidgetSend.addTab(self.sendDirect, _fromUtf8("")) self.sendBroadcast = QtGui.QWidget() self.sendBroadcast.setObjectName(_fromUtf8("sendBroadcast")) self.gridLayout_9 = QtGui.QGridLayout(self.sendBroadcast) self.gridLayout_9.setObjectName(_fromUtf8("gridLayout_9")) self.verticalSplitter_6 = settingsmixin.SSplitter() self.verticalSplitter_6.setObjectName(_fromUtf8("verticalSplitter_6")) self.verticalSplitter_6.setOrientation(QtCore.Qt.Vertical) self.gridLayout_5 = QtGui.QGridLayout() self.gridLayout_5.setObjectName(_fromUtf8("gridLayout_5")) self.label_8 = QtGui.QLabel(self.sendBroadcast) self.label_8.setObjectName(_fromUtf8("label_8")) self.gridLayout_5.addWidget(self.label_8, 0, 0, 1, 1) self.lineEditSubjectBroadcast = QtGui.QLineEdit(self.sendBroadcast) self.lineEditSubjectBroadcast.setText(_fromUtf8("")) self.lineEditSubjectBroadcast.setObjectName(_fromUtf8("lineEditSubjectBroadcast")) self.gridLayout_5.addWidget(self.lineEditSubjectBroadcast, 1, 1, 1, 1) self.label_7 = QtGui.QLabel(self.sendBroadcast) self.label_7.setObjectName(_fromUtf8("label_7")) self.gridLayout_5.addWidget(self.label_7, 1, 0, 1, 1) self.comboBoxSendFromBroadcast = QtGui.QComboBox(self.sendBroadcast) self.comboBoxSendFromBroadcast.setMinimumSize(QtCore.QSize(300, 0)) self.comboBoxSendFromBroadcast.setObjectName(_fromUtf8("comboBoxSendFromBroadcast")) self.gridLayout_5.addWidget(self.comboBoxSendFromBroadcast, 0, 1, 1, 1) self.gridLayout_5_Widget = QtGui.QWidget() self.gridLayout_5_Widget.setLayout(self.gridLayout_5) self.verticalSplitter_6.addWidget(self.gridLayout_5_Widget) self.textEditMessageBroadcast = MessageCompose(self.sendBroadcast) self.textEditMessageBroadcast.setObjectName(_fromUtf8("textEditMessageBroadcast")) self.verticalSplitter_6.addWidget(self.textEditMessageBroadcast) self.verticalSplitter_6.setStretchFactor(0, 0) self.verticalSplitter_6.setStretchFactor(1, 1) self.verticalSplitter_6.setCollapsible(0, False) self.verticalSplitter_6.setCollapsible(1, False) self.verticalSplitter_6.handle(1).setEnabled(False) self.gridLayout_9.addWidget(self.verticalSplitter_6, 0, 0, 1, 1) self.tabWidgetSend.addTab(self.sendBroadcast, _fromUtf8("")) self.verticalSplitter.addWidget(self.tabWidgetSend) self.horizontalSplitter_5 = QtGui.QSplitter() self.horizontalSplitter_5.setObjectName(_fromUtf8("horizontalSplitter_5")) self.pushButtonTTL = QtGui.QPushButton(self.send) # sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) # sizePolicy.setHorizontalStretch(0) # sizePolicy.setVerticalStretch(0) # sizePolicy.setHeightForWidth(self.pushButtonTTL.sizePolicy().hasHeightForWidth()) # self.pushButtonTTL.setSizePolicy(sizePolicy) palette = QtGui.QPalette() brush = QtGui.QBrush(QtGui.QColor(0, 0, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush) self.pushButtonTTL.setPalette(palette) font = QtGui.QFont() font.setUnderline(True) self.pushButtonTTL.setFont(font) self.pushButtonTTL.setFlat(True) self.pushButtonTTL.setObjectName(_fromUtf8("pushButtonTTL")) self.horizontalSplitter_5.addWidget(self.pushButtonTTL) self.horizontalSliderTTL = QtGui.QSlider(self.send) self.horizontalSliderTTL.setMinimumSize(QtCore.QSize(35, 0)) self.horizontalSliderTTL.setOrientation(QtCore.Qt.Horizontal) self.horizontalSliderTTL.setInvertedAppearance(False) self.horizontalSliderTTL.setInvertedControls(False) self.horizontalSliderTTL.setObjectName(_fromUtf8("horizontalSliderTTL")) self.horizontalSplitter_5.addWidget(self.horizontalSliderTTL) self.labelHumanFriendlyTTLDescription = QtGui.QLabel(self.send) # sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Preferred) # sizePolicy.setHorizontalStretch(0) # sizePolicy.setVerticalStretch(0) # sizePolicy.setHeightForWidth(self.labelHumanFriendlyTTLDescription.sizePolicy().hasHeightForWidth()) # self.labelHumanFriendlyTTLDescription.setSizePolicy(sizePolicy) self.labelHumanFriendlyTTLDescription.setMinimumSize(QtCore.QSize(45, 0)) self.labelHumanFriendlyTTLDescription.setObjectName(_fromUtf8("labelHumanFriendlyTTLDescription")) self.horizontalSplitter_5.addWidget(self.labelHumanFriendlyTTLDescription) self.pushButtonSend = QtGui.QPushButton(self.send) self.pushButtonSend.setObjectName(_fromUtf8("pushButtonSend")) self.horizontalSplitter_5.addWidget(self.pushButtonSend) self.pushButtonTTL.setMaximumSize(QtCore.QSize(32, self.pushButtonSend.height())) self.labelHumanFriendlyTTLDescription.setMaximumSize(QtCore.QSize(45, self.pushButtonSend.height())) self.horizontalSliderTTL.setMaximumSize(QtCore.QSize(70, self.pushButtonSend.height())) self.horizontalSplitter_5.resize(self.horizontalSplitter_5.width(), self.pushButtonSend.height()) self.horizontalSplitter_5.setStretchFactor(0, 0) self.horizontalSplitter_5.setStretchFactor(1, 0) self.horizontalSplitter_5.setStretchFactor(2, 0) self.horizontalSplitter_5.setStretchFactor(3, 1) self.horizontalSplitter_5.setCollapsible(0, False) self.horizontalSplitter_5.setCollapsible(1, False) self.horizontalSplitter_5.setCollapsible(2, False) self.horizontalSplitter_5.setCollapsible(3, False) self.horizontalSplitter_5.handle(1).setEnabled(False) self.horizontalSplitter_5.handle(2).setEnabled(False) self.horizontalSplitter_5.handle(3).setEnabled(False) self.verticalSplitter.addWidget(self.horizontalSplitter_5) self.verticalSplitter.setStretchFactor(0, 0) self.verticalSplitter.setStretchFactor(1, 1) self.verticalSplitter.setCollapsible(0, False) self.verticalSplitter.setCollapsible(1, False) self.verticalSplitter.handle(1).setEnabled(False) self.horizontalSplitter.addWidget(self.verticalSplitter) self.horizontalSplitter.setStretchFactor(0, 0) self.horizontalSplitter.setStretchFactor(1, 1) self.horizontalSplitter.setCollapsible(0, False) self.horizontalSplitter.setCollapsible(1, False) self.gridLayout_7.addWidget(self.horizontalSplitter, 0, 0, 1, 1) icon4 = QtGui.QIcon() icon4.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/send.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.tabWidget.addTab(self.send, icon4, _fromUtf8("")) self.subscriptions = QtGui.QWidget() self.subscriptions.setObjectName(_fromUtf8("subscriptions")) self.gridLayout_3 = QtGui.QGridLayout(self.subscriptions) self.gridLayout_3.setObjectName(_fromUtf8("gridLayout_3")) self.horizontalSplitter_4 = settingsmixin.SSplitter() self.horizontalSplitter_4.setObjectName(_fromUtf8("horizontalSplitter_4")) self.verticalSplitter_3 = settingsmixin.SSplitter() self.verticalSplitter_3.setObjectName(_fromUtf8("verticalSplitter_3")) self.verticalSplitter_3.setOrientation(QtCore.Qt.Vertical) self.treeWidgetSubscriptions = settingsmixin.STreeWidget(self.subscriptions) self.treeWidgetSubscriptions.setAlternatingRowColors(True) self.treeWidgetSubscriptions.setSelectionMode(QtGui.QAbstractItemView.SingleSelection) self.treeWidgetSubscriptions.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows) self.treeWidgetSubscriptions.setObjectName(_fromUtf8("treeWidgetSubscriptions")) self.treeWidgetSubscriptions.resize(200, self.treeWidgetSubscriptions.height()) icon5 = QtGui.QIcon() icon5.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/subscriptions.png")), QtGui.QIcon.Selected, QtGui.QIcon.Off) self.treeWidgetSubscriptions.headerItem().setIcon(0, icon5) self.verticalSplitter_3.addWidget(self.treeWidgetSubscriptions) self.pushButtonAddSubscription = QtGui.QPushButton(self.subscriptions) self.pushButtonAddSubscription.setObjectName(_fromUtf8("pushButtonAddSubscription")) self.pushButtonAddSubscription.resize(200, self.pushButtonAddSubscription.height()) self.verticalSplitter_3.addWidget(self.pushButtonAddSubscription) self.verticalSplitter_3.setStretchFactor(0, 1) self.verticalSplitter_3.setStretchFactor(1, 0) self.verticalSplitter_3.setCollapsible(0, False) self.verticalSplitter_3.setCollapsible(1, False) self.verticalSplitter_3.handle(1).setEnabled(False) self.horizontalSplitter_4.addWidget(self.verticalSplitter_3) self.verticalSplitter_4 = settingsmixin.SSplitter() self.verticalSplitter_4.setObjectName(_fromUtf8("verticalSplitter_4")) self.verticalSplitter_4.setOrientation(QtCore.Qt.Vertical) self.horizontalSplitter_2 = QtGui.QSplitter() self.horizontalSplitter_2.setObjectName(_fromUtf8("horizontalSplitter_2")) self.inboxSearchLineEditSubscriptions = QtGui.QLineEdit(self.subscriptions) self.inboxSearchLineEditSubscriptions.setObjectName(_fromUtf8("inboxSearchLineEditSubscriptions")) self.horizontalSplitter_2.addWidget(self.inboxSearchLineEditSubscriptions) self.inboxSearchOptionSubscriptions = QtGui.QComboBox(self.subscriptions) self.inboxSearchOptionSubscriptions.setObjectName(_fromUtf8("inboxSearchOptionSubscriptions")) self.inboxSearchOptionSubscriptions.addItem(_fromUtf8("")) self.inboxSearchOptionSubscriptions.addItem(_fromUtf8("")) self.inboxSearchOptionSubscriptions.addItem(_fromUtf8("")) self.inboxSearchOptionSubscriptions.addItem(_fromUtf8("")) self.inboxSearchOptionSubscriptions.addItem(_fromUtf8("")) self.inboxSearchOptionSubscriptions.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToContents) self.horizontalSplitter_2.addWidget(self.inboxSearchOptionSubscriptions) self.horizontalSplitter_2.handle(1).setEnabled(False) self.horizontalSplitter_2.setStretchFactor(0, 1) self.horizontalSplitter_2.setStretchFactor(1, 0) self.verticalSplitter_4.addWidget(self.horizontalSplitter_2) self.tableWidgetInboxSubscriptions = settingsmixin.STableWidget(self.subscriptions) self.tableWidgetInboxSubscriptions.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers) self.tableWidgetInboxSubscriptions.setAlternatingRowColors(True) self.tableWidgetInboxSubscriptions.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection) self.tableWidgetInboxSubscriptions.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows) self.tableWidgetInboxSubscriptions.setWordWrap(False) self.tableWidgetInboxSubscriptions.setObjectName(_fromUtf8("tableWidgetInboxSubscriptions")) self.tableWidgetInboxSubscriptions.setColumnCount(4) self.tableWidgetInboxSubscriptions.setRowCount(0) item = QtGui.QTableWidgetItem() self.tableWidgetInboxSubscriptions.setHorizontalHeaderItem(0, item) item = QtGui.QTableWidgetItem() self.tableWidgetInboxSubscriptions.setHorizontalHeaderItem(1, item) item = QtGui.QTableWidgetItem() self.tableWidgetInboxSubscriptions.setHorizontalHeaderItem(2, item) item = QtGui.QTableWidgetItem() self.tableWidgetInboxSubscriptions.setHorizontalHeaderItem(3, item) self.tableWidgetInboxSubscriptions.horizontalHeader().setCascadingSectionResizes(True) self.tableWidgetInboxSubscriptions.horizontalHeader().setDefaultSectionSize(200) self.tableWidgetInboxSubscriptions.horizontalHeader().setHighlightSections(False) self.tableWidgetInboxSubscriptions.horizontalHeader().setMinimumSectionSize(27) self.tableWidgetInboxSubscriptions.horizontalHeader().setSortIndicatorShown(False) self.tableWidgetInboxSubscriptions.horizontalHeader().setStretchLastSection(True) self.tableWidgetInboxSubscriptions.verticalHeader().setVisible(False) self.tableWidgetInboxSubscriptions.verticalHeader().setDefaultSectionSize(26) self.verticalSplitter_4.addWidget(self.tableWidgetInboxSubscriptions) self.textEditInboxMessageSubscriptions = MessageView(self.subscriptions) self.textEditInboxMessageSubscriptions.setBaseSize(QtCore.QSize(0, 500)) self.textEditInboxMessageSubscriptions.setReadOnly(True) self.textEditInboxMessageSubscriptions.setObjectName(_fromUtf8("textEditInboxMessageSubscriptions")) self.verticalSplitter_4.addWidget(self.textEditInboxMessageSubscriptions) self.verticalSplitter_4.setStretchFactor(0, 0) self.verticalSplitter_4.setStretchFactor(1, 1) self.verticalSplitter_4.setStretchFactor(2, 2) self.verticalSplitter_4.setCollapsible(0, False) self.verticalSplitter_4.setCollapsible(1, False) self.verticalSplitter_4.setCollapsible(2, False) self.verticalSplitter_4.handle(1).setEnabled(False) self.horizontalSplitter_4.addWidget(self.verticalSplitter_4) self.horizontalSplitter_4.setStretchFactor(0, 0) self.horizontalSplitter_4.setStretchFactor(1, 1) self.horizontalSplitter_4.setCollapsible(0, False) self.horizontalSplitter_4.setCollapsible(1, False) self.gridLayout_3.addWidget(self.horizontalSplitter_4, 0, 0, 1, 1) icon6 = QtGui.QIcon() icon6.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/subscriptions.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.tabWidget.addTab(self.subscriptions, icon6, _fromUtf8("")) self.chans = QtGui.QWidget() self.chans.setObjectName(_fromUtf8("chans")) self.gridLayout_4 = QtGui.QGridLayout(self.chans) self.gridLayout_4.setObjectName(_fromUtf8("gridLayout_4")) self.horizontalSplitter_7 = settingsmixin.SSplitter() self.horizontalSplitter_7.setObjectName(_fromUtf8("horizontalSplitter_7")) self.verticalSplitter_17 = settingsmixin.SSplitter() self.verticalSplitter_17.setObjectName(_fromUtf8("verticalSplitter_17")) self.verticalSplitter_17.setOrientation(QtCore.Qt.Vertical) self.treeWidgetChans = settingsmixin.STreeWidget(self.chans) self.treeWidgetChans.setFrameShadow(QtGui.QFrame.Sunken) self.treeWidgetChans.setLineWidth(1) self.treeWidgetChans.setAlternatingRowColors(True) self.treeWidgetChans.setSelectionMode(QtGui.QAbstractItemView.SingleSelection) self.treeWidgetChans.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows) self.treeWidgetChans.setObjectName(_fromUtf8("treeWidgetChans")) self.treeWidgetChans.resize(200, self.treeWidgetChans.height()) icon7 = QtGui.QIcon() icon7.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/can-icon-16px.png")), QtGui.QIcon.Selected, QtGui.QIcon.Off) self.treeWidgetChans.headerItem().setIcon(0, icon7) self.verticalSplitter_17.addWidget(self.treeWidgetChans) self.pushButtonAddChan = QtGui.QPushButton(self.chans) self.pushButtonAddChan.setObjectName(_fromUtf8("pushButtonAddChan")) self.pushButtonAddChan.resize(200, self.pushButtonAddChan.height()) self.verticalSplitter_17.addWidget(self.pushButtonAddChan) self.verticalSplitter_17.setStretchFactor(0, 1) self.verticalSplitter_17.setStretchFactor(1, 0) self.verticalSplitter_17.setCollapsible(0, False) self.verticalSplitter_17.setCollapsible(1, False) self.verticalSplitter_17.handle(1).setEnabled(False) self.horizontalSplitter_7.addWidget(self.verticalSplitter_17) self.verticalSplitter_8 = settingsmixin.SSplitter() self.verticalSplitter_8.setObjectName(_fromUtf8("verticalSplitter_8")) self.verticalSplitter_8.setOrientation(QtCore.Qt.Vertical) self.horizontalSplitter_6 = QtGui.QSplitter() self.horizontalSplitter_6.setObjectName(_fromUtf8("horizontalSplitter_6")) self.inboxSearchLineEditChans = QtGui.QLineEdit(self.chans) self.inboxSearchLineEditChans.setObjectName(_fromUtf8("inboxSearchLineEditChans")) self.horizontalSplitter_6.addWidget(self.inboxSearchLineEditChans) self.inboxSearchOptionChans = QtGui.QComboBox(self.chans) self.inboxSearchOptionChans.setObjectName(_fromUtf8("inboxSearchOptionChans")) self.inboxSearchOptionChans.addItem(_fromUtf8("")) self.inboxSearchOptionChans.addItem(_fromUtf8("")) self.inboxSearchOptionChans.addItem(_fromUtf8("")) self.inboxSearchOptionChans.addItem(_fromUtf8("")) self.inboxSearchOptionChans.addItem(_fromUtf8("")) self.inboxSearchOptionChans.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToContents) self.horizontalSplitter_6.addWidget(self.inboxSearchOptionChans) self.horizontalSplitter_6.handle(1).setEnabled(False) self.horizontalSplitter_6.setStretchFactor(0, 1) self.horizontalSplitter_6.setStretchFactor(1, 0) self.verticalSplitter_8.addWidget(self.horizontalSplitter_6) self.tableWidgetInboxChans = settingsmixin.STableWidget(self.chans) self.tableWidgetInboxChans.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers) self.tableWidgetInboxChans.setAlternatingRowColors(True) self.tableWidgetInboxChans.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection) self.tableWidgetInboxChans.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows) self.tableWidgetInboxChans.setWordWrap(False) self.tableWidgetInboxChans.setObjectName(_fromUtf8("tableWidgetInboxChans")) self.tableWidgetInboxChans.setColumnCount(4) self.tableWidgetInboxChans.setRowCount(0) item = QtGui.QTableWidgetItem() self.tableWidgetInboxChans.setHorizontalHeaderItem(0, item) item = QtGui.QTableWidgetItem() self.tableWidgetInboxChans.setHorizontalHeaderItem(1, item) item = QtGui.QTableWidgetItem() self.tableWidgetInboxChans.setHorizontalHeaderItem(2, item) item = QtGui.QTableWidgetItem() self.tableWidgetInboxChans.setHorizontalHeaderItem(3, item) self.tableWidgetInboxChans.horizontalHeader().setCascadingSectionResizes(True) self.tableWidgetInboxChans.horizontalHeader().setDefaultSectionSize(200) self.tableWidgetInboxChans.horizontalHeader().setHighlightSections(False) self.tableWidgetInboxChans.horizontalHeader().setMinimumSectionSize(27) self.tableWidgetInboxChans.horizontalHeader().setSortIndicatorShown(False) self.tableWidgetInboxChans.horizontalHeader().setStretchLastSection(True) self.tableWidgetInboxChans.verticalHeader().setVisible(False) self.tableWidgetInboxChans.verticalHeader().setDefaultSectionSize(26) self.verticalSplitter_8.addWidget(self.tableWidgetInboxChans) self.textEditInboxMessageChans = MessageView(self.chans) self.textEditInboxMessageChans.setBaseSize(QtCore.QSize(0, 500)) self.textEditInboxMessageChans.setReadOnly(True) self.textEditInboxMessageChans.setObjectName(_fromUtf8("textEditInboxMessageChans")) self.verticalSplitter_8.addWidget(self.textEditInboxMessageChans) self.verticalSplitter_8.setStretchFactor(0, 0) self.verticalSplitter_8.setStretchFactor(1, 1) self.verticalSplitter_8.setStretchFactor(2, 2) self.verticalSplitter_8.setCollapsible(0, False) self.verticalSplitter_8.setCollapsible(1, False) self.verticalSplitter_8.setCollapsible(2, False) self.verticalSplitter_8.handle(1).setEnabled(False) self.horizontalSplitter_7.addWidget(self.verticalSplitter_8) self.horizontalSplitter_7.setStretchFactor(0, 0) self.horizontalSplitter_7.setStretchFactor(1, 1) self.horizontalSplitter_7.setCollapsible(0, False) self.horizontalSplitter_7.setCollapsible(1, False) self.gridLayout_4.addWidget(self.horizontalSplitter_7, 0, 0, 1, 1) icon8 = QtGui.QIcon() icon8.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/can-icon-16px.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.tabWidget.addTab(self.chans, icon8, _fromUtf8("")) self.blackwhitelist = Blacklist() self.tabWidget.addTab(self.blackwhitelist, QtGui.QIcon(":/newPrefix/images/blacklist.png"), "") # Initialize the Blacklist or Whitelist if shared.config.get('bitmessagesettings', 'blackwhitelist') == 'white': self.blackwhitelist.radioButtonWhitelist.click() self.blackwhitelist.rerenderBlackWhiteList() self.networkstatus = NetworkStatus() self.tabWidget.addTab(self.networkstatus, QtGui.QIcon(":/newPrefix/images/networkstatus.png"), "") self.gridLayout_10.addWidget(self.tabWidget, 0, 0, 1, 1) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtGui.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 885, 27)) self.menubar.setObjectName(_fromUtf8("menubar")) self.menuFile = QtGui.QMenu(self.menubar) self.menuFile.setObjectName(_fromUtf8("menuFile")) self.menuSettings = QtGui.QMenu(self.menubar) self.menuSettings.setObjectName(_fromUtf8("menuSettings")) self.menuHelp = QtGui.QMenu(self.menubar) self.menuHelp.setObjectName(_fromUtf8("menuHelp")) MainWindow.setMenuBar(self.menubar) self.statusbar = QtGui.QStatusBar(MainWindow) self.statusbar.setMaximumSize(QtCore.QSize(16777215, 22)) self.statusbar.setObjectName(_fromUtf8("statusbar")) MainWindow.setStatusBar(self.statusbar) self.actionImport_keys = QtGui.QAction(MainWindow) self.actionImport_keys.setObjectName(_fromUtf8("actionImport_keys")) self.actionManageKeys = QtGui.QAction(MainWindow) self.actionManageKeys.setCheckable(False) self.actionManageKeys.setEnabled(True) icon = QtGui.QIcon.fromTheme(_fromUtf8("dialog-password")) self.actionManageKeys.setIcon(icon) self.actionManageKeys.setObjectName(_fromUtf8("actionManageKeys")) self.actionExit = QtGui.QAction(MainWindow) icon = QtGui.QIcon.fromTheme(_fromUtf8("application-exit")) self.actionExit.setIcon(icon) self.actionExit.setObjectName(_fromUtf8("actionExit")) self.actionHelp = QtGui.QAction(MainWindow) icon = QtGui.QIcon.fromTheme(_fromUtf8("help-contents")) self.actionHelp.setIcon(icon) self.actionHelp.setObjectName(_fromUtf8("actionHelp")) self.actionSupport = QtGui.QAction(MainWindow) icon = QtGui.QIcon.fromTheme(_fromUtf8("help-support")) self.actionSupport.setIcon(icon) self.actionSupport.setObjectName(_fromUtf8("actionSupport")) self.actionAbout = QtGui.QAction(MainWindow) icon = QtGui.QIcon.fromTheme(_fromUtf8("help-about")) self.actionAbout.setIcon(icon) self.actionAbout.setObjectName(_fromUtf8("actionAbout")) self.actionSettings = QtGui.QAction(MainWindow) icon = QtGui.QIcon.fromTheme(_fromUtf8("document-properties")) self.actionSettings.setIcon(icon) self.actionSettings.setObjectName(_fromUtf8("actionSettings")) self.actionRegenerateDeterministicAddresses = QtGui.QAction(MainWindow) icon = QtGui.QIcon.fromTheme(_fromUtf8("view-refresh")) self.actionRegenerateDeterministicAddresses.setIcon(icon) self.actionRegenerateDeterministicAddresses.setObjectName(_fromUtf8("actionRegenerateDeterministicAddresses")) self.actionDeleteAllTrashedMessages = QtGui.QAction(MainWindow) icon = QtGui.QIcon.fromTheme(_fromUtf8("user-trash")) self.actionDeleteAllTrashedMessages.setIcon(icon) self.actionDeleteAllTrashedMessages.setObjectName(_fromUtf8("actionDeleteAllTrashedMessages")) self.actionJoinChan = QtGui.QAction(MainWindow) icon = QtGui.QIcon.fromTheme(_fromUtf8("contact-new")) self.actionJoinChan.setIcon(icon) self.actionJoinChan.setObjectName(_fromUtf8("actionJoinChan")) self.menuFile.addAction(self.actionManageKeys) self.menuFile.addAction(self.actionDeleteAllTrashedMessages) self.menuFile.addAction(self.actionRegenerateDeterministicAddresses) self.menuFile.addAction(self.actionExit) self.menuSettings.addAction(self.actionSettings) self.menuHelp.addAction(self.actionHelp) self.menuHelp.addAction(self.actionSupport) self.menuHelp.addAction(self.actionAbout) self.menubar.addAction(self.menuFile.menuAction()) self.menubar.addAction(self.menuSettings.menuAction()) self.menubar.addAction(self.menuHelp.menuAction()) self.retranslateUi(MainWindow) self.tabWidget.setCurrentIndex(0) self.tabWidgetSend.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(MainWindow) MainWindow.setTabOrder(self.tableWidgetInbox, self.textEditInboxMessage) MainWindow.setTabOrder(self.textEditInboxMessage, self.comboBoxSendFrom) MainWindow.setTabOrder(self.comboBoxSendFrom, self.lineEditTo) MainWindow.setTabOrder(self.lineEditTo, self.lineEditSubject) MainWindow.setTabOrder(self.lineEditSubject, self.textEditMessage) MainWindow.setTabOrder(self.textEditMessage, self.pushButtonAddSubscription) def retranslateUi(self, MainWindow): MainWindow.setWindowTitle(_translate("MainWindow", "Bitmessage", None)) self.treeWidgetYourIdentities.headerItem().setText(0, _translate("MainWindow", "Identities", None)) self.pushButtonNewAddress.setText(_translate("MainWindow", "New Identity", None)) self.inboxSearchLineEdit.setPlaceholderText(_translate("MainWindow", "Search", None)) self.inboxSearchOption.setItemText(0, _translate("MainWindow", "All", None)) self.inboxSearchOption.setItemText(1, _translate("MainWindow", "To", None)) self.inboxSearchOption.setItemText(2, _translate("MainWindow", "From", None)) self.inboxSearchOption.setItemText(3, _translate("MainWindow", "Subject", None)) self.inboxSearchOption.setItemText(4, _translate("MainWindow", "Message", None)) self.tableWidgetInbox.setSortingEnabled(True) item = self.tableWidgetInbox.horizontalHeaderItem(0) item.setText(_translate("MainWindow", "To", None)) item = self.tableWidgetInbox.horizontalHeaderItem(1) item.setText(_translate("MainWindow", "From", None)) item = self.tableWidgetInbox.horizontalHeaderItem(2) item.setText(_translate("MainWindow", "Subject", None)) item = self.tableWidgetInbox.horizontalHeaderItem(3) item.setText(_translate("MainWindow", "Received", None)) self.tabWidget.setTabText(self.tabWidget.indexOf(self.inbox), _translate("MainWindow", "Messages", None)) self.tableWidgetAddressBook.setSortingEnabled(True) item = self.tableWidgetAddressBook.horizontalHeaderItem(0) item.setText(_translate("MainWindow", "Address book", None)) item = self.tableWidgetAddressBook.horizontalHeaderItem(1) item.setText(_translate("MainWindow", "Address", None)) self.pushButtonAddAddressBook.setText(_translate("MainWindow", "Add Contact", None)) self.pushButtonFetchNamecoinID.setText(_translate("MainWindow", "Fetch Namecoin ID", None)) self.label_3.setText(_translate("MainWindow", "Subject:", None)) self.label_2.setText(_translate("MainWindow", "From:", None)) self.label.setText(_translate("MainWindow", "To:", None)) self.textEditMessage.setHtml(_translate("MainWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n" "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" "p, li { white-space: pre-wrap; }\n" "</style></head><body style=\" font-family:\'Droid Sans\'; font-size:9pt; font-weight:400; font-style:normal;\">\n" "<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:\'MS Shell Dlg 2\';\"><br /></p></body></html>", None)) self.tabWidgetSend.setTabText(self.tabWidgetSend.indexOf(self.sendDirect), _translate("MainWindow", "Send ordinary Message", None)) self.label_8.setText(_translate("MainWindow", "From:", None)) self.label_7.setText(_translate("MainWindow", "Subject:", None)) self.textEditMessageBroadcast.setHtml(_translate("MainWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n" "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" "p, li { white-space: pre-wrap; }\n" "</style></head><body style=\" font-family:\'Droid Sans\'; font-size:9pt; font-weight:400; font-style:normal;\">\n" "<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:\'MS Shell Dlg 2\';\"><br /></p></body></html>", None)) self.tabWidgetSend.setTabText(self.tabWidgetSend.indexOf(self.sendBroadcast), _translate("MainWindow", "Send Message to your Subscribers", None)) self.pushButtonTTL.setText(_translate("MainWindow", "TTL:", None)) self.labelHumanFriendlyTTLDescription.setText(_translate("MainWindow", "X days", None)) self.pushButtonSend.setText(_translate("MainWindow", "Send", None)) self.tabWidget.setTabText(self.tabWidget.indexOf(self.send), _translate("MainWindow", "Send", None)) self.treeWidgetSubscriptions.headerItem().setText(0, _translate("MainWindow", "Subscriptions", None)) self.pushButtonAddSubscription.setText(_translate("MainWindow", "Add new Subscription", None)) self.inboxSearchLineEditSubscriptions.setPlaceholderText(_translate("MainWindow", "Search", None)) self.inboxSearchOptionSubscriptions.setItemText(0, _translate("MainWindow", "All", None)) self.inboxSearchOptionSubscriptions.setItemText(1, _translate("MainWindow", "To", None)) self.inboxSearchOptionSubscriptions.setItemText(2, _translate("MainWindow", "From", None)) self.inboxSearchOptionSubscriptions.setItemText(3, _translate("MainWindow", "Subject", None)) self.inboxSearchOptionSubscriptions.setItemText(4, _translate("MainWindow", "Message", None)) self.tableWidgetInboxSubscriptions.setSortingEnabled(True) item = self.tableWidgetInboxSubscriptions.horizontalHeaderItem(0) item.setText(_translate("MainWindow", "To", None)) item = self.tableWidgetInboxSubscriptions.horizontalHeaderItem(1) item.setText(_translate("MainWindow", "From", None)) item = self.tableWidgetInboxSubscriptions.horizontalHeaderItem(2) item.setText(_translate("MainWindow", "Subject", None)) item = self.tableWidgetInboxSubscriptions.horizontalHeaderItem(3) item.setText(_translate("MainWindow", "Received", None)) self.tabWidget.setTabText(self.tabWidget.indexOf(self.subscriptions), _translate("MainWindow", "Subscriptions", None)) self.treeWidgetChans.headerItem().setText(0, _translate("MainWindow", "Chans", None)) self.pushButtonAddChan.setText(_translate("MainWindow", "Add Chan", None)) self.inboxSearchLineEditChans.setPlaceholderText(_translate("MainWindow", "Search", None)) self.inboxSearchOptionChans.setItemText(0, _translate("MainWindow", "All", None)) self.inboxSearchOptionChans.setItemText(1, _translate("MainWindow", "To", None)) self.inboxSearchOptionChans.setItemText(2, _translate("MainWindow", "From", None)) self.inboxSearchOptionChans.setItemText(3, _translate("MainWindow", "Subject", None)) self.inboxSearchOptionChans.setItemText(4, _translate("MainWindow", "Message", None)) self.tableWidgetInboxChans.setSortingEnabled(True) item = self.tableWidgetInboxChans.horizontalHeaderItem(0) item.setText(_translate("MainWindow", "To", None)) item = self.tableWidgetInboxChans.horizontalHeaderItem(1) item.setText(_translate("MainWindow", "From", None)) item = self.tableWidgetInboxChans.horizontalHeaderItem(2) item.setText(_translate("MainWindow", "Subject", None)) item = self.tableWidgetInboxChans.horizontalHeaderItem(3) item.setText(_translate("MainWindow", "Received", None)) self.tabWidget.setTabText(self.tabWidget.indexOf(self.chans), _translate("MainWindow", "Chans", None)) self.tabWidget.setTabText(self.tabWidget.indexOf(self.networkstatus), _translate("MainWindow", "Network Status", None)) self.blackwhitelist.retranslateUi() self.networkstatus.retranslateUi() self.menuFile.setTitle(_translate("MainWindow", "File", None)) self.menuSettings.setTitle(_translate("MainWindow", "Settings", None)) self.menuHelp.setTitle(_translate("MainWindow", "Help", None)) self.actionImport_keys.setText(_translate("MainWindow", "Import keys", None)) self.actionManageKeys.setText(_translate("MainWindow", "Manage keys", None)) self.actionExit.setText(_translate("MainWindow", "Quit", None)) self.actionExit.setShortcut(_translate("MainWindow", "Ctrl+Q", None)) self.actionHelp.setText(_translate("MainWindow", "Help", None)) self.actionHelp.setShortcut(_translate("MainWindow", "F1", None)) self.actionSupport.setText(_translate("MainWindow", "Contact support", None)) self.actionAbout.setText(_translate("MainWindow", "About", None)) self.actionSettings.setText(_translate("MainWindow", "Settings", None)) self.actionRegenerateDeterministicAddresses.setText(_translate("MainWindow", "Regenerate deterministic addresses", None)) self.actionDeleteAllTrashedMessages.setText(_translate("MainWindow", "Delete all trashed messages", None)) self.actionJoinChan.setText(_translate("MainWindow", "Join / Create chan", None))
def __init__(self, db, config): """ Initializes the CallLogger object and creates the CallLog table if it doesn't exist """ self.db = db self.config = config if self.config["DEBUG"]: print("Initializing CallLogger") # Create the Call_History table if it does not exist sql = """CREATE TABLE IF NOT EXISTS CallLog ( CallLogID INTEGER PRIMARY KEY AUTOINCREMENT, Name TEXT, Number TEXT, Action TEXT, Reason TEXT, Date TEXT, Time TEXT, SystemDateTime TEXT);""" curs = self.db.cursor() curs.executescript(sql) try: # Early versions of callattendant (<= v0.3.1) do not contain # an Action column or Reason column. This hack/code attempts # to add the columns if they don't exit. sql = """SELECT COUNT(*) AS CNTREC FROM pragma_table_info('CallLog') WHERE name='Action'""" curs.execute(sql) count = curs.fetchone()[0] if count == 0: # Dependencies: ensures tables used in the sql exist from whitelist import Whitelist from blacklist import Blacklist whitelist = Whitelist(db, config) blacklist = Blacklist(db, config) print(">> Adding Action column to CallLog table") sql = """ALTER TABLE CallLog ADD COLUMN Action TEXT default null""" curs.executescript(sql) print(">> Updating Action column in CallLog table") sql = """UPDATE CallLog SET `Action`=(select CASE WHEN b.PhoneNo is not null then 'Permitted' WHEN c.PhoneNo is not null then 'Blocked' ELSE 'Screened' END actn FROM CallLog as a LEFT JOIN Whitelist as b ON a.Number = b.PhoneNo LEFT JOIN Blacklist as c ON a.Number = c.PhoneNo WHERE CallLog.CallLogID = a.CallLogID)""" curs.executescript(sql) print(">> Adding Reason column to CallLog table") sql = """ALTER TABLE CallLog ADD COLUMN Reason TEXT default null""" curs.executescript(sql) print(">> Updating Reason column in CallLog table") sql = """UPDATE CallLog SET `Reason`=(select CASE WHEN b.PhoneNo is not null then b.Reason WHEN c.PhoneNo is not null then c.Reason ELSE null END reason FROM CallLog as a LEFT JOIN Whitelist as b ON a.Number = b.PhoneNo LEFT JOIN Blacklist as c ON a.Number = c.PhoneNo WHERE CallLog.CallLogID = a.CallLogID)""" curs.executescript(sql) except Exception as e: print(e) curs.close() self.db.commit() if self.config["DEBUG"]: print("CallLogger initialized")
def test_line(self): bl = Blacklist() self.assertTrue(bl.contains(Tipp([1, 2, 3, 4, 5]))) self.assertTrue(bl.contains(Tipp([1, 2, 3, 4]))) self.assertTrue(bl.contains(Tipp([1, 3, 4, 5])))
for line in lines: username = line.strip().split('|')[1] usernames.append(username) total = len(usernames) # usernames = usernames[:] current = 1 for username in usernames: print('total:', total, 'current:', current) current += 1 if username != '----': check(username) if start: blacklist = Blacklist() blacklist.load_data() if username in blacklist.get_data(): print(username, '黑名单') else: new_black = crawl_by_username(username) if len(new_black.get_data()) > 0: for blackname in new_black.get_data(): blacklist.add_blackname(username) blacklist.save_data() print('更新新名单') else: print('还未到开始点') pass
def post(self): jti = get_raw_jwt()['jti'] user_id = get_jwt_identity() Blacklist.add(jti) return {'message': 'logout succes!'}
del connections[flow] else: connections[flow] = stream except UnpackError: pass packet.accept() # if is_marked: print(packet.get_payload()) return if __name__ == "__main__": KNOWN_PEERS = [] parser = get_args_for_egress() client_log = ClientLog() blacklist = Blacklist() args = parser.parse_args() peers_cfg = BaseConfig(PEERS_PATH) if args.peers is None: peers_cfg.load() else: peers_cfg.load(args.peers) if len(peers_cfg.data): peers_cfg.save() KNOWN_PEERS = peers_cfg.data if not len(KNOWN_PEERS): raise ValueError( "Known peers list is empty. You have to specify IP addresses of known peers"
def get_blacklist(uid): appid = APPID blacklist = Blacklist.get_blacklist(db, appid, uid) return blacklist
def test_corners(self): bl = Blacklist() self.assertTrue(bl.contains(Tipp([1, 7, 43, 49, 24, 33])))
def post(self): """User Logout """ jti = get_raw_jwt()['jti'] Blacklist.add(jti) return {"message": "You Successfully logged out! Please login"}, 200
def test_fuenfer_abstand(self): bl = Blacklist() self.assertTrue(bl.contains(Tipp([5, 10, 15, 20, 25, 30])))
def post(cls): jti = get_raw_jwt()["jti"] user_id = get_jwt_identity() Blacklist.add(jti) return {"message": getext("user_logged_out".format(user_id))}, 200
def loadconfig(self): self._lock() try: globals = self.dict sys.stdout.write( "--------------- WUMI LOADCONFIG ---------------\n") sys.stdout.flush() # Order of global to be filled: # built in default, overriden by cf-file cfparser = ConfigParser.ConfigParser() cfparser.readfp(file(globals["configfile"])) # Some common python Objects, not configurable # globals ["parse"] = Parser.Parser ().parse # Urls for SMTP Error Messages # maxload globals["maxload"] = 10 try: globals["maxload"] = float(os.environ["WUMI_MAXLOAD"]) sys.stderr.write("I Use Env WUMI_MAXLOAD: %s" % globals["maxload"]) except: print """maxload not in env""" try: globals["maxload"] = cfparser.getint("misc", "maxload") except: print """maxload not found in conf, using '%s'""" % globals[ "maxload"] # plugins EOM useeomplugins = set( cfparser.get("misc", "eom_plugins").lower().split(",")) while '' in useeomplugins: useeomplugins.remove('') globals["eom_plugins_names"] = useeomplugins globals["eom_plugins"] = [] for plugin_name in useeomplugins: globals["eom_plugins"].append(eom_plugins[plugin_name]) # plugins ENVRCPT useenvrcptplugins = set( cfparser.get("misc", "envrcpt_plugins").lower().split(",")) while '' in useenvrcptplugins: useenvrcptplugins.remove('') globals["envrcpt_plugins_names"] = useenvrcptplugins globals["envrcpt_plugins"] = [] for plugin_name in useenvrcptplugins: globals["envrcpt_plugins"].append(envrcpt_plugins[plugin_name]) # seenheader globals["seenheader"] = None try: globals["seenheader"] = cfparser.get("misc", "seenheader") except: print """seenheader not found in config, using %s""" % globals[ "seenheader"] # read blacklist stanza - if it is in misc/eom_plugins if "blacklist" in globals["eom_plugins_names"]: # blacklists globals["blacklists"] = set( cfparser.get("blacklist", "blacklists").split(",")) if '' in globals["blacklists"]: globals["blacklists"].remove('') globals["bls"] = {} for bl_stanza in globals["blacklists"]: globals["bls"][bl_stanza] = Blacklist( cfparser, bl_stanza, globals["seenheader"]) # TODO hier die werdte einfüllen!!! # read attachblock stanza - if it is in misc/eom_plugins if "attachblock" in globals["eom_plugins_names"]: # policy - Url globals["policyurl"] = cfparser.get("attachblock", "policyurl") # blocked attachments globals["noattach"] = set( cfparser.get("attachblock", "noattach").lower().split(",")) if '' in globals["noattach"]: globals["noattach"].remove('') # add_x_header globals["attachblock_xheader"] = cfparser.getboolean( "attachblock", "add_x_header") if "kolab" in globals["eom_plugins_names"]: # policy - Url globals["kolab_false_header"] = cfparser.getboolean( "kolab", "add_false_header") # print something candy sys.stdout.write ( \ "Current config after loading: ----------------------------------\n") i = globals.keys() i.sort() for j in i: sys.stdout.write("%-25s: %s\n" % (j, globals[j])) sys.stdout.flush() self.lastupdate = time.time() finally: self._unlock()
def post(cls): # a unique id in jwt jti = get_raw_jwt()["jti"] Blacklist.add(jti) return {"message": "Successfully logged out."}, 200