Skip to content

Multiselect in coincontrol treewidget and display selected count - #11750

Closed
elbandi wants to merge 1 commit into
bitcoin:masterfrom
elbandi:ccmultiselect
Closed

Multiselect in coincontrol treewidget and display selected count#11750
elbandi wants to merge 1 commit into
bitcoin:masterfrom
elbandi:ccmultiselect

Conversation

@elbandi

@elbandi elbandi commented Nov 22, 2017

Copy link
Copy Markdown
Contributor

This patch allow multiple out selection in coincontrol dialog.
Only for changing the checked state, locking need single select.

usecase: someone gets lost of payments from zpool/miningrigrentals/nicehash/etc, its easy to select inputs for sending (no need to click many times in intems or space-down-space-down-space-down... by keyboard)

@promag promag left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Care to upload a screenshot with the diff?

Comment thread src/qt/coincontroltreewidget.cpp Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Remove space after (.

Comment thread src/qt/coincontroldialog.cpp Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

How about:

int count = selected.size();
ui->labelSelected->setVisible(count > 0);
ui->labelSelected->setText(tr("(%1 selected)").arg(count));

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It hides the "(X selected)" label if no selection. like locked count

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ui->labelSelected->setVisible(count > 0); should hide when there's no selection.

Comment thread src/qt/forms/coincontroldialog.ui Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Incorrect?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

???,
placeholder string, as in labelLocked

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Don't know why that is there too, and I think there is no special reason. I guess it's ok since it is consistent with others.

Comment thread src/qt/coincontroltreewidget.cpp Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

for (QTreeWidgetItem* item : selectedItems()) {

Comment thread src/qt/coincontroltreewidget.cpp Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Comment should be "press spacebar -> toggle checkbox"?

@elbandi

elbandi commented Nov 23, 2017

Copy link
Copy Markdown
Contributor Author

new commit pushed

@jonasschnelli

Copy link
Copy Markdown
Contributor

Tested a bit.
The multiselection works well.

I got confused by the selection count indicator label.
It's confusing because you have the first button "(un)select all" where the new "(1) selected" has a different context for "selected".

Maybe remove the label (just add the multiselection possibility) or use a different help text for the new label... though I don't think it's necessary to have a such label (rarely saw this in multiselection use-cases).

@elbandi

elbandi commented Nov 30, 2017

Copy link
Copy Markdown
Contributor Author

Rename the button to "(un)check all", eventually thats the right function.

@laanwj

laanwj commented Feb 12, 2018

Copy link
Copy Markdown
Member

It's confusing because you have the first button "(un)select all" where the new "(1) selected" has a different context for "selected".

I have the same opinion here; the coin selection is already inherently multi-select, as multiple outputs can be checked. So adding another layer of multi-selection on top is confusing. It's no longer clear whether selection refers to "toggled checkbox" or "selected row".

@luke-jr

luke-jr commented Feb 26, 2018

Copy link
Copy Markdown
Contributor

I agree this is confusing, yet also see the validity of the use case.

Maybe @jonasschnelli 's idea + renaming the button to "(Un)check all" would be sufficient.

@jonasschnelli

Copy link
Copy Markdown
Contributor

I think we should remove the new label. Just allow the spacebar toggling. Seems much more clear to me then confusing with "selection" (multiple contexts of selection)

@laanwj

laanwj commented May 14, 2018

Copy link
Copy Markdown
Member

Last post by the author was some time last year. Going to add "Up for grabs" label and closing.

@laanwj laanwj closed this May 14, 2018
@elbandi

elbandi commented May 17, 2018

Copy link
Copy Markdown
Contributor Author

Sorry, i didnt know, what is the latest consensus about the text?
i can change the code, just someone say "lets be this and that"

@luke-jr

luke-jr commented Apr 4, 2019

Copy link
Copy Markdown
Contributor

@elbandi I guess do what @jonasschnelli suggested. When you're ready, ping someone to reopen the PR before you push the new version.

@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants