Commit ee416fc8 authored by Victor Ananjevsky's avatar Victor Ananjevsky

add --file-op option to text-info dialog

parent 6b2d263d
...@@ -968,6 +968,9 @@ Listen data from stdin even if filename was specified. ...@@ -968,6 +968,9 @@ Listen data from stdin even if filename was specified.
.B \-\-in-place .B \-\-in-place
Save file on exit instead of print it content on stdout. This option works only if file was specified from command-line. Save file on exit instead of print it content on stdout. This option works only if file was specified from command-line.
.TP .TP
.B \-\-file-op
Enable file operations. This option adds open and save menu items to popup menu, This option works only in editable mode.
.TP
Next options works only if yad builds with GtkSourceView. Next options works only if yad builds with GtkSourceView.
.TP .TP
.B \-\-lang=\fILANGUAGE\fP .B \-\-lang=\fILANGUAGE\fP
......
...@@ -7,7 +7,7 @@ msgid "" ...@@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: YAD\n" "Project-Id-Version: YAD\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-04-17 16:19+0300\n" "POT-Creation-Date: 2021-04-18 09:24+0300\n"
"PO-Revision-Date: 2009-04-30 16:47+0300\n" "PO-Revision-Date: 2009-04-30 16:47+0300\n"
"Last-Translator: Victor Ananjevsky <ananasik@gmail.com>\n" "Last-Translator: Victor Ananjevsky <ananasik@gmail.com>\n"
"Language-Team: \n" "Language-Team: \n"
...@@ -45,7 +45,7 @@ msgstr "" ...@@ -45,7 +45,7 @@ msgstr ""
"Собран с поддержкой GtkSpell\n" "Собран с поддержкой GtkSpell\n"
"Используется GTK+ %d.%d.%d\n" "Используется GTK+ %d.%d.%d\n"
#: ../src/calendar.c:39 ../src/text.c:397 #: ../src/calendar.c:39 ../src/text.c:585
#, c-format #, c-format
msgid "Cannot open file '%s': %s\n" msgid "Cannot open file '%s': %s\n"
msgstr "Не могу открыть файл %s: %s\n" msgstr "Не могу открыть файл %s: %s\n"
...@@ -65,49 +65,51 @@ msgstr "Начальное значение меньше минимальног ...@@ -65,49 +65,51 @@ msgstr "Начальное значение меньше минимальног
msgid "Initial value greater than maximum.\n" msgid "Initial value greater than maximum.\n"
msgstr "Начальное значение больше маскимального.\n" msgstr "Начальное значение больше маскимального.\n"
#: ../src/form.c:453 #: ../src/form.c:455
msgid "Select files" msgid "Select files"
msgstr "Выбор файлов" msgstr "Выбор файлов"
#: ../src/form.c:456 ../src/form.c:464 ../src/form.c:543 ../src/form.c:551 #: ../src/form.c:458 ../src/form.c:466 ../src/form.c:545 ../src/form.c:553
#: ../src/form.c:602 ../src/html.c:175 ../src/html.c:207 ../src/util.c:40 #: ../src/form.c:604 ../src/html.c:175 ../src/html.c:207 ../src/text.c:160
#: ../src/text.c:225 ../src/util.c:40
msgid "Cancel" msgid "Cancel"
msgstr "Отмена" msgstr "Отмена"
#: ../src/form.c:457 ../src/form.c:465 ../src/form.c:544 ../src/form.c:552 #: ../src/form.c:459 ../src/form.c:467 ../src/form.c:546 ../src/form.c:554
#: ../src/form.c:603 ../src/html.c:174 ../src/util.c:46 #: ../src/form.c:605 ../src/html.c:174 ../src/text.c:161 ../src/text.c:226
#: ../src/util.c:46
msgid "OK" msgid "OK"
msgstr "OK" msgstr "OK"
#: ../src/form.c:461 #: ../src/form.c:463
msgid "Select folders" msgid "Select folders"
msgstr "Выбор каталогов" msgstr "Выбор каталогов"
#: ../src/form.c:540 #: ../src/form.c:542
msgid "Select or create file" msgid "Select or create file"
msgstr "Выбор или создание файла" msgstr "Выбор или создание файла"
#: ../src/form.c:548 #: ../src/form.c:550
msgid "Select or create folder" msgid "Select or create folder"
msgstr "Выбор или создание каталога" msgstr "Выбор или создание каталога"
#: ../src/form.c:599 #: ../src/form.c:601
msgid "Select date" msgid "Select date"
msgstr "Выбор даты" msgstr "Выбор даты"
#: ../src/form.c:912 #: ../src/form.c:960
msgid "Select file" msgid "Select file"
msgstr "Выбор файла" msgstr "Выбор файла"
#: ../src/form.c:942 #: ../src/form.c:990
msgid "Select folder" msgid "Select folder"
msgstr "Выбор каталога" msgstr "Выбор каталога"
#: ../src/form.c:1110 ../src/form.c:1112 #: ../src/form.c:1158 ../src/form.c:1160
msgid "Link" msgid "Link"
msgstr "Ссылка" msgstr "Ссылка"
#: ../src/html.c:171 #: ../src/html.c:171 ../src/text.c:157 ../src/text.c:222
msgid "YAD - Select File" msgid "YAD - Select File"
msgstr "YAD - Выбор файла" msgstr "YAD - Выбор файла"
...@@ -325,8 +327,8 @@ msgstr "Задать выравнивание текста диалога (left, ...@@ -325,8 +327,8 @@ msgstr "Задать выравнивание текста диалога (left,
#: ../src/option.c:225 ../src/option.c:370 ../src/option.c:397 #: ../src/option.c:225 ../src/option.c:370 ../src/option.c:397
#: ../src/option.c:453 ../src/option.c:463 ../src/option.c:509 #: ../src/option.c:453 ../src/option.c:463 ../src/option.c:509
#: ../src/option.c:541 ../src/option.c:553 ../src/option.c:563 #: ../src/option.c:541 ../src/option.c:553 ../src/option.c:563
#: ../src/option.c:577 ../src/option.c:638 ../src/option.c:685 #: ../src/option.c:577 ../src/option.c:638 ../src/option.c:687
#: ../src/option.c:712 ../src/option.c:714 ../src/tools.c:80 #: ../src/option.c:714 ../src/option.c:716 ../src/tools.c:80
msgid "TYPE" msgid "TYPE"
msgstr "ТИП" msgstr "ТИП"
...@@ -342,7 +344,7 @@ msgstr "КАРТИНКА" ...@@ -342,7 +344,7 @@ msgstr "КАРТИНКА"
msgid "Use specified icon theme instead of default" msgid "Use specified icon theme instead of default"
msgstr "Использовать указанную тему иконок" msgstr "Использовать указанную тему иконок"
#: ../src/option.c:118 ../src/option.c:663 ../src/browser.c:217 #: ../src/option.c:118 ../src/option.c:665 ../src/browser.c:217
#: ../src/tools.c:81 #: ../src/tools.c:81
msgid "THEME" msgid "THEME"
msgstr "ТЕМА" msgstr "ТЕМА"
...@@ -571,8 +573,8 @@ msgstr "Показывать скрытые файлы в диалоге выб ...@@ -571,8 +573,8 @@ msgstr "Показывать скрытые файлы в диалоге выб
msgid "Set source filename" msgid "Set source filename"
msgstr "Имя исходного файла" msgstr "Имя исходного файла"
#: ../src/option.c:217 ../src/option.c:284 ../src/option.c:710 #: ../src/option.c:217 ../src/option.c:284 ../src/option.c:712
#: ../src/option.c:722 #: ../src/option.c:724
msgid "FILENAME" msgid "FILENAME"
msgstr "ИМЯ_ФАЙЛА" msgstr "ИМЯ_ФАЙЛА"
...@@ -618,7 +620,7 @@ msgstr "Задать имя приложения" ...@@ -618,7 +620,7 @@ msgstr "Задать имя приложения"
#: ../src/option.c:243 ../src/option.c:245 ../src/option.c:247 #: ../src/option.c:243 ../src/option.c:245 ../src/option.c:247
#: ../src/option.c:257 ../src/option.c:401 ../src/option.c:526 #: ../src/option.c:257 ../src/option.c:401 ../src/option.c:526
#: ../src/option.c:708 #: ../src/option.c:710
msgid "STRING" msgid "STRING"
msgstr "СТРОКА" msgstr "СТРОКА"
...@@ -724,7 +726,7 @@ msgid "Set initial color value" ...@@ -724,7 +726,7 @@ msgid "Set initial color value"
msgstr "Задать начальное значение цвета" msgstr "Задать начальное значение цвета"
#: ../src/option.c:294 ../src/option.c:642 ../src/option.c:644 #: ../src/option.c:294 ../src/option.c:642 ../src/option.c:644
#: ../src/option.c:650 ../src/option.c:671 ../src/option.c:673 #: ../src/option.c:650 ../src/option.c:673 ../src/option.c:675
msgid "COLOR" msgid "COLOR"
msgstr "ЦВЕТ" msgstr "ЦВЕТ"
...@@ -1272,8 +1274,8 @@ msgid "Set initial value" ...@@ -1272,8 +1274,8 @@ msgid "Set initial value"
msgstr "Задать начальное значение" msgstr "Задать начальное значение"
#: ../src/option.c:608 ../src/option.c:610 ../src/option.c:612 #: ../src/option.c:608 ../src/option.c:610 ../src/option.c:612
#: ../src/option.c:614 ../src/option.c:618 ../src/option.c:681 #: ../src/option.c:614 ../src/option.c:618 ../src/option.c:683
#: ../src/option.c:683 #: ../src/option.c:685
msgid "VALUE" msgid "VALUE"
msgstr "ЗНАЧЕНИЕ" msgstr "ЗНАЧЕНИЕ"
...@@ -1365,448 +1367,452 @@ msgstr "Использовать разметку pango" ...@@ -1365,448 +1367,452 @@ msgstr "Использовать разметку pango"
msgid "Save file instead of print on exit" msgid "Save file instead of print on exit"
msgstr "Сохранять файл вместо вывода на выходе" msgstr "Сохранять файл вместо вывода на выходе"
#: ../src/option.c:661 #: ../src/option.c:656
msgid "Enable file operations"
msgstr "Разрешить файловые операции"
#: ../src/option.c:663
msgid "Use specified langauge for syntax highlighting" msgid "Use specified langauge for syntax highlighting"
msgstr "Использовать указанный язык для подсветки синтаксиса" msgstr "Использовать указанный язык для подсветки синтаксиса"
#: ../src/option.c:661 #: ../src/option.c:663
msgid "LANG" msgid "LANG"
msgstr "ЯЗЫК" msgstr "ЯЗЫК"
#: ../src/option.c:663 #: ../src/option.c:665
msgid "Use specified theme" msgid "Use specified theme"
msgstr "Использовать указанную тему" msgstr "Использовать указанную тему"
#: ../src/option.c:665 ../data/yad.gschema.xml.in.h:17 #: ../src/option.c:667 ../data/yad.gschema.xml.in.h:17
msgid "Show line numbers" msgid "Show line numbers"
msgstr "Показывать номера строк" msgstr "Показывать номера строк"
#: ../src/option.c:667 ../data/yad.gschema.xml.in.h:18 #: ../src/option.c:669 ../data/yad.gschema.xml.in.h:18
msgid "Highlight current line" msgid "Highlight current line"
msgstr "Подсвечивать текущую строку" msgstr "Подсвечивать текущую строку"
#: ../src/option.c:669 #: ../src/option.c:671
msgid "Enable line marks" msgid "Enable line marks"
msgstr "Разрешить пометки строк" msgstr "Разрешить пометки строк"
#: ../src/option.c:671 #: ../src/option.c:673
msgid "Set color for first type marks" msgid "Set color for first type marks"
msgstr "Задать цвет меток первого типа" msgstr "Задать цвет меток первого типа"
#: ../src/option.c:673 #: ../src/option.c:675
msgid "Set color for second type marks" msgid "Set color for second type marks"
msgstr "Задать цвет меток второго типа" msgstr "Задать цвет меток второго типа"
#: ../src/option.c:675 #: ../src/option.c:677
msgid "Set position of right margin" msgid "Set position of right margin"
msgstr "Задать положение правой границы" msgstr "Задать положение правой границы"
#: ../src/option.c:675 #: ../src/option.c:677
msgid "[POS]" msgid "[POS]"
msgstr "[ПОЗИЦИЯ]" msgstr "[ПОЗИЦИЯ]"
#: ../src/option.c:677 ../data/yad.gschema.xml.in.h:23 #: ../src/option.c:679 ../data/yad.gschema.xml.in.h:23
msgid "Highlight matching brackets" msgid "Highlight matching brackets"
msgstr "Подсвечивать парные скобки" msgstr "Подсвечивать парные скобки"
#: ../src/option.c:679 ../data/yad.gschema.xml.in.h:24 #: ../src/option.c:681 ../data/yad.gschema.xml.in.h:24
msgid "Use autoindent" msgid "Use autoindent"
msgstr "Использовать автовыравнивание" msgstr "Использовать автовыравнивание"
#: ../src/option.c:681 #: ../src/option.c:683
msgid "Set tabulation width" msgid "Set tabulation width"
msgstr "Задать ширину табуляции" msgstr "Задать ширину табуляции"
#: ../src/option.c:683 #: ../src/option.c:685
msgid "Set indentation width" msgid "Set indentation width"
msgstr "Задать ширину выравнивания" msgstr "Задать ширину выравнивания"
#: ../src/option.c:685 #: ../src/option.c:687
msgid "Set smart Home/End behavior" msgid "Set smart Home/End behavior"
msgstr "Задать поведение умных Home/End" msgstr "Задать поведение умных Home/End"
#: ../src/option.c:687 #: ../src/option.c:689
msgid "Enable smart backspace" msgid "Enable smart backspace"
msgstr "Использовать умный backspace" msgstr "Использовать умный backspace"
#: ../src/option.c:689 ../data/yad.gschema.xml.in.h:29 #: ../src/option.c:691 ../data/yad.gschema.xml.in.h:29
msgid "Insert spaces instead of tabs" msgid "Insert spaces instead of tabs"
msgstr "Вставлять пробелы вместо табуляции" msgstr "Вставлять пробелы вместо табуляции"
#: ../src/option.c:696 #: ../src/option.c:698
msgid "Sets a filename filter" msgid "Sets a filename filter"
msgstr "Задать фильтр файлов по маске" msgstr "Задать фильтр файлов по маске"
#: ../src/option.c:696 #: ../src/option.c:698
msgid "NAME | PATTERN1 PATTERN2 ..." msgid "NAME | PATTERN1 PATTERN2 ..."
msgstr "ИМЯ | ШАБЛОН1 ШАБЛОН2 ..." msgstr "ИМЯ | ШАБЛОН1 ШАБЛОН2 ..."
#: ../src/option.c:698 #: ../src/option.c:700
msgid "Sets a mime-type filter" msgid "Sets a mime-type filter"
msgstr "Задать фильтр файлов по типу mime" msgstr "Задать фильтр файлов по типу mime"
#: ../src/option.c:698 #: ../src/option.c:700
msgid "NAME | MIME1 MIME2 ..." msgid "NAME | MIME1 MIME2 ..."
msgstr "ИМЯ | ТИП1 ТИП2 ..." msgstr "ИМЯ | ТИП1 ТИП2 ..."
#: ../src/option.c:700 #: ../src/option.c:702
msgid "Add filter for images" msgid "Add filter for images"
msgstr "Добавить фильтр изображений" msgstr "Добавить фильтр изображений"
#: ../src/option.c:700 #: ../src/option.c:702
msgid "[NAME]" msgid "[NAME]"
msgstr "[ИМЯ]" msgstr "[ИМЯ]"
#: ../src/option.c:706 ../src/tools.c:59 #: ../src/option.c:708 ../src/tools.c:59
msgid "Print version" msgid "Print version"
msgstr "Вывести версию" msgstr "Вывести версию"
#: ../src/option.c:708 #: ../src/option.c:710
msgid "Load additional CSS settings from file or string" msgid "Load additional CSS settings from file or string"
msgstr "Загрузить дополнительные настройки CSS из файла или строки" msgstr "Загрузить дополнительные настройки CSS из файла или строки"
#: ../src/option.c:710 #: ../src/option.c:712
msgid "Load additional CSS settings from file" msgid "Load additional CSS settings from file"
msgstr "Загрузить дополнительные настройки CSS из файла" msgstr "Загрузить дополнительные настройки CSS из файла"
#: ../src/option.c:712 #: ../src/option.c:714
msgid "Set policy for horizontal scrollbars (auto, always, never)" msgid "Set policy for horizontal scrollbars (auto, always, never)"
msgstr "Задать тип горизонтальной прокрутки (auto, always, never)" msgstr "Задать тип горизонтальной прокрутки (auto, always, never)"
#: ../src/option.c:714 #: ../src/option.c:716
msgid "Set policy for vertical scrollbars (auto, always, never)" msgid "Set policy for vertical scrollbars (auto, always, never)"
msgstr "Задать тип вертикальной прокрутки (auto, always, never)" msgstr "Задать тип вертикальной прокрутки (auto, always, never)"
#: ../src/option.c:716 #: ../src/option.c:718
msgid "Add path for search icons by name" msgid "Add path for search icons by name"
msgstr "Добавить каталог для поиска изображений по имени" msgstr "Добавить каталог для поиска изображений по имени"
#: ../src/option.c:716 #: ../src/option.c:718
msgid "PATH" msgid "PATH"
msgstr "ПУТЬ" msgstr "ПУТЬ"
#: ../src/option.c:722 #: ../src/option.c:724
msgid "Load extra arguments from file" msgid "Load extra arguments from file"
msgstr "Загрузить дополнительные аргументы из файла" msgstr "Загрузить дополнительные аргументы из файла"
#: ../src/option.c:927 #: ../src/option.c:931
#, c-format #, c-format
msgid "Mark %s doesn't have a value\n" msgid "Mark %s doesn't have a value\n"
msgstr "Метке %s не задано значение\n" msgstr "Метке %s не задано значение\n"
#: ../src/option.c:964 #: ../src/option.c:968
msgid "Images" msgid "Images"
msgstr "Изображения" msgstr "Изображения"
#: ../src/option.c:1029 #: ../src/option.c:1033
#, c-format #, c-format
msgid "Unknown color mode: %s\n" msgid "Unknown color mode: %s\n"
msgstr "Неизвестный режим цвета: '%s'\n" msgstr "Неизвестный режим цвета: '%s'\n"
#: ../src/option.c:1048 #: ../src/option.c:1052
#, c-format #, c-format
msgid "Unknown buttons layout type: %s\n" msgid "Unknown buttons layout type: %s\n"
msgstr "Неизвестный тип расположения кнопок: %s\n" msgstr "Неизвестный тип расположения кнопок: %s\n"
#: ../src/option.c:1063 #: ../src/option.c:1067
#, c-format #, c-format
msgid "Unknown align type: %s\n" msgid "Unknown align type: %s\n"
msgstr "Неизвестный тип выравнивания: %s\n" msgstr "Неизвестный тип выравнивания: %s\n"
#: ../src/option.c:1087 #: ../src/option.c:1091
#, c-format #, c-format
msgid "Unknown justification type: %s\n" msgid "Unknown justification type: %s\n"
msgstr "Неизвестный тип выравнивания: %s\n" msgstr "Неизвестный тип выравнивания: %s\n"
#: ../src/option.c:1104 #: ../src/option.c:1108
#, c-format #, c-format
msgid "Unknown tab position type: %s\n" msgid "Unknown tab position type: %s\n"
msgstr "Неизвестный тип позиции вкладки: %s\n" msgstr "Неизвестный тип позиции вкладки: %s\n"
#: ../src/option.c:1141 #: ../src/option.c:1145
#, c-format #, c-format
msgid "Unknown ellipsize type: %s\n" msgid "Unknown ellipsize type: %s\n"
msgstr "Неизвестный тип усечения: %s\n" msgstr "Неизвестный тип усечения: %s\n"
#: ../src/option.c:1154 #: ../src/option.c:1158
#, c-format #, c-format
msgid "Unknown orientation: %s\n" msgid "Unknown orientation: %s\n"
msgstr "Неизвестная ориентация: %s\n" msgstr "Неизвестная ориентация: %s\n"
#: ../src/option.c:1169 #: ../src/option.c:1173
#, c-format #, c-format
msgid "Unknown source type: %s\n" msgid "Unknown source type: %s\n"
msgstr "Неизвестный исходный тип: %s\n" msgstr "Неизвестный исходный тип: %s\n"
#: ../src/option.c:1180 #: ../src/option.c:1184
msgid "Progress log" msgid "Progress log"
msgstr "Окно журнала" msgstr "Окно журнала"
#: ../src/option.c:1193 #: ../src/option.c:1197
#, c-format #, c-format
msgid "Unknown size type: %s\n" msgid "Unknown size type: %s\n"
msgstr "Неизвестный тип размера: %s\n" msgstr "Неизвестный тип размера: %s\n"
#: ../src/option.c:1235 #: ../src/option.c:1239
#, c-format #, c-format
msgid "Unknown completion type: %s\n" msgid "Unknown completion type: %s\n"
msgstr "Неизвестный тип дополнения: %s\n" msgstr "Неизвестный тип дополнения: %s\n"
#: ../src/option.c:1267 #: ../src/option.c:1271
#, c-format #, c-format
msgid "Unknown boolean format type: %s\n" msgid "Unknown boolean format type: %s\n"
msgstr "Неизвестный тип булевского формата: %s\n" msgstr "Неизвестный тип булевского формата: %s\n"
#: ../src/option.c:1283 #: ../src/option.c:1287
#, c-format #, c-format
msgid "Unknown grid lines type: %s\n" msgid "Unknown grid lines type: %s\n"
msgstr "Неизвестный тип разделительных линий: %s\n" msgstr "Неизвестный тип разделительных линий: %s\n"
#: ../src/option.c:1300 #: ../src/option.c:1304
#, c-format #, c-format
msgid "Unknown scrollbar policy type: %s\n" msgid "Unknown scrollbar policy type: %s\n"
msgstr "Неизвестный тип прокрутки: %s\n" msgstr "Неизвестный тип прокрутки: %s\n"
#: ../src/option.c:1353 #: ../src/option.c:1357
#, c-format #, c-format
msgid "Unknown smart Home/End mode: %s\n" msgid "Unknown smart Home/End mode: %s\n"
msgstr "Неизвестный режим умных Home/End: '%s'\n" msgstr "Неизвестный режим умных Home/End: '%s'\n"
#: ../src/option.c:1463 #: ../src/option.c:1467
#, c-format #, c-format
msgid "Unknown signal: %s\n" msgid "Unknown signal: %s\n"
msgstr "Неизвестный сигнал: %s\n" msgstr "Неизвестный сигнал: %s\n"
#: ../src/option.c:1697 #: ../src/option.c:1701
msgid "File exist. Overwrite?" msgid "File exist. Overwrite?"
msgstr "Файл существует. Перезаписать?" msgstr "Файл существует. Перезаписать?"
#: ../src/option.c:1889 #: ../src/option.c:1894
msgid "- Yet another dialoging program" msgid "- Yet another dialoging program"
msgstr "- Программа для отображения диалогов" msgstr "- Программа для отображения диалогов"
#. Adds general option entries #. Adds general option entries
#: ../src/option.c:1893 #: ../src/option.c:1898
msgid "General options" msgid "General options"
msgstr "Основные параметры" msgstr "Основные параметры"
#: ../src/option.c:1893 #: ../src/option.c:1898
msgid "Show general options" msgid "Show general options"
msgstr "Показывать основные параметры" msgstr "Показывать основные параметры"
#. Adds common option entries #. Adds common option entries
#: ../src/option.c:1899 #: ../src/option.c:1904
msgid "Common options" msgid "Common options"
msgstr "Общие параметры" msgstr "Общие параметры"
#: ../src/option.c:1899 #: ../src/option.c:1904
msgid "Show common options" msgid "Show common options"
msgstr "Показывать общие параметры диалогов" msgstr "Показывать общие параметры диалогов"
#. Adds about option entries #. Adds about option entries
#: ../src/option.c:1905 #: ../src/option.c:1910
msgid "About dialog options" msgid "About dialog options"
msgstr "Параметры диалога о программе" msgstr "Параметры диалога о программе"
#: ../src/option.c:1905 #: ../src/option.c:1910
msgid "Show custom about dialog options" msgid "Show custom about dialog options"
msgstr "Показывать параметры диалога о программе" msgstr "Показывать параметры диалога о программе"
#. Adds app option entries #. Adds app option entries
#: ../src/option.c:1911 #: ../src/option.c:1916
msgid "Application selection options" msgid "Application selection options"
msgstr "Параметры диалога выбора приложения" msgstr "Параметры диалога выбора приложения"
#: ../src/option.c:1911 #: ../src/option.c:1916
msgid "Show application selection options" msgid "Show application selection options"
msgstr "Показывать параметры диалога выбора приложения" msgstr "Показывать параметры диалога выбора приложения"
#. Adds calendar option entries #. Adds calendar option entries
#: ../src/option.c:1917 #: ../src/option.c:1922
msgid "Calendar options" msgid "Calendar options"
msgstr "Параметры календаря" msgstr "Параметры календаря"
#: ../src/option.c:1917 #: ../src/option.c:1922
msgid "Show calendar options" msgid "Show calendar options"
msgstr "Показывать параметры календаря" msgstr "Показывать параметры календаря"
#. Adds color option entries #. Adds color option entries
#: ../src/option.c:1923 #: ../src/option.c:1928
msgid "Color selection options" msgid "Color selection options"
msgstr "Параметры диалога выбора цвета" msgstr "Параметры диалога выбора цвета"
#: ../src/option.c:1923 #: ../src/option.c:1928
msgid "Show color selection options" msgid "Show color selection options"
msgstr "Показывать параметры диалога выбора цвета" msgstr "Показывать параметры диалога выбора цвета"
#. Adds dnd option entries #. Adds dnd option entries
#: ../src/option.c:1929 #: ../src/option.c:1934
msgid "DND options" msgid "DND options"
msgstr "Параметры DND" msgstr "Параметры DND"
#: ../src/option.c:1929 #: ../src/option.c:1934
msgid "Show drag-n-drop options" msgid "Show drag-n-drop options"
msgstr "Показывать параметры dnd" msgstr "Показывать параметры dnd"
#. Adds entry option entries #. Adds entry option entries
#: ../src/option.c:1935 #: ../src/option.c:1940
msgid "Text entry options" msgid "Text entry options"
msgstr "Параметры ввода текста" msgstr "Параметры ввода текста"
#: ../src/option.c:1935 #: ../src/option.c:1940
msgid "Show text entry options" msgid "Show text entry options"
msgstr "Показывать параметры ввода текста" msgstr "Показывать параметры ввода текста"
#. Adds file selection option entries #. Adds file selection option entries
#: ../src/option.c:1941 #: ../src/option.c:1946
msgid "File selection options" msgid "File selection options"
msgstr "Параметры диалога выбора файла" msgstr "Параметры диалога выбора файла"
#: ../src/option.c:1941 #: ../src/option.c:1946
msgid "Show file selection options" msgid "Show file selection options"
msgstr "Показывать параметры диалога выбора файлов" msgstr "Показывать параметры диалога выбора файлов"
#. Add font selection option entries #. Add font selection option entries
#: ../src/option.c:1947 #: ../src/option.c:1952
msgid "Font selection options" msgid "Font selection options"
msgstr "Параметры диалога выбора шрифта" msgstr "Параметры диалога выбора шрифта"
#: ../src/option.c:1947 #: ../src/option.c:1952
msgid "Show font selection options" msgid "Show font selection options"
msgstr "Показывать параметры диалога выбора шрифта" msgstr "Показывать параметры диалога выбора шрифта"
#. Add form option entries #. Add form option entries
#: ../src/option.c:1953 #: ../src/option.c:1958
msgid "Form options" msgid "Form options"
msgstr "Параметры диалога формы" msgstr "Параметры диалога формы"
#: ../src/option.c:1953 #: ../src/option.c:1958
msgid "Show form options" msgid "Show form options"
msgstr "Показывать параметры диалога формы" msgstr "Показывать параметры диалога формы"
#. Add html options entries #. Add html options entries
#: ../src/option.c:1960 #: ../src/option.c:1965
msgid "HTML options" msgid "HTML options"
msgstr "Параметры HTML диалога" msgstr "Параметры HTML диалога"
#: ../src/option.c:1960 #: ../src/option.c:1965
msgid "Show HTML options" msgid "Show HTML options"
msgstr "Показывать параметры HTML диалога" msgstr "Показывать параметры HTML диалога"
#. Add icons option entries #. Add icons option entries
#: ../src/option.c:1967 #: ../src/option.c:1972
msgid "Icons box options" msgid "Icons box options"
msgstr "Параметры диалога значков" msgstr "Параметры диалога значков"
#: ../src/option.c:1967 #: ../src/option.c:1972
msgid "Show icons box options" msgid "Show icons box options"
msgstr "Показывать параметры диалога значков быстрого доступа" msgstr "Показывать параметры диалога значков быстрого доступа"
#. Adds list option entries #. Adds list option entries
#: ../src/option.c:1973 #: ../src/option.c:1978
msgid "List options" msgid "List options"
msgstr "Параметры списка" msgstr "Параметры списка"
#: ../src/option.c:1973 #: ../src/option.c:1978
msgid "Show list options" msgid "Show list options"
msgstr "Показывать параметры списка" msgstr "Показывать параметры списка"
#. Adds notebook option entries #. Adds notebook option entries
#: ../src/option.c:1979 #: ../src/option.c:1984
msgid "Notebook options" msgid "Notebook options"
msgstr "Параметры диалога с вкладками" msgstr "Параметры диалога с вкладками"
#: ../src/option.c:1979 #: ../src/option.c:1984
msgid "Show notebook dialog options" msgid "Show notebook dialog options"
msgstr "Показывать параметры диалога с вкладками" msgstr "Показывать параметры диалога с вкладками"
#. Adds notification option entries #. Adds notification option entries
#: ../src/option.c:1986 #: ../src/option.c:1991
msgid "Notification icon options" msgid "Notification icon options"
msgstr "Параметры значка уведомления" msgstr "Параметры значка уведомления"
#: ../src/option.c:1987 #: ../src/option.c:1992
msgid "Show notification icon options" msgid "Show notification icon options"
msgstr "Показывать параметры значка уведомления" msgstr "Показывать параметры значка уведомления"
#. Adds paned option entries #. Adds paned option entries
#: ../src/option.c:1994 #: ../src/option.c:1999
msgid "Paned dialog options" msgid "Paned dialog options"
msgstr "Параметры диалога с панелями" msgstr "Параметры диалога с панелями"
#: ../src/option.c:1994 #: ../src/option.c:1999
msgid "Show paned dialog options" msgid "Show paned dialog options"
msgstr "Показывать параметры диалога с панелями" msgstr "Показывать параметры диалога с панелями"
#. Adds picture option entries #. Adds picture option entries
#: ../src/option.c:2000 #: ../src/option.c:2005
msgid "Picture dialog options" msgid "Picture dialog options"
msgstr "Параметры диалога показа картинки" msgstr "Параметры диалога показа картинки"
#: ../src/option.c:2000 #: ../src/option.c:2005
msgid "Show picture dialog options" msgid "Show picture dialog options"
msgstr "Показывать параметры диалога отображения картинки" msgstr "Показывать параметры диалога отображения картинки"
#. Adds print option entries #. Adds print option entries
#: ../src/option.c:2006 #: ../src/option.c:2011
msgid "Print dialog options" msgid "Print dialog options"
msgstr "Параметры диалога печати" msgstr "Параметры диалога печати"
#: ../src/option.c:2006 #: ../src/option.c:2011
msgid "Show print dialog options" msgid "Show print dialog options"
msgstr "Показывать параметры диалога печати" msgstr "Показывать параметры диалога печати"
#. Adds progress option entries #. Adds progress option entries
#: ../src/option.c:2012 #: ../src/option.c:2017
msgid "Progress options" msgid "Progress options"
msgstr "Параметры хода процесса" msgstr "Параметры хода процесса"
#: ../src/option.c:2012 #: ../src/option.c:2017
msgid "Show progress options" msgid "Show progress options"
msgstr "Показывать параметры хода процесса" msgstr "Показывать параметры хода процесса"
#. Adds scale option entries #. Adds scale option entries
#: ../src/option.c:2018 #: ../src/option.c:2023
msgid "Scale options" msgid "Scale options"
msgstr "Параметры масштаба" msgstr "Параметры масштаба"
#: ../src/option.c:2018 #: ../src/option.c:2023
msgid "Show scale options" msgid "Show scale options"
msgstr "Показывать параметры масштаба" msgstr "Показывать параметры масштаба"
#. Adds text option entries #. Adds text option entries
#: ../src/option.c:2024 #: ../src/option.c:2029
msgid "Text information options" msgid "Text information options"
msgstr "Параметры текстовой информации" msgstr "Параметры текстовой информации"
#: ../src/option.c:2024 #: ../src/option.c:2029
msgid "Show text information options" msgid "Show text information options"
msgstr "Показывать параметры текстовой информации" msgstr "Показывать параметры текстовой информации"
#. Adds sourceview option entries #. Adds sourceview option entries
#: ../src/option.c:2031 #: ../src/option.c:2036
msgid "SourceView options" msgid "SourceView options"
msgstr "Параметры SourceView" msgstr "Параметры SourceView"
#: ../src/option.c:2031 #: ../src/option.c:2036
msgid "Show SourceView options" msgid "Show SourceView options"
msgstr "Показывать параметры SourceView" msgstr "Показывать параметры SourceView"
#. Adds file filters option entries #. Adds file filters option entries
#: ../src/option.c:2038 #: ../src/option.c:2043
msgid "File filter options" msgid "File filter options"
msgstr "Параметры фильтров диалога выбора файла" msgstr "Параметры фильтров диалога выбора файла"
#: ../src/option.c:2038 #: ../src/option.c:2043
msgid "Show file filter options" msgid "Show file filter options"
msgstr "Показывать параметры фильтров диалога выбора файлов" msgstr "Показывать параметры фильтров диалога выбора файлов"
#. Adds miscellaneous option entries #. Adds miscellaneous option entries
#: ../src/option.c:2044 #: ../src/option.c:2049
msgid "Miscellaneous options" msgid "Miscellaneous options"
msgstr "Дополнительные параметры" msgstr "Дополнительные параметры"
#: ../src/option.c:2044 #: ../src/option.c:2049
msgid "Show miscellaneous options" msgid "Show miscellaneous options"
msgstr "Показывать дополнительные параметры" msgstr "Показывать дополнительные параметры"
...@@ -1909,7 +1915,23 @@ msgstr "Цвет" ...@@ -1909,7 +1915,23 @@ msgstr "Цвет"
msgid "Name" msgid "Name"
msgstr "Название" msgstr "Название"
#: ../src/text.c:535 #: ../src/text.c:278
msgid "Save _as..."
msgstr "Сохранить как..."
#: ../src/text.c:283
msgid "_Save"
msgstr "_Сохранить"
#: ../src/text.c:292
msgid "_Open..."
msgstr "_Открыть..."
#: ../src/text.c:302
msgid "_Quit"
msgstr "_Выход"
#: ../src/text.c:723
#, c-format #, c-format
msgid "Theme %s not found\n" msgid "Theme %s not found\n"
msgstr "Тема %s не найдена\n" msgstr "Тема %s не найдена\n"
......
...@@ -7,7 +7,7 @@ msgid "" ...@@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: YAD\n" "Project-Id-Version: YAD\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-04-17 16:19+0300\n" "POT-Creation-Date: 2021-04-18 09:24+0300\n"
"PO-Revision-Date: 2009-04-30 16:47+0300\n" "PO-Revision-Date: 2009-04-30 16:47+0300\n"
"Last-Translator: Victor Ananjevsky <ananasik@gmail.com>\n" "Last-Translator: Victor Ananjevsky <ananasik@gmail.com>\n"
"Language-Team: \n" "Language-Team: \n"
...@@ -45,7 +45,7 @@ msgstr "" ...@@ -45,7 +45,7 @@ msgstr ""
"Вбудована підтримка GtkSpell\n" "Вбудована підтримка GtkSpell\n"
"Використовується GTK+ %d.%d.%d\n" "Використовується GTK+ %d.%d.%d\n"
#: ../src/calendar.c:39 ../src/text.c:397 #: ../src/calendar.c:39 ../src/text.c:585
#, c-format #, c-format
msgid "Cannot open file '%s': %s\n" msgid "Cannot open file '%s': %s\n"
msgstr "Не можу відкрити файл %s: %s\n" msgstr "Не можу відкрити файл %s: %s\n"
...@@ -65,49 +65,51 @@ msgstr "Початкове значення - менше за мінімальн ...@@ -65,49 +65,51 @@ msgstr "Початкове значення - менше за мінімальн
msgid "Initial value greater than maximum.\n" msgid "Initial value greater than maximum.\n"
msgstr "Початкове значення - більше за максимальне.\n" msgstr "Початкове значення - більше за максимальне.\n"
#: ../src/form.c:453 #: ../src/form.c:455
msgid "Select files" msgid "Select files"
msgstr "Вибір файлу" msgstr "Вибір файлу"
#: ../src/form.c:456 ../src/form.c:464 ../src/form.c:543 ../src/form.c:551 #: ../src/form.c:458 ../src/form.c:466 ../src/form.c:545 ../src/form.c:553
#: ../src/form.c:602 ../src/html.c:175 ../src/html.c:207 ../src/util.c:40 #: ../src/form.c:604 ../src/html.c:175 ../src/html.c:207 ../src/text.c:160
#: ../src/text.c:225 ../src/util.c:40
msgid "Cancel" msgid "Cancel"
msgstr "Відміна" msgstr "Відміна"
#: ../src/form.c:457 ../src/form.c:465 ../src/form.c:544 ../src/form.c:552 #: ../src/form.c:459 ../src/form.c:467 ../src/form.c:546 ../src/form.c:554
#: ../src/form.c:603 ../src/html.c:174 ../src/util.c:46 #: ../src/form.c:605 ../src/html.c:174 ../src/text.c:161 ../src/text.c:226
#: ../src/util.c:46
msgid "OK" msgid "OK"
msgstr "OK" msgstr "OK"
#: ../src/form.c:461 #: ../src/form.c:463
msgid "Select folders" msgid "Select folders"
msgstr "Вибір каталогів" msgstr "Вибір каталогів"
#: ../src/form.c:540 #: ../src/form.c:542
msgid "Select or create file" msgid "Select or create file"
msgstr "Вибір або створення файлу" msgstr "Вибір або створення файлу"
#: ../src/form.c:548 #: ../src/form.c:550
msgid "Select or create folder" msgid "Select or create folder"
msgstr "Вибір або створення каталогу" msgstr "Вибір або створення каталогу"
#: ../src/form.c:599 #: ../src/form.c:601
msgid "Select date" msgid "Select date"
msgstr "Вибір дати" msgstr "Вибір дати"
#: ../src/form.c:912 #: ../src/form.c:960
msgid "Select file" msgid "Select file"
msgstr "Вибір файлу" msgstr "Вибір файлу"
#: ../src/form.c:942 #: ../src/form.c:990
msgid "Select folder" msgid "Select folder"
msgstr "Вибір каталогу" msgstr "Вибір каталогу"
#: ../src/form.c:1110 ../src/form.c:1112 #: ../src/form.c:1158 ../src/form.c:1160
msgid "Link" msgid "Link"
msgstr "Посилання" msgstr "Посилання"
#: ../src/html.c:171 #: ../src/html.c:171 ../src/text.c:157 ../src/text.c:222
msgid "YAD - Select File" msgid "YAD - Select File"
msgstr "YAD - Вибір файлу" msgstr "YAD - Вибір файлу"
...@@ -325,8 +327,8 @@ msgstr "Задати вирівнювання тексту діалогу (left, ...@@ -325,8 +327,8 @@ msgstr "Задати вирівнювання тексту діалогу (left,
#: ../src/option.c:225 ../src/option.c:370 ../src/option.c:397 #: ../src/option.c:225 ../src/option.c:370 ../src/option.c:397
#: ../src/option.c:453 ../src/option.c:463 ../src/option.c:509 #: ../src/option.c:453 ../src/option.c:463 ../src/option.c:509
#: ../src/option.c:541 ../src/option.c:553 ../src/option.c:563 #: ../src/option.c:541 ../src/option.c:553 ../src/option.c:563
#: ../src/option.c:577 ../src/option.c:638 ../src/option.c:685 #: ../src/option.c:577 ../src/option.c:638 ../src/option.c:687
#: ../src/option.c:712 ../src/option.c:714 ../src/tools.c:80 #: ../src/option.c:714 ../src/option.c:716 ../src/tools.c:80
msgid "TYPE" msgid "TYPE"
msgstr "ТИП" msgstr "ТИП"
...@@ -342,7 +344,7 @@ msgstr "ЗОБРАЖЕННЯ" ...@@ -342,7 +344,7 @@ msgstr "ЗОБРАЖЕННЯ"
msgid "Use specified icon theme instead of default" msgid "Use specified icon theme instead of default"
msgstr "Використовувати вказану тему іконок" msgstr "Використовувати вказану тему іконок"
#: ../src/option.c:118 ../src/option.c:663 ../src/browser.c:217 #: ../src/option.c:118 ../src/option.c:665 ../src/browser.c:217
#: ../src/tools.c:81 #: ../src/tools.c:81
msgid "THEME" msgid "THEME"
msgstr "ТЕМА" msgstr "ТЕМА"
...@@ -572,8 +574,8 @@ msgstr "Відобразити скриті файли у діалозі виб ...@@ -572,8 +574,8 @@ msgstr "Відобразити скриті файли у діалозі виб
msgid "Set source filename" msgid "Set source filename"
msgstr "Задати ім'я файлу" msgstr "Задати ім'я файлу"
#: ../src/option.c:217 ../src/option.c:284 ../src/option.c:710 #: ../src/option.c:217 ../src/option.c:284 ../src/option.c:712
#: ../src/option.c:722 #: ../src/option.c:724
msgid "FILENAME" msgid "FILENAME"
msgstr "НАЗВА ФАЙЛУ" msgstr "НАЗВА ФАЙЛУ"
...@@ -619,7 +621,7 @@ msgstr "Задати ім'я програми" ...@@ -619,7 +621,7 @@ msgstr "Задати ім'я програми"
#: ../src/option.c:243 ../src/option.c:245 ../src/option.c:247 #: ../src/option.c:243 ../src/option.c:245 ../src/option.c:247
#: ../src/option.c:257 ../src/option.c:401 ../src/option.c:526 #: ../src/option.c:257 ../src/option.c:401 ../src/option.c:526
#: ../src/option.c:708 #: ../src/option.c:710
msgid "STRING" msgid "STRING"
msgstr "РЯДОК" msgstr "РЯДОК"
...@@ -725,7 +727,7 @@ msgid "Set initial color value" ...@@ -725,7 +727,7 @@ msgid "Set initial color value"
msgstr "Задати початковий колір" msgstr "Задати початковий колір"
#: ../src/option.c:294 ../src/option.c:642 ../src/option.c:644 #: ../src/option.c:294 ../src/option.c:642 ../src/option.c:644
#: ../src/option.c:650 ../src/option.c:671 ../src/option.c:673 #: ../src/option.c:650 ../src/option.c:673 ../src/option.c:675
msgid "COLOR" msgid "COLOR"
msgstr "КОЛІР" msgstr "КОЛІР"
...@@ -1278,8 +1280,8 @@ msgid "Set initial value" ...@@ -1278,8 +1280,8 @@ msgid "Set initial value"
msgstr "Задати початкове значення" msgstr "Задати початкове значення"
#: ../src/option.c:608 ../src/option.c:610 ../src/option.c:612 #: ../src/option.c:608 ../src/option.c:610 ../src/option.c:612
#: ../src/option.c:614 ../src/option.c:618 ../src/option.c:681 #: ../src/option.c:614 ../src/option.c:618 ../src/option.c:683
#: ../src/option.c:683 #: ../src/option.c:685
msgid "VALUE" msgid "VALUE"
msgstr "ЗНАЧЕННЯ" msgstr "ЗНАЧЕННЯ"
...@@ -1371,448 +1373,452 @@ msgstr "Використовувати розмітку pango" ...@@ -1371,448 +1373,452 @@ msgstr "Використовувати розмітку pango"
msgid "Save file instead of print on exit" msgid "Save file instead of print on exit"
msgstr "Зберігати файл замість виводу на виході" msgstr "Зберігати файл замість виводу на виході"
#: ../src/option.c:661 #: ../src/option.c:656
msgid "Enable file operations"
msgstr "Дозволити файлові операції"
#: ../src/option.c:663
msgid "Use specified langauge for syntax highlighting" msgid "Use specified langauge for syntax highlighting"
msgstr "Використовувати вказану мову для підсвітки синтаксису" msgstr "Використовувати вказану мову для підсвітки синтаксису"
#: ../src/option.c:661 #: ../src/option.c:663
msgid "LANG" msgid "LANG"
msgstr "МОВА" msgstr "МОВА"
#: ../src/option.c:663 #: ../src/option.c:665
msgid "Use specified theme" msgid "Use specified theme"
msgstr "Використовувати вказану тему" msgstr "Використовувати вказану тему"
#: ../src/option.c:665 ../data/yad.gschema.xml.in.h:17 #: ../src/option.c:667 ../data/yad.gschema.xml.in.h:17
msgid "Show line numbers" msgid "Show line numbers"
msgstr "Відображати номера строк" msgstr "Відображати номера строк"
#: ../src/option.c:667 ../data/yad.gschema.xml.in.h:18 #: ../src/option.c:669 ../data/yad.gschema.xml.in.h:18
msgid "Highlight current line" msgid "Highlight current line"
msgstr "Виділяти активну строку" msgstr "Виділяти активну строку"
#: ../src/option.c:669 #: ../src/option.c:671
msgid "Enable line marks" msgid "Enable line marks"
msgstr "Дозволити позначки строк" msgstr "Дозволити позначки строк"
#: ../src/option.c:671 #: ../src/option.c:673
msgid "Set color for first type marks" msgid "Set color for first type marks"
msgstr "Задати колір для поміток першого типу" msgstr "Задати колір для поміток першого типу"
#: ../src/option.c:673 #: ../src/option.c:675
msgid "Set color for second type marks" msgid "Set color for second type marks"
msgstr "Задати колір для поміток другого типу" msgstr "Задати колір для поміток другого типу"
#: ../src/option.c:675 #: ../src/option.c:677
msgid "Set position of right margin" msgid "Set position of right margin"
msgstr "Задати позицію правого поля" msgstr "Задати позицію правого поля"
#: ../src/option.c:675 #: ../src/option.c:677
msgid "[POS]" msgid "[POS]"
msgstr "[ПОЗИЦІЯ]" msgstr "[ПОЗИЦІЯ]"
#: ../src/option.c:677 ../data/yad.gschema.xml.in.h:23 #: ../src/option.c:679 ../data/yad.gschema.xml.in.h:23
msgid "Highlight matching brackets" msgid "Highlight matching brackets"
msgstr "Виділяти відповідні дужки" msgstr "Виділяти відповідні дужки"
#: ../src/option.c:679 ../data/yad.gschema.xml.in.h:24 #: ../src/option.c:681 ../data/yad.gschema.xml.in.h:24
msgid "Use autoindent" msgid "Use autoindent"
msgstr "Використовувати автовирівнювання" msgstr "Використовувати автовирівнювання"
#: ../src/option.c:681 #: ../src/option.c:683
msgid "Set tabulation width" msgid "Set tabulation width"
msgstr "Задати ширину табуляції" msgstr "Задати ширину табуляції"
#: ../src/option.c:683 #: ../src/option.c:685
msgid "Set indentation width" msgid "Set indentation width"
msgstr "Задати ширину вирівнювання" msgstr "Задати ширину вирівнювання"
#: ../src/option.c:685 #: ../src/option.c:687
msgid "Set smart Home/End behavior" msgid "Set smart Home/End behavior"
msgstr "Задати поведінку розумних Home/End" msgstr "Задати поведінку розумних Home/End"
#: ../src/option.c:687 #: ../src/option.c:689
msgid "Enable smart backspace" msgid "Enable smart backspace"
msgstr "Використовувати розумній backspace" msgstr "Використовувати розумній backspace"
#: ../src/option.c:689 ../data/yad.gschema.xml.in.h:29 #: ../src/option.c:691 ../data/yad.gschema.xml.in.h:29
msgid "Insert spaces instead of tabs" msgid "Insert spaces instead of tabs"
msgstr "Вставляти пробіл замість табуляції" msgstr "Вставляти пробіл замість табуляції"
#: ../src/option.c:696 #: ../src/option.c:698
msgid "Sets a filename filter" msgid "Sets a filename filter"
msgstr "Задати фільтр файлів по масці" msgstr "Задати фільтр файлів по масці"
#: ../src/option.c:696 #: ../src/option.c:698
msgid "NAME | PATTERN1 PATTERN2 ..." msgid "NAME | PATTERN1 PATTERN2 ..."
msgstr "НАЗВА | ШАБЛОН1 ШАБЛОН2 ..." msgstr "НАЗВА | ШАБЛОН1 ШАБЛОН2 ..."
#: ../src/option.c:698 #: ../src/option.c:700
msgid "Sets a mime-type filter" msgid "Sets a mime-type filter"
msgstr "Задати фільтр файлів по типу mime" msgstr "Задати фільтр файлів по типу mime"
#: ../src/option.c:698 #: ../src/option.c:700
msgid "NAME | MIME1 MIME2 ..." msgid "NAME | MIME1 MIME2 ..."
msgstr "НАЗВА | ТИП1 ТИП2 ..." msgstr "НАЗВА | ТИП1 ТИП2 ..."
#: ../src/option.c:700 #: ../src/option.c:702
msgid "Add filter for images" msgid "Add filter for images"
msgstr "Додати фільтр для зображень" msgstr "Додати фільтр для зображень"
#: ../src/option.c:700 #: ../src/option.c:702
msgid "[NAME]" msgid "[NAME]"
msgstr "[ІМ'Я]" msgstr "[ІМ'Я]"
#: ../src/option.c:706 ../src/tools.c:59 #: ../src/option.c:708 ../src/tools.c:59
msgid "Print version" msgid "Print version"
msgstr "Вивести версію" msgstr "Вивести версію"
#: ../src/option.c:708 #: ../src/option.c:710
msgid "Load additional CSS settings from file or string" msgid "Load additional CSS settings from file or string"
msgstr "Завантажити додаткові налаштування CSS з файлу або строки" msgstr "Завантажити додаткові налаштування CSS з файлу або строки"
#: ../src/option.c:710 #: ../src/option.c:712
msgid "Load additional CSS settings from file" msgid "Load additional CSS settings from file"
msgstr "Завантажити додаткові налаштування CSS з файлу" msgstr "Завантажити додаткові налаштування CSS з файлу"
#: ../src/option.c:712 #: ../src/option.c:714
msgid "Set policy for horizontal scrollbars (auto, always, never)" msgid "Set policy for horizontal scrollbars (auto, always, never)"
msgstr "Задати тип горизонтальної прокрутки (auto, always, never)" msgstr "Задати тип горизонтальної прокрутки (auto, always, never)"
#: ../src/option.c:714 #: ../src/option.c:716
msgid "Set policy for vertical scrollbars (auto, always, never)" msgid "Set policy for vertical scrollbars (auto, always, never)"
msgstr "Задати тип вертикальної прокрутки (auto, always, never)" msgstr "Задати тип вертикальної прокрутки (auto, always, never)"
#: ../src/option.c:716 #: ../src/option.c:718
msgid "Add path for search icons by name" msgid "Add path for search icons by name"
msgstr "Додати каталог для пошуку іконок" msgstr "Додати каталог для пошуку іконок"
#: ../src/option.c:716 #: ../src/option.c:718
msgid "PATH" msgid "PATH"
msgstr "КАТАЛОГ" msgstr "КАТАЛОГ"
#: ../src/option.c:722 #: ../src/option.c:724
msgid "Load extra arguments from file" msgid "Load extra arguments from file"
msgstr "Завантажити додаткові аргументи з файлу" msgstr "Завантажити додаткові аргументи з файлу"
#: ../src/option.c:927 #: ../src/option.c:931
#, c-format #, c-format
msgid "Mark %s doesn't have a value\n" msgid "Mark %s doesn't have a value\n"
msgstr "Помітці %s не надано значення\n" msgstr "Помітці %s не надано значення\n"
#: ../src/option.c:964 #: ../src/option.c:968
msgid "Images" msgid "Images"
msgstr "Зображення" msgstr "Зображення"
#: ../src/option.c:1029 #: ../src/option.c:1033
#, c-format #, c-format
msgid "Unknown color mode: %s\n" msgid "Unknown color mode: %s\n"
msgstr "Невідомий режим кольору: '%s'\n" msgstr "Невідомий режим кольору: '%s'\n"
#: ../src/option.c:1048 #: ../src/option.c:1052
#, c-format #, c-format
msgid "Unknown buttons layout type: %s\n" msgid "Unknown buttons layout type: %s\n"
msgstr "Невідомий тип розміщення кнопок: %s\n" msgstr "Невідомий тип розміщення кнопок: %s\n"
#: ../src/option.c:1063 #: ../src/option.c:1067
#, c-format #, c-format
msgid "Unknown align type: %s\n" msgid "Unknown align type: %s\n"
msgstr "Невідомий тип вирівнювання: %s\n" msgstr "Невідомий тип вирівнювання: %s\n"
#: ../src/option.c:1087 #: ../src/option.c:1091
#, c-format #, c-format
msgid "Unknown justification type: %s\n" msgid "Unknown justification type: %s\n"
msgstr "Невідомий тип вирівнювання: %s\n" msgstr "Невідомий тип вирівнювання: %s\n"
#: ../src/option.c:1104 #: ../src/option.c:1108
#, c-format #, c-format
msgid "Unknown tab position type: %s\n" msgid "Unknown tab position type: %s\n"
msgstr "Невідомий тип позиції вкладки: %s\n" msgstr "Невідомий тип позиції вкладки: %s\n"
#: ../src/option.c:1141 #: ../src/option.c:1145
#, c-format #, c-format
msgid "Unknown ellipsize type: %s\n" msgid "Unknown ellipsize type: %s\n"
msgstr "Невідомий тип урізання: %s\n" msgstr "Невідомий тип урізання: %s\n"
#: ../src/option.c:1154 #: ../src/option.c:1158
#, c-format #, c-format
msgid "Unknown orientation: %s\n" msgid "Unknown orientation: %s\n"
msgstr "Невідома орієнтація: %s\n" msgstr "Невідома орієнтація: %s\n"
#: ../src/option.c:1169 #: ../src/option.c:1173
#, c-format #, c-format
msgid "Unknown source type: %s\n" msgid "Unknown source type: %s\n"
msgstr "Невідомий тип даних: %s\n" msgstr "Невідомий тип даних: %s\n"
#: ../src/option.c:1180 #: ../src/option.c:1184
msgid "Progress log" msgid "Progress log"
msgstr "Вікно журналу" msgstr "Вікно журналу"
#: ../src/option.c:1193 #: ../src/option.c:1197
#, c-format #, c-format
msgid "Unknown size type: %s\n" msgid "Unknown size type: %s\n"
msgstr "Невідомий тип розміру: %s\n" msgstr "Невідомий тип розміру: %s\n"
#: ../src/option.c:1235 #: ../src/option.c:1239
#, c-format #, c-format
msgid "Unknown completion type: %s\n" msgid "Unknown completion type: %s\n"
msgstr "Невідомий тип доповнення: %s\n" msgstr "Невідомий тип доповнення: %s\n"
#: ../src/option.c:1267 #: ../src/option.c:1271
#, c-format #, c-format
msgid "Unknown boolean format type: %s\n" msgid "Unknown boolean format type: %s\n"
msgstr "Невідомий тип булєвських значень: %s\n" msgstr "Невідомий тип булєвських значень: %s\n"
#: ../src/option.c:1283 #: ../src/option.c:1287
#, c-format #, c-format
msgid "Unknown grid lines type: %s\n" msgid "Unknown grid lines type: %s\n"
msgstr "Невідомий тип розподільних ліній: %s\n" msgstr "Невідомий тип розподільних ліній: %s\n"
#: ../src/option.c:1300 #: ../src/option.c:1304
#, c-format #, c-format
msgid "Unknown scrollbar policy type: %s\n" msgid "Unknown scrollbar policy type: %s\n"
msgstr "Невідомий тип прокрутки: %s\n" msgstr "Невідомий тип прокрутки: %s\n"
#: ../src/option.c:1353 #: ../src/option.c:1357
#, c-format #, c-format
msgid "Unknown smart Home/End mode: %s\n" msgid "Unknown smart Home/End mode: %s\n"
msgstr "Невідомий режим розумних Home/End: '%s'\n" msgstr "Невідомий режим розумних Home/End: '%s'\n"
#: ../src/option.c:1463 #: ../src/option.c:1467
#, c-format #, c-format
msgid "Unknown signal: %s\n" msgid "Unknown signal: %s\n"
msgstr "Невідомий сигнал: %s\n" msgstr "Невідомий сигнал: %s\n"
#: ../src/option.c:1697 #: ../src/option.c:1701
msgid "File exist. Overwrite?" msgid "File exist. Overwrite?"
msgstr "Файл існує. Перезаписати?" msgstr "Файл існує. Перезаписати?"
#: ../src/option.c:1889 #: ../src/option.c:1894
msgid "- Yet another dialoging program" msgid "- Yet another dialoging program"
msgstr "- Програма для відображення діалогів" msgstr "- Програма для відображення діалогів"
#. Adds general option entries #. Adds general option entries
#: ../src/option.c:1893 #: ../src/option.c:1898
msgid "General options" msgid "General options"
msgstr "Основні параметри" msgstr "Основні параметри"
#: ../src/option.c:1893 #: ../src/option.c:1898
msgid "Show general options" msgid "Show general options"
msgstr "Показувати основні параметри" msgstr "Показувати основні параметри"
#. Adds common option entries #. Adds common option entries
#: ../src/option.c:1899 #: ../src/option.c:1904
msgid "Common options" msgid "Common options"
msgstr "Загальні параметри" msgstr "Загальні параметри"
#: ../src/option.c:1899 #: ../src/option.c:1904
msgid "Show common options" msgid "Show common options"
msgstr "Показувати загальні параметри діалогів" msgstr "Показувати загальні параметри діалогів"
#. Adds about option entries #. Adds about option entries
#: ../src/option.c:1905 #: ../src/option.c:1910
msgid "About dialog options" msgid "About dialog options"
msgstr "Параметри діалогу о програмі" msgstr "Параметри діалогу о програмі"
#: ../src/option.c:1905 #: ../src/option.c:1910
msgid "Show custom about dialog options" msgid "Show custom about dialog options"
msgstr "Показувати параметри діалогу о програмі" msgstr "Показувати параметри діалогу о програмі"
#. Adds app option entries #. Adds app option entries
#: ../src/option.c:1911 #: ../src/option.c:1916
msgid "Application selection options" msgid "Application selection options"
msgstr "Параметри діалогу вибору додатка" msgstr "Параметри діалогу вибору додатка"
#: ../src/option.c:1911 #: ../src/option.c:1916
msgid "Show application selection options" msgid "Show application selection options"
msgstr "Показувати параметри діалоги вибору додатка" msgstr "Показувати параметри діалоги вибору додатка"
#. Adds calendar option entries #. Adds calendar option entries
#: ../src/option.c:1917 #: ../src/option.c:1922
msgid "Calendar options" msgid "Calendar options"
msgstr "Параметри календаря" msgstr "Параметри календаря"
#: ../src/option.c:1917 #: ../src/option.c:1922
msgid "Show calendar options" msgid "Show calendar options"
msgstr "Показувати параметри календаря" msgstr "Показувати параметри календаря"
#. Adds color option entries #. Adds color option entries
#: ../src/option.c:1923 #: ../src/option.c:1928
msgid "Color selection options" msgid "Color selection options"
msgstr "Параметри діалогу вибору кольору" msgstr "Параметри діалогу вибору кольору"
#: ../src/option.c:1923 #: ../src/option.c:1928
msgid "Show color selection options" msgid "Show color selection options"
msgstr "Показувати параметри діалогу вибору кольору" msgstr "Показувати параметри діалогу вибору кольору"
#. Adds dnd option entries #. Adds dnd option entries
#: ../src/option.c:1929 #: ../src/option.c:1934
msgid "DND options" msgid "DND options"
msgstr "Параметри DND" msgstr "Параметри DND"
#: ../src/option.c:1929 #: ../src/option.c:1934
msgid "Show drag-n-drop options" msgid "Show drag-n-drop options"
msgstr "Показувати параметри dnd" msgstr "Показувати параметри dnd"
#. Adds entry option entries #. Adds entry option entries
#: ../src/option.c:1935 #: ../src/option.c:1940
msgid "Text entry options" msgid "Text entry options"
msgstr "Параметри вводу тексту" msgstr "Параметри вводу тексту"
#: ../src/option.c:1935 #: ../src/option.c:1940
msgid "Show text entry options" msgid "Show text entry options"
msgstr "Показувати параметри вводу тексту" msgstr "Показувати параметри вводу тексту"
#. Adds file selection option entries #. Adds file selection option entries
#: ../src/option.c:1941 #: ../src/option.c:1946
msgid "File selection options" msgid "File selection options"
msgstr "Параметри діалогу вибору файлів" msgstr "Параметри діалогу вибору файлів"
#: ../src/option.c:1941 #: ../src/option.c:1946
msgid "Show file selection options" msgid "Show file selection options"
msgstr "Показувати параметри діалогу вибору файлів" msgstr "Показувати параметри діалогу вибору файлів"
#. Add font selection option entries #. Add font selection option entries
#: ../src/option.c:1947 #: ../src/option.c:1952
msgid "Font selection options" msgid "Font selection options"
msgstr "Параметри діалогу вибору шрифту" msgstr "Параметри діалогу вибору шрифту"
#: ../src/option.c:1947 #: ../src/option.c:1952
msgid "Show font selection options" msgid "Show font selection options"
msgstr "Показувати параметри діалоги вибору шрифту" msgstr "Показувати параметри діалоги вибору шрифту"
#. Add form option entries #. Add form option entries
#: ../src/option.c:1953 #: ../src/option.c:1958
msgid "Form options" msgid "Form options"
msgstr "Параметри діалогу форми" msgstr "Параметри діалогу форми"
#: ../src/option.c:1953 #: ../src/option.c:1958
msgid "Show form options" msgid "Show form options"
msgstr "Показувати параметри діалогу форми" msgstr "Показувати параметри діалогу форми"
#. Add html options entries #. Add html options entries
#: ../src/option.c:1960 #: ../src/option.c:1965
msgid "HTML options" msgid "HTML options"
msgstr "Параметри HTML діалогу" msgstr "Параметри HTML діалогу"
#: ../src/option.c:1960 #: ../src/option.c:1965
msgid "Show HTML options" msgid "Show HTML options"
msgstr "Показувати параметри HTML діалогу" msgstr "Показувати параметри HTML діалогу"
#. Add icons option entries #. Add icons option entries
#: ../src/option.c:1967 #: ../src/option.c:1972
msgid "Icons box options" msgid "Icons box options"
msgstr "Параметри діалогу іконок" msgstr "Параметри діалогу іконок"
#: ../src/option.c:1967 #: ../src/option.c:1972
msgid "Show icons box options" msgid "Show icons box options"
msgstr "Показувати параметри діалогу іконок швидкого доступу" msgstr "Показувати параметри діалогу іконок швидкого доступу"
#. Adds list option entries #. Adds list option entries
#: ../src/option.c:1973 #: ../src/option.c:1978
msgid "List options" msgid "List options"
msgstr "Параметри списку" msgstr "Параметри списку"
#: ../src/option.c:1973 #: ../src/option.c:1978
msgid "Show list options" msgid "Show list options"
msgstr "Показувати параметри списку" msgstr "Показувати параметри списку"
#. Adds notebook option entries #. Adds notebook option entries
#: ../src/option.c:1979 #: ../src/option.c:1984
msgid "Notebook options" msgid "Notebook options"
msgstr "Параметри діалогу з вкладками" msgstr "Параметри діалогу з вкладками"
#: ../src/option.c:1979 #: ../src/option.c:1984
msgid "Show notebook dialog options" msgid "Show notebook dialog options"
msgstr "Показувати параметри діалогу з вкладками" msgstr "Показувати параметри діалогу з вкладками"
#. Adds notification option entries #. Adds notification option entries
#: ../src/option.c:1986 #: ../src/option.c:1991
msgid "Notification icon options" msgid "Notification icon options"
msgstr "Параметри іконки повідомлень" msgstr "Параметри іконки повідомлень"
#: ../src/option.c:1987 #: ../src/option.c:1992
msgid "Show notification icon options" msgid "Show notification icon options"
msgstr "Показувати параметри іконки повідомлень" msgstr "Показувати параметри іконки повідомлень"
#. Adds paned option entries #. Adds paned option entries
#: ../src/option.c:1994 #: ../src/option.c:1999
msgid "Paned dialog options" msgid "Paned dialog options"
msgstr "Параметри діалогу з панелями" msgstr "Параметри діалогу з панелями"
#: ../src/option.c:1994 #: ../src/option.c:1999
msgid "Show paned dialog options" msgid "Show paned dialog options"
msgstr "Показувати параметри діалогу з панелями" msgstr "Показувати параметри діалогу з панелями"
#. Adds picture option entries #. Adds picture option entries
#: ../src/option.c:2000 #: ../src/option.c:2005
msgid "Picture dialog options" msgid "Picture dialog options"
msgstr "Параметри діалогу з картинкою" msgstr "Параметри діалогу з картинкою"
#: ../src/option.c:2000 #: ../src/option.c:2005
msgid "Show picture dialog options" msgid "Show picture dialog options"
msgstr "Показувати параметри діалогу відображення картинки" msgstr "Показувати параметри діалогу відображення картинки"
#. Adds print option entries #. Adds print option entries
#: ../src/option.c:2006 #: ../src/option.c:2011
msgid "Print dialog options" msgid "Print dialog options"
msgstr "Параметри діалогу друку" msgstr "Параметри діалогу друку"
#: ../src/option.c:2006 #: ../src/option.c:2011
msgid "Show print dialog options" msgid "Show print dialog options"
msgstr "Показувати параметри діалогу друку" msgstr "Показувати параметри діалогу друку"
#. Adds progress option entries #. Adds progress option entries
#: ../src/option.c:2012 #: ../src/option.c:2017
msgid "Progress options" msgid "Progress options"
msgstr "Параметри прогресу" msgstr "Параметри прогресу"
#: ../src/option.c:2012 #: ../src/option.c:2017
msgid "Show progress options" msgid "Show progress options"
msgstr "Показувати параметри прогресу" msgstr "Показувати параметри прогресу"
#. Adds scale option entries #. Adds scale option entries
#: ../src/option.c:2018 #: ../src/option.c:2023
msgid "Scale options" msgid "Scale options"
msgstr "Параметри масштабу" msgstr "Параметри масштабу"
#: ../src/option.c:2018 #: ../src/option.c:2023
msgid "Show scale options" msgid "Show scale options"
msgstr "Показувати параметри масштабу" msgstr "Показувати параметри масштабу"
#. Adds text option entries #. Adds text option entries
#: ../src/option.c:2024 #: ../src/option.c:2029
msgid "Text information options" msgid "Text information options"
msgstr "Параметри текстової інформації" msgstr "Параметри текстової інформації"
#: ../src/option.c:2024 #: ../src/option.c:2029
msgid "Show text information options" msgid "Show text information options"
msgstr "Показувати параметри текстової інформації" msgstr "Показувати параметри текстової інформації"
#. Adds sourceview option entries #. Adds sourceview option entries
#: ../src/option.c:2031 #: ../src/option.c:2036
msgid "SourceView options" msgid "SourceView options"
msgstr "Параметри SourceView" msgstr "Параметри SourceView"
#: ../src/option.c:2031 #: ../src/option.c:2036
msgid "Show SourceView options" msgid "Show SourceView options"
msgstr "Показувати параметри SourceView" msgstr "Показувати параметри SourceView"
#. Adds file filters option entries #. Adds file filters option entries
#: ../src/option.c:2038 #: ../src/option.c:2043
msgid "File filter options" msgid "File filter options"
msgstr "Параметри фільтрів для діалогу вибору файлів" msgstr "Параметри фільтрів для діалогу вибору файлів"
#: ../src/option.c:2038 #: ../src/option.c:2043
msgid "Show file filter options" msgid "Show file filter options"
msgstr "Показувати параметри фільтрів для діалогу вибору файлів" msgstr "Показувати параметри фільтрів для діалогу вибору файлів"
#. Adds miscellaneous option entries #. Adds miscellaneous option entries
#: ../src/option.c:2044 #: ../src/option.c:2049
msgid "Miscellaneous options" msgid "Miscellaneous options"
msgstr "Додаткові параметри" msgstr "Додаткові параметри"
#: ../src/option.c:2044 #: ../src/option.c:2049
msgid "Show miscellaneous options" msgid "Show miscellaneous options"
msgstr "Показувати додаткові параметри" msgstr "Показувати додаткові параметри"
...@@ -1915,7 +1921,23 @@ msgstr "Колір" ...@@ -1915,7 +1921,23 @@ msgstr "Колір"
msgid "Name" msgid "Name"
msgstr "Назва" msgstr "Назва"
#: ../src/text.c:535 #: ../src/text.c:278
msgid "Save _as..."
msgstr "Зберегти _як..."
#: ../src/text.c:283
msgid "_Save"
msgstr "_Зберегти"
#: ../src/text.c:292
msgid "_Open..."
msgstr "_Відкрити..."
#: ../src/text.c:302
msgid "_Quit"
msgstr "В_ихід"
#: ../src/text.c:723
#, c-format #, c-format
msgid "Theme %s not found\n" msgid "Theme %s not found\n"
msgstr "Теми %s не знайдено\n" msgstr "Теми %s не знайдено\n"
......
...@@ -652,6 +652,8 @@ static GOptionEntry text_options[] = { ...@@ -652,6 +652,8 @@ static GOptionEntry text_options[] = {
N_("Use pango markup"), NULL }, N_("Use pango markup"), NULL },
{ "in-place", 0, 0, G_OPTION_ARG_NONE, &options.text_data.in_place, { "in-place", 0, 0, G_OPTION_ARG_NONE, &options.text_data.in_place,
N_("Save file instead of print on exit"), NULL }, N_("Save file instead of print on exit"), NULL },
{ "file-op", 0, 0, G_OPTION_ARG_NONE, &options.text_data.file_op,
N_("Enable file operations"), NULL },
{ NULL } { NULL }
}; };
...@@ -1844,6 +1846,7 @@ yad_options_init (void) ...@@ -1844,6 +1846,7 @@ yad_options_init (void)
#endif #endif
options.text_data.formatted = FALSE; options.text_data.formatted = FALSE;
options.text_data.in_place = FALSE; options.text_data.in_place = FALSE;
options.text_data.file_op = FALSE;
#ifdef HAVE_SOURCEVIEW #ifdef HAVE_SOURCEVIEW
/* Initialize sourceview data */ /* Initialize sourceview data */
......
...@@ -142,14 +142,202 @@ show_search () ...@@ -142,14 +142,202 @@ show_search ()
gdk_event_free (fev); gdk_event_free (fev);
} }
/* early prototype for use in open_file_cb() */
static void fill_buffer_from_file ();
static void
open_file_cb (GtkWidget *w, gpointer d)
{
GtkWidget *dlg;
static gchar *dir = NULL;
if (!dir && options.common_data.uri)
dir = g_path_get_dirname (options.common_data.uri);
dlg = gtk_file_chooser_dialog_new (_("YAD - Select File"),
GTK_WINDOW (gtk_widget_get_toplevel (text_view)),
GTK_FILE_CHOOSER_ACTION_OPEN,
_("Cancel"), GTK_RESPONSE_CANCEL,
_("OK"), GTK_RESPONSE_ACCEPT,
NULL);
if (dir)
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dlg), dir);
if (gtk_dialog_run (GTK_DIALOG (dlg)) == GTK_RESPONSE_ACCEPT)
{
/* set new filename and load it */
if (options.common_data.uri)
g_free (options.common_data.uri);
options.common_data.uri = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dlg));
fill_buffer_from_file ();
/* keep current dir */
g_free (dir);
dir = gtk_file_chooser_get_current_folder (GTK_FILE_CHOOSER (dlg));
}
gtk_widget_destroy (dlg);
}
static void
save_file_cb (GtkWidget *w, gpointer d)
{
GtkTextIter start, end;
gchar *text;
GStatBuf st;
gint mode = -1;
GError *err = NULL;
gtk_text_buffer_get_bounds (GTK_TEXT_BUFFER (text_buffer), &start, &end);
text = gtk_text_buffer_get_text (GTK_TEXT_BUFFER (text_buffer), &start, &end, 0);
/* g_file_set_contents changes the file permissions. so it must be kept and restore after file saving */
if (g_stat (options.common_data.uri, &st) == 0)
mode = st.st_mode;
if (!g_file_set_contents (options.common_data.uri, text, -1, &err))
{
g_printerr ("Cannot save file %s: %s\n", options.common_data.uri, err->message);
g_error_free (err);
}
else
{
/* restore permissions */
if (mode != -1)
g_chmod (options.common_data.uri, st.st_mode);
}
g_free (text);
}
static void
save_as_file_cb (GtkWidget *w, gpointer d)
{
GtkWidget *dlg;
static gchar *dir = NULL;
if (!dir && options.common_data.uri)
dir = g_path_get_dirname (options.common_data.uri);
dlg = gtk_file_chooser_dialog_new (_("YAD - Select File"),
GTK_WINDOW (gtk_widget_get_toplevel (text_view)),
GTK_FILE_CHOOSER_ACTION_SAVE,
_("Cancel"), GTK_RESPONSE_CANCEL,
_("OK"), GTK_RESPONSE_ACCEPT,
NULL);
gtk_file_chooser_set_create_folders (GTK_FILE_CHOOSER (dlg), TRUE);
if (dir)
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dlg), dir);
if (options.common_data.uri)
gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (dlg), options.common_data.uri);
else
gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dlg), "Untitled.txt");
if (gtk_dialog_run (GTK_DIALOG (dlg)) == GTK_RESPONSE_ACCEPT)
{
/* set new filename and save it */
if (options.common_data.uri)
g_free (options.common_data.uri);
options.common_data.uri = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dlg));
save_file_cb (w, d);
/* keep current dir */
g_free (dir);
dir = gtk_file_chooser_get_current_folder (GTK_FILE_CHOOSER (dlg));
}
gtk_widget_destroy (dlg);
}
static void
quit_cb (GtkWidget *w, gpointer d)
{
yad_exit (options.data.def_resp);
}
static void
menu_popup_cb (GtkTextView *w, GtkWidget *popup, gpointer d)
{
if (!GTK_IS_MENU (popup))
return;
if (options.text_data.file_op)
{
GtkWidget *mitem;
/* on top */
mitem = gtk_separator_menu_item_new ();
gtk_menu_shell_prepend (GTK_MENU_SHELL (popup), mitem);
gtk_widget_show (mitem);
if (options.common_data.editable)
{
mitem = gtk_menu_item_new_with_mnemonic (_("Save _as..."));
gtk_menu_shell_prepend (GTK_MENU_SHELL (popup), mitem);
g_signal_connect (G_OBJECT (mitem), "activate", G_CALLBACK (save_as_file_cb), NULL);
gtk_widget_show (mitem);
mitem = gtk_menu_item_new_with_mnemonic (_("_Save"));
gtk_menu_shell_prepend (GTK_MENU_SHELL (popup), mitem);
g_signal_connect (G_OBJECT (mitem), "activate", G_CALLBACK (save_file_cb), NULL);
gtk_widget_show (mitem);
if (!options.common_data.uri)
gtk_widget_set_sensitive (mitem, FALSE);
}
mitem = gtk_menu_item_new_with_mnemonic (_("_Open..."));
gtk_menu_shell_prepend (GTK_MENU_SHELL (popup), mitem);
g_signal_connect (G_OBJECT (mitem), "activate", G_CALLBACK (open_file_cb), NULL);
gtk_widget_show (mitem);
/* at bootom */
mitem = gtk_separator_menu_item_new ();
gtk_menu_shell_append (GTK_MENU_SHELL (popup), mitem);
gtk_widget_show (mitem);
mitem = gtk_menu_item_new_with_mnemonic (_("_Quit"));
gtk_menu_shell_append (GTK_MENU_SHELL (popup), mitem);
g_signal_connect (G_OBJECT (mitem), "activate", G_CALLBACK (quit_cb), NULL);
gtk_widget_show (mitem);
}
}
static gboolean static gboolean
key_press_cb (GtkWidget * w, GdkEventKey * key, gpointer data) key_press_cb (GtkWidget *w, GdkEventKey *key, gpointer d)
{ {
if ((key->state & GDK_CONTROL_MASK) && (key->keyval == GDK_KEY_F || key->keyval == GDK_KEY_f)) if ((key->state & GDK_CONTROL_MASK) && (key->keyval == GDK_KEY_F || key->keyval == GDK_KEY_f))
{ {
show_search (); show_search ();
return TRUE; return TRUE;
} }
else if (options.text_data.file_op)
{
if ((key->state & GDK_CONTROL_MASK) && (key->keyval == GDK_KEY_O || key->keyval == GDK_KEY_o))
{
open_file_cb (NULL, NULL);
return TRUE;
}
else if ((key->state & GDK_CONTROL_MASK) && (key->keyval == GDK_KEY_S || key->keyval == GDK_KEY_s))
{
save_file_cb (NULL, NULL);
return TRUE;
}
else if ((key->state & GDK_CONTROL_MASK) && (key->state & GDK_SHIFT_MASK) &&
(key->keyval == GDK_KEY_S || key->keyval == GDK_KEY_s))
{
save_as_file_cb (NULL, NULL);
return TRUE;
}
else if ((key->state & GDK_CONTROL_MASK) && (key->keyval == GDK_KEY_Q || key->keyval == GDK_KEY_q))
{
quit_cb (NULL, NULL);
return TRUE;
}
}
return FALSE; return FALSE;
} }
...@@ -499,7 +687,7 @@ text_create_widget (GtkWidget * dlg) ...@@ -499,7 +687,7 @@ text_create_widget (GtkWidget * dlg)
} }
#ifdef HAVE_SOURCEVIEW #ifdef HAVE_SOURCEVIEW
if (options.source_data.theme) if (options.source_data.theme && *options.source_data.theme)
{ {
GtkSourceStyleScheme *scheme = NULL; GtkSourceStyleScheme *scheme = NULL;
GtkSourceStyleSchemeManager *mgr; GtkSourceStyleSchemeManager *mgr;
...@@ -590,6 +778,9 @@ text_create_widget (GtkWidget * dlg) ...@@ -590,6 +778,9 @@ text_create_widget (GtkWidget * dlg)
/* Add keyboard handler */ /* Add keyboard handler */
g_signal_connect (text_view, "key-press-event", G_CALLBACK (key_press_cb), dlg); g_signal_connect (text_view, "key-press-event", G_CALLBACK (key_press_cb), dlg);
if (options.text_data.file_op)
g_signal_connect_after (text_view, "populate-popup", G_CALLBACK (menu_popup_cb), dlg);
/* Initialize linkifying */ /* Initialize linkifying */
if (options.text_data.uri) if (options.text_data.uri)
{ {
...@@ -636,37 +827,19 @@ text_create_widget (GtkWidget * dlg) ...@@ -636,37 +827,19 @@ text_create_widget (GtkWidget * dlg)
void void
text_print_result (void) text_print_result (void)
{ {
GtkTextIter start, end;
gchar *text;
if (!options.common_data.editable) if (!options.common_data.editable)
return; return;
gtk_text_buffer_get_bounds (GTK_TEXT_BUFFER (text_buffer), &start, &end);
text = gtk_text_buffer_get_text (GTK_TEXT_BUFFER (text_buffer), &start, &end, 0);
if (options.text_data.in_place && options.common_data.uri) if (options.text_data.in_place && options.common_data.uri)
save_file_cb (NULL, NULL);
else
{ {
GStatBuf st; GtkTextIter start, end;
GError *err = NULL; gchar *text;
/* g_file_set_contents changes the file permissions. so it must kept and restore after file saving */ gtk_text_buffer_get_bounds (GTK_TEXT_BUFFER (text_buffer), &start, &end);
if (g_stat (options.common_data.uri, &st) == 0) text = gtk_text_buffer_get_text (GTK_TEXT_BUFFER (text_buffer), &start, &end, 0);
{ g_print ("%s", text);
if (!g_file_set_contents (options.common_data.uri, text, -1, &err)) g_free (text);
{
g_printerr ("Cannot save file %s: %s\n", options.common_data.uri, err->message);
g_error_free (err);
}
else
{
/* restore permissions */
g_chmod (options.common_data.uri, st.st_mode);
}
}
else
g_printerr ("Cannot stat file %s\n", options.common_data.uri);
} }
else
g_print ("%s", text);
g_free (text);
} }
...@@ -474,6 +474,7 @@ typedef struct { ...@@ -474,6 +474,7 @@ typedef struct {
gchar *fore; gchar *fore;
gchar *back; gchar *back;
gboolean in_place; gboolean in_place;
gboolean file_op;
} YadTextData; } YadTextData;
#ifdef HAVE_SOURCEVIEW #ifdef HAVE_SOURCEVIEW
......
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