-
Notifications
You must be signed in to change notification settings - Fork 47
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
base: master
Are you sure you want to change the base?
Minus Button sensitivity depends on row items #179
Conversation
There was a problem hiding this 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 (); | ||
|
There was a problem hiding this comment.
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); | ||
} |
There was a problem hiding this comment.
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)
I think you misunderstood me: Of course you can still select trashed pages! 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". PR changes nothing more. |
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?