Skip to content

Conversation

@promag
Copy link
Contributor

@promag 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.

@promag promag force-pushed the 2018-01-searchaddressbook branch from 14b6d4d to c316fdf Compare January 3, 2018 16:15
@fanquake fanquake added the GUI label Jan 3, 2018
@jonasschnelli
Copy link
Contributor

Concept ACK

@gmaxwell
Copy link
Contributor

gmaxwell commented Jan 8, 2018

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

@promag
Copy link
Contributor Author

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.

Copy link
Member

@Sjors Sjors left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was this doing originally?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This behaviour is now coded in L151.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found it, search works there as well.

@Sjors
Copy link
Member

Sjors commented Feb 9, 2018

ACK c316fdf.

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

@laanwj
Copy link
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
laanwj added a commit that referenced this pull request Mar 14, 2018
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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 13, 2020
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 dashpay#623.

Tree-SHA512: 316e646015c858fc70db6be72dc7922d5bb10a3399e7fa327c992e184cc37a124f11cffefab2dbe0d16bda790c7c0437db364686e66c40b4054b8250b4be15d0
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Address book cannot be searched

6 participants