New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to search the address book #12080

Merged
merged 1 commit into from Mar 14, 2018

Conversation

Projects
None yet
6 participants
@promag
Member

promag commented Jan 3, 2018

This PR adds support to search the address book for both receiving and sending addresses.

A specialisation of the QSortFilterProxyModel is added to implement the custom filtering.

screen shot 2018-01-03 at 16 05 57

screen shot 2018-01-03 at 16 00 58

Closes #623.

@fanquake fanquake added the GUI label Jan 3, 2018

@jonasschnelli

This comment has been minimized.

Member

jonasschnelli commented Jan 4, 2018

Concept ACK

@gmaxwell

This comment has been minimized.

Member

gmaxwell commented Jan 8, 2018

Should we really be adding more functionality that encourages address reuse instead of doing the opposite?

@promag

This comment has been minimized.

Member

promag commented Jan 15, 2018

@gmaxwell I see your point. Although, from the UI point of view, search/filter is a basic thing to have near big lists.

@Sjors

Perhaps in the future the address book can be used for something more privacy friendly (in other words, not literally addresses). In addition, maybe the address book and/or send screen can mark used addresses as such.

Looks like a simple enough change code-wise.

Tested, worked for me.

proxyModel->setDynamicSortFilter(true);
proxyModel->setSortCaseSensitivity(Qt::CaseInsensitive);
proxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
switch(tab)

This comment has been minimized.

@Sjors

Sjors Feb 8, 2018

Member

What was this doing originally?

This comment has been minimized.

@promag

promag Feb 8, 2018

Member

This behaviour is now coded in L151.

This comment has been minimized.

@Sjors

Sjors Feb 8, 2018

Member

I see. In that case I'm confused as to what ReceivingTab does. I only see the address book in the Send tab.

This comment has been minimized.

@promag

promag Feb 8, 2018

Member

Create a request payments in "Receive" tab and then go "File" -> "Receiving adresses...".

This comment has been minimized.

@Sjors

Sjors Feb 9, 2018

Member

Found it, search works there as well.

@Sjors

This comment has been minimized.

Member

Sjors commented Feb 9, 2018

ACK c316fdf.

Suggestion for future improvement: highlight matching characters using bold font.

@laanwj

This comment has been minimized.

Member

laanwj commented Mar 14, 2018

@Sjors Thanks for testing!
Good to finally close #623.

@laanwj laanwj merged commit c316fdf into bitcoin:master Mar 14, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

laanwj added a commit that referenced this pull request Mar 14, 2018

Merge #12080: Add support to search the address book
c316fdf [qt] Add support to search the address book (João Barbosa)

Pull request description:

  This PR adds support to search the address book for both receiving and sending addresses.

  A specialisation of the `QSortFilterProxyModel` is added to implement the custom filtering.

  <img width="757" alt="screen shot 2018-01-03 at 16 05 57" src="https://user-images.githubusercontent.com/3534524/34528196-0347d61e-f0a0-11e7-9bd3-535e9e34ceb8.png">
  <img width="759" alt="screen shot 2018-01-03 at 16 00 58" src="https://user-images.githubusercontent.com/3534524/34528202-07c99f24-f0a0-11e7-8e34-cff6a1ba2364.png">

  Closes #623.

Tree-SHA512: 316e646015c858fc70db6be72dc7922d5bb10a3399e7fa327c992e184cc37a124f11cffefab2dbe0d16bda790c7c0437db364686e66c40b4054b8250b4be15d0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment