[Xfce4-commits] [xfce/thunar] 01/01: Get rid of bitwise AND in logical expression (Bug #15352)

noreply at xfce.org noreply at xfce.org
Tue Jul 2 22:46:52 CEST 2019


This is an automated email from the git hooks/post-receive script.

a   l   e   x       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       x   f   c   e   -   4   .   1   4   
   in repository xfce/thunar.

commit dab96b3f68c6fb8dafd35a2ef6efa875bb955e6d
Author: Evangelos Foutras <evangelos at foutrelis.com>
Date:   Tue Jul 2 01:24:10 2019 +0300

    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 e0f50533edc8abcff0e478f423e290c786ce82ed.
---
 thunar/thunar-standard-view.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/thunar/thunar-standard-view.c b/thunar/thunar-standard-view.c
index 06eb6c3..3dd7779 100644
--- a/thunar/thunar-standard-view.c
+++ b/thunar/thunar-standard-view.c
@@ -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);
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list