linuxOS_AP05/debian/test/usr/share/help/ru/zenity/file-selection.page
2025-09-26 09:40:02 +08:00

68 lines
2.4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<page xmlns="http://projectmallard.org/1.0/" type="topic" id="file-selection" xml:lang="ru">
<info>
<link type="guide" xref="index#dialogs"/>
<desc>Use the <cmd>--file-selection</cmd> option.</desc>
</info>
<title>Диалоговое окно выбора файла</title>
<p>
Use the <cmd>--file-selection</cmd> option to create a file selection dialog. <app>Zenity</app> returns the selected files or directories to standard
output. The default mode of the file selection dialog is open.
</p>
<p>Диалоговое окно выбора файлов поддерживает следующие параметры:</p>
<terms>
<item>
<title><cmd>--filename</cmd>=<var>filename</var></title>
<p>Указывает файл или каталог, который будет выбран в диалоговом окне, когда оно впервые появится.</p>
</item>
<item>
<title><cmd>--multiple</cmd></title>
<p>Позволяет выбирать сразу несколько файлов в окне выбора.</p>
</item>
<item>
<title><cmd>--directory</cmd></title>
<p>Позволяет выбирать только каталоги в диалоговом окне выбора файла.</p>
</item>
<item>
<title><cmd>--save</cmd></title>
<p>Устанавливает диалоговое окно в режим сохранения файла.</p>
</item>
<item>
<title><cmd>--separator</cmd>=<var>separator</var></title>
<p>Указывает строку, которая будет использована для разделения имён файлов в возвращаемом списке.</p>
</item>
</terms>
<p>
The following example script shows how to create a file selection dialog:
</p>
<code>
#!/bin/sh
FILE=`zenity --file-selection --title="Select a File"`
case $? in
0)
echo "\"$FILE\" selected.";;
1)
echo "No file selected.";;
-1)
echo "An unexpected error has occurred.";;
esac
</code>
<figure>
<title>Пример диалогового окна выбора файла</title>
<desc><app>Zenity</app> file selection dialog example</desc>
<media type="image" mime="image/png" src="figures/zenity-fileselection-screenshot.png"/>
</figure>
</page>