diff --git a/res/i18n/ts/fr_FR.ts b/res/i18n/ts/fr_FR.ts index fe8f3740b2025a3c221d9cb3027995d471f1485b..7e33a0b012a55f5aaa34cf39400df5daa7b49d00 100644 --- a/res/i18n/ts/fr_FR.ts +++ b/res/i18n/ts/fr_FR.ts @@ -546,7 +546,7 @@ Le processus pour rejoindre la communauté devrait être refait à zéro.</trans <message> <location filename="../../../src/cutecoin/gui/currency_tab.py" line="150"/> <source><b>Warning : You are certified by only {0} persons, need {1}</b></source> - <translation><b>Attention : Vous êtes certifiés par seulement {0} personnes, besoin de {2}</b></translation> + <translation><b>Attention : Vous êtes certifiés par seulement {0} personnes, besoin de {1}</b></translation> </message> </context> <context> diff --git a/src/cutecoin/core/net/network.py b/src/cutecoin/core/net/network.py index 34f533ccc91e5567ce64db14b82aa7903f44a319..b46be63026850979bcc5f11677a1c2f6341caa99 100644 --- a/src/cutecoin/core/net/network.py +++ b/src/cutecoin/core/net/network.py @@ -252,6 +252,7 @@ class Network(Watcher): node.check_sync(self.latest_block) logging.debug("{0} -> {1}".format(self.latest_block, self.latest_block)) if self._block_found < self.latest_block: + self._block_found = self.latest_block logging.debug("New block found : {0}".format(self.latest_block)) self.new_block_mined.emit(self.latest_block) diff --git a/src/cutecoin/gui/toast.py b/src/cutecoin/gui/toast.py index ef0c8ab7b265a101245635303c789e0473dbb30f..52fddab8a7e2cc0d868553a1bfe281c21e55095f 100644 --- a/src/cutecoin/gui/toast.py +++ b/src/cutecoin/gui/toast.py @@ -12,7 +12,9 @@ from ..gen_resources.toast_uic import Ui_Toast window = None # global + def display(title, msg): + logging.debug("NOTIFY DISPLAY") if sys.platform == "linux": import notify2 import dbus @@ -22,28 +24,30 @@ def display(title, msg): n = notify2.Notification(title, msg) - # Not working... Empty icon at the moment. - icon = QPixmap(":/icons/cutecoin_logo/").toImage() - if icon.isNull(): - logging.debug("Error converting logo") - else: - icon.convertToFormat(QImage.Format_ARGB32) - icon_bytes = icon.bits().asstring(icon.byteCount()) - icon_struct = ( - icon.width(), - icon.height(), - icon.bytesPerLine(), - icon.hasAlphaChannel(), - 32, - 4, - dbus.ByteArray(icon_bytes) - ) - n.set_hint('icon_data', icon_struct) - n.set_timeout(5000) +# fixme: https://bugs.python.org/issue11587 + # # Not working... Empty icon at the moment. + # icon = QPixmap(":/icons/cutecoin_logo/").toImage() + # if icon.isNull(): + # logging.debug("Error converting logo") + # else: + # icon.convertToFormat(QImage.Format_ARGB32) + # icon_bytes = icon.bits().asstring(icon.byteCount()) + # icon_struct = ( + # icon.width(), + # icon.height(), + # icon.bytesPerLine(), + # icon.hasAlphaChannel(), + # 32, + # 4, + # dbus.ByteArray(icon_bytes) + # ) + # n.set_hint('icon_data', icon_struct) + # n.set_timeout(5000) n.show() else: _Toast(title, msg) + class _Toast(QMainWindow, Ui_Toast): def __init__(self, title, msg): global window # some space outside the local stack @@ -69,6 +73,7 @@ class _Toast(QMainWindow, Ui_Toast): global window window = None # kill pointer to window object to close it and GC + class _ToastThread(QThread): def __init__(self): QThread.__init__(self)