|
|
@ -382,6 +382,7 @@ class ElectrumWindow(QMainWindow): |
|
|
|
self.import_menu = self.private_keys_menu.addAction(_("&Import"), self.do_import_privkey) |
|
|
|
self.export_menu = self.private_keys_menu.addAction(_("&Export"), self.export_privkeys_dialog) |
|
|
|
wallet_menu.addAction(_("&Export History"), self.export_history_dialog) |
|
|
|
wallet_menu.addAction(_("Search"), self.toggle_search).setShortcut(QKeySequence("Ctrl+S")) |
|
|
|
|
|
|
|
tools_menu = menubar.addMenu(_("&Tools")) |
|
|
|
|
|
|
@ -1655,6 +1656,11 @@ class ElectrumWindow(QMainWindow): |
|
|
|
self.connect(self.account_selector,SIGNAL("activated(QString)"),self.change_account) |
|
|
|
sb.addPermanentWidget(self.account_selector) |
|
|
|
|
|
|
|
self.search_box = QLineEdit() |
|
|
|
self.search_box.textChanged.connect(self.do_search) |
|
|
|
self.search_box.hide() |
|
|
|
sb.addPermanentWidget(self.search_box) |
|
|
|
|
|
|
|
if (int(qtVersion[0]) >= 4 and int(qtVersion[2]) >= 7): |
|
|
|
sb.addPermanentWidget( StatusBarButton( QIcon(":icons/switchgui.png"), _("Switch to Lite Mode"), self.go_lite ) ) |
|
|
|
|
|
|
@ -1691,6 +1697,23 @@ class ElectrumWindow(QMainWindow): |
|
|
|
self.update_lock_icon() |
|
|
|
|
|
|
|
|
|
|
|
def toggle_search(self): |
|
|
|
self.search_box.setHidden(not self.search_box.isHidden()) |
|
|
|
if not self.search_box.isHidden(): |
|
|
|
self.search_box.setFocus(1) |
|
|
|
else: |
|
|
|
self.do_search('') |
|
|
|
|
|
|
|
def do_search(self, t): |
|
|
|
i = self.tabs.currentIndex() |
|
|
|
if i == 0: |
|
|
|
self.history_list.filter(t, 2) |
|
|
|
elif i == 3: |
|
|
|
self.address_list.filter(t, 1) |
|
|
|
elif i == 4: |
|
|
|
self.contacts_list.filter(t, 0) |
|
|
|
|
|
|
|
|
|
|
|
def new_contact_dialog(self): |
|
|
|
d = QDialog(self) |
|
|
|
d.setWindowTitle(_("New Contact")) |
|
|
|