Porting bitmessageqt to Qt5 #1389

Open
g1itch wants to merge 34 commits from g1itch/qt5-wip into v0.6
Showing only changes of commit d75d388522 - Show all commits

View File

@ -4,6 +4,7 @@ PyQt based UI for bitmessage, the main module
import hashlib import hashlib
import locale import locale
import logging
import os import os
import random import random
import string import string
@ -17,48 +18,50 @@ from sqlite3 import register_adapter
from PyQt5 import QtCore, QtGui, QtWidgets, QtNetwork from PyQt5 import QtCore, QtGui, QtWidgets, QtNetwork
# This is needed for tray icon
import bitmessage_icons_rc # noqa:F401 pylint: disable=unused-import
import dialogs
import helper_addressbook
import helper_search
import helper_sent
import l10n
import namecoin
import paths
import queues
import settingsmixin
import shared import shared
import shutdown
import sound
import state import state
from debug import logger import support
from tr import _translate from account import (
getSortedAccounts, getSortedSubscriptions, accountClass, BMAccount,
GatewayAccount, MailchuckAccount, AccountColor)
from addresses import decodeAddress, addBMIfNotPresent from addresses import decodeAddress, addBMIfNotPresent
from bitmessageui import Ui_MainWindow from bitmessageui import Ui_MainWindow
from bmconfigparser import BMConfigParser from bmconfigparser import BMConfigParser
import namecoin
from messageview import MessageView
from foldertree import ( from foldertree import (
AccountMixin, Ui_FolderWidget, Ui_AddressWidget, Ui_SubscriptionWidget, AccountMixin, Ui_FolderWidget, Ui_AddressWidget, Ui_SubscriptionWidget,
MessageList_AddressWidget, MessageList_SubjectWidget, MessageList_AddressWidget, MessageList_SubjectWidget,
Ui_AddressBookWidgetItemLabel, Ui_AddressBookWidgetItemAddress, Ui_AddressBookWidgetItemLabel, Ui_AddressBookWidgetItemAddress,
MessageList_TimeWidget) MessageList_TimeWidget)
import settingsmixin from helper_sql import (
import support sqlQuery, sqlExecute, sqlExecuteChunked, sqlStoredProcedure)
from helper_sql import sqlQuery, sqlExecute, sqlExecuteChunked, sqlStoredProcedure from messageview import MessageView
import helper_addressbook
import helper_search
import l10n
from utils import str_broadcast_subscribers, avatarize
from account import (
getSortedAccounts, getSortedSubscriptions, accountClass, BMAccount,
GatewayAccount, MailchuckAccount, AccountColor)
import dialogs
from network.stats import pendingDownload, pendingUpload from network.stats import pendingDownload, pendingUpload
from uisignaler import UISignaler
import paths
from proofofwork import getPowType from proofofwork import getPowType
import queues
import shutdown
from statusbar import BMStatusBar from statusbar import BMStatusBar
import sound from tr import _translate
# This is needed for tray icon from uisignaler import UISignaler
import bitmessage_icons_rc # noqa:F401 pylint: disable=unused-import from utils import str_broadcast_subscribers, avatarize
import helper_sent
try: try:
from plugins.plugin import get_plugin, get_plugins from plugins.plugin import get_plugin, get_plugins
except ImportError: except ImportError:
get_plugins = False get_plugins = False
logger = logging.getLogger('default')
# TODO: rewrite # TODO: rewrite
def powQueueSize(): def powQueueSize():