Commit dab96b3f authored by Evangelos Foutras's avatar Evangelos Foutras Committed by Alexander Schwinn

Get rid of bitwise AND in logical expression (Bug #15352)

Bitwise AND seems to produce the correct result but it's not the right
way to go about it. Better to be less fancy and use the proper boolean
operator.

Fixes my previous commit e0f50533.
parent 9ad27be6
......@@ -4492,10 +4492,9 @@ thunar_standard_view_selection_changed (ThunarStandardView *standard_view)
writable = (current_directory != NULL && thunar_file_is_writable (current_directory));
trashed = (current_directory != NULL && thunar_file_is_trashed (current_directory));
/* if moving to trash is not applicable, replace it with the delete action */
hide_trash_action = trashed || !trashable || !thunar_g_vfs_is_uri_scheme_supported ("trash");
/* but only if the directory is writable -- keep "move to trash" otherwise */
hide_trash_action &= writable;
/* if moving to trash is not applicable, replace it with the delete action
* but only if the directory is writable -- keep "move to trash" otherwise */
hide_trash_action = writable && (trashed || !trashable || !thunar_g_vfs_is_uri_scheme_supported ("trash"));
g_object_get (G_OBJECT (standard_view->preferences), "misc-show-delete-action", &show_delete_action, NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment