diff --git a/thunar/thunar-permissions-chooser.c b/thunar/thunar-permissions-chooser.c index 7e26dd0..fcfe398 100644 --- a/thunar/thunar-permissions-chooser.c +++ b/thunar/thunar-permissions-chooser.c @@ -864,11 +864,15 @@ thunar_permissions_chooser_file_changed (ThunarPermissionsChooser *chooser, } /* update the program setting based on the mode (only visible for regular files, allowed for execution) */ + int file_has_execute_bit = (mode & 0111) != 0; g_signal_handlers_block_by_func (G_OBJECT (chooser->program_button), thunar_permissions_chooser_program_toggled, chooser); g_object_set (G_OBJECT (chooser->program_button), "visible", thunar_file_is_regular (file) && (thunarx_file_info_has_mime_type (THUNARX_FILE_INFO (file), "application/x-executable") - || thunarx_file_info_has_mime_type (THUNARX_FILE_INFO (file), "application/x-shellscript")), NULL); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (chooser->program_button), (mode & 0111) != 0); + || thunarx_file_info_has_mime_type (THUNARX_FILE_INFO (file), "application/x-shellscript") + || thunarx_file_info_has_mime_type (THUNARX_FILE_INFO (file), "application/x-ms-dos-executable") + || thunarx_file_info_has_mime_type (THUNARX_FILE_INFO (file), "application/x-msi") + || file_has_execute_bit), NULL); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (chooser->program_button), file_has_execute_bit); g_signal_handlers_unblock_by_func (G_OBJECT (chooser->program_button), thunar_permissions_chooser_program_toggled, chooser); /* update the "inconsistent folder permissions" warning and the "fix permissions" button based on the mode */