Skip to content
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

Minus Button sensitivity depends on row items #179

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

snowparrot
Copy link
Contributor

behaviour now: minus button is sensitive except after you put an item into trash.
Behaviour after pull request: if all items arent trashed than you can click the button.

The intention is in a following pull request: the icon changes depending if you select items in the trash or not. If you selected items only in the trash icon of minus button changes and now you can put items out of the trash.

The following request would need a dependency on PixBuf. Is it ok then to add a new dependency?

Copy link
Owner

@Philip-Scott Philip-Scott left a comment

Choose a reason for hiding this comment

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

I've made a couple of comments regardless the choice of the PR. So that you can get better with coding :)

But to be honest i feel that this is not needed because with your code:

  • It would always have to search through all the pages in the current notebook every time you select one
  • You can't select trashed pages anymore
  • The button should not change. Trash should always be trash

if (last_selected_row == null || loading_pages) return;

var rows = listbox.get_selected_rows ();

Copy link
Owner

Choose a reason for hiding this comment

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

Remove extra white-space line

}
else {
minus_button.set_sensitive (false);
}
Copy link
Owner

Choose a reason for hiding this comment

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

you can replace all of this for minus_button.set_sensitive (all_not_trashed)

@snowparrot
Copy link
Contributor Author

snowparrot commented Aug 31, 2017

I think you misunderstood me:

Of course you can still select trashed pages!
Right now: You can click on a page, delete it but later after reselection, minus button still is sensitive. This is very confusing and I was confused when I deleted a page for the first time.

Then: If you reselect a page which is in the trash, you can select it but minus button isn't sensitive so "you can't put it in the trash twice".
This behaviour is much more what a users expects and a huge improvement in UX.

PR changes nothing more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants