New POW calculation module #1284
|
@ -53,6 +53,7 @@ import state
|
||||||
from network.asyncore_pollchoose import set_rates
|
from network.asyncore_pollchoose import set_rates
|
||||||
|
|||||||
import sound
|
import sound
|
||||||
import re
|
import re
|
||||||
|
import bitmessage_icons_rc # Loads icon resources
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -627,6 +628,9 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
|
|
||||||
self.ui.horizontalSliderTTL.setMaximumSize(QtCore.QSize(105, self.ui.pushButtonSend.height()))
|
self.ui.horizontalSliderTTL.setMaximumSize(QtCore.QSize(105, self.ui.pushButtonSend.height()))
|
||||||
|
|
||||||
|
self.statusbar = self.statusBar()
|
||||||
|
self.statusbar.insertPermanentWidget(0, self.ui.rightStatusBar)
|
||||||
|
|
||||||
# Ask the user if we may delete their old version 1 addresses if they
|
# Ask the user if we may delete their old version 1 addresses if they
|
||||||
# have any.
|
# have any.
|
||||||
for addressInKeysFile in getSortedAccounts():
|
for addressInKeysFile in getSortedAccounts():
|
||||||
|
@ -750,11 +754,8 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
|
|
||||||
self.ui.blackwhitelist.rerenderBlackWhiteList()
|
self.ui.blackwhitelist.rerenderBlackWhiteList()
|
||||||
|
|
||||||
# Put the colored icon on the status bar
|
# The coloured icon on the status bar
|
||||||
|
|
||||||
self.statusbar = self.statusBar()
|
|
||||||
|
|
||||||
self.statusbar.insertPermanentWidget(0, self.ui.pushButtonStatusIcon)
|
|
||||||
QtCore.QObject.connect(self.ui.pushButtonStatusIcon, QtCore.SIGNAL(
|
QtCore.QObject.connect(self.ui.pushButtonStatusIcon, QtCore.SIGNAL(
|
||||||
"clicked()"), self.click_pushButtonStatusIcon)
|
"clicked()"), self.click_pushButtonStatusIcon)
|
||||||
|
|
||||||
|
@ -1843,6 +1844,13 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
def updateWorkProverStatus(self, status):
|
def updateWorkProverStatus(self, status):
|
||||||
self.POWTasksCount = status.tasksCount
|
self.POWTasksCount = status.tasksCount
|
||||||
|
|
||||||
|
if status.speed == 0:
|
||||||
|
self.ui.workProverSpeed.setText("")
|
||||||
|
else:
|
||||||
|
self.ui.workProverSpeed.setText(
|
||||||
|
_translate("MainWindow", "%1 kiH / s").arg("{:.1f}".format(status.speed / 1024))
|
||||||
|
)
|
||||||
|
|
||||||
def rerenderMessagelistFromLabels(self):
|
def rerenderMessagelistFromLabels(self):
|
||||||
for messagelist in (self.ui.tableWidgetInbox, self.ui.tableWidgetInboxChans, self.ui.tableWidgetInboxSubscriptions):
|
for messagelist in (self.ui.tableWidgetInbox, self.ui.tableWidgetInboxChans, self.ui.tableWidgetInboxSubscriptions):
|
||||||
for i in range(messagelist.rowCount()):
|
for i in range(messagelist.rowCount()):
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<string>Bitmessage</string>
|
<string>Bitmessage</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowIcon">
|
<property name="windowIcon">
|
||||||
<iconset resource="bitmessageqt.bitmessage_icons.qrc">
|
<iconset>
|
||||||
<normaloff>:/newPrefix/images/can-icon-24px.png</normaloff>:/newPrefix/images/can-icon-24px.png</iconset>
|
<normaloff>:/newPrefix/images/can-icon-24px.png</normaloff>:/newPrefix/images/can-icon-24px.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="tabShape">
|
<property name="tabShape">
|
||||||
|
@ -22,6 +22,42 @@
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="centralwidget">
|
<widget class="QWidget" name="centralwidget">
|
||||||
<layout class="QGridLayout" name="gridLayout_10">
|
<layout class="QGridLayout" name="gridLayout_10">
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QWidget" name="rightStatusBar" native="true">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="workProverSpeed">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButtonStatusIcon">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset>
|
||||||
|
<normaloff>:/newPrefix/images/redicon.png</normaloff>:/newPrefix/images/redicon.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="flat">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
|
@ -58,7 +94,7 @@
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="inbox">
|
<widget class="QWidget" name="inbox">
|
||||||
<attribute name="icon">
|
<attribute name="icon">
|
||||||
<iconset resource="bitmessageqt.bitmessage_icons.qrc">
|
<iconset>
|
||||||
<normaloff>:/newPrefix/images/inbox.png</normaloff>:/newPrefix/images/inbox.png</iconset>
|
<normaloff>:/newPrefix/images/inbox.png</normaloff>:/newPrefix/images/inbox.png</iconset>
|
||||||
</attribute>
|
</attribute>
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
@ -257,7 +293,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="send">
|
<widget class="QWidget" name="send">
|
||||||
<attribute name="icon">
|
<attribute name="icon">
|
||||||
<iconset resource="bitmessageqt.bitmessage_icons.qrc">
|
<iconset>
|
||||||
<normaloff>:/newPrefix/images/send.png</normaloff>:/newPrefix/images/send.png</iconset>
|
<normaloff>:/newPrefix/images/send.png</normaloff>:/newPrefix/images/send.png</iconset>
|
||||||
</attribute>
|
</attribute>
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
@ -621,7 +657,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="subscriptions">
|
<widget class="QWidget" name="subscriptions">
|
||||||
<attribute name="icon">
|
<attribute name="icon">
|
||||||
<iconset resource="bitmessageqt.bitmessage_icons.qrc">
|
<iconset>
|
||||||
<normaloff>:/newPrefix/images/subscriptions.png</normaloff>:/newPrefix/images/subscriptions.png</iconset>
|
<normaloff>:/newPrefix/images/subscriptions.png</normaloff>:/newPrefix/images/subscriptions.png</iconset>
|
||||||
</attribute>
|
</attribute>
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
@ -829,7 +865,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="chans">
|
<widget class="QWidget" name="chans">
|
||||||
<attribute name="icon">
|
<attribute name="icon">
|
||||||
<iconset resource="bitmessageqt.bitmessage_icons.qrc">
|
<iconset>
|
||||||
<normaloff>:/newPrefix/images/can-icon-16px.png</normaloff>:/newPrefix/images/can-icon-16px.png</iconset>
|
<normaloff>:/newPrefix/images/can-icon-16px.png</normaloff>:/newPrefix/images/can-icon-16px.png</iconset>
|
||||||
</attribute>
|
</attribute>
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
@ -1043,7 +1079,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="Blacklist" name="blackwhitelist">
|
<widget class="Blacklist" name="blackwhitelist">
|
||||||
<attribute name="icon">
|
<attribute name="icon">
|
||||||
<iconset resource="bitmessageqt.bitmessage_icons.qrc">
|
<iconset>
|
||||||
<normaloff>:/newPrefix/images/blacklist.png</normaloff>:/newPrefix/images/blacklist.png</iconset>
|
<normaloff>:/newPrefix/images/blacklist.png</normaloff>:/newPrefix/images/blacklist.png</iconset>
|
||||||
</attribute>
|
</attribute>
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
@ -1052,7 +1088,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="NetworkStatus" name="networkstatus">
|
<widget class="NetworkStatus" name="networkstatus">
|
||||||
<attribute name="icon">
|
<attribute name="icon">
|
||||||
<iconset resource="bitmessageqt.bitmessage_icons.qrc">
|
<iconset>
|
||||||
<normaloff>:/newPrefix/images/networkstatus.png</normaloff>:/newPrefix/images/networkstatus.png</iconset>
|
<normaloff>:/newPrefix/images/networkstatus.png</normaloff>:/newPrefix/images/networkstatus.png</iconset>
|
||||||
</attribute>
|
</attribute>
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
@ -1061,20 +1097,6 @@
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QPushButton" name="pushButtonStatusIcon">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="bitmessageqt.bitmessage_icons.qrc">
|
|
||||||
<normaloff>:/newPrefix/images/redicon.png</normaloff>:/newPrefix/images/redicon.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="flat">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenuBar" name="menubar">
|
<widget class="QMenuBar" name="menubar">
|
||||||
|
@ -1282,8 +1304,6 @@
|
||||||
<tabstop>textEditMessage</tabstop>
|
<tabstop>textEditMessage</tabstop>
|
||||||
<tabstop>pushButtonAddSubscription</tabstop>
|
<tabstop>pushButtonAddSubscription</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources/>
|
||||||
<include location="bitmessageqt.bitmessage_icons.qrc"/>
|
|
||||||
</resources>
|
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|
|
@ -998,9 +998,6 @@
|
||||||
<tabstop>checkBoxSocksListen</tabstop>
|
<tabstop>checkBoxSocksListen</tabstop>
|
||||||
<tabstop>buttonBox</tabstop>
|
<tabstop>buttonBox</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
|
||||||
<include location="bitmessageqt.bitmessage_icons.qrc"/>
|
|
||||||
</resources>
|
|
||||||
<connections>
|
<connections>
|
||||||
<connection>
|
<connection>
|
||||||
<sender>buttonBox</sender>
|
<sender>buttonBox</sender>
|
||||||
|
|
Reference in New Issue
Block a user
please write imports in the starting point of the file in the alphabetic order