|
|
|
@ -210,6 +210,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger, QtEventListener): |
|
|
|
self.addresses_tab = self.create_addresses_tab() |
|
|
|
self.addresses_tab = self.create_addresses_tab() |
|
|
|
self.utxo_tab = self.create_utxo_tab() |
|
|
|
self.utxo_tab = self.create_utxo_tab() |
|
|
|
self.console_tab = self.create_console_tab() |
|
|
|
self.console_tab = self.create_console_tab() |
|
|
|
|
|
|
|
self.notes_tab = self.create_notes_tab() |
|
|
|
self.contacts_tab = self.create_contacts_tab() |
|
|
|
self.contacts_tab = self.create_contacts_tab() |
|
|
|
self.channels_tab = self.create_channels_tab() |
|
|
|
self.channels_tab = self.create_channels_tab() |
|
|
|
tabs.addTab(self.create_history_tab(), read_QIcon("tab_history.png"), _('History')) |
|
|
|
tabs.addTab(self.create_history_tab(), read_QIcon("tab_history.png"), _('History')) |
|
|
|
@ -228,6 +229,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger, QtEventListener): |
|
|
|
add_optional_tab(tabs, self.utxo_tab, read_QIcon("tab_coins.png"), _("Co&ins")) |
|
|
|
add_optional_tab(tabs, self.utxo_tab, read_QIcon("tab_coins.png"), _("Co&ins")) |
|
|
|
add_optional_tab(tabs, self.contacts_tab, read_QIcon("tab_contacts.png"), _("Con&tacts")) |
|
|
|
add_optional_tab(tabs, self.contacts_tab, read_QIcon("tab_contacts.png"), _("Con&tacts")) |
|
|
|
add_optional_tab(tabs, self.console_tab, read_QIcon("tab_console.png"), _("Con&sole")) |
|
|
|
add_optional_tab(tabs, self.console_tab, read_QIcon("tab_console.png"), _("Con&sole")) |
|
|
|
|
|
|
|
add_optional_tab(tabs, self.notes_tab, read_QIcon("pen.png"), _("&Notes")) |
|
|
|
|
|
|
|
|
|
|
|
tabs.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) |
|
|
|
tabs.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) |
|
|
|
|
|
|
|
|
|
|
|
@ -738,6 +740,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger, QtEventListener): |
|
|
|
add_toggle_action(view_menu, self.channels_tab) |
|
|
|
add_toggle_action(view_menu, self.channels_tab) |
|
|
|
add_toggle_action(view_menu, self.contacts_tab) |
|
|
|
add_toggle_action(view_menu, self.contacts_tab) |
|
|
|
add_toggle_action(view_menu, self.console_tab) |
|
|
|
add_toggle_action(view_menu, self.console_tab) |
|
|
|
|
|
|
|
add_toggle_action(view_menu, self.notes_tab) |
|
|
|
|
|
|
|
|
|
|
|
tools_menu = menubar.addMenu(_("&Tools")) # type: QMenu |
|
|
|
tools_menu = menubar.addMenu(_("&Tools")) # type: QMenu |
|
|
|
preferences_action = tools_menu.addAction(_("Preferences"), self.settings_dialog) # type: QAction |
|
|
|
preferences_action = tools_menu.addAction(_("Preferences"), self.settings_dialog) # type: QAction |
|
|
|
@ -1562,6 +1565,15 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger, QtEventListener): |
|
|
|
console.is_shown_cv = self.config.cv.GUI_QT_SHOW_TAB_CONSOLE |
|
|
|
console.is_shown_cv = self.config.cv.GUI_QT_SHOW_TAB_CONSOLE |
|
|
|
return console |
|
|
|
return console |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def create_notes_tab(self): |
|
|
|
|
|
|
|
from PyQt5 import QtGui, QtWidgets |
|
|
|
|
|
|
|
notes_tab = QtWidgets.QPlainTextEdit() |
|
|
|
|
|
|
|
notes_tab.setWordWrapMode(QtGui.QTextOption.WrapAnywhere) |
|
|
|
|
|
|
|
notes_tab.setFont(QtGui.QFont(MONOSPACE_FONT, 10, QtGui.QFont.Normal)) |
|
|
|
|
|
|
|
notes_tab.setPlainText(self.wallet.db.get('notes_text', '')) |
|
|
|
|
|
|
|
notes_tab.is_shown_cv = self.config.cv.GUI_QT_SHOW_TAB_NOTES |
|
|
|
|
|
|
|
return notes_tab |
|
|
|
|
|
|
|
|
|
|
|
def update_console(self): |
|
|
|
def update_console(self): |
|
|
|
console = self.console |
|
|
|
console = self.console |
|
|
|
console.history = self.wallet.db.get_stored_item("qt-console-history", []) |
|
|
|
console.history = self.wallet.db.get_stored_item("qt-console-history", []) |
|
|
|
@ -2507,6 +2519,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger, QtEventListener): |
|
|
|
fut.cancel() |
|
|
|
fut.cancel() |
|
|
|
self.unregister_callbacks() |
|
|
|
self.unregister_callbacks() |
|
|
|
self.config.GUI_QT_WINDOW_IS_MAXIMIZED = self.isMaximized() |
|
|
|
self.config.GUI_QT_WINDOW_IS_MAXIMIZED = self.isMaximized() |
|
|
|
|
|
|
|
self.wallet.db.put('notes_text', self.notes_tab.toPlainText()) |
|
|
|
if not self.isMaximized(): |
|
|
|
if not self.isMaximized(): |
|
|
|
g = self.geometry() |
|
|
|
g = self.geometry() |
|
|
|
self.wallet.db.put("winpos-qt", [g.left(),g.top(), |
|
|
|
self.wallet.db.put("winpos-qt", [g.left(),g.top(), |
|
|
|
|