diff -Nru yad-0.31.0/aclocal.m4 yad-0.33.1/aclocal.m4 --- yad-0.31.0/aclocal.m4 2015-09-11 10:17:41.000000000 +0000 +++ yad-0.33.1/aclocal.m4 2016-01-11 12:34:25.000000000 +0000 @@ -1403,13 +1403,13 @@ dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl -dnl This file can can be used in projects which are not available under +dnl This file can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package package is covered by the GNU General Public License. +dnl gettext package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: diff -Nru yad-0.31.0/ChangeLog yad-0.33.1/ChangeLog --- yad-0.31.0/ChangeLog 2015-09-10 08:28:48.000000000 +0000 +++ yad-0.33.1/ChangeLog 2015-12-28 08:59:50.000000000 +0000 @@ -1,3 +1,224 @@ +2015-12-26 09:42 v1c0nt + + * src/notebook.c, src/paned.c: some cleanups + +2015-12-26 09:41 v1c0nt + + * configure.ac, data/yad.1, src/main.c: some cleanups + +2015-12-26 09:29 v1c0nt + + * src/main.c, src/notebook.c, src/paned.c: fix paned and notebook + close segfault + +2015-12-25 09:40 v1c0nt + + * src/util.c: fix extended completions + +2015-12-10 16:14 v1c0nt + + * data/yad.1, po/ru.po, po/uk.po, src/option.c: update docs + +2015-12-10 16:10 v1c0nt + + * po/ru.po, po/uk.po: update translations + +2015-12-10 16:07 v1c0nt + + * src/main.c, src/util.c: some fixes + +2015-12-10 16:03 v1c0nt + + * src/entry.c, src/form.c, src/option.c, src/util.c, src/yad.h: + extended completion + +2015-12-09 17:49 v1c0nt + + * src/main.c: rewrite layout management + +2015-12-07 16:55 v1c0nt + + * src/form.c, src/picture.c: fix focus in form, fix uninitialized + warning in picture + +2015-12-06 09:19 v1c0nt + + * src/form.c, src/util.c: fix handling empty values in form dialog + +2015-12-06 08:58 v1c0nt + + * data/yad.1: fix man page + +2015-12-06 08:51 v1c0nt + + * data/yad.1, src/util.c: fix typos + +2015-11-29 18:58 v1c0nt + + * src/form.c: enable read form data from stdin + +2015-11-29 18:35 v1c0nt + + * src/picture.c: fix fit_to_window in picture dialog + +2015-11-29 14:44 v1c0nt + + * data/yad.1, po/ru.po, po/uk.po, src/form.c, src/option.c, + src/yad.h: add --focus-field option to form dialog + +2015-11-29 14:32 v1c0nt + + * po/ru.po: correct russian translation + +2015-11-29 14:23 v1c0nt + + * configure.ac: bump beta version + +2015-11-29 14:22 v1c0nt + + * data/yad.1, po/POTFILES.in, po/ru.po, po/uk.po, src/Makefile.am, + src/form.c, src/main.c, src/option.c, src/picture.c, src/yad.h: + add --picture dialog + +2015-11-29 08:23 v1c0nt + + * src/file.c, src/main.c, src/yad.h: change initialization style + +2015-11-28 06:09 v1c0nt + + * src/util.c: check for NULL value in regex completion + +2015-11-26 13:07 v1c0nt + + * src/html.c, src/main.c: improve --browser mode of html dialog. + does not show default buttons and add quit menu item + +2015-11-24 06:28 v1c0nt + + * src/util.c: fix completion regex + +2015-11-22 10:50 v1c0nt + + * configure.ac, data/Makefile.am, data/notify-send, + src/Makefile.am, src/main.c, src/option.c, src/send-notify.c, + src/yad.h: remove send notify. add misc script instead + +2015-11-20 13:06 v1c0nt + + * configure.ac, src/Makefile.am, src/main.c, src/option.c, + src/send-notify.c, src/util.c, src/yad.h: initial implementation + of send-notify + +2015-11-20 06:09 v1c0nt + + * data/yad.1, po/ru.po, po/uk.po, src/entry.c, src/form.c, + src/option.c, src/util.c, src/yad.h: add --complete-regex option + +2015-11-19 22:23 v1c0nt + + * configure.ac: add check for gio in configure for future use + +2015-11-19 22:11 v1c0nt + + * po/uk.po: update ukrainian translation + +2015-11-19 21:43 v1c0nt + + * configure.ac, po/ru.po, po/uk.po, src/option.c: optimize options + +2015-11-19 06:35 v1c0nt + + * ChangeLog: release 0.32.0 + +2015-11-19 05:45 v1c0nt + + * ChangeLog, NEWS, data/yad.1: prepare to release + +2015-11-19 05:35 v1c0nt + + * ChangeLog, configure.ac, data/yad.1, po/ru.po, po/uk.po, + src/entry.c, src/form.c, src/option.c, src/yad.h: add + --num-output option. bump version to 0.32.0 + +2015-11-17 20:46 v1c0nt + + * src/main.c: fix timeout progressbar vertical orientation for gtk3 + +2015-11-16 16:02 v1c0nt + + * src/main.c: fix timeout progress layout for gtk3 + +2015-11-03 09:37 v1c0nt + + * data/yad.1, po/ru.po, po/uk.po, src/main.c, src/option.c, + src/yad.h: add --no-focus option + +2015-11-02 11:51 v1c0nt + + * src/main.c: unfocus splash dialogs + +2015-11-01 15:53 v1c0nt + + * src/main.c: use single close button as a default buttons set for + dnd dialog + +2015-10-31 16:22 v1c0nt + + * data/yad.1, po/ru.po, po/uk.po, src/main.c, src/option.c, + src/yad.h: add --splash options. thanks to Konstantin Baierer + (https://github.com/kba) + +2015-10-31 15:34 v1c0nt + + * configure.ac, src/browser.c: add rules-hint for icons list in + icon browser + +2015-10-31 14:54 v1c0nt + + * configure.ac: release 0.31.3 + +2015-10-31 14:52 v1c0nt + + * NEWS, src/form.c: fix set default value for completion entry in + form dialog + +2015-10-08 18:27 v1c0nt + + * data/yad.1: update man page + +2015-10-08 10:04 v1c0nt + + * ChangeLog, NEWS: release 0.32.2 + +2015-10-08 10:01 v1c0nt + + * configure.ac, src/list.c: fix segfault in list dialog when + separators enabled but --sep-value is unset + +2015-09-29 13:04 v1c0nt + + * ChangeLog: + +2015-09-29 13:04 v1c0nt + + * ChangeLog: release 0.31.1 + +2015-09-29 11:42 v1c0nt + + * configure.ac: bump version + +2015-09-29 08:50 v1c0nt + + * NEWS, src/html.c: fix segfault in html dialog + +2015-09-11 05:15 v1c0nt + + * po/uk.po: + +2015-09-10 11:07 v1c0nt + + * ChangeLog, NEWS, configure.ac: bump version. prepare to release + 2015-09-10 05:31 v1c0nt * data/yad.1, po/ru.po, po/uk.po, src/file.c, src/form.c, diff -Nru yad-0.31.0/configure yad-0.33.1/configure --- yad-0.31.0/configure 2015-09-11 10:17:41.000000000 +0000 +++ yad-0.33.1/configure 2016-01-11 12:34:26.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for YAD 0.31.0. +# Generated by GNU Autoconf 2.69 for YAD 0.33.1. # # Report bugs to . # @@ -580,8 +580,8 @@ # Identity of this package. PACKAGE_NAME='YAD' PACKAGE_TARNAME='yad' -PACKAGE_VERSION='0.31.0' -PACKAGE_STRING='YAD 0.31.0' +PACKAGE_VERSION='0.33.1' +PACKAGE_STRING='YAD 0.33.1' PACKAGE_BUGREPORT='https://sourceforge.net/p/yad-dialog/tickets/' PACKAGE_URL='https://sourceforge.net/projects/yad-dialog/' @@ -1346,7 +1346,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures YAD 0.31.0 to adapt to many kinds of systems. +\`configure' configures YAD 0.33.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1412,7 +1412,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of YAD 0.31.0:";; + short | recursive ) echo "Configuration of YAD 0.33.1:";; esac cat <<\_ACEOF @@ -1527,7 +1527,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -YAD configure 0.31.0 +YAD configure 0.33.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1896,7 +1896,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by YAD $as_me 0.31.0, which was +It was created by YAD $as_me 0.33.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2760,7 +2760,7 @@ # Define the identity of the package. PACKAGE='yad' - VERSION='0.31.0' + VERSION='0.33.1' cat >>confdefs.h <<_ACEOF @@ -6569,7 +6569,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by YAD $as_me 0.31.0, which was +This file was extended by YAD $as_me 0.33.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -6636,7 +6636,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -YAD config.status 0.31.0 +YAD config.status 0.33.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru yad-0.31.0/configure.ac yad-0.33.1/configure.ac --- yad-0.31.0/configure.ac 2015-09-10 09:49:50.000000000 +0000 +++ yad-0.33.1/configure.ac 2016-01-11 12:33:30.000000000 +0000 @@ -1,4 +1,4 @@ -AC_INIT([YAD], [0.31.0], [https://sourceforge.net/p/yad-dialog/tickets/], yad, [https://sourceforge.net/projects/yad-dialog/]) +AC_INIT([YAD], [0.33.1], [https://sourceforge.net/p/yad-dialog/tickets/], yad, [https://sourceforge.net/projects/yad-dialog/]) AC_CONFIG_AUX_DIR([build]) AM_INIT_AUTOMAKE([1.11 foreign dist-xz no-dist-gzip]) diff -Nru yad-0.31.0/data/Makefile.am yad-0.33.1/data/Makefile.am --- yad-0.31.0/data/Makefile.am 2015-03-03 15:38:16.000000000 +0000 +++ yad-0.33.1/data/Makefile.am 2015-11-26 13:05:27.000000000 +0000 @@ -12,6 +12,6 @@ m4dir = $(datadir)/aclocal m4_DATA = yad.m4 -EXTRA_DIST = $(desktop_in_files) zenity.sh +EXTRA_DIST = $(desktop_in_files) zenity.sh notify-send DISTCLEAN_FILES = $(desktop_DATA) $(m4_DATA) yad.spec diff -Nru yad-0.31.0/data/Makefile.in yad-0.33.1/data/Makefile.in --- yad-0.31.0/data/Makefile.in 2015-09-11 10:17:42.000000000 +0000 +++ yad-0.33.1/data/Makefile.in 2016-01-11 12:34:27.000000000 +0000 @@ -348,7 +348,7 @@ dist_man_MANS = yad.1 m4dir = $(datadir)/aclocal m4_DATA = yad.m4 -EXTRA_DIST = $(desktop_in_files) zenity.sh +EXTRA_DIST = $(desktop_in_files) zenity.sh notify-send DISTCLEAN_FILES = $(desktop_DATA) $(m4_DATA) yad.spec all: all-recursive diff -Nru yad-0.31.0/data/notify-send yad-0.33.1/data/notify-send --- yad-0.31.0/data/notify-send 1970-01-01 00:00:00.000000000 +0000 +++ yad-0.33.1/data/notify-send 2015-11-26 13:05:27.000000000 +0000 @@ -0,0 +1,29 @@ +#! /bin/bash + +# Defaults +APP="notification" +TIMEOUT=600 +ICON="dialog-information" +TITLE= +BODY= + +# Parse command line +OPTIND=1 +while getopts a:i:t: opt ; do + case "$opt" in + a) APP=$OPTARG ;; + i) ICON=$OPTARG ;; + t) TIMEOUT=$OPTARG ;; + esac +done +shift $(($OPTIND - 1)) +[[ "$1" == '--' ]] && shift + +TITLE="$1" +shift +BODY="$@" + +gdbus call --session --dest org.freedesktop.Notifications \ + --object-path /org/freedesktop/Notifications \ + --method org.freedesktop.Notifications.Notify \ + "$APP" 0 "$ICON" "$TITLE" "$BODY" "[]" "{}" $TIMEOUT &> /dev/null diff -Nru yad-0.31.0/data/yad.1 yad-0.33.1/data/yad.1 --- yad-0.31.0/data/yad.1 2015-09-10 07:47:06.000000000 +0000 +++ yad-0.33.1/data/yad.1 2015-12-29 14:52:53.000000000 +0000 @@ -148,7 +148,7 @@ Don't close dialog if \fIEscape\fP was pressed. .TP .B \-\-always-print-result -Always print result. +Print result for aby of the return codes. This options doesn't work if timeout was reached or \fIEscape\fP was pressed. .TP .B \-\-dialog-sep Show separator between dialog and buttons. Works only with gtk+-2.0. @@ -183,6 +183,13 @@ .B \-\-fullscreen Run dialog in fullscreen mode. This option may not work on all window managers. .TP +.B \-\-splash +Open window with "splashscreen" window hints. For details see description of \fI_NET_WM_WINDOW_TYPE_SPLASH\fP +in EWMH specification. The behavior of dialog with this option is HIGHLY DEPENDS on settings of window manager you use. +.TP +.B \-\-no-focus +Dialog window never take focus. +.TP .B \-\-geometry=\fIWIDTHxHEIGHT+X+Y\fP Use standard X Window geometry notation for placing dialog. When this option is used, \fIwidth\fP, \fIheight\fP, \fImouse\fP and \fIcenter\fP options are @@ -273,6 +280,10 @@ .B \-\-completion Use completion instead of combo-box. .TP +.B \-\-complete=\fITYPE\fP +Use specific type for extended completion. \fITYPE\fP can be \fIany\fP for match any of typed words, \fIall\fP for match all of typed words or +\fIregex\fP when typed text treats as regular expression. +.TP .B \-\-editable Allow make changes to text in combo-box. .TP @@ -280,6 +291,9 @@ Use spin button instead of text entry. Additional parameters in command line treats as minimum and maximum values, step value and precisions (in that order). All this values are optional. Default range is from 0 to 65535 with step 1. .TP +.B \-\-float-precision=\fINUMBER\fP +Set precision of floating point numbers. By default precision is three digits after point. +.TP .B \-\-licon=\fIIMAGE\fP Set an icon on a left side of entry. .TP @@ -291,6 +305,9 @@ .TP .B \-\-ricon-action=\fICMD\fP Specify a command which will be run when the right icon clicked. Output of command will be set as entry text. +.TP +.B \-\-num-output +Output index of active element instead of text for combo-box entry. .PP Any extra data specified in command line adds as an items of combo-box entry, except of numeric mode. @@ -393,7 +410,7 @@ .br \fBMFL\fP - select multiple files. Value of this field is a list of files separated by \fIitem-separator\fP. .br -\fBMFL\fP - select multiple folders. Value of this field is a list of folders separated by \fIitem-separator\fP. +\fBMDIR\fP - select multiple folders. Value of this field is a list of folders separated by \fIitem-separator\fP. .br \fBDT\fP - date field. .br @@ -420,12 +437,25 @@ .B \-\-separator=\fISTRING\fP Set output separator character. Default is `|'. .TP +.B \-\-focus-field=\fINUMBER\fP +Set focused field. +.TP +.B \-\-cycle-read +Cycled reading of stdin data. Sending FormFeed character clears the form. This symbol may be sent as \fIecho \-e '\\f'\fP. +.TP .B \-\-item-separator=\fISTRING\fP Set separator character for combo-box or scale values. Default is `!'. .TP .B \-\-date-format=\fIPATTERN\fP Set the format for the date fields (same as in calendar dialog). .TP +.B \-\-float-precision=\fINUMBER\fP +Set precision of floating point numbers. By default precision is three digits after point. +.TP +.B \-\-complete=\fITYPE\fP +Use specific type for extended completion. \fITYPE\fP can be \fIany\fP for match any of typed words, \fIall\fP for match all of typed words or +\fIregex\fP when typed text treats as regular expression. +.TP .B \-\-scroll Make form scrollable. .TP @@ -434,8 +464,11 @@ .TP .B \-\-output-by-row Output field values row by row if several columns is specified. +.TP +.B \-\-num-output +Output index of active element instead of text for combo-box fields. .PP -Additional data in command line interprets as a default values for form fields. A special value \fI@disabled\fP makes corresponding field inactive. +Additional data in command line interprets as a default values for form fields. A special value \fI@disabled@\fP makes corresponding field inactive. If no extra arguments specified in a command line, data will be readed from stdin, one value per line. Cycled reading means that for \fIN\fP fields \fIN+1\fP value will replace the first field. Empty values are skipped when reading from stdin. .SS HTML options .TP @@ -462,7 +495,7 @@ \fICHK\fP (checkboxes) and \fIRD\fP (radio toggle) are a boolean columns. \fIHD\fP type means a hidden column. Such columns are not displayes in the list, only in output. \fIIMG\fP may be path to image or icon name from currnet GTK+ icon theme. -Size of icons may be set in config file. Image field prints as empty value. +Size of icons may be set in gtk config file at GTK_ICON_SIZE_MENU position of gtk-icon-sizes. Image field prints as empty value. Special column names \fI@fore@\fP, \fI@back@\fP and \fI@font@\fP sets corresponding rows attributes. Values of those columns don't show in results. @@ -511,9 +544,10 @@ .TP .B \-\-sep\-column=\fINUMBER\fP Set the row separator column. If the cell value from this column equal to specified row separator value such row will be draw as separator. +Separator value must be set. .TP .B \-\-sep\-value=\fITEXT\fP -Set the \fITEXT\fP as a row separator value. +Set the \fITEXT\fP as a row separator value. This feature highly depends on your current GTK+ theme and may not work properly. .TP .B \-\-limit=\fINUMBER\fP Set the number of rows in list dialog. Will be shown only the last \fINUMBER\fP rows. This option will take effect only when data reading from stdin. @@ -536,6 +570,9 @@ .TP .B \-\-quoted-output Output values will be shell-style quoted. +.TP +.B \-\-float-precision=\fINUMBER\fP +Set precision of floating point numbers. By default precision is three digits after point. Sending FormFeed character to list clears it. This symbol may be sent as \fIecho \-e '\\f'\fP. @@ -608,6 +645,19 @@ .PP See \fBNOTEBOOK and PANED\fP section for more about paned dialog. +.SS Picture options +.TP +.B \-\-size=\fIVALUE\fP +Set initial size of picture. Available values are \fIfit\fP for fitting image in window or \fIorig\fP for show picture in original size. +.TP +.B \-\-inc=\fiNUMBER\fp +Set increment value for scaling image. +.TP +.B \-\-filename=\fIFILENAME\fP +Set picture filename. +.PP +Some actions on a picture like scaling or rotating available from popup menu. Those actions can be made only on static images. + .SS Print options .TP .B \-\-type=\fITYPE\fP diff -Nru yad-0.31.0/debian/changelog yad-0.33.1/debian/changelog --- yad-0.31.0/debian/changelog 2015-09-14 09:29:34.000000000 +0000 +++ yad-0.33.1/debian/changelog 2016-01-25 11:16:50.000000000 +0000 @@ -1,4 +1,28 @@ -yad (0.31.0-1~webupd8~vivid0) vivid; urgency=medium +yad (0.33.1-1~webupd8~vivid0) vivid; urgency=medium + + * New upstream release + + -- Alin Andrei Mon, 25 Jan 2016 12:30:29 +0200 + +yad (0.32.0-1~webupd8~precise0) precise; urgency=medium + + * New upstream release + + -- Alin Andrei Wed, 25 Nov 2015 12:59:08 +0200 + +yad (0.31.3-1~webupd8~wily0) wily; urgency=medium + + * New upstream bugfix release + + -- Alin Andrei Mon, 09 Nov 2015 16:12:33 +0300 + +yad (0.31.2-1~webupd8~precise0) precise; urgency=medium + + * New upstream bugfix release + + -- Alin Andrei Fri, 23 Oct 2015 16:24:33 +0300 + +yad (0.31.0-1~webupd8~wily0) wily; urgency=medium * New upstream release diff -Nru yad-0.31.0/NEWS yad-0.33.1/NEWS --- yad-0.31.0/NEWS 2015-09-10 11:06:21.000000000 +0000 +++ yad-0.33.1/NEWS 2016-01-11 12:33:59.000000000 +0000 @@ -1,8 +1,37 @@ +Version 0.33.1 + - fix timeout handling + +Version 0.33.0 + - add --picture dialog, a simple image viewer + - add --focus-field option to form dialog for set initialy fosuced field + - add --complete option for extended completions in entry fields + - add ability to fill form data through stdin + - fix handling empty data in form dialog + - improvements in browser mode of html dialog + - add --float-precision option + - improve output of floating point numbers + +Version 0.32.0 + - enable rules-hint for icons list in icon browser + - add --splash options (thanks to Konstantin Baierer) + - add --no-focus option + - fix timeout progressbar layout for gtk3 builds + - add --num-output option for output index of active element in combo-boxes + +Version 0.31.3 + - fix setting default value for completion entry in form dialog + +Version 0.31.2 + - fix segfault in list dialog when separators enabled but --sep-value is unset + +Version 0.31.1 + - fix segfault in html dialog + Version 0.31.0 - add separators to list dialog - use YAD_OPTIONS variable for specify default yad arguments - add --no-rules-hint option to list dialog - - add parameters for controlling palletes in color selection + - add parameters for controlling palettes in color selection - remove some entries from settings file - set default open command and date format through the settings file - add additional filter settings for file selection dialogs diff -Nru yad-0.31.0/po/POTFILES.in yad-0.33.1/po/POTFILES.in --- yad-0.31.0/po/POTFILES.in 2015-09-08 08:31:21.000000000 +0000 +++ yad-0.33.1/po/POTFILES.in 2015-11-30 08:16:47.000000000 +0000 @@ -12,6 +12,7 @@ src/option.c src/multi-progress.c src/paned.c +src/picture.c src/print.c src/progress.c src/color.c diff -Nru yad-0.31.0/po/ru.po yad-0.33.1/po/ru.po --- yad-0.31.0/po/ru.po 2015-09-10 07:47:06.000000000 +0000 +++ yad-0.33.1/po/ru.po 2015-12-29 14:47:42.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: YAD\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-09-10 08:27+0300\n" +"POT-Creation-Date: 2015-12-29 16:46+0200\n" "PO-Revision-Date: 2009-04-30 16:47+0300\n" "Last-Translator: Victor Ananjevsky \n" "Language-Team: \n" @@ -15,7 +15,6 @@ "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: KBabel 1.11.2\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" @@ -92,31 +91,31 @@ msgid "Initial value greater than maximum.\n" msgstr "Начальное значение больше маскимального.\n" -#: ../src/form.c:407 +#: ../src/form.c:412 msgid "Select files" msgstr "Выбор файлов" -#: ../src/form.c:415 +#: ../src/form.c:420 msgid "Select folders" msgstr "Выбор каталогов" -#: ../src/form.c:492 +#: ../src/form.c:497 msgid "Select or create file" msgstr "Выбор или создание файла" -#: ../src/form.c:500 +#: ../src/form.c:505 msgid "Select or create folder" msgstr "Выбор или создание каталога" -#: ../src/form.c:549 +#: ../src/form.c:554 msgid "Select date" msgstr "Выбор даты" -#: ../src/form.c:767 +#: ../src/form.c:844 msgid "Select file" msgstr "Выбор файла" -#: ../src/form.c:795 +#: ../src/form.c:872 msgid "Select folder" msgstr "Выбор каталога" @@ -130,17 +129,17 @@ msgid "Unable to open directory %s: %s\n" msgstr "Не могу открыть каталог %s: %s\n" -#: ../src/main.c:103 ../src/main.c:258 +#: ../src/main.c:96 ../src/main.c:434 #, c-format msgid "%d sec" msgstr "%d сек" -#: ../src/main.c:692 ../src/main.c:699 +#: ../src/main.c:663 ../src/main.c:670 #, c-format msgid "Unable to parse YAD_OPTIONS: %s\n" msgstr "Не могу разобрать YAD_OPTIONS: %s\n" -#: ../src/main.c:710 +#: ../src/main.c:681 #, c-format msgid "Unable to parse command line: %s\n" msgstr "Не удается разобрать командную строку: %s\n" @@ -164,19 +163,19 @@ msgid "Yad notification" msgstr "Диалог уведомлений" -#: ../src/list.c:769 +#: ../src/list.c:783 msgid "Add row" msgstr "Добавить строку" -#: ../src/list.c:776 +#: ../src/list.c:790 msgid "Delete row" msgstr "Удалить строку" -#: ../src/list.c:783 +#: ../src/list.c:797 msgid "Duplicate row" msgstr "Скопировать строку" -#: ../src/list.c:818 +#: ../src/list.c:836 #, c-format msgid "No column titles specified for List dialog.\n" msgstr "Не заданы заголовоки колонок для диалога со списком\n" @@ -185,535 +184,563 @@ msgid "Set the dialog title" msgstr "Задать заголовок диалога" -#: ../src/option.c:79 +#: ../src/option.c:78 msgid "TITLE" msgstr "ЗАГОЛОВОК" -#: ../src/option.c:84 +#: ../src/option.c:80 msgid "Set the window icon" msgstr "Задать значок диалога" -#: ../src/option.c:85 +#: ../src/option.c:80 msgid "ICONPATH" msgstr "ЗНАЧОК" -#: ../src/option.c:90 +#: ../src/option.c:82 msgid "Set the width" msgstr "Задать ширину окна" -#: ../src/option.c:91 +#: ../src/option.c:82 msgid "WIDTH" msgstr "ШИРИНА" -#: ../src/option.c:96 +#: ../src/option.c:84 msgid "Set the height" msgstr "Задать высоту окна" -#: ../src/option.c:97 +#: ../src/option.c:84 msgid "HEIGHT" msgstr "ВЫСОТА" -#: ../src/option.c:102 +#: ../src/option.c:86 msgid "Set the window geometry" msgstr "Задать геометрию окна" -#: ../src/option.c:103 +#: ../src/option.c:86 msgid "WxH+X+Y" msgstr "ВxШ+X+Y" -#: ../src/option.c:108 +#: ../src/option.c:88 msgid "Set dialog timeout in seconds" msgstr "Задать время работы диалога в секундах" -#: ../src/option.c:109 +#: ../src/option.c:88 msgid "TIMEOUT" msgstr "ЗАДЕРЖКА" -#: ../src/option.c:114 +#: ../src/option.c:90 msgid "Show remaining time indicator (top, bottom, left, right)" msgstr "Показать индикатор задержки (top, bottom, left, right)" -#: ../src/option.c:115 ../src/option.c:1040 +#: ../src/option.c:90 ../src/option.c:437 msgid "POS" msgstr "ПОЗИЦИЯ" -#: ../src/option.c:120 +#: ../src/option.c:92 msgid "Set the dialog text" msgstr "Задать текст диалога" -#: ../src/option.c:121 ../src/option.c:151 ../src/option.c:428 -#: ../src/option.c:434 ../src/option.c:440 ../src/option.c:568 -#: ../src/option.c:859 ../src/option.c:1102 ../src/option.c:1141 +#: ../src/option.c:92 ../src/option.c:102 ../src/option.c:243 +#: ../src/option.c:245 ../src/option.c:247 ../src/option.c:283 +#: ../src/option.c:380 ../src/option.c:465 ../src/option.c:480 msgid "TEXT" msgstr "ТЕКСТ" -#: ../src/option.c:126 +#: ../src/option.c:94 msgid "Set the dialog text alignment (left, center, right, fill)" msgstr "Задать выравнивание текста диалога (left, center, right, fill)" -#: ../src/option.c:127 ../src/option.c:169 ../src/option.c:591 -#: ../src/option.c:817 ../src/option.c:917 ../src/option.c:960 -#: ../src/option.c:1034 ../src/option.c:1068 ../src/option.c:1269 +#: ../src/option.c:94 ../src/option.c:108 ../src/option.c:191 +#: ../src/option.c:293 ../src/option.c:318 ../src/option.c:366 +#: ../src/option.c:396 ../src/option.c:413 ../src/option.c:435 +#: ../src/option.c:445 ../src/option.c:455 ../src/option.c:524 msgid "TYPE" msgstr "ТИП" -#: ../src/option.c:132 +#: ../src/option.c:96 msgid "Set the dialog image" msgstr "Задать картинку диалога" -#: ../src/option.c:133 ../src/option.c:464 ../src/option.c:476 +#: ../src/option.c:96 ../src/option.c:253 ../src/option.c:257 msgid "IMAGE" msgstr "КАРТИНКА" -#: ../src/option.c:138 +#: ../src/option.c:98 msgid "Show image above main widget" msgstr "Показывать картинку над основным виджетом" -#: ../src/option.c:144 +#: ../src/option.c:100 msgid "Use specified icon theme instead of default" msgstr "Использовать указанную тему иконок" -#: ../src/option.c:145 +#: ../src/option.c:100 msgid "THEME" msgstr "ТЕМА" -#: ../src/option.c:150 +#: ../src/option.c:102 msgid "Hide main widget with expander" msgstr "Спрятать основной виджет" -#: ../src/option.c:156 +#: ../src/option.c:104 msgid "Add dialog button (may be used multiple times)" msgstr "Добавить кнопку (может использоваться несколько раз)" -#: ../src/option.c:157 +#: ../src/option.c:104 msgid "NAME:ID" msgstr "ИМЯ:ID" -#: ../src/option.c:162 +#: ../src/option.c:106 msgid "Don't show buttons" msgstr "Не показывать кнопки" -#: ../src/option.c:168 +#: ../src/option.c:108 msgid "Set buttons layout type (spread, edge, start, end or center)" msgstr "Задать тип размещения кнопок (spread, edge, start, end или center)" -#: ../src/option.c:174 +#: ../src/option.c:110 msgid "Don't use pango markup language in dialog's text" msgstr "Не использовать разметку pango в тексте" -#: ../src/option.c:180 +#: ../src/option.c:112 msgid "Don't close dialog if Escape was pressed" msgstr "Не закрывать диалог при нажатии Escape" -#: ../src/option.c:186 +#: ../src/option.c:114 msgid "Set window borders" msgstr "Установить границы окна" -#: ../src/option.c:187 ../src/option.c:266 ../src/option.c:597 -#: ../src/option.c:823 ../src/option.c:829 ../src/option.c:835 -#: ../src/option.c:841 ../src/option.c:847 ../src/option.c:853 -#: ../src/option.c:865 ../src/option.c:966 +#: ../src/option.c:114 ../src/option.c:145 ../src/option.c:163 +#: ../src/option.c:295 ../src/option.c:301 ../src/option.c:368 +#: ../src/option.c:370 ../src/option.c:372 ../src/option.c:374 +#: ../src/option.c:376 ../src/option.c:378 ../src/option.c:382 +#: ../src/option.c:415 ../src/option.c:447 msgid "NUMBER" msgstr "ЧИСЛО" -#: ../src/option.c:192 +#: ../src/option.c:116 msgid "Always print result" msgstr "Всегда выводить результат" -#: ../src/option.c:198 +#: ../src/option.c:118 msgid "Dialog text can be selected" msgstr "Текст диалога может быть выделен" -#: ../src/option.c:205 +#: ../src/option.c:121 msgid "Set window sticky" msgstr "Окно видимо на всех рабочих столах" -#: ../src/option.c:211 +#: ../src/option.c:123 msgid "Set window unresizable" msgstr "Неизменяемый размер" -#: ../src/option.c:217 +#: ../src/option.c:125 msgid "Place window on top" msgstr "Разместить окно поверх остальных" -#: ../src/option.c:223 +#: ../src/option.c:127 msgid "Place window on center of screen" msgstr "Разместить окно в центре экрана" -#: ../src/option.c:229 +#: ../src/option.c:129 msgid "Place window at the mouse position" msgstr "Разместить окно под указателем мыши" -#: ../src/option.c:235 +#: ../src/option.c:131 msgid "Set window undecorated" msgstr "Убрать обрамление" -#: ../src/option.c:241 +#: ../src/option.c:133 msgid "Don't show window in taskbar" msgstr "Не показывать окно в панели задач" -#: ../src/option.c:247 +#: ../src/option.c:135 msgid "Set window maximized" msgstr "Задать окну максимальный размер" -#: ../src/option.c:253 +#: ../src/option.c:137 msgid "Set window fulscreen" msgstr "Развернуть окно на весь экран" -#: ../src/option.c:259 +#: ../src/option.c:139 +msgid "Don't focus dialog window" +msgstr "Не давать фокус окну диалога" + +#: ../src/option.c:141 +msgid "Open window as a splashscreen" +msgstr "Открыть окно в режиме splashscreen" + +#: ../src/option.c:143 msgid "Special type of dialog for XEMBED" msgstr "Специальный режим диалога для встраивания" -#: ../src/option.c:260 ../src/option.c:948 ../src/option.c:1046 +#: ../src/option.c:143 ../src/option.c:189 msgid "KEY" msgstr "КЛЮЧ" -#: ../src/option.c:265 +#: ../src/option.c:145 msgid "Tab nubmer of this dialog" msgstr "Номер вкладки для этого диалога" -#: ../src/option.c:272 +#: ../src/option.c:148 msgid "XID of parent window" msgstr "Идентификатор родительсткого окна" -#: ../src/option.c:278 +#: ../src/option.c:150 msgid "Send SIGNAL to parent" msgstr "Послать СИГНАЛ родителю" -#: ../src/option.c:279 +#: ../src/option.c:150 msgid "SIGNAL" msgstr "СИГНАЛ" -#: ../src/option.c:284 +#: ../src/option.c:152 msgid "Print X Window Id to the stderr" msgstr "Вывести идентификатор окна на stderr" -#: ../src/option.c:291 +#: ../src/option.c:155 msgid "Add path for search icons by name" msgstr "Добавить каталог для поиска изображений по имени" -#: ../src/option.c:292 +#: ../src/option.c:155 msgid "PATH" msgstr "ПУТЬ" -#: ../src/option.c:301 +#: ../src/option.c:161 +msgid "Set the format for the returned date" +msgstr "Задать формат возвращаемой даты" + +#: ../src/option.c:161 ../src/option.c:338 +msgid "PATTERN" +msgstr "ШАБЛОН" + +#: ../src/option.c:163 +msgid "Set presicion of floating numbers (default - 3)" +msgstr "Задать точность чисел с плавающей точкой (по-умолчанию - 3)" + +#: ../src/option.c:165 +msgid "Set command handler" +msgstr "Задать команду-обработчик" + +#: ../src/option.c:165 ../src/option.c:255 ../src/option.c:259 +#: ../src/option.c:384 +msgid "CMD" +msgstr "КОМАНДА" + +#: ../src/option.c:167 +msgid "Listen for data on stdin" +msgstr "Получать данные со стандартного ввода" + +#: ../src/option.c:169 +msgid "Set common separator character" +msgstr "Установить общий разделяющий символ" + +#: ../src/option.c:169 ../src/option.c:171 +msgid "SEPARATOR" +msgstr "РАЗДЕЛИТЕЛЬ" + +#: ../src/option.c:171 +msgid "Set item separator character" +msgstr "Установить разделяющий символ для элементов" + +#: ../src/option.c:173 +msgid "Allow changes to text in some cases" +msgstr "Разрешить изменять текст в определенных случаях" + +#: ../src/option.c:175 +msgid "Quote dialogs output" +msgstr "Вывод значений в кавычках" + +#: ../src/option.c:177 +msgid "Output number instead of text for combo-box" +msgstr "Выводить номер вместо текста для списка значений" + +#: ../src/option.c:179 +msgid "Specify font name to use" +msgstr "Указать имя используемого шрифта" + +#: ../src/option.c:179 +msgid "FONTNAME" +msgstr "ШРИФТ" + +#: ../src/option.c:181 +msgid "Allow multiple selection" +msgstr "Разрешить множественный выбор" + +#: ../src/option.c:183 +msgid "Enable preview" +msgstr "Добавить предпросмотр" + +#: ../src/option.c:185 +msgid "Set source filename" +msgstr "Имя исходного файла" + +#: ../src/option.c:185 ../src/option.c:205 ../src/option.c:219 +#: ../src/option.c:552 ../src/option.c:558 +msgid "FILENAME" +msgstr "ИМЯ_ФАЙЛА" + +#: ../src/option.c:187 +msgid "Set vertical orientation" +msgstr "Использовать вертикальное расположение" + +#: ../src/option.c:189 +msgid "Identifier of embedded dialogs" +msgstr "Идентификатор встраиваемых диалогов" + +#: ../src/option.c:191 +msgid "Set extended completion for entries (any, all, or regex)" +msgstr "Задать расширенное дополнение для текстовых полей (any, all или regex)" + +#: ../src/option.c:197 msgid "Display calendar dialog" msgstr "Отобразить диалог для выбора даты" -#: ../src/option.c:307 +#: ../src/option.c:199 msgid "Set the calendar day" msgstr "Задать день календаря" -#: ../src/option.c:308 +#: ../src/option.c:199 msgid "DAY" msgstr "ДЕНЬ" -#: ../src/option.c:313 +#: ../src/option.c:201 msgid "Set the calendar month" msgstr "Задать месяц календаря" -#: ../src/option.c:314 +#: ../src/option.c:201 msgid "MONTH" msgstr "МЕСЯЦ" -#: ../src/option.c:319 +#: ../src/option.c:203 msgid "Set the calendar year" msgstr "Задать год календаря" -#: ../src/option.c:320 +#: ../src/option.c:203 msgid "YEAR" msgstr "ГОД" -#: ../src/option.c:325 ../src/option.c:614 -msgid "Set the format for the returned date" -msgstr "Задать формат возвращаемой даты" - -#: ../src/option.c:326 ../src/option.c:615 ../src/option.c:722 -msgid "PATTERN" -msgstr "ШАБЛОН" - -#: ../src/option.c:331 +#: ../src/option.c:205 msgid "Set the filename with dates details" msgstr "Задать имя файла с описанием дат" -#: ../src/option.c:332 ../src/option.c:366 ../src/option.c:504 -#: ../src/option.c:1062 ../src/option.c:1287 ../src/option.c:1361 -#: ../src/option.c:1371 -msgid "FILENAME" -msgstr "ИМЯ_ФАЙЛА" - -#: ../src/option.c:341 +#: ../src/option.c:211 msgid "Display color selection dialog" msgstr "Отобразить диалог для выбора цвета" -#: ../src/option.c:347 +#: ../src/option.c:213 msgid "Alias for --color" msgstr "Синоним для --color" -#: ../src/option.c:353 +#: ../src/option.c:215 msgid "Set initial color value" msgstr "Задать начальное значение цвета" -#: ../src/option.c:354 ../src/option.c:1245 ../src/option.c:1251 -#: ../src/option.c:1305 +#: ../src/option.c:215 ../src/option.c:518 ../src/option.c:520 +#: ../src/option.c:532 msgid "COLOR" msgstr "ЦВЕТ" -#: ../src/option.c:359 +#: ../src/option.c:217 msgid "Show system palette in color dialog" msgstr "Показывать системную палитру" -#: ../src/option.c:365 +#: ../src/option.c:219 msgid "Set path to palette file. Default - " msgstr "Задать путь к файлу цветов. По-умолчанию - " -#: ../src/option.c:371 +#: ../src/option.c:221 msgid "Expand user palette" msgstr "Раскрывать пользовательскую палитру" -#: ../src/option.c:377 +#: ../src/option.c:223 msgid "Set output mode to MODE. Values are hex (default) or rgb" msgstr "Установить ревим вывода в РЕЖИМ. Значения - hex (по-умолчанию) или rgb" -#: ../src/option.c:378 +#: ../src/option.c:223 msgid "MODE" msgstr "РЕЖИМ" -#: ../src/option.c:383 +#: ../src/option.c:225 msgid "Use #rrrrggggbbbb format instead of #rrggbb" msgstr "Использовать формат #rrrrggggbbbb вместо #rrggbb" -#: ../src/option.c:389 +#: ../src/option.c:227 msgid "Add opacity to output color value" msgstr "Добавить прозрачность к значению цвета" -#: ../src/option.c:399 +#: ../src/option.c:233 msgid "Display drag-n-drop box" msgstr "Отобразить диалог для перехвата dnd" -#: ../src/option.c:405 +#: ../src/option.c:235 msgid "Use dialog text as tooltip" msgstr "Использовать текст диалога в качестве подсказки" -#: ../src/option.c:411 -msgid "Set command for process d-n-d data" -msgstr "Команда для обработки полученных данных" - -#: ../src/option.c:412 ../src/option.c:470 ../src/option.c:482 -#: ../src/option.c:871 ../src/option.c:982 -msgid "CMD" -msgstr "КОМАНДА" - -#: ../src/option.c:421 +#: ../src/option.c:241 msgid "Display text entry or combo-box dialog" msgstr "Отобразить диалог для ввода текста или выбора варианта" -#: ../src/option.c:427 +#: ../src/option.c:243 msgid "Set the entry label" msgstr "Задать метку поля ввода" -#: ../src/option.c:433 +#: ../src/option.c:245 msgid "Set the entry text" msgstr "Задать текст по умолчанию для ввода" -#: ../src/option.c:439 +#: ../src/option.c:247 msgid "Hide the entry text" msgstr "Прятать введенный текст (Пароль)" -#: ../src/option.c:445 +#: ../src/option.c:249 msgid "Use completion instead of combo-box" msgstr "Использовать автодополнение вместо списка значений" -#: ../src/option.c:451 +#: ../src/option.c:251 msgid "Use spin button for text entry" msgstr "Использовать числовое поле вместо текста" -#: ../src/option.c:457 -msgid "Allow changes to text in combo-box" -msgstr "Разрешить изменять текст в режиме выбора варианта" - -#: ../src/option.c:463 +#: ../src/option.c:253 msgid "Set the left entry icon" msgstr "Задать левый значок" -#: ../src/option.c:469 +#: ../src/option.c:255 msgid "Set the left entry icon action" msgstr "Действие для левого значка" -#: ../src/option.c:475 +#: ../src/option.c:257 msgid "Set the right entry icon" msgstr "Задать правый значок" -#: ../src/option.c:481 +#: ../src/option.c:259 msgid "Set the right entry icon action" msgstr "Действие для правого значка" -#: ../src/option.c:491 +#: ../src/option.c:265 msgid "Display file selection dialog" msgstr "Отобразить диалог для выбора файла" -#: ../src/option.c:497 +#: ../src/option.c:267 msgid "Alias for --file" msgstr "Синоним для --file" -#: ../src/option.c:503 -msgid "Set the filename" -msgstr "Задать имя файла" - -#: ../src/option.c:509 -msgid "Allow multiple files to be selected" -msgstr "Разрешить выбор нескольких файлов" - -#: ../src/option.c:515 +#: ../src/option.c:269 msgid "Activate directory-only selection" msgstr "Активировать выделение только по каталогам" -#: ../src/option.c:521 +#: ../src/option.c:271 msgid "Activate save mode" msgstr "Активировать режим сохранения" -#: ../src/option.c:527 ../src/option.c:602 ../src/option.c:792 -msgid "Set output separator character" -msgstr "Установить выходной разделяющий символ" - -#: ../src/option.c:528 ../src/option.c:603 ../src/option.c:609 -#: ../src/option.c:793 ../src/option.c:994 ../src/option.c:1000 -msgid "SEPARATOR" -msgstr "РАЗДЕЛИТЕЛЬ" - -#: ../src/option.c:533 +#: ../src/option.c:273 msgid "Confirm file selection if filename already exists" msgstr "Подтверждать выбор файла, если файл уже существует" -#: ../src/option.c:534 +#: ../src/option.c:273 msgid "[TEXT]" msgstr "[ТЕКСТ]" -#: ../src/option.c:539 ../src/option.c:626 ../src/option.c:888 -msgid "Quote dialogs output" -msgstr "Вывод значений в кавычках" - -#: ../src/option.c:549 +#: ../src/option.c:279 msgid "Display font selection dialog" msgstr "Отобразить диалог для выбора шрифта" -#: ../src/option.c:555 +#: ../src/option.c:281 msgid "Alias for --font" msgstr "Синоним для --font" -#: ../src/option.c:561 -msgid "Set initial font" -msgstr "Задать начальный шрифт" +#: ../src/option.c:283 +msgid "Set text string for preview" +msgstr "Задать текст для предпросмотра" -#: ../src/option.c:562 ../src/option.c:1086 ../src/option.c:1257 -msgid "FONTNAME" -msgstr "ШРИФТ" - -#: ../src/option.c:567 -msgid "Set preview text" -msgstr "Задать текст образца" - -#: ../src/option.c:577 +#: ../src/option.c:289 msgid "Display form dialog" msgstr "Отобразить диалог формы ввода" -#: ../src/option.c:584 -msgid "" -"Add field to form (TYPE - H, RO, NUM, CHK, CB, CBE, CE, FL, SFL, MFL, DIR, " -"CDIR, MDIR, FN, DT, SCL, CLR, BTN, FBTN, LBL or TXT)" -msgstr "" -"Добавить поле к форме (Тип поля: Н, RO, NUM, CHK, CB, CBE, CE, FL, SFL, MFL, " -"DIR, CDIR, MDIR, FN, MFL, DT, SCL, CLR, BTN, FBTN, LBL или TXT)" +#: ../src/option.c:291 +msgid "Add field to form (see man page for list of possible types)" +msgstr "Добавить поле к форме (список типов указан в странице руководства)" -#: ../src/option.c:585 ../src/option.c:905 +#: ../src/option.c:291 ../src/option.c:394 msgid "LABEL[:TYPE]" msgstr "МЕТКА[:ТИП]" -#: ../src/option.c:590 +#: ../src/option.c:293 msgid "Set alignment of filed labels (left, center or right)" msgstr "Задать выравнивание меток полей (left, center или right)" -#: ../src/option.c:596 +#: ../src/option.c:295 msgid "Set number of columns in form" msgstr "Задать количество колонок в форме" -#: ../src/option.c:608 -msgid "Set separator character for combobox or scale data" -msgstr "Установить разделяющий символ для данных списка или числового поля" - -#: ../src/option.c:620 +#: ../src/option.c:297 msgid "Make form scrollable" msgstr "Сделать форму прокручиваемой" -#: ../src/option.c:632 +#: ../src/option.c:299 msgid "Order output fields by rows" -msgstr "Упорядочить вівод по строкам" +msgstr "Упорядочить вывод по строкам" + +#: ../src/option.c:301 +msgid "Set focused field" +msgstr "Задать поле, получающее фокус" + +#: ../src/option.c:303 +msgid "Cycled reading of stdin data" +msgstr "Циклическое чтение со стандартного ввода" -#: ../src/option.c:643 +#: ../src/option.c:310 msgid "Display HTML dialog" msgstr "Отобразить HTML диалог" -#: ../src/option.c:649 +#: ../src/option.c:312 msgid "Open specified location" msgstr "Открыть указанный адрес" -#: ../src/option.c:650 -msgid "URI" -msgstr "URI" - -#: ../src/option.c:655 +#: ../src/option.c:314 msgid "Turn on browser mode" msgstr "Включить режим браузера" -#: ../src/option.c:661 +#: ../src/option.c:316 msgid "Print clicked uri to stdout" msgstr "Печатать ссылки по щелчку" -#: ../src/option.c:667 +#: ../src/option.c:318 msgid "Set mime type of input stream data" msgstr "Задать тип mime для входных данных" -#: ../src/option.c:668 -msgid "MIME" -msgstr "MIME" - -#: ../src/option.c:673 +#: ../src/option.c:320 msgid "Set encoding of input stream data" msgstr "Задать кодировку для входных данных" -#: ../src/option.c:674 +#: ../src/option.c:320 msgid "ENCODING" msgstr "КОДИРОВКА" -#: ../src/option.c:684 +#: ../src/option.c:327 msgid "Display icons box dialog" msgstr "Отобразить диалог со значками быстрого доступа" -#: ../src/option.c:690 +#: ../src/option.c:329 msgid "Read data from .desktop files in specified directory" msgstr "Читать данные из .desktop файлов в определенном каталоге" -#: ../src/option.c:691 -msgid "DIRECTORY" +#: ../src/option.c:329 +msgid "DIR" msgstr "КАТАЛОГ" -#: ../src/option.c:696 +#: ../src/option.c:331 msgid "Use compact (list) view" msgstr "Использовать компактный вид (список)" -#: ../src/option.c:702 +#: ../src/option.c:333 msgid "Use GenericName field instead of Name for icon label" msgstr "Использовать поле GenericName вместо Name для метки" -#: ../src/option.c:708 -msgid "Read data from stdin" -msgstr "Читать данные со стандартного ввода" - -#: ../src/option.c:714 +#: ../src/option.c:335 msgid "Set the width of dialog items" msgstr "Задать ширину элемента диалога" -#: ../src/option.c:721 +#: ../src/option.c:338 #, no-c-format msgid "" "Use specified pattern for launch command in terminal (default: xterm -e %s)" @@ -721,70 +748,60 @@ "Использовать указанный шаблон для запуска в терминале (по умолчанию: xterm -" "e %s)" -#: ../src/option.c:727 +#: ../src/option.c:340 msgid "Sort items by name instead of filename" msgstr "Сортировать по полю Имя вместо имени файла" -#: ../src/option.c:733 +#: ../src/option.c:342 msgid "Sort items in descending order" msgstr "Сортировать в убывающем порядке" -#: ../src/option.c:739 +#: ../src/option.c:344 msgid "Activate items by single click" msgstr "Активировать элемент одинарным щелчком" -#: ../src/option.c:749 +#: ../src/option.c:350 msgid "Display list dialog" msgstr "Отобразить диалог со списком" -#: ../src/option.c:755 -msgid "Set the column header (TYPE - TEXT, NUM, FLT, CHK, RD, IMG, HD or TIP)" -msgstr "" -"Задать заголовок столбца (ТИП - TEXT, NUM, FLT, CHK, RD, IMG, HD или TIP)" +#: ../src/option.c:352 +msgid "Set the column header (see man page for list of possible types)" +msgstr "Задать заголовок колонки (список типов указан в странице руководства)" -#: ../src/option.c:756 +#: ../src/option.c:352 msgid "COLUMN[:TYPE]" msgstr "СТОЛБЕЦ[:ТИП]" -#: ../src/option.c:761 +#: ../src/option.c:354 msgid "Use checkboxes for first column" msgstr "Использовать флажки для первой колонки" -#: ../src/option.c:767 +#: ../src/option.c:356 msgid "Use radioboxes for first column" msgstr "Использовать переключатель для первой колонки" -#: ../src/option.c:773 +#: ../src/option.c:358 msgid "Don't show column headers" msgstr "Не показывать заголовки колонок" -#: ../src/option.c:779 +#: ../src/option.c:360 msgid "Disable clickable column headers" msgstr "Запретить нажимаемые заголовки" -#: ../src/option.c:785 +#: ../src/option.c:362 msgid "Disable rules hints" msgstr "Запретить раскраску строк" -#: ../src/option.c:798 -msgid "Allow multiple rows to be selected" -msgstr "Разрешить выбор нескольких строк" - -#: ../src/option.c:804 ../src/option.c:1292 -msgid "Allow changes to text" -msgstr "Разрешить изменять текст" - -#: ../src/option.c:810 +#: ../src/option.c:364 msgid "Print all data from list" msgstr "Печатать таблицу полностью" -#: ../src/option.c:816 -msgid "Set ellipsize mode for text columns (TYPE - NONE, START, MIDDLE or END)" +#: ../src/option.c:366 +msgid "Set ellipsize mode for text columns (none, start, middle or end)" msgstr "" -"Задать тип усечсения для текстовых столбцов (ТИП - NONE, START, MIDDLE или " -"END)" +"Задать тип усечсения для текстовых столбцов (none, start, middle или end)" -#: ../src/option.c:822 +#: ../src/option.c:368 msgid "" "Print a specific column. By default or if 0 is specified will be printed all " "columns" @@ -792,616 +809,632 @@ "Распечатать только определённый столбец. По-умолчанию или если столбец равен " "0, будут распечатаны все столбцы" -#: ../src/option.c:828 +#: ../src/option.c:370 msgid "Hide a specific column" msgstr "Скрыть указанный столбец" -#: ../src/option.c:834 +#: ../src/option.c:372 msgid "Set the column expandable by default. 0 sets all columns expandable" msgstr "" "Задать колонку, расширяемую по-умолчанию. 0 устанавливает расширяемыми все " "колонки" -#: ../src/option.c:840 +#: ../src/option.c:374 msgid "" "Set the quick search column. Default is first column. Set it to 0 for " "disable searching" msgstr "Задать колонку поиска. По-умолчанию первая. 0 запрещает поиск" -#: ../src/option.c:846 +#: ../src/option.c:376 msgid "Set the tooltip column" msgstr "Задать колонку всплывающих подсказок" -#: ../src/option.c:852 +#: ../src/option.c:378 msgid "Set the row separator column" msgstr "Задать колонку разделителя строк" -#: ../src/option.c:858 +#: ../src/option.c:380 msgid "Set the row separator value" msgstr "Задать значение разделителя строк" -#: ../src/option.c:864 +#: ../src/option.c:382 msgid "Set the limit of rows in list" msgstr "Задать количество строк в списке" -#: ../src/option.c:870 +#: ../src/option.c:384 msgid "Set double-click action" msgstr "Действие по двойному щелчку мыши" -#: ../src/option.c:876 +#: ../src/option.c:386 msgid "Use regex in search" msgstr "Использовать регулярные выражения при поиске" -#: ../src/option.c:882 -msgid "Listen for data on stdin in addition to command-line" -msgstr "Получать даннные из stdin в дополнение к указанным в командной строке" - -#: ../src/option.c:898 +#: ../src/option.c:392 msgid "Display multi progress bars dialog" msgstr "Отобразить диалог c несколькими индикаторами" -#: ../src/option.c:904 -msgid "Add the progress bar (TYPE - NORM, RTL or PULSE)" -msgstr "Добавить индикатор (ТИП - NORM, RTL или PULSE)" - -#: ../src/option.c:910 -msgid "Show vertical bars" -msgstr "Показывать вертикальные индикаторы" +#: ../src/option.c:394 +msgid "Add the progress bar (norm, rtl or pulse)" +msgstr "Добавить индикатор (norm, rtl или pulse)" -#: ../src/option.c:916 +#: ../src/option.c:396 msgid "Set alignment of bar labels (left, center or right)" msgstr "Задать выравнивание меток индикаторов (left, center или right)" -#: ../src/option.c:923 +#: ../src/option.c:399 #, no-c-format msgid "Dismiss the dialog when 100% of all bars has been reached" msgstr "Закрыть диалог по достижении 100% всеми индикаторами" -#: ../src/option.c:930 ../src/option.c:1127 +#: ../src/option.c:402 ../src/option.c:475 msgid "Kill parent process if cancel button is pressed" msgstr "Завершить родительский процесс, если нажата кнопка отмены" -#: ../src/option.c:941 +#: ../src/option.c:409 msgid "Display notebook dialog" msgstr "Отобразить диалог с вкладками" -#: ../src/option.c:947 ../src/option.c:1045 -msgid "Identifier of embedded dialogs" -msgstr "Идентификатор встраиваемых диалогов" - -#: ../src/option.c:953 +#: ../src/option.c:411 msgid "Add a tab to notebook" msgstr "Добавить вкладку" -#: ../src/option.c:954 +#: ../src/option.c:411 msgid "LABEL" msgstr "МЕТКА" -#: ../src/option.c:959 +#: ../src/option.c:413 msgid "Set position of a notebook tabs (top, bottom, left or right)" msgstr "Задать позицию метки вкладки (top, bottom, left или right)" -#: ../src/option.c:965 +#: ../src/option.c:415 msgid "Set tab borders" msgstr "Установить границы вкладки" -#: ../src/option.c:975 +#: ../src/option.c:421 msgid "Display notification" msgstr "Отобразить диалог уведомления" -#: ../src/option.c:981 -msgid "Set left-click action" -msgstr "Действие по левому щелчку мыши" - -#: ../src/option.c:987 -msgid "Listen for commands on stdin" -msgstr "Воспринимать команды со стандартного ввода" - -#: ../src/option.c:993 -msgid "Set separator character for menu values" -msgstr "Установить разделяющий символ для значений меню" - -#: ../src/option.c:999 -msgid "Set separator character for menu items" -msgstr "Установить разделяющий символ для элементов меню" - -#: ../src/option.c:1005 +#: ../src/option.c:423 msgid "Set initial popup menu" msgstr "Задать начальное меню" -#: ../src/option.c:1006 +#: ../src/option.c:423 msgid "STRING" msgstr "СТРОКА" -#: ../src/option.c:1011 +#: ../src/option.c:425 msgid "Disable exit on middle click" msgstr "Запретить выход по щелчку средней кнопкой" -#: ../src/option.c:1017 +#: ../src/option.c:427 msgid "Doesn't show icon at startup" msgstr "Не показывать иконку при запуске" -#: ../src/option.c:1027 +#: ../src/option.c:433 msgid "Display paned dialog" msgstr "Отобразить диалог панелей" -#: ../src/option.c:1033 -msgid "Set orientation (TYPE - hor[izontal] or vert[ical])" -msgstr "Задать ориентацию (ТИП - hor[izontal] или vert[ical])" +#: ../src/option.c:435 +msgid "Set orientation (hor[izontal] or vert[ical])" +msgstr "Задать ориентацию (hor[izontal] или vert[ical])" -#: ../src/option.c:1039 +#: ../src/option.c:437 msgid "Set initial splitter position" msgstr "Задать начальную позицию разделителя" -#: ../src/option.c:1055 +#: ../src/option.c:443 +msgid "Display picture dialog" +msgstr "Отобразить диалог показа картинки" + +#: ../src/option.c:445 +msgid "Set initial size (fit or orig)" +msgstr "Задать начальный размер (fit или orig)" + +#: ../src/option.c:447 +msgid "Set increment for picture scaling (default - 5)" +msgstr "Задать шаг для масштабирования картинки (по умолчанию - 5)" + +#: ../src/option.c:453 msgid "Display printing dialog" msgstr "Отобразить диалог печати" -#: ../src/option.c:1061 -msgid "Source filename" -msgstr "Имя исходного файла" - -#: ../src/option.c:1067 -msgid "Set source type (TYPE - TEXT, IMAGE or RAW)" -msgstr "Тип исходных данных (ТИП - TEXT, IMAGE или RAW)" +#: ../src/option.c:455 +msgid "Set source type (text, image or raw)" +msgstr "Тип исходных данных (text, image или raw)" -#: ../src/option.c:1073 +#: ../src/option.c:457 msgid "Add headers to page" msgstr "Добавлять колонтитулы на страницу" -#: ../src/option.c:1079 -msgid "Enable preview in print dialog" -msgstr "Разрешить предпросмотр в диалоге печати" - -#: ../src/option.c:1085 ../src/option.c:1256 -msgid "Use specified font" -msgstr "Использовать указанный шрифт" - -#: ../src/option.c:1095 +#: ../src/option.c:463 msgid "Display progress indication dialog" msgstr "Отобразить диалог хода процесса" -#: ../src/option.c:1101 +#: ../src/option.c:465 msgid "Set progress text" msgstr "Показывать текст на индикаторе" -#: ../src/option.c:1107 +#: ../src/option.c:467 msgid "Set initial percentage" msgstr "Задать начальный процент" -#: ../src/option.c:1108 +#: ../src/option.c:467 msgid "PERCENTAGE" msgstr "ПРОЦЕНТЫ" -#: ../src/option.c:1113 +#: ../src/option.c:469 msgid "Pulsate progress bar" msgstr "Пульсирующий индикатор прогресса" -#: ../src/option.c:1120 +#: ../src/option.c:472 #, no-c-format msgid "Dismiss the dialog when 100% has been reached" msgstr "Закрыть диалог по достижении 100%" -#: ../src/option.c:1134 +#: ../src/option.c:478 msgid "Right-To-Left progress bar direction" msgstr "Направление индикатора Справа-Налево" -#: ../src/option.c:1140 +#: ../src/option.c:480 msgid "Show log window" msgstr "Показать окно журнала" -#: ../src/option.c:1146 +#: ../src/option.c:482 msgid "Expand log window" msgstr "Развернуть окно журнала" -#: ../src/option.c:1152 +#: ../src/option.c:484 msgid "Place log window above progress bar" msgstr "Разместить окно журнала над индикатором прогресса" -#: ../src/option.c:1158 +#: ../src/option.c:486 msgid "Height of log window" msgstr "Высота окна журнала" -#: ../src/option.c:1168 +#: ../src/option.c:492 msgid "Display scale dialog" msgstr "Отобразить диалог масштаба" -#: ../src/option.c:1174 +#: ../src/option.c:494 msgid "Set initial value" msgstr "Задать начальное значение" -#: ../src/option.c:1175 ../src/option.c:1181 ../src/option.c:1187 -#: ../src/option.c:1193 ../src/option.c:1199 +#: ../src/option.c:494 ../src/option.c:496 ../src/option.c:498 +#: ../src/option.c:500 ../src/option.c:502 msgid "VALUE" msgstr "ЗНАЧЕНИЕ" -#: ../src/option.c:1180 +#: ../src/option.c:496 msgid "Set minimum value" msgstr "Задать минимальное значение" -#: ../src/option.c:1186 +#: ../src/option.c:498 msgid "Set maximum value" msgstr "Задать максимальное значение" -#: ../src/option.c:1192 +#: ../src/option.c:500 msgid "Set step size" msgstr "Задать шаг" -#: ../src/option.c:1198 +#: ../src/option.c:502 msgid "Set paging size" msgstr "Задать шаг страницы" -#: ../src/option.c:1204 +#: ../src/option.c:504 msgid "Print partial values" msgstr "Печатать частичные значения" -#: ../src/option.c:1210 +#: ../src/option.c:506 msgid "Hide value" msgstr "Скрыть величину" -#: ../src/option.c:1216 -msgid "Show vertical scale" -msgstr "Показывать вертикальную шкалу" - -#: ../src/option.c:1222 +#: ../src/option.c:508 msgid "Invert direction" msgstr "Инвертировать направление" -#: ../src/option.c:1228 +#: ../src/option.c:510 msgid "Add mark to scale (may be used multiple times)" msgstr "Добавить метку (может использоваться несколько раз)" -#: ../src/option.c:1229 +#: ../src/option.c:510 msgid "NAME:VALUE" msgstr "ИМЯ:ЗНАЧЕНИЕ" -#: ../src/option.c:1238 +#: ../src/option.c:516 msgid "Display text information dialog" msgstr "Отобразить диалог с текстовой информацией" -#: ../src/option.c:1244 +#: ../src/option.c:518 msgid "Use specified color for text" msgstr "Использовать указанный цвет текста" -#: ../src/option.c:1250 +#: ../src/option.c:520 msgid "Use specified color for background" msgstr "Использовать указанный цвет фона" -#: ../src/option.c:1262 +#: ../src/option.c:522 msgid "Enable text wrapping" msgstr "Разрешить перенос текста" -#: ../src/option.c:1268 -msgid "Set justification (TYPE - left, right, center or fill)" -msgstr "Установить выравнивание (ТИП - left, right, center или fill)" +#: ../src/option.c:524 +msgid "Set justification (left, right, center or fill)" +msgstr "Установить выравнивание (left, right, center или fill)" -#: ../src/option.c:1274 +#: ../src/option.c:526 msgid "Set text margins" msgstr "Установить отступы" -#: ../src/option.c:1275 +#: ../src/option.c:526 msgid "SIZE" msgstr "РАЗМЕР" -#: ../src/option.c:1280 +#: ../src/option.c:528 msgid "Autoscroll to end of text" msgstr "Автопрокрутка в конец текста" -#: ../src/option.c:1286 -msgid "Open file" -msgstr "Открыть файл" - -#: ../src/option.c:1298 +#: ../src/option.c:530 msgid "Make URI clickable" msgstr "Сделать ссылки активными" -#: ../src/option.c:1304 +#: ../src/option.c:532 msgid "Use specified color for links" msgstr "Использовать указанный цвет для ссылок" -#: ../src/option.c:1310 -msgid "Listen for data on stdin in addition to file" -msgstr "Получать данные из стандартного потока ввода в дополнение к файлу" - -#: ../src/option.c:1320 +#: ../src/option.c:538 msgid "Sets a filename filter" msgstr "Задать фильтр файлов по маске" -#: ../src/option.c:1321 +#: ../src/option.c:538 msgid "NAME | PATTERN1 PATTERN2 ..." msgstr "ИМЯ | ШАБЛОН1 ШАБЛОН2 ..." -#: ../src/option.c:1326 +#: ../src/option.c:540 msgid "Sets a mime-type filter" msgstr "Задать фильтр файлов по типу mime" -#: ../src/option.c:1327 +#: ../src/option.c:540 msgid "NAME | MIME1 MIME2 ..." msgstr "ИМЯ | ТИП1 ТИП2 ..." -#: ../src/option.c:1332 +#: ../src/option.c:542 msgid "Add filter for images" msgstr "Добавить фильтр изображений" -#: ../src/option.c:1333 +#: ../src/option.c:542 msgid "NAME" msgstr "ИМЯ" -#: ../src/option.c:1338 -msgid "Enable preview" -msgstr "Добавить предпросмотр" - -#: ../src/option.c:1348 +#: ../src/option.c:548 msgid "Show about dialog" msgstr "Показать диалог 'О программе'" -#: ../src/option.c:1354 +#: ../src/option.c:550 msgid "Print version" msgstr "Вывести версию" -#: ../src/option.c:1360 +#: ../src/option.c:552 msgid "Load additional GTK settings from file" msgstr "Загрузить дополнительные настройки GTK из файла" -#: ../src/option.c:1370 +#: ../src/option.c:558 msgid "Load extra arguments from file" msgstr "Загрузить дополнительные аргументы из файла" -#: ../src/option.c:1415 ../src/option.c:1708 +#: ../src/option.c:599 ../src/option.c:892 #, c-format msgid "Unknown align type: %s\n" msgstr "Неизвестный тип выравнивания: %s\n" -#: ../src/option.c:1572 +#: ../src/option.c:756 #, c-format msgid "Mark %s doesn't have a value\n" msgstr "Метке %s не задано значение\n" -#: ../src/option.c:1609 +#: ../src/option.c:793 msgid "Images" msgstr "Изображения" -#: ../src/option.c:1674 +#: ../src/option.c:858 #, c-format msgid "Unknown color mode: %s\n" msgstr "Неизвестный режим цвета: '%s'\n" -#: ../src/option.c:1693 +#: ../src/option.c:877 #, c-format msgid "Unknown buttons layout type: %s\n" msgstr "Неизвестный тип расположения кнопок: %s\n" -#: ../src/option.c:1725 +#: ../src/option.c:909 #, c-format msgid "Unknown justification type: %s\n" msgstr "Неизвестный тип выравнивания: %s\n" -#: ../src/option.c:1742 +#: ../src/option.c:926 #, c-format msgid "Unknown tab position type: %s\n" msgstr "Неизвестный тип позиции вкладки: %s\n" -#: ../src/option.c:1778 +#: ../src/option.c:962 #, c-format msgid "Unknown ellipsize type: %s\n" msgstr "Неизвестный тип усечения: %s\n" -#: ../src/option.c:1791 +#: ../src/option.c:975 #, c-format msgid "Unknown orientation: %s\n" msgstr "Неизвестная ориентация: %s\n" -#: ../src/option.c:1806 +#: ../src/option.c:990 #, c-format msgid "Unknown source type: %s\n" msgstr "Неизвестный исходный тип: %s\n" -#: ../src/option.c:1817 +#: ../src/option.c:1001 msgid "Progress log" msgstr "Окно журнала" -#: ../src/option.c:1925 +#: ../src/option.c:1014 +#, c-format +msgid "Unknown size type: %s\n" +msgstr "Неизвестный тип размера: %s\n" + +#: ../src/option.c:1038 +#, c-format +msgid "Unknown completion type: %s\n" +msgstr "Неизвестный тип дополнения: %s\n" + +#: ../src/option.c:1137 #, c-format msgid "Unknown signal: %s\n" msgstr "Неизвестный сигнал: %s\n" -#: ../src/option.c:2081 +#: ../src/option.c:1300 msgid "File exist. Overwrite?" msgstr "Файл существует. Перезаписать?" -#: ../src/option.c:2198 +#: ../src/option.c:1423 msgid "- Yet another dialoging program" msgstr "- Программа для отображения диалогов" #. Adds general option entries -#: ../src/option.c:2202 +#: ../src/option.c:1427 msgid "General options" msgstr "Основные параметры" -#: ../src/option.c:2202 +#: ../src/option.c:1427 msgid "Show general options" msgstr "Показывать основные параметры" +#. Adds common option entries +#: ../src/option.c:1433 +msgid "Common options" +msgstr "Общие параметры" + +#: ../src/option.c:1433 +msgid "Show common options" +msgstr "Показывать общие параметры диалогов" + #. Adds calendar option entries -#: ../src/option.c:2208 +#: ../src/option.c:1439 msgid "Calendar options" msgstr "Параметры календаря" -#: ../src/option.c:2208 +#: ../src/option.c:1439 msgid "Show calendar options" msgstr "Показывать параметры календаря" #. Adds color option entries -#: ../src/option.c:2214 +#: ../src/option.c:1445 msgid "Color selection options" msgstr "Параметры диалога выбора цвета" -#: ../src/option.c:2214 +#: ../src/option.c:1445 msgid "Show color selection options" msgstr "Показывать параметры диалога выбора цвета" #. Adds dnd option entries -#: ../src/option.c:2220 +#: ../src/option.c:1451 msgid "DND options" msgstr "Параметры DND" -#: ../src/option.c:2220 +#: ../src/option.c:1451 msgid "Show drag-n-drop options" msgstr "Показывать параметры dnd" #. Adds entry option entries -#: ../src/option.c:2226 +#: ../src/option.c:1457 msgid "Text entry options" msgstr "Параметры ввода текста" -#: ../src/option.c:2226 +#: ../src/option.c:1457 msgid "Show text entry options" msgstr "Показывать параметры ввода текста" #. Adds file selection option entries -#: ../src/option.c:2232 +#: ../src/option.c:1463 msgid "File selection options" msgstr "Параметры диалога выбора файла" -#: ../src/option.c:2232 +#: ../src/option.c:1463 msgid "Show file selection options" msgstr "Показывать параметры диалога выбора файлов" #. Add font selection option entries -#: ../src/option.c:2238 +#: ../src/option.c:1469 msgid "Font selection options" msgstr "Параметры диалога выбора шрифта" -#: ../src/option.c:2238 +#: ../src/option.c:1469 msgid "Show font selection options" msgstr "Показывать параметры диалога выбора шрифта" #. Add form option entries -#: ../src/option.c:2244 +#: ../src/option.c:1475 msgid "Form options" msgstr "Параметры диалога формы" -#: ../src/option.c:2244 +#: ../src/option.c:1475 msgid "Show form options" msgstr "Показывать параметры диалога формы" #. Add html options entries -#: ../src/option.c:2251 +#: ../src/option.c:1482 msgid "HTML options" msgstr "Параметры HTML диалога" -#: ../src/option.c:2251 +#: ../src/option.c:1482 msgid "Show HTML options" msgstr "Показывать параметры HTML диалога" #. Add icons option entries -#: ../src/option.c:2258 +#: ../src/option.c:1489 msgid "Icons box options" msgstr "Параметры диалога значков" -#: ../src/option.c:2258 +#: ../src/option.c:1489 msgid "Show icons box options" msgstr "Показывать параметры диалога значков быстрого доступа" #. Adds list option entries -#: ../src/option.c:2264 +#: ../src/option.c:1495 msgid "List options" msgstr "Параметры списка" -#: ../src/option.c:2264 +#: ../src/option.c:1495 msgid "Show list options" msgstr "Показывать параметры списка" #. Adds multi progress option entries -#: ../src/option.c:2270 +#: ../src/option.c:1501 msgid "Multi progress bars options" msgstr "Параметры диалога с несколькими индикаторами" -#: ../src/option.c:2271 +#: ../src/option.c:1502 msgid "Show multi progress bars options" msgstr "Показывать параметры диалога с несколькими индикаторами" #. Adds notebook option entries -#: ../src/option.c:2277 +#: ../src/option.c:1508 msgid "Notebook options" msgstr "Параметры диалога с вкладками" -#: ../src/option.c:2277 +#: ../src/option.c:1508 msgid "Show notebook dialog options" msgstr "Показывать параметры диалога с вкладками" #. Adds notification option entries -#: ../src/option.c:2283 +#: ../src/option.c:1514 msgid "Notification icon options" msgstr "Параметры значка уведомления" -#: ../src/option.c:2284 +#: ../src/option.c:1515 msgid "Show notification icon options" msgstr "Показывать параметры значка уведомления" #. Adds paned option entries -#: ../src/option.c:2290 +#: ../src/option.c:1521 msgid "Paned dialog options" msgstr "Параметры диалога с панелями" -#: ../src/option.c:2290 +#: ../src/option.c:1521 msgid "Show paned dialog options" msgstr "Показывать параметры диалога с панелями" +#. Adds picture option entries +#: ../src/option.c:1527 +msgid "Picture dialog options" +msgstr "Параметры диалога показа картинки" + +#: ../src/option.c:1527 +msgid "Show picture dialog options" +msgstr "Показывать параметры диалога отображения картинки" + #. Adds print option entries -#: ../src/option.c:2296 +#: ../src/option.c:1533 msgid "Print dialog options" msgstr "Параметры диалога печати" -#: ../src/option.c:2296 +#: ../src/option.c:1533 msgid "Show print dialog options" msgstr "Показывать параметры диалога печати" #. Adds progress option entries -#: ../src/option.c:2302 +#: ../src/option.c:1539 msgid "Progress options" msgstr "Параметры хода процесса" -#: ../src/option.c:2302 +#: ../src/option.c:1539 msgid "Show progress options" msgstr "Показывать параметры хода процесса" #. Adds scale option entries -#: ../src/option.c:2308 +#: ../src/option.c:1545 msgid "Scale options" msgstr "Параметры масштаба" -#: ../src/option.c:2308 +#: ../src/option.c:1545 msgid "Show scale options" msgstr "Показывать параметры масштаба" #. Adds text option entries -#: ../src/option.c:2314 +#: ../src/option.c:1551 msgid "Text information options" msgstr "Параметры текстовой информации" -#: ../src/option.c:2314 +#: ../src/option.c:1551 msgid "Show text information options" msgstr "Показывать параметры текстовой информации" #. Adds file filters option entries -#: ../src/option.c:2320 +#: ../src/option.c:1557 msgid "File filter options" msgstr "Параметры фильтров диалога выбора файла" -#: ../src/option.c:2320 +#: ../src/option.c:1557 msgid "Show file filter options" msgstr "Показывать параметры фильтров диалога выбора файлов" #. Adds miscellaneous option entries -#: ../src/option.c:2326 +#: ../src/option.c:1563 msgid "Miscellaneous options" msgstr "Дополнительные параметры" -#: ../src/option.c:2326 +#: ../src/option.c:1563 msgid "Show miscellaneous options" msgstr "Показывать дополнительные параметры" +#: ../src/picture.c:177 +msgid "Fit to window" +msgstr "По размерам окна" + +#: ../src/picture.c:184 +msgid "Original size" +msgstr "Оригинальный размер" + +#: ../src/picture.c:191 +msgid "Increase size" +msgstr "Увеличить" + +#: ../src/picture.c:198 +msgid "Decrease size" +msgstr "Уменьшить" + +#: ../src/picture.c:209 +msgid "Rotate left" +msgstr "Повернуть влево" + +#: ../src/picture.c:216 +msgid "Rotate right" +msgstr "Повернуть вправо" + +#: ../src/picture.c:223 +msgid "Flip vertical" +msgstr "Вывернуть вертикально" + +#: ../src/picture.c:230 +msgid "Flip horizontal" +msgstr "Вывернуть горизонтально" + #: ../src/print.c:199 ../src/print.c:365 #, c-format msgid "Printing failed: %s\n" @@ -1493,7 +1526,7 @@ msgid "Category" msgstr "Категория" -#: ../src/browser.c:356 +#: ../src/browser.c:357 msgid "Icons" msgstr "Иконки" diff -Nru yad-0.31.0/po/uk.po yad-0.33.1/po/uk.po --- yad-0.31.0/po/uk.po 2015-09-11 10:17:29.000000000 +0000 +++ yad-0.33.1/po/uk.po 2015-12-29 14:49:22.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: YAD\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-09-10 08:27+0300\n" +"POT-Creation-Date: 2015-12-29 16:46+0200\n" "PO-Revision-Date: 2009-04-30 16:47+0300\n" "Last-Translator: Victor Ananjevsky \n" "Language-Team: \n" @@ -15,7 +15,6 @@ "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: KBabel 1.11.2\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" @@ -92,31 +91,31 @@ msgid "Initial value greater than maximum.\n" msgstr "Початкове значення - більше за максимальне.\n" -#: ../src/form.c:407 +#: ../src/form.c:412 msgid "Select files" msgstr "Вибір файлу" -#: ../src/form.c:415 +#: ../src/form.c:420 msgid "Select folders" msgstr "Вибір каталогів" -#: ../src/form.c:492 +#: ../src/form.c:497 msgid "Select or create file" msgstr "Вибір або створення файлу" -#: ../src/form.c:500 +#: ../src/form.c:505 msgid "Select or create folder" msgstr "Вибір або створення каталогу" -#: ../src/form.c:549 +#: ../src/form.c:554 msgid "Select date" msgstr "Вибір дати" -#: ../src/form.c:767 +#: ../src/form.c:844 msgid "Select file" msgstr "Вибір файлу" -#: ../src/form.c:795 +#: ../src/form.c:872 msgid "Select folder" msgstr "Вибір каталогу" @@ -130,17 +129,17 @@ msgid "Unable to open directory %s: %s\n" msgstr "Не можу відкрити каталог %s: %s\n" -#: ../src/main.c:103 ../src/main.c:258 +#: ../src/main.c:96 ../src/main.c:434 #, c-format msgid "%d sec" msgstr "%d сек" -#: ../src/main.c:692 ../src/main.c:699 +#: ../src/main.c:663 ../src/main.c:670 #, c-format msgid "Unable to parse YAD_OPTIONS: %s\n" msgstr "Не можу розібрати YAD_OPTIONS: %s\n" -#: ../src/main.c:710 +#: ../src/main.c:681 #, c-format msgid "Unable to parse command line: %s\n" msgstr "Не вдається розібрати командний рядок: %s\n" @@ -164,19 +163,19 @@ msgid "Yad notification" msgstr "Діалог повідомлень" -#: ../src/list.c:769 +#: ../src/list.c:783 msgid "Add row" msgstr "Додати рядок" -#: ../src/list.c:776 +#: ../src/list.c:790 msgid "Delete row" msgstr "Видалити рядок" -#: ../src/list.c:783 +#: ../src/list.c:797 msgid "Duplicate row" msgstr "Скопіювати рядок" -#: ../src/list.c:818 +#: ../src/list.c:836 #, c-format msgid "No column titles specified for List dialog.\n" msgstr "Не задані заголовки стовпчиків для діалогу зі списком\n" @@ -185,537 +184,566 @@ msgid "Set the dialog title" msgstr "Задати заголовок діалогу" -#: ../src/option.c:79 +#: ../src/option.c:78 msgid "TITLE" msgstr "ЗАГОЛОВОК" -#: ../src/option.c:84 +#: ../src/option.c:80 msgid "Set the window icon" msgstr "Задати іконку діалогу" -#: ../src/option.c:85 +#: ../src/option.c:80 msgid "ICONPATH" msgstr "ІКОНКА" -#: ../src/option.c:90 +#: ../src/option.c:82 msgid "Set the width" msgstr "Задати ширину вікна" -#: ../src/option.c:91 +#: ../src/option.c:82 msgid "WIDTH" msgstr "ШИРИНА" -#: ../src/option.c:96 +#: ../src/option.c:84 msgid "Set the height" msgstr "Задати висоту вікна" -#: ../src/option.c:97 +#: ../src/option.c:84 msgid "HEIGHT" msgstr "ВИСОТА" -#: ../src/option.c:102 +#: ../src/option.c:86 msgid "Set the window geometry" msgstr "Задати геометрію вікна" -#: ../src/option.c:103 +#: ../src/option.c:86 msgid "WxH+X+Y" msgstr "ВxШ+X+Y" -#: ../src/option.c:108 +#: ../src/option.c:88 msgid "Set dialog timeout in seconds" msgstr "Задати час роботи діалогу в секундах" -#: ../src/option.c:109 +#: ../src/option.c:88 msgid "TIMEOUT" msgstr "ЗАТРИМКА" -#: ../src/option.c:114 +#: ../src/option.c:90 msgid "Show remaining time indicator (top, bottom, left, right)" msgstr "Показник часу, який залишився (top, bottom, left, right)" -#: ../src/option.c:115 ../src/option.c:1040 +#: ../src/option.c:90 ../src/option.c:437 msgid "POS" msgstr "ПОЗИЦІЯ" -#: ../src/option.c:120 +#: ../src/option.c:92 msgid "Set the dialog text" msgstr "Задати текст діалогу" -#: ../src/option.c:121 ../src/option.c:151 ../src/option.c:428 -#: ../src/option.c:434 ../src/option.c:440 ../src/option.c:568 -#: ../src/option.c:859 ../src/option.c:1102 ../src/option.c:1141 +#: ../src/option.c:92 ../src/option.c:102 ../src/option.c:243 +#: ../src/option.c:245 ../src/option.c:247 ../src/option.c:283 +#: ../src/option.c:380 ../src/option.c:465 ../src/option.c:480 msgid "TEXT" msgstr "ТЕКСТ" -#: ../src/option.c:126 +#: ../src/option.c:94 msgid "Set the dialog text alignment (left, center, right, fill)" msgstr "Задати вирівнювання тексту діалогу (left, center, right, fill)" -#: ../src/option.c:127 ../src/option.c:169 ../src/option.c:591 -#: ../src/option.c:817 ../src/option.c:917 ../src/option.c:960 -#: ../src/option.c:1034 ../src/option.c:1068 ../src/option.c:1269 +#: ../src/option.c:94 ../src/option.c:108 ../src/option.c:191 +#: ../src/option.c:293 ../src/option.c:318 ../src/option.c:366 +#: ../src/option.c:396 ../src/option.c:413 ../src/option.c:435 +#: ../src/option.c:445 ../src/option.c:455 ../src/option.c:524 msgid "TYPE" msgstr "ТИП" -#: ../src/option.c:132 +#: ../src/option.c:96 msgid "Set the dialog image" msgstr "Задати зображення діалогу" -#: ../src/option.c:133 ../src/option.c:464 ../src/option.c:476 +#: ../src/option.c:96 ../src/option.c:253 ../src/option.c:257 msgid "IMAGE" msgstr "ЗОБРАЖЕННЯ" -#: ../src/option.c:138 +#: ../src/option.c:98 msgid "Show image above main widget" msgstr "Показувати зображення над основним віджетом" -#: ../src/option.c:144 +#: ../src/option.c:100 msgid "Use specified icon theme instead of default" msgstr "Використовувати вказану тему іконок" -#: ../src/option.c:145 +#: ../src/option.c:100 msgid "THEME" msgstr "ТЕМА" -#: ../src/option.c:150 +#: ../src/option.c:102 msgid "Hide main widget with expander" msgstr "Приховати головний віджет" -#: ../src/option.c:156 +#: ../src/option.c:104 msgid "Add dialog button (may be used multiple times)" msgstr "Додати кнопку (може використовуватись декілька разів)" -#: ../src/option.c:157 +#: ../src/option.c:104 msgid "NAME:ID" msgstr "ІМ'Я:ID" -#: ../src/option.c:162 +#: ../src/option.c:106 msgid "Don't show buttons" msgstr "Не показувати кнопки" -#: ../src/option.c:168 +#: ../src/option.c:108 msgid "Set buttons layout type (spread, edge, start, end or center)" msgstr "Задати тип розміщення кнопок (spread, edge, start, end або center)" # # (розкидано, по краю, на початку, по центру) -#: ../src/option.c:174 +#: ../src/option.c:110 msgid "Don't use pango markup language in dialog's text" msgstr "Не використовувати розмітку pango в тексті" -#: ../src/option.c:180 +#: ../src/option.c:112 msgid "Don't close dialog if Escape was pressed" msgstr "Не закривати діалог, якшо натиснуто Escape" -#: ../src/option.c:186 +#: ../src/option.c:114 msgid "Set window borders" msgstr "Встановити межі вікна" -#: ../src/option.c:187 ../src/option.c:266 ../src/option.c:597 -#: ../src/option.c:823 ../src/option.c:829 ../src/option.c:835 -#: ../src/option.c:841 ../src/option.c:847 ../src/option.c:853 -#: ../src/option.c:865 ../src/option.c:966 +#: ../src/option.c:114 ../src/option.c:145 ../src/option.c:163 +#: ../src/option.c:295 ../src/option.c:301 ../src/option.c:368 +#: ../src/option.c:370 ../src/option.c:372 ../src/option.c:374 +#: ../src/option.c:376 ../src/option.c:378 ../src/option.c:382 +#: ../src/option.c:415 ../src/option.c:447 msgid "NUMBER" msgstr "ЧИСЛО" -#: ../src/option.c:192 +#: ../src/option.c:116 msgid "Always print result" msgstr "Завжди виводити результат" -#: ../src/option.c:198 +#: ../src/option.c:118 msgid "Dialog text can be selected" msgstr "Текст діалогу може буди виділеним" -#: ../src/option.c:205 +#: ../src/option.c:121 msgid "Set window sticky" msgstr "Вікно на всіх стільницях" -#: ../src/option.c:211 +#: ../src/option.c:123 msgid "Set window unresizable" msgstr "Незмінний розмір вікна" -#: ../src/option.c:217 +#: ../src/option.c:125 msgid "Place window on top" msgstr "Розташувати вікно над іншими" -#: ../src/option.c:223 +#: ../src/option.c:127 msgid "Place window on center of screen" msgstr "Розташувати вікно по центру екрана" -#: ../src/option.c:229 +#: ../src/option.c:129 msgid "Place window at the mouse position" msgstr "Розташувати вікно в положенні мишки" -#: ../src/option.c:235 +#: ../src/option.c:131 msgid "Set window undecorated" msgstr "Прибрати декорації вікна" -#: ../src/option.c:241 +#: ../src/option.c:133 msgid "Don't show window in taskbar" msgstr "Не показувати вікна в панелі завдань" -#: ../src/option.c:247 +#: ../src/option.c:135 msgid "Set window maximized" msgstr "Задати вікну максимальний розмір" -#: ../src/option.c:253 +#: ../src/option.c:137 msgid "Set window fulscreen" msgstr "Розгорнути вікно на весь екран" -#: ../src/option.c:259 +#: ../src/option.c:139 +msgid "Don't focus dialog window" +msgstr "Не надавати фокус вікну діалогу" + +#: ../src/option.c:141 +msgid "Open window as a splashscreen" +msgstr "Відкрити вікно у режимі splashscreen" + +#: ../src/option.c:143 msgid "Special type of dialog for XEMBED" msgstr "Особливий режим діалогу для вбудовування" -#: ../src/option.c:260 ../src/option.c:948 ../src/option.c:1046 +#: ../src/option.c:143 ../src/option.c:189 msgid "KEY" msgstr "КЛЮЧ" -#: ../src/option.c:265 +#: ../src/option.c:145 msgid "Tab nubmer of this dialog" msgstr "Номер вкладки для цього діалогу" -#: ../src/option.c:272 +#: ../src/option.c:148 msgid "XID of parent window" msgstr "Ідентифікатор батьківського вікна" -#: ../src/option.c:278 +#: ../src/option.c:150 msgid "Send SIGNAL to parent" msgstr "Послати СИГНАЛ батьківському процесу" -#: ../src/option.c:279 +#: ../src/option.c:150 msgid "SIGNAL" msgstr "СИГНАЛ" -#: ../src/option.c:284 +#: ../src/option.c:152 msgid "Print X Window Id to the stderr" msgstr "Вивести ідентифікатор вікна на stderr" -#: ../src/option.c:291 +#: ../src/option.c:155 msgid "Add path for search icons by name" msgstr "Додати каталог для пошуку іконок" -#: ../src/option.c:292 +#: ../src/option.c:155 msgid "PATH" msgstr "КАТАЛОГ" -#: ../src/option.c:301 +#: ../src/option.c:161 +msgid "Set the format for the returned date" +msgstr "Задати формат відображення дати" + +#: ../src/option.c:161 ../src/option.c:338 +msgid "PATTERN" +msgstr "ШАБЛОН" + +#: ../src/option.c:163 +msgid "Set presicion of floating numbers (default - 3)" +msgstr "Задати точнісь чисел з плаваючою точкою (за умовчанням - 3)" + +#: ../src/option.c:165 +msgid "Set command handler" +msgstr "Задати команду-обробник" + +#: ../src/option.c:165 ../src/option.c:255 ../src/option.c:259 +#: ../src/option.c:384 +msgid "CMD" +msgstr "КОМАНДА" + +#: ../src/option.c:167 +msgid "Listen for data on stdin" +msgstr "Читати дані зі стандартного вводу" + +#: ../src/option.c:169 +msgid "Set common separator character" +msgstr "Встановити загальний розділювач" + +#: ../src/option.c:169 ../src/option.c:171 +msgid "SEPARATOR" +msgstr "РОЗДІЛЮВАЧ" + +#: ../src/option.c:171 +msgid "Set item separator character" +msgstr "Встановити розділювач для елементів" + +#: ../src/option.c:173 +msgid "Allow changes to text in some cases" +msgstr "Дозволити змінювати текст у деяких режимах" + +#: ../src/option.c:175 +msgid "Quote dialogs output" +msgstr "Виводити значення у лапках" + +#: ../src/option.c:177 +msgid "Output number instead of text for combo-box" +msgstr "Виводити число замість тексту для списку значень" + +#: ../src/option.c:179 +msgid "Specify font name to use" +msgstr "Задати ім'я використовуємого шрифту" + +#: ../src/option.c:179 +msgid "FONTNAME" +msgstr "НАЗВА_ШРИФТУ" + +#: ../src/option.c:181 +msgid "Allow multiple selection" +msgstr "Дозволити вибір декількох елементів" + +#: ../src/option.c:183 +msgid "Enable preview" +msgstr "Додати попередній перегляд" + +#: ../src/option.c:185 +msgid "Set source filename" +msgstr "Задати ім'я файлу" + +#: ../src/option.c:185 ../src/option.c:205 ../src/option.c:219 +#: ../src/option.c:552 ../src/option.c:558 +msgid "FILENAME" +msgstr "НАЗВА ФАЙЛУ" + +#: ../src/option.c:187 +msgid "Set vertical orientation" +msgstr "Викорістовувати вертикальну орієнтацію" + +#: ../src/option.c:189 +msgid "Identifier of embedded dialogs" +msgstr "Ідентифікатор діалогів що вбудовуваються" + +#: ../src/option.c:191 +msgid "Set extended completion for entries (any, all, or regex)" +msgstr "Задати розширене доповнення для текстових полів (any, all або regex)" + +#: ../src/option.c:197 msgid "Display calendar dialog" msgstr "Відобразити діалог для вибору дати" -#: ../src/option.c:307 +#: ../src/option.c:199 msgid "Set the calendar day" msgstr "Задати календарний день" -#: ../src/option.c:308 +#: ../src/option.c:199 msgid "DAY" msgstr "ДЕНЬ" -#: ../src/option.c:313 +#: ../src/option.c:201 msgid "Set the calendar month" msgstr "Задати календарний місяць" -#: ../src/option.c:314 +#: ../src/option.c:201 msgid "MONTH" msgstr "МІСЯЦЬ" -#: ../src/option.c:319 +#: ../src/option.c:203 msgid "Set the calendar year" msgstr "Задати календарний рік" -#: ../src/option.c:320 +#: ../src/option.c:203 msgid "YEAR" msgstr "РІК" -#: ../src/option.c:325 ../src/option.c:614 -msgid "Set the format for the returned date" -msgstr "Задати формат відображення дати" - -#: ../src/option.c:326 ../src/option.c:615 ../src/option.c:722 -msgid "PATTERN" -msgstr "ШАБЛОН" - -#: ../src/option.c:331 +#: ../src/option.c:205 msgid "Set the filename with dates details" msgstr "Задати назву файлу з описом дат" -#: ../src/option.c:332 ../src/option.c:366 ../src/option.c:504 -#: ../src/option.c:1062 ../src/option.c:1287 ../src/option.c:1361 -#: ../src/option.c:1371 -msgid "FILENAME" -msgstr "НАЗВА ФАЙЛУ" - -#: ../src/option.c:341 +#: ../src/option.c:211 msgid "Display color selection dialog" msgstr "Відобразити діалог для вибору кольору" -#: ../src/option.c:347 +#: ../src/option.c:213 msgid "Alias for --color" msgstr "Синонім для --color" -#: ../src/option.c:353 +#: ../src/option.c:215 msgid "Set initial color value" msgstr "Задати початковий колір" -#: ../src/option.c:354 ../src/option.c:1245 ../src/option.c:1251 -#: ../src/option.c:1305 +#: ../src/option.c:215 ../src/option.c:518 ../src/option.c:520 +#: ../src/option.c:532 msgid "COLOR" msgstr "КОЛІР" -#: ../src/option.c:359 +#: ../src/option.c:217 msgid "Show system palette in color dialog" msgstr "Відобразити системну палітру" -#: ../src/option.c:365 +#: ../src/option.c:219 msgid "Set path to palette file. Default - " msgstr "Задати шлях до файлу кольорів. Без назви - " -#: ../src/option.c:371 +#: ../src/option.c:221 msgid "Expand user palette" msgstr "Розкривати палітру користувача" -#: ../src/option.c:377 +#: ../src/option.c:223 msgid "Set output mode to MODE. Values are hex (default) or rgb" msgstr "" "Встановити режим вивода в РЕЖИМ. Значення - hex (за умовчанням) або rgb" -#: ../src/option.c:378 +#: ../src/option.c:223 msgid "MODE" msgstr "РЕЖИМ" -#: ../src/option.c:383 +#: ../src/option.c:225 msgid "Use #rrrrggggbbbb format instead of #rrggbb" msgstr "Використовувати формат #rrrrggggbbbb замість #rrggbb" -#: ../src/option.c:389 +#: ../src/option.c:227 msgid "Add opacity to output color value" msgstr "Додати прозорість до значення кольору" -#: ../src/option.c:399 +#: ../src/option.c:233 msgid "Display drag-n-drop box" msgstr "Відобразити діалог для перехоплення dnd" -#: ../src/option.c:405 +#: ../src/option.c:235 msgid "Use dialog text as tooltip" msgstr "Використовувати текст діалогу в якості підказки" -#: ../src/option.c:411 -msgid "Set command for process d-n-d data" -msgstr "Команда для обробки отриманих даних" - -#: ../src/option.c:412 ../src/option.c:470 ../src/option.c:482 -#: ../src/option.c:871 ../src/option.c:982 -msgid "CMD" -msgstr "КОМАНДА" - -#: ../src/option.c:421 +#: ../src/option.c:241 msgid "Display text entry or combo-box dialog" msgstr "Відобразити діалог для вводу тексту або вибору варіанта" -#: ../src/option.c:427 +#: ../src/option.c:243 msgid "Set the entry label" msgstr "Задати мітку поля вводу" -#: ../src/option.c:433 +#: ../src/option.c:245 msgid "Set the entry text" msgstr "Задати текст для поля вводу" -#: ../src/option.c:439 +#: ../src/option.c:247 msgid "Hide the entry text" msgstr "Приховати введений текст (Пароль)" -#: ../src/option.c:445 +#: ../src/option.c:249 msgid "Use completion instead of combo-box" msgstr "Використовувати автозаповнення замість списку значень" -#: ../src/option.c:451 +#: ../src/option.c:251 msgid "Use spin button for text entry" msgstr "Використовувати числове поле замість тексту" -#: ../src/option.c:457 -msgid "Allow changes to text in combo-box" -msgstr "Дозволити змінювати текст у режимі вибору варіанта" - -#: ../src/option.c:463 +#: ../src/option.c:253 msgid "Set the left entry icon" msgstr "Задати ліву іконку" -#: ../src/option.c:469 +#: ../src/option.c:255 msgid "Set the left entry icon action" msgstr "Дія для лівої іконки" -#: ../src/option.c:475 +#: ../src/option.c:257 msgid "Set the right entry icon" msgstr "Задати праву іконку" -#: ../src/option.c:481 +#: ../src/option.c:259 msgid "Set the right entry icon action" msgstr "Дія для правої іконки" -#: ../src/option.c:491 +#: ../src/option.c:265 msgid "Display file selection dialog" msgstr "Відобразити діалог для вибору файла" -#: ../src/option.c:497 +#: ../src/option.c:267 msgid "Alias for --file" msgstr "Синонім для --file" -#: ../src/option.c:503 -msgid "Set the filename" -msgstr "Задати назву файлу" - -#: ../src/option.c:509 -msgid "Allow multiple files to be selected" -msgstr "Дозволити вибір декількох файлів" - -#: ../src/option.c:515 +#: ../src/option.c:269 msgid "Activate directory-only selection" msgstr "Активувати виділення тільки по каталогах" -#: ../src/option.c:521 +#: ../src/option.c:271 msgid "Activate save mode" msgstr "Активувати режим зберігання" -#: ../src/option.c:527 ../src/option.c:602 ../src/option.c:792 -msgid "Set output separator character" -msgstr "Встановити вихідний розділювач" - -#: ../src/option.c:528 ../src/option.c:603 ../src/option.c:609 -#: ../src/option.c:793 ../src/option.c:994 ../src/option.c:1000 -msgid "SEPARATOR" -msgstr "РОЗДІЛЮВАЧ" - -#: ../src/option.c:533 +#: ../src/option.c:273 msgid "Confirm file selection if filename already exists" msgstr "Підтвердити вибір файлу, якщо файл вже існує" -#: ../src/option.c:534 +#: ../src/option.c:273 msgid "[TEXT]" msgstr "[ТЕКСТ]" -#: ../src/option.c:539 ../src/option.c:626 ../src/option.c:888 -msgid "Quote dialogs output" -msgstr "Виводити значення у лапках" - -#: ../src/option.c:549 +#: ../src/option.c:279 msgid "Display font selection dialog" msgstr "Відобразити діалог для вибору шрифту" -#: ../src/option.c:555 +#: ../src/option.c:281 msgid "Alias for --font" msgstr "Синонім для --font" -#: ../src/option.c:561 -msgid "Set initial font" -msgstr "Задати початковий шрифт" - -#: ../src/option.c:562 ../src/option.c:1086 ../src/option.c:1257 -msgid "FONTNAME" -msgstr "НАЗВА_ШРИФТУ" - -#: ../src/option.c:567 -msgid "Set preview text" -msgstr "Задати текст зразка" +#: ../src/option.c:283 +msgid "Set text string for preview" +msgstr "Задати текстову стрічку для передогляду" -#: ../src/option.c:577 +#: ../src/option.c:289 msgid "Display form dialog" msgstr "Відобразити діалог форми вводу" -#: ../src/option.c:584 -msgid "" -"Add field to form (TYPE - H, RO, NUM, CHK, CB, CBE, CE, FL, SFL, MFL, DIR, " -"CDIR, MDIR, FN, DT, SCL, CLR, BTN, FBTN, LBL or TXT)" +#: ../src/option.c:291 +msgid "Add field to form (see man page for list of possible types)" msgstr "" -"Додати поле до форми (Тип поля: Н, RO, NUM, CHK, CB, CBE, CE, FL, SFL, MFL, " -"DIR, CDIR, MDIR, FN, MFL, DT, SCL, CLR, BTN, FBTN, LBL або TXT)" +"Додати поле до форми (дивись сторінку керівництва для отримання списку типів)" -#: ../src/option.c:585 ../src/option.c:905 +#: ../src/option.c:291 ../src/option.c:394 msgid "LABEL[:TYPE]" msgstr "МІТКА[:ТИП]" -#: ../src/option.c:590 +#: ../src/option.c:293 msgid "Set alignment of filed labels (left, center or right)" msgstr "Задати вирівнювання міток полів (left, center або right)" -#: ../src/option.c:596 +#: ../src/option.c:295 msgid "Set number of columns in form" msgstr "Задати кількість стовпчиків у формі" -#: ../src/option.c:608 -msgid "Set separator character for combobox or scale data" -msgstr "Задати розділювач для даних списку або числового поля" - -#: ../src/option.c:620 +#: ../src/option.c:297 msgid "Make form scrollable" msgstr "Додати прокрутку до форми" -#: ../src/option.c:632 +#: ../src/option.c:299 msgid "Order output fields by rows" msgstr "Упорядкувати виведення по рядках" -#: ../src/option.c:643 +#: ../src/option.c:301 +msgid "Set focused field" +msgstr "Задати поле що отримує фокус" + +#: ../src/option.c:303 +msgid "Cycled reading of stdin data" +msgstr "Циклічне читання зі стандартного вводу" + +#: ../src/option.c:310 msgid "Display HTML dialog" msgstr "Відобразити HTML діалог" -#: ../src/option.c:649 +#: ../src/option.c:312 msgid "Open specified location" msgstr "Відкрити вказану адресу" -#: ../src/option.c:650 -msgid "URI" -msgstr "URI" - -#: ../src/option.c:655 +#: ../src/option.c:314 msgid "Turn on browser mode" msgstr "Ввімкнути режим браузеру" -#: ../src/option.c:661 +#: ../src/option.c:316 msgid "Print clicked uri to stdout" msgstr "Друкувати натиснуті зсилки" -#: ../src/option.c:667 +#: ../src/option.c:318 msgid "Set mime type of input stream data" msgstr "Задати тип mime для вхідних даних" -#: ../src/option.c:668 -msgid "MIME" -msgstr "MIME" - -#: ../src/option.c:673 +#: ../src/option.c:320 msgid "Set encoding of input stream data" msgstr "Задати кодування для вхідних даних" -#: ../src/option.c:674 +#: ../src/option.c:320 msgid "ENCODING" msgstr "КОДУВАННЯ" -#: ../src/option.c:684 +#: ../src/option.c:327 msgid "Display icons box dialog" msgstr "Відобразити діалог з іконками швидкого доступу" -#: ../src/option.c:690 +#: ../src/option.c:329 msgid "Read data from .desktop files in specified directory" msgstr "Читати дані з файлів .desktop у вказаному каталозі" -#: ../src/option.c:691 -msgid "DIRECTORY" +#: ../src/option.c:329 +msgid "DIR" msgstr "КАТАЛОГ" -#: ../src/option.c:696 +#: ../src/option.c:331 msgid "Use compact (list) view" msgstr "Використовувати компактний вигляд (список)" -#: ../src/option.c:702 +#: ../src/option.c:333 msgid "Use GenericName field instead of Name for icon label" msgstr "Використовувати поле GenericName замість Name для мітки" -#: ../src/option.c:708 -msgid "Read data from stdin" -msgstr "Читати дані зі стандартного вводу" - -#: ../src/option.c:714 +#: ../src/option.c:335 msgid "Set the width of dialog items" msgstr "Задати ширину елемента діалогу" -#: ../src/option.c:721 +#: ../src/option.c:338 #, no-c-format msgid "" "Use specified pattern for launch command in terminal (default: xterm -e %s)" @@ -723,70 +751,62 @@ "Використовувати вказаний шаблон для запуску в терміналі (без шаблону: xterm -" "e %s)" -#: ../src/option.c:727 +#: ../src/option.c:340 msgid "Sort items by name instead of filename" msgstr "Сортувати по полю Назва замість назви файлу" -#: ../src/option.c:733 +#: ../src/option.c:342 msgid "Sort items in descending order" msgstr "Сортувати в порядку спадання" -#: ../src/option.c:739 +#: ../src/option.c:344 msgid "Activate items by single click" msgstr "Активувати елемент одним натисненням" -#: ../src/option.c:749 +#: ../src/option.c:350 msgid "Display list dialog" msgstr "Відобразити діалог зі списком" -#: ../src/option.c:755 -msgid "Set the column header (TYPE - TEXT, NUM, FLT, CHK, RD, IMG, HD or TIP)" +#: ../src/option.c:352 +msgid "Set the column header (see man page for list of possible types)" msgstr "" -"Задати заголовок стовпчика (ТИП - TEXT, NUM, FLT, CHK, RD, IMG, HD або TIP)" +"Задати заголовок стовпчика (дивись сторінку керівництва для отримання списку " +"типів)" -#: ../src/option.c:756 +#: ../src/option.c:352 msgid "COLUMN[:TYPE]" msgstr "СТОВПЧИК[:ТИП]" -#: ../src/option.c:761 +#: ../src/option.c:354 msgid "Use checkboxes for first column" msgstr "Використовувати відмітки для першого стовпчика" -#: ../src/option.c:767 +#: ../src/option.c:356 msgid "Use radioboxes for first column" msgstr "Використовувати перемикач для першого стовпчика" -#: ../src/option.c:773 +#: ../src/option.c:358 msgid "Don't show column headers" msgstr "Не показувати заголовки стовпчиків" -#: ../src/option.c:779 +#: ../src/option.c:360 msgid "Disable clickable column headers" msgstr "Заборонити натискати на заголовок" -#: ../src/option.c:785 +#: ../src/option.c:362 msgid "Disable rules hints" msgstr "Заборонити розмальовку стрічок" -#: ../src/option.c:798 -msgid "Allow multiple rows to be selected" -msgstr "Дозволити вибір декількох рядків" - -#: ../src/option.c:804 ../src/option.c:1292 -msgid "Allow changes to text" -msgstr "Дозволити змінювати текст" - -#: ../src/option.c:810 +#: ../src/option.c:364 msgid "Print all data from list" msgstr "Виводити таблицю повністю" -#: ../src/option.c:816 -msgid "Set ellipsize mode for text columns (TYPE - NONE, START, MIDDLE or END)" +#: ../src/option.c:366 +msgid "Set ellipsize mode for text columns (none, start, middle or end)" msgstr "" -"Задати тип урізання для текстових стовпчиків (ТИП - NONE, START, MIDDLE або " -"END)" +"Задати тип урізання для текстових стовпчиків (none, start, middle або end)" -#: ../src/option.c:822 +#: ../src/option.c:368 msgid "" "Print a specific column. By default or if 0 is specified will be printed all " "columns" @@ -794,15 +814,15 @@ "Виводити тільки вказаний стовпчик. Без вказівки або якщо стовпчик дорівнює " "0, будуть виведені усі стовпчики" -#: ../src/option.c:828 +#: ../src/option.c:370 msgid "Hide a specific column" msgstr "Сховати вказаний стовпчик" -#: ../src/option.c:834 +#: ../src/option.c:372 msgid "Set the column expandable by default. 0 sets all columns expandable" msgstr "Задати стовпчик, який розширюється. 0 розширює всі стовпчики" -#: ../src/option.c:840 +#: ../src/option.c:374 msgid "" "Set the quick search column. Default is first column. Set it to 0 for " "disable searching" @@ -810,600 +830,616 @@ "Задати стовпчик швидкого пошуку. Без вказівки використовується перший " "стовпчик. 0 забороняє пошук" -#: ../src/option.c:846 +#: ../src/option.c:376 msgid "Set the tooltip column" msgstr "Задати стовпчик підказок" -#: ../src/option.c:852 +#: ../src/option.c:378 msgid "Set the row separator column" msgstr "Задати стовпчик розділювача стрічок" -#: ../src/option.c:858 +#: ../src/option.c:380 msgid "Set the row separator value" msgstr "Задати значення розділювача стрічок" -#: ../src/option.c:864 +#: ../src/option.c:382 msgid "Set the limit of rows in list" msgstr "Задати кількість рядків у списку" -#: ../src/option.c:870 +#: ../src/option.c:384 msgid "Set double-click action" msgstr "Дія для подвійного натискання мишки" -#: ../src/option.c:876 +#: ../src/option.c:386 msgid "Use regex in search" msgstr "Використовувати регулярні вирази в пошуку" -#: ../src/option.c:882 -msgid "Listen for data on stdin in addition to command-line" -msgstr "Отримувати дані з потоку вводу додатково до командного рядка" - -#: ../src/option.c:898 +#: ../src/option.c:392 msgid "Display multi progress bars dialog" msgstr "Відобразити діалог з декількома індикаторами виконання" -#: ../src/option.c:904 -msgid "Add the progress bar (TYPE - NORM, RTL or PULSE)" -msgstr "Додати індикатор виконання (ТИП - NORM, RTL або PULSE)" - -#: ../src/option.c:910 -msgid "Show vertical bars" -msgstr "Відобразити вертикальні індикатори" +#: ../src/option.c:394 +msgid "Add the progress bar (norm, rtl or pulse)" +msgstr "Додати індикатор виконання (norm, rtl або pulse)" -#: ../src/option.c:916 +#: ../src/option.c:396 msgid "Set alignment of bar labels (left, center or right)" msgstr "Задати вирівнювання міток індикаторів (left, center або right)" -#: ../src/option.c:923 +#: ../src/option.c:399 #, no-c-format msgid "Dismiss the dialog when 100% of all bars has been reached" msgstr "Закрити діалог по досягненні 100% усіма індикаторами" -#: ../src/option.c:930 ../src/option.c:1127 +#: ../src/option.c:402 ../src/option.c:475 msgid "Kill parent process if cancel button is pressed" msgstr "Завершити батьківський процес, якщо натиснута кнопка відміни" -#: ../src/option.c:941 +#: ../src/option.c:409 msgid "Display notebook dialog" msgstr "Відобразити діалог із вкладинками" -#: ../src/option.c:947 ../src/option.c:1045 -msgid "Identifier of embedded dialogs" -msgstr "Ідентифікатор діалогів що вбудовуваються" - -#: ../src/option.c:953 +#: ../src/option.c:411 msgid "Add a tab to notebook" msgstr "Додати вкладку" -#: ../src/option.c:954 +#: ../src/option.c:411 msgid "LABEL" msgstr "МІТКА" -#: ../src/option.c:959 +#: ../src/option.c:413 msgid "Set position of a notebook tabs (top, bottom, left or right)" msgstr "Задати позицію ярлика вкладки (top, bottom, left, або right)" -#: ../src/option.c:965 +#: ../src/option.c:415 msgid "Set tab borders" msgstr "Задати межі вкладок" -#: ../src/option.c:975 +#: ../src/option.c:421 msgid "Display notification" msgstr "Відобразити діалог повідомлень" -#: ../src/option.c:981 -msgid "Set left-click action" -msgstr "Дія для лівої кнопки мишки" - -#: ../src/option.c:987 -msgid "Listen for commands on stdin" -msgstr "Читати команди зі стандартного вводу" - -#: ../src/option.c:993 -msgid "Set separator character for menu values" -msgstr "Встановити розділювач для значень меню" - -#: ../src/option.c:999 -msgid "Set separator character for menu items" -msgstr "Встановити розділювач для елементів меню" - -#: ../src/option.c:1005 +#: ../src/option.c:423 msgid "Set initial popup menu" msgstr "Задати початкове меню" -#: ../src/option.c:1006 +#: ../src/option.c:423 msgid "STRING" msgstr "РЯДОК" -#: ../src/option.c:1011 +#: ../src/option.c:425 msgid "Disable exit on middle click" msgstr "Заборонити вихід середньою кнопкою мишки" -#: ../src/option.c:1017 +#: ../src/option.c:427 msgid "Doesn't show icon at startup" msgstr "Не показувати іконку при старті" -#: ../src/option.c:1027 +#: ../src/option.c:433 msgid "Display paned dialog" msgstr "Відобразити діалог з панелями" -#: ../src/option.c:1033 -msgid "Set orientation (TYPE - hor[izontal] or vert[ical])" -msgstr "Задати оріентицію (ТИП - hor[izontal] або vert[ical])" +#: ../src/option.c:435 +msgid "Set orientation (hor[izontal] or vert[ical])" +msgstr "Задати оріентицію (hor[izontal] або vert[ical])" -#: ../src/option.c:1039 +#: ../src/option.c:437 msgid "Set initial splitter position" msgstr "Задати початкову позицію розділювача" -#: ../src/option.c:1055 +#: ../src/option.c:443 +msgid "Display picture dialog" +msgstr "Відобразити діалог з картинкою" + +#: ../src/option.c:445 +msgid "Set initial size (fit or orig)" +msgstr "Задати початковий розмір картинки" + +#: ../src/option.c:447 +msgid "Set increment for picture scaling (default - 5)" +msgstr "Задати інкремент для зміни розміру картинки (за умовчанням - 5)" + +#: ../src/option.c:453 msgid "Display printing dialog" msgstr "Відобразити діалог друку" -#: ../src/option.c:1061 -msgid "Source filename" -msgstr "Назва файлу" - -#: ../src/option.c:1067 -msgid "Set source type (TYPE - TEXT, IMAGE or RAW)" -msgstr "Задати тип даних (ТИП - TEXT, IMAGE або RAW)" +#: ../src/option.c:455 +msgid "Set source type (text, image or raw)" +msgstr "Задати тип даних (text, image або raw)" -#: ../src/option.c:1073 +#: ../src/option.c:457 msgid "Add headers to page" msgstr "Додати колонтитули до сторінки" -#: ../src/option.c:1079 -msgid "Enable preview in print dialog" -msgstr "Додати попередній перегляд до діалогу друку" - -#: ../src/option.c:1085 ../src/option.c:1256 -msgid "Use specified font" -msgstr "Використовувати вказаний шрифт" - -#: ../src/option.c:1095 +#: ../src/option.c:463 msgid "Display progress indication dialog" msgstr "Відобразити діалог прогресу" -#: ../src/option.c:1101 +#: ../src/option.c:465 msgid "Set progress text" msgstr "Показувати текст на індикаторі" -#: ../src/option.c:1107 +#: ../src/option.c:467 msgid "Set initial percentage" msgstr "Задати початковий процент" -#: ../src/option.c:1108 +#: ../src/option.c:467 msgid "PERCENTAGE" msgstr "ВІДСОТКИ" -#: ../src/option.c:1113 +#: ../src/option.c:469 msgid "Pulsate progress bar" msgstr "Пульсовий індикатор виконання" -#: ../src/option.c:1120 +#: ../src/option.c:472 #, no-c-format msgid "Dismiss the dialog when 100% has been reached" msgstr "Закрити діалог по досягненні 100%" -#: ../src/option.c:1134 +#: ../src/option.c:478 msgid "Right-To-Left progress bar direction" msgstr "Напрямок індикатору Справа-Наліво" -#: ../src/option.c:1140 +#: ../src/option.c:480 msgid "Show log window" msgstr "Відобразити вікно журналу" -#: ../src/option.c:1146 +#: ../src/option.c:482 msgid "Expand log window" msgstr "Розгорнути вікно журналу" -#: ../src/option.c:1152 +#: ../src/option.c:484 msgid "Place log window above progress bar" msgstr "Розмістити вікно жуналу поверх індикатора виконання" -#: ../src/option.c:1158 +#: ../src/option.c:486 msgid "Height of log window" msgstr "Висота вікна журналу" -#: ../src/option.c:1168 +#: ../src/option.c:492 msgid "Display scale dialog" msgstr "Відобразити діалог масштабу" -#: ../src/option.c:1174 +#: ../src/option.c:494 msgid "Set initial value" msgstr "Задати початкове значення" -#: ../src/option.c:1175 ../src/option.c:1181 ../src/option.c:1187 -#: ../src/option.c:1193 ../src/option.c:1199 +#: ../src/option.c:494 ../src/option.c:496 ../src/option.c:498 +#: ../src/option.c:500 ../src/option.c:502 msgid "VALUE" msgstr "ЗНАЧЕННЯ" -#: ../src/option.c:1180 +#: ../src/option.c:496 msgid "Set minimum value" msgstr "Задати мінімальне значення" -#: ../src/option.c:1186 +#: ../src/option.c:498 msgid "Set maximum value" msgstr "Задати максимальне значення" -#: ../src/option.c:1192 +#: ../src/option.c:500 msgid "Set step size" msgstr "Задати крок" -#: ../src/option.c:1198 +#: ../src/option.c:502 msgid "Set paging size" msgstr "Задати крок сторінки" -#: ../src/option.c:1204 +#: ../src/option.c:504 msgid "Print partial values" msgstr "Виводити часткові значення" -#: ../src/option.c:1210 +#: ../src/option.c:506 msgid "Hide value" msgstr "Сховати значення" -#: ../src/option.c:1216 -msgid "Show vertical scale" -msgstr "Відобразити вертикальну шкалу" - -#: ../src/option.c:1222 +#: ../src/option.c:508 msgid "Invert direction" msgstr "Зворотній напрямок" -#: ../src/option.c:1228 +#: ../src/option.c:510 msgid "Add mark to scale (may be used multiple times)" msgstr "Додати мітку шкали (може використовуватись декілька разів)" -#: ../src/option.c:1229 +#: ../src/option.c:510 msgid "NAME:VALUE" msgstr "НАЗВА:ЗНАЧЕННЯ" -#: ../src/option.c:1238 +#: ../src/option.c:516 msgid "Display text information dialog" msgstr "Відобразити діалог з текстовою інформацією" -#: ../src/option.c:1244 +#: ../src/option.c:518 msgid "Use specified color for text" msgstr "Використовувати вказаний колір тексту" -#: ../src/option.c:1250 +#: ../src/option.c:520 msgid "Use specified color for background" msgstr "Використовувати вказаний колір фону" -#: ../src/option.c:1262 +#: ../src/option.c:522 msgid "Enable text wrapping" msgstr "Дозволити перенос тексту" -#: ../src/option.c:1268 -msgid "Set justification (TYPE - left, right, center or fill)" -msgstr "Встановити вирівнювання (ТИП - left, right, center або fill)" +#: ../src/option.c:524 +msgid "Set justification (left, right, center or fill)" +msgstr "Встановити вирівнювання (left, right, center або fill)" -#: ../src/option.c:1274 +#: ../src/option.c:526 msgid "Set text margins" msgstr "Встановити відступи" -#: ../src/option.c:1275 +#: ../src/option.c:526 msgid "SIZE" msgstr "РОЗМІР" -#: ../src/option.c:1280 +#: ../src/option.c:528 msgid "Autoscroll to end of text" msgstr "Автопрокрутка в кінець тексту" -#: ../src/option.c:1286 -msgid "Open file" -msgstr "Відкрити файл" - -#: ../src/option.c:1298 +#: ../src/option.c:530 msgid "Make URI clickable" msgstr "Зробити посилання активними" -#: ../src/option.c:1304 +#: ../src/option.c:532 msgid "Use specified color for links" msgstr "Використовувати вказаний колір для посилань" -#: ../src/option.c:1310 -msgid "Listen for data on stdin in addition to file" -msgstr "Отримувати дані з потоку вводу додатково до файлу" - -#: ../src/option.c:1320 +#: ../src/option.c:538 msgid "Sets a filename filter" msgstr "Задати фільтр файлів по масці" -#: ../src/option.c:1321 +#: ../src/option.c:538 msgid "NAME | PATTERN1 PATTERN2 ..." msgstr "НАЗВА | ШАБЛОН1 ШАБЛОН2 ..." -#: ../src/option.c:1326 +#: ../src/option.c:540 msgid "Sets a mime-type filter" msgstr "Задати фільтр файлів по типу mime" -#: ../src/option.c:1327 +#: ../src/option.c:540 msgid "NAME | MIME1 MIME2 ..." msgstr "НАЗВА | ТИП1 ТИП2 ..." -#: ../src/option.c:1332 +#: ../src/option.c:542 msgid "Add filter for images" msgstr "Додати фільтр для зображень" -#: ../src/option.c:1333 +#: ../src/option.c:542 msgid "NAME" msgstr "ІМ'Я" -#: ../src/option.c:1338 -msgid "Enable preview" -msgstr "Додати попередній перегляд" - -#: ../src/option.c:1348 +#: ../src/option.c:548 msgid "Show about dialog" msgstr "Показати діалог 'Про програму'" -#: ../src/option.c:1354 +#: ../src/option.c:550 msgid "Print version" msgstr "Вивести версію" -#: ../src/option.c:1360 +#: ../src/option.c:552 msgid "Load additional GTK settings from file" msgstr "Завантажити додаткові налаштування GTK з файлу" -#: ../src/option.c:1370 +#: ../src/option.c:558 msgid "Load extra arguments from file" msgstr "Завантажити додаткові аргументи з файлу" -#: ../src/option.c:1415 ../src/option.c:1708 +#: ../src/option.c:599 ../src/option.c:892 #, c-format msgid "Unknown align type: %s\n" msgstr "Невідомий тип вирівнювання: %s\n" -#: ../src/option.c:1572 +#: ../src/option.c:756 #, c-format msgid "Mark %s doesn't have a value\n" msgstr "Помітці %s не надано значення\n" -#: ../src/option.c:1609 +#: ../src/option.c:793 msgid "Images" msgstr "Зображення" -#: ../src/option.c:1674 +#: ../src/option.c:858 #, c-format msgid "Unknown color mode: %s\n" msgstr "Невідомий режим кольору: '%s'\n" -#: ../src/option.c:1693 +#: ../src/option.c:877 #, c-format msgid "Unknown buttons layout type: %s\n" msgstr "Невідомий тип розміщення кнопок: %s\n" -#: ../src/option.c:1725 +#: ../src/option.c:909 #, c-format msgid "Unknown justification type: %s\n" msgstr "Невідомий тип вирівнювання: %s\n" -#: ../src/option.c:1742 +#: ../src/option.c:926 #, c-format msgid "Unknown tab position type: %s\n" msgstr "Невідомий тип позиції вкладки: %s\n" -#: ../src/option.c:1778 +#: ../src/option.c:962 #, c-format msgid "Unknown ellipsize type: %s\n" msgstr "Невідомий тип урізання: %s\n" -#: ../src/option.c:1791 +#: ../src/option.c:975 #, c-format msgid "Unknown orientation: %s\n" msgstr "Невідома орієнтація: %s\n" -#: ../src/option.c:1806 +#: ../src/option.c:990 #, c-format msgid "Unknown source type: %s\n" msgstr "Невідомий тип даних: %s\n" -#: ../src/option.c:1817 +#: ../src/option.c:1001 msgid "Progress log" msgstr "Вікно журналу" -#: ../src/option.c:1925 +#: ../src/option.c:1014 +#, c-format +msgid "Unknown size type: %s\n" +msgstr "Невідомий тип розміру: %s\n" + +#: ../src/option.c:1038 +#, c-format +msgid "Unknown completion type: %s\n" +msgstr "Невідомий тип доповнення: %s\n" + +#: ../src/option.c:1137 #, c-format msgid "Unknown signal: %s\n" msgstr "Невідомий сигнал: %s\n" -#: ../src/option.c:2081 +#: ../src/option.c:1300 msgid "File exist. Overwrite?" msgstr "Файл існує. Перезаписати?" -#: ../src/option.c:2198 +#: ../src/option.c:1423 msgid "- Yet another dialoging program" msgstr "- Програма для відображення діалогів" #. Adds general option entries -#: ../src/option.c:2202 +#: ../src/option.c:1427 msgid "General options" msgstr "Основні параметри" -#: ../src/option.c:2202 +#: ../src/option.c:1427 msgid "Show general options" msgstr "Показувати основні параметри" +#. Adds common option entries +#: ../src/option.c:1433 +msgid "Common options" +msgstr "Загальні параметри" + +#: ../src/option.c:1433 +msgid "Show common options" +msgstr "Показувати загальні параметри діалогів" + #. Adds calendar option entries -#: ../src/option.c:2208 +#: ../src/option.c:1439 msgid "Calendar options" msgstr "Параметри календаря" -#: ../src/option.c:2208 +#: ../src/option.c:1439 msgid "Show calendar options" msgstr "Показувати параметри календаря" #. Adds color option entries -#: ../src/option.c:2214 +#: ../src/option.c:1445 msgid "Color selection options" msgstr "Параметри діалогу вибору кольору" -#: ../src/option.c:2214 +#: ../src/option.c:1445 msgid "Show color selection options" msgstr "Показувати параметри діалогу вибору кольору" #. Adds dnd option entries -#: ../src/option.c:2220 +#: ../src/option.c:1451 msgid "DND options" msgstr "Параметри DND" -#: ../src/option.c:2220 +#: ../src/option.c:1451 msgid "Show drag-n-drop options" msgstr "Показувати параметри dnd" #. Adds entry option entries -#: ../src/option.c:2226 +#: ../src/option.c:1457 msgid "Text entry options" msgstr "Параметри вводу тексту" -#: ../src/option.c:2226 +#: ../src/option.c:1457 msgid "Show text entry options" msgstr "Показувати параметри вводу тексту" #. Adds file selection option entries -#: ../src/option.c:2232 +#: ../src/option.c:1463 msgid "File selection options" msgstr "Параметри діалогу вибору файлів" -#: ../src/option.c:2232 +#: ../src/option.c:1463 msgid "Show file selection options" msgstr "Показувати параметри діалогу вибору файлів" #. Add font selection option entries -#: ../src/option.c:2238 +#: ../src/option.c:1469 msgid "Font selection options" msgstr "Параметри діалогу вибору шрифту" -#: ../src/option.c:2238 +#: ../src/option.c:1469 msgid "Show font selection options" msgstr "Показувати параметри діалоги вибору шрифту" #. Add form option entries -#: ../src/option.c:2244 +#: ../src/option.c:1475 msgid "Form options" msgstr "Параметри діалогу форми" -#: ../src/option.c:2244 +#: ../src/option.c:1475 msgid "Show form options" msgstr "Показувати параметри діалогу форми" #. Add html options entries -#: ../src/option.c:2251 +#: ../src/option.c:1482 msgid "HTML options" msgstr "Параметри HTML діалогу" -#: ../src/option.c:2251 +#: ../src/option.c:1482 msgid "Show HTML options" msgstr "Показувати параметри HTML діалогу" #. Add icons option entries -#: ../src/option.c:2258 +#: ../src/option.c:1489 msgid "Icons box options" msgstr "Параметри діалогу іконок" -#: ../src/option.c:2258 +#: ../src/option.c:1489 msgid "Show icons box options" msgstr "Показувати параметри діалогу іконок швидкого доступу" #. Adds list option entries -#: ../src/option.c:2264 +#: ../src/option.c:1495 msgid "List options" msgstr "Параметри списку" -#: ../src/option.c:2264 +#: ../src/option.c:1495 msgid "Show list options" msgstr "Показувати параметри списку" #. Adds multi progress option entries -#: ../src/option.c:2270 +#: ../src/option.c:1501 msgid "Multi progress bars options" msgstr "Параметри діалогу з декількома індикаторами" -#: ../src/option.c:2271 +#: ../src/option.c:1502 msgid "Show multi progress bars options" msgstr "Показувати параметри діалогу з декількома індикаторами" #. Adds notebook option entries -#: ../src/option.c:2277 +#: ../src/option.c:1508 msgid "Notebook options" msgstr "Параметри діалогу з вкладками" -#: ../src/option.c:2277 +#: ../src/option.c:1508 msgid "Show notebook dialog options" msgstr "Показувати параметри діалогу з вкладками" #. Adds notification option entries -#: ../src/option.c:2283 +#: ../src/option.c:1514 msgid "Notification icon options" msgstr "Параметри іконки повідомлень" -#: ../src/option.c:2284 +#: ../src/option.c:1515 msgid "Show notification icon options" msgstr "Показувати параметри іконки повідомлень" #. Adds paned option entries -#: ../src/option.c:2290 +#: ../src/option.c:1521 msgid "Paned dialog options" msgstr "Параметри діалогу з панелями" -#: ../src/option.c:2290 +#: ../src/option.c:1521 msgid "Show paned dialog options" msgstr "Показувати параметри діалогу з панелями" +#. Adds picture option entries +#: ../src/option.c:1527 +msgid "Picture dialog options" +msgstr "Параметри діалогу з картинкою" + +#: ../src/option.c:1527 +msgid "Show picture dialog options" +msgstr "Показувати параметри діалогу відображення картинки" + #. Adds print option entries -#: ../src/option.c:2296 +#: ../src/option.c:1533 msgid "Print dialog options" msgstr "Параметри діалогу друку" -#: ../src/option.c:2296 +#: ../src/option.c:1533 msgid "Show print dialog options" msgstr "Показувати параметри діалогу друку" #. Adds progress option entries -#: ../src/option.c:2302 +#: ../src/option.c:1539 msgid "Progress options" msgstr "Параметри прогресу" -#: ../src/option.c:2302 +#: ../src/option.c:1539 msgid "Show progress options" msgstr "Показувати параметри прогресу" #. Adds scale option entries -#: ../src/option.c:2308 +#: ../src/option.c:1545 msgid "Scale options" msgstr "Параметри масштабу" -#: ../src/option.c:2308 +#: ../src/option.c:1545 msgid "Show scale options" msgstr "Показувати параметри масштабу" #. Adds text option entries -#: ../src/option.c:2314 +#: ../src/option.c:1551 msgid "Text information options" msgstr "Параметри текстової інформації" -#: ../src/option.c:2314 +#: ../src/option.c:1551 msgid "Show text information options" msgstr "Показувати параметри текстової інформації" #. Adds file filters option entries -#: ../src/option.c:2320 +#: ../src/option.c:1557 msgid "File filter options" msgstr "Параметри фільтрів для діалогу вибору файлів" -#: ../src/option.c:2320 +#: ../src/option.c:1557 msgid "Show file filter options" msgstr "Показувати параметри фільтрів для діалогу вибору файлів" #. Adds miscellaneous option entries -#: ../src/option.c:2326 +#: ../src/option.c:1563 msgid "Miscellaneous options" msgstr "Додаткові параметри" -#: ../src/option.c:2326 +#: ../src/option.c:1563 msgid "Show miscellaneous options" msgstr "Показувати додаткові параметри" +#: ../src/picture.c:177 +msgid "Fit to window" +msgstr "По розміру вікна" + +#: ../src/picture.c:184 +msgid "Original size" +msgstr "Оригінальний розмір" + +#: ../src/picture.c:191 +msgid "Increase size" +msgstr "Збільшити розмір" + +#: ../src/picture.c:198 +msgid "Decrease size" +msgstr "Зменшити розмір" + +#: ../src/picture.c:209 +msgid "Rotate left" +msgstr "Повернути ліворуч" + +#: ../src/picture.c:216 +msgid "Rotate right" +msgstr "Повернути праворуч" + +#: ../src/picture.c:223 +msgid "Flip vertical" +msgstr "Віддзеркалити вертикально" + +#: ../src/picture.c:230 +msgid "Flip horizontal" +msgstr "Віддзеркалити горизонтально" + #: ../src/print.c:199 ../src/print.c:365 #, c-format msgid "Printing failed: %s\n" @@ -1495,7 +1531,7 @@ msgid "Category" msgstr "Категорія" -#: ../src/browser.c:356 +#: ../src/browser.c:357 msgid "Icons" msgstr "Іконки" diff -Nru yad-0.31.0/src/browser.c yad-0.33.1/src/browser.c --- yad-0.31.0/src/browser.c 2015-09-04 10:24:50.000000000 +0000 +++ yad-0.33.1/src/browser.c 2015-11-02 07:22:33.000000000 +0000 @@ -347,6 +347,7 @@ data->icon_list = gtk_tree_view_new (); gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (data->icon_list), TRUE); + gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (data->icon_list), TRUE); gtk_container_add (GTK_CONTAINER (w), data->icon_list); sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (data->icon_list)); diff -Nru yad-0.31.0/src/entry.c yad-0.33.1/src/entry.c --- yad-0.31.0/src/entry.c 2015-09-04 10:24:50.000000000 +0000 +++ yad-0.33.1/src/entry.c 2015-12-29 14:44:58.000000000 +0000 @@ -282,6 +282,10 @@ g_object_unref (completion_model); gtk_entry_completion_set_text_column (completion, 0); + + if (options.common_data.complete != YAD_COMPLETE_SIMPLE) + gtk_entry_completion_set_match_func (completion, check_complete, NULL, NULL); + g_object_unref (completion); } @@ -321,13 +325,20 @@ entry_print_result (void) { if (options.entry_data.numeric) - g_print ("%lf\n", gtk_spin_button_get_value (GTK_SPIN_BUTTON (entry))); + g_print ("%.*g\n", options.common_data.float_precision, gtk_spin_button_get_value (GTK_SPIN_BUTTON (entry))); else if (is_combo) + { + if (options.common_data.num_output) + g_print ("%d\n", gtk_combo_box_get_active (GTK_COMBO_BOX (entry)) + 1); + else + { #if GTK_CHECK_VERSION(2,24,0) - g_print ("%s\n", gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (entry))); + g_print ("%s\n", gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (entry))); #else - g_print ("%s\n", gtk_combo_box_get_active_text (GTK_COMBO_BOX (entry))); + g_print ("%s\n", gtk_combo_box_get_active_text (GTK_COMBO_BOX (entry))); #endif + } + } else g_print ("%s\n", gtk_entry_get_text (GTK_ENTRY (entry))); } diff -Nru yad-0.31.0/src/file.c yad-0.33.1/src/file.c --- yad-0.31.0/src/file.c 2015-09-10 07:47:06.000000000 +0000 +++ yad-0.33.1/src/file.c 2015-11-30 08:16:47.000000000 +0000 @@ -30,12 +30,9 @@ gtk_dialog_response (GTK_DIALOG (data), YAD_RESPONSE_OK); } -void -confirm_overwrite_cb (GtkDialog * dlg, gint id, gpointer data) +gboolean +file_confirm_overwrite (GtkDialog * dlg) { - if (id != YAD_RESPONSE_OK) - return; - if (options.file_data.save && options.file_data.confirm_overwrite && !options.common_data.multi) { gchar *filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (filechooser)); @@ -53,9 +50,11 @@ r = gtk_dialog_run (GTK_DIALOG (d)); gtk_widget_destroy (d); if (r != GTK_RESPONSE_YES) - g_signal_stop_emission_by_name (dlg, "response"); + return FALSE; } } + + return TRUE; } GtkWidget * diff -Nru yad-0.31.0/src/form.c yad-0.33.1/src/form.c --- yad-0.31.0/src/form.c 2015-09-10 07:47:06.000000000 +0000 +++ yad-0.33.1/src/form.c 2015-12-29 14:45:51.000000000 +0000 @@ -74,8 +74,8 @@ g_string_append (xcmd, gtk_entry_get_text (GTK_ENTRY (g_slist_nth_data (fields, num)))); break; case YAD_FIELD_NUM: - g_string_append_printf (xcmd, "%f", gtk_spin_button_get_value - (GTK_SPIN_BUTTON (g_slist_nth_data (fields, num)))); + g_string_append_printf (xcmd, "%.*g", options.common_data.float_precision, + gtk_spin_button_get_value (GTK_SPIN_BUTTON (g_slist_nth_data (fields, num)))); break; case YAD_FIELD_CHECK: g_string_append (xcmd, gtk_toggle_button_get_active @@ -83,14 +83,13 @@ break; case YAD_FIELD_COMBO: case YAD_FIELD_COMBO_ENTRY: - g_string_append (xcmd, #if GTK_CHECK_VERSION(2,24,0) - gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT - (g_slist_nth_data (fields, num))) + buf = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (g_slist_nth_data (fields, num))); #else - gtk_combo_box_get_active_text (GTK_COMBO_BOX (g_slist_nth_data (fields, num))) + buf = gtk_combo_box_get_active_text (GTK_COMBO_BOX (g_slist_nth_data (fields, num))); #endif - ); + g_string_append (xcmd, buf ? buf : ""); + g_free (buf); break; case YAD_FIELD_SCALE: g_string_append_printf (xcmd, "%d", (gint) gtk_range_get_value @@ -245,7 +244,9 @@ i++; } if (def >= 0) - gtk_entry_set_text (GTK_ENTRY (w), s[def]); + gtk_entry_set_text (GTK_ENTRY (w), s[def] + 1); + else + gtk_entry_set_text (GTK_ENTRY (w), ""); g_strfreev (s); break; } @@ -372,6 +373,10 @@ g_string_free (cmd, TRUE); } } + + /* set focus to specified field */ + if (options.form_data.focus_field > 0 && options.form_data.focus_field <= n_fields) + gtk_widget_grab_focus (GTK_WIDGET (g_slist_nth_data (fields, options.form_data.focus_field - 1))); } static void @@ -579,13 +584,92 @@ } gtk_widget_destroy (dlg); } + + gtk_widget_grab_focus (GTK_WIDGET (entry)); +} + +static gboolean +handle_stdin (GIOChannel * ch, GIOCondition cond, gpointer data) +{ + static guint cnt = 0; + + if ((cond == G_IO_IN) || (cond == G_IO_IN + G_IO_HUP)) + { + GError *err = NULL; + GString *string = g_string_new (NULL); + + while (ch->is_readable != TRUE); + + do + { + gint status; + + if (cnt == n_fields) + { + if (options.form_data.cycle_read) + cnt = 0; + else + { + g_io_channel_shutdown (ch, TRUE, NULL); + return FALSE; + } + } + + do + { + status = g_io_channel_read_line_string (ch, string, NULL, &err); + + while (gtk_events_pending ()) + gtk_main_iteration (); + } + while (status == G_IO_STATUS_AGAIN); + + if (status != G_IO_STATUS_NORMAL) + { + if (err) + { + g_printerr ("yad_form_handle_stdin(): %s\n", err->message); + g_error_free (err); + err = NULL; + } + /* stop handling */ + g_io_channel_shutdown (ch, TRUE, NULL); + return FALSE; + } + + strip_new_line (string->str); + if (string->str[0]) + { + if (string->str[0] == '\014') + { + gint i; + /* clear the form and reset fields counter */ + for (i = 0; i < n_fields; i++) + set_field_value (i, ""); + cnt = 0; + } + else + set_field_value (cnt, string->str); + } + cnt++; + } + while (g_io_channel_get_buffer_condition (ch) == G_IO_IN); + g_string_free (string, TRUE); + } + + if ((cond != G_IO_IN) && (cond != G_IO_IN + G_IO_HUP)) + { + g_io_channel_shutdown (ch, TRUE, NULL); + return FALSE; + } + + return TRUE; } GtkWidget * form_create_widget (GtkWidget * dlg) { - GtkWidget *sw, *vp, *tbl; - GtkWidget *w = NULL; + GtkWidget *tbl, *w = NULL; GList *filt; if (options.form_data.fields) @@ -611,21 +695,11 @@ if (options.form_data.scroll) { - /* create scrolled container */ - GtkAdjustment *hadj, *vadj; - - sw = gtk_scrolled_window_new (NULL, NULL); + GtkWidget *sw = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_NONE); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); - hadj = gtk_scrolled_window_get_hadjustment (GTK_SCROLLED_WINDOW (sw)); - vadj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (sw)); - - vp = gtk_viewport_new (hadj, vadj); - gtk_viewport_set_shadow_type (GTK_VIEWPORT (vp), GTK_SHADOW_NONE); - gtk_container_add (GTK_CONTAINER (sw), vp); - - gtk_container_add (GTK_CONTAINER (vp), tbl); + gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (sw), tbl); w = sw; } else @@ -687,6 +761,9 @@ gtk_entry_completion_set_model (c, GTK_TREE_MODEL (m)); gtk_entry_completion_set_text_column (c, 0); + if (options.common_data.complete != YAD_COMPLETE_SIMPLE) + gtk_entry_completion_set_match_func (c, check_complete, NULL, NULL); + g_object_unref (m); g_object_unref (c); } @@ -1023,8 +1100,18 @@ i++; } } + else + { + GIOChannel *channel = g_io_channel_unix_new (0); + g_io_channel_set_encoding (channel, NULL, NULL); + g_io_channel_set_flags (channel, G_IO_FLAG_NONBLOCK, NULL); + g_io_add_watch (channel, G_IO_IN | G_IO_HUP, handle_stdin, NULL); + } } + if (options.form_data.focus_field > 0 && options.form_data.focus_field <= n_fields) + gtk_widget_grab_focus (GTK_WIDGET (g_slist_nth_data (fields, options.form_data.focus_field - 1))); + return w; } @@ -1057,10 +1144,12 @@ break; case YAD_FIELD_NUM: if (options.common_data.quoted_output) - g_printf ("'%f'%s", gtk_spin_button_get_value (GTK_SPIN_BUTTON (g_slist_nth_data (fields, fn))), + g_printf ("'%.*g'%s", options.common_data.float_precision, + gtk_spin_button_get_value (GTK_SPIN_BUTTON (g_slist_nth_data (fields, fn))), options.common_data.separator); else - g_printf ("%f%s", gtk_spin_button_get_value (GTK_SPIN_BUTTON (g_slist_nth_data (fields, fn))), + g_printf ("%.*g%s", options.common_data.float_precision, + gtk_spin_button_get_value (GTK_SPIN_BUTTON (g_slist_nth_data (fields, fn))), options.common_data.separator); break; case YAD_FIELD_CHECK: @@ -1073,7 +1162,10 @@ break; case YAD_FIELD_COMBO: case YAD_FIELD_COMBO_ENTRY: - if (options.common_data.quoted_output) + if (options.common_data.num_output && fld->type == YAD_FIELD_COMBO) + g_printf ("%d%s", gtk_combo_box_get_active (GTK_COMBO_BOX (g_slist_nth_data (fields, fn))) + 1, + options.common_data.separator); + else if (options.common_data.quoted_output) { #if GTK_CHECK_VERSION(2,24,0) buf = g_shell_quote (gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (g_slist_nth_data (fields, fn)))); diff -Nru yad-0.31.0/src/html.c yad-0.33.1/src/html.c --- yad-0.31.0/src/html.c 2015-09-09 10:23:45.000000000 +0000 +++ yad-0.33.1/src/html.c 2015-11-26 13:02:56.000000000 +0000 @@ -187,6 +187,7 @@ if (!is_link) { + /* add open item */ mi = gtk_separator_menu_item_new (); gtk_widget_show (mi); gtk_menu_shell_prepend (GTK_MENU_SHELL (menu), mi); @@ -196,6 +197,15 @@ gtk_menu_shell_prepend (GTK_MENU_SHELL (menu), mi); g_signal_connect (G_OBJECT (mi), "activate", G_CALLBACK (open_cb), NULL); + /* add quit item */ + mi = gtk_separator_menu_item_new (); + gtk_widget_show (mi); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi); + + mi = gtk_image_menu_item_new_from_stock ("gtk-quit", NULL); + gtk_widget_show (mi); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi); + g_signal_connect (G_OBJECT (mi), "activate", G_CALLBACK (gtk_main_quit), NULL); } return FALSE; @@ -245,7 +255,7 @@ settings = webkit_web_view_get_settings (view); g_get_charset (&enc); - g_object_set (G_OBJECT (settings), "default-encoding", enc); + g_object_set (G_OBJECT (settings), "default-encoding", enc, NULL); g_signal_connect (view, "hovering-over-link", G_CALLBACK (link_hover_cb), NULL); g_signal_connect (view, "navigation-policy-decision-requested", G_CALLBACK (link_cb), NULL); diff -Nru yad-0.31.0/src/list.c yad-0.33.1/src/list.c --- yad-0.31.0/src/list.c 2015-09-08 13:58:19.000000000 +0000 +++ yad-0.33.1/src/list.c 2015-12-29 14:44:36.000000000 +0000 @@ -225,6 +225,18 @@ } static void +float_col_format (GtkTreeViewColumn *col, GtkCellRenderer *cell, GtkTreeModel *model, + GtkTreeIter *iter, gpointer data) +{ + gdouble val; + gchar buf[20]; + + gtk_tree_model_get(model, iter, GPOINTER_TO_INT (data), &val, -1); + g_snprintf(buf, sizeof (buf), "%.*g", options.common_data.float_precision, val); + g_object_set(cell, "text", buf, NULL); +} + +static void add_columns (gint n_columns) { gint i; @@ -278,6 +290,8 @@ gtk_tree_view_column_add_attribute (column, renderer, "font", font_col); gtk_tree_view_column_set_sort_column_id (column, i); gtk_tree_view_column_set_resizable (column, TRUE); + if (col->type == YAD_COLUMN_FLOAT) + gtk_tree_view_column_set_cell_data_func (column, renderer, float_col_format, GINT_TO_POINTER (i), NULL); break; default: renderer = gtk_cell_renderer_text_new (); @@ -798,6 +812,10 @@ row_sep_func (GtkTreeModel * m, GtkTreeIter * it, gpointer data) { gchar *name; + + if (!options.list_data.sep_value) + return FALSE; + gtk_tree_model_get (m, it, options.list_data.sep_column - 1, &name, -1); return (strcmp (name, options.list_data.sep_value) == 0); } @@ -909,9 +927,9 @@ gdouble nval; gtk_tree_model_get (model, iter, num, &nval, -1); if (options.common_data.quoted_output) - g_printf ("'%lf'", nval); + g_printf ("'%.*g'", options.common_data.float_precision, nval); else - g_printf ("%lf", nval); + g_printf ("%.*g", options.common_data.float_precision, nval); break; } case YAD_COLUMN_IMAGE: diff -Nru yad-0.31.0/src/main.c yad-0.33.1/src/main.c --- yad-0.31.0/src/main.c 2015-09-09 09:49:35.000000000 +0000 +++ yad-0.33.1/src/main.c 2016-01-11 12:29:42.000000000 +0000 @@ -48,7 +48,7 @@ if (options.plug != -1) print_result (); else - gtk_dialog_response (GTK_DIALOG (dialog), YAD_RESPONSE_OK); + gtk_dialog_response (GTK_DIALOG (dialog), YAD_RESPONSE_OK); } static void @@ -61,16 +61,6 @@ } #endif -static gboolean -timeout_cb (gpointer data) -{ - GtkWidget *w = (GtkWidget *) data; - - gtk_dialog_response (GTK_DIALOG (w), YAD_RESPONSE_TIMEOUT); - - return FALSE; -} - static void btn_cb (GtkWidget *b, gchar *cmd) { @@ -78,32 +68,35 @@ g_spawn_command_line_async (cmd, NULL); else { - gint resp; - GtkWidget *dlg = gtk_widget_get_toplevel (b); - - resp = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (b), "resp")); - gtk_dialog_response (GTK_DIALOG (dlg), resp); + gint resp = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (b), "resp")); + gtk_dialog_response (GTK_DIALOG (dialog), resp); } } static gboolean -timeout_indicator_cb (gpointer data) +timeout_cb (gpointer data) { static guint count = 1; - gdouble percent; GtkWidget *w = (GtkWidget *) data; - if (!w) - return FALSE; + if (options.data.timeout < count) + { + gtk_dialog_response (GTK_DIALOG (dialog), YAD_RESPONSE_TIMEOUT); + return FALSE; + } - percent = ((gdouble) options.data.timeout - count) / (gdouble) options.data.timeout; - gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (w), percent); - if (settings.show_remain) - { - gchar *lbl = g_strdup_printf (_("%d sec"), options.data.timeout - count); - gtk_progress_bar_set_text (GTK_PROGRESS_BAR (w), lbl); - g_free (lbl); + if (w) + { + gdouble percent = ((gdouble) options.data.timeout - count) / (gdouble) options.data.timeout; + gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (w), percent); + if (settings.show_remain) + { + gchar *lbl = g_strdup_printf (_("%d sec"), options.data.timeout - count); + gtk_progress_bar_set_text (GTK_PROGRESS_BAR (w), lbl); + g_free (lbl); + } } + count++; return TRUE; @@ -121,37 +114,208 @@ #endif static void -ignore_close_cb (GtkWidget *w, gpointer data) +dlg_response_cb (GtkDialog *dlg, gint id, gint *data) { - g_signal_stop_emission_by_name (G_OBJECT (w), "close"); -} + if (options.mode == YAD_MODE_FILE) + { + /* show custom confirmation dialog */ + if (!file_confirm_overwrite (dlg)) + { + g_signal_stop_emission_by_name (dlg, "response"); + return; + } + } -#ifdef HAVE_HTML -static void -html_response_cb (GtkDialog *dlg, gint id, gint *data) -{ *data = id; gtk_main_quit (); } + +static GtkWidget * +create_layout (GtkWidget *dlg) +{ + GtkWidget *image, *text, *mw, *layout, *exp, *box; + + layout = image = text = mw = exp = NULL; + + /* create image */ + if (options.data.dialog_image) + { + GdkPixbuf *pb = NULL; + + pb = get_pixbuf (options.data.dialog_image, YAD_BIG_ICON); + image = gtk_image_new_from_pixbuf (pb); + if (pb) + g_object_unref (pb); + + gtk_widget_set_name (image, "yad-dialog-image"); + gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0); + } + + /* create text label */ + if (options.data.dialog_text) + { + /* for dnd's tooltip we don't need text label */ + if (options.mode != YAD_MODE_DND || !options.dnd_data.tooltip) + { + gchar *buf = g_strcompress (options.data.dialog_text); + + text = gtk_label_new (NULL); + if (!options.data.no_markup) + gtk_label_set_markup (GTK_LABEL (text), buf); + else + gtk_label_set_text (GTK_LABEL (text), buf); + g_free (buf); + + gtk_widget_set_name (text, "yad-dialog-label"); + gtk_label_set_line_wrap (GTK_LABEL (text), TRUE); + gtk_label_set_selectable (GTK_LABEL (text), options.data.selectable_labels); + gtk_label_set_justify (GTK_LABEL (text), options.data.text_align); + switch (options.data.text_align) + { + case GTK_JUSTIFY_LEFT: + case GTK_JUSTIFY_FILL: + gtk_misc_set_alignment (GTK_MISC (text), 0.0, 0.5); + break; + case GTK_JUSTIFY_CENTER: + gtk_misc_set_alignment (GTK_MISC (text), 0.5, 0.5); + break; + case GTK_JUSTIFY_RIGHT: + gtk_misc_set_alignment (GTK_MISC (text), 1.0, 0.5); + break; + } +#if !GTK_CHECK_VERSION(3,0,0) + if (!options.data.fixed) + g_signal_connect (G_OBJECT (text), "size-allocate", G_CALLBACK (text_size_allocate_cb), NULL); #endif + } + } + + /* create main widget */ + switch (options.mode) + { + case YAD_MODE_CALENDAR: + mw = calendar_create_widget (dlg); + break; + case YAD_MODE_COLOR: + mw = color_create_widget (dlg); + break; + case YAD_MODE_DND: + dnd_init (dlg); + break; + case YAD_MODE_ENTRY: + mw = entry_create_widget (dlg); + break; + case YAD_MODE_FILE: + mw = file_create_widget (dlg); + break; + case YAD_MODE_FONT: + mw = font_create_widget (dlg); + break; + case YAD_MODE_FORM: + mw = form_create_widget (dlg); + break; +#ifdef HAVE_HTML + case YAD_MODE_HTML: + mw = html_create_widget (dlg); + break; +#endif + case YAD_MODE_ICONS: + mw = icons_create_widget (dlg); + break; + case YAD_MODE_LIST: + mw = list_create_widget (dlg); + break; + case YAD_MODE_MULTI_PROGRESS: + mw = multi_progress_create_widget (dlg); + break; + case YAD_MODE_NOTEBOOK: + if (options.plug == -1) + mw = notebook_create_widget (dlg); + break; + case YAD_MODE_PANED: + if (options.plug == -1) + mw = paned_create_widget (dlg); + break; + case YAD_MODE_PICTURE: + mw = picture_create_widget (dlg); + break; + case YAD_MODE_PROGRESS: + mw = progress_create_widget (dlg); + break; + case YAD_MODE_SCALE: + mw = scale_create_widget (dlg); + break; + case YAD_MODE_TEXTINFO: + mw = text_create_widget (dlg); + break; + default: ; + } + + /* add expander */ + if (mw && options.data.expander) + { + exp = gtk_expander_new_with_mnemonic (options.data.expander); + gtk_expander_set_expanded (GTK_EXPANDER (exp), FALSE); + gtk_container_add (GTK_CONTAINER (exp), mw); + } -GtkWidget * + /* create layout */ + if (options.data.image_on_top) + { +#if !GTK_CHECK_VERSION(3,0,0) + layout = gtk_vbox_new (FALSE, 0); + box = gtk_hbox_new (FALSE, 0); +#else + layout = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); + box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); +#endif + if (image) + gtk_box_pack_start (GTK_BOX (box), image, FALSE, FALSE, 2); + if (text) + gtk_box_pack_start (GTK_BOX (box), text, TRUE, TRUE, 0); + + gtk_box_pack_start (GTK_BOX (layout), box, FALSE, FALSE, 0); + if (mw) + gtk_box_pack_start (GTK_BOX (layout), mw, TRUE, TRUE, 0); + } + else + { +#if !GTK_CHECK_VERSION(3,0,0) + layout = gtk_hbox_new (FALSE, 0); + box = gtk_vbox_new (FALSE, 0); +#else + layout = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); + box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); +#endif + if (text) + gtk_box_pack_start (GTK_BOX (box), text, FALSE, FALSE, 0); + if (mw) + gtk_box_pack_start (GTK_BOX (box), mw, TRUE, TRUE, 0); + + if (image) + gtk_box_pack_start (GTK_BOX (layout), image, FALSE, FALSE, 2); + gtk_box_pack_start (GTK_BOX (layout), box, TRUE, TRUE, 0); + } + + return layout; +} + +static GtkWidget * create_dialog (void) { - GtkWidget *dlg; - GtkWidget *hbox, *vbox, *hbox2, *bbox; - GtkWidget *image; - GtkWidget *text; - GtkWidget *main_widget = NULL; - GtkWidget *topb = NULL; + GtkWidget *dlg, *vbox, *bbox, *layout; /* create dialog window */ dlg = gtk_dialog_new (); - gtk_window_set_type_hint (GTK_WINDOW (dlg), GDK_WINDOW_TYPE_HINT_NORMAL); + if (options.data.splash) + gtk_window_set_type_hint (GTK_WINDOW (dlg), GDK_WINDOW_TYPE_HINT_SPLASHSCREEN); + else + gtk_window_set_type_hint (GTK_WINDOW (dlg), GDK_WINDOW_TYPE_HINT_NORMAL); gtk_window_set_title (GTK_WINDOW (dlg), options.data.dialog_title); gtk_widget_set_name (dlg, "yad-dialog-window"); #ifndef G_OS_WIN32 + /* FIXME: is that very useful !? */ if (options.parent) { gdk_window_set_transient_for (gtk_widget_get_window (dlg), @@ -161,10 +325,7 @@ #endif if (options.data.no_escape) - g_signal_connect (G_OBJECT (dlg), "close", G_CALLBACK (ignore_close_cb) , NULL); - - /* get buttons container */ - bbox = gtk_dialog_get_action_area (GTK_DIALOG (dlg)); + g_signal_connect (G_OBJECT (dlg), "close", G_CALLBACK (g_signal_stop_emission_by_name), "close"); /* set window icon */ if (options.data.window_icon) @@ -197,211 +358,114 @@ gtk_window_set_decorated (GTK_WINDOW (dlg), !options.data.undecorated); gtk_window_set_skip_taskbar_hint (GTK_WINDOW (dlg), options.data.skip_taskbar); gtk_window_set_skip_pager_hint (GTK_WINDOW (dlg), options.data.skip_taskbar); + gtk_window_set_accept_focus (GTK_WINDOW (dlg), options.data.focus); + + vbox = gtk_dialog_get_content_area (GTK_DIALOG (dlg)); + layout = create_layout (dlg); /* create timeout indicator widget */ if (options.data.timeout) { + GtkWidget *cbox = NULL, *topb = NULL; + if (G_LIKELY (options.data.to_indicator) && g_ascii_strcasecmp (options.data.to_indicator, "none")) { topb = gtk_progress_bar_new (); gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (topb), 1.0); gtk_widget_set_name (topb, "yad-timeout-indicator"); } - } - /* add top label widgets */ + /* add timeout indicator */ + if (topb) + { + if (strcasecmp (options.data.to_indicator, "top") == 0) + { #if !GTK_CHECK_VERSION(3,0,0) - hbox = hbox2 = gtk_hbox_new (FALSE, 0); + gtk_progress_bar_set_orientation (GTK_PROGRESS_BAR (topb), GTK_PROGRESS_LEFT_TO_RIGHT); + cbox = gtk_vbox_new (FALSE, 0); #else - hbox = hbox2 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); + gtk_orientable_set_orientation (GTK_ORIENTABLE (topb), GTK_ORIENTATION_HORIZONTAL); + cbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); #endif - gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dlg))), hbox, TRUE, TRUE, 5); + gtk_box_pack_start (GTK_BOX (cbox), topb, FALSE, FALSE, 2); + gtk_box_pack_end (GTK_BOX (cbox), layout, TRUE, TRUE, 0); + } + else if (strcasecmp (options.data.to_indicator, "bottom") == 0) + { #if !GTK_CHECK_VERSION(3,0,0) - vbox = gtk_vbox_new (FALSE, 0); + gtk_progress_bar_set_orientation (GTK_PROGRESS_BAR (topb), GTK_PROGRESS_LEFT_TO_RIGHT); + cbox = gtk_vbox_new (FALSE, 0); #else - vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); + gtk_orientable_set_orientation (GTK_ORIENTABLE (topb), GTK_ORIENTATION_HORIZONTAL); + cbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); #endif - - /* add timeout indicator */ - if (topb) - { - if (g_ascii_strcasecmp (options.data.to_indicator, "top") == 0) - { -#if !GTK_CHECK_VERSION(3,0,0) - gtk_progress_bar_set_orientation (GTK_PROGRESS_BAR (topb), GTK_PROGRESS_LEFT_TO_RIGHT); -#endif - gtk_box_pack_start (GTK_BOX (vbox), topb, FALSE, FALSE, 2); - } - else if (g_ascii_strcasecmp (options.data.to_indicator, "bottom") == 0) - { -#if !GTK_CHECK_VERSION(3,0,0) - gtk_progress_bar_set_orientation (GTK_PROGRESS_BAR (topb), GTK_PROGRESS_LEFT_TO_RIGHT); -#endif - gtk_box_pack_end (GTK_BOX (vbox), topb, FALSE, FALSE, 2); - } - else if (g_ascii_strcasecmp (options.data.to_indicator, "left") == 0) - { + gtk_box_pack_start (GTK_BOX (cbox), layout, TRUE, TRUE, 0); + gtk_box_pack_end (GTK_BOX (cbox), topb, FALSE, FALSE, 2); + } + else if (strcasecmp (options.data.to_indicator, "left") == 0) + { #if !GTK_CHECK_VERSION(3,0,0) - gtk_progress_bar_set_orientation (GTK_PROGRESS_BAR (topb), GTK_PROGRESS_BOTTOM_TO_TOP); + gtk_progress_bar_set_orientation (GTK_PROGRESS_BAR (topb), GTK_PROGRESS_BOTTOM_TO_TOP); + cbox = gtk_hbox_new (FALSE, 0); +#else + gtk_orientable_set_orientation (GTK_ORIENTABLE (topb), GTK_ORIENTATION_VERTICAL); + gtk_progress_bar_set_inverted (GTK_PROGRESS_BAR (topb), TRUE); + cbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); #endif - gtk_box_pack_start (GTK_BOX (hbox), topb, FALSE, FALSE, 2); - } - else if (g_ascii_strcasecmp (options.data.to_indicator, "right") == 0) - { + gtk_box_pack_start (GTK_BOX (cbox), topb, FALSE, FALSE, 2); + gtk_box_pack_end (GTK_BOX (cbox), layout, TRUE, TRUE, 0); + } + else if (strcasecmp (options.data.to_indicator, "right") == 0) + { #if !GTK_CHECK_VERSION(3,0,0) - gtk_progress_bar_set_orientation (GTK_PROGRESS_BAR (topb), GTK_PROGRESS_BOTTOM_TO_TOP); + gtk_progress_bar_set_orientation (GTK_PROGRESS_BAR (topb), GTK_PROGRESS_BOTTOM_TO_TOP); + cbox = gtk_hbox_new (FALSE, 0); +#else + gtk_orientable_set_orientation (GTK_ORIENTABLE (topb), GTK_ORIENTATION_VERTICAL); + gtk_progress_bar_set_inverted (GTK_PROGRESS_BAR (topb), TRUE); + cbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); #endif - gtk_box_pack_end (GTK_BOX (hbox), topb, FALSE, FALSE, 2); - } - if (settings.show_remain) - { - gchar *lbl = g_strdup_printf (_("%d sec"), options.data.timeout); + gtk_box_pack_start (GTK_BOX (cbox), layout, TRUE, TRUE, 0); + gtk_box_pack_end (GTK_BOX (cbox), topb, FALSE, FALSE, 2); + } + + if (settings.show_remain) + { + gchar *lbl = g_strdup_printf (_("%d sec"), options.data.timeout); #if GTK_CHECK_VERSION(3,0,0) - gtk_progress_bar_set_show_text (GTK_PROGRESS_BAR (topb), TRUE); + gtk_progress_bar_set_show_text (GTK_PROGRESS_BAR (topb), TRUE); #endif - gtk_progress_bar_set_text (GTK_PROGRESS_BAR (topb), lbl); - g_free (lbl); + gtk_progress_bar_set_text (GTK_PROGRESS_BAR (topb), lbl); + g_free (lbl); + } } - } - - /* must be after indicator! */ - gtk_box_pack_end (GTK_BOX (hbox), vbox, TRUE, TRUE, 0); - - if (options.data.image_on_top) - { + else + { #if !GTK_CHECK_VERSION(3,0,0) - hbox2 = gtk_hbox_new (FALSE, 0); + cbox = gtk_vbox_new (FALSE, 0); #else - hbox2 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); + cbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); #endif - gtk_box_pack_start (GTK_BOX (vbox), hbox2, FALSE, FALSE, 0); - } - - if (options.data.dialog_image) - { - GdkPixbuf *pb = NULL; + gtk_box_pack_start (GTK_BOX (cbox), layout, TRUE, TRUE, 0); + } - pb = get_pixbuf (options.data.dialog_image, YAD_BIG_ICON); - image = gtk_image_new_from_pixbuf (pb); - if (pb) - g_object_unref (pb); + if (cbox) + gtk_box_pack_start (GTK_BOX (vbox), cbox, TRUE, TRUE, 0); - gtk_widget_set_name (image, "yad-dialog-image"); - gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0); - gtk_box_pack_start (GTK_BOX (hbox2), image, FALSE, FALSE, 2); + /* set timeout handler */ + g_timeout_add_seconds (1, timeout_cb, topb); } - if (options.data.dialog_text) - { - /* for dnd's tooltip we don't need text label */ - if (options.mode != YAD_MODE_DND || !options.dnd_data.tooltip) - { - gchar *buf = g_strcompress (options.data.dialog_text); - - text = gtk_label_new (NULL); - if (!options.data.no_markup) - gtk_label_set_markup (GTK_LABEL (text), buf); - else - gtk_label_set_text (GTK_LABEL (text), buf); - g_free (buf); + else + gtk_box_pack_start (GTK_BOX (vbox), layout, TRUE, TRUE, 0); - gtk_widget_set_name (text, "yad-dialog-label"); - gtk_label_set_line_wrap (GTK_LABEL (text), TRUE); - gtk_label_set_selectable (GTK_LABEL (text), options.data.selectable_labels); - gtk_label_set_justify (GTK_LABEL (text), options.data.text_align); - switch (options.data.text_align) - { - case GTK_JUSTIFY_LEFT: - case GTK_JUSTIFY_FILL: - gtk_misc_set_alignment (GTK_MISC (text), 0.0, 0.5); - break; - case GTK_JUSTIFY_CENTER: - gtk_misc_set_alignment (GTK_MISC (text), 0.5, 0.5); - break; - case GTK_JUSTIFY_RIGHT: - gtk_misc_set_alignment (GTK_MISC (text), 1.0, 0.5); - break; - } - if (options.data.image_on_top) - gtk_box_pack_start (GTK_BOX (hbox2), text, TRUE, TRUE, 2); - else - gtk_box_pack_start (GTK_BOX (vbox), text, FALSE, FALSE, 2); -#if !GTK_CHECK_VERSION(3,0,0) - if (!options.data.fixed) - g_signal_connect (G_OBJECT (text), "size-allocate", G_CALLBACK (text_size_allocate_cb), NULL); -#endif - } - } + /* get buttons container */ + bbox = gtk_dialog_get_action_area (GTK_DIALOG (dlg)); - /* add main widget */ - switch (options.mode) - { - case YAD_MODE_CALENDAR: - main_widget = calendar_create_widget (dlg); - break; - case YAD_MODE_COLOR: - main_widget = color_create_widget (dlg); - break; - case YAD_MODE_DND: - dnd_init (dlg); - break; - case YAD_MODE_ENTRY: - main_widget = entry_create_widget (dlg); - break; - case YAD_MODE_FILE: - main_widget = file_create_widget (dlg); - break; - case YAD_MODE_FONT: - main_widget = font_create_widget (dlg); - break; - case YAD_MODE_FORM: - main_widget = form_create_widget (dlg); - break; #ifdef HAVE_HTML - case YAD_MODE_HTML: - main_widget = html_create_widget (dlg); - break; -#endif - case YAD_MODE_ICONS: - main_widget = icons_create_widget (dlg); - break; - case YAD_MODE_LIST: - main_widget = list_create_widget (dlg); - break; - case YAD_MODE_MULTI_PROGRESS: - main_widget = multi_progress_create_widget (dlg); - break; - case YAD_MODE_NOTEBOOK: - main_widget = notebook_create_widget (dlg); - break; - case YAD_MODE_PANED: - main_widget = paned_create_widget (dlg); - break; - case YAD_MODE_PROGRESS: - main_widget = progress_create_widget (dlg); - break; - case YAD_MODE_SCALE: - main_widget = scale_create_widget (dlg); - break; - case YAD_MODE_TEXTINFO: - main_widget = text_create_widget (dlg); - break; - default: ; - } - - if (main_widget) - { - if (options.data.expander) - { - GtkWidget *exp; - - exp = gtk_expander_new_with_mnemonic (options.data.expander); - gtk_expander_set_expanded (GTK_EXPANDER (exp), FALSE); - gtk_container_add (GTK_CONTAINER (exp), main_widget); - gtk_box_pack_start (GTK_BOX (vbox), exp, TRUE, TRUE, 2); - } - else - gtk_box_pack_start (GTK_BOX (vbox), main_widget, TRUE, TRUE, 2); - } + /* enable no-buttons mode if --browser is specified and sets no custom buttons */ + if (options.mode == YAD_MODE_HTML && options.html_data.browser && !options.data.buttons) + options.data.no_buttons = TRUE; +#endif /* add buttons */ if (!options.data.no_buttons) @@ -427,7 +491,8 @@ } else { - if (options.mode == YAD_MODE_PROGRESS || options.mode == YAD_MODE_MULTI_PROGRESS) + if (options.mode == YAD_MODE_PROGRESS || options.mode == YAD_MODE_MULTI_PROGRESS || + options.mode == YAD_MODE_DND || options.mode == YAD_MODE_PICTURE) gtk_dialog_add_buttons (GTK_DIALOG (dlg), GTK_STOCK_CLOSE, YAD_RESPONSE_OK, NULL); else { @@ -446,9 +511,6 @@ /* show widgets */ gtk_widget_show_all (gtk_dialog_get_content_area (GTK_DIALOG (dlg))); - if (options.data.no_buttons) - gtk_widget_hide (bbox); - /* parse geometry, if given. must be after showing widget */ if (options.data.geometry && !options.data.maximized && !options.data.fullscreen) { @@ -457,6 +519,9 @@ } gtk_widget_show (dlg); + if (options.data.no_buttons) + gtk_widget_hide (bbox); + /* set maximized or fixed size after showing widget */ if (options.data.maximized) gtk_window_maximize (GTK_WINDOW (dlg)); @@ -468,12 +533,6 @@ if (options.data.fixed) gtk_widget_set_size_request (dlg, options.data.width, options.data.height); } - /* set timeout */ - if (options.data.timeout) - { - g_timeout_add_seconds (options.data.timeout, timeout_cb, dlg); - g_timeout_add_seconds (1, timeout_indicator_cb, topb); - } #ifndef G_OS_WIN32 /* print xid */ @@ -487,11 +546,10 @@ return dlg; } -void +static void create_plug (void) { - GtkWidget *win, *vbox, *text; - GtkWidget *main_widget = NULL; + GtkWidget *win, *box; tabs = get_tabs (options.plug, FALSE); while (!tabs) @@ -506,96 +564,9 @@ options.data.borders = (gint) gtk_container_get_border_width (GTK_CONTAINER (win)); gtk_container_set_border_width (GTK_CONTAINER (win), (guint) options.data.borders); -#if !GTK_CHECK_VERSION(3,0,0) - vbox = gtk_vbox_new (FALSE, 0); -#else - vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); -#endif - gtk_container_add (GTK_CONTAINER (win), vbox); - - /* add dialog text */ - if (options.data.dialog_text) - { - gchar *buf = g_strcompress (options.data.dialog_text); - - text = gtk_label_new (NULL); - if (!options.data.no_markup) - gtk_label_set_markup (GTK_LABEL (text), buf); - else - gtk_label_set_text (GTK_LABEL (text), buf); - gtk_widget_set_name (text, "yad-dialog-label"); - gtk_label_set_line_wrap (GTK_LABEL (text), TRUE); - gtk_label_set_selectable (GTK_LABEL (text), options.data.selectable_labels); - gtk_label_set_justify (GTK_LABEL (text), options.data.text_align); - switch (options.data.text_align) - { - case GTK_JUSTIFY_LEFT: - case GTK_JUSTIFY_FILL: - gtk_misc_set_alignment (GTK_MISC (text), 0.0, 0.5); - break; - case GTK_JUSTIFY_CENTER: - gtk_misc_set_alignment (GTK_MISC (text), 0.5, 0.5); - break; - case GTK_JUSTIFY_RIGHT: - gtk_misc_set_alignment (GTK_MISC (text), 1.0, 0.5); - break; - } - gtk_box_pack_start (GTK_BOX (vbox), text, FALSE, FALSE, 2); -#if !GTK_CHECK_VERSION(3,0,0) - g_signal_connect (G_OBJECT (text), "size-allocate", G_CALLBACK (text_size_allocate_cb), NULL); -#endif - - g_free (buf); - } - - /* add main widget */ - switch (options.mode) - { - case YAD_MODE_CALENDAR: - main_widget = calendar_create_widget (win); - break; - case YAD_MODE_COLOR: - main_widget = color_create_widget (win); - break; - case YAD_MODE_ENTRY: - main_widget = entry_create_widget (win); - break; - case YAD_MODE_FILE: - main_widget = file_create_widget (win); - break; - case YAD_MODE_FONT: - main_widget = font_create_widget (win); - break; - case YAD_MODE_FORM: - main_widget = form_create_widget (win); - break; -#ifdef HAVE_HTML - case YAD_MODE_HTML: - main_widget = html_create_widget (win); - break; -#endif - case YAD_MODE_ICONS: - main_widget = icons_create_widget (win); - break; - case YAD_MODE_LIST: - main_widget = list_create_widget (win); - break; - case YAD_MODE_MULTI_PROGRESS: - main_widget = multi_progress_create_widget (win); - break; - case YAD_MODE_PROGRESS: - main_widget = progress_create_widget (win); - break; - case YAD_MODE_SCALE: - main_widget = scale_create_widget (win); - break; - case YAD_MODE_TEXTINFO: - main_widget = text_create_widget (win); - break; - default:; - } - if (main_widget) - gtk_box_pack_start (GTK_BOX (vbox), main_widget, TRUE, TRUE, 2); + box = create_layout (win); + if (box) + gtk_container_add (GTK_CONTAINER (win), box); gtk_widget_show_all (win); @@ -612,40 +583,40 @@ { switch (options.mode) { - case YAD_MODE_CALENDAR: - calendar_print_result (); - break; - case YAD_MODE_COLOR: - color_print_result (); - break; - case YAD_MODE_ENTRY: - entry_print_result (); - break; - case YAD_MODE_FILE: - file_print_result (); - break; - case YAD_MODE_FONT: - font_print_result (); - break; - case YAD_MODE_FORM: - form_print_result (); - break; - case YAD_MODE_LIST: - list_print_result (); - break; - case YAD_MODE_NOTEBOOK: - notebook_print_result (); - break; - case YAD_MODE_PANED: - paned_print_result (); - break; - case YAD_MODE_SCALE: - scale_print_result (); - break; - case YAD_MODE_TEXTINFO: - text_print_result (); - break; - default:; + case YAD_MODE_CALENDAR: + calendar_print_result (); + break; + case YAD_MODE_COLOR: + color_print_result (); + break; + case YAD_MODE_ENTRY: + entry_print_result (); + break; + case YAD_MODE_FILE: + file_print_result (); + break; + case YAD_MODE_FONT: + font_print_result (); + break; + case YAD_MODE_FORM: + form_print_result (); + break; + case YAD_MODE_LIST: + list_print_result (); + break; + case YAD_MODE_NOTEBOOK: + notebook_print_result (); + break; + case YAD_MODE_PANED: + paned_print_result (); + break; + case YAD_MODE_SCALE: + scale_print_result (); + break; + case YAD_MODE_TEXTINFO: + text_print_result (); + break; + default:; } } @@ -656,7 +627,7 @@ GError *err = NULL; gint w, h; gchar *str; - gint ret = 0; + gint ret = YAD_RESPONSE_ESC; setlocale (LC_ALL, ""); @@ -681,9 +652,9 @@ { gchar *cmd, **args = NULL; gint cnt; - + cmd = g_strdup_printf ("yad %s", g_getenv ("YAD_OPTIONS")); - + if (g_shell_parse_argv (cmd, &cnt, &args, &err)) { g_option_context_parse (ctx, &cnt, &args, &err); @@ -691,16 +662,16 @@ { g_printerr (_("Unable to parse YAD_OPTIONS: %s\n"), err->message); g_error_free (err); - err = NULL; + err = NULL; } } else { g_printerr (_("Unable to parse YAD_OPTIONS: %s\n"), err->message); g_error_free (err); - err = NULL; + err = NULL; } - + g_free (cmd); } /* parse command line */ @@ -791,78 +762,74 @@ switch (options.mode) { - case YAD_MODE_ABOUT: - ret = yad_about (); - break; - - case YAD_MODE_VERSION: - g_print ("%s (GTK+ %d.%d.%d)\n", VERSION, gtk_major_version, gtk_minor_version, gtk_micro_version); - break; - - case YAD_MODE_NOTIFICATION: - ret = yad_notification_run (); - break; - - case YAD_MODE_PRINT: - ret = yad_print_run (); - break; + case YAD_MODE_ABOUT: + ret = yad_about (); + break; + + case YAD_MODE_VERSION: + g_print ("%s (GTK+ %d.%d.%d)\n", VERSION, gtk_major_version, gtk_minor_version, gtk_micro_version); + break; + + case YAD_MODE_NOTIFICATION: + ret = yad_notification_run (); + break; + + case YAD_MODE_PRINT: + ret = yad_print_run (); + break; + + default: + dialog = create_dialog (); + g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK (dlg_response_cb), &ret); + gtk_widget_show_all (dialog); -#ifdef HAVE_HTML - case YAD_MODE_HTML: - /* Webkit doesn't handle focus for child dialogs when gtk_dialog_run() is used */ - /* FIXME: maybe this solution must be expanded to all dialogs */ - dialog = create_dialog (); - g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK (html_response_cb), &ret); - - gtk_widget_show_all (dialog); - - gtk_main (); - break; +#ifndef G_OS_WIN32 + /* add YAD_XID variable */ + str = g_strdup_printf ("0x%X", (guint) GDK_WINDOW_XID (gtk_widget_get_window (dialog))); + g_setenv ("YAD_XID", str, TRUE); #endif - default: - dialog = create_dialog (); + /* make some specific init actions */ + if (options.mode == YAD_MODE_NOTEBOOK) + notebook_swallow_childs (); + else if (options.mode == YAD_MODE_PANED) + paned_swallow_childs (); + else if (options.mode == YAD_MODE_PICTURE) + { + if (options.picture_data.size == YAD_PICTURE_FIT) + picture_fit_to_window (); + } + /* run main loop */ + gtk_main (); + + /* print results */ + if (ret != YAD_RESPONSE_TIMEOUT && ret != YAD_RESPONSE_ESC) + { + if (options.data.always_print) + print_result (); + else + { + /* standard OK button pressed */ + if (ret == YAD_RESPONSE_OK && options.data.buttons == NULL) + print_result (); + /* custom even button pressed */ + else if (!(ret & 1)) + print_result (); + } + } #ifndef G_OS_WIN32 - /* add YAD_XID variable */ - str = g_strdup_printf ("0x%X", GDK_WINDOW_XID (gtk_widget_get_window (dialog))); - g_setenv ("YAD_XID", str, TRUE); -#endif - - if (options.mode == YAD_MODE_FILE) - { - /* show custom confirmation dialog */ - g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK (confirm_overwrite_cb), NULL); - } - else if (options.mode == YAD_MODE_NOTEBOOK) - notebook_swallow_childs (); - else if (options.mode == YAD_MODE_PANED) - paned_swallow_childs (); - - ret = gtk_dialog_run (GTK_DIALOG (dialog)); - if (options.data.always_print) - print_result (); - else if (ret != YAD_RESPONSE_TIMEOUT && ret != YAD_RESPONSE_ESC) - { - /* standard OK button pressed */ - if (ret == YAD_RESPONSE_OK && options.data.buttons == NULL) - print_result (); - /* custom even button pressed */ - else if (options.data.buttons && !(ret & 1)) - print_result (); - } -#ifndef G_OS_WIN32 - if (options.mode == YAD_MODE_NOTEBOOK) - notebook_close_childs (); - else if (options.mode == YAD_MODE_PANED) - paned_close_childs (); - /* autokill option for progress dialog */ - if (!options.kill_parent) - { - if ((options.mode == YAD_MODE_PROGRESS || options.mode == YAD_MODE_MULTI_PROGRESS) && - options.progress_data.autokill && ret != YAD_RESPONSE_OK) - kill (getppid (), SIGHUP); - } + if (options.mode == YAD_MODE_NOTEBOOK) + notebook_close_childs (); + else if (options.mode == YAD_MODE_PANED) + paned_close_childs (); + /* autokill option for progress dialog */ + if (!options.kill_parent) + { + if ((options.mode == YAD_MODE_PROGRESS || options.mode == YAD_MODE_MULTI_PROGRESS) && + options.progress_data.autokill && ret != YAD_RESPONSE_OK) + kill (getppid (), SIGHUP); + } #endif } diff -Nru yad-0.31.0/src/Makefile.am yad-0.33.1/src/Makefile.am --- yad-0.31.0/src/Makefile.am 2015-09-04 11:29:42.000000000 +0000 +++ yad-0.33.1/src/Makefile.am 2015-11-30 08:16:47.000000000 +0000 @@ -20,6 +20,7 @@ notification.c \ option.c \ paned.c \ + picture.c \ print.c \ progress.c \ scale.c \ diff -Nru yad-0.31.0/src/Makefile.in yad-0.33.1/src/Makefile.in --- yad-0.31.0/src/Makefile.in 2015-09-11 10:17:42.000000000 +0000 +++ yad-0.33.1/src/Makefile.in 2016-01-11 12:34:27.000000000 +0000 @@ -105,8 +105,8 @@ PROGRAMS = $(bin_PROGRAMS) am__yad_SOURCES_DIST = about.c calendar.c color.c dnd.c entry.c file.c \ font.c form.c icons.c list.c multi-progress.c notebook.c \ - notification.c option.c paned.c print.c progress.c scale.c \ - text.c util.c main.c yad.h calendar.xpm html.c + notification.c option.c paned.c picture.c print.c progress.c \ + scale.c text.c util.c main.c yad.h calendar.xpm html.c @HTML_TRUE@am__objects_1 = yad-html.$(OBJEXT) am_yad_OBJECTS = yad-about.$(OBJEXT) yad-calendar.$(OBJEXT) \ yad-color.$(OBJEXT) yad-dnd.$(OBJEXT) yad-entry.$(OBJEXT) \ @@ -114,9 +114,9 @@ yad-icons.$(OBJEXT) yad-list.$(OBJEXT) \ yad-multi-progress.$(OBJEXT) yad-notebook.$(OBJEXT) \ yad-notification.$(OBJEXT) yad-option.$(OBJEXT) \ - yad-paned.$(OBJEXT) yad-print.$(OBJEXT) yad-progress.$(OBJEXT) \ - yad-scale.$(OBJEXT) yad-text.$(OBJEXT) yad-util.$(OBJEXT) \ - yad-main.$(OBJEXT) $(am__objects_1) + yad-paned.$(OBJEXT) yad-picture.$(OBJEXT) yad-print.$(OBJEXT) \ + yad-progress.$(OBJEXT) yad-scale.$(OBJEXT) yad-text.$(OBJEXT) \ + yad-util.$(OBJEXT) yad-main.$(OBJEXT) $(am__objects_1) yad_OBJECTS = $(am_yad_OBJECTS) am__DEPENDENCIES_1 = yad_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) @@ -323,8 +323,9 @@ top_srcdir = @top_srcdir@ yad_SOURCES = about.c calendar.c color.c dnd.c entry.c file.c font.c \ form.c icons.c list.c multi-progress.c notebook.c \ - notification.c option.c paned.c print.c progress.c scale.c \ - text.c util.c main.c yad.h calendar.xpm $(am__append_1) + notification.c option.c paned.c picture.c print.c progress.c \ + scale.c text.c util.c main.c yad.h calendar.xpm \ + $(am__append_1) yad_CFLAGS = $(GTK_CFLAGS) $(HTML_CFLAGS) yad_LDADD = $(GTK_LIBS) $(HTML_LIBS) @BUILD_IB_TRUE@yad_icon_browser_SOURCES = browser.c @@ -437,6 +438,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yad-notification.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yad-option.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yad-paned.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yad-picture.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yad-print.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yad-progress.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yad-scale.Po@am__quote@ @@ -668,6 +670,20 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(yad_CFLAGS) $(CFLAGS) -c -o yad-paned.obj `if test -f 'paned.c'; then $(CYGPATH_W) 'paned.c'; else $(CYGPATH_W) '$(srcdir)/paned.c'; fi` +yad-picture.o: picture.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(yad_CFLAGS) $(CFLAGS) -MT yad-picture.o -MD -MP -MF $(DEPDIR)/yad-picture.Tpo -c -o yad-picture.o `test -f 'picture.c' || echo '$(srcdir)/'`picture.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/yad-picture.Tpo $(DEPDIR)/yad-picture.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='picture.c' object='yad-picture.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(yad_CFLAGS) $(CFLAGS) -c -o yad-picture.o `test -f 'picture.c' || echo '$(srcdir)/'`picture.c + +yad-picture.obj: picture.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(yad_CFLAGS) $(CFLAGS) -MT yad-picture.obj -MD -MP -MF $(DEPDIR)/yad-picture.Tpo -c -o yad-picture.obj `if test -f 'picture.c'; then $(CYGPATH_W) 'picture.c'; else $(CYGPATH_W) '$(srcdir)/picture.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/yad-picture.Tpo $(DEPDIR)/yad-picture.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='picture.c' object='yad-picture.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(yad_CFLAGS) $(CFLAGS) -c -o yad-picture.obj `if test -f 'picture.c'; then $(CYGPATH_W) 'picture.c'; else $(CYGPATH_W) '$(srcdir)/picture.c'; fi` + yad-print.o: print.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(yad_CFLAGS) $(CFLAGS) -MT yad-print.o -MD -MP -MF $(DEPDIR)/yad-print.Tpo -c -o yad-print.o `test -f 'print.c' || echo '$(srcdir)/'`print.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/yad-print.Tpo $(DEPDIR)/yad-print.Po diff -Nru yad-0.31.0/src/notebook.c yad-0.33.1/src/notebook.c --- yad-0.31.0/src/notebook.c 2015-09-08 08:31:21.000000000 +0000 +++ yad-0.33.1/src/notebook.c 2015-12-28 08:59:50.000000000 +0000 @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -112,8 +113,6 @@ struct shmid_ds buf; gboolean is_running = TRUE; - gtk_widget_destroy (notebook); - n_tabs = g_slist_length (options.notebook_data.tabs); for (i = 1; i <= n_tabs; i++) { @@ -133,7 +132,7 @@ break; } } - gtk_main_iteration (); + usleep (1000); } /* cleanup shared memory */ diff -Nru yad-0.31.0/src/option.c yad-0.33.1/src/option.c --- yad-0.31.0/src/option.c 2015-09-10 07:47:06.000000000 +0000 +++ yad-0.33.1/src/option.c 2015-12-29 14:43:41.000000000 +0000 @@ -42,10 +42,12 @@ static gboolean set_orient (const gchar *, const gchar *, gpointer, GError **); static gboolean set_print_type (const gchar *, const gchar *, gpointer, GError **); static gboolean set_progress_log (const gchar *, const gchar *, gpointer, GError **); +static gboolean set_size (const gchar *, const gchar *, gpointer, GError **); #ifndef G_OS_WIN32 static gboolean parse_signal (const gchar *, const gchar *, gpointer, GError **); #endif static gboolean add_image_path (const gchar *, const gchar *, gpointer, GError **); +static gboolean set_complete_type (const gchar *, const gchar *, gpointer, GError **); static gboolean about_mode = FALSE; static gboolean version_mode = FALSE; @@ -65,1316 +67,498 @@ static gboolean notebook_mode = FALSE; static gboolean notification_mode = FALSE; static gboolean paned_mode = FALSE; +static gboolean picture_mode = FALSE; static gboolean print_mode = FALSE; static gboolean progress_mode = FALSE; static gboolean scale_mode = FALSE; static gboolean text_mode = FALSE; static GOptionEntry general_options[] = { - {"title", 0, - 0, - G_OPTION_ARG_STRING, - &options.data.dialog_title, - N_("Set the dialog title"), - N_("TITLE")}, - {"window-icon", 0, - 0, - G_OPTION_ARG_FILENAME, - &options.data.window_icon, - N_("Set the window icon"), - N_("ICONPATH")}, - {"width", 0, - 0, - G_OPTION_ARG_INT, - &options.data.width, - N_("Set the width"), - N_("WIDTH")}, - {"height", 0, - 0, - G_OPTION_ARG_INT, - &options.data.height, - N_("Set the height"), - N_("HEIGHT")}, - {"geometry", 0, - 0, - G_OPTION_ARG_STRING, - &options.data.geometry, - N_("Set the window geometry"), - N_("WxH+X+Y")}, - {"timeout", 0, - 0, - G_OPTION_ARG_INT, - &options.data.timeout, - N_("Set dialog timeout in seconds"), - N_("TIMEOUT")}, - {"timeout-indicator", 0, - 0, - G_OPTION_ARG_STRING, - &options.data.to_indicator, - N_("Show remaining time indicator (top, bottom, left, right)"), - N_("POS")}, - {"text", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_STRING, - &options.data.dialog_text, - N_("Set the dialog text"), - N_("TEXT")}, - {"text-align", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_CALLBACK, - set_text_align, - N_("Set the dialog text alignment (left, center, right, fill)"), - N_("TYPE")}, - {"image", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_FILENAME, - &options.data.dialog_image, - N_("Set the dialog image"), - N_("IMAGE")}, - {"image-on-top", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_NONE, - &options.data.image_on_top, - N_("Show image above main widget"), - NULL}, - {"icon-theme", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_STRING, - &options.data.icon_theme, - N_("Use specified icon theme instead of default"), - N_("THEME")}, - {"expander", 0, - G_OPTION_FLAG_OPTIONAL_ARG, - G_OPTION_ARG_CALLBACK, - set_expander, - N_("Hide main widget with expander"), - N_("TEXT")}, - {"button", 0, - 0, - G_OPTION_ARG_CALLBACK, - add_button, - N_("Add dialog button (may be used multiple times)"), - N_("NAME:ID")}, - {"no-buttons", 0, - 0, - G_OPTION_ARG_NONE, - &options.data.no_buttons, - N_("Don't show buttons"), - NULL}, - {"buttons-layout", 0, - 0, - G_OPTION_ARG_CALLBACK, - set_buttons_layout, - N_("Set buttons layout type (spread, edge, start, end or center)"), - N_("TYPE")}, - {"no-markup", 0, - 0, - G_OPTION_ARG_NONE, - &options.data.no_markup, - N_("Don't use pango markup language in dialog's text"), - NULL}, - {"no-escape", 0, - 0, - G_OPTION_ARG_NONE, - &options.data.no_escape, - N_("Don't close dialog if Escape was pressed"), - NULL}, - {"borders", 0, - 0, - G_OPTION_ARG_INT, - &options.data.borders, - N_("Set window borders"), - N_("NUMBER")}, - {"always-print-result", 0, - 0, - G_OPTION_ARG_NONE, - &options.data.always_print, - N_("Always print result"), - NULL}, - {"selectable-labels", 0, - 0, - G_OPTION_ARG_NONE, - &options.data.selectable_labels, - N_("Dialog text can be selected"), - NULL}, + { "title", 0, 0, G_OPTION_ARG_STRING, &options.data.dialog_title, + N_("Set the dialog title"), N_("TITLE") }, + { "window-icon", 0, 0, G_OPTION_ARG_FILENAME, &options.data.window_icon, + N_("Set the window icon"), N_("ICONPATH") }, + { "width", 0, 0, G_OPTION_ARG_INT, &options.data.width, + N_("Set the width"), N_("WIDTH") }, + { "height", 0, 0, G_OPTION_ARG_INT, &options.data.height, + N_("Set the height"), N_("HEIGHT") }, + { "geometry", 0, 0, G_OPTION_ARG_STRING, &options.data.geometry, + N_("Set the window geometry"), N_("WxH+X+Y") }, + { "timeout", 0, 0, G_OPTION_ARG_INT, &options.data.timeout, + N_("Set dialog timeout in seconds"), N_("TIMEOUT") }, + { "timeout-indicator", 0, 0, G_OPTION_ARG_STRING, &options.data.to_indicator, + N_("Show remaining time indicator (top, bottom, left, right)"), N_("POS") }, + { "text", 0, G_OPTION_FLAG_NOALIAS, G_OPTION_ARG_STRING, &options.data.dialog_text, + N_("Set the dialog text"), N_("TEXT") }, + { "text-align", 0, G_OPTION_FLAG_NOALIAS, G_OPTION_ARG_CALLBACK, set_text_align, + N_("Set the dialog text alignment (left, center, right, fill)"), N_("TYPE") }, + { "image", 0, G_OPTION_FLAG_NOALIAS, G_OPTION_ARG_FILENAME, &options.data.dialog_image, + N_("Set the dialog image"), N_("IMAGE") }, + { "image-on-top", 0, G_OPTION_FLAG_NOALIAS, G_OPTION_ARG_NONE, &options.data.image_on_top, + N_("Show image above main widget"), NULL }, + { "icon-theme", 0, G_OPTION_FLAG_NOALIAS, G_OPTION_ARG_STRING, &options.data.icon_theme, + N_("Use specified icon theme instead of default"), N_("THEME") }, + { "expander", 0, G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_CALLBACK, set_expander, + N_("Hide main widget with expander"), N_("TEXT") }, + { "button", 0, 0, G_OPTION_ARG_CALLBACK, add_button, + N_("Add dialog button (may be used multiple times)"), N_("NAME:ID") }, + { "no-buttons", 0, 0, G_OPTION_ARG_NONE, &options.data.no_buttons, + N_("Don't show buttons"), NULL }, + { "buttons-layout", 0, 0, G_OPTION_ARG_CALLBACK, set_buttons_layout, + N_("Set buttons layout type (spread, edge, start, end or center)"), N_("TYPE") }, + { "no-markup", 0, 0, G_OPTION_ARG_NONE, &options.data.no_markup, + N_("Don't use pango markup language in dialog's text"), NULL }, + { "no-escape", 0, 0, G_OPTION_ARG_NONE, &options.data.no_escape, + N_("Don't close dialog if Escape was pressed"), NULL }, + { "borders", 0, 0, G_OPTION_ARG_INT, &options.data.borders, + N_("Set window borders"), N_("NUMBER") }, + { "always-print-result", 0, 0, G_OPTION_ARG_NONE, &options.data.always_print, + N_("Always print result"), NULL }, + { "selectable-labels", 0, 0, G_OPTION_ARG_NONE, &options.data.selectable_labels, + N_("Dialog text can be selected"), NULL }, /* window settings */ - {"sticky", 0, - 0, - G_OPTION_ARG_NONE, - &options.data.sticky, - N_("Set window sticky"), - NULL}, - {"fixed", 0, - 0, - G_OPTION_ARG_NONE, - &options.data.fixed, - N_("Set window unresizable"), - NULL}, - {"on-top", 0, - 0, - G_OPTION_ARG_NONE, - &options.data.ontop, - N_("Place window on top"), - NULL}, - {"center", 0, - 0, - G_OPTION_ARG_NONE, - &options.data.center, - N_("Place window on center of screen"), - NULL}, - {"mouse", 0, - 0, - G_OPTION_ARG_NONE, - &options.data.mouse, - N_("Place window at the mouse position"), - NULL}, - {"undecorated", 0, - 0, - G_OPTION_ARG_NONE, - &options.data.undecorated, - N_("Set window undecorated"), - NULL}, - {"skip-taskbar", 0, - 0, - G_OPTION_ARG_NONE, - &options.data.skip_taskbar, - N_("Don't show window in taskbar"), - NULL}, - {"maximized", 0, - 0, - G_OPTION_ARG_NONE, - &options.data.maximized, - N_("Set window maximized"), - NULL}, - {"fullscreen", 0, - 0, - G_OPTION_ARG_NONE, - &options.data.fullscreen, - N_("Set window fulscreen"), - NULL}, - {"plug", 0, - 0, - G_OPTION_ARG_INT, - &options.plug, - N_("Special type of dialog for XEMBED"), - N_("KEY")}, - {"tabnum", 0, - 0, - G_OPTION_ARG_INT, - &options.tabnum, - N_("Tab nubmer of this dialog"), - N_("NUMBER")}, + { "sticky", 0, 0, G_OPTION_ARG_NONE, &options.data.sticky, + N_("Set window sticky"), NULL }, + { "fixed", 0, 0, G_OPTION_ARG_NONE, &options.data.fixed, + N_("Set window unresizable"), NULL }, + { "on-top", 0, 0, G_OPTION_ARG_NONE, &options.data.ontop, + N_("Place window on top"), NULL }, + { "center", 0, 0, G_OPTION_ARG_NONE, &options.data.center, + N_("Place window on center of screen"), NULL }, + { "mouse", 0, 0, G_OPTION_ARG_NONE, &options.data.mouse, + N_("Place window at the mouse position"), NULL }, + { "undecorated", 0, 0, G_OPTION_ARG_NONE, &options.data.undecorated, + N_("Set window undecorated"), NULL }, + { "skip-taskbar", 0, 0, G_OPTION_ARG_NONE, &options.data.skip_taskbar, + N_("Don't show window in taskbar"), NULL }, + { "maximized", 0, 0, G_OPTION_ARG_NONE, &options.data.maximized, + N_("Set window maximized"), NULL }, + { "fullscreen", 0, 0, G_OPTION_ARG_NONE, &options.data.fullscreen, + N_("Set window fulscreen"), NULL }, + { "no-focus", 0, G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE, &options.data.focus, + N_("Don't focus dialog window"), NULL }, + { "splash", 0, 0, G_OPTION_ARG_NONE, &options.data.splash, + N_("Open window as a splashscreen"), NULL }, + { "plug", 0, 0, G_OPTION_ARG_INT, &options.plug, + N_("Special type of dialog for XEMBED"), N_("KEY") }, + { "tabnum", 0, 0, G_OPTION_ARG_INT, &options.tabnum, + N_("Tab nubmer of this dialog"), N_("NUMBER") }, #ifndef G_OS_WIN32 - {"parent-win", 0, - 0, - G_OPTION_ARG_INT, - &options.parent, - N_("XID of parent window"), - "XID"}, - {"kill-parent", 0, - G_OPTION_FLAG_OPTIONAL_ARG, - G_OPTION_ARG_CALLBACK, - parse_signal, - N_("Send SIGNAL to parent"), - N_("SIGNAL")}, - {"print-xid", 0, - 0, - G_OPTION_ARG_NONE, - &options.print_xid, - N_("Print X Window Id to the stderr"), - NULL}, + { "parent-win", 0, 0, G_OPTION_ARG_INT, &options.parent, + N_("XID of parent window"), "XID" }, + { "kill-parent", 0, G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_CALLBACK, parse_signal, + N_("Send SIGNAL to parent"), N_("SIGNAL") }, + { "print-xid", 0, 0, G_OPTION_ARG_NONE, &options.print_xid, + N_("Print X Window Id to the stderr"), NULL }, #endif - {"image-path", 0, - 0, - G_OPTION_ARG_CALLBACK, - add_image_path, - N_("Add path for search icons by name"), - N_("PATH")}, - {NULL} + { "image-path", 0, 0, G_OPTION_ARG_CALLBACK, add_image_path, + N_("Add path for search icons by name"), N_("PATH") }, + { NULL } +}; + +static GOptionEntry common_options[] = { + { "date-format", 0, 0, G_OPTION_ARG_STRING, &options.common_data.date_format, + N_("Set the format for the returned date"), N_("PATTERN") }, + { "float-precision", 0, 0, G_OPTION_ARG_INT, &options.common_data.float_precision, + N_("Set presicion of floating numbers (default - 3)"), N_("NUMBER") }, + { "command", 0, 0, G_OPTION_ARG_STRING, &options.common_data.command, + N_("Set command handler"), N_("CMD") }, + { "listen", 0, 0, G_OPTION_ARG_NONE, &options.common_data.listen, + N_("Listen for data on stdin"), NULL }, + { "separator", 0, 0, G_OPTION_ARG_STRING, &options.common_data.separator, + N_("Set common separator character"), N_("SEPARATOR") }, + { "item-separator", 0, 0, G_OPTION_ARG_STRING, &options.common_data.item_separator, + N_("Set item separator character"), N_("SEPARATOR") }, + { "editable", 0, 0, G_OPTION_ARG_NONE, &options.common_data.editable, + N_("Allow changes to text in some cases"), NULL }, + { "quoted-output", 0, 0, G_OPTION_ARG_NONE, &options.common_data.quoted_output, + N_("Quote dialogs output"), NULL }, + { "num-output", 0, 0, G_OPTION_ARG_NONE, &options.common_data.num_output, + N_("Output number instead of text for combo-box"), NULL }, + { "fontname", 0, 0, G_OPTION_ARG_STRING, &options.common_data.font, + N_("Specify font name to use"), N_("FONTNAME") }, + { "multiple", 0, 0, G_OPTION_ARG_NONE, &options.common_data.multi, + N_("Allow multiple selection"), NULL }, + { "add-preview", 0, 0, G_OPTION_ARG_NONE, &options.common_data.preview, + N_("Enable preview"), NULL }, + { "filename", 0, 0, G_OPTION_ARG_FILENAME, &options.common_data.uri, + N_("Set source filename"), N_("FILENAME") }, + { "vertical", 0, 0, G_OPTION_ARG_NONE, &options.common_data.vertical, + N_("Set vertical orientation"), NULL }, + { "key", 0, 0, G_OPTION_ARG_INT, &options.common_data.key, + N_("Identifier of embedded dialogs"), N_("KEY") }, + { "complete", 0, 0, G_OPTION_ARG_CALLBACK, set_complete_type, + N_("Set extended completion for entries (any, all, or regex)"), N_("TYPE") }, + { NULL } }; static GOptionEntry calendar_options[] = { - {"calendar", 0, - G_OPTION_FLAG_IN_MAIN, - G_OPTION_ARG_NONE, - &calendar_mode, - N_("Display calendar dialog"), - NULL}, - {"day", 0, - 0, - G_OPTION_ARG_INT, - &options.calendar_data.day, - N_("Set the calendar day"), - N_("DAY")}, - {"month", 0, - 0, - G_OPTION_ARG_INT, - &options.calendar_data.month, - N_("Set the calendar month"), - N_("MONTH")}, - {"year", 0, - 0, - G_OPTION_ARG_INT, - &options.calendar_data.year, - N_("Set the calendar year"), - N_("YEAR")}, - {"date-format", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_STRING, - &options.common_data.date_format, - N_("Set the format for the returned date"), - N_("PATTERN")}, - {"details", 0, - 0, - G_OPTION_ARG_FILENAME, - &options.calendar_data.details, - N_("Set the filename with dates details"), - N_("FILENAME")}, - {NULL} + { "calendar", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &calendar_mode, + N_("Display calendar dialog"), NULL }, + { "day", 0, 0, G_OPTION_ARG_INT, &options.calendar_data.day, + N_("Set the calendar day"), N_("DAY") }, + { "month", 0, 0, G_OPTION_ARG_INT, &options.calendar_data.month, + N_("Set the calendar month"), N_("MONTH") }, + { "year", 0, 0, G_OPTION_ARG_INT, &options.calendar_data.year, + N_("Set the calendar year"), N_("YEAR") }, + { "details", 0, 0, G_OPTION_ARG_FILENAME, &options.calendar_data.details, + N_("Set the filename with dates details"), N_("FILENAME") }, + { NULL } }; static GOptionEntry color_options[] = { - {"color", 0, - G_OPTION_FLAG_IN_MAIN, - G_OPTION_ARG_NONE, - &color_mode, - N_("Display color selection dialog"), - NULL}, - {"color-selection", 0, - G_OPTION_FLAG_IN_MAIN, - G_OPTION_ARG_NONE, - &color_mode, - N_("Alias for --color"), - NULL}, - {"init-color", 0, - 0, - G_OPTION_ARG_STRING, - &options.color_data.init_color, - N_("Set initial color value"), - N_("COLOR")}, - {"gtk-palette", 0, - 0, - G_OPTION_ARG_NONE, - &options.color_data.gtk_palette, - N_("Show system palette in color dialog"), - NULL}, - {"palette", 0, - G_OPTION_FLAG_OPTIONAL_ARG, - G_OPTION_ARG_CALLBACK, - add_palette, - N_("Set path to palette file. Default - " RGB_FILE), - N_("FILENAME")}, - {"expand-palette", 0, - 0, - G_OPTION_ARG_NONE, - &options.color_data.expand_palette, - N_("Expand user palette"), - NULL}, - {"mode", 0, - 0, - G_OPTION_ARG_CALLBACK, - set_color_mode, - N_("Set output mode to MODE. Values are hex (default) or rgb"), - N_("MODE")}, - {"extra", 0, - 0, - G_OPTION_ARG_NONE, - &options.color_data.extra, - N_("Use #rrrrggggbbbb format instead of #rrggbb"), - NULL}, - {"alpha", 0, - 0, - G_OPTION_ARG_NONE, - &options.color_data.alpha, - N_("Add opacity to output color value"), - NULL}, - {NULL} + { "color", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &color_mode, + N_("Display color selection dialog"), NULL }, + { "color-selection", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &color_mode, + N_("Alias for --color"), NULL }, + { "init-color", 0, 0, G_OPTION_ARG_STRING, &options.color_data.init_color, + N_("Set initial color value"), N_("COLOR") }, + { "gtk-palette", 0, 0, G_OPTION_ARG_NONE, &options.color_data.gtk_palette, + N_("Show system palette in color dialog"), NULL }, + { "palette", 0, G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_CALLBACK, add_palette, + N_("Set path to palette file. Default - " RGB_FILE), N_("FILENAME") }, + { "expand-palette", 0, 0, G_OPTION_ARG_NONE, &options.color_data.expand_palette, + N_("Expand user palette"), NULL }, + { "mode", 0, 0, G_OPTION_ARG_CALLBACK, set_color_mode, + N_("Set output mode to MODE. Values are hex (default) or rgb"), N_("MODE") }, + { "extra", 0, 0, G_OPTION_ARG_NONE, &options.color_data.extra, + N_("Use #rrrrggggbbbb format instead of #rrggbb"), NULL }, + { "alpha", 0, 0, G_OPTION_ARG_NONE, &options.color_data.alpha, + N_("Add opacity to output color value"), NULL }, + { NULL } }; static GOptionEntry dnd_options[] = { - {"dnd", 0, - G_OPTION_FLAG_IN_MAIN, - G_OPTION_ARG_NONE, - &dnd_mode, - N_("Display drag-n-drop box"), - NULL}, - {"tooltip", 0, - 0, - G_OPTION_ARG_NONE, - &options.dnd_data.tooltip, - N_("Use dialog text as tooltip"), - NULL}, - {"command", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_STRING, - &options.common_data.command, - N_("Set command for process d-n-d data"), - N_("CMD")}, - {NULL} + { "dnd", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &dnd_mode, + N_("Display drag-n-drop box"), NULL }, + { "tooltip", 0, 0, G_OPTION_ARG_NONE, &options.dnd_data.tooltip, + N_("Use dialog text as tooltip"), NULL }, + { NULL } }; static GOptionEntry entry_options[] = { - {"entry", 0, - G_OPTION_FLAG_IN_MAIN, - G_OPTION_ARG_NONE, - &entry_mode, - N_("Display text entry or combo-box dialog"), - NULL}, - {"entry-label", 0, - 0, - G_OPTION_ARG_STRING, - &options.entry_data.entry_label, - N_("Set the entry label"), - N_("TEXT")}, - {"entry-text", 0, - 0, - G_OPTION_ARG_STRING, - &options.entry_data.entry_text, - N_("Set the entry text"), - N_("TEXT")}, - {"hide-text", 0, - 0, - G_OPTION_ARG_NONE, - &options.entry_data.hide_text, - N_("Hide the entry text"), - N_("TEXT")}, - {"completion", 0, - 0, - G_OPTION_ARG_NONE, - &options.entry_data.completion, - N_("Use completion instead of combo-box"), - NULL}, - {"numeric", 0, - 0, - G_OPTION_ARG_NONE, - &options.entry_data.numeric, - N_("Use spin button for text entry"), - NULL}, - {"editable", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_NONE, - &options.common_data.editable, - N_("Allow changes to text in combo-box"), - NULL}, - {"licon", 0, - 0, - G_OPTION_ARG_FILENAME, - &options.entry_data.licon, - N_("Set the left entry icon"), - N_("IMAGE")}, - {"licon-action", 0, - 0, - G_OPTION_ARG_STRING, - &options.entry_data.licon_action, - N_("Set the left entry icon action"), - N_("CMD")}, - {"ricon", 0, - 0, - G_OPTION_ARG_FILENAME, - &options.entry_data.ricon, - N_("Set the right entry icon"), - N_("IMAGE")}, - {"ricon-action", 0, - 0, - G_OPTION_ARG_STRING, - &options.entry_data.ricon_action, - N_("Set the right entry icon action"), - N_("CMD")}, - {NULL} + { "entry", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &entry_mode, + N_("Display text entry or combo-box dialog"), NULL }, + { "entry-label", 0, 0, G_OPTION_ARG_STRING, &options.entry_data.entry_label, + N_("Set the entry label"), N_("TEXT") }, + { "entry-text", 0, 0, G_OPTION_ARG_STRING, &options.entry_data.entry_text, + N_("Set the entry text"), N_("TEXT") }, + { "hide-text", 0, 0, G_OPTION_ARG_NONE, &options.entry_data.hide_text, + N_("Hide the entry text"), N_("TEXT") }, + { "completion", 0, 0, G_OPTION_ARG_NONE, &options.entry_data.completion, + N_("Use completion instead of combo-box"), NULL }, + { "numeric", 0, 0, G_OPTION_ARG_NONE, &options.entry_data.numeric, + N_("Use spin button for text entry"), NULL }, + { "licon", 0, 0, G_OPTION_ARG_FILENAME, &options.entry_data.licon, + N_("Set the left entry icon"), N_("IMAGE") }, + { "licon-action", 0, 0, G_OPTION_ARG_STRING, &options.entry_data.licon_action, + N_("Set the left entry icon action"), N_("CMD") }, + { "ricon", 0, 0, G_OPTION_ARG_FILENAME, &options.entry_data.ricon, + N_("Set the right entry icon"), N_("IMAGE") }, + { "ricon-action", 0, 0, G_OPTION_ARG_STRING, &options.entry_data.ricon_action, + N_("Set the right entry icon action"), N_("CMD") }, + { NULL } }; static GOptionEntry file_options[] = { - {"file", 0, - G_OPTION_FLAG_IN_MAIN, - G_OPTION_ARG_NONE, - &file_mode, - N_("Display file selection dialog"), - NULL}, - {"file-selection", 0, - G_OPTION_FLAG_IN_MAIN, - G_OPTION_ARG_NONE, - &file_mode, - N_("Alias for --file"), - NULL}, - {"filename", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_FILENAME, - &options.common_data.uri, - N_("Set the filename"), - N_("FILENAME")}, - {"multiple", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_NONE, - &options.common_data.multi, - N_("Allow multiple files to be selected"), - NULL}, - {"directory", 0, - 0, - G_OPTION_ARG_NONE, - &options.file_data.directory, - N_("Activate directory-only selection"), - NULL}, - {"save", 0, - 0, - G_OPTION_ARG_NONE, - &options.file_data.save, - N_("Activate save mode"), - NULL}, - {"separator", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_STRING, - &options.common_data.separator, - N_("Set output separator character"), - N_("SEPARATOR")}, - {"confirm-overwrite", 0, - G_OPTION_FLAG_OPTIONAL_ARG, - G_OPTION_ARG_CALLBACK, - add_confirm_overwrite, - N_("Confirm file selection if filename already exists"), - N_("[TEXT]")}, - {"quoted-output", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_NONE, - &options.common_data.quoted_output, - N_("Quote dialogs output"), - NULL}, - {NULL} + { "file", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &file_mode, + N_("Display file selection dialog"), NULL }, + { "file-selection", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &file_mode, + N_("Alias for --file"), NULL }, + { "directory", 0, 0, G_OPTION_ARG_NONE, &options.file_data.directory, + N_("Activate directory-only selection"), NULL }, + { "save", 0, 0, G_OPTION_ARG_NONE, &options.file_data.save, + N_("Activate save mode"), NULL }, + { "confirm-overwrite", 0, G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_CALLBACK, add_confirm_overwrite, + N_("Confirm file selection if filename already exists"), N_("[TEXT]") }, + { NULL } }; static GOptionEntry font_options[] = { - {"font", 0, - G_OPTION_FLAG_IN_MAIN, - G_OPTION_ARG_NONE, - &font_mode, - N_("Display font selection dialog"), - NULL}, - {"font-selection", 0, - G_OPTION_FLAG_IN_MAIN, - G_OPTION_ARG_NONE, - &font_mode, - N_("Alias for --font"), - NULL}, - {"fontname", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_STRING, - &options.common_data.font, - N_("Set initial font"), - N_("FONTNAME")}, - {"preview", 0, - 0, - G_OPTION_ARG_STRING, - &options.font_data.preview, - N_("Set preview text"), - N_("TEXT")}, - {NULL} + { "font", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &font_mode, + N_("Display font selection dialog"), NULL }, + { "font-selection", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &font_mode, + N_("Alias for --font"), NULL }, + { "preview", 0, 0, G_OPTION_ARG_STRING, &options.font_data.preview, + N_("Set text string for preview"), N_("TEXT") }, + { NULL } }; static GOptionEntry form_options[] = { - {"form", 0, - G_OPTION_FLAG_IN_MAIN, - G_OPTION_ARG_NONE, - &form_mode, - N_("Display form dialog"), - NULL}, - {"field", 0, - 0, - G_OPTION_ARG_CALLBACK, - add_field, - N_ - ("Add field to form (TYPE - H, RO, NUM, CHK, CB, CBE, CE, FL, SFL, MFL, DIR, CDIR, MDIR, FN, DT, SCL, CLR, BTN, FBTN, LBL or TXT)"), - N_("LABEL[:TYPE]")}, - {"align", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_CALLBACK, - set_align, - N_("Set alignment of filed labels (left, center or right)"), - N_("TYPE")}, - {"columns", 0, - 0, - G_OPTION_ARG_INT, - &options.form_data.columns, - N_("Set number of columns in form"), - N_("NUMBER")}, - {"separator", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_STRING, - &options.common_data.separator, - N_("Set output separator character"), - N_("SEPARATOR")}, - {"item-separator", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_STRING, - &options.common_data.item_separator, - N_("Set separator character for combobox or scale data"), - N_("SEPARATOR")}, - {"date-format", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_STRING, - &options.common_data.date_format, - N_("Set the format for the returned date"), - N_("PATTERN")}, - {"scroll", 0, - 0, - G_OPTION_ARG_NONE, - &options.form_data.scroll, - N_("Make form scrollable"), - NULL}, - {"quoted-output", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_NONE, - &options.common_data.quoted_output, - N_("Quote dialogs output"), - NULL}, - {"output-by-row", 0, - 0, - G_OPTION_ARG_NONE, - &options.form_data.output_by_row, - N_("Order output fields by rows"), - NULL}, - {NULL} + { "form", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &form_mode, + N_("Display form dialog"), NULL }, + { "field", 0, 0, G_OPTION_ARG_CALLBACK, add_field, + N_ ("Add field to form (see man page for list of possible types)"), N_("LABEL[:TYPE]") }, + { "align", 0, G_OPTION_FLAG_NOALIAS, G_OPTION_ARG_CALLBACK, set_align, + N_("Set alignment of filed labels (left, center or right)"), N_("TYPE") }, + { "columns", 0, 0, G_OPTION_ARG_INT, &options.form_data.columns, + N_("Set number of columns in form"), N_("NUMBER") }, + { "scroll", 0, 0, G_OPTION_ARG_NONE, &options.form_data.scroll, + N_("Make form scrollable"), NULL }, + { "output-by-row", 0, 0, G_OPTION_ARG_NONE, &options.form_data.output_by_row, + N_("Order output fields by rows"), NULL }, + { "focus-field", 0, 0, G_OPTION_ARG_INT, &options.form_data.focus_field, + N_("Set focused field"), N_("NUMBER") }, + { "cycle-read", 0, 0, G_OPTION_ARG_NONE, &options.form_data.cycle_read, + N_("Cycled reading of stdin data"), NULL }, + { NULL } }; #ifdef HAVE_HTML static GOptionEntry html_options[] = { - {"html", 0, - G_OPTION_FLAG_IN_MAIN, - G_OPTION_ARG_NONE, - &html_mode, - N_("Display HTML dialog"), - NULL}, - {"uri", 0, - 0, - G_OPTION_ARG_STRING, - &options.html_data.uri, - N_("Open specified location"), - N_("URI")}, - {"browser", 0, - 0, - G_OPTION_ARG_NONE, - &options.html_data.browser, - N_("Turn on browser mode"), - NULL}, - {"print-uri", 0, - 0, - G_OPTION_ARG_NONE, - &options.html_data.print_uri, - N_("Print clicked uri to stdout"), - NULL}, - {"mime", 0, - 0, - G_OPTION_ARG_STRING, - &options.html_data.mime, - N_("Set mime type of input stream data"), - N_("MIME")}, - {"encoding", 0, - 0, - G_OPTION_ARG_STRING, - &options.html_data.encoding, - N_("Set encoding of input stream data"), - N_("ENCODING")}, - {NULL} + { "html", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &html_mode, + N_("Display HTML dialog"), NULL }, + { "uri", 0, 0, G_OPTION_ARG_STRING, &options.html_data.uri, + N_("Open specified location"), "URI" }, + { "browser", 0, 0, G_OPTION_ARG_NONE, &options.html_data.browser, + N_("Turn on browser mode"), NULL }, + { "print-uri", 0, 0, G_OPTION_ARG_NONE, &options.html_data.print_uri, + N_("Print clicked uri to stdout"), NULL }, + { "mime", 0, 0, G_OPTION_ARG_STRING, &options.html_data.mime, + N_("Set mime type of input stream data"), N_("TYPE") }, + { "encoding", 0, 0, G_OPTION_ARG_STRING, &options.html_data.encoding, + N_("Set encoding of input stream data"), N_("ENCODING") }, + { NULL } }; #endif static GOptionEntry icons_options[] = { - {"icons", 0, - G_OPTION_FLAG_IN_MAIN, - G_OPTION_ARG_NONE, - &icons_mode, - N_("Display icons box dialog"), - NULL}, - {"read-dir", 0, - 0, - G_OPTION_ARG_STRING, - &options.icons_data.directory, - N_("Read data from .desktop files in specified directory"), - N_("DIRECTORY")}, - {"compact", 0, - 0, - G_OPTION_ARG_NONE, - &options.icons_data.compact, - N_("Use compact (list) view"), - NULL}, - {"generic", 0, - 0, - G_OPTION_ARG_NONE, - &options.icons_data.generic, - N_("Use GenericName field instead of Name for icon label"), - NULL}, - {"listen", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_NONE, - &options.common_data.listen, - N_("Read data from stdin"), - NULL}, - {"item-width", 0, - 0, - G_OPTION_ARG_INT, - &options.icons_data.width, - N_("Set the width of dialog items"), - NULL}, - {"term", 0, - 0, - G_OPTION_ARG_STRING, - &options.icons_data.term, - /* xgettext: no-c-format */ - N_("Use specified pattern for launch command in terminal (default: xterm -e %s)"), - N_("PATTERN")}, - {"sort-by-name", 0, - 0, - G_OPTION_ARG_NONE, - &options.icons_data.sort_by_name, - N_("Sort items by name instead of filename"), - NULL}, - {"descend", 0, - 0, - G_OPTION_ARG_NONE, - &options.icons_data.descend, - N_("Sort items in descending order"), - NULL}, - {"single-click", 0, - 0, - G_OPTION_ARG_NONE, - &options.icons_data.single_click, - N_("Activate items by single click"), - NULL}, - {NULL} + { "icons", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &icons_mode, + N_("Display icons box dialog"), NULL }, + { "read-dir", 0, 0, G_OPTION_ARG_STRING, &options.icons_data.directory, + N_("Read data from .desktop files in specified directory"), N_("DIR") }, + { "compact", 0, 0, G_OPTION_ARG_NONE, &options.icons_data.compact, + N_("Use compact (list) view"), NULL }, + { "generic", 0, 0, G_OPTION_ARG_NONE, &options.icons_data.generic, + N_("Use GenericName field instead of Name for icon label"), NULL }, + { "item-width", 0, 0, G_OPTION_ARG_INT, &options.icons_data.width, + N_("Set the width of dialog items"), NULL }, + { "term", 0, 0, G_OPTION_ARG_STRING, &options.icons_data.term, + /* xgettext: no-c-format */ + N_("Use specified pattern for launch command in terminal (default: xterm -e %s)"), N_("PATTERN") }, + { "sort-by-name", 0, 0, G_OPTION_ARG_NONE, &options.icons_data.sort_by_name, + N_("Sort items by name instead of filename"), NULL }, + { "descend", 0, 0, G_OPTION_ARG_NONE, &options.icons_data.descend, + N_("Sort items in descending order"), NULL }, + { "single-click", 0, 0, G_OPTION_ARG_NONE, &options.icons_data.single_click, + N_("Activate items by single click"), NULL }, + { NULL } }; static GOptionEntry list_options[] = { - {"list", 0, - G_OPTION_FLAG_IN_MAIN, - G_OPTION_ARG_NONE, - &list_mode, - N_("Display list dialog"), - NULL}, - {"column", 0, - 0, - G_OPTION_ARG_CALLBACK, - add_column, - N_("Set the column header (TYPE - TEXT, NUM, FLT, CHK, RD, IMG, HD or TIP)"), - N_("COLUMN[:TYPE]")}, - {"checklist", 0, - 0, - G_OPTION_ARG_NONE, - &options.list_data.checkbox, - N_("Use checkboxes for first column"), - NULL}, - {"radiolist", 0, - 0, - G_OPTION_ARG_NONE, - &options.list_data.radiobox, - N_("Use radioboxes for first column"), - NULL}, - {"no-headers", 0, - 0, - G_OPTION_ARG_NONE, - &options.list_data.no_headers, - N_("Don't show column headers"), - NULL}, - {"no-click", 0, - G_OPTION_FLAG_REVERSE, - G_OPTION_ARG_NONE, - &options.list_data.clickable, - N_("Disable clickable column headers"), - NULL}, - {"no-rules-hint", 0, - G_OPTION_FLAG_REVERSE, - G_OPTION_ARG_NONE, - &options.list_data.rules_hint, - N_("Disable rules hints"), - NULL}, - {"separator", - 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_STRING, - &options.common_data.separator, - N_("Set output separator character"), - N_("SEPARATOR")}, - {"multiple", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_NONE, - &options.common_data.multi, - N_("Allow multiple rows to be selected"), - NULL}, - {"editable", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_NONE, - &options.common_data.editable, - N_("Allow changes to text"), - NULL}, - {"print-all", 0, - 0, - G_OPTION_ARG_NONE, - &options.list_data.print_all, - N_("Print all data from list"), - NULL}, - {"ellipsize", 0, - 0, - G_OPTION_ARG_CALLBACK, - set_ellipsize, - N_("Set ellipsize mode for text columns (TYPE - NONE, START, MIDDLE or END)"), - N_("TYPE")}, - {"print-column", 0, - 0, - G_OPTION_ARG_INT, - &options.list_data.print_column, - N_("Print a specific column. By default or if 0 is specified will be printed all columns"), - N_("NUMBER")}, - {"hide-column", 0, - 0, - G_OPTION_ARG_INT, - &options.list_data.hide_column, - N_("Hide a specific column"), - N_("NUMBER")}, - {"expand-column", 0, - 0, - G_OPTION_ARG_INT, - &options.list_data.expand_column, - N_("Set the column expandable by default. 0 sets all columns expandable"), - N_("NUMBER")}, - {"search-column", 0, - 0, - G_OPTION_ARG_INT, - &options.list_data.search_column, - N_("Set the quick search column. Default is first column. Set it to 0 for disable searching"), - N_("NUMBER")}, - {"tooltip-column", 0, - 0, - G_OPTION_ARG_INT, - &options.list_data.tooltip_column, - N_("Set the tooltip column"), - N_("NUMBER")}, - {"sep-column", 0, - 0, - G_OPTION_ARG_INT, - &options.list_data.sep_column, - N_("Set the row separator column"), - N_("NUMBER")}, - {"sep-value", 0, - 0, - G_OPTION_ARG_STRING, - &options.list_data.sep_value, - N_("Set the row separator value"), - N_("TEXT")}, - {"limit", 0, - 0, - G_OPTION_ARG_INT, - &options.list_data.limit, - N_("Set the limit of rows in list"), - N_("NUMBER")}, - {"dclick-action", 0, - 0, - G_OPTION_ARG_STRING, - &options.list_data.dclick_action, - N_("Set double-click action"), - N_("CMD")}, - {"regex-search", 0, - 0, - G_OPTION_ARG_NONE, - &options.list_data.regex_search, - N_("Use regex in search"), - NULL}, - {"listen", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_NONE, - &options.common_data.listen, - N_("Listen for data on stdin in addition to command-line"), - NULL}, - {"quoted-output", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_NONE, - &options.common_data.quoted_output, - N_("Quote dialogs output"), - NULL}, - {NULL} + { "list", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &list_mode, + N_("Display list dialog"), NULL }, + { "column", 0, 0, G_OPTION_ARG_CALLBACK, add_column, + N_("Set the column header (see man page for list of possible types)"), N_("COLUMN[:TYPE]") }, + { "checklist", 0, 0, G_OPTION_ARG_NONE, &options.list_data.checkbox, + N_("Use checkboxes for first column"), NULL }, + { "radiolist", 0, 0, G_OPTION_ARG_NONE, &options.list_data.radiobox, + N_("Use radioboxes for first column"), NULL }, + { "no-headers", 0, 0, G_OPTION_ARG_NONE, &options.list_data.no_headers, + N_("Don't show column headers"), NULL }, + { "no-click", 0, G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE, &options.list_data.clickable, + N_("Disable clickable column headers"), NULL }, + { "no-rules-hint", 0, G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE, &options.list_data.rules_hint, + N_("Disable rules hints"), NULL }, + { "print-all", 0, 0, G_OPTION_ARG_NONE, &options.list_data.print_all, + N_("Print all data from list"), NULL }, + { "ellipsize", 0, 0, G_OPTION_ARG_CALLBACK, set_ellipsize, + N_("Set ellipsize mode for text columns (none, start, middle or end)"), N_("TYPE") }, + { "print-column", 0, 0, G_OPTION_ARG_INT, &options.list_data.print_column, + N_("Print a specific column. By default or if 0 is specified will be printed all columns"), N_("NUMBER") }, + { "hide-column", 0, 0, G_OPTION_ARG_INT, &options.list_data.hide_column, + N_("Hide a specific column"), N_("NUMBER") }, + { "expand-column", 0, 0, G_OPTION_ARG_INT, &options.list_data.expand_column, + N_("Set the column expandable by default. 0 sets all columns expandable"), N_("NUMBER") }, + { "search-column", 0, 0, G_OPTION_ARG_INT, &options.list_data.search_column, + N_("Set the quick search column. Default is first column. Set it to 0 for disable searching"), N_("NUMBER") }, + { "tooltip-column", 0, 0, G_OPTION_ARG_INT, &options.list_data.tooltip_column, + N_("Set the tooltip column"), N_("NUMBER") }, + { "sep-column", 0, 0, G_OPTION_ARG_INT, &options.list_data.sep_column, + N_("Set the row separator column"), N_("NUMBER") }, + { "sep-value", 0, 0, G_OPTION_ARG_STRING, &options.list_data.sep_value, + N_("Set the row separator value"), N_("TEXT") }, + { "limit", 0, 0, G_OPTION_ARG_INT, &options.list_data.limit, + N_("Set the limit of rows in list"), N_("NUMBER") }, + { "dclick-action", 0, 0, G_OPTION_ARG_STRING, &options.list_data.dclick_action, + N_("Set double-click action"), N_("CMD") }, + { "regex-search", 0, 0, G_OPTION_ARG_NONE, &options.list_data.regex_search, + N_("Use regex in search"), NULL }, + { NULL } }; static GOptionEntry multi_progress_options[] = { - {"multi-progress", 0, - G_OPTION_FLAG_IN_MAIN, - G_OPTION_ARG_NONE, - &multi_progress_mode, - N_("Display multi progress bars dialog"), - NULL}, - {"bar", 0, - 0, - G_OPTION_ARG_CALLBACK, - add_bar, - N_("Add the progress bar (TYPE - NORM, RTL or PULSE)"), - N_("LABEL[:TYPE]")}, - {"vertical", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_NONE, - &options.common_data.vertical, - N_("Show vertical bars"), - NULL}, - {"align", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_CALLBACK, - set_align, - N_("Set alignment of bar labels (left, center or right)"), - N_("TYPE")}, - {"auto-close", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_NONE, - &options.progress_data.autoclose, - /* xgettext: no-c-format */ - N_("Dismiss the dialog when 100% of all bars has been reached"), - NULL}, + { "multi-progress", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &multi_progress_mode, + N_("Display multi progress bars dialog"), NULL }, + { "bar", 0, 0, G_OPTION_ARG_CALLBACK, add_bar, + N_("Add the progress bar (norm, rtl or pulse)"), N_("LABEL[:TYPE]") }, + { "align", 0, G_OPTION_FLAG_NOALIAS, G_OPTION_ARG_CALLBACK, set_align, + N_("Set alignment of bar labels (left, center or right)"), N_("TYPE") }, + { "auto-close", 0, G_OPTION_FLAG_NOALIAS, G_OPTION_ARG_NONE, &options.progress_data.autoclose, + /* xgettext: no-c-format */ + N_("Dismiss the dialog when 100% of all bars has been reached"), NULL }, #ifndef G_OS_WIN32 - {"auto-kill", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_NONE, - &options.progress_data.autokill, - N_("Kill parent process if cancel button is pressed"), - NULL}, + { "auto-kill", 0, G_OPTION_FLAG_NOALIAS, G_OPTION_ARG_NONE, &options.progress_data.autokill, + N_("Kill parent process if cancel button is pressed"), NULL }, #endif - {NULL} + { NULL } }; static GOptionEntry notebook_options[] = { - {"notebook", 0, - G_OPTION_FLAG_IN_MAIN, - G_OPTION_ARG_NONE, - ¬ebook_mode, - N_("Display notebook dialog"), - NULL}, - {"key", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_INT, - &options.common_data.key, - N_("Identifier of embedded dialogs"), - N_("KEY")}, - {"tab", 0, - 0, - G_OPTION_ARG_CALLBACK, - add_tab, - N_("Add a tab to notebook"), - N_("LABEL")}, - {"tab-pos", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_CALLBACK, - set_tab_pos, - N_("Set position of a notebook tabs (top, bottom, left or right)"), - N_("TYPE")}, - {"tab-borders", 0, - 0, - G_OPTION_ARG_INT, - &options.notebook_data.borders, - N_("Set tab borders"), - N_("NUMBER")}, - {NULL} + { "notebook", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, ¬ebook_mode, + N_("Display notebook dialog"), NULL }, + { "tab", 0, 0, G_OPTION_ARG_CALLBACK, add_tab, + N_("Add a tab to notebook"), N_("LABEL") }, + { "tab-pos", 0, G_OPTION_FLAG_NOALIAS, G_OPTION_ARG_CALLBACK, set_tab_pos, + N_("Set position of a notebook tabs (top, bottom, left or right)"), N_("TYPE") }, + { "tab-borders", 0, 0, G_OPTION_ARG_INT, &options.notebook_data.borders, + N_("Set tab borders"), N_("NUMBER") }, + { NULL } }; static GOptionEntry notification_options[] = { - {"notification", 0, - G_OPTION_FLAG_IN_MAIN, - G_OPTION_ARG_NONE, - ¬ification_mode, - N_("Display notification"), - NULL}, - {"command", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_STRING, - &options.common_data.command, - N_("Set left-click action"), - N_("CMD")}, - {"listen", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_NONE, - &options.common_data.listen, - N_("Listen for commands on stdin"), - NULL}, - {"separator", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_STRING, - &options.common_data.separator, - N_("Set separator character for menu values"), - N_("SEPARATOR")}, - {"item-separator", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_STRING, - &options.common_data.item_separator, - N_("Set separator character for menu items"), - N_("SEPARATOR")}, - {"menu", 0, - 0, - G_OPTION_ARG_STRING, - &options.notification_data.menu, - N_("Set initial popup menu"), - N_("STRING")}, - {"no-middle", 0, - G_OPTION_FLAG_REVERSE, - G_OPTION_ARG_NONE, - &options.notification_data.middle, - N_("Disable exit on middle click"), - NULL}, - {"hidden", 0, - 0, - G_OPTION_ARG_NONE, - &options.notification_data.hidden, - N_("Doesn't show icon at startup"), - NULL}, - {NULL} + { "notification", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, ¬ification_mode, + N_("Display notification"), NULL }, + { "menu", 0, 0, G_OPTION_ARG_STRING, &options.notification_data.menu, + N_("Set initial popup menu"), N_("STRING") }, + { "no-middle", 0, G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE, &options.notification_data.middle, + N_("Disable exit on middle click"), NULL }, + { "hidden", 0, 0, G_OPTION_ARG_NONE, &options.notification_data.hidden, + N_("Doesn't show icon at startup"), NULL }, + { NULL } }; static GOptionEntry paned_options[] = { - {"paned", 0, - G_OPTION_FLAG_IN_MAIN, - G_OPTION_ARG_NONE, - &paned_mode, - N_("Display paned dialog"), - NULL}, - {"orient", 0, - 0, - G_OPTION_ARG_CALLBACK, - set_orient, - N_("Set orientation (TYPE - hor[izontal] or vert[ical])"), - N_("TYPE")}, - {"splitter", 0, - 0, - G_OPTION_ARG_INT, - &options.paned_data.splitter, - N_("Set initial splitter position"), - N_("POS")}, - {"key", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_INT, - &options.common_data.key, - N_("Identifier of embedded dialogs"), - N_("KEY")}, - {NULL} + { "paned", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &paned_mode, + N_("Display paned dialog"), NULL }, + { "orient", 0, 0, G_OPTION_ARG_CALLBACK, set_orient, + N_("Set orientation (hor[izontal] or vert[ical])"), N_("TYPE") }, + { "splitter", 0, 0, G_OPTION_ARG_INT, &options.paned_data.splitter, + N_("Set initial splitter position"), N_("POS") }, + { NULL } +}; + +static GOptionEntry picture_options[] = { + { "picture", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &picture_mode, + N_("Display picture dialog"), NULL }, + { "size", 0, 0, G_OPTION_ARG_CALLBACK, set_size, + N_("Set initial size (fit or orig)"), N_("TYPE") }, + { "inc", 0, 0, G_OPTION_ARG_INT, &options.picture_data.inc, + N_("Set increment for picture scaling (default - 5)"), N_("NUMBER") }, + { NULL } }; static GOptionEntry print_options[] = { - {"print", 0, - G_OPTION_FLAG_IN_MAIN, - G_OPTION_ARG_NONE, - &print_mode, - N_("Display printing dialog"), - NULL}, - {"filename", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_FILENAME, - &options.common_data.uri, - N_("Source filename"), - N_("FILENAME")}, - {"type", 0, - 0, - G_OPTION_ARG_CALLBACK, - set_print_type, - N_("Set source type (TYPE - TEXT, IMAGE or RAW)"), - N_("TYPE")}, - {"headers", 0, - 0, - G_OPTION_ARG_NONE, - &options.print_data.headers, - N_("Add headers to page"), - NULL}, - {"add-preview", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_NONE, - &options.common_data.preview, - N_("Enable preview in print dialog"), - NULL}, - {"fontname", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_STRING, - &options.common_data.font, - N_("Use specified font"), - N_("FONTNAME")}, - {NULL} + { "print", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &print_mode, + N_("Display printing dialog"), NULL }, + { "type", 0, 0, G_OPTION_ARG_CALLBACK, set_print_type, + N_("Set source type (text, image or raw)"), N_("TYPE") }, + { "headers", 0, 0, G_OPTION_ARG_NONE, &options.print_data.headers, + N_("Add headers to page"), NULL }, + { NULL } }; static GOptionEntry progress_options[] = { - {"progress", 0, - G_OPTION_FLAG_IN_MAIN, - G_OPTION_ARG_NONE, - &progress_mode, - N_("Display progress indication dialog"), - NULL}, - {"progress-text", 0, - 0, - G_OPTION_ARG_STRING, - &options.progress_data.progress_text, - N_("Set progress text"), - N_("TEXT")}, - {"percentage", 0, - 0, - G_OPTION_ARG_INT, - &options.progress_data.percentage, - N_("Set initial percentage"), - N_("PERCENTAGE")}, - {"pulsate", 0, - 0, - G_OPTION_ARG_NONE, - &options.progress_data.pulsate, - N_("Pulsate progress bar"), - NULL}, - {"auto-close", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_NONE, - &options.progress_data.autoclose, - /* xgettext: no-c-format */ - N_("Dismiss the dialog when 100% has been reached"), - NULL}, + { "progress", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &progress_mode, + N_("Display progress indication dialog"), NULL }, + { "progress-text", 0, 0, G_OPTION_ARG_STRING, &options.progress_data.progress_text, + N_("Set progress text"), N_("TEXT") }, + { "percentage", 0, 0, G_OPTION_ARG_INT, &options.progress_data.percentage, + N_("Set initial percentage"), N_("PERCENTAGE") }, + { "pulsate", 0, 0, G_OPTION_ARG_NONE, &options.progress_data.pulsate, + N_("Pulsate progress bar"), NULL }, + { "auto-close", 0, G_OPTION_FLAG_NOALIAS, G_OPTION_ARG_NONE, &options.progress_data.autoclose, + /* xgettext: no-c-format */ + N_("Dismiss the dialog when 100% has been reached"), NULL }, #ifndef G_OS_WIN32 - {"auto-kill", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_NONE, - &options.progress_data.autokill, - N_("Kill parent process if cancel button is pressed"), - NULL}, + { "auto-kill", 0, G_OPTION_FLAG_NOALIAS, G_OPTION_ARG_NONE, &options.progress_data.autokill, + N_("Kill parent process if cancel button is pressed"), NULL }, #endif - {"rtl", 0, - 0, - G_OPTION_ARG_NONE, - &options.progress_data.rtl, - N_("Right-To-Left progress bar direction"), - NULL}, - {"enable-log", 0, - G_OPTION_FLAG_OPTIONAL_ARG, - G_OPTION_ARG_CALLBACK, - set_progress_log, - N_("Show log window"), - N_("TEXT")}, - {"log-expanded", 0, - 0, - G_OPTION_ARG_NONE, - &options.progress_data.log_expanded, - N_("Expand log window"), - NULL}, - {"log-on-top", 0, - 0, - G_OPTION_ARG_NONE, - &options.progress_data.log_on_top, - N_("Place log window above progress bar"), - NULL}, - {"log-height", 0, - 0, - G_OPTION_ARG_INT, - &options.progress_data.log_height, - N_("Height of log window"), - NULL}, - {NULL} + { "rtl", 0, 0, G_OPTION_ARG_NONE, &options.progress_data.rtl, + N_("Right-To-Left progress bar direction"), NULL }, + { "enable-log", 0, G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_CALLBACK, set_progress_log, + N_("Show log window"), N_("TEXT") }, + { "log-expanded", 0, 0, G_OPTION_ARG_NONE, &options.progress_data.log_expanded, + N_("Expand log window"), NULL }, + { "log-on-top", 0, 0, G_OPTION_ARG_NONE, &options.progress_data.log_on_top, + N_("Place log window above progress bar"), NULL }, + { "log-height", 0, 0, G_OPTION_ARG_INT, &options.progress_data.log_height, + N_("Height of log window"), NULL }, + { NULL } }; static GOptionEntry scale_options[] = { - {"scale", 0, - G_OPTION_FLAG_IN_MAIN, - G_OPTION_ARG_NONE, - &scale_mode, - N_("Display scale dialog"), - NULL}, - {"value", 0, - 0, - G_OPTION_ARG_CALLBACK, - set_scale_value, - N_("Set initial value"), - N_("VALUE")}, - {"min-value", 0, - 0, - G_OPTION_ARG_INT, - &options.scale_data.min_value, - N_("Set minimum value"), - N_("VALUE")}, - {"max-value", 0, - 0, - G_OPTION_ARG_INT, - &options.scale_data.max_value, - N_("Set maximum value"), - N_("VALUE")}, - {"step", 0, - 0, - G_OPTION_ARG_INT, - &options.scale_data.step, - N_("Set step size"), - N_("VALUE")}, - {"page", 0, - 0, - G_OPTION_ARG_INT, - &options.scale_data.page, - N_("Set paging size"), - N_("VALUE")}, - {"print-partial", 0, - 0, - G_OPTION_ARG_NONE, - &options.scale_data.print_partial, - N_("Print partial values"), - NULL}, - {"hide-value", 0, - 0, - G_OPTION_ARG_NONE, - &options.scale_data.hide_value, - N_("Hide value"), - NULL}, - {"vertical", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_NONE, - &options.common_data.vertical, - N_("Show vertical scale"), - NULL}, - {"invert", 0, - 0, - G_OPTION_ARG_NONE, - &options.scale_data.invert, - N_("Invert direction"), - NULL}, - {"mark", 0, - 0, - G_OPTION_ARG_CALLBACK, - add_scale_mark, - N_("Add mark to scale (may be used multiple times)"), - N_("NAME:VALUE")}, - {NULL} + { "scale", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &scale_mode, + N_("Display scale dialog"), NULL }, + { "value", 0, 0, G_OPTION_ARG_CALLBACK, set_scale_value, + N_("Set initial value"), N_("VALUE") }, + { "min-value", 0, 0, G_OPTION_ARG_INT, &options.scale_data.min_value, + N_("Set minimum value"), N_("VALUE") }, + { "max-value", 0, 0, G_OPTION_ARG_INT, &options.scale_data.max_value, + N_("Set maximum value"), N_("VALUE") }, + { "step", 0, 0, G_OPTION_ARG_INT, &options.scale_data.step, + N_("Set step size"), N_("VALUE") }, + { "page", 0, 0, G_OPTION_ARG_INT, &options.scale_data.page, + N_("Set paging size"), N_("VALUE") }, + { "print-partial", 0, 0, G_OPTION_ARG_NONE, &options.scale_data.print_partial, + N_("Print partial values"), NULL }, + { "hide-value", 0, 0, G_OPTION_ARG_NONE, &options.scale_data.hide_value, + N_("Hide value"), NULL }, + { "invert", 0, 0, G_OPTION_ARG_NONE, &options.scale_data.invert, + N_("Invert direction"), NULL }, + { "mark", 0, 0, G_OPTION_ARG_CALLBACK, add_scale_mark, + N_("Add mark to scale (may be used multiple times)"), N_("NAME:VALUE") }, + { NULL } }; static GOptionEntry text_options[] = { - {"text-info", 0, - G_OPTION_FLAG_IN_MAIN, - G_OPTION_ARG_NONE, - &text_mode, - N_("Display text information dialog"), - NULL}, - {"fore", 0, - 0, - G_OPTION_ARG_STRING, - &options.text_data.fore, - N_("Use specified color for text"), - N_("COLOR")}, - {"back", 0, - 0, - G_OPTION_ARG_STRING, - &options.text_data.back, - N_("Use specified color for background"), - N_("COLOR")}, - {"fontname", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_STRING, - &options.common_data.font, - N_("Use specified font"), - N_("FONTNAME")}, - {"wrap", 0, - 0, - G_OPTION_ARG_NONE, - &options.text_data.wrap, - N_("Enable text wrapping"), - NULL}, - {"justify", 0, - 0, - G_OPTION_ARG_CALLBACK, - set_justify, - N_("Set justification (TYPE - left, right, center or fill)"), - N_("TYPE")}, - {"margins", 0, - 0, - G_OPTION_ARG_INT, - &options.text_data.margins, - N_("Set text margins"), - N_("SIZE")}, - {"tail", 0, - 0, - G_OPTION_ARG_NONE, - &options.text_data.tail, - N_("Autoscroll to end of text"), - NULL}, - {"filename", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_FILENAME, - &options.common_data.uri, - N_("Open file"), - N_("FILENAME")}, - {"editable", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_NONE, - &options.common_data.editable, - N_("Allow changes to text"), - NULL}, - {"show-uri", 0, - 0, - G_OPTION_ARG_NONE, - &options.text_data.uri, - N_("Make URI clickable"), - NULL}, - {"uri-color", 0, - 0, - G_OPTION_ARG_STRING, - &options.text_data.uri_color, - N_("Use specified color for links"), - N_("COLOR")}, - {"listen", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_NONE, - &options.common_data.listen, - N_("Listen for data on stdin in addition to file"), - NULL}, - {NULL} + { "text-info", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &text_mode, + N_("Display text information dialog"), NULL }, + { "fore", 0, 0, G_OPTION_ARG_STRING, &options.text_data.fore, + N_("Use specified color for text"), N_("COLOR") }, + { "back", 0, 0, G_OPTION_ARG_STRING, &options.text_data.back, + N_("Use specified color for background"), N_("COLOR") }, + { "wrap", 0, 0, G_OPTION_ARG_NONE, &options.text_data.wrap, + N_("Enable text wrapping"), NULL }, + { "justify", 0, 0, G_OPTION_ARG_CALLBACK, set_justify, + N_("Set justification (left, right, center or fill)"), N_("TYPE") }, + { "margins", 0, 0, G_OPTION_ARG_INT, &options.text_data.margins, + N_("Set text margins"), N_("SIZE") }, + { "tail", 0, 0, G_OPTION_ARG_NONE, &options.text_data.tail, + N_("Autoscroll to end of text"), NULL }, + { "show-uri", 0, 0, G_OPTION_ARG_NONE, &options.text_data.uri, + N_("Make URI clickable"), NULL }, + { "uri-color", 0, 0, G_OPTION_ARG_STRING, &options.text_data.uri_color, + N_("Use specified color for links"), N_("COLOR") }, + { NULL } }; static GOptionEntry filter_options[] = { - {"file-filter", 0, - 0, - G_OPTION_ARG_CALLBACK, - add_file_filter, - N_("Sets a filename filter"), - N_("NAME | PATTERN1 PATTERN2 ...")}, - {"mime-filter", 0, - 0, - G_OPTION_ARG_CALLBACK, - add_file_filter, - N_("Sets a mime-type filter"), - N_("NAME | MIME1 MIME2 ...")}, - {"image-filter", 0, - G_OPTION_FLAG_OPTIONAL_ARG, - G_OPTION_ARG_CALLBACK, - add_file_filter, - N_("Add filter for images"), - N_("NAME")}, - {"add-preview", 0, - G_OPTION_FLAG_NOALIAS, - G_OPTION_ARG_NONE, - &options.common_data.preview, - N_("Enable preview"), - NULL}, - {NULL} + { "file-filter", 0, 0, G_OPTION_ARG_CALLBACK, add_file_filter, + N_("Sets a filename filter"), N_("NAME | PATTERN1 PATTERN2 ...") }, + { "mime-filter", 0, 0, G_OPTION_ARG_CALLBACK, add_file_filter, + N_("Sets a mime-type filter"), N_("NAME | MIME1 MIME2 ...") }, + { "image-filter", 0, G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_CALLBACK, add_file_filter, + N_("Add filter for images"), N_("NAME") }, + { NULL } }; static GOptionEntry misc_options[] = { - {"about", 0, - 0, - G_OPTION_ARG_NONE, - &about_mode, - N_("Show about dialog"), - NULL}, - {"version", 0, - 0, - G_OPTION_ARG_NONE, - &version_mode, - N_("Print version"), - NULL}, - {"gtkrc", 0, - 0, - G_OPTION_ARG_FILENAME, - &options.gtkrc_file, - N_("Load additional GTK settings from file"), - N_("FILENAME")}, - {NULL} + { "about", 0, 0, G_OPTION_ARG_NONE, &about_mode, + N_("Show about dialog"), NULL }, + { "version", 0, 0, G_OPTION_ARG_NONE, &version_mode, + N_("Print version"), NULL }, + { "gtkrc", 0, 0, G_OPTION_ARG_FILENAME, &options.gtkrc_file, + N_("Load additional GTK settings from file"), N_("FILENAME") }, + { NULL } }; static GOptionEntry rest_options[] = { - {"rest", 0, - 0, - G_OPTION_ARG_FILENAME, - &options.rest_file, - N_("Load extra arguments from file"), - N_("FILENAME")}, - {G_OPTION_REMAINING, 0, - 0, - G_OPTION_ARG_STRING_ARRAY, - &options.extra_data, - NULL, NULL}, - {NULL} + { "rest", 0, 0, G_OPTION_ARG_FILENAME, &options.rest_file, + N_("Load extra arguments from file"), N_("FILENAME") }, + {G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_STRING_ARRAY, &options.extra_data, + NULL, NULL }, + { NULL } }; static gboolean @@ -1820,6 +1004,19 @@ } static gboolean +set_size (const gchar * option_name, const gchar * value, gpointer data, GError ** err) +{ + if (strcasecmp (value, "fit") == 0) + options.picture_data.size = YAD_PICTURE_FIT; + else if (strcasecmp (value, "orig") == 0) + options.picture_data.size = YAD_PICTURE_ORIG; + else + g_printerr (_("Unknown size type: %s\n"), value); + + return TRUE; +} + +static gboolean add_image_path (const gchar * option_name, const gchar * value, gpointer data, GError ** err) { if (value) @@ -1828,6 +1025,21 @@ return TRUE; } +static gboolean +set_complete_type (const gchar * option_name, const gchar * value, gpointer data, GError ** err) +{ + if (strcasecmp (value, "any") == 0) + options.common_data.complete = YAD_COMPLETE_ANY; + else if (strcasecmp (value, "all") == 0) + options.common_data.complete = YAD_COMPLETE_ALL; + else if (strcasecmp (value, "regex") == 0) + options.common_data.complete = YAD_COMPLETE_REGEX; + else + g_printerr (_("Unknown completion type: %s\n"), value); + + return TRUE; +} + #ifndef G_OS_WIN32 static gboolean parse_signal (const gchar * option_name, const gchar * value, gpointer data, GError ** err) @@ -1961,6 +1173,8 @@ options.mode = YAD_MODE_NOTIFICATION; else if (paned_mode) options.mode = YAD_MODE_PANED; + else if (picture_mode) + options.mode = YAD_MODE_PICTURE; else if (print_mode) options.mode = YAD_MODE_PRINT; else if (progress_mode) @@ -2026,6 +1240,8 @@ options.data.skip_taskbar = FALSE; options.data.maximized = FALSE; options.data.fullscreen = FALSE; + options.data.splash = FALSE; + options.data.focus = TRUE; /* Initialize common data */ options.common_data.uri = NULL; @@ -2036,13 +1252,16 @@ options.common_data.editable = FALSE; options.common_data.command = NULL; options.common_data.date_format = settings.date_format; + options.common_data.float_precision = 3; options.common_data.vertical = FALSE; options.common_data.align = 0.0; options.common_data.listen = FALSE; options.common_data.preview = FALSE; options.common_data.quoted_output = FALSE; + options.common_data.num_output = FALSE; options.common_data.filters = NULL; options.common_data.key = -1; + options.common_data.complete = YAD_COMPLETE_SIMPLE; /* Initialize calendar data */ options.calendar_data.day = -1; @@ -2091,6 +1310,8 @@ options.form_data.columns = 1; options.form_data.scroll = FALSE; options.form_data.output_by_row = FALSE; + options.form_data.focus_field = 1; + options.form_data.cycle_read = FALSE; #ifdef HAVE_HTML /* Initialize html data */ @@ -2148,6 +1369,10 @@ options.paned_data.orient = GTK_ORIENTATION_VERTICAL; options.paned_data.splitter = -1; + /* Initialize picture data */ + options.picture_data.size = YAD_PICTURE_ORIG; + options.picture_data.inc = 5; + /* Initialize print data */ options.print_data.type = YAD_PRINT_TEXT; options.print_data.headers = FALSE; @@ -2204,6 +1429,12 @@ g_option_group_set_translation_domain (a_group, GETTEXT_PACKAGE); g_option_context_add_group (tmp_ctx, a_group); + /* Adds common option entries */ + a_group = g_option_group_new ("common", _("Common options"), _("Show common options"), NULL, NULL); + g_option_group_add_entries (a_group, common_options); + g_option_group_set_translation_domain (a_group, GETTEXT_PACKAGE); + g_option_context_add_group (tmp_ctx, a_group); + /* Adds calendar option entries */ a_group = g_option_group_new ("calendar", _("Calendar options"), _("Show calendar options"), NULL, NULL); g_option_group_add_entries (a_group, calendar_options); @@ -2292,6 +1523,12 @@ g_option_group_set_translation_domain (a_group, GETTEXT_PACKAGE); g_option_context_add_group (tmp_ctx, a_group); + /* Adds picture option entries */ + a_group = g_option_group_new ("picture", _("Picture dialog options"), _("Show picture dialog options"), NULL, NULL); + g_option_group_add_entries (a_group, picture_options); + g_option_group_set_translation_domain (a_group, GETTEXT_PACKAGE); + g_option_context_add_group (tmp_ctx, a_group); + /* Adds print option entries */ a_group = g_option_group_new ("print", _("Print dialog options"), _("Show print dialog options"), NULL, NULL); g_option_group_add_entries (a_group, print_options); diff -Nru yad-0.31.0/src/paned.c yad-0.33.1/src/paned.c --- yad-0.31.0/src/paned.c 2015-09-08 08:31:21.000000000 +0000 +++ yad-0.33.1/src/paned.c 2015-12-28 08:59:50.000000000 +0000 @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -97,8 +98,6 @@ struct shmid_ds buf; gboolean is_running = TRUE; - gtk_widget_destroy (paned); - if (tabs[1].pid != -1) kill (tabs[1].pid, SIGUSR2); if (tabs[2].pid != -1) @@ -116,7 +115,7 @@ break; } } - gtk_main_iteration (); + usleep (1000); } /* cleanup shared memory */ diff -Nru yad-0.31.0/src/picture.c yad-0.33.1/src/picture.c --- yad-0.31.0/src/picture.c 1970-01-01 00:00:00.000000000 +0000 +++ yad-0.33.1/src/picture.c 2015-12-07 16:53:18.000000000 +0000 @@ -0,0 +1,287 @@ +/* + * This file is part of YAD. + * + * YAD is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * YAD is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with YAD. If not, see . + * + * Copyright (C) 2008-2015, Victor Ananjevsky + */ + +#include "yad.h" + +static GtkWidget *picture; +static GtkWidget *viewport; +static GtkWidget *popup_menu; + +static GdkPixbufAnimation *anim_pb; +static GdkPixbuf *orig_pb; + +static gboolean loaded = FALSE; +static gboolean animated = FALSE; + +enum { + SIZE_FIT, + SIZE_ORIG, + SIZE_INC, + SIZE_DEC +}; + +enum { + ROTATE_LEFT, + ROTATE_RIGHT, + ROTATE_FLIP_VERT, + ROTATE_FLIP_HOR +}; + +static void +load_picture (gchar *filename) +{ + anim_pb = gdk_pixbuf_animation_new_from_file (filename, NULL); + orig_pb = gdk_pixbuf_animation_get_static_image (anim_pb); + + if (orig_pb) + { + if (gdk_pixbuf_animation_is_static_image (anim_pb)) + gtk_image_set_from_pixbuf (GTK_IMAGE (picture), orig_pb); + else + { + gtk_image_set_from_animation (GTK_IMAGE (picture), anim_pb); + animated = TRUE; + } + loaded = TRUE; + } + else + gtk_image_set_from_stock (GTK_IMAGE (picture), "gtk-missing-image", GTK_ICON_SIZE_DIALOG); +} + +void +picture_fit_to_window () +{ + gdouble width, height, ww, wh; + gdouble factor; + + if (animated) + return; + + width = gdk_pixbuf_get_width (orig_pb); + height = gdk_pixbuf_get_height (orig_pb); + + ww = gdk_window_get_width (gtk_viewport_get_view_window (GTK_VIEWPORT (viewport))); + wh = gdk_window_get_height (gtk_viewport_get_view_window (GTK_VIEWPORT (viewport))); + + factor = MIN (ww / width, wh / height); + if (factor < 1.0) + { + GdkPixbuf *pb = gdk_pixbuf_scale_simple (g_object_ref (orig_pb), width * factor, height * factor, GDK_INTERP_HYPER); + if (pb) + gtk_image_set_from_pixbuf (GTK_IMAGE (picture), pb); + } +} + +static void +change_size_cb (GtkWidget *w, gint type) +{ + gdouble width, height; + GdkPixbuf *new_pb, *pb = gtk_image_get_pixbuf (GTK_IMAGE (picture)); + + if (!pb) + { + g_printerr ("picture: can't get pixbuf\n"); + return; + } + + width = gdk_pixbuf_get_width (pb); + height = gdk_pixbuf_get_height (pb); + + switch (type) + { + case SIZE_FIT: + picture_fit_to_window (); + break; + case SIZE_ORIG: + gtk_image_set_from_pixbuf (GTK_IMAGE (picture), orig_pb); + break; + case SIZE_INC: + new_pb = gdk_pixbuf_scale_simple (pb, width + options.picture_data.inc, + height + options.picture_data.inc, GDK_INTERP_HYPER); + if (new_pb) + { + gtk_image_set_from_pixbuf (GTK_IMAGE (picture), new_pb); + g_object_unref (pb); + } + break; + case SIZE_DEC: + new_pb = gdk_pixbuf_scale_simple (pb, width - options.picture_data.inc, + height - options.picture_data.inc, GDK_INTERP_HYPER); + if (new_pb) + { + gtk_image_set_from_pixbuf (GTK_IMAGE (picture), new_pb); + g_object_unref (pb); + } + break; + } +} + +static void +rotate_cb (GtkWidget *w, gint type) +{ + GdkPixbuf *new_pb = NULL; + GdkPixbuf *pb = gtk_image_get_pixbuf (GTK_IMAGE (picture)); + + if (!pb) + { + g_printerr ("picture: can't get pixbuf\n"); + return; + } + + switch (type) + { + case ROTATE_LEFT: + new_pb = gdk_pixbuf_rotate_simple (pb, GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE); + break; + case ROTATE_RIGHT: + new_pb = gdk_pixbuf_rotate_simple (pb, GDK_PIXBUF_ROTATE_CLOCKWISE); + break; + case ROTATE_FLIP_VERT: + new_pb = gdk_pixbuf_flip (pb, FALSE); + break; + case ROTATE_FLIP_HOR: + new_pb = gdk_pixbuf_flip (pb, TRUE); + break; + } + + if (new_pb) + { + gtk_image_set_from_pixbuf (GTK_IMAGE (picture), new_pb); + g_object_unref (pb); + } +} + +static void +create_popup_menu () +{ + GtkWidget *mi; + + popup_menu = gtk_menu_new (); + + mi = gtk_image_menu_item_new_with_label (_("Fit to window")); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (mi), + gtk_image_new_from_icon_name ("gtk-zoom-fit", GTK_ICON_SIZE_MENU)); + gtk_widget_show (mi); + gtk_menu_shell_append (GTK_MENU_SHELL (popup_menu), mi); + g_signal_connect (G_OBJECT (mi), "activate", G_CALLBACK (change_size_cb), GINT_TO_POINTER (SIZE_FIT)); + + mi = gtk_image_menu_item_new_with_label (_("Original size")); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (mi), + gtk_image_new_from_icon_name ("gtk-zoom-100", GTK_ICON_SIZE_MENU)); + gtk_widget_show (mi); + gtk_menu_shell_append (GTK_MENU_SHELL (popup_menu), mi); + g_signal_connect (G_OBJECT (mi), "activate", G_CALLBACK (change_size_cb), GINT_TO_POINTER (SIZE_ORIG)); + + mi = gtk_image_menu_item_new_with_label (_("Increase size")); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (mi), + gtk_image_new_from_icon_name ("gtk-zoom-in", GTK_ICON_SIZE_MENU)); + gtk_widget_show (mi); + gtk_menu_shell_append (GTK_MENU_SHELL (popup_menu), mi); + g_signal_connect (G_OBJECT (mi), "activate", G_CALLBACK (change_size_cb), GINT_TO_POINTER (SIZE_INC)); + + mi = gtk_image_menu_item_new_with_label (_("Decrease size")); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (mi), + gtk_image_new_from_icon_name ("gtk-zoom-out", GTK_ICON_SIZE_MENU)); + gtk_widget_show (mi); + gtk_menu_shell_append (GTK_MENU_SHELL (popup_menu), mi); + g_signal_connect (G_OBJECT (mi), "activate", G_CALLBACK (change_size_cb), GINT_TO_POINTER (SIZE_DEC)); + + mi = gtk_separator_menu_item_new (); + gtk_widget_show (mi); + gtk_menu_shell_append (GTK_MENU_SHELL (popup_menu), mi); + + mi = gtk_image_menu_item_new_with_label (_("Rotate left")); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (mi), + gtk_image_new_from_icon_name ("object-rotate-left", GTK_ICON_SIZE_MENU)); + gtk_widget_show (mi); + gtk_menu_shell_append (GTK_MENU_SHELL (popup_menu), mi); + g_signal_connect (G_OBJECT (mi), "activate", G_CALLBACK (rotate_cb), GINT_TO_POINTER (ROTATE_LEFT)); + + mi = gtk_image_menu_item_new_with_label (_("Rotate right")); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (mi), + gtk_image_new_from_icon_name ("object-rotate-right", GTK_ICON_SIZE_MENU)); + gtk_widget_show (mi); + gtk_menu_shell_append (GTK_MENU_SHELL (popup_menu), mi); + g_signal_connect (G_OBJECT (mi), "activate", G_CALLBACK (rotate_cb), GINT_TO_POINTER (ROTATE_RIGHT)); + + mi = gtk_image_menu_item_new_with_label (_("Flip vertical")); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (mi), + gtk_image_new_from_icon_name ("object-flip-vertical", GTK_ICON_SIZE_MENU)); + gtk_widget_show (mi); + gtk_menu_shell_append (GTK_MENU_SHELL (popup_menu), mi); + g_signal_connect (G_OBJECT (mi), "activate", G_CALLBACK (rotate_cb), GINT_TO_POINTER (ROTATE_FLIP_VERT)); + + mi = gtk_image_menu_item_new_with_label (_("Flip horizontal")); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (mi), + gtk_image_new_from_icon_name ("object-flip-horizontal", GTK_ICON_SIZE_MENU)); + gtk_widget_show (mi); + gtk_menu_shell_append (GTK_MENU_SHELL (popup_menu), mi); + g_signal_connect (G_OBJECT (mi), "activate", G_CALLBACK (rotate_cb), GINT_TO_POINTER (ROTATE_FLIP_HOR)); +} + +static gboolean +button_handler (GtkWidget *w, GdkEventButton *ev, gpointer data) +{ + if (ev->button == 3) + { + gtk_menu_popup (GTK_MENU (popup_menu), NULL, NULL, NULL, NULL, ev->button, ev->time); + return TRUE; + } + + return FALSE; +} + +static gboolean +key_handler (GtkWidget *w, GdkEventKey *ev, gpointer data) +{ + return FALSE; +} + +GtkWidget * +picture_create_widget (GtkWidget * dlg) +{ + GtkWidget *sw; + + sw = gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_NONE); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + + viewport = gtk_viewport_new (gtk_scrolled_window_get_hadjustment (GTK_SCROLLED_WINDOW (sw)), + gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (sw))); + gtk_container_add (GTK_CONTAINER (sw), viewport); + + picture = gtk_image_new (); + gtk_container_add (GTK_CONTAINER (viewport), picture); + + /* load picture */ + if (options.common_data.uri && + g_file_test (options.common_data.uri, G_FILE_TEST_EXISTS)) + load_picture (options.common_data.uri); + else + gtk_image_set_from_stock (GTK_IMAGE (picture), "gtk-missing-image", GTK_ICON_SIZE_DIALOG); + + if (loaded && !animated) + { + create_popup_menu (); + g_signal_connect (G_OBJECT (viewport), "button-press-event", G_CALLBACK (button_handler), NULL); + g_signal_connect (G_OBJECT (viewport), "key-press-event", G_CALLBACK (key_handler), NULL); + } + + return sw; +} diff -Nru yad-0.31.0/src/util.c yad-0.33.1/src/util.c --- yad-0.31.0/src/util.c 2015-09-10 07:47:06.000000000 +0000 +++ yad-0.33.1/src/util.c 2015-12-25 09:38:14.000000000 +0000 @@ -17,6 +17,10 @@ * Copyright (C) 2008-2015, Victor Ananjevsky */ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE 1 +#endif + #include #include #include @@ -125,7 +129,7 @@ g_key_file_set_string (kf, "General", "date_format", settings.date_format); g_key_file_set_comment (kf, "General", "date_format", " Default date format (sett msgfmt(3) for details)", NULL); g_key_file_set_boolean (kf, "General", "ignore_unknown_options", settings.ignore_unknown); - g_key_file_set_comment (kf, "General", "ignore_unknown_options", " Ingnore unknown command-line options", NULL); + g_key_file_set_comment (kf, "General", "ignore_unknown_options", " Ignore unknown command-line options", NULL); g_key_file_set_integer (kf, "General", "max_tab", settings.max_tab); g_key_file_set_comment (kf, "General", "max_tab", " Maximum number of tabs in notebook", NULL); @@ -209,7 +213,7 @@ GdkPixbuf *pb; chs = g_checksum_new (G_CHECKSUM_MD5); - g_checksum_update (chs, uri, -1); + g_checksum_update (chs, (const guchar *) uri, -1); /* first try to get preview from large thumbnail */ file = g_strdup_printf ("%s/%s.png", large_path, g_checksum_get_string (chs)); if (g_file_test (file, G_FILE_TEST_EXISTS)) @@ -285,7 +289,7 @@ { if ((shmid = shmget (key, (settings.max_tab + 1) * sizeof (YadNTabs), IPC_CREAT | IPC_EXCL | 0644)) == -1) { - g_printerr ("yad: cannot create shared memory for key %ld: %s\n", key, strerror (errno)); + g_printerr ("yad: cannot create shared memory for key %d: %s\n", key, strerror (errno)); return NULL; } } @@ -294,7 +298,7 @@ if ((shmid = shmget (key, (settings.max_tab + 1) * sizeof (YadNTabs), 0)) == -1) { if (errno != ENOENT) - g_printerr ("yad: cannot get shared memory for key %ld: %s\n", key, strerror (errno)); + g_printerr ("yad: cannot get shared memory for key %d: %s\n", key, strerror (errno)); return NULL; } } @@ -302,7 +306,7 @@ /* attach shared memory */ if ((t = shmat (shmid, NULL, 0)) == (YadNTabs *) - 1) { - g_printerr ("yad: cannot attach shared memory for key %ld: %s\n", key, strerror (errno)); + g_printerr ("yad: cannot attach shared memory for key %d: %s\n", key, strerror (errno)); return NULL; } @@ -327,7 +331,7 @@ GtkStockItem it; gchar **vals; - if (!str) + if (!str || !*str) return gtk_label_new (NULL); l = i = NULL; @@ -426,3 +430,62 @@ return res; } + +gboolean +check_complete (GtkEntryCompletion *c, const gchar *key, GtkTreeIter *iter, gpointer data) +{ + gchar *value = NULL; + GtkTreeModel *model = gtk_entry_completion_get_model (c); + gboolean found = FALSE; + + if (!model || !key || !key[0]) + return FALSE; + + gtk_tree_model_get (model, iter, 0, &value, -1); + + if (value) + { + gchar **words = NULL; + guint i = 0; + + switch (options.common_data.complete) + { + case YAD_COMPLETE_ANY: + words = g_strsplit_set (key, " \t", -1); + while (words[i]) + { + if (strcasestr (value, words[i]) != NULL) + { + /* found one of the words */ + found = TRUE; + break; + } + i++; + } + break; + case YAD_COMPLETE_ALL: + words = g_strsplit_set (key, " \t", -1); + found = TRUE; + while (words[i]) + { + if (strcasestr (value, words[i]) == NULL) + { + /* not found one of the words */ + found = FALSE; + break; + } + i++; + } + break; + case YAD_COMPLETE_REGEX: + found = g_regex_match_simple (key, value, G_REGEX_CASELESS | G_REGEX_OPTIMIZE, G_REGEX_MATCH_NOTEMPTY); + break; + default: ; + } + + if (words) + g_strfreev (words); + } + + return found; +} diff -Nru yad-0.31.0/src/yad.h yad-0.33.1/src/yad.h --- yad-0.31.0/src/yad.h 2015-09-10 07:47:06.000000000 +0000 +++ yad-0.33.1/src/yad.h 2015-12-29 14:40:18.000000000 +0000 @@ -63,6 +63,7 @@ YAD_MODE_NOTEBOOK, YAD_MODE_NOTIFICATION, YAD_MODE_PANED, + YAD_MODE_PICTURE, YAD_MODE_PRINT, YAD_MODE_PROGRESS, YAD_MODE_SCALE, @@ -115,6 +116,11 @@ } YadColumnType; typedef enum { + YAD_PICTURE_FIT, + YAD_PICTURE_ORIG +} YadPictureType; + +typedef enum { YAD_PRINT_TEXT = 0, YAD_PRINT_IMAGE, YAD_PRINT_RAW @@ -131,6 +137,13 @@ YAD_SMALL_ICON } YadIconSize; +typedef enum { + YAD_COMPLETE_SIMPLE = 0, + YAD_COMPLETE_ANY, + YAD_COMPLETE_ALL, + YAD_COMPLETE_REGEX +} YadCompletionType; + typedef struct { gchar *name; gchar *cmd; @@ -189,6 +202,8 @@ gboolean skip_taskbar; gboolean maximized; gboolean fullscreen; + gboolean splash; + gboolean focus; } YadData; typedef struct { @@ -244,6 +259,8 @@ guint columns; gboolean scroll; gboolean output_by_row; + guint focus_field; + gboolean cycle_read; } YadFormData; #ifdef HAVE_HTML @@ -310,6 +327,11 @@ } YadPanedData; typedef struct { + YadPictureType size; + gint inc; +} YadPictureData; + +typedef struct { YadPrintType type; gboolean headers; } YadPrintData; @@ -363,10 +385,13 @@ gboolean vertical; gchar *command; gchar *date_format; + guint float_precision; gdouble align; gboolean listen; gboolean preview; gboolean quoted_output; + gboolean num_output; + YadCompletionType complete; GList *filters; key_t key; } YadCommonData; @@ -393,6 +418,7 @@ YadNotebookData notebook_data; YadNotificationData notification_data; YadPanedData paned_data; + YadPictureData picture_data; YadPrintData print_data; YadProgressData progress_data; YadScaleData scale_data; @@ -468,13 +494,15 @@ GtkWidget *multi_progress_create_widget (GtkWidget * dlg); GtkWidget *notebook_create_widget (GtkWidget * dlg); GtkWidget *paned_create_widget (GtkWidget * dlg); +GtkWidget *picture_create_widget (GtkWidget * dlg); GtkWidget *progress_create_widget (GtkWidget * dlg); GtkWidget *scale_create_widget (GtkWidget * dlg); GtkWidget *text_create_widget (GtkWidget * dlg); -void confirm_overwrite_cb (GtkDialog * dlg, gint id, gpointer data); +gboolean file_confirm_overwrite (GtkDialog * dlg); void notebook_swallow_childs (void); void paned_swallow_childs (void); +void picture_fit_to_window (void); void calendar_print_result (void); void color_print_result (void); @@ -494,6 +522,8 @@ gint yad_print_run (void); gint yad_about (void); +gboolean yad_send_notify (gboolean); + void notebook_close_childs (void); void paned_close_childs (void); @@ -512,6 +542,8 @@ gchar *escape_str (gchar *str); +gboolean check_complete (GtkEntryCompletion *c, const gchar *key, GtkTreeIter *iter, gpointer data); + static inline void strip_new_line (gchar * str) {