forked from bitcoinafterlife/bal-electrum-plugin
read_file icons
This commit is contained in:
1
bal.py
1
bal.py
@@ -157,3 +157,4 @@ class BalPlugin(BasePlugin):
|
|||||||
|
|
||||||
def default_will_settings(self):
|
def default_will_settings(self):
|
||||||
return {"baltx_fees": 100, "threshold": "180d", "locktime": "1y"}
|
return {"baltx_fees": 100, "threshold": "180d", "locktime": "1y"}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
"name": "BAL",
|
"name": "BAL",
|
||||||
"fullname": "Bitcoin After Life",
|
"fullname": "Bitcoin After Life",
|
||||||
"description": "Provides free and decentralized inheritance support<br> Version: 0.2.2d",
|
"description": "Provides free and decentralized inheritance support<br> Version: 0.2.2d",
|
||||||
"author": "Svatantrya",
|
"author":"Svatantrya",
|
||||||
"available_for": ["qt"],
|
"available_for": ["qt"],
|
||||||
"icon": "icons/bal32x32.png"
|
"icon":"icons/bal32x32.png"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
18
qt.py
18
qt.py
@@ -210,7 +210,7 @@ class Plugin(BalPlugin, Logger):
|
|||||||
self.logger.info("HOOK create status bar")
|
self.logger.info("HOOK create status bar")
|
||||||
return
|
return
|
||||||
b = StatusBarButton(
|
b = StatusBarButton(
|
||||||
read_QIcon_from_bytes(self.bal_plugin.read_file("bal32x32.png")),
|
read_QIcon_from_bytes(self.bal_plugin.read_file("icons/bal32x32.png")),
|
||||||
"Bal " + _("Bitcoin After Life"),
|
"Bal " + _("Bitcoin After Life"),
|
||||||
partial(self.setup_dialog, sb),
|
partial(self.setup_dialog, sb),
|
||||||
sb.height(),
|
sb.height(),
|
||||||
@@ -292,7 +292,7 @@ class Plugin(BalPlugin, Logger):
|
|||||||
|
|
||||||
d = BalDialog(window, self, self.get_window_title("Settings"))
|
d = BalDialog(window, self, self.get_window_title("Settings"))
|
||||||
d.setMinimumSize(100, 200)
|
d.setMinimumSize(100, 200)
|
||||||
qicon = read_QPixmap_from_bytes(self.read_file("bal32x32.png"))
|
qicon = read_QPixmap_from_bytes(self.read_file("icons/bal32x32.png"))
|
||||||
lbl_logo = QLabel()
|
lbl_logo = QLabel()
|
||||||
lbl_logo.setPixmap(qicon)
|
lbl_logo.setPixmap(qicon)
|
||||||
|
|
||||||
@@ -434,13 +434,13 @@ class BalWindow(Logger):
|
|||||||
add_optional_tab(
|
add_optional_tab(
|
||||||
self.window.tabs,
|
self.window.tabs,
|
||||||
self.heirs_tab,
|
self.heirs_tab,
|
||||||
read_QIcon_from_bytes(self.bal_plugin.read_file("heir.png")),
|
read_QIcon_from_bytes(self.bal_plugin.read_file("icons/heir.png")),
|
||||||
_("&Heirs"),
|
_("&Heirs"),
|
||||||
)
|
)
|
||||||
add_optional_tab(
|
add_optional_tab(
|
||||||
self.window.tabs,
|
self.window.tabs,
|
||||||
self.will_tab,
|
self.will_tab,
|
||||||
read_QIcon_from_bytes(self.bal_plugin.read_file("will.png")),
|
read_QIcon_from_bytes(self.bal_plugin.read_file("icons/will.png")),
|
||||||
_("&Will"),
|
_("&Will"),
|
||||||
)
|
)
|
||||||
tools_menu.addSeparator()
|
tools_menu.addSeparator()
|
||||||
@@ -867,7 +867,7 @@ class BalWindow(Logger):
|
|||||||
# payment_identifier=payment_identifier,
|
# payment_identifier=payment_identifier,
|
||||||
)
|
)
|
||||||
d.setWindowIcon(
|
d.setWindowIcon(
|
||||||
read_QIcon_from_bytes(self.bal_plugin.read_file("bal32x32.png"))
|
read_QIcon_from_bytes(self.bal_plugin.read_file("icons/bal32x32.png"))
|
||||||
)
|
)
|
||||||
except SerializationError as e:
|
except SerializationError as e:
|
||||||
self.logger.error("unable to deserialize the transaction")
|
self.logger.error("unable to deserialize the transaction")
|
||||||
@@ -1515,7 +1515,7 @@ class PercAmountEdit(BTCAmountEdit):
|
|||||||
|
|
||||||
|
|
||||||
class BalDialog(WindowModalDialog):
|
class BalDialog(WindowModalDialog):
|
||||||
def __init__(self, parent, bal_plugin, title=None, icon="bal32x32.png"):
|
def __init__(self, parent, bal_plugin, title=None, icon="icons/bal32x32.png"):
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
WindowModalDialog.__init__(self, parent, title)
|
WindowModalDialog.__init__(self, parent, title)
|
||||||
# WindowModalDialog.__init__(self,parent)
|
# WindowModalDialog.__init__(self,parent)
|
||||||
@@ -3391,7 +3391,7 @@ class WillExecutorList(MyTreeView):
|
|||||||
labels = [""] * len(self.Columns)
|
labels = [""] * len(self.Columns)
|
||||||
labels[self.Columns.URL] = url
|
labels[self.Columns.URL] = url
|
||||||
if Willexecutors.is_selected(value):
|
if Willexecutors.is_selected(value):
|
||||||
labels[self.Columns.SELECTED] = [read_QIcon("confirmed.png"), ""]
|
labels[self.Columns.SELECTED] = [read_QIcon("icons/confirmed.png"), ""]
|
||||||
else:
|
else:
|
||||||
labels[self.Columns.SELECTED] = ""
|
labels[self.Columns.SELECTED] = ""
|
||||||
labels[self.Columns.BASE_FEE] = Util.decode_amount(
|
labels[self.Columns.BASE_FEE] = Util.decode_amount(
|
||||||
@@ -3399,11 +3399,11 @@ class WillExecutorList(MyTreeView):
|
|||||||
)
|
)
|
||||||
if str(value.get("status", 0)) == "200":
|
if str(value.get("status", 0)) == "200":
|
||||||
labels[self.Columns.STATUS] = [
|
labels[self.Columns.STATUS] = [
|
||||||
read_QIcon("status_connected.png"),
|
read_QIcon("icons/status_connected.png"),
|
||||||
"",
|
"",
|
||||||
]
|
]
|
||||||
else:
|
else:
|
||||||
labels[self.Columns.STATUS] = [read_QIcon("unconfirmed.png"), ""]
|
labels[self.Columns.STATUS] = [read_QIcon("icons/unconfirmed.png"), ""]
|
||||||
labels[self.Columns.ADDRESS] = str(value.get("address", ""))
|
labels[self.Columns.ADDRESS] = str(value.get("address", ""))
|
||||||
labels[self.Columns.INFO] = str(value.get("info", ""))
|
labels[self.Columns.INFO] = str(value.get("info", ""))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user