From 00a25becd355a04b2eca526e0e4b1fb009f97562 Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Mon, 3 Feb 2020 17:52:33 +0800 Subject: [PATCH] Update files for 1.5 release --- ChangeLog | 4 ++++ Makefile.am | 2 -- NEWS | 21 +++++++++++++++++-- configure.ac | 2 +- po/pt_BR.po | 54 +++++++++++++++++++++++------------------------ po/ru.po | 54 +++++++++++++++++++++++------------------------ po/xcowsay.pot | 56 ++++++++++++++++++++++++------------------------- src/bubblegen.c | 4 ---- test.sh | 13 ++++++++++++ xcowsay.6 | 5 ----- 10 files changed, 119 insertions(+), 96 deletions(-) diff --git a/ChangeLog b/ChangeLog index cbd9157..a3de896 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2020-02-03 Nick Gasson + + * src/xcowsay.6: Remove the note about the lack of anti-aliasing. + 2020-02-02 Nick Gasson * src/floating_shape.c (make_shape_from_pixbuf): Update to Gtk3. diff --git a/Makefile.am b/Makefile.am index 7444d5a..33b5910 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,8 +6,6 @@ man_MANS = xcowsay.6 ACLOCAL_AMFLAGS = -I m4 -TESTS = test.sh - TESTS_ENVIRONMENT = \ BUILD_DIR=$(top_builddir) \ SRC_DIR=$(top_srcdir) diff --git a/NEWS b/NEWS index c2afb2f..f0bf004 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,22 @@ - Changes since 1.0 - ================= +Changes in 1.5 +===================== + +- Updated from Gtk2/GDK to Gtk3/Cairo. Note that because of the removal + of the `gtk_widget_shape_combine_mask' API that xcowsay used for + transparency, we now rely on the alpha channel of the window and a + compositing window manager for this. + +- As a side effect of this, the bubble is now anti-aliased, fixing a + long-standing issue. + +- Unfortunately running xcowsay without a compositor is no longer + supported. If this affects you please continue to use 1.4 as there are + no functional changes in 1.5. + +- The cow position is more random (thanks to Tony Finch). + +Changes in 1.0 to 1.4 +===================== - Added a new option --dream which displays an image instead of text. diff --git a/configure.ac b/configure.ac index c11d0c4..c765ec5 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([xcowsay], [1.4], +AC_INIT([xcowsay], [1.5], [Nick Gasson ], [xcowsay]) AC_PREREQ([2.63]) diff --git a/po/pt_BR.po b/po/pt_BR.po index 42fa1a8..6b998ff 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: pt_BR\n" "Report-Msgid-Bugs-To: nick@cakesniffer.co.uk\n" -"POT-Creation-Date: 2016-09-08 21:31+0100\n" +"POT-Creation-Date: 2020-02-03 17:52+0800\n" "PO-Revision-Date: 2010-11-06 16:39-0200\n" "Last-Translator: Phantom X \n" "Language-Team: Português do Brasil \n" @@ -24,91 +24,91 @@ msgstr "" msgid "Failed to load cow image: %s\n" msgstr "Falha ao carregar imagem da vaca: %s\n" -#: src/xcowsay.c:124 +#: src/xcowsay.c:125 msgid "Usage" msgstr "Uso" -#: src/xcowsay.c:125 +#: src/xcowsay.c:126 msgid "Display a cow on your desktop with MESSAGE or standard input." msgstr "Exibir uma vaca no seu desktop com MENSAGEM ou entrada padrão." -#: src/xcowsay.c:126 +#: src/xcowsay.c:127 msgid "Options" msgstr "Opções" -#: src/xcowsay.c:127 +#: src/xcowsay.c:128 msgid "Display this message and exit." msgstr "Exibe esta mensagem e sair." -#: src/xcowsay.c:128 +#: src/xcowsay.c:129 msgid "Print version information." msgstr "Imprime na tela informação sobre versão." -#: src/xcowsay.c:129 +#: src/xcowsay.c:130 msgid "Number of seconds to display message for" msgstr "Número de segundos para exibir mensagem" -#: src/xcowsay.c:130 +#: src/xcowsay.c:131 msgid "Number of milliseconds to delay per word." msgstr "Número de milisegundos de atraso por palavra." -#: src/xcowsay.c:131 +#: src/xcowsay.c:132 msgid "Set message font (Pango format)." msgstr "Configura fonte da mensagem (formato Pango)." -#: src/xcowsay.c:132 +#: src/xcowsay.c:133 msgid "Display an image instead of text." msgstr "Exibe uma imagem em vez de texto." -#: src/xcowsay.c:133 +#: src/xcowsay.c:134 msgid "Make the bubble appear to the left of cow." msgstr "Faz a bolha aparecer à esquerda da vaca." -#: src/xcowsay.c:134 +#: src/xcowsay.c:135 msgid "Display a thought bubble rather than a speech bubble." msgstr "Exibe um balão de pensamento em vez de um balão de fala." -#: src/xcowsay.c:135 +#: src/xcowsay.c:136 msgid "Run xcowsay in daemon mode." msgstr "Executa xcowsay no modo daemon." -#: src/xcowsay.c:136 +#: src/xcowsay.c:137 msgid "Size of the cow (small, med, large)." msgstr "Tamanho da vaca (small, med, large)." -#: src/xcowsay.c:137 +#: src/xcowsay.c:138 msgid "Use a different image instead of the cow." msgstr "Usr uma imagem diferente em vez da vaca." -#: src/xcowsay.c:138 +#: src/xcowsay.c:139 msgid "Display cow on monitor N." msgstr "Exibe vaca no monitor N." -#: src/xcowsay.c:139 +#: src/xcowsay.c:140 msgid "Force the cow to appear at screen location (X,Y)." msgstr "Força a vaca a aparecer no local da tela (X,Y)." -#: src/xcowsay.c:140 +#: src/xcowsay.c:141 msgid "Change relative position of bubble." msgstr "Modifica a posição relativa da bolha." -#: src/xcowsay.c:141 +#: src/xcowsay.c:142 msgid "Disable wrapping if text cannot fit on screen." msgstr "Desabilita quebra se o texto não couber na tela." -#: src/xcowsay.c:142 +#: src/xcowsay.c:143 msgid "Specify alternative config file." msgstr "Especifica arquivo de configuração alternativo." -#: src/xcowsay.c:143 +#: src/xcowsay.c:144 msgid "Keep daemon attached to terminal." msgstr "Mantém o daemon anexado ao terminal." -#: src/xcowsay.c:144 +#: src/xcowsay.c:145 msgid "Close window on release event instead of press." msgstr "" -#: src/xcowsay.c:145 +#: src/xcowsay.c:146 msgid "" "Default values for these options can be specified in the xcowsay config\n" "file. See the man page for more information." @@ -116,7 +116,7 @@ msgstr "" "Valores padrão para estas opções podem ser especificados no arquivo\n" "de configuração. Veja a página de manual para mais informação." -#: src/xcowsay.c:147 +#: src/xcowsay.c:148 msgid "" "If the display_time option is not set the display time will be calcuated\n" "from the reading_speed parameter multiplied by the word count. Set the\n" @@ -126,16 +126,16 @@ msgstr "" "calculado do parâmetro reading_speed multiplicado pelo número de palavras. \n" "Configure para zero para exibir a vaca até que ela seja clicada." -#: src/xcowsay.c:151 +#: src/xcowsay.c:152 msgid "Report bugs to nick@nickg.me.uk" msgstr "Reporte bugs para nick@nickg.me.uk" -#: src/xcowsay.c:176 +#: src/xcowsay.c:177 #, c-format msgid "Error: %s is not a valid integer\n" msgstr "Erro: %s não é um inteiro válido\n" -#: src/xcowsay.c:183 +#: src/xcowsay.c:184 #, c-format msgid "Error: failed to parse '%s' as position\n" msgstr "Erro: falha ao analisar '%s' como posição\n" diff --git a/po/ru.po b/po/ru.po index e6e7231..45a6053 100644 --- a/po/ru.po +++ b/po/ru.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ru\n" "Report-Msgid-Bugs-To: nick@cakesniffer.co.uk\n" -"POT-Creation-Date: 2016-09-08 21:31+0100\n" +"POT-Creation-Date: 2020-02-03 17:52+0800\n" "PO-Revision-Date: 2010-02-03 10:25+0500\n" "Last-Translator: \n" "Language-Team: Russian\n" @@ -23,91 +23,91 @@ msgstr "" msgid "Failed to load cow image: %s\n" msgstr "Ошибка при загрузке изображения: %s\n" -#: src/xcowsay.c:124 +#: src/xcowsay.c:125 msgid "Usage" msgstr "Использование:" -#: src/xcowsay.c:125 +#: src/xcowsay.c:126 msgid "Display a cow on your desktop with MESSAGE or standard input." msgstr "Отображает на рабочем столе корову, 'произносящую' СООБЩЕНИЕ." -#: src/xcowsay.c:126 +#: src/xcowsay.c:127 msgid "Options" msgstr "Параметры" -#: src/xcowsay.c:127 +#: src/xcowsay.c:128 msgid "Display this message and exit." msgstr "Вывод этого сообщения." -#: src/xcowsay.c:128 +#: src/xcowsay.c:129 msgid "Print version information." msgstr "Вывод номера версии." -#: src/xcowsay.c:129 +#: src/xcowsay.c:130 msgid "Number of seconds to display message for" msgstr "Продолжительность отображения сообщения в секундах" -#: src/xcowsay.c:130 +#: src/xcowsay.c:131 msgid "Number of milliseconds to delay per word." msgstr "Задержка между словами в миллисекундах." -#: src/xcowsay.c:131 +#: src/xcowsay.c:132 msgid "Set message font (Pango format)." msgstr "Установить шрифт (формат Pango)." -#: src/xcowsay.c:132 +#: src/xcowsay.c:133 msgid "Display an image instead of text." msgstr "Отобразить изображение вместо текста." -#: src/xcowsay.c:133 +#: src/xcowsay.c:134 msgid "Make the bubble appear to the left of cow." msgstr "" -#: src/xcowsay.c:134 +#: src/xcowsay.c:135 msgid "Display a thought bubble rather than a speech bubble." msgstr "Отобразить мысленный пузырь вместо словесного." -#: src/xcowsay.c:135 +#: src/xcowsay.c:136 msgid "Run xcowsay in daemon mode." msgstr "Запустить xcowsay в режиме демона." -#: src/xcowsay.c:136 +#: src/xcowsay.c:137 msgid "Size of the cow (small, med, large)." msgstr "Размер коровы (small, med, large)." -#: src/xcowsay.c:137 +#: src/xcowsay.c:138 msgid "Use a different image instead of the cow." msgstr "Использовать другое изображение вместо коровы." -#: src/xcowsay.c:138 +#: src/xcowsay.c:139 msgid "Display cow on monitor N." msgstr "Отобразить корову на мониторе N." -#: src/xcowsay.c:139 +#: src/xcowsay.c:140 msgid "Force the cow to appear at screen location (X,Y)." msgstr "Указать координаты (X,Y) места обображения коровы." -#: src/xcowsay.c:140 +#: src/xcowsay.c:141 msgid "Change relative position of bubble." msgstr "Изменить относительное положение пузыря." -#: src/xcowsay.c:141 +#: src/xcowsay.c:142 msgid "Disable wrapping if text cannot fit on screen." msgstr "" -#: src/xcowsay.c:142 +#: src/xcowsay.c:143 msgid "Specify alternative config file." msgstr "Укзать альтернативный файл конфигурации." -#: src/xcowsay.c:143 +#: src/xcowsay.c:144 msgid "Keep daemon attached to terminal." msgstr "Прикрепить демон к терминалу." -#: src/xcowsay.c:144 +#: src/xcowsay.c:145 msgid "Close window on release event instead of press." msgstr "" -#: src/xcowsay.c:145 +#: src/xcowsay.c:146 msgid "" "Default values for these options can be specified in the xcowsay config\n" "file. See the man page for more information." @@ -115,7 +115,7 @@ msgstr "" "Настройки по-умолчанию можно указать в файле конфигурации.\n" "Подробности в странице руководства xcowsay (man xcowsay)." -#: src/xcowsay.c:147 +#: src/xcowsay.c:148 msgid "" "If the display_time option is not set the display time will be calcuated\n" "from the reading_speed parameter multiplied by the word count. Set the\n" @@ -125,16 +125,16 @@ msgstr "" "как reading_speed умноженный на количество слов. При установке параметра\n" "display_time в ноль, корова отображается до первого щелчка мыши по ней." -#: src/xcowsay.c:151 +#: src/xcowsay.c:152 msgid "Report bugs to nick@nickg.me.uk" msgstr "Об ошибках пишите на nick@nickg.me.uk" -#: src/xcowsay.c:176 +#: src/xcowsay.c:177 #, c-format msgid "Error: %s is not a valid integer\n" msgstr "Ошибка: %s не является корректным целым числом\n" -#: src/xcowsay.c:183 +#: src/xcowsay.c:184 #, c-format msgid "Error: failed to parse '%s' as position\n" msgstr "Ошибка: '%s' не является корректным значением координат\n" diff --git a/po/xcowsay.pot b/po/xcowsay.pot index 50083a9..25bbffd 100644 --- a/po/xcowsay.pot +++ b/po/xcowsay.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: xcowsay 1.4\n" +"Project-Id-Version: xcowsay 1.5\n" "Report-Msgid-Bugs-To: nick@cakesniffer.co.uk\n" -"POT-Creation-Date: 2016-09-08 21:31+0100\n" +"POT-Creation-Date: 2020-02-03 17:52+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -22,113 +22,113 @@ msgstr "" msgid "Failed to load cow image: %s\n" msgstr "" -#: src/xcowsay.c:124 +#: src/xcowsay.c:125 msgid "Usage" msgstr "" -#: src/xcowsay.c:125 +#: src/xcowsay.c:126 msgid "Display a cow on your desktop with MESSAGE or standard input." msgstr "" -#: src/xcowsay.c:126 +#: src/xcowsay.c:127 msgid "Options" msgstr "" -#: src/xcowsay.c:127 +#: src/xcowsay.c:128 msgid "Display this message and exit." msgstr "" -#: src/xcowsay.c:128 +#: src/xcowsay.c:129 msgid "Print version information." msgstr "" -#: src/xcowsay.c:129 +#: src/xcowsay.c:130 msgid "Number of seconds to display message for" msgstr "" -#: src/xcowsay.c:130 +#: src/xcowsay.c:131 msgid "Number of milliseconds to delay per word." msgstr "" -#: src/xcowsay.c:131 +#: src/xcowsay.c:132 msgid "Set message font (Pango format)." msgstr "" -#: src/xcowsay.c:132 +#: src/xcowsay.c:133 msgid "Display an image instead of text." msgstr "" -#: src/xcowsay.c:133 +#: src/xcowsay.c:134 msgid "Make the bubble appear to the left of cow." msgstr "" -#: src/xcowsay.c:134 +#: src/xcowsay.c:135 msgid "Display a thought bubble rather than a speech bubble." msgstr "" -#: src/xcowsay.c:135 +#: src/xcowsay.c:136 msgid "Run xcowsay in daemon mode." msgstr "" -#: src/xcowsay.c:136 +#: src/xcowsay.c:137 msgid "Size of the cow (small, med, large)." msgstr "" -#: src/xcowsay.c:137 +#: src/xcowsay.c:138 msgid "Use a different image instead of the cow." msgstr "" -#: src/xcowsay.c:138 +#: src/xcowsay.c:139 msgid "Display cow on monitor N." msgstr "" -#: src/xcowsay.c:139 +#: src/xcowsay.c:140 msgid "Force the cow to appear at screen location (X,Y)." msgstr "" -#: src/xcowsay.c:140 +#: src/xcowsay.c:141 msgid "Change relative position of bubble." msgstr "" -#: src/xcowsay.c:141 +#: src/xcowsay.c:142 msgid "Disable wrapping if text cannot fit on screen." msgstr "" -#: src/xcowsay.c:142 +#: src/xcowsay.c:143 msgid "Specify alternative config file." msgstr "" -#: src/xcowsay.c:143 +#: src/xcowsay.c:144 msgid "Keep daemon attached to terminal." msgstr "" -#: src/xcowsay.c:144 +#: src/xcowsay.c:145 msgid "Close window on release event instead of press." msgstr "" -#: src/xcowsay.c:145 +#: src/xcowsay.c:146 msgid "" "Default values for these options can be specified in the xcowsay config\n" "file. See the man page for more information." msgstr "" -#: src/xcowsay.c:147 +#: src/xcowsay.c:148 msgid "" "If the display_time option is not set the display time will be calcuated\n" "from the reading_speed parameter multiplied by the word count. Set the\n" "display time to zero to display the cow until it is clicked on." msgstr "" -#: src/xcowsay.c:151 +#: src/xcowsay.c:152 msgid "Report bugs to nick@nickg.me.uk" msgstr "" -#: src/xcowsay.c:176 +#: src/xcowsay.c:177 #, c-format msgid "Error: %s is not a valid integer\n" msgstr "" -#: src/xcowsay.c:183 +#: src/xcowsay.c:184 #, c-format msgid "Error: failed to parse '%s' as position\n" msgstr "" diff --git a/src/bubblegen.c b/src/bubblegen.c index 6d6228a..0145fab 100644 --- a/src/bubblegen.c +++ b/src/bubblegen.c @@ -310,10 +310,6 @@ static GdkPixbuf *bubble_tidy(bubble_t *b) GdkPixbuf *pixbuf = gdk_pixbuf_get_from_surface(b->surface, 0, 0, b->width + BUBBLE_BORDER, b->height + BUBBLE_BORDER); - // gdk_pixbuf_get_from_drawable(NULL, b->pixmap, NULL, - // 0, 0, 0, 0, - // b->width + BUBBLE_BORDER, - // b->height + BUBBLE_BORDER); cairo_surface_destroy(b->surface); return pixbuf; } diff --git a/test.sh b/test.sh index 12e47da..a458cdc 100755 --- a/test.sh +++ b/test.sh @@ -19,3 +19,16 @@ $BUILD_DIR/src/xcowsay --dream $SRC_DIR/cow_small.png -t 2 echo Unicode and Pango attributes $BUILD_DIR/src/xcowsay "你好 world" + +echo Daemon mode +$BUILD_DIR/src/xcowsay --daemon --debug & +pid=$! +echo "PID is $pid" +sleep 0.5 + +$BUILD_DIR/src/xcowsay Hello World -t 100 +echo "Sleep for one second" +sleep 1 + +kill $pid +wait diff --git a/xcowsay.6 b/xcowsay.6 index 6fbb825..8d801f5 100644 --- a/xcowsay.6 +++ b/xcowsay.6 @@ -186,8 +186,3 @@ Report all bugs to nick@nickg.me.uk The xcowsay home page is .SH "SEE ALSO" .BR cowsay (6) -.SH BUGS -The cow and speech bubble have jagged edges which would be improved by -anti-aliasing. Unfortunately this isn't possible without a compositing -window manager since X can only cut holes in windows using a binary -mask, so I wouldn't expect this any time soon. -- 2.39.2