From 50d1334a52d92a8cb453d17cc0d4f428ad3b633f Mon Sep 17 00:00:00 2001
From: Htylol <dixperm909@yandex.ru>
Date: Fri, 12 Jul 2024 10:09:16 +0500
Subject: [PATCH] Adds the ability to copy the command to install gamescope
 into flatpak

---
 data_from_portwine/scripts/functions_helper | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/data_from_portwine/scripts/functions_helper b/data_from_portwine/scripts/functions_helper
index c1607e4c..9ea4d54a 100755
--- a/data_from_portwine/scripts/functions_helper
+++ b/data_from_portwine/scripts/functions_helper
@@ -4263,7 +4263,8 @@ fi
         done
     else
         if check_flatpak ; then
-            GAMESCOPE_NEED_INSTALL="$(gettext "<b>Gamescope is not detected on the system, to install it, run the command in the terminal:\n flatpak install org.freedesktop.Platform.VulkanLayer.gamescope (install the latest version)</b>")"
+            GAMESCOPE_NEED_INSTALL="$(gettext "<b>Gamescope is not detected on the system, to install it, run the command in the terminal:\n flatpak install -y runtime/org.freedesktop.Platform.VulkanLayer.gamescope/x86_64/23.08\n (Can be selected and copied)</b>")"
+            YAD_TEXT_SELECTION="--selectable-labels"
         else
             GAMESCOPE_NEED_INSTALL="$(gettext "<b>Gamescope is not detected on the system, please contact the manufacturer of your distribution\n or search the Internet for information on how to install gamescope on your system.</b>")"
         fi
@@ -4294,7 +4295,7 @@ fi
     old_IFS=$IFS
     IFS="%"
     "${pw_yad}" --plug=$KEY_GS_GUI --tabnum="1" --form --columns=3 --separator=" " --text-align=center --text "$GAMESCOPE_NEED_INSTALL" \
-    --gui-type-text=${GAMESCOPE_GUI_TYPE_TEXT_UP} --gui-type-layout=${GAMESCOPE_GUI_TYPE_LAYOUT_UP} \
+    --gui-type-text=${GAMESCOPE_GUI_TYPE_TEXT_UP} --gui-type-layout=${GAMESCOPE_GUI_TYPE_LAYOUT_UP} $YAD_TEXT_SELECTION \
     ${ADD_CHK_BOX_GS} \
     1> "${PW_TMPFS_PATH}/tmp_yad_gs_set" 2>/dev/null &
     IFS=$old_IFS