Projects
Extra
yad
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 9
View file
yad.changes
Changed
@@ -1,4 +1,18 @@ ------------------------------------------------------------------- +Fri Apr 01 00:00:00 UTC 2011 - detlef@links2linux.de + +- new upstream version <0.10.0> + * fix in markup tooltips in list and icons dialogs + * limits for number of rows in lists + * support for settings row attributes in lists + * vertical and invert scale dialog + * numeric entry + * new font selection dialog + * tagging URIs in text dialog. + * new option --kill-parent for send SIGTERM to parent process + * fix URI handling in dnd dialog + +------------------------------------------------------------------- Sun Mar 13 00:00:00 UTC 2011 - detlef@links2linux.de - new upstream version <0.9.1>
View file
yad.spec
Changed
@@ -1,7 +1,7 @@ # norootforbuild Name: yad -Version: 0.9.1 +Version: 0.10.0 Release: 1 Summary: A fork of Zenity with many improvements
View file
yad-0.9.1.tar.bz2/ChangeLog -> yad-0.10.0.tar.bz2/ChangeLog
Changed
@@ -1,3 +1,158 @@ +2011-03-28 10:34 ananasik + + * src/dnd.c: fix dnd behavior + +2011-03-27 20:13 ananasik + + * configure.ac, src/main.c, src/notification.c: now minimum gtk+ + version is 2.16.0 + +2011-03-27 20:09 ananasik + + * src/dnd.c: dnd broken + +2011-03-27 17:58 ananasik + + * src/dnd.c: some changes in dnd + +2011-03-27 17:19 ananasik + + * po/de.po, po/ru.po, po/sk.po, po/uk.po, src/icons.c, src/list.c, + src/notification.c, src/text.c, src/util.c: add newline char in + error messages + +2011-03-27 17:08 ananasik + + * src/util.c: check for an empty args in (un)escape_markup + +2011-03-27 16:36 ananasik + + * po/sk.po: update slovak translation + +2011-03-27 15:48 ananasik + + * src/dnd.c: + +2011-03-27 15:40 ananasik + + * src/dnd.c: add text/uri-list to dnd targets + +2011-03-27 12:15 ananasik + + * ChangeLog, NEWS: + +2011-03-27 12:12 ananasik + + * ChangeLog, NEWS, src/dnd.c: unescape text in dnd + +2011-03-27 05:34 ananasik + + * data/yad.1, po/de.po, po/ru.po, po/sk.po, po/uk.po, src/main.c, + src/option.c, src/yad.h: add --kil-parent option + +2011-03-24 09:50 ananasik + + * configure.ac, data/yad.1, po/de.po, po/ru.po, po/sk.po, po/uk.po: + update man and translation. prepare to release + +2011-03-24 09:37 ananasik + + * src/text.c: fix handling cursor in text dialog + +2011-03-24 09:06 ananasik + + * src/text.c: + +2011-03-24 08:58 ananasik + + * src/text.c: fix handling utf-8 when linkifying text in text + dialog + +2011-03-24 06:12 ananasik + + * src/text.c: fixes in uri linkifying. wrong work with non-ascii + characters + +2011-03-24 06:03 ananasik + + * src/icons.c, src/list.c, src/text.c, src/yad.h: + +2011-03-23 11:41 ananasik + + * src/text.c: some updates to uri linkify + +2011-03-22 18:49 ananasik + + * src/text.c: + +2011-03-22 18:41 ananasik + + * data/yad.1, data/yad.m4.in, po/uk.po, src/about.c, src/browser.c, + src/calendar.c, src/color.c, src/dnd.c, src/entry.c, src/file.c, + src/font.c, src/icons.c, src/list.c, src/main.c, + src/notification.c, src/option.c, src/progress.c, src/scale.c, + src/text.c, src/util.c, src/yad.h: add --show-uri option to text + dialog (still little broken), update copyright info in sources + +2011-03-22 15:30 ananasik + + * data/yad.1, po/de.po, po/ru.po, po/sk.po, po/uk.po, src/entry.c, + src/list.c, src/option.c, src/yad.h: add FLT type for columns in + list dialog + +2011-03-22 15:17 ananasik + + * data/yad.1, po/de.po, po/ru.po, po/sk.po, po/uk.po, src/list.c, + src/option.c, src/yad.h: add special columns to list dialog + +2011-03-22 12:59 ananasik + + * data/yad.1, po/POTFILES.in, po/de.po, po/ru.po, po/sk.po, + po/uk.po, src/option.c: some updates to previous commit + +2011-03-22 12:49 ananasik + + * configure.ac, src/Makefile.am, src/file.c, src/fileselection.c, + src/font.c, src/main.c, src/option.c, src/text.c, src/yad.h: add + font dialog. --font option in text dialog changed to fontname + +2011-03-22 11:57 ananasik + + * src/option.c: add short option --file for file selection dialog + +2011-03-22 11:50 ananasik + + * data/yad.1, po/de.po, po/ru.po, po/sk.po, po/uk.po, src/option.c, + src/scale.c, src/yad.h: add --vertical and --invert options to + scale dialog + +2011-03-22 11:06 ananasik + + * src/entry.c: add additional check for range values in numeric + entry dialog + +2011-03-22 10:44 ananasik + + * data/yad.1, po/de.po, po/ru.po, po/sk.po, po/uk.po, src/entry.c, + src/option.c, src/yad.h: add --numeric option for entry dialog + +2011-03-22 08:39 ananasik + + * data/yad.1, po/de.po, po/ru.po, po/sk.po, po/uk.po, src/list.c, + src/option.c, src/yad.h: add --limit option to list dialog + +2011-03-17 16:02 ananasik + + * src/util.c: + +2011-03-17 15:49 ananasik + + * src/util.c: + +2011-03-13 07:39 ananasik + + * ChangeLog, NEWS: release 0.9.1 + 2011-03-13 07:33 ananasik * src/icons.c, src/list.c, src/util.c, src/yad.h: fix markup
View file
yad-0.9.1.tar.bz2/NEWS -> yad-0.10.0.tar.bz2/NEWS
Changed
@@ -1,3 +1,14 @@ +Version 0.10.0 + - fix in markup tooltips in list and icons dialogs + - limits for number of rows in lists + - support for settings row attributes in lists + - vertical and invert scale dialog + - numeric entry + - new font selection dialog + - tagging URIs in text dialog + - new option --kill-parent for send SIGTERM to parent process + - fix URI handling in dnd dialog + Version 0.9.1 - fix handle markup for tooltips in list and icons dialogs - add ukrainian and update slovak translations
View file
yad-0.9.1.tar.bz2/aclocal.m4 -> yad-0.10.0.tar.bz2/aclocal.m4
Changed
@@ -1003,8 +1003,8 @@ dnl IT_PROG_INTLTOOL(MINIMUM-VERSION, no-xml) # serial 40 IT_PROG_INTLTOOL AC_DEFUN(IT_PROG_INTLTOOL, -AC_PREREQ(2.50) -AC_REQUIRE(AM_NLS) +AC_PREREQ(2.50)dnl +AC_REQUIRE(AM_NLS)dnl case "$am__api_version" in 1.01234) @@ -1149,7 +1149,7 @@ # AC_DEFUN(IT_PO_SUBDIR, AC_PREREQ(2.53)dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS. - +dnl dnl The following CONFIG_COMMANDS should be exetuted at the very end dnl of config.status. AC_CONFIG_COMMANDS_PRE( @@ -1173,7 +1173,7 @@ rm -f "$1/Makefile.tmp" mv "$1/stamp-it.tmp" "$1/stamp-it" ) -) +)dnl ) # _IT_SUBST(VARIABLE)
View file
yad-0.9.1.tar.bz2/configure -> yad-0.10.0.tar.bz2/configure
Changed
@@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for YAD 0.9.1. +# Generated by GNU Autoconf 2.68 for YAD 0.10.0. # # Report bugs to <http://code.google.com/p/yad/issues/entry>. # @@ -560,8 +560,8 @@ # Identity of this package. PACKAGE_NAME='YAD' PACKAGE_TARNAME='yad' -PACKAGE_VERSION='0.9.1' -PACKAGE_STRING='YAD 0.9.1' +PACKAGE_VERSION='0.10.0' +PACKAGE_STRING='YAD 0.10.0' PACKAGE_BUGREPORT='http://code.google.com/p/yad/issues/entry' PACKAGE_URL='http://code.google.com/p/yad' @@ -1311,7 +1311,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.9.1 to adapt to many kinds of systems. +\`configure' configures YAD 0.10.0 to adapt to many kinds of systems. Usage: $0 OPTION... VAR=VALUE... @@ -1377,7 +1377,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of YAD 0.9.1:";; + short | recursive ) echo "Configuration of YAD 0.10.0:";; esac cat <<\_ACEOF @@ -1485,7 +1485,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -YAD configure 0.9.1 +YAD configure 0.10.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1854,7 +1854,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.9.1, which was +It was created by YAD $as_me 0.10.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2669,7 +2669,7 @@ # Define the identity of the package. PACKAGE='yad' - VERSION='0.9.1' + VERSION='0.10.0' cat >>confdefs.h <<_ACEOF @@ -3748,8 +3748,6 @@ - - case "$am__api_version" in 1.01234) as_fn_error $? "Automake 1.5 or newer is required to use intltool" "$LINENO" 5 @@ -4293,8 +4291,6 @@ - - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -4963,7 +4959,7 @@ -GTK2_REQUIRED=2.12.0 +GTK2_REQUIRED=2.16.0 GTK3_REQUIRED=2.91.0 @@ -6975,7 +6971,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.9.1, which was +This file was extended by YAD $as_me 0.10.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -7042,7 +7038,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.9.1 +YAD config.status 0.10.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\"
View file
yad-0.9.1.tar.bz2/configure.ac -> yad-0.10.0.tar.bz2/configure.ac
Changed
@@ -1,4 +1,4 @@ -AC_INIT(YAD, 0.9.1, http://code.google.com/p/yad/issues/entry, yad, http://code.google.com/p/yad) +AC_INIT(YAD, 0.10.0, http://code.google.com/p/yad/issues/entry, yad, http://code.google.com/p/yad) AM_INIT_AUTOMAKE(1.11 foreign dist-xz no-dist-gzip) AM_SILENT_RULES(yes) @@ -13,7 +13,7 @@ AC_PROG_CC -GTK2_REQUIRED=2.12.0 +GTK2_REQUIRED=2.16.0 GTK3_REQUIRED=2.91.0 PKG_CHECK_MODULES(YAD, gtk+-3.0 >= $GTK3_REQUIRED, gtk3=yes, gtk3=no)
View file
yad-0.9.1.tar.bz2/data/yad.1 -> yad-0.10.0.tar.bz2/data/yad.1
Changed
@@ -1,9 +1,11 @@ -.TH YAD 1 "December 25, 2010" +.TH YAD 1 "Marth 24, 2011" .SH NAME yad \- display GTK+ dialogs + .SH SYNOPSIS .B yad .RI options + .SH DESCRIPTION \fBYAD\fP is a program that will display GTK+ dialogs, and return (either in the return code, or on standard output) the users @@ -11,6 +13,7 @@ from the user, from all manner of shell scripts. .PP \fBYAD\fP is the fork of \fBZenity\fP program. + .SH OPTIONS This program follows the usual GNU command line syntax, with long options starting with two dashes (`-'). @@ -33,9 +36,12 @@ .B \-\-icons Display box with shortcut icons. .TP -.B \-\-file\-selection +.B \-\-file Display file selection dialog. .TP +.B \-\-font +Display font selection dialog. +.TP .B \-\-form Display form dialog .TP @@ -77,6 +83,9 @@ Style of indicator may be set through the gtkrc file. See \fIhttp://code.google.com/p/yad/wiki/TimeoutIndicator\fP for details. .TP +.B \-\-kill-parent +Send SIGTERM to parent process. +.TP .B \-\-text=STRING Set the dialog text. .TP @@ -147,7 +156,7 @@ Set the format for the returned date. .PP -Color options +Color selection options .TP .B \-\-init\-color=COLOR Set initial color value. @@ -183,8 +192,11 @@ .TP .B \-\-editable Allow changes to text in combo-box. +.TP +.B \-\-numeric +Use spin button instead of text entry. Additional parameters in command line treats as minimum and maximum values and step value (in that order). All this values are optional. Default range is from 0 to 65535 with step 1. -Any extra data specified in commndline adds as an items of combo-box entry +Any extra data specified in command line adds as an items of combo-box entry, except of numeric mode. .PP Iconbox options @@ -236,6 +248,15 @@ Optional argument is a text for confirmation dialog. .PP +Font selection options +.TP +.B \-\-fontname=FILENAME +Set the initial font. +.TP +.B \-\-preview +Set the preview text. + +.PP Form options .TP .B \-\-field=LABEL:TYPE @@ -266,10 +287,13 @@ List options .TP .B \-\-column=STRING:TYPE -Set the column header. Types are \fITEXT\fP, \fINUM\fP, \fICHK\fP, \fIIMG\fP or \fITIP\fP. -\fITEXT\fP type is default. \fITIP\fP used for define tooltip column. -Images may be path to image or icon name from currnet GTK+ icon theme. +Set the column header. Types are \fITEXT\fP, \fINUM\fP, \fIFLT\fP, \fICHK\fP, \fIIMG\fP or \fITIP\fP. +\fITEXT\fP type is default. Use \fINUM\fP for integers and \fIFTL\fP for double values. \fITIP\fP is used for define tooltip column. +\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. + +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. .TP .B \-\-checklist Use check boxes for first column. @@ -297,6 +321,9 @@ .TP .B \-\-expand\-column=NUMBER Set the column expandable by default. \fI0\fP sets all columns expandable. +.TP +.B \-\-limit=NUMBER +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. .PP Notification options @@ -355,7 +382,7 @@ .B \-\-back=COLOR Set background color of text .TP -.B \-\-font=FONT +.B \-\-fontname=FONT Set text font. \fIFONT\fP must be in a Pango font description format. .TP .B \-\-wrap @@ -370,6 +397,9 @@ .TP .B \-\-tail Autoscroll to end when new text appears. Works only when text is read from stdin. +.TP +.B \-\-show-uri +Make URI in text clickable. Links opens with \fIxdg-open\fP command. .PP Scale options @@ -391,6 +421,12 @@ .TP .B \-\-hide\-value Hide value. +.TP +.B \-\-vertical +Show vertical scale. +.TP +.B \-\-invert +Invert scale direction. .PP Miscellaneous options
View file
yad-0.9.1.tar.bz2/data/yad.m4.in -> yad-0.10.0.tar.bz2/data/yad.m4.in
Changed
@@ -1,6 +1,6 @@ ## -*- Autoconf -*- # -# Copyright (c) 2010, Vitor Ananjevsky <ananasik@gmail.com> +# Copyright (c) 2008-2011, Vitor Ananjevsky <ananasik@gmail.com> # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it,
View file
yad-0.9.1.tar.bz2/po/POTFILES.in -> yad-0.10.0.tar.bz2/po/POTFILES.in
Changed
@@ -1,7 +1,9 @@ src/about.c src/calendar.c src/entry.c -src/fileselection.c +src/file.c +src/font.c +src/form.c src/icons.c src/main.c src/notification.c @@ -11,6 +13,5 @@ src/progress.c src/color.c src/text.c -src/form.c src/browser.c data/yad-icon-browser.desktop.in
View file
yad-0.9.1.tar.bz2/po/de.po -> yad-0.10.0.tar.bz2/po/de.po
Changed
@@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: yad\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-02-28 12:49+0200\n" +"POT-Creation-Date: 2011-03-28 13:36+0300\n" "PO-Revision-Date: 2009-11-30 16:53+0100\n" "Last-Translator: Manfred Mueller aka Quax<mmueller@live-modules.org>\n" "Language-Team: German translations at Lin2Go <mmueller@live-modules.org>\n" @@ -64,17 +64,41 @@ "\n" "Basiert auf Zenity-Code\n" -#: ../src/icons.c:238 -#, fuzzy, c-format -msgid "Unable to parse file %s: %s" -msgstr "Kann Befehlszeile nicht einlesen: %s\n" +#: ../src/entry.c:93 ../src/scale.c:39 +#, c-format +msgid "Maximum value must be greater than minimum value.\n" +msgstr "Der Maximalwert muß kleiner als der Minimalwert sein.\n" -#: ../src/icons.c:255 +#: ../src/entry.c:99 ../src/scale.c:48 #, c-format -msgid "Unable to open directory %s: %s" +msgid "Initial value less than minimal.\n" msgstr "" -#: ../src/main.c:69 ../src/main.c:167 +#: ../src/entry.c:104 ../src/scale.c:53 +#, fuzzy, c-format +msgid "Initial value greater than maximum.\n" +msgstr "Der Maximalwert muß kleiner als der Minimalwert sein.\n" + +#: ../src/form.c:103 +#, fuzzy +msgid "Select file" +msgstr "Datei öffnen" + +#: ../src/form.c:113 +msgid "Select folder" +msgstr "" + +#: ../src/icons.c:249 +#, fuzzy, c-format +msgid "Unable to parse file %s: %s\n" +msgstr "Kann Befehlszeile nicht einlesen: %s\n" + +#: ../src/icons.c:266 +#, fuzzy, c-format +msgid "Unable to open directory %s: %s\n" +msgstr "Kann Befehlszeile nicht einlesen: %s\n" + +#: ../src/main.c:69 ../src/main.c:163 #, c-format msgid "%d sec" msgstr "" @@ -90,750 +114,798 @@ msgstr "Kann Befehlszeile nicht einlesen: %s\n" #: ../src/notification.c:72 -#, c-format -msgid "Could not load notification icon '%s': %s" +#, fuzzy, c-format +msgid "Could not load notification icon '%s': %s\n" msgstr "Kann Benachrichtigungs-Symbol '%s' nicht laden: %s" -#: ../src/notification.c:244 +#: ../src/notification.c:239 #, c-format msgid "Invalid UTF-8 in tooltip!\n" msgstr "Ungültiger UTF-8 Eintrag im Tool-Tip!\n" -#: ../src/notification.c:297 +#: ../src/notification.c:292 #, c-format msgid "Unknown command '%s'\n" msgstr "Befehl '%s' unbekannt\n" -#: ../src/notification.c:338 ../src/notification.c:340 +#: ../src/notification.c:328 msgid "Yad notification" msgstr "Yad Benachrichtigung" -#: ../src/scale.c:39 -#, c-format -msgid "Maximum value must be greater than minimum value.\n" -msgstr "Der Maximalwert muß kleiner als der Minimalwert sein.\n" - -#: ../src/scale.c:48 -#, c-format -msgid "Initial value less than minimal.\n" -msgstr "" - -#: ../src/scale.c:53 -#, fuzzy, c-format -msgid "Initial value greater than maximum.\n" -msgstr "Der Maximalwert muß kleiner als der Minimalwert sein.\n" - -#: ../src/list.c:406 +#: ../src/list.c:483 msgid "Add row" msgstr "Reihe hinzufügen" -#: ../src/list.c:415 +#: ../src/list.c:492 msgid "Delete row" msgstr "Reihe löschen" -#: ../src/list.c:442 +#: ../src/list.c:521 #, c-format msgid "No column titles specified for List dialog.\n" msgstr "Keine Spaltentitel für Listendialog angegeben\n" -#: ../src/option.c:53 +#: ../src/option.c:54 msgid "Set the dialog title" msgstr "Dialogtitel angeben" -#: ../src/option.c:54 +#: ../src/option.c:55 msgid "TITLE" msgstr "TITEL" -#: ../src/option.c:59 +#: ../src/option.c:60 msgid "Set the window icon" msgstr "Fenster-Symbol angeben" -#: ../src/option.c:60 +#: ../src/option.c:61 msgid "ICONPATH" msgstr "SYMBOLPFAD" -#: ../src/option.c:65 +#: ../src/option.c:66 msgid "Set the width" msgstr "Breite angeben" -#: ../src/option.c:66 +#: ../src/option.c:67 msgid "WIDTH" msgstr "BREITE" -#: ../src/option.c:71 +#: ../src/option.c:72 msgid "Set the height" msgstr "Höhe angeben" -#: ../src/option.c:72 +#: ../src/option.c:73 msgid "HEIGHT" msgstr "HÖHE" -#: ../src/option.c:77 +#: ../src/option.c:78 #, fuzzy msgid "Set the window geometry" msgstr "Fenster-Symbol angeben" -#: ../src/option.c:78 +#: ../src/option.c:79 msgid "WxH+X+Y" msgstr "" -#: ../src/option.c:83 +#: ../src/option.c:84 msgid "Set dialog timeout in seconds" msgstr "Ablaufzeit in Sekunden angeben" -#: ../src/option.c:84 +#: ../src/option.c:85 msgid "TIMEOUT" msgstr "ABLAUFZEIT" -#: ../src/option.c:89 +#: ../src/option.c:90 msgid "Show remaining time indicator (top, bottom, left, right)" msgstr "" -#: ../src/option.c:90 +#: ../src/option.c:91 msgid "POS" msgstr "" -#: ../src/option.c:95 +#: ../src/option.c:96 msgid "Set the dialog text" msgstr "Dialogtext angeben" -#: ../src/option.c:96 ../src/option.c:283 ../src/option.c:289 -#: ../src/option.c:295 ../src/option.c:579 +#: ../src/option.c:97 ../src/option.c:290 ../src/option.c:296 +#: ../src/option.c:302 ../src/option.c:406 ../src/option.c:632 msgid "TEXT" msgstr "TEXT" -#: ../src/option.c:101
View file
yad-0.9.1.tar.bz2/po/ru.po -> yad-0.10.0.tar.bz2/po/ru.po
Changed
@@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: YAD\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-02-28 12:49+0200\n" +"POT-Creation-Date: 2011-03-28 13:36+0300\n" "PO-Revision-Date: 2009-04-30 16:47+0300\n" "Last-Translator: Victor Ananjevsky <ananasik@gmail.com>\n" "Language-Team: Russian\n" @@ -66,17 +66,40 @@ "\n" "Основан на коде Zenity\n" -#: ../src/icons.c:238 +#: ../src/entry.c:93 ../src/scale.c:39 #, c-format -msgid "Unable to parse file %s: %s" -msgstr "Не могу разобрать файл %s: %s" +msgid "Maximum value must be greater than minimum value.\n" +msgstr "Максимальное значение должно быть больше, чем минимальное.\n" -#: ../src/icons.c:255 +#: ../src/entry.c:99 ../src/scale.c:48 #, c-format -msgid "Unable to open directory %s: %s" -msgstr "Не могу открыть каталог %s: %s" +msgid "Initial value less than minimal.\n" +msgstr "Начальное значение меньше минимального.\n" -#: ../src/main.c:69 ../src/main.c:167 +#: ../src/entry.c:104 ../src/scale.c:53 +#, c-format +msgid "Initial value greater than maximum.\n" +msgstr "Начальное значение больше маскимального.\n" + +#: ../src/form.c:103 +msgid "Select file" +msgstr "Выбрать файл" + +#: ../src/form.c:113 +msgid "Select folder" +msgstr "Выбрать каталог" + +#: ../src/icons.c:249 +#, c-format +msgid "Unable to parse file %s: %s\n" +msgstr "Не могу разобрать файл %s: %s\n" + +#: ../src/icons.c:266 +#, c-format +msgid "Unable to open directory %s: %s\n" +msgstr "Не могу открыть каталог %s: %s\n" + +#: ../src/main.c:69 ../src/main.c:163 #, c-format msgid "%d sec" msgstr "%d сек" @@ -93,383 +116,400 @@ #: ../src/notification.c:72 #, c-format -msgid "Could not load notification icon '%s': %s" -msgstr "Не удается загрузить иконку '%s': %s" +msgid "Could not load notification icon '%s': %s\n" +msgstr "Не удается загрузить иконку '%s': %s\n" -#: ../src/notification.c:244 +#: ../src/notification.c:239 #, c-format msgid "Invalid UTF-8 in tooltip!\n" msgstr "Неверная последовательность UTF-8 в подсказке!\n" -#: ../src/notification.c:297 +#: ../src/notification.c:292 #, c-format msgid "Unknown command '%s'\n" msgstr "Неизвестная команда '%s'\n" -#: ../src/notification.c:338 ../src/notification.c:340 +#: ../src/notification.c:328 msgid "Yad notification" msgstr "Диалог уведомлений" -#: ../src/scale.c:39 -#, c-format -msgid "Maximum value must be greater than minimum value.\n" -msgstr "Максимальное значение должно быть больше, чем минимальное.\n" - -#: ../src/scale.c:48 -#, c-format -msgid "Initial value less than minimal.\n" -msgstr "Начальное значение меньше минимального.\n" - -#: ../src/scale.c:53 -#, c-format -msgid "Initial value greater than maximum.\n" -msgstr "Начальное значение больше маскимального.\n" - -#: ../src/list.c:406 +#: ../src/list.c:483 msgid "Add row" msgstr "Добавить строку" -#: ../src/list.c:415 +#: ../src/list.c:492 msgid "Delete row" msgstr "Удалить строку" -#: ../src/list.c:442 +#: ../src/list.c:521 #, c-format msgid "No column titles specified for List dialog.\n" msgstr "Не заданы заголовоки колонок для диалога со списком\n" -#: ../src/option.c:53 +#: ../src/option.c:54 msgid "Set the dialog title" msgstr "Задать заголовок диалога" -#: ../src/option.c:54 +#: ../src/option.c:55 msgid "TITLE" msgstr "ЗАГОЛОВОК" -#: ../src/option.c:59 +#: ../src/option.c:60 msgid "Set the window icon" msgstr "Задать значок диалога" -#: ../src/option.c:60 +#: ../src/option.c:61 msgid "ICONPATH" msgstr "ЗНАЧОК" -#: ../src/option.c:65 +#: ../src/option.c:66 msgid "Set the width" msgstr "Задать ширину окна" -#: ../src/option.c:66 +#: ../src/option.c:67 msgid "WIDTH" msgstr "ШИРИНА" -#: ../src/option.c:71 +#: ../src/option.c:72 msgid "Set the height" msgstr "Задать высоту окна" -#: ../src/option.c:72 +#: ../src/option.c:73 msgid "HEIGHT" msgstr "ВЫСОТА" -#: ../src/option.c:77 +#: ../src/option.c:78 msgid "Set the window geometry" msgstr "Задать геометрию окна" -#: ../src/option.c:78 +#: ../src/option.c:79 msgid "WxH+X+Y" msgstr "ВxШ+X+Y" -#: ../src/option.c:83 +#: ../src/option.c:84 msgid "Set dialog timeout in seconds" msgstr "Задать время работы диалога в секундах" -#: ../src/option.c:84 +#: ../src/option.c:85 msgid "TIMEOUT" msgstr "ЗАДЕРЖКА" -#: ../src/option.c:89 +#: ../src/option.c:90 msgid "Show remaining time indicator (top, bottom, left, right)" msgstr "Показать индикатор задержки (top, bottom, left, right)" -#: ../src/option.c:90 +#: ../src/option.c:91 msgid "POS" msgstr "ПОЗИЦИЯ" -#: ../src/option.c:95 +#: ../src/option.c:96 msgid "Set the dialog text" msgstr "Задать текст диалога" -#: ../src/option.c:96 ../src/option.c:283 ../src/option.c:289 -#: ../src/option.c:295 ../src/option.c:579 +#: ../src/option.c:97 ../src/option.c:290 ../src/option.c:296 +#: ../src/option.c:302 ../src/option.c:406 ../src/option.c:632 msgid "TEXT" msgstr "ТЕКСТ" -#: ../src/option.c:101 +#: ../src/option.c:102 msgid "Set the dialog image" msgstr "Задать картинку диалога"
View file
yad-0.9.1.tar.bz2/po/sk.po -> yad-0.10.0.tar.bz2/po/sk.po
Changed
@@ -8,8 +8,8 @@ msgstr "" "Project-Id-Version: YAD 0.6.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-02-28 12:49+0200\n" -"PO-Revision-Date: 2011-02-28 18:50+0100\n" +"POT-Creation-Date: 2011-03-28 13:36+0300\n" +"PO-Revision-Date: 2011-03-27 18:30+0200\n" "Last-Translator: Slavko <linux@slavino.sk>\n" "Language-Team: Slovak <nomail>\n" "Language: \n" @@ -64,17 +64,40 @@ "\n" "Založený na kóde Zenity\n" -#: ../src/icons.c:238 +#: ../src/entry.c:93 ../src/scale.c:39 #, c-format -msgid "Unable to parse file %s: %s" -msgstr "Nemožno spracovať súbor %s: %s" +msgid "Maximum value must be greater than minimum value.\n" +msgstr "Maximálna hodnota musí byť väčšia ako minimálna.\n" + +#: ../src/entry.c:99 ../src/scale.c:48 +#, c-format +msgid "Initial value less than minimal.\n" +msgstr "Počiatočná hodnota je menšia ako minimálna.\n" + +#: ../src/entry.c:104 ../src/scale.c:53 +#, c-format +msgid "Initial value greater than maximum.\n" +msgstr "Maximálna hodnota je väčšia ako minimálna.\n" + +#: ../src/form.c:103 +msgid "Select file" +msgstr "Vyberte súbor" + +#: ../src/form.c:113 +msgid "Select folder" +msgstr "Vyberte pole" + +#: ../src/icons.c:249 +#, c-format +msgid "Unable to parse file %s: %s\n" +msgstr "Nemožno spracovať súbor %s: %s\n" -#: ../src/icons.c:255 +#: ../src/icons.c:266 #, c-format -msgid "Unable to open directory %s: %s" -msgstr "Nemožno otvoriť adresár %s: %s" +msgid "Unable to open directory %s: %s\n" +msgstr "Nemožno otvoriť adresár %s: %s\n" -#: ../src/main.c:69 ../src/main.c:167 +#: ../src/main.c:69 ../src/main.c:163 #, c-format msgid "%d sec" msgstr "%d s" @@ -91,433 +114,450 @@ #: ../src/notification.c:72 #, c-format -msgid "Could not load notification icon '%s': %s" -msgstr "Nemožno načítať ikonu upozornenia '%s': %s" +msgid "Could not load notification icon '%s': %s\n" +msgstr "Nemožno načítať ikonu upozornenia '%s': %s\n" -#: ../src/notification.c:244 +#: ../src/notification.c:239 #, c-format msgid "Invalid UTF-8 in tooltip!\n" msgstr "Neplatné UTF-8 v nástrojovom tipe!\n" -#: ../src/notification.c:297 +#: ../src/notification.c:292 #, c-format msgid "Unknown command '%s'\n" msgstr "Neznámy príkaz '%s'\n" -#: ../src/notification.c:338 ../src/notification.c:340 +#: ../src/notification.c:328 msgid "Yad notification" msgstr "Yad upozornenie" -#: ../src/scale.c:39 -#, c-format -msgid "Maximum value must be greater than minimum value.\n" -msgstr "Maximálna hodnota musí byť väčšia ako minimálna.\n" - -#: ../src/scale.c:48 -#, c-format -msgid "Initial value less than minimal.\n" -msgstr "Počiatočná hodnota je menšia ako minimálna.\n" - -#: ../src/scale.c:53 -#, c-format -msgid "Initial value greater than maximum.\n" -msgstr "Maximálna hodnota je väčšia ako minimálna.\n" - -#: ../src/list.c:406 +#: ../src/list.c:483 msgid "Add row" msgstr "Pridať riadok" -#: ../src/list.c:415 +#: ../src/list.c:492 msgid "Delete row" msgstr "Odstrániť riadok" -#: ../src/list.c:442 +#: ../src/list.c:521 #, c-format msgid "No column titles specified for List dialog.\n" msgstr "Neboli zadané mená stĺpcov pre dialóg Zoznam.\n" -#: ../src/option.c:53 +#: ../src/option.c:54 msgid "Set the dialog title" msgstr "Nastaviť názov dialógu" -#: ../src/option.c:54 +#: ../src/option.c:55 msgid "TITLE" msgstr "NÁZOV" -#: ../src/option.c:59 +#: ../src/option.c:60 msgid "Set the window icon" msgstr "Nastaviť ikonu okna" -#: ../src/option.c:60 +#: ../src/option.c:61 msgid "ICONPATH" msgstr "CESTA_IKON" -#: ../src/option.c:65 +#: ../src/option.c:66 msgid "Set the width" msgstr "Nastaviť šírku" -#: ../src/option.c:66 +#: ../src/option.c:67 msgid "WIDTH" msgstr "ŠÍRKA" -#: ../src/option.c:71 +#: ../src/option.c:72 msgid "Set the height" msgstr "Nastaviť šírku" -#: ../src/option.c:72 +#: ../src/option.c:73 msgid "HEIGHT" msgstr "VÝŠKA" -#: ../src/option.c:77 +#: ../src/option.c:78 msgid "Set the window geometry" msgstr "Nastaviť geometriu okna" -#: ../src/option.c:78 +#: ../src/option.c:79 msgid "WxH+X+Y" msgstr "WxH+X+Y" -#: ../src/option.c:83 +#: ../src/option.c:84 msgid "Set dialog timeout in seconds" msgstr "Nastaviť časový limit dialógu s" -#: ../src/option.c:84 +#: ../src/option.c:85 msgid "TIMEOUT" msgstr "ČASLIMIT" -#: ../src/option.c:89 +#: ../src/option.c:90 msgid "Show remaining time indicator (top, bottom, left, right)" msgstr "Zobraziť indikátor zostávajúceho času (top, bottom, left, right)" -#: ../src/option.c:90 +#: ../src/option.c:91 msgid "POS" msgstr "POZÍCIA" -#: ../src/option.c:95 +#: ../src/option.c:96 msgid "Set the dialog text" msgstr "Nastaviť text dialógu" -#: ../src/option.c:96 ../src/option.c:283 ../src/option.c:289 -#: ../src/option.c:295 ../src/option.c:579 +#: ../src/option.c:97 ../src/option.c:290 ../src/option.c:296 +#: ../src/option.c:302 ../src/option.c:406 ../src/option.c:632 msgid "TEXT" msgstr "TEXT" -#: ../src/option.c:101 +#: ../src/option.c:102
View file
yad-0.9.1.tar.bz2/po/uk.po -> yad-0.10.0.tar.bz2/po/uk.po
Changed
@@ -1,13 +1,13 @@ # Ukrainian translation for YAD # This file is distributed under the same license as the YAD package. # -# Victor Ananjevsky <ananasik@gmail.com>, 2009-2011. +# Victor Ananjevsky <ananasik@gmail.com>, 2011. # msgid "" msgstr "" "Project-Id-Version: YAD\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-02-28 12:49+0200\n" +"POT-Creation-Date: 2011-03-28 13:36+0300\n" "PO-Revision-Date: 2009-04-30 16:47+0300\n" "Last-Translator: Victor Ananjevsky <ananasik@gmail.com>\n" "Language-Team: Ukrainian\n" @@ -39,8 +39,8 @@ "this program; if not, write to the Free Software Foundation, Inc., 59 Temple " "Place, Suite 330, Boston, MA 02111-1307 USA." msgstr "" -"YAD - це вільна програма; ви можете розповсюджувати її та/чи змінювати на умовах " -"ліцензії GNU General Public License, що опублікована Free Software " +"YAD - це вільна програма; ви можете розповсюджувати її та/чи змінювати на " +"умовах ліцензії GNU General Public License, що опублікована Free Software " "Foundation; версії 2 цієї ліцензії, чи (на вашу думку) будь-якою більш " "пізнішої версії.\n" "Ця програма розповсюджується в сподіванні на те, що вона буде корисною, але " @@ -48,8 +48,8 @@ "ЦІННОСТІ чи ПРИДАТНОСТІ ДЛЯ БУДЬ-ЯКИХ ЦІЛЕЙ. Докладніше про це дивіться GNU " "General Public License.\n" "Ви мали отримати копію GNU General Public License разом з цією програмою; " -"якщо це не так, напишіть у Free Software Foundation, Inc., 59 Temple " -"Place, Suite 330, Boston, MA 02111-1307 USA." +"якщо це не так, напишіть у Free Software Foundation, Inc., 59 Temple Place, " +"Suite 330, Boston, MA 02111-1307 USA." #: ../src/about.c:53 msgid "" @@ -63,17 +63,40 @@ "\n" "Базується на коді Zenity\n" -#: ../src/icons.c:238 +#: ../src/entry.c:93 ../src/scale.c:39 +#, c-format +msgid "Maximum value must be greater than minimum value.\n" +msgstr "Максимальне значення повинно бути більше, ніж мінімальне.\n" + +#: ../src/entry.c:99 ../src/scale.c:48 +#, c-format +msgid "Initial value less than minimal.\n" +msgstr "Початкове значення менше за мінімальне.\n" + +#: ../src/entry.c:104 ../src/scale.c:53 +#, c-format +msgid "Initial value greater than maximum.\n" +msgstr "Початкове значенння більше за маскимальне.\n" + +#: ../src/form.c:103 +msgid "Select file" +msgstr "Обрати файл" + +#: ../src/form.c:113 +msgid "Select folder" +msgstr "Обрати каталог" + +#: ../src/icons.c:249 #, c-format -msgid "Unable to parse file %s: %s" -msgstr "Не можу розібрати файл %s: %s" +msgid "Unable to parse file %s: %s\n" +msgstr "Не можу розібрати файл %s: %s\n" -#: ../src/icons.c:255 +#: ../src/icons.c:266 #, c-format -msgid "Unable to open directory %s: %s" -msgstr "Не можу відкрити каталог %s: %s" +msgid "Unable to open directory %s: %s\n" +msgstr "Не можу відкрити каталог %s: %s\n" -#: ../src/main.c:69 ../src/main.c:167 +#: ../src/main.c:69 ../src/main.c:163 #, c-format msgid "%d sec" msgstr "%d сек" @@ -90,383 +113,400 @@ #: ../src/notification.c:72 #, c-format -msgid "Could not load notification icon '%s': %s" -msgstr "Не вдається завантажити іконку '%s': %s" +msgid "Could not load notification icon '%s': %s\n" +msgstr "Не вдається завантажити іконку '%s': %s\n" -#: ../src/notification.c:244 +#: ../src/notification.c:239 #, c-format msgid "Invalid UTF-8 in tooltip!\n" msgstr "Неправильна послідовність UTF-8 у підказці!\n" -#: ../src/notification.c:297 +#: ../src/notification.c:292 #, c-format msgid "Unknown command '%s'\n" msgstr "Невідома команда '%s'\n" -#: ../src/notification.c:338 ../src/notification.c:340 +#: ../src/notification.c:328 msgid "Yad notification" msgstr "Діалог повідомлень" -#: ../src/scale.c:39 -#, c-format -msgid "Maximum value must be greater than minimum value.\n" -msgstr "Максимальне значення повинно бути більше, ніж мінімальне.\n" - -#: ../src/scale.c:48 -#, c-format -msgid "Initial value less than minimal.\n" -msgstr "Початкове значення менше за мінімальне.\n" - -#: ../src/scale.c:53 -#, c-format -msgid "Initial value greater than maximum.\n" -msgstr "Початкове значенння більше за маскимальне.\n" - -#: ../src/list.c:406 +#: ../src/list.c:483 msgid "Add row" msgstr "Добавити строку" -#: ../src/list.c:415 +#: ../src/list.c:492 msgid "Delete row" msgstr "Видалити строку" -#: ../src/list.c:442 +#: ../src/list.c:521 #, c-format msgid "No column titles specified for List dialog.\n" msgstr "Не задані заголовоки колонок для діалога зі списком\n" -#: ../src/option.c:53 +#: ../src/option.c:54 msgid "Set the dialog title" msgstr "Задати заголовок діалога" -#: ../src/option.c:54 +#: ../src/option.c:55 msgid "TITLE" msgstr "ЗАГОЛОВОК" -#: ../src/option.c:59 +#: ../src/option.c:60 msgid "Set the window icon" msgstr "Задати іконку діалога" -#: ../src/option.c:60 +#: ../src/option.c:61 msgid "ICONPATH" msgstr "ІКОНКА" -#: ../src/option.c:65 +#: ../src/option.c:66 msgid "Set the width" msgstr "Задати ширину вікна" -#: ../src/option.c:66 +#: ../src/option.c:67 msgid "WIDTH" msgstr "ШИРИНА" -#: ../src/option.c:71 +#: ../src/option.c:72 msgid "Set the height" msgstr "Задати висоту вікна" -#: ../src/option.c:72 +#: ../src/option.c:73 msgid "HEIGHT" msgstr "ВИСОТА" -#: ../src/option.c:77 +#: ../src/option.c:78 msgid "Set the window geometry" msgstr "Задати геометрію вікна" -#: ../src/option.c:78 +#: ../src/option.c:79 msgid "WxH+X+Y" msgstr "ВxШ+X+Y" -#: ../src/option.c:83 +#: ../src/option.c:84 msgid "Set dialog timeout in seconds" msgstr "Задати врем'я роботи діалога в секундах" -#: ../src/option.c:84 +#: ../src/option.c:85
View file
yad-0.9.1.tar.bz2/src/Makefile.am -> yad-0.10.0.tar.bz2/src/Makefile.am
Changed
@@ -10,7 +10,8 @@ color.c \ dnd.c \ entry.c \ - fileselection.c \ + file.c \ + font.c \ form.c \ icons.c \ list.c \
View file
yad-0.9.1.tar.bz2/src/Makefile.in -> yad-0.10.0.tar.bz2/src/Makefile.in
Changed
@@ -50,7 +50,7 @@ PROGRAMS = $(bin_PROGRAMS) am_yad_OBJECTS = yad-about.$(OBJEXT) yad-calendar.$(OBJEXT) \ yad-color.$(OBJEXT) yad-dnd.$(OBJEXT) yad-entry.$(OBJEXT) \ - yad-fileselection.$(OBJEXT) yad-form.$(OBJEXT) \ + yad-file.$(OBJEXT) yad-font.$(OBJEXT) yad-form.$(OBJEXT) \ yad-icons.$(OBJEXT) yad-list.$(OBJEXT) \ yad-notification.$(OBJEXT) yad-option.$(OBJEXT) \ yad-progress.$(OBJEXT) yad-scale.$(OBJEXT) yad-text.$(OBJEXT) \ @@ -225,7 +225,8 @@ color.c \ dnd.c \ entry.c \ - fileselection.c \ + file.c \ + font.c \ form.c \ icons.c \ list.c \ @@ -334,7 +335,8 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yad-color.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yad-dnd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yad-entry.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yad-fileselection.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yad-file.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yad-font.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yad-form.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yad-icons.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yad-list.Po@am__quote@ @@ -443,21 +445,37 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(yad_CFLAGS) $(CFLAGS) -c -o yad-entry.obj `if test -f 'entry.c'; then $(CYGPATH_W) 'entry.c'; else $(CYGPATH_W) '$(srcdir)/entry.c'; fi` -yad-fileselection.o: fileselection.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(yad_CFLAGS) $(CFLAGS) -MT yad-fileselection.o -MD -MP -MF $(DEPDIR)/yad-fileselection.Tpo -c -o yad-fileselection.o `test -f 'fileselection.c' || echo '$(srcdir)/'`fileselection.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/yad-fileselection.Tpo $(DEPDIR)/yad-fileselection.Po +yad-file.o: file.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(yad_CFLAGS) $(CFLAGS) -MT yad-file.o -MD -MP -MF $(DEPDIR)/yad-file.Tpo -c -o yad-file.o `test -f 'file.c' || echo '$(srcdir)/'`file.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/yad-file.Tpo $(DEPDIR)/yad-file.Po @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fileselection.c' object='yad-fileselection.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='file.c' object='yad-file.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(yad_CFLAGS) $(CFLAGS) -c -o yad-fileselection.o `test -f 'fileselection.c' || echo '$(srcdir)/'`fileselection.c +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(yad_CFLAGS) $(CFLAGS) -c -o yad-file.o `test -f 'file.c' || echo '$(srcdir)/'`file.c -yad-fileselection.obj: fileselection.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(yad_CFLAGS) $(CFLAGS) -MT yad-fileselection.obj -MD -MP -MF $(DEPDIR)/yad-fileselection.Tpo -c -o yad-fileselection.obj `if test -f 'fileselection.c'; then $(CYGPATH_W) 'fileselection.c'; else $(CYGPATH_W) '$(srcdir)/fileselection.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/yad-fileselection.Tpo $(DEPDIR)/yad-fileselection.Po +yad-file.obj: file.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(yad_CFLAGS) $(CFLAGS) -MT yad-file.obj -MD -MP -MF $(DEPDIR)/yad-file.Tpo -c -o yad-file.obj `if test -f 'file.c'; then $(CYGPATH_W) 'file.c'; else $(CYGPATH_W) '$(srcdir)/file.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/yad-file.Tpo $(DEPDIR)/yad-file.Po @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fileselection.c' object='yad-fileselection.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='file.c' object='yad-file.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(yad_CFLAGS) $(CFLAGS) -c -o yad-fileselection.obj `if test -f 'fileselection.c'; then $(CYGPATH_W) 'fileselection.c'; else $(CYGPATH_W) '$(srcdir)/fileselection.c'; fi` +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(yad_CFLAGS) $(CFLAGS) -c -o yad-file.obj `if test -f 'file.c'; then $(CYGPATH_W) 'file.c'; else $(CYGPATH_W) '$(srcdir)/file.c'; fi` + +yad-font.o: font.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(yad_CFLAGS) $(CFLAGS) -MT yad-font.o -MD -MP -MF $(DEPDIR)/yad-font.Tpo -c -o yad-font.o `test -f 'font.c' || echo '$(srcdir)/'`font.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/yad-font.Tpo $(DEPDIR)/yad-font.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='font.c' object='yad-font.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(yad_CFLAGS) $(CFLAGS) -c -o yad-font.o `test -f 'font.c' || echo '$(srcdir)/'`font.c + +yad-font.obj: font.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(yad_CFLAGS) $(CFLAGS) -MT yad-font.obj -MD -MP -MF $(DEPDIR)/yad-font.Tpo -c -o yad-font.obj `if test -f 'font.c'; then $(CYGPATH_W) 'font.c'; else $(CYGPATH_W) '$(srcdir)/font.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/yad-font.Tpo $(DEPDIR)/yad-font.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='font.c' object='yad-font.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(yad_CFLAGS) $(CFLAGS) -c -o yad-font.obj `if test -f 'font.c'; then $(CYGPATH_W) 'font.c'; else $(CYGPATH_W) '$(srcdir)/font.c'; fi` yad-form.o: form.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(yad_CFLAGS) $(CFLAGS) -MT yad-form.o -MD -MP -MF $(DEPDIR)/yad-form.Tpo -c -o yad-form.o `test -f 'form.c' || echo '$(srcdir)/'`form.c
View file
yad-0.9.1.tar.bz2/src/about.c -> yad-0.10.0.tar.bz2/src/about.c
Changed
@@ -15,7 +15,7 @@ * along with YAD; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * Copyright (C) 2008-2010, Victor Ananjevsky <ananasik@gmail.com> + * Copyright (C) 2008-2011, Victor Ananjevsky <ananasik@gmail.com> * */ @@ -49,7 +49,7 @@ g_object_set (G_OBJECT (dialog), "name", PACKAGE_NAME, "version", PACKAGE_VERSION, - "copyright", "Copyright \xc2\xa9 2008-2010 Victor Ananjevsky <ananasik@gmail.com>", + "copyright", "Copyright \xc2\xa9 2008-2011 Victor Ananjevsky <ananasik@gmail.com>", "comments", _("Yet Another Dialog\n(show dialog boxes from shell scripts)\n\nBased on Zenity code\n"), "authors", authors, "website", PACKAGE_URL,
View file
yad-0.9.1.tar.bz2/src/browser.c -> yad-0.10.0.tar.bz2/src/browser.c
Changed
@@ -15,7 +15,7 @@ * along with YAD; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * Copyright (C) 2010, Victor Ananjevsky <ananasik@gmail.com> + * Copyright (C) 2010-2011, Victor Ananjevsky <ananasik@gmail.com> * */
View file
yad-0.9.1.tar.bz2/src/calendar.c -> yad-0.10.0.tar.bz2/src/calendar.c
Changed
@@ -15,7 +15,7 @@ * along with YAD; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * Copyright (C) 2008-2010, Victor Ananjevsky <ananasik@gmail.com> + * Copyright (C) 2008-2011, Victor Ananjevsky <ananasik@gmail.com> * */
View file
yad-0.9.1.tar.bz2/src/color.c -> yad-0.10.0.tar.bz2/src/color.c
Changed
@@ -15,7 +15,7 @@ * along with YAD; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * Copyright (C) 2008-2010, Victor Ananjevsky <ananasik@gmail.com> + * Copyright (C) 2008-2011, Victor Ananjevsky <ananasik@gmail.com> * */
View file
yad-0.9.1.tar.bz2/src/dnd.c -> yad-0.10.0.tar.bz2/src/dnd.c
Changed
@@ -15,28 +15,22 @@ * along with YAD; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * Copyright (C) 2008-2010, Victor Ananjevsky <ananasik@gmail.com> + * Copyright (C) 2008-2011, Victor Ananjevsky <ananasik@gmail.com> * */ +/* code for working with dnd targets gets from gnome-terminal */ + #include "yad.h" enum { - TARGET_UTF8_STRING, - TARGET_STRING, - TARGET_TEXT, - TARGET_COMPOUND_TEXT, - TARGET_TEXT_PLAIN, - TARGET_MOZ_URL + TARGET_MOZ_URL, + TARGET_NS_URL }; static GtkTargetEntry tgt = { - {"text/x-moz-url", 0, TARGET_MOZ_URL}, - {"UTF8_STRING", 0, TARGET_UTF8_STRING}, - {"COMPOUND_TEXT", 0, TARGET_COMPOUND_TEXT}, - {"TEXT", 0, TARGET_TEXT}, - {"STRING", 0, TARGET_STRING}, - {"text/plain", 0, TARGET_TEXT_PLAIN} + { "text/x-moz-url", 0, TARGET_MOZ_URL }, + { "_NETSCAPE_URL", 0, TARGET_NS_URL } }; static void @@ -44,64 +38,151 @@ GtkSelectionData *sel, guint info, guint t, gpointer data) { gchar *str = NULL; + const guchar *sdata; + GdkAtom stgt; + gint slen, sfmt; + + sdata = gtk_selection_data_get_data (sel); + stgt = gtk_selection_data_get_target (sel); + slen = gtk_selection_data_get_length (sel); + sfmt = gtk_selection_data_get_format (sel); - switch (info) + if (gtk_targets_include_uri (&stgt, 1)) { - case TARGET_STRING: - case TARGET_UTF8_STRING: - case TARGET_COMPOUND_TEXT: - case TARGET_TEXT: - str = gtk_selection_data_get_text (sel); - break; - case TARGET_TEXT_PLAIN: - str = g_strdup (gtk_selection_data_get_data (sel)); - break; - case TARGET_MOZ_URL: - { - GString *str1; - const guint16 *char_data; - guint length; - int i = 0; - - str1 = g_string_new (NULL); - char_data = (const guint16 *) gtk_selection_data_get_data (sel); - length = gtk_selection_data_get_length (sel); - while (i < (length / 2)) - { - if (char_datai == '\n') - break; - g_string_append_unichar (str1, (gunichar) char_datai++); - } - str = g_strdup (str1->str); - g_string_free (str1, TRUE); - break; - } - } + gchar **uris; + gint i = 0; + + uris = gtk_selection_data_get_uris (sel); + if (!uris) + return; - if (str) + while (urisi) + { + gchar *dstr = g_uri_unescape_string (urisi, NULL); + if (options.common_data.command) + { + gchar *action = g_strdup_printf ("%s '%s'", options.common_data.command, dstr); + g_spawn_command_line_async (action, NULL); + g_free (action); + } + else + { + g_printf ("%s\n", dstr); + fflush (stdout); + } + g_free (dstr); + i++; + } + g_strfreev (uris); + } + else if (gtk_targets_include_text (&stgt, 1)) { - if (options.common_data.command) + gchar *str, *dstr; + + str = gtk_selection_data_get_text (sel); + if (str) { - gchar *action = g_strdup_printf ("%s '%s'", options.common_data.command, str); - g_spawn_command_line_async (action, NULL); - g_free (action); + dstr = g_uri_unescape_string (str, NULL); + if (options.common_data.command) + { + gchar *action = g_strdup_printf ("%s '%s'", options.common_data.command, dstr); + g_spawn_command_line_async (action, NULL); + g_free (action); + } + else + { + g_printf ("%s\n", dstr); + fflush (stdout); + } + g_free (dstr); + g_free(str); } - else + } + else + { + gchar *str = NULL; + + switch (info) { - g_printf ("%s\n", str); - fflush (stdout); + case TARGET_MOZ_URL: + { + gchar *nl; + gsize len; + + /* MOZ_URL is in UCS-2 but in format 8. BROKEN! + * + * The data contains the URL, a \n, then the title of the web page. + */ + if (sfmt != 8 || slen == 0 || (slen % 2) != 0) + return; + + if ((str = g_utf16_to_utf8 ((const gunichar2*) sdata, slen / 2, + NULL, NULL, NULL)) == NULL) + return; + + nl = strchr (str, '\n'); + if (nl) *nl = '\0'; + + break; + } + case TARGET_NS_URL: + { + gchar *nl; + gsize len; + + /* The data contains the URL, a \n, then the + * title of the web page. + */ + if (slen < 0 || sfmt != 8) + return; + + str = g_strndup ((char *) sdata, slen); + nl = strchr (str, '\n'); + if (nl) *nl = '\0'; + + break; + } } - g_free (str); + if (str) + { + gchar *dstr = g_uri_unescape_string (str, NULL); + if (options.common_data.command) + { + gchar *action = g_strdup_printf ("%s '%s'", options.common_data.command, dstr); + g_spawn_command_line_async (action, NULL); + g_free (action); + } + else + { + g_printf ("%s\n", dstr); + fflush (stdout); + }
View file
yad-0.9.1.tar.bz2/src/entry.c -> yad-0.10.0.tar.bz2/src/entry.c
Changed
@@ -15,7 +15,7 @@ * along with YAD; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * Copyright (C) 2008-2010, Victor Ananjevsky <ananasik@gmail.com> + * Copyright (C) 2008-2011, Victor Ananjevsky <ananasik@gmail.com> * */ @@ -65,7 +65,50 @@ gtk_box_pack_start (GTK_BOX (w), l, FALSE, FALSE, 1); } - if (!options.entry_data.completion && + if (options.entry_data.numeric) + { + gdouble min, max, step, val; + + min = 0.0; max = 65535.0; step = 1.0; + + if (options.extra_data && *options.extra_data) + { + min = g_ascii_strtod (options.extra_data0, NULL); + if (options.extra_data1) + { + max = g_ascii_strtod (options.extra_data1, NULL); + if (options.extra_data2) + step = g_ascii_strtod (options.extra_data2, NULL); + } + } + + c = entry = gtk_spin_button_new_with_range (min, max, step); + + if (options.entry_data.entry_text) + { + val = g_ascii_strtod (options.entry_data.entry_text, NULL); + + if (min >= max) + { + g_printerr (_("Maximum value must be greater than minimum value.\n")); + min = 0.0; max = 65535.0; + } + + if (val < min) + { + g_printerr (_("Initial value less than minimal.\n")); + val = min; + } + else if (val > max) + { + g_printerr (_("Initial value greater than maximum.\n")); + val = max; + } + + gtk_spin_button_set_value (GTK_SPIN_BUTTON (c), val); + } + } + else if (!options.entry_data.completion && options.extra_data && *options.extra_data) { gint i = 0; @@ -151,7 +194,9 @@ void entry_print_result (void) { - if (is_combo) + if (options.entry_data.numeric) + g_print ("%lf\n", gtk_spin_button_get_value (GTK_SPIN_BUTTON (entry))); + else if (is_combo) #if GTK_CHECK_VERSION(2,24,0) g_print ("%s\n", gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (entry))); #else
View file
yad-0.10.0.tar.bz2/src/file.c
Added
@@ -0,0 +1,181 @@ +/* + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Copyright (C) 2008-2011, Victor Ananjevsky <ananasik@gmail.com> + * + */ + +#include "yad.h" + +static GtkWidget *filechooser; + +static void +file_activated_cb (GtkFileChooser *chooser, gpointer *data) +{ + gtk_dialog_response (GTK_DIALOG (data), YAD_RESPONSE_OK); +} + +void +confirm_overwrite_cb (GtkDialog *dlg, gint id, gpointer data) +{ + 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)); + + if (g_file_test (filename, G_FILE_TEST_EXISTS)) + { + GtkWidget *d; + gint r; + gchar *buf; + + buf = g_strcompress (options.file_data.confirm_text); + d = gtk_message_dialog_new (GTK_WINDOW (dlg), GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, + "%s", buf); + g_free (buf); + r = gtk_dialog_run (GTK_DIALOG (d)); + gtk_widget_destroy (d); + if (r != GTK_RESPONSE_YES) + g_signal_stop_emission_by_name (dlg, "response"); + } + } +} + +GtkWidget * +file_create_widget (GtkWidget *dlg) +{ + GtkWidget *w; + gchar *dir, *basename; + GtkFileChooserAction action = GTK_FILE_CHOOSER_ACTION_OPEN; + + if (options.file_data.directory) + { + if (options.file_data.save) + action = GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER; + else + action = GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER; + } + else + { + if (options.file_data.save) + action = GTK_FILE_CHOOSER_ACTION_SAVE; + } + + w = filechooser = gtk_file_chooser_widget_new (action); + + if (options.common_data.uri) + { + dir = g_path_get_dirname (options.common_data.uri); + + if (g_path_is_absolute (options.common_data.uri) == TRUE) + gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (w), dir); + + if (options.common_data.uristrlen (options.common_data.uri) - 1 != '/') + { + basename = g_path_get_basename (options.common_data.uri); + if (options.file_data.save) + gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (w), + basename); + else + gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (w), + options.common_data.uri); + g_free (basename); + } + g_free (dir); + } + + if (options.common_data.multi) + gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (w), TRUE); + + if (options.file_data.filter) + { + /* Filter format: Executables | *.exe *.bat *.com */ + gint filter_i; + + for (filter_i = 0; options.file_data.filterfilter_i; filter_i++) + { + GtkFileFilter *filter = gtk_file_filter_new (); + gchar *filter_str = options.file_data.filterfilter_i; + gchar **pattern, **patterns; + gchar *name = NULL; + gint i; + + /* Set name */ + for (i = 0; filter_stri != '\0'; i++) + { + if (filter_stri == '|') + break; + } + + if (filter_stri == '|') + name = g_strstrip (g_strndup (filter_str, i)); + + if (name) + { + gtk_file_filter_set_name (filter, name); + + /* Point i to the right position for split */ + for (++i; filter_stri == ' '; i++); + } + else + { + gtk_file_filter_set_name (filter, filter_str); + i = 0; + } + + /* Get patterns */ + patterns = g_strsplit_set (filter_str + i, " ", -1); + + for (pattern = patterns; *pattern; pattern++) + gtk_file_filter_add_pattern (filter, *pattern); + + g_free (name); + g_strfreev (patterns); + + gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (w), filter); + } + } + + g_signal_connect (w, "file-activated", + G_CALLBACK (file_activated_cb), dlg); + + return w; +} + +void +file_print_result (void) +{ + GSList *selections, *iter; + + selections = gtk_file_chooser_get_filenames (GTK_FILE_CHOOSER (filechooser)); + for (iter = selections; iter != NULL; iter = iter->next) + { + g_print ("%s", + g_filename_to_utf8 ((gchar *) iter->data, -1, NULL, NULL, + NULL)); + g_free (iter->data); + if (iter->next != NULL) + g_print ("%s", options.common_data.separator); + } + g_print ("\n"); + g_slist_free (selections); +}
View file
yad-0.10.0.tar.bz2/src/font.c
Added
@@ -0,0 +1,55 @@ +/* + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Copyright (C) 2008-2011, Victor Ananjevsky <ananasik@gmail.com> + * + */ + +#include <errno.h> + +#include "yad.h" + +static GtkWidget *font; + +static void +realize_cb (GtkWidget *w, gpointer d) +{ + gtk_font_selection_set_font_name (GTK_FONT_SELECTION (w), options.common_data.font); +} + +GtkWidget * +font_create_widget (GtkWidget *dlg) +{ + GtkWidget *w; + + w = font = gtk_font_selection_new (); + + if (options.font_data.preview) + gtk_font_selection_set_preview_text (GTK_FONT_SELECTION (w), options.font_data.preview); + + /* font must be set after widget inserted in toplevel */ + if (options.common_data.font) + g_signal_connect_after (G_OBJECT (w), "realize", G_CALLBACK (realize_cb), NULL); + + return w; +} + +void +font_print_result (void) +{ + g_printf ("%s\n", gtk_font_selection_get_font_name (GTK_FONT_SELECTION (font))); +}
View file
yad-0.9.1.tar.bz2/src/icons.c -> yad-0.10.0.tar.bz2/src/icons.c
Changed
@@ -15,7 +15,7 @@ * along with YAD; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * Copyright (C) 2008-2010, Victor Ananjevsky <ananasik@gmail.com> + * Copyright (C) 2008-2011, Victor Ananjevsky <ananasik@gmail.com> * */ @@ -116,9 +116,9 @@ { if (err) { - g_printerr ("yad_icons_handle_stdin(): %s", err->message); + g_printerr ("yad_icons_handle_stdin(): %s\n", err->message); g_error_free (err); - err = NULL; + err = NULL; } continue; } @@ -246,7 +246,7 @@ } } else - g_printerr (_("Unable to parse file %s: %s"), filename, err->message); + g_printerr (_("Unable to parse file %s: %s\n"), filename, err->message); g_key_file_free (kf); @@ -263,7 +263,7 @@ dir = g_dir_open (options.icons_data.directory, 0, &err); if (!dir) { - g_printerr (_("Unable to open directory %s: %s"), + g_printerr (_("Unable to open directory %s: %s\n"), options.icons_data.directory, err->message); return; } @@ -313,9 +313,9 @@ GtkListStore *store; w = gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (w), GTK_SHADOW_ETCHED_IN); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (w), - GTK_POLICY_AUTOMATIC, - GTK_POLICY_AUTOMATIC); + GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); store = gtk_list_store_new (NUM_COLS, G_TYPE_STRING, @@ -378,15 +378,9 @@ g_object_unref (store); if (!options.icons_data.compact) - { - g_signal_connect (G_OBJECT (icon_view), "item-activated", - G_CALLBACK (activate_cb), NULL); - } + g_signal_connect (G_OBJECT (icon_view), "item-activated", G_CALLBACK (activate_cb), NULL); else - { - g_signal_connect (G_OBJECT (icon_view), "row-activated", - G_CALLBACK (activate_cb), NULL); - } + g_signal_connect (G_OBJECT (icon_view), "row-activated", G_CALLBACK (activate_cb), NULL); gtk_container_add (GTK_CONTAINER (w), icon_view);
View file
yad-0.9.1.tar.bz2/src/list.c -> yad-0.10.0.tar.bz2/src/list.c
Changed
@@ -15,7 +15,7 @@ * along with YAD; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * Copyright (C) 2008-2010, Victor Ananjevsky <ananasik@gmail.com> + * Copyright (C) 2008-2011, Victor Ananjevsky <ananasik@gmail.com> * */ @@ -28,6 +28,8 @@ static GtkWidget *list_view; +static gint fore_col, back_col, font_col; + static gboolean list_activate_cb (GtkWidget *widget, GdkEventKey *event, gpointer data) { @@ -81,6 +83,8 @@ if (col->type == YAD_COLUMN_NUM) gtk_list_store_set (GTK_LIST_STORE (model), &iter, column, g_ascii_strtoll (new_text, NULL, 10), -1); + else if (col->type == YAD_COLUMN_FLOAT) + gtk_list_store_set (GTK_LIST_STORE (model), &iter, column, g_ascii_strtod (new_text, NULL), -1); else gtk_list_store_set (GTK_LIST_STORE (model), &iter, column, new_text, -1); @@ -114,9 +118,24 @@ case YAD_COLUMN_NUM: ctypesi = G_TYPE_INT64; break; + case YAD_COLUMN_FLOAT: + ctypesi = G_TYPE_DOUBLE; + break; case YAD_COLUMN_IMAGE: ctypesi = GDK_TYPE_PIXBUF; break; + case YAD_COLUMN_ATTR_FORE: + ctypesi = G_TYPE_STRING; + fore_col = i; + break; + case YAD_COLUMN_ATTR_BACK: + ctypesi = G_TYPE_STRING; + back_col = i; + break; + case YAD_COLUMN_ATTR_FONT: + ctypesi = G_TYPE_STRING; + font_col = i; + break; case YAD_COLUMN_TOOLTIP: case YAD_COLUMN_TEXT: default: @@ -141,7 +160,8 @@ { YadColumn *col = (YadColumn *) g_slist_nth_data (options.list_data.columns, i); - if (i == options.list_data.hide_column - 1) + if (i == options.list_data.hide_column - 1 || + i == fore_col || i == back_col || i == font_col) continue; switch (col->type) @@ -150,15 +170,18 @@ renderer = gtk_cell_renderer_toggle_new (); g_object_set_data (G_OBJECT (renderer), "column", GINT_TO_POINTER (i)); g_signal_connect (renderer, "toggled", G_CALLBACK (toggled_cb), NULL); - column = gtk_tree_view_column_new_with_attributes - (col->name, renderer, "active", i, NULL); + column = gtk_tree_view_column_new_with_attributes (col->name, renderer, "active", i, NULL); + if (back_col != -1) + gtk_tree_view_column_add_attribute (column, renderer, "cell-background", back_col); break; case YAD_COLUMN_IMAGE: renderer = gtk_cell_renderer_pixbuf_new (); - column = gtk_tree_view_column_new_with_attributes - (col->name, renderer, "pixbuf", i, NULL); + column = gtk_tree_view_column_new_with_attributes (col->name, renderer, "pixbuf", i, NULL); + if (back_col != -1) + gtk_tree_view_column_add_attribute (column, renderer, "cell-background", back_col); break; case YAD_COLUMN_NUM: + case YAD_COLUMN_FLOAT: renderer = gtk_cell_renderer_text_new (); if (options.common_data.editable) { @@ -166,8 +189,13 @@ g_object_set_data (G_OBJECT (renderer), "column", GINT_TO_POINTER (i)); g_signal_connect (renderer, "edited", G_CALLBACK (cell_edited_cb), NULL); } - column = gtk_tree_view_column_new_with_attributes - (col->name, renderer, "text", i, NULL); + column = gtk_tree_view_column_new_with_attributes (col->name, renderer, "text", i, NULL); + if (fore_col != -1) + gtk_tree_view_column_add_attribute (column, renderer, "foreground", fore_col); + if (back_col != -1) + gtk_tree_view_column_add_attribute (column, renderer, "cell-background", back_col); + if (font_col != -1) + 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); break; @@ -181,17 +209,25 @@ g_object_set_data (G_OBJECT (renderer), "column", GINT_TO_POINTER (i)); g_signal_connect (renderer, "edited", G_CALLBACK (cell_edited_cb), NULL); } - column = gtk_tree_view_column_new_with_attributes - (col->name, renderer, "markup", i, NULL); + column = gtk_tree_view_column_new_with_attributes (col->name, renderer, "markup", i, NULL); + if (fore_col != -1) + gtk_tree_view_column_add_attribute (column, renderer, "foreground", fore_col); + if (back_col != -1) + gtk_tree_view_column_add_attribute (column, renderer, "cell-background", back_col); + if (font_col != -1) + 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); break; } gtk_tree_view_append_column (GTK_TREE_VIEW (list_view), column); - if (i == options.list_data.expand_column - 1 || - options.list_data.expand_column == 0) - gtk_tree_view_column_set_expand (column, TRUE); + if (col->type != YAD_COLUMN_CHECK || col->type != YAD_COLUMN_IMAGE) + { + if (i == options.list_data.expand_column - 1 || + options.list_data.expand_column == 0) + gtk_tree_view_column_set_expand (column, TRUE); + } } } @@ -241,7 +277,7 @@ { if (err) { - g_printerr ("yad_list_handle_stdin(): %s", err->message); + g_printerr ("yad_list_handle_stdin(): %s\n", err->message); g_error_free (err); err = NULL; } @@ -253,6 +289,11 @@ /* We're starting a new row */ column_count = 0; row_count++; + if (options.list_data.limit && row_count >= options.list_data.limit) + { + gtk_tree_model_get_iter_first (model, &iter); + gtk_list_store_remove (GTK_LIST_STORE (model), &iter); + } gtk_list_store_append (GTK_LIST_STORE (model), &iter); } @@ -267,15 +308,23 @@ gtk_list_store_set (GTK_LIST_STORE (model), &iter, column_count, FALSE, -1); break; case YAD_COLUMN_NUM: - gtk_list_store_set (GTK_LIST_STORE (model), &iter, column_count, - g_ascii_strtoll (string->str, NULL, 10), -1); + gtk_list_store_set (GTK_LIST_STORE (model), &iter, column_count, + g_ascii_strtoll (string->str, NULL, 10), -1); + break; + case YAD_COLUMN_FLOAT: + gtk_list_store_set (GTK_LIST_STORE (model), &iter, column_count, + g_ascii_strtod (string->str, NULL), -1); break; case YAD_COLUMN_IMAGE: pb = get_pixbuf (string->str, YAD_SMALL_ICON); - gtk_list_store_set (GTK_LIST_STORE (model), &iter, - column_count, pb, -1); + gtk_list_store_set (GTK_LIST_STORE (model), &iter, column_count, pb, -1); g_object_unref (pb); break; + case YAD_COLUMN_ATTR_FORE: + case YAD_COLUMN_ATTR_BACK: + case YAD_COLUMN_ATTR_FONT: + gtk_list_store_set (GTK_LIST_STORE (model), &iter, column_count, string->str, -1); + break; case YAD_COLUMN_TEXT: case YAD_COLUMN_TOOLTIP: default: @@ -338,11 +387,20 @@ gtk_list_store_set (GTK_LIST_STORE (model), &iter, j, g_ascii_strtoll (argsi, NULL, 10), -1); break; + case YAD_COLUMN_FLOAT: + gtk_list_store_set (GTK_LIST_STORE (model), &iter, j, + g_ascii_strtod (argsi, NULL), -1); + break; case YAD_COLUMN_IMAGE: pb = get_pixbuf (argsi, YAD_SMALL_ICON); gtk_list_store_set (GTK_LIST_STORE (model), &iter, j, pb, -1); g_object_unref (pb); break; + case YAD_COLUMN_ATTR_FORE: + case YAD_COLUMN_ATTR_BACK: + case YAD_COLUMN_ATTR_FONT: + gtk_list_store_set (GTK_LIST_STORE (model), &iter, j, argsi, -1); + break; case YAD_COLUMN_TEXT:
View file
yad-0.9.1.tar.bz2/src/main.c -> yad-0.10.0.tar.bz2/src/main.c
Changed
@@ -15,7 +15,7 @@ * along with YAD; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * Copyright (C) 2008-2010, Victor Ananjevsky <ananasik@gmail.com> + * Copyright (C) 2008-2011, Victor Ananjevsky <ananasik@gmail.com> * */ @@ -143,12 +143,8 @@ /* add top label widgets */ hbox = hbox2 = gtk_hbox_new (FALSE, 0); -#if GTK_CHECK_VERSION (2, 14, 0) gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dlg))), hbox); -#else - gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dlg)->vbox), hbox); -#endif vbox = gtk_vbox_new (FALSE, 0); /* add timeout indicator */ @@ -225,6 +221,9 @@ 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; @@ -264,14 +263,12 @@ } else { -#if GTK_CHECK_VERSION (2, 14, 0) if (gtk_alternative_dialog_button_order (NULL)) gtk_dialog_add_buttons (GTK_DIALOG (dlg), GTK_STOCK_OK, YAD_RESPONSE_OK, GTK_STOCK_CANCEL, YAD_RESPONSE_CANCEL, NULL); else -#endif gtk_dialog_add_buttons (GTK_DIALOG (dlg), GTK_STOCK_CANCEL, YAD_RESPONSE_CANCEL, GTK_STOCK_OK, YAD_RESPONSE_OK, NULL); @@ -316,6 +313,9 @@ case YAD_MODE_FILE: file_print_result (); break; + case YAD_MODE_FONT: + font_print_result (); + break; case YAD_MODE_FORM: form_print_result (); break; @@ -427,11 +427,17 @@ print_result (); } /* autokill option for progress dialog */ - if (options.mode == YAD_MODE_PROGRESS && - options.progress_data.autokill && - ret != YAD_RESPONSE_OK) - kill (getppid (), 1); + if (!options.kill_parent) + { + if (options.mode == YAD_MODE_PROGRESS && + options.progress_data.autokill && + ret != YAD_RESPONSE_OK) + kill (getppid (), 1); + } } + if (options.kill_parent) + kill (getppid (), SIGTERM); + return ret; }
View file
yad-0.9.1.tar.bz2/src/notification.c -> yad-0.10.0.tar.bz2/src/notification.c
Changed
@@ -15,7 +15,7 @@ * along with YAD; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * Copyright (C) 2008-2010, Victor Ananjevsky <ananasik@gmail.com> + * Copyright (C) 2008-2011, Victor Ananjevsky <ananasik@gmail.com> * */ @@ -69,7 +69,7 @@ TRUE, &err); if (err) { - g_printerr (_("Could not load notification icon '%s': %s"), + g_printerr (_("Could not load notification icon '%s': %s\n"), icon, err->message); g_clear_error (&err); } @@ -229,19 +229,14 @@ if (g_utf8_validate (value, -1, NULL)) { gchar *message = g_strcompress (value); -#if GTK_CHECK_VERSION(2,16,0) - if (options.data.no_markup) - gtk_status_icon_set_tooltip_markup (status_icon, message); - else - gtk_status_icon_set_tooltip_text (status_icon, message); -#else - gtk_status_icon_set_tooltip (status_icon, message); -#endif - + if (!options.data.no_markup) + gtk_status_icon_set_tooltip_markup (status_icon, message); + else + gtk_status_icon_set_tooltip_text (status_icon, message); g_free (message); } else - g_printerr (_("Invalid UTF-8 in tooltip!\n")); + g_printerr (_("Invalid UTF-8 in tooltip!\n")); } else if (!g_ascii_strcasecmp (command, "visible")) { @@ -324,21 +319,13 @@ if (options.data.dialog_text) { -#if GTK_CHECK_VERSION(2,16,0) - if (options.data.no_markup) - gtk_status_icon_set_tooltip_markup (status_icon, options.data.dialog_text); + if (!options.data.no_markup) + gtk_status_icon_set_tooltip_markup (status_icon, options.data.dialog_text); else - gtk_status_icon_set_tooltip_text (status_icon, options.data.dialog_text); -#else - gtk_status_icon_set_tooltip (status_icon, options.data.dialog_text); -#endif + gtk_status_icon_set_tooltip_text (status_icon, options.data.dialog_text); } else -#if GTK_CHECK_VERSION(2,16,0) gtk_status_icon_set_tooltip_text (status_icon, _("Yad notification")); -#else - gtk_status_icon_set_tooltip (status_icon, _("Yad notification")); -#endif if (options.data.dialog_image) icon = g_strdup (options.data.dialog_image);
View file
yad-0.9.1.tar.bz2/src/option.c -> yad-0.10.0.tar.bz2/src/option.c
Changed
@@ -15,7 +15,7 @@ * along with YAD; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * Copyright (C) 2008-2010, Victor Ananjevsky <ananasik@gmail.com> + * Copyright (C) 2008-2011, Victor Ananjevsky <ananasik@gmail.com> * */ @@ -37,6 +37,7 @@ static gboolean dnd_mode = FALSE; static gboolean entry_mode = FALSE; static gboolean file_mode = FALSE; +static gboolean font_mode = FALSE; static gboolean form_mode = FALSE; static gboolean icons_mode = FALSE; static gboolean list_mode = FALSE; @@ -181,6 +182,12 @@ &options.data.undecorated, N_("Set window undecorated"), NULL }, + { "kill-parent", 0, + 0, + G_OPTION_ARG_NONE, + &options.kill_parent, + N_("Send TERM to parent"), + NULL }, { NULL } }; @@ -299,6 +306,12 @@ &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, @@ -308,13 +321,19 @@ { NULL } }; -static GOptionEntry file_selection_options = { - { "file-selection", 0, +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, @@ -360,6 +379,34 @@ { 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 } +}; + static GOptionEntry form_options = { { "form", 0, G_OPTION_FLAG_IN_MAIN, @@ -470,7 +517,7 @@ 0, G_OPTION_ARG_CALLBACK, add_column, - N_("Set the column header (TYPE - TEXT, NUM, CHK, IMG or TIP)"), + N_("Set the column header (TYPE - TEXT, NUM, FLT, CHK, IMG or TIP)"), N_("COLUMN:TYPE") }, { "checklist", 0, 0, @@ -527,6 +574,12 @@ &options.list_data.expand_column, N_("Set the column expandable by default. 0 sets all columns expandable"), N_("NUMBER") }, + { "limit", 0, + 0, + G_OPTION_ARG_INT, + &options.list_data.limit, + N_("Set the limit of rows in list"), + N_("NUMBER") }, { NULL } }; @@ -654,6 +707,18 @@ &options.scale_data.hide_value, N_("Hide value"), NULL }, + { "vertical", 0, + 0, + G_OPTION_ARG_NONE, + &options.scale_data.vertical, + N_("Show vertical scale"), + NULL }, + { "invert", 0, + 0, + G_OPTION_ARG_NONE, + &options.scale_data.invert, + N_("Invert direction"), + NULL }, { NULL } }; @@ -676,10 +741,10 @@ &options.text_data.back, N_("Use specified color for background"), N_("COLOR") }, - { "font", 0, - 0, + { "fontname", 0, + G_OPTION_FLAG_NOALIAS, G_OPTION_ARG_STRING, - &options.text_data.font, + &options.common_data.font, N_("Use specified font"), N_("FONTNAME") }, { "wrap", 0, @@ -718,6 +783,12 @@ &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 }, { NULL } }; @@ -775,21 +846,32 @@ col = g_new0 (YadColumn, 1); col->name = g_strdup (cstr0); - if (cstr1) + if (g_ascii_strcasecmp (cstr0, "@fore@") == 0) + col->type = YAD_COLUMN_ATTR_FORE; + else if (g_ascii_strcasecmp (cstr0, "@back@") == 0) + col->type = YAD_COLUMN_ATTR_BACK; + else if (g_ascii_strcasecmp (cstr0, "@font@") == 0) + col->type = YAD_COLUMN_ATTR_FONT; + else { - if (g_ascii_strcasecmp (cstr1, "NUM") == 0) - col->type = YAD_COLUMN_NUM ; - else if (g_ascii_strcasecmp (cstr1, "CHK") == 0) - col->type = YAD_COLUMN_CHECK; - else if (g_ascii_strcasecmp (cstr1, "IMG") == 0) - col->type = YAD_COLUMN_IMAGE; - else if (g_ascii_strcasecmp (cstr1, "TIP") == 0) - col->type = YAD_COLUMN_TOOLTIP; + if (cstr1) + { + if (g_ascii_strcasecmp (cstr1, "NUM") == 0) + col->type = YAD_COLUMN_NUM ; + else if (g_ascii_strcasecmp (cstr1, "CHK") == 0) + col->type = YAD_COLUMN_CHECK; + else if (g_ascii_strcasecmp (cstr1, "FLT") == 0) + col->type = YAD_COLUMN_FLOAT; + else if (g_ascii_strcasecmp (cstr1, "IMG") == 0) + col->type = YAD_COLUMN_IMAGE; + else if (g_ascii_strcasecmp (cstr1, "TIP") == 0)
View file
yad-0.9.1.tar.bz2/src/progress.c -> yad-0.10.0.tar.bz2/src/progress.c
Changed
@@ -15,7 +15,7 @@ * along with YAD; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * Copyright (C) 2008-2010, Victor Ananjevsky <ananasik@gmail.com> + * Copyright (C) 2008-2011, Victor Ananjevsky <ananasik@gmail.com> * */
View file
yad-0.9.1.tar.bz2/src/scale.c -> yad-0.10.0.tar.bz2/src/scale.c
Changed
@@ -15,7 +15,7 @@ * along with YAD; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * Copyright (C) 2008-2010, Victor Ananjevsky <ananasik@gmail.com> + * Copyright (C) 2008-2011, Victor Ananjevsky <ananasik@gmail.com> * */ @@ -57,9 +57,20 @@ else options.scale_data.value = options.scale_data.min_value; - w = scale = gtk_hscale_new_with_range (options.scale_data.min_value, - options.scale_data.max_value, - options.scale_data.step); + if (options.scale_data.vertical) + { + w = scale = gtk_vscale_new_with_range (options.scale_data.min_value, + options.scale_data.max_value, + options.scale_data.step); + gtk_range_set_inverted (GTK_RANGE (w), !options.scale_data.invert); + } + else + { + w = scale = gtk_hscale_new_with_range (options.scale_data.min_value, + options.scale_data.max_value, + options.scale_data.step); + gtk_range_set_inverted (GTK_RANGE (w), options.scale_data.invert); + } gtk_range_set_value (GTK_RANGE (w), options.scale_data.value); if (options.scale_data.print_partial)
View file
yad-0.9.1.tar.bz2/src/text.c -> yad-0.10.0.tar.bz2/src/text.c
Changed
@@ -15,7 +15,7 @@ * along with YAD; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * Copyright (C) 2008-2010, Victor Ananjevsky <ananasik@gmail.com> + * Copyright (C) 2008-2011, Victor Ananjevsky <ananasik@gmail.com> * */ @@ -28,6 +28,8 @@ static GtkWidget *text_view; static GtkTextBuffer *text_buffer; +static GtkTextTag *tag; +static GdkCursor *hand, *normal; static gboolean key_press_cb (GtkWidget *w, GdkEventKey *key, gpointer data) @@ -39,12 +41,125 @@ if ((key->keyval == GDK_Return || key->keyval == GDK_KP_Enter) && (key->state & GDK_CONTROL_MASK)) #endif - gtk_dialog_response (GTK_DIALOG (data), YAD_RESPONSE_OK); + gtk_dialog_response (GTK_DIALOG (data), YAD_RESPONSE_OK); return FALSE; } static gboolean +tag_event_cb (GtkTextTag *tag, GObject *obj, GdkEvent *ev, + GtkTextIter *iter, gpointer d) +{ + GtkTextIter start = *iter; + GtkTextIter end = *iter; + gchar *url, *cmdline; + + if (ev->type == GDK_BUTTON_PRESS) + { + GdkEventButton *bev = (GdkEventButton *) ev; + + if (bev->button == 1) + { + gtk_text_iter_backward_to_tag_toggle (&start, tag); + gtk_text_iter_forward_to_tag_toggle (&end, tag); + + url = gtk_text_iter_get_text (&start, &end); + cmdline = g_strdup_printf ("xdg-open '%s'", url); + g_free (url); + + g_spawn_command_line_async (cmdline, NULL); + + g_free (cmdline); + return TRUE; + } + } + + return FALSE; +} + +static gboolean hovering_over_link = FALSE; + +static gboolean +motion_cb (GtkWidget *w, GdkEventMotion *ev, gpointer d) +{ + gint x, y; + GSList *tags = NULL, *tagp = NULL; + GtkTextIter iter; + gboolean hovering = FALSE; + + gtk_text_view_window_to_buffer_coords (GTK_TEXT_VIEW (w), GTK_TEXT_WINDOW_WIDGET, + ev->x, ev->y, &x, &y); + + gtk_text_view_get_iter_at_location (GTK_TEXT_VIEW (w), &iter, x, y); + + tags = gtk_text_iter_get_tags (&iter); + for (tagp = tags; tagp != NULL; tagp = tagp->next) + { + GtkTextTag *tag = tagp->data; + gint link = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (tag), "is_link")); + + if (link) + { + hovering = TRUE; + break; + } + } + + if (hovering != hovering_over_link) + { + hovering_over_link = hovering; + + if (hovering_over_link) + gdk_window_set_cursor (gtk_text_view_get_window (GTK_TEXT_VIEW (w), GTK_TEXT_WINDOW_TEXT), hand); + else + gdk_window_set_cursor (gtk_text_view_get_window (GTK_TEXT_VIEW (w), GTK_TEXT_WINDOW_TEXT), normal); + } + + if (tags) + g_slist_free (tags); + + gdk_window_get_pointer (gtk_widget_get_window (w), NULL, NULL, NULL); + + return FALSE; +} + +static void +linkify_cb (GtkTextBuffer *buf, GRegex *regex) +{ + gchar *text; + GtkTextIter start, end; + GMatchInfo *match; + + gtk_text_buffer_get_bounds (buf, &start, &end); + text = gtk_text_buffer_get_text (buf, &start, &end, FALSE); + + gtk_text_buffer_remove_all_tags (buf, &start, &end); + + if (g_regex_match (regex, text, G_REGEX_MATCH_NOTEMPTY, &match)) + { + do + { + gint sp, ep, spos, epos; + + g_match_info_fetch_pos (match, 0, &sp, &ep); + + /* positions are in bytes, not character, so here we must normalize it*/ + spos = g_utf8_pointer_to_offset (text, text + sp); + epos = g_utf8_pointer_to_offset (text, text + ep); + + gtk_text_buffer_get_iter_at_offset (buf, &start, spos); + gtk_text_buffer_get_iter_at_offset (buf, &end, epos); + + gtk_text_buffer_apply_tag (buf, tag, &start, &end); + } + while (g_match_info_next (match, NULL)); + } + g_match_info_free (match); + + g_free(text); +} + +static gboolean handle_stdin (GIOChannel * channel, GIOCondition condition, gpointer data) { @@ -70,9 +185,9 @@ { if (err) { - g_printerr ("yad_text_handle_stdin(): %s", err->message); + g_printerr ("yad_text_handle_stdin(): %s\n", err->message); g_error_free (err); - err = NULL; + err = NULL; } return FALSE; } @@ -156,7 +271,7 @@ if (remaining) { g_printerr (_("Invalid UTF-8 data encountered reading file %s\n"), - options.common_data.uri); + options.common_data.uri); return; } @@ -194,9 +309,9 @@ GtkWidget *w; w = gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (w), GTK_SHADOW_ETCHED_IN); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (w), - GTK_POLICY_AUTOMATIC, - GTK_POLICY_AUTOMATIC); + GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); text_view = gtk_text_view_new (); text_buffer = gtk_text_buffer_new (NULL); @@ -227,10 +342,10 @@ gtk_widget_modify_base (text_view, GTK_STATE_NORMAL, &clr); } - if (options.text_data.font) + if (options.common_data.font) { PangoFontDescription *fd = - pango_font_description_from_string (options.text_data.font); + pango_font_description_from_string (options.common_data.font); gtk_widget_modify_font (text_view, fd); pango_font_description_free (fd); } @@ -239,6 +354,33 @@ g_signal_connect (text_view, "key-press-event", G_CALLBACK (key_press_cb), dlg); + /* Initialize linkifying */ + if (options.text_data.uri) + { + GRegex *regex; +
View file
yad-0.9.1.tar.bz2/src/util.c -> yad-0.10.0.tar.bz2/src/util.c
Changed
@@ -15,7 +15,7 @@ * along with YAD; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * Copyright (C) 2008-2010, Victor Ananjevsky <ananasik@gmail.com> + * Copyright (C) 2008-2011, Victor Ananjevsky <ananasik@gmail.com> * */ @@ -149,7 +149,7 @@ pb = gdk_pixbuf_new_from_file (name, &err); if (!pb) { - g_printerr ("yad_get_pixbuf(): %s", err->message); + g_printerr ("yad_get_pixbuf(): %s\n", err->message); g_error_free (err); } } @@ -204,14 +204,17 @@ return res; } -gchar * -escape_markup (gchar *str) +char * +escape_markup (char *str) { - gchar *res, *buf = str; - guint i = 0, len; + char *res, *buf = str; + unsigned i = 0, len; + if (!str) + return NULL; + len = strlen (str); - res = malloc (len); + res = (char *) calloc (len + 1, sizeof (char)); while (*buf) { @@ -219,31 +222,31 @@ { case '&': len += 4; - res = realloc (res, len); + res = (char *) realloc (res, len + 1); strcpy (res + i, "&"); i += 5; break; case '<': len += 3; - res = realloc (res, len); + res = (char *) realloc (res, len + 1); strcpy (res + i, "<"); i += 4; break; case '>': len += 3; - res = realloc (res, len); + res = (char *) realloc (res, len + 1); strcpy (res + i, ">"); i += 4; break; case '"': len += 5; - res = realloc (res, len); + res = (char *) realloc (res, len + 1); strcpy (res + i, """); i += 6; break; case '\'': len += 5; - res = realloc (res, len); + res = (char *) realloc (res, len + 1); strcpy (res + i, "'"); i += 6; break; @@ -265,6 +268,9 @@ gchar *res, *buf = str; guint i = 0; + if (!str) + return NULL; + res = g_new0 (gchar, strlen (str)); while (*buf)
View file
yad-0.9.1.tar.bz2/src/yad.h -> yad-0.10.0.tar.bz2/src/yad.h
Changed
@@ -34,6 +34,8 @@ #define YAD_RESPONSE_TIMEOUT 70 #define YAD_RESPONSE_ESC -4 /* 252 */ +#define YAD_URL_REGEX "(http|https|ftp)://a-zA-Z0-9./_%#&-+" + typedef enum { YAD_MODE_MESSAGE, YAD_MODE_CALENDAR, @@ -41,6 +43,7 @@ YAD_MODE_DND, YAD_MODE_ENTRY, YAD_MODE_FILE, + YAD_MODE_FONT, YAD_MODE_FORM, YAD_MODE_ICONS, YAD_MODE_LIST, @@ -68,9 +71,13 @@ typedef enum { YAD_COLUMN_TEXT = 0, YAD_COLUMN_NUM, + YAD_COLUMN_FLOAT, YAD_COLUMN_CHECK, YAD_COLUMN_IMAGE, YAD_COLUMN_TOOLTIP, + YAD_COLUMN_ATTR_FORE, + YAD_COLUMN_ATTR_BACK, + YAD_COLUMN_ATTR_FONT, } YadColumnType; typedef enum { @@ -140,6 +147,7 @@ gchar *entry_label; gboolean hide_text; gboolean completion; + gboolean numeric; } YadEntryData; typedef struct { @@ -151,6 +159,10 @@ } YadFileData; typedef struct { + gchar *preview; +} YadFontData; + +typedef struct { GSList *fields; gdouble align; } YadFormData; @@ -171,9 +183,10 @@ gboolean no_headers; gboolean checkbox; gboolean print_all; - gint print_column; - gint hide_column; - gint expand_column; + guint print_column; + guint hide_column; + guint expand_column; + guint limit; } YadListData; typedef struct { @@ -197,20 +210,23 @@ gboolean print_partial; gboolean hide_value; gboolean have_value; + gboolean vertical; + gboolean invert; } YadScaleData; typedef struct { gchar *fore; gchar *back; - gchar *font; gboolean wrap; GtkJustification justify; gint margins; gboolean tail; + gboolean uri; } YadTextData; typedef struct { gchar *uri; + gchar *font; gchar *separator; gchar *item_separator; gboolean editable; @@ -228,6 +244,7 @@ YadColorData color_data; YadEntryData entry_data; YadFileData file_data; + YadFontData font_data; YadFormData form_data; YadIconsData icons_data; YadListData list_data; @@ -237,6 +254,8 @@ YadTextData text_data; gchar **extra_data; + + gboolean kill_parent; } YadOptions; extern YadOptions options; @@ -271,6 +290,7 @@ GtkWidget * color_create_widget (GtkWidget *dlg); GtkWidget * entry_create_widget (GtkWidget *dlg); GtkWidget * file_create_widget (GtkWidget *dlg); +GtkWidget * font_create_widget (GtkWidget *dlg); GtkWidget * form_create_widget (GtkWidget *dlg); GtkWidget * icons_create_widget (GtkWidget *dlg); GtkWidget * list_create_widget (GtkWidget *dlg); @@ -284,6 +304,7 @@ void color_print_result (void); void entry_print_result (void); void file_print_result (void); +void font_print_result (void); void form_print_result (void); void list_print_result (void); void progress_print_result (void);
View file
yad-0.9.1.tar.bz2/src/fileselection.c
Deleted
@@ -1,181 +0,0 @@ -/* - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * Copyright (C) 2008-2010, Victor Ananjevsky <ananasik@gmail.com> - * - */ - -#include "yad.h" - -static GtkWidget *filechooser; - -static void -file_activated_cb (GtkFileChooser *chooser, gpointer *data) -{ - gtk_dialog_response (GTK_DIALOG (data), YAD_RESPONSE_OK); -} - -void -confirm_overwrite_cb (GtkDialog *dlg, gint id, gpointer data) -{ - 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)); - - if (g_file_test (filename, G_FILE_TEST_EXISTS)) - { - GtkWidget *d; - gint r; - gchar *buf; - - buf = g_strcompress (options.file_data.confirm_text); - d = gtk_message_dialog_new (GTK_WINDOW (dlg), GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, - "%s", buf); - g_free (buf); - r = gtk_dialog_run (GTK_DIALOG (d)); - gtk_widget_destroy (d); - if (r != GTK_RESPONSE_YES) - g_signal_stop_emission_by_name (dlg, "response"); - } - } -} - -GtkWidget * -file_create_widget (GtkWidget *dlg) -{ - GtkWidget *w; - gchar *dir, *basename; - GtkFileChooserAction action = GTK_FILE_CHOOSER_ACTION_OPEN; - - if (options.file_data.directory) - { - if (options.file_data.save) - action = GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER; - else - action = GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER; - } - else - { - if (options.file_data.save) - action = GTK_FILE_CHOOSER_ACTION_SAVE; - } - - w = filechooser = gtk_file_chooser_widget_new (action); - - if (options.common_data.uri) - { - dir = g_path_get_dirname (options.common_data.uri); - - if (g_path_is_absolute (options.common_data.uri) == TRUE) - gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (w), dir); - - if (options.common_data.uristrlen (options.common_data.uri) - 1 != '/') - { - basename = g_path_get_basename (options.common_data.uri); - if (options.file_data.save) - gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (w), - basename); - else - gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (w), - options.common_data.uri); - g_free (basename); - } - g_free (dir); - } - - if (options.common_data.multi) - gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (w), TRUE); - - if (options.file_data.filter) - { - /* Filter format: Executables | *.exe *.bat *.com */ - gint filter_i; - - for (filter_i = 0; options.file_data.filterfilter_i; filter_i++) - { - GtkFileFilter *filter = gtk_file_filter_new (); - gchar *filter_str = options.file_data.filterfilter_i; - gchar **pattern, **patterns; - gchar *name = NULL; - gint i; - - /* Set name */ - for (i = 0; filter_stri != '\0'; i++) - { - if (filter_stri == '|') - break; - } - - if (filter_stri == '|') - name = g_strstrip (g_strndup (filter_str, i)); - - if (name) - { - gtk_file_filter_set_name (filter, name); - - /* Point i to the right position for split */ - for (++i; filter_stri == ' '; i++); - } - else - { - gtk_file_filter_set_name (filter, filter_str); - i = 0; - } - - /* Get patterns */ - patterns = g_strsplit_set (filter_str + i, " ", -1); - - for (pattern = patterns; *pattern; pattern++) - gtk_file_filter_add_pattern (filter, *pattern); - - g_free (name); - g_strfreev (patterns); - - gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (w), filter); - } - } - - g_signal_connect (w, "file-activated", - G_CALLBACK (file_activated_cb), dlg); - - return w; -} - -void -file_print_result (void) -{ - GSList *selections, *iter; - - selections = gtk_file_chooser_get_filenames (GTK_FILE_CHOOSER (filechooser)); - for (iter = selections; iter != NULL; iter = iter->next) - { - g_print ("%s", - g_filename_to_utf8 ((gchar *) iter->data, -1, NULL, NULL, - NULL)); - g_free (iter->data); - if (iter->next != NULL) - g_print ("%s", options.common_data.separator); - } - g_print ("\n"); - g_slist_free (selections); -}
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.