1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-01 07:16:37 +02:00

Compare commits

...

20 Commits

Author SHA1 Message Date
Sébastien Helleu f4e075f213 Version 4.4.5-dev 2024-11-30 09:06:34 +01:00
Sébastien Helleu 89afeb5aa2 Version 4.4.4 2024-11-30 09:03:02 +01:00
Sébastien Helleu a4fd1df891 debian: update changelog 2024-11-30 08:52:21 +01:00
Sébastien Helleu bff4ab7808 ci: fix macOS CI
This is a workaround for https://github.com/actions/runner-images/issues/10984
2024-11-26 07:44:03 +01:00
Sébastien Helleu ef1b6a27f1 core: update ChangeLog (issue #2214, issue #2215) 2024-11-26 07:44:03 +01:00
Trygve Aaberge e6cdd40056 script: don't try to display the old line if it's NULL
This fixes a crash which would happen if you scrolled the script buffer
and then did a search which got fewer search results than the index of
the selected line before the search. E.g. press page down to go to the
second page and then search for `test`.
2024-11-26 07:44:03 +01:00
Sébastien Helleu e0b01d3628 perl: add midding #define of __USE_XOPEN to call wcwidth defined in wchar.h 2024-11-26 07:44:03 +01:00
Sébastien Helleu 3fce54e0ca core: update ChangeLog (issue #2213) 2024-11-25 21:28:48 +01:00
Trygve Aaberge fb7a84589d perl: only set Perl locale if the locale is broken
It turns out that Debian has reverted the commit in Perl that broke the
locale in their 5.38 branch, so it did not have the issue. However, the
workaround we added to fix the locale apparently makes the version
Debian/Ubuntu has crash on perl_destruct. I'm not sure why it makes it
crash, but since it doesn't crash on newer Perl versions, I'm assuming
that it's another bug with the locale handling in that Perl version.

To avoid the crash, make sure to only set the locale if we detect that
it has been broken by Perl. We do this by checking if the value returned
by wcwidth (160) (the first non-ascii printable character) has changed.
If this value is not the same after the call to perl_construct, the
locale has been broken.

I moved the call to Perl_setlocale to right after perl_construct, as the
call to perl_construct is what breaks the locale.
2024-11-25 21:27:42 +01:00
Sébastien Helleu c7017f2fce core: update ChangeLog (issue #2209) 2024-11-24 16:25:28 +01:00
Trygve Aaberge a8c1725566 Fix crash when unloading Perl scripts with Perl 5.38
Apparently the issue with the locale being reset with Perl 5.38 can
cause a crash when unloading the scripts on some systems (at least
Ubuntu 24.04). There was a workaround added in commit f4b9cad72, but it
doesn't work to avoid the crash. However if we set LC_ALL instead of
LC_CTYPE the crash doesn't occur.

Fixes #2187
2024-11-24 16:25:09 +01:00
Sébastien Helleu f8c7ed65e6 build: remove our own Ruby detection and rely on CMake detection, require CMake 3.18 (issue #1156)
This fixes the detection of Ruby on macOS 14.
2024-11-05 11:12:28 +01:00
Sébastien Helleu 712227da38 ci: switch from macOS 12 to 14 2024-11-05 10:19:23 +01:00
LuK1337 c079852deb tests: migrate away from removed ast features
See https://github.com/python/cpython/pull/119563.
2024-11-04 18:49:13 +01:00
Sébastien Helleu aab657bcfd core: remove use of arraylist in function gui_buffer_merge 2024-11-04 18:40:29 +01:00
Sébastien Helleu aa2153827e core: send signal "buffer_moved" only when the buffer number changes (issue #2097) 2024-11-04 18:40:27 +01:00
Sébastien Helleu f9660feb94 core: fix too many sorts of hotlist when buffers are moved (issue #2097)
A performance issue was happening when buffers are moved to another position
and when the hotlist contains a lot of buffers: each time a signal
"buffer_moved" is sent, the hotlist is sorted again.

This fix delays the resort of hotlist after all the moves are done using a
timer with a very small delay (one millisecond).
2024-11-03 23:42:23 +01:00
Sébastien Helleu 5ab0ff656f relay, xfer: fix letters with actions displayed on top of buffer
Since WeeChat 4.0.0, the actions are now case sensitive and must be typed as
lower case.

This fixes the help line displayed on top of relay and xfer buffers: letters
for actions are now displayed with lower case instead of upper case.
2024-10-31 20:38:39 +01:00
Sébastien Helleu 53aa046476 build: add a retry build mechanism on make in Debian packaging
When the environment variable `RETRY_BUILD` is set to `1`, the file
`debian/rules` is patched to run `dh_auto_build` multiple times, until the
build succeeds.

This is a workaround for an issue with the build in an arm64 chroot, where the
compiler randomly segfaults.
2024-10-30 14:10:51 +01:00
Sébastien Helleu c51be0a6a8 Version 4.4.4-dev 2024-10-30 12:44:58 +01:00
32 changed files with 428 additions and 329 deletions
+4 -2
View File
@@ -138,7 +138,7 @@ jobs:
strategy: strategy:
matrix: matrix:
os: os:
- macos-12 - macos-14
config: config:
- { name: "gcc", cc: "gcc", cxx: "g++" } - { name: "gcc", cc: "gcc", cxx: "g++" }
- { name: "clang", cc: "clang", cxx: "clang++" } - { name: "clang", cc: "clang", cxx: "clang++" }
@@ -168,7 +168,9 @@ jobs:
/usr/local/bin/python3.11 \ /usr/local/bin/python3.11 \
/usr/local/bin/python3.11-config \ /usr/local/bin/python3.11-config \
; ;
brew install asciidoctor cjson guile lua pkg-config ruby # workaround for https://github.com/actions/runner-images/issues/10984
brew uninstall --ignore-dependencies --force pkg-config@0.29.2
brew install asciidoctor aspell cjson guile lua ruby
- uses: actions/checkout@v2 - uses: actions/checkout@v2
+10
View File
@@ -1,5 +1,15 @@
# WeeChat ChangeLog # WeeChat ChangeLog
## Version 4.4.4 (2024-11-30)
### Fixed
- script: fix crash on /script buffer when a filter is set ([#2214](https://github.com/weechat/weechat/issues/2214), [#2215](https://github.com/weechat/weechat/issues/2215))
- core: fix too many sorts of hotlist when buffers are moved ([#2097](https://github.com/weechat/weechat/issues/2097))
- relay, xfer: fix letters with actions displayed on top of buffer
- build: fix detection of Ruby on macOS 14, require CMake ≥ 3.18 ([#1156](https://github.com/weechat/weechat/issues/1156))
- perl: fix crash when unloading Perl scripts with Perl 5.38 ([#2209](https://github.com/weechat/weechat/issues/2209), [#2213](https://github.com/weechat/weechat/issues/2213))
## Version 4.4.3 (2024-10-30) ## Version 4.4.3 (2024-10-30)
### Fixed ### Fixed
+1 -1
View File
@@ -19,7 +19,7 @@
# along with WeeChat. If not, see <https://www.gnu.org/licenses/>. # along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
# #
cmake_minimum_required(VERSION 3.5) cmake_minimum_required(VERSION 3.18)
project(weechat C) project(weechat C)
-45
View File
@@ -1,45 +0,0 @@
#
# Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
#
# This file is part of WeeChat, the extensible chat client.
#
# WeeChat 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.
#
# WeeChat 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 WeeChat. If not, see <https://www.gnu.org/licenses/>.
#
# - Find Ruby
# This module finds if Ruby is installed and determines where the include files
# and libraries are. It also determines what the name of the library is. This
# code sets the following variables:
#
# RUBY_INCLUDE_DIRS = C flags to compile with ruby
# RUBY_LIBRARY_DIRS = linker flags to compile with ruby (found with pkg-config)
# RUBY_LIB = ruby library (found without pkg-config)
if(RUBY_FOUND)
# Already in cache, be silent
set(RUBY_FIND_QUIETLY TRUE)
endif()
find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# set specific search path for macOS
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/opt/ruby/lib/pkgconfig")
endif()
pkg_search_module(RUBY ruby-3.3 ruby-3.2 ruby-3.1 ruby-3.0 ruby-2.7 ruby-2.6 ruby-2.5 ruby-2.4 ruby-2.3 ruby-2.2 ruby-2.1 ruby-2.0 ruby-1.9 ruby)
if(RUBY_FOUND AND ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# FIXME: weird hack: hardcoding the Ruby lib location on macOS
set(RUBY_LDFLAGS "${RUBY_LDFLAGS} -L/usr/local/opt/ruby/lib")
endif()
endif()
+9
View File
@@ -1,3 +1,12 @@
weechat (4.4.3-1) unstable; urgency=medium
* New upstream release
* Remove (fixed upstream) the fix for a possible privacy breach with html
documentation which includes stylesheets and fonts (font-awesome) hosted
on remote CDN (Cloudflare).
-- Emmanuel Bouthenot <kolter@debian.org> Wed, 06 Nov 2024 21:27:08 +0000
weechat (4.4.2-1) unstable; urgency=medium weechat (4.4.2-1) unstable; urgency=medium
* New upstream release * New upstream release
+14 -14
View File
@@ -21,8 +21,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2024-08-12 21:29+0200\n" "POT-Creation-Date: 2024-10-31 20:22+0100\n"
"PO-Revision-Date: 2024-08-12 21:35+0200\n" "PO-Revision-Date: 2024-10-31 20:24+0100\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n" "Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: cs\n" "Language: cs\n"
@@ -14016,17 +14016,17 @@ msgstr "%s%s: nedostatek paměti pro rozdělení zprávy"
msgid "Actions (letter+enter):" msgid "Actions (letter+enter):"
msgstr "Akce (písmeno+enter):" msgstr "Akce (písmeno+enter):"
msgid " [D] Disconnect" msgid " [d] Disconnect"
msgstr " [D] Odpojit" msgstr " [d] Odpojit"
msgid " [R] Remove" msgid " [r] Remove"
msgstr " [R] Odebrat" msgstr " [r] Odebrat"
msgid " [P] Purge finished" msgid " [p] Purge finished"
msgstr " [P] Pročistit ukončené" msgstr " [p] Pročistit ukončené"
msgid " [Q] Close this buffer" msgid " [q] Close this buffer"
msgstr " [Q] Zavřít tento buffer" msgstr " [q] Zavřít tento buffer"
#, fuzzy, c-format #, fuzzy, c-format
msgid "%s%s[%s%s%s%s] %s, received: %s, sent: %s" msgid "%s%s[%s%s%s%s] %s, received: %s, sent: %s"
@@ -16618,11 +16618,11 @@ msgid ""
"truncate content)" "truncate content)"
msgstr "" msgstr ""
msgid " [A] Accept" msgid " [a] Accept"
msgstr " [A] Akceptovat" msgstr " [a] Akceptovat"
msgid " [C] Cancel" msgid " [c] Cancel"
msgstr " [C] Storno" msgstr " [c] Storno"
msgid "xfer chat" msgid "xfer chat"
msgstr "xfer chat" msgstr "xfer chat"
+14 -14
View File
@@ -26,8 +26,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2024-08-12 21:29+0200\n" "POT-Creation-Date: 2024-10-31 20:22+0100\n"
"PO-Revision-Date: 2024-08-13 09:42+0200\n" "PO-Revision-Date: 2024-10-31 20:25+0100\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n" "Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <kde-i18n-de@kde.org>\n" "Language-Team: German <kde-i18n-de@kde.org>\n"
"Language: de_DE\n" "Language: de_DE\n"
@@ -15401,17 +15401,17 @@ msgstr "%s%s: Nicht genug Speicher vorhanden um Nachricht zu parsen"
msgid "Actions (letter+enter):" msgid "Actions (letter+enter):"
msgstr "Aktion (Zeichen+Enter):" msgstr "Aktion (Zeichen+Enter):"
msgid " [D] Disconnect" msgid " [d] Disconnect"
msgstr " [D] Verbindung trennen" msgstr " [d] Verbindung trennen"
msgid " [R] Remove" msgid " [r] Remove"
msgstr " [R] Entfernen" msgstr " [r] Entfernen"
msgid " [P] Purge finished" msgid " [p] Purge finished"
msgstr " [P] beendete Aufträge aufräumen" msgstr " [p] beendete Aufträge aufräumen"
msgid " [Q] Close this buffer" msgid " [q] Close this buffer"
msgstr " [Q] diesen Buffer schließen" msgstr " [q] diesen Buffer schließen"
#, c-format #, c-format
msgid "%s%s[%s%s%s%s] %s, received: %s, sent: %s" msgid "%s%s[%s%s%s%s] %s, received: %s, sent: %s"
@@ -18217,11 +18217,11 @@ msgstr ""
"maximale Anzahl von Zeichen, die im Bar-Item \"typing\" angezeigt werden (0 " "maximale Anzahl von Zeichen, die im Bar-Item \"typing\" angezeigt werden (0 "
"= Inhalt nicht abschneiden)" "= Inhalt nicht abschneiden)"
msgid " [A] Accept" msgid " [a] Accept"
msgstr " [A] annehmen" msgstr " [a] annehmen"
msgid " [C] Cancel" msgid " [c] Cancel"
msgstr " [C] abbrechen" msgstr " [c] abbrechen"
msgid "xfer chat" msgid "xfer chat"
msgstr "Transfer (xfer) Chat" msgstr "Transfer (xfer) Chat"
+14 -14
View File
@@ -22,8 +22,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2024-08-12 21:29+0200\n" "POT-Creation-Date: 2024-10-31 20:22+0100\n"
"PO-Revision-Date: 2024-06-11 07:49+0200\n" "PO-Revision-Date: 2024-10-31 20:30+0100\n"
"Last-Translator: Santiago Forero <santiago@forero.xyz>\n" "Last-Translator: Santiago Forero <santiago@forero.xyz>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: es\n" "Language: es\n"
@@ -14356,17 +14356,17 @@ msgstr "%s%s: memoria insuficiente para analizar el mensaje"
msgid "Actions (letter+enter):" msgid "Actions (letter+enter):"
msgstr "Acciones (letra+enter):" msgstr "Acciones (letra+enter):"
msgid " [D] Disconnect" msgid " [d] Disconnect"
msgstr " [D] Desconectar" msgstr " [d] Desconectar"
msgid " [R] Remove" msgid " [r] Remove"
msgstr " [R] Eliminar" msgstr " [r] Eliminar"
msgid " [P] Purge finished" msgid " [p] Purge finished"
msgstr " [P] Purgar terminados" msgstr " [p] Purgar terminados"
msgid " [Q] Close this buffer" msgid " [q] Close this buffer"
msgstr " [Q] Cerrar este buffer" msgstr " [q] Cerrar este buffer"
#, c-format #, c-format
msgid "%s%s[%s%s%s%s] %s, received: %s, sent: %s" msgid "%s%s[%s%s%s%s] %s, received: %s, sent: %s"
@@ -16931,11 +16931,11 @@ msgid ""
"truncate content)" "truncate content)"
msgstr "" msgstr ""
msgid " [A] Accept" msgid " [a] Accept"
msgstr " [A] Aceptar" msgstr " [a] Aceptar"
msgid " [C] Cancel" msgid " [c] Cancel"
msgstr " [C] Cancelar" msgstr " [c] Cancelar"
msgid "xfer chat" msgid "xfer chat"
msgstr "conversación de transferencia" msgstr "conversación de transferencia"
+14 -14
View File
@@ -21,8 +21,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2024-08-24 11:22+0200\n" "POT-Creation-Date: 2024-10-31 20:22+0100\n"
"PO-Revision-Date: 2024-09-02 18:47+0200\n" "PO-Revision-Date: 2024-10-31 20:31+0100\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n" "Language: fr\n"
@@ -15091,17 +15091,17 @@ msgstr "%s%s : pas assez de mémoire pour analyser le message"
msgid "Actions (letter+enter):" msgid "Actions (letter+enter):"
msgstr "Actions (lettre+entrée) :" msgstr "Actions (lettre+entrée) :"
msgid " [D] Disconnect" msgid " [d] Disconnect"
msgstr " [D] Déconnecter" msgstr " [d] Déconnecter"
msgid " [R] Remove" msgid " [r] Remove"
msgstr " [R] Retirer" msgstr " [r] Retirer"
msgid " [P] Purge finished" msgid " [p] Purge finished"
msgstr " [P] Purger terminés" msgstr " [p] Purger terminés"
msgid " [Q] Close this buffer" msgid " [q] Close this buffer"
msgstr " [Q] Fermer ce tampon" msgstr " [q] Fermer ce tampon"
#, c-format #, c-format
msgid "%s%s[%s%s%s%s] %s, received: %s, sent: %s" msgid "%s%s[%s%s%s%s] %s, received: %s, sent: %s"
@@ -17863,11 +17863,11 @@ msgstr ""
"nombre maximum de caractères affichés dans l'objet de barre \"typing\" (0 = " "nombre maximum de caractères affichés dans l'objet de barre \"typing\" (0 = "
"ne pas tronquer le contenu)" "ne pas tronquer le contenu)"
msgid " [A] Accept" msgid " [a] Accept"
msgstr " [A] Accepter" msgstr " [a] Accepter"
msgid " [C] Cancel" msgid " [c] Cancel"
msgstr " [C] Annuler" msgstr " [c] Annuler"
msgid "xfer chat" msgid "xfer chat"
msgstr "discussion xfer" msgstr "discussion xfer"
+13 -13
View File
@@ -20,8 +20,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2024-08-12 21:29+0200\n" "POT-Creation-Date: 2024-10-31 20:22+0100\n"
"PO-Revision-Date: 2024-06-11 07:49+0200\n" "PO-Revision-Date: 2024-10-31 20:31+0100\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: hu\n" "Language: hu\n"
@@ -13422,19 +13422,19 @@ msgstr "%s nincs elegendő memória a fogadott IRC üzenet számára\n"
msgid "Actions (letter+enter):" msgid "Actions (letter+enter):"
msgstr "" msgstr ""
msgid " [D] Disconnect" msgid " [d] Disconnect"
msgstr "" msgstr ""
msgid " [R] Remove" msgid " [r] Remove"
msgstr " [R] Eltávolítás" msgstr " [r] Eltávolítás"
#, fuzzy #, fuzzy
msgid " [P] Purge finished" msgid " [p] Purge finished"
msgstr " [P] Régi DCC törlése" msgstr " [p] Régi DCC törlése"
#, fuzzy #, fuzzy
msgid " [Q] Close this buffer" msgid " [q] Close this buffer"
msgstr " [Q] DCC nézet bezárása" msgstr " [q] DCC nézet bezárása"
#, fuzzy, c-format #, fuzzy, c-format
msgid "%s%s[%s%s%s%s] %s, received: %s, sent: %s" msgid "%s%s[%s%s%s%s] %s, received: %s, sent: %s"
@@ -15882,11 +15882,11 @@ msgid ""
"truncate content)" "truncate content)"
msgstr "" msgstr ""
msgid " [A] Accept" msgid " [a] Accept"
msgstr " [A] Elfogadás" msgstr " [a] Elfogadás"
msgid " [C] Cancel" msgid " [c] Cancel"
msgstr " [C] Mégsem" msgstr " [c] Mégsem"
msgid "xfer chat" msgid "xfer chat"
msgstr "" msgstr ""
+14 -14
View File
@@ -20,8 +20,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2024-08-12 21:29+0200\n" "POT-Creation-Date: 2024-10-31 20:22+0100\n"
"PO-Revision-Date: 2024-08-12 21:35+0200\n" "PO-Revision-Date: 2024-10-31 20:32+0100\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n" "Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: it\n" "Language: it\n"
@@ -14368,17 +14368,17 @@ msgstr "%s%s: memoria non sufficiente per verificare il messaggio"
msgid "Actions (letter+enter):" msgid "Actions (letter+enter):"
msgstr "Azioni (lettera+invio):" msgstr "Azioni (lettera+invio):"
msgid " [D] Disconnect" msgid " [d] Disconnect"
msgstr " [D] Disconnetti" msgstr " [d] Disconnetti"
msgid " [R] Remove" msgid " [r] Remove"
msgstr " [R] Rimuovi" msgstr " [r] Rimuovi"
msgid " [P] Purge finished" msgid " [p] Purge finished"
msgstr " [P] Rimuovi completati" msgstr " [p] Rimuovi completati"
msgid " [Q] Close this buffer" msgid " [q] Close this buffer"
msgstr " [Q] Chiudi questo buffer" msgstr " [q] Chiudi questo buffer"
#, c-format #, c-format
msgid "%s%s[%s%s%s%s] %s, received: %s, sent: %s" msgid "%s%s[%s%s%s%s] %s, received: %s, sent: %s"
@@ -17003,11 +17003,11 @@ msgid ""
"truncate content)" "truncate content)"
msgstr "" msgstr ""
msgid " [A] Accept" msgid " [a] Accept"
msgstr " [A] Accetta" msgstr " [a] Accetta"
msgid " [C] Cancel" msgid " [c] Cancel"
msgstr " [C] Annulla" msgstr " [c] Annulla"
msgid "xfer chat" msgid "xfer chat"
msgstr "chat xfer" msgstr "chat xfer"
+14 -14
View File
@@ -20,8 +20,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2024-08-12 21:29+0200\n" "POT-Creation-Date: 2024-10-31 20:22+0100\n"
"PO-Revision-Date: 2024-08-12 21:35+0200\n" "PO-Revision-Date: 2024-10-31 20:32+0100\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n" "Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/" "Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
"translation/ja_JP>\n" "translation/ja_JP>\n"
@@ -14805,17 +14805,17 @@ msgstr "%s%s: メッセージ解析用のメモリが足りません"
msgid "Actions (letter+enter):" msgid "Actions (letter+enter):"
msgstr "Actions (文字+enter):" msgstr "Actions (文字+enter):"
msgid " [D] Disconnect" msgid " [d] Disconnect"
msgstr " [D] 切断" msgstr " [d] 切断"
msgid " [R] Remove" msgid " [r] Remove"
msgstr " [R] 削除" msgstr " [r] 削除"
msgid " [P] Purge finished" msgid " [p] Purge finished"
msgstr " [P] パージ完了" msgstr " [p] パージ完了"
msgid " [Q] Close this buffer" msgid " [q] Close this buffer"
msgstr " [Q] バッファを閉じる" msgstr " [q] バッファを閉じる"
#, c-format #, c-format
msgid "%s%s[%s%s%s%s] %s, received: %s, sent: %s" msgid "%s%s[%s%s%s%s] %s, received: %s, sent: %s"
@@ -17525,11 +17525,11 @@ msgid ""
"truncate content)" "truncate content)"
msgstr "" msgstr ""
msgid " [A] Accept" msgid " [a] Accept"
msgstr " [A] 受け入れる" msgstr " [a] 受け入れる"
msgid " [C] Cancel" msgid " [c] Cancel"
msgstr " [C] キャンセル" msgstr " [c] キャンセル"
msgid "xfer chat" msgid "xfer chat"
msgstr "xfer チャット" msgstr "xfer チャット"
+14 -14
View File
@@ -22,8 +22,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2024-08-12 21:29+0200\n" "POT-Creation-Date: 2024-10-31 20:22+0100\n"
"PO-Revision-Date: 2024-08-12 21:35+0200\n" "PO-Revision-Date: 2024-10-31 20:33+0100\n"
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n" "Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: pl\n" "Language: pl\n"
@@ -14714,17 +14714,17 @@ msgstr "%s%s: za mało pamięci na przetworzenie otrzymanych wiadomości"
msgid "Actions (letter+enter):" msgid "Actions (letter+enter):"
msgstr "Akcje (litera+enter):" msgstr "Akcje (litera+enter):"
msgid " [D] Disconnect" msgid " [d] Disconnect"
msgstr " [D] Rozłącz" msgstr " [d] Rozłącz"
msgid " [R] Remove" msgid " [r] Remove"
msgstr " [R] Usuń" msgstr " [r] Usuń"
msgid " [P] Purge finished" msgid " [p] Purge finished"
msgstr " [P] Wyczyść skończone" msgstr " [p] Wyczyść skończone"
msgid " [Q] Close this buffer" msgid " [q] Close this buffer"
msgstr " [Q] Zamknij ten bufor" msgstr " [q] Zamknij ten bufor"
#, c-format #, c-format
msgid "%s%s[%s%s%s%s] %s, received: %s, sent: %s" msgid "%s%s[%s%s%s%s] %s, received: %s, sent: %s"
@@ -17442,11 +17442,11 @@ msgstr ""
"maksymalna ilość znaków wyświetlana w elemencie paska \"typing\" (0 = nie " "maksymalna ilość znaków wyświetlana w elemencie paska \"typing\" (0 = nie "
"ograniczaj zawartości)" "ograniczaj zawartości)"
msgid " [A] Accept" msgid " [a] Accept"
msgstr " [A] Akceptuj" msgstr " [a] Akceptuj"
msgid " [C] Cancel" msgid " [c] Cancel"
msgstr " [C] Anuluj" msgstr " [c] Anuluj"
msgid "xfer chat" msgid "xfer chat"
msgstr "rozmowa xfer" msgstr "rozmowa xfer"
+14 -14
View File
@@ -20,8 +20,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2024-08-12 21:29+0200\n" "POT-Creation-Date: 2024-10-31 20:22+0100\n"
"PO-Revision-Date: 2024-08-12 21:35+0200\n" "PO-Revision-Date: 2024-10-31 20:33+0100\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n" "Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <>\n" "Language-Team: Portuguese <>\n"
"Language: pt\n" "Language: pt\n"
@@ -14713,17 +14713,17 @@ msgstr "%s%s: memória insuficiente para analisar a mensagem"
msgid "Actions (letter+enter):" msgid "Actions (letter+enter):"
msgstr "Ações (letra+enter):" msgstr "Ações (letra+enter):"
msgid " [D] Disconnect" msgid " [d] Disconnect"
msgstr " [D] Desconectar" msgstr " [d] Desconectar"
msgid " [R] Remove" msgid " [r] Remove"
msgstr " [R] Remover" msgstr " [r] Remover"
msgid " [P] Purge finished" msgid " [p] Purge finished"
msgstr " [P] Purga concluída" msgstr " [p] Purga concluída"
msgid " [Q] Close this buffer" msgid " [q] Close this buffer"
msgstr " [Q] Fechar este buffer" msgstr " [q] Fechar este buffer"
#, c-format #, c-format
msgid "%s%s[%s%s%s%s] %s, received: %s, sent: %s" msgid "%s%s[%s%s%s%s] %s, received: %s, sent: %s"
@@ -17437,11 +17437,11 @@ msgid ""
"truncate content)" "truncate content)"
msgstr "" msgstr ""
msgid " [A] Accept" msgid " [a] Accept"
msgstr " [A] Aceitar" msgstr " [a] Aceitar"
msgid " [C] Cancel" msgid " [c] Cancel"
msgstr " [C] Cancelar" msgstr " [c] Cancelar"
msgid "xfer chat" msgid "xfer chat"
msgstr "chat xfer" msgstr "chat xfer"
+14 -14
View File
@@ -21,8 +21,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2024-08-12 21:29+0200\n" "POT-Creation-Date: 2024-10-31 20:22+0100\n"
"PO-Revision-Date: 2024-06-11 07:49+0200\n" "PO-Revision-Date: 2024-10-31 20:34+0100\n"
"Last-Translator: Érico Nogueira <ericonr@disroot.org>\n" "Last-Translator: Érico Nogueira <ericonr@disroot.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: pt_BR\n" "Language: pt_BR\n"
@@ -13877,17 +13877,17 @@ msgstr "%s%s: memória insuficiente para interpretar mensagem"
msgid "Actions (letter+enter):" msgid "Actions (letter+enter):"
msgstr "Ações (letra+ENTER):" msgstr "Ações (letra+ENTER):"
msgid " [D] Disconnect" msgid " [d] Disconnect"
msgstr " [D] Desconectar" msgstr " [d] Desconectar"
msgid " [R] Remove" msgid " [r] Remove"
msgstr " [R] Remover" msgstr " [r] Remover"
msgid " [P] Purge finished" msgid " [p] Purge finished"
msgstr " [P] Excluir finalizados" msgstr " [p] Excluir finalizados"
msgid " [Q] Close this buffer" msgid " [q] Close this buffer"
msgstr " [Q] Fechar este buffer" msgstr " [q] Fechar este buffer"
#, fuzzy, c-format #, fuzzy, c-format
msgid "%s%s[%s%s%s%s] %s, received: %s, sent: %s" msgid "%s%s[%s%s%s%s] %s, received: %s, sent: %s"
@@ -16435,11 +16435,11 @@ msgid ""
"truncate content)" "truncate content)"
msgstr "" msgstr ""
msgid " [A] Accept" msgid " [a] Accept"
msgstr " [A] Aceitar" msgstr " [a] Aceitar"
msgid " [C] Cancel" msgid " [c] Cancel"
msgstr " [C] Cancelar" msgstr " [c] Cancelar"
msgid "xfer chat" msgid "xfer chat"
msgstr "chat de transferência" msgstr "chat de transferência"
+13 -13
View File
@@ -21,8 +21,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2024-08-12 21:29+0200\n" "POT-Creation-Date: 2024-10-31 20:22+0100\n"
"PO-Revision-Date: 2024-06-11 07:49+0200\n" "PO-Revision-Date: 2024-10-31 20:35+0100\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n" "Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: ru\n" "Language: ru\n"
@@ -13475,19 +13475,19 @@ msgstr "%s недостаточно памяти для полученного
msgid "Actions (letter+enter):" msgid "Actions (letter+enter):"
msgstr "" msgstr ""
msgid " [D] Disconnect" msgid " [d] Disconnect"
msgstr "" msgstr ""
msgid " [R] Remove" msgid " [r] Remove"
msgstr " [R] Удалить" msgstr " [r] Удалить"
#, fuzzy #, fuzzy
msgid " [P] Purge finished" msgid " [p] Purge finished"
msgstr " [P] Очистить список" msgstr " [p] Очистить список"
#, fuzzy #, fuzzy
msgid " [Q] Close this buffer" msgid " [q] Close this buffer"
msgstr " [Q] Закрыть окно" msgstr " [q] Закрыть окно"
#, fuzzy, c-format #, fuzzy, c-format
msgid "%s%s[%s%s%s%s] %s, received: %s, sent: %s" msgid "%s%s[%s%s%s%s] %s, received: %s, sent: %s"
@@ -15935,11 +15935,11 @@ msgid ""
"truncate content)" "truncate content)"
msgstr "" msgstr ""
msgid " [A] Accept" msgid " [a] Accept"
msgstr " [A] Принять" msgstr " [a] Принять"
msgid " [C] Cancel" msgid " [c] Cancel"
msgstr " [C] Отменить" msgstr " [c] Отменить"
msgid "xfer chat" msgid "xfer chat"
msgstr "" msgstr ""
+14 -14
View File
@@ -20,8 +20,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2024-08-12 21:29+0200\n" "POT-Creation-Date: 2024-10-31 20:22+0100\n"
"PO-Revision-Date: 2024-08-12 21:36+0200\n" "PO-Revision-Date: 2024-10-31 20:35+0100\n"
"Last-Translator: Ivan Pešić <ivan.pesic@gmail.com>\n" "Last-Translator: Ivan Pešić <ivan.pesic@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: sr\n" "Language: sr\n"
@@ -14693,17 +14693,17 @@ msgstr "%s%s: нема довољно слободне меморије за п
msgid "Actions (letter+enter):" msgid "Actions (letter+enter):"
msgstr "Акције (слово+ентер):" msgstr "Акције (слово+ентер):"
msgid " [D] Disconnect" msgid " [d] Disconnect"
msgstr " [D] Прекид везе" msgstr " [d] Прекид везе"
msgid " [R] Remove" msgid " [r] Remove"
msgstr " [R] Уклањање" msgstr " [r] Уклањање"
msgid " [P] Purge finished" msgid " [p] Purge finished"
msgstr " [P] Завршено чишћење" msgstr " [p] Завршено чишћење"
msgid " [Q] Close this buffer" msgid " [q] Close this buffer"
msgstr " [Q] Затварање овог бафера" msgstr " [q] Затварање овог бафера"
#, c-format #, c-format
msgid "%s%s[%s%s%s%s] %s, received: %s, sent: %s" msgid "%s%s[%s%s%s%s] %s, received: %s, sent: %s"
@@ -17397,11 +17397,11 @@ msgstr ""
"макс број карактера који се приказује у ставци траке \"typing\" (0 = садржај " "макс број карактера који се приказује у ставци траке \"typing\" (0 = садржај "
"се не одсеца)" "се не одсеца)"
msgid " [A] Accept" msgid " [a] Accept"
msgstr " [A] Прихвати" msgstr " [a] Прихвати"
msgid " [C] Cancel" msgid " [c] Cancel"
msgstr " [C] Откажи" msgstr " [c] Откажи"
msgid "xfer chat" msgid "xfer chat"
msgstr "xfer разговор" msgstr "xfer разговор"
+14 -14
View File
@@ -20,8 +20,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2024-08-12 21:29+0200\n" "POT-Creation-Date: 2024-10-31 20:22+0100\n"
"PO-Revision-Date: 2024-08-12 21:36+0200\n" "PO-Revision-Date: 2024-10-31 20:36+0100\n"
"Last-Translator: Emir SARI <emir_sari@icloud.com>\n" "Last-Translator: Emir SARI <emir_sari@icloud.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: tr\n" "Language: tr\n"
@@ -14977,17 +14977,17 @@ msgstr "%s%s: ayrıştırma iletisi için bellek yetersiz"
msgid "Actions (letter+enter):" msgid "Actions (letter+enter):"
msgstr "Eylemler (harf+enter):" msgstr "Eylemler (harf+enter):"
msgid " [D] Disconnect" msgid " [d] Disconnect"
msgstr " [D] Bağlantıyı kes" msgstr " [d] Bağlantıyı kes"
msgid " [R] Remove" msgid " [r] Remove"
msgstr " [R] Kaldır" msgstr " [r] Kaldır"
msgid " [P] Purge finished" msgid " [p] Purge finished"
msgstr " [P] Biteni temizle" msgstr " [p] Biteni temizle"
msgid " [Q] Close this buffer" msgid " [q] Close this buffer"
msgstr " [Q] Bu arabelleği kapat" msgstr " [q] Bu arabelleği kapat"
#, c-format #, c-format
msgid "%s%s[%s%s%s%s] %s, received: %s, sent: %s" msgid "%s%s[%s%s%s%s] %s, received: %s, sent: %s"
@@ -17777,11 +17777,11 @@ msgstr ""
"\"yazıyor\" çubuk ögesinde görüntülenecek en çok karakter sayısı (0 = " "\"yazıyor\" çubuk ögesinde görüntülenecek en çok karakter sayısı (0 = "
"içeriği kısaltma)" "içeriği kısaltma)"
msgid " [A] Accept" msgid " [a] Accept"
msgstr " [A] Kabul et" msgstr " [a] Kabul et"
msgid " [C] Cancel" msgid " [c] Cancel"
msgstr " [C] İptal" msgstr " [c] İptal"
msgid "xfer chat" msgid "xfer chat"
msgstr "xfer sohbeti" msgstr "xfer sohbeti"
+7 -7
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2024-08-12 21:29+0200\n" "POT-Creation-Date: 2024-10-31 20:22+0100\n"
"PO-Revision-Date: 2014-08-16 10:27+0200\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -12278,16 +12278,16 @@ msgstr ""
msgid "Actions (letter+enter):" msgid "Actions (letter+enter):"
msgstr "" msgstr ""
msgid " [D] Disconnect" msgid " [d] Disconnect"
msgstr "" msgstr ""
msgid " [R] Remove" msgid " [r] Remove"
msgstr "" msgstr ""
msgid " [P] Purge finished" msgid " [p] Purge finished"
msgstr "" msgstr ""
msgid " [Q] Close this buffer" msgid " [q] Close this buffer"
msgstr "" msgstr ""
#, c-format #, c-format
@@ -14562,10 +14562,10 @@ msgid ""
"truncate content)" "truncate content)"
msgstr "" msgstr ""
msgid " [A] Accept" msgid " [a] Accept"
msgstr "" msgstr ""
msgid " [C] Cancel" msgid " [c] Cancel"
msgstr "" msgstr ""
msgid "xfer chat" msgid "xfer chat"
+27 -1
View File
@@ -71,6 +71,7 @@ char *gui_bar_item_names[GUI_BAR_NUM_ITEMS] =
}; };
struct t_gui_bar_item_hook *gui_bar_item_hooks = NULL; struct t_gui_bar_item_hook *gui_bar_item_hooks = NULL;
struct t_hook *gui_bar_item_timer = NULL; struct t_hook *gui_bar_item_timer = NULL;
struct t_hook *gui_bar_item_timer_hotlist_resort = NULL;
/* /*
@@ -2275,6 +2276,25 @@ gui_bar_item_timer_cb (const void *pointer, void *data, int remaining_calls)
return WEECHAT_RC_OK; return WEECHAT_RC_OK;
} }
/*
* Timer callback for resorting hotlist.
*/
int
gui_bar_item_timer_hotlist_resort_cb (const void *pointer, void *data,
int remaining_calls)
{
/* make C compiler happy */
(void) pointer;
(void) data;
(void) remaining_calls;
gui_hotlist_resort ();
gui_bar_item_timer_hotlist_resort = NULL;
return WEECHAT_RC_OK;
}
/* /*
* Callback when a signal is received: rebuilds an item. * Callback when a signal is received: rebuilds an item.
*/ */
@@ -2298,7 +2318,13 @@ gui_bar_item_signal_cb (const void *pointer, void *data,
if ((strcmp (item, "hotlist") == 0) if ((strcmp (item, "hotlist") == 0)
&& (strcmp (signal, "hotlist_changed") != 0)) && (strcmp (signal, "hotlist_changed") != 0))
{ {
gui_hotlist_resort (); if (!gui_bar_item_timer_hotlist_resort)
{
gui_bar_item_timer_hotlist_resort = hook_timer (
NULL,
1, 0, 1,
&gui_bar_item_timer_hotlist_resort_cb, NULL, NULL);
}
} }
gui_bar_item_update (item); gui_bar_item_update (item);
} }
+58 -27
View File
@@ -36,7 +36,6 @@
#include <ctype.h> #include <ctype.h>
#include "../core/weechat.h" #include "../core/weechat.h"
#include "../core/core-arraylist.h"
#include "../core/core-config.h" #include "../core/core-config.h"
#include "../core/core-eval.h" #include "../core/core-eval.h"
#include "../core/core-hashtable.h" #include "../core/core-hashtable.h"
@@ -95,8 +94,8 @@ char *gui_buffer_notify_string[GUI_BUFFER_NUM_NOTIFY] =
{ "none", "highlight", "message", "all" }; { "none", "highlight", "message", "all" };
char *gui_buffer_properties_get_integer[] = char *gui_buffer_properties_get_integer[] =
{ "opening", "number", "layout_number", "layout_number_merge_order", "type", { "opening", "number", "old_number", "layout_number", "layout_number_merge_order",
"notify", "num_displayed", "active", "hidden", "zoomed", "type", "notify", "num_displayed", "active", "hidden", "zoomed",
"print_hooks_enabled", "day_change", "clear", "filter", "closing", "print_hooks_enabled", "day_change", "clear", "filter", "closing",
"lines_hidden", "prefix_max_length", "next_line_id", "time_for_each_line", "lines_hidden", "prefix_max_length", "next_line_id", "time_for_each_line",
"nicklist", "nicklist_case_sensitive", "nicklist_max_length", "nicklist", "nicklist_case_sensitive", "nicklist_max_length",
@@ -451,7 +450,8 @@ gui_buffer_find_pos (struct t_gui_buffer *buffer)
*/ */
void void
gui_buffer_shift_numbers (struct t_gui_buffer *buffer) gui_buffer_shift_numbers (struct t_gui_buffer *buffer,
int send_signal_buffer_moved)
{ {
struct t_gui_buffer *ptr_buffer; struct t_gui_buffer *ptr_buffer;
@@ -463,10 +463,13 @@ gui_buffer_shift_numbers (struct t_gui_buffer *buffer)
break; break;
} }
ptr_buffer->number++; ptr_buffer->number++;
(void) gui_buffer_send_signal (ptr_buffer, if (send_signal_buffer_moved)
"buffer_moved", {
WEECHAT_HOOK_SIGNAL_POINTER, (void) gui_buffer_send_signal (ptr_buffer,
ptr_buffer); "buffer_moved",
WEECHAT_HOOK_SIGNAL_POINTER,
ptr_buffer);
}
} }
} }
@@ -560,7 +563,11 @@ gui_buffer_insert (struct t_gui_buffer *buffer)
gui_buffers = buffer; gui_buffers = buffer;
pos_buffer->prev_buffer = buffer; pos_buffer->prev_buffer = buffer;
if (buffer->number == pos_buffer->number) if (buffer->number == pos_buffer->number)
gui_buffer_shift_numbers (pos_buffer); {
gui_buffer_shift_numbers (
pos_buffer,
1); /* send_signal_buffer_moved */
}
} }
else else
{ {
@@ -4228,6 +4235,16 @@ gui_buffer_move_to_number (struct t_gui_buffer *buffer, int number)
return; return;
} }
/*
* save old buffer numbers to send signal "buffer_moved" for each buffer
* really moved, after the move operation
*/
for (ptr_buffer = gui_buffers; ptr_buffer;
ptr_buffer = ptr_buffer->next_buffer)
{
ptr_buffer->old_number = ptr_buffer->number;
}
/* remove buffer(s) from list */ /* remove buffer(s) from list */
if (ptr_first_buffer->prev_buffer) if (ptr_first_buffer->prev_buffer)
(ptr_first_buffer->prev_buffer)->next_buffer = ptr_last_buffer->next_buffer; (ptr_first_buffer->prev_buffer)->next_buffer = ptr_last_buffer->next_buffer;
@@ -4280,7 +4297,9 @@ gui_buffer_move_to_number (struct t_gui_buffer *buffer, int number)
if (ptr_last_buffer->next_buffer if (ptr_last_buffer->next_buffer
&& (ptr_last_buffer->next_buffer->number == number)) && (ptr_last_buffer->next_buffer->number == number))
{ {
gui_buffer_shift_numbers (ptr_last_buffer->next_buffer); gui_buffer_shift_numbers (
ptr_last_buffer->next_buffer,
0); /* send_signal_buffer_moved */
} }
} }
else else
@@ -4303,9 +4322,16 @@ gui_buffer_move_to_number (struct t_gui_buffer *buffer, int number)
last_gui_buffer = ptr_last_buffer; last_gui_buffer = ptr_last_buffer;
} }
(void) gui_buffer_send_signal (buffer, for (ptr_buffer = gui_buffers; ptr_buffer;
"buffer_moved", ptr_buffer = ptr_buffer->next_buffer)
WEECHAT_HOOK_SIGNAL_POINTER, buffer); {
if (ptr_buffer->number != ptr_buffer->old_number)
{
(void) gui_buffer_send_signal (ptr_buffer,
"buffer_moved",
WEECHAT_HOOK_SIGNAL_POINTER, ptr_buffer);
}
}
} }
/* /*
@@ -4415,8 +4441,6 @@ gui_buffer_merge (struct t_gui_buffer *buffer,
struct t_gui_buffer *target_buffer) struct t_gui_buffer *target_buffer)
{ {
struct t_gui_buffer *ptr_buffer, *ptr_first_buffer[2], *ptr_last_buffer[2]; struct t_gui_buffer *ptr_buffer, *ptr_first_buffer[2], *ptr_last_buffer[2];
struct t_arraylist *buffers_moved;
int i, list_size;
if (!buffer || !target_buffer) if (!buffer || !target_buffer)
return; return;
@@ -4461,9 +4485,15 @@ gui_buffer_merge (struct t_gui_buffer *buffer,
if (!ptr_first_buffer[1] || !ptr_last_buffer[1]) if (!ptr_first_buffer[1] || !ptr_last_buffer[1])
return; return;
buffers_moved = arraylist_new (32, 0, 1, NULL, NULL, NULL, NULL); /*
if (!buffers_moved) * save old buffer numbers to send signal "buffer_moved" for each buffer
return; * really moved, after the merge operation
*/
for (ptr_buffer = gui_buffers; ptr_buffer;
ptr_buffer = ptr_buffer->next_buffer)
{
ptr_buffer->old_number = ptr_buffer->number;
}
/* remove buffer(s) to merge from list */ /* remove buffer(s) to merge from list */
if (ptr_first_buffer[0]->prev_buffer) if (ptr_first_buffer[0]->prev_buffer)
@@ -4481,7 +4511,6 @@ gui_buffer_merge (struct t_gui_buffer *buffer,
for (ptr_buffer = ptr_last_buffer[0]->next_buffer; ptr_buffer; for (ptr_buffer = ptr_last_buffer[0]->next_buffer; ptr_buffer;
ptr_buffer = ptr_buffer->next_buffer) ptr_buffer = ptr_buffer->next_buffer)
{ {
arraylist_add (buffers_moved, ptr_buffer);
ptr_buffer->number--; ptr_buffer->number--;
} }
} }
@@ -4500,7 +4529,6 @@ gui_buffer_merge (struct t_gui_buffer *buffer,
ptr_buffer = ptr_buffer->next_buffer) ptr_buffer = ptr_buffer->next_buffer)
{ {
ptr_buffer->number = target_buffer->number; ptr_buffer->number = target_buffer->number;
arraylist_add (buffers_moved, ptr_buffer);
if (ptr_buffer == ptr_last_buffer[0]) if (ptr_buffer == ptr_last_buffer[0])
break; break;
} }
@@ -4519,19 +4547,16 @@ gui_buffer_merge (struct t_gui_buffer *buffer,
"buffer_merged", "buffer_merged",
WEECHAT_HOOK_SIGNAL_POINTER, buffer); WEECHAT_HOOK_SIGNAL_POINTER, buffer);
list_size = arraylist_size (buffers_moved); for (ptr_buffer = gui_buffers; ptr_buffer;
for (i = 0; i < list_size; i++) ptr_buffer = ptr_buffer->next_buffer)
{ {
ptr_buffer = (struct t_gui_buffer *)arraylist_get (buffers_moved, i); if (ptr_buffer->number != ptr_buffer->old_number)
if (ptr_buffer)
{ {
(void) gui_buffer_send_signal (ptr_buffer, (void) gui_buffer_send_signal (ptr_buffer,
"buffer_moved", "buffer_moved",
WEECHAT_HOOK_SIGNAL_POINTER, ptr_buffer); WEECHAT_HOOK_SIGNAL_POINTER, ptr_buffer);
} }
} }
arraylist_free (buffers_moved);
} }
/* /*
@@ -4651,7 +4676,9 @@ gui_buffer_unmerge (struct t_gui_buffer *buffer, int number)
if (buffer->next_buffer if (buffer->next_buffer
&& (buffer->next_buffer->number == number)) && (buffer->next_buffer->number == number))
{ {
gui_buffer_shift_numbers (buffer->next_buffer); gui_buffer_shift_numbers (
buffer->next_buffer,
1); /* send_signal_buffer_moved */
} }
gui_buffer_compute_num_displayed (); gui_buffer_compute_num_displayed ();
@@ -5246,6 +5273,7 @@ gui_buffer_hdata_buffer_cb (const void *pointer, void *data,
HDATA_VAR(struct t_gui_buffer, plugin, POINTER, 0, NULL, "plugin"); HDATA_VAR(struct t_gui_buffer, plugin, POINTER, 0, NULL, "plugin");
HDATA_VAR(struct t_gui_buffer, plugin_name_for_upgrade, STRING, 0, NULL, NULL); HDATA_VAR(struct t_gui_buffer, plugin_name_for_upgrade, STRING, 0, NULL, NULL);
HDATA_VAR(struct t_gui_buffer, number, INTEGER, 0, NULL, NULL); HDATA_VAR(struct t_gui_buffer, number, INTEGER, 0, NULL, NULL);
HDATA_VAR(struct t_gui_buffer, old_number, INTEGER, 0, NULL, NULL);
HDATA_VAR(struct t_gui_buffer, layout_number, INTEGER, 0, NULL, NULL); HDATA_VAR(struct t_gui_buffer, layout_number, INTEGER, 0, NULL, NULL);
HDATA_VAR(struct t_gui_buffer, layout_number_merge_order, INTEGER, 0, NULL, NULL); HDATA_VAR(struct t_gui_buffer, layout_number_merge_order, INTEGER, 0, NULL, NULL);
HDATA_VAR(struct t_gui_buffer, name, STRING, 0, NULL, NULL); HDATA_VAR(struct t_gui_buffer, name, STRING, 0, NULL, NULL);
@@ -5444,6 +5472,8 @@ gui_buffer_add_to_infolist (struct t_infolist *infolist,
return 0; return 0;
if (!infolist_new_var_integer (ptr_item, "number", buffer->number)) if (!infolist_new_var_integer (ptr_item, "number", buffer->number))
return 0; return 0;
if (!infolist_new_var_integer (ptr_item, "old_number", buffer->old_number))
return 0;
if (!infolist_new_var_integer (ptr_item, "layout_number", buffer->layout_number)) if (!infolist_new_var_integer (ptr_item, "layout_number", buffer->layout_number))
return 0; return 0;
if (!infolist_new_var_integer (ptr_item, "layout_number_merge_order", buffer->layout_number_merge_order)) if (!infolist_new_var_integer (ptr_item, "layout_number_merge_order", buffer->layout_number_merge_order))
@@ -5706,6 +5736,7 @@ gui_buffer_print_log ()
ptr_buffer->plugin, gui_buffer_get_plugin_name (ptr_buffer)); ptr_buffer->plugin, gui_buffer_get_plugin_name (ptr_buffer));
log_printf (" plugin_name_for_upgrade : '%s'", ptr_buffer->plugin_name_for_upgrade); log_printf (" plugin_name_for_upgrade : '%s'", ptr_buffer->plugin_name_for_upgrade);
log_printf (" number. . . . . . . . . : %d", ptr_buffer->number); log_printf (" number. . . . . . . . . : %d", ptr_buffer->number);
log_printf (" old_number. . . . . . . : %d", ptr_buffer->old_number);
log_printf (" layout_number . . . . . : %d", ptr_buffer->layout_number); log_printf (" layout_number . . . . . : %d", ptr_buffer->layout_number);
log_printf (" layout_number_merge_order: %d", ptr_buffer->layout_number_merge_order); log_printf (" layout_number_merge_order: %d", ptr_buffer->layout_number_merge_order);
log_printf (" name. . . . . . . . . . : '%s'", ptr_buffer->name); log_printf (" name. . . . . . . . . . : '%s'", ptr_buffer->name);
+1
View File
@@ -111,6 +111,7 @@ struct t_gui_buffer
char *plugin_name_for_upgrade; /* plugin name when upgrading */ char *plugin_name_for_upgrade; /* plugin name when upgrading */
int number; /* buffer number (first is 1) */ int number; /* buffer number (first is 1) */
int old_number; /* internally used when moving buffer*/
int layout_number; /* number of buffer stored in layout */ int layout_number; /* number of buffer stored in layout */
int layout_number_merge_order; /* order in merge for layout */ int layout_number_merge_order; /* order in merge for layout */
char *name; /* buffer name */ char *name; /* buffer name */
+32 -9
View File
@@ -22,6 +22,16 @@
#undef _ #undef _
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
/* for wcwidth in wchar.h */
#ifndef __USE_XOPEN
#define __USE_XOPEN
#endif
#include <wchar.h>
#include <locale.h> #include <locale.h>
#include <EXTERN.h> #include <EXTERN.h>
#include <perl.h> #include <perl.h>
@@ -507,7 +517,9 @@ weechat_perl_load (const char *filename, const char *code)
struct stat buf; struct stat buf;
char *perl_code; char *perl_code;
int length; int length;
#ifndef MULTIPLICITY #ifdef MULTIPLICITY
int wcwidth160;
#else
char pkgname[64]; char pkgname[64];
#endif /* MULTIPLICITY */ #endif /* MULTIPLICITY */
@@ -564,14 +576,18 @@ weechat_perl_load (const char *filename, const char *code)
PERL_PLUGIN_NAME); PERL_PLUGIN_NAME);
PERL_SET_CONTEXT (perl_current_interpreter); PERL_SET_CONTEXT (perl_current_interpreter);
wcwidth160 = wcwidth (160);
perl_construct (perl_current_interpreter); perl_construct (perl_current_interpreter);
if (wcwidth (160) != wcwidth160)
{
/* restore the locale that's broken in some versions of Perl */
Perl_setlocale (LC_ALL, "");
}
temp_script.interpreter = (PerlInterpreter *) perl_current_interpreter; temp_script.interpreter = (PerlInterpreter *) perl_current_interpreter;
perl_parse (perl_current_interpreter, weechat_perl_api_init, perl_parse (perl_current_interpreter, weechat_perl_api_init,
perl_args_count, perl_args, NULL); perl_args_count, perl_args, NULL);
#if PERL_REVISION >= 6 || (PERL_REVISION == 5 && PERL_VERSION >= 38)
/* restore the locale that could be changed by Perl >= 5.38 */
Perl_setlocale (LC_CTYPE, "");
#endif
length = strlen (perl_weechat_code) + strlen (str_warning) + length = strlen (perl_weechat_code) + strlen (str_warning) +
strlen (str_error) - 2 + 4 + strlen ((code) ? code : filename) + 4 + 1; strlen (str_error) - 2 + 4 + strlen ((code) ? code : filename) + 4 + 1;
perl_code = malloc (length); perl_code = malloc (length);
@@ -1248,6 +1264,9 @@ int
weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
{ {
int old_perl_quiet; int old_perl_quiet;
#ifndef MULTIPLICITY
int wcwidth160;
#endif /* MULTIPLICITY */
#ifdef PERL_SYS_INIT3 #ifdef PERL_SYS_INIT3
int a; int a;
@@ -1298,13 +1317,17 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
return WEECHAT_RC_ERROR; return WEECHAT_RC_ERROR;
} }
wcwidth160 = wcwidth (160);
perl_construct (perl_main); perl_construct (perl_main);
if (wcwidth (160) != wcwidth160)
{
/* restore the locale that's broken in some versions of Perl */
Perl_setlocale (LC_ALL, "");
}
perl_parse (perl_main, weechat_perl_api_init, perl_args_count, perl_parse (perl_main, weechat_perl_api_init, perl_args_count,
perl_args, NULL); perl_args, NULL);
#if PERL_REVISION >= 6 || (PERL_REVISION == 5 && PERL_VERSION >= 38)
/* restore the locale that could be changed by Perl >= 5.38 */
Perl_setlocale (LC_CTYPE, "");
#endif
#endif /* MULTIPLICITY */ #endif /* MULTIPLICITY */
perl_data.config_file = &perl_config_file; perl_data.config_file = &perl_config_file;
+4 -4
View File
@@ -79,15 +79,15 @@ relay_buffer_refresh (const char *hotlist)
/* disconnect */ /* disconnect */
(client_selected (client_selected
&& !RELAY_STATUS_HAS_ENDED(client_selected->status)) ? && !RELAY_STATUS_HAS_ENDED(client_selected->status)) ?
_(" [D] Disconnect") : "", _(" [d] Disconnect") : "",
/* remove */ /* remove */
(client_selected (client_selected
&& RELAY_STATUS_HAS_ENDED(client_selected->status)) ? && RELAY_STATUS_HAS_ENDED(client_selected->status)) ?
_(" [R] Remove") : "", _(" [r] Remove") : "",
/* purge old */ /* purge old */
_(" [P] Purge finished"), _(" [p] Purge finished"),
/* quit */ /* quit */
_(" [Q] Close this buffer")); _(" [q] Close this buffer"));
for (ptr_client = relay_clients; ptr_client; for (ptr_client = relay_clients; ptr_client;
ptr_client = ptr_client->next_client) ptr_client = ptr_client->next_client)
{ {
+2 -2
View File
@@ -28,8 +28,8 @@ if(RUBY_FOUND)
# caused by Ruby headers (with Ruby ≥ 3.1.0) # caused by Ruby headers (with Ruby ≥ 3.1.0)
# see: https://github.com/ruby/ruby/pull/7085 # see: https://github.com/ruby/ruby/pull/7085
add_definitions(-Wno-unused-parameter) add_definitions(-Wno-unused-parameter)
include_directories(${RUBY_INCLUDE_DIRS}) include_directories(${Ruby_INCLUDE_DIRS})
target_link_libraries(ruby ${RUBY_LDFLAGS} weechat_plugins_scripts coverage_config) target_link_libraries(ruby ${Ruby_LIBRARIES} weechat_plugins_scripts coverage_config)
endif(RUBY_FOUND) endif(RUBY_FOUND)
install(TARGETS ruby LIBRARY DESTINATION "${WEECHAT_LIBDIR}/plugins") install(TARGETS ruby LIBRARY DESTINATION "${WEECHAT_LIBDIR}/plugins")
+5 -2
View File
@@ -818,14 +818,17 @@ void
script_buffer_set_current_line (int line) script_buffer_set_current_line (int line)
{ {
int old_line; int old_line;
struct t_script_repo *old_script;
if ((line >= 0) && (line < script_repo_count_displayed)) if ((line >= 0) && (line < script_repo_count_displayed))
{ {
old_line = script_buffer_selected_line; old_line = script_buffer_selected_line;
script_buffer_selected_line = line; script_buffer_selected_line = line;
script_buffer_display_line_script (old_line, old_script = script_repo_search_displayed_by_number (old_line);
script_repo_search_displayed_by_number (old_line)); if (old_script)
script_buffer_display_line_script (old_line, old_script);
script_buffer_display_line_script (script_buffer_selected_line, script_buffer_display_line_script (script_buffer_selected_line,
script_repo_search_displayed_by_number (script_buffer_selected_line)); script_repo_search_displayed_by_number (script_buffer_selected_line));
} }
+5 -5
View File
@@ -63,19 +63,19 @@ xfer_buffer_refresh (const char *hotlist)
/* accept */ /* accept */
(xfer_selected && XFER_IS_RECV(xfer_selected->type) (xfer_selected && XFER_IS_RECV(xfer_selected->type)
&& (xfer_selected->status == XFER_STATUS_WAITING)) ? && (xfer_selected->status == XFER_STATUS_WAITING)) ?
_(" [A] Accept") : "", _(" [a] Accept") : "",
/* cancel */ /* cancel */
(xfer_selected (xfer_selected
&& !XFER_HAS_ENDED(xfer_selected->status)) ? && !XFER_HAS_ENDED(xfer_selected->status)) ?
_(" [C] Cancel") : "", _(" [c] Cancel") : "",
/* remove */ /* remove */
(xfer_selected (xfer_selected
&& XFER_HAS_ENDED(xfer_selected->status)) ? && XFER_HAS_ENDED(xfer_selected->status)) ?
_(" [R] Remove") : "", _(" [r] Remove") : "",
/* purge old */ /* purge old */
_(" [P] Purge finished"), _(" [p] Purge finished"),
/* quit */ /* quit */
_(" [Q] Close this buffer")); _(" [q] Close this buffer"));
for (ptr_xfer = xfer_list; ptr_xfer; ptr_xfer = ptr_xfer->next_xfer) for (ptr_xfer = xfer_list; ptr_xfer; ptr_xfer = ptr_xfer->next_xfer)
{ {
suffix[0] = '\0'; suffix[0] = '\0';
+4 -4
View File
@@ -144,8 +144,8 @@ class WeechatScript(object): # pylint: disable=too-many-instance-attributes
} }
# replace variables # replace variables
for node in ast.walk(self.tree): for node in ast.walk(self.tree):
if isinstance(node, ast.Str) and node.s in variables: if isinstance(node, ast.Constant) and node.value in variables:
node.s = variables[node.s] node.value = variables[node.value]
def write_header(self, output): def write_header(self, output):
"""Generate script header (just comments by default).""" """Generate script header (just comments by default)."""
@@ -336,8 +336,8 @@ def update_nodes(tree):
output = StringIO() output = StringIO()
unparsed = UnparsePython(output=output) unparsed = UnparsePython(output=output)
unparsed.add(node.args[0]) unparsed.add(node.args[0])
node.args.append(ast.Str(output.getvalue())) node.args.append(ast.Constant(output.getvalue()))
node.args.append(ast.Str(str(node.func.lineno))) node.args.append(ast.Constant(str(node.func.lineno)))
def get_tests(path): def get_tests(path):
+29 -36
View File
@@ -147,7 +147,7 @@ class UnparsePython(object):
@staticmethod @staticmethod
def is_number(node): def is_number(node):
"""Check if the node is a number.""" """Check if the node is a number."""
return (isinstance(node, ast.Num) or return ((isinstance(node, ast.Constant) and isinstance(node.value, int)) or
(isinstance(node, ast.UnaryOp) and (isinstance(node, ast.UnaryOp) and
isinstance(node.op, (ast.UAdd, ast.USub)))) isinstance(node.op, (ast.UAdd, ast.USub))))
@@ -201,7 +201,7 @@ class UnparsePython(object):
def _ast_constant(self, node): def _ast_constant(self, node):
"""Add an AST Constant in output.""" """Add an AST Constant in output."""
self.add(repr(node.s)) self.add(repr(node.value))
def _ast_dict(self, node): def _ast_dict(self, node):
"""Add an AST Dict in output.""" """Add an AST Dict in output."""
@@ -214,7 +214,7 @@ class UnparsePython(object):
def _ast_expr(self, node): def _ast_expr(self, node):
"""Add an AST Expr in output.""" """Add an AST Expr in output."""
if not isinstance(node.value, ast.Str): # ignore docstrings if not isinstance(node.value, ast.Constant): # ignore docstrings
self.add( self.add(
self.fill, self.fill,
node.value, node.value,
@@ -283,7 +283,6 @@ class UnparsePython(object):
def _ast_num(self, node): def _ast_num(self, node):
"""Add an AST Num in output.""" """Add an AST Num in output."""
# note: deprecated since Python 3.8, replaced by ast.Constant
self.add(repr(node.n)) self.add(repr(node.n))
def _ast_pass(self, node): # pylint: disable=unused-argument def _ast_pass(self, node): # pylint: disable=unused-argument
@@ -298,7 +297,6 @@ class UnparsePython(object):
def _ast_str(self, node): def _ast_str(self, node):
"""Add an AST Str in output.""" """Add an AST Str in output."""
# note: deprecated since Python 3.8, replaced by ast.Constant
self._ast_constant(node) self._ast_constant(node)
def _ast_subscript(self, node): def _ast_subscript(self, node):
@@ -405,11 +403,11 @@ class UnparsePerl(UnparsePython):
def _ast_constant(self, node): def _ast_constant(self, node):
"""Add an AST Constant in output.""" """Add an AST Constant in output."""
if isinstance(node.value, str): if isinstance(node.value, str):
self.add('"%s"' % node.s.replace('$', '\\$').replace('@', '\\@')) self.add('"%s"' % node.value.replace('$', '\\$').replace('@', '\\@'))
elif node.value is None: elif node.value is None:
self.add('undef') self.add('undef')
else: else:
self.add(repr(node.s)) self.add(repr(node.value))
def _ast_dict(self, node): def _ast_dict(self, node):
"""Add an AST Dict in output.""" """Add an AST Dict in output."""
@@ -422,7 +420,7 @@ class UnparsePerl(UnparsePython):
def _ast_expr(self, node): def _ast_expr(self, node):
"""Add an AST Expr in output.""" """Add an AST Expr in output."""
if not isinstance(node.value, ast.Str): # ignore docstrings if not isinstance(node.value, ast.Constant): # ignore docstrings
self.add( self.add(
self.fill, self.fill,
node.value, node.value,
@@ -512,8 +510,7 @@ class UnparsePerl(UnparsePython):
def _ast_str(self, node): def _ast_str(self, node):
"""Add an AST Str in output.""" """Add an AST Str in output."""
# note: deprecated since Python 3.8, replaced by ast.Constant self._ast_constant(node)
self.add('"%s"' % node.s.replace('$', '\\$').replace('@', '\\@'))
def _ast_subscript(self, node): def _ast_subscript(self, node):
"""Add an AST Subscript in output.""" """Add an AST Subscript in output."""
@@ -548,11 +545,11 @@ class UnparseRuby(UnparsePython):
def _ast_constant(self, node): def _ast_constant(self, node):
"""Add an AST Constant in output.""" """Add an AST Constant in output."""
if isinstance(node.value, str): if isinstance(node.value, str):
self.add('"%s"' % node.s.replace('#{', '\\#{')) self.add('"%s"' % node.value.replace('#{', '\\#{'))
elif node.value is None: elif node.value is None:
self.add('nil') self.add('nil')
else: else:
self.add(repr(node.s)) self.add(repr(node.value))
def _ast_dict(self, node): def _ast_dict(self, node):
"""Add an AST Dict in output.""" """Add an AST Dict in output."""
@@ -619,8 +616,7 @@ class UnparseRuby(UnparsePython):
def _ast_str(self, node): def _ast_str(self, node):
"""Add an AST Str in output.""" """Add an AST Str in output."""
# note: deprecated since Python 3.8, replaced by ast.Constant self._ast_constant(node)
self.add('"%s"' % node.s)
class UnparseLua(UnparsePython): class UnparseLua(UnparsePython):
@@ -663,7 +659,7 @@ class UnparseLua(UnparsePython):
if node.value is None: if node.value is None:
self.add('nil') self.add('nil')
else: else:
self.add(repr(node.s)) self.add(repr(node.value))
def _ast_dict(self, node): def _ast_dict(self, node):
"""Add an AST Dict in output.""" """Add an AST Dict in output."""
@@ -744,7 +740,7 @@ class UnparseTcl(UnparsePython):
def _ast_assign(self, node): def _ast_assign(self, node):
"""Add an AST Assign in output.""" """Add an AST Assign in output."""
exclude_types = (ast.Dict, ast.List, ast.Str, ast.Subscript) exclude_types = (ast.Dict, ast.List, ast.Constant, ast.Subscript)
self.add( self.add(
self.fill, self.fill,
'set ', 'set ',
@@ -821,11 +817,11 @@ class UnparseTcl(UnparsePython):
def _ast_constant(self, node): def _ast_constant(self, node):
"""Add an AST Constant in output.""" """Add an AST Constant in output."""
if isinstance(node.value, str): if isinstance(node.value, str):
self.add('"%s"' % node.s.replace('$', '\\$')) self.add('"%s"' % node.value.replace('$', '\\$'))
elif node.value is None: elif node.value is None:
self.add('$::weechat::WEECHAT_NULL') self.add('$::weechat::WEECHAT_NULL')
else: else:
self.add(repr(node.s)) self.add(repr(node.value))
def _ast_dict(self, node): def _ast_dict(self, node):
"""Add an AST Dict in output.""" """Add an AST Dict in output."""
@@ -903,8 +899,7 @@ class UnparseTcl(UnparsePython):
def _ast_str(self, node): def _ast_str(self, node):
"""Add an AST Str in output.""" """Add an AST Str in output."""
# note: deprecated since Python 3.8, replaced by ast.Constant self._ast_constant(node)
self.add('"%s"' % node.s.replace('$', '\\$'))
def _ast_subscript(self, node): def _ast_subscript(self, node):
"""Add an AST Subscript in output.""" """Add an AST Subscript in output."""
@@ -965,8 +960,8 @@ class UnparseGuile(UnparsePython):
def _ast_binop(self, node): def _ast_binop(self, node):
"""Add an AST BinOp in output.""" """Add an AST BinOp in output."""
if isinstance(node.op, ast.Add) and \ if isinstance(node.op, ast.Add) and \
(isinstance(node.left, (ast.Name, ast.Str)) or (isinstance(node.left, (ast.Name, ast.Constant)) or
isinstance(node.right, (ast.Name, ast.Str))): isinstance(node.right, (ast.Name, ast.Constant))):
self.add( self.add(
'(string-append ', '(string-append ',
node.left, node.left,
@@ -1014,12 +1009,12 @@ class UnparseGuile(UnparsePython):
def _ast_constant(self, node): def _ast_constant(self, node):
"""Add an AST Constant in output.""" """Add an AST Constant in output."""
if isinstance(node.s, str): if isinstance(node.value, str):
self.add('"%s"' % node.s) self.add('"%s"' % node.value)
elif node.value is None: elif node.value is None:
self.add('#nil') self.add('#nil')
else: else:
self.add(repr(node.s)) self.add(repr(node.value))
def _ast_dict(self, node): def _ast_dict(self, node):
"""Add an AST Dict in output.""" """Add an AST Dict in output."""
@@ -1111,8 +1106,7 @@ class UnparseGuile(UnparsePython):
def _ast_str(self, node): def _ast_str(self, node):
"""Add an AST Str in output.""" """Add an AST Str in output."""
# note: deprecated since Python 3.8, replaced by ast.Constant self._ast_constant(node)
self.add('"%s"' % node.s)
def _ast_subscript(self, node): def _ast_subscript(self, node):
"""Add an AST Subscript in output.""" """Add an AST Subscript in output."""
@@ -1149,7 +1143,7 @@ class UnparseJavascript(UnparsePython):
if node.value is None: if node.value is None:
self.add('null') self.add('null')
else: else:
self.add(repr(node.s)) self.add(repr(node.value))
def _ast_functiondef(self, node): def _ast_functiondef(self, node):
"""Add an AST FunctionDef in output.""" """Add an AST FunctionDef in output."""
@@ -1227,8 +1221,8 @@ class UnparsePhp(UnparsePython):
def _ast_binop(self, node): def _ast_binop(self, node):
"""Add an AST BinOp in output.""" """Add an AST BinOp in output."""
if isinstance(node.op, ast.Add) and \ if isinstance(node.op, ast.Add) and \
(isinstance(node.left, (ast.Name, ast.Str)) or (isinstance(node.left, (ast.Name, ast.Constant)) or
isinstance(node.right, (ast.Name, ast.Str))): isinstance(node.right, (ast.Name, ast.Constant))):
str_op = '.' str_op = '.'
else: else:
str_op = self.binop[node.op.__class__.__name__] str_op = self.binop[node.op.__class__.__name__]
@@ -1253,12 +1247,12 @@ class UnparsePhp(UnparsePython):
def _ast_constant(self, node): def _ast_constant(self, node):
"""Add an AST Constant in output.""" """Add an AST Constant in output."""
if isinstance(node.s, str): if isinstance(node.value, str):
self.add('"%s"' % node.s.replace('$', '\\$')) self.add('"%s"' % node.value.replace('$', '\\$'))
elif node.value is None: elif node.value is None:
self.add('NULL') self.add('NULL')
else: else:
self.add(repr(node.s)) self.add(repr(node.value))
def _ast_dict(self, node): def _ast_dict(self, node):
"""Add an AST Dict in output.""" """Add an AST Dict in output."""
@@ -1271,7 +1265,7 @@ class UnparsePhp(UnparsePython):
def _ast_expr(self, node): def _ast_expr(self, node):
"""Add an AST Expr in output.""" """Add an AST Expr in output."""
if not isinstance(node.value, ast.Str): # ignore docstrings if not isinstance(node.value, ast.Constant): # ignore docstrings
self.add( self.add(
self.fill, self.fill,
node.value, node.value,
@@ -1353,8 +1347,7 @@ class UnparsePhp(UnparsePython):
def _ast_str(self, node): def _ast_str(self, node):
"""Add an AST Str in output.""" """Add an AST Str in output."""
# note: deprecated since Python 3.8, replaced by ast.Constant self._ast_constant(node)
self.add('"%s"' % node.s.replace('$', '\\$'))
def _ast_subscript(self, node): def _ast_subscript(self, node):
"""Add an AST Subscript in output.""" """Add an AST Subscript in output."""
+18
View File
@@ -51,6 +51,10 @@
# PACKAGER_EMAIL E-mail of packager (for debian/changelog) # PACKAGER_EMAIL E-mail of packager (for debian/changelog)
# JOBS Number of simultaneous jobs (for dpkg-buildpackage) # JOBS Number of simultaneous jobs (for dpkg-buildpackage)
# (numeric or "auto" for dpkg >= 1.17.10) # (numeric or "auto" for dpkg >= 1.17.10)
# RETRY_BUILD Retry build with `make` multiple times in case of failure
# (default is 0: do not retry and exit with error);
# when set, this patches the file debian/rules to run
# dh_auto_build multiple times in case of failure
# #
set -o errexit set -o errexit
@@ -59,6 +63,7 @@ set -o errexit
default_packager_name="Sébastien Helleu" default_packager_name="Sébastien Helleu"
default_packager_email="flashcode@flashtux.org" default_packager_email="flashcode@flashtux.org"
default_jobs="" default_jobs=""
default_retry_build="0"
usage () usage ()
{ {
@@ -132,6 +137,9 @@ fi
# simultaneous jobs for compilation (dpkg-buildpackage -jN) # simultaneous jobs for compilation (dpkg-buildpackage -jN)
[ -z "${JOBS}" ] && JOBS="${default_jobs}" [ -z "${JOBS}" ] && JOBS="${default_jobs}"
# retry build
[ -z "${RETRY_BUILD}" ] && RETRY_BUILD="${default_retry_build}"
# check git repository # check git repository
root_dir=$(git rev-parse --show-toplevel) root_dir=$(git rev-parse --show-toplevel)
if [ -z "${root_dir}" ] || [ ! -e "${root_dir}/.git" ] || [ ! -d "${root_dir}/debian-stable" ]; then if [ -z "${root_dir}" ] || [ ! -e "${root_dir}/.git" ] || [ ! -d "${root_dir}/debian-stable" ]; then
@@ -244,6 +252,16 @@ fi
echo " - Updating changelog: ${DEB_NAME} ${DEB_VERSION} (${DCH_DISTRO}, ${DCH_URGENCY}), ${PACKAGER_NAME} <${PACKAGER_EMAIL}>: ${DCH_CHANGELOG}" echo " - Updating changelog: ${DEB_NAME} ${DEB_VERSION} (${DCH_DISTRO}, ${DCH_URGENCY}), ${PACKAGER_NAME} <${PACKAGER_EMAIL}>: ${DCH_CHANGELOG}"
DEBFULLNAME="${PACKAGER_NAME}" DEBEMAIL="${PACKAGER_EMAIL}" dch "${DCH_CREATE}" --package "${DEB_NAME}" --newversion "${DEB_VERSION}" --distribution "${DCH_DISTRO}" --urgency "${DCH_URGENCY}" "${DCH_CHANGELOG}" DEBFULLNAME="${PACKAGER_NAME}" DEBEMAIL="${PACKAGER_EMAIL}" dch "${DCH_CREATE}" --package "${DEB_NAME}" --newversion "${DEB_VERSION}" --distribution "${DCH_DISTRO}" --urgency "${DCH_URGENCY}" "${DCH_CHANGELOG}"
# if retry build is enabled, patch debian/rules to run dh_auto_build
# multiple times if needed
if [ "${RETRY_BUILD}" != "0" ]; then
cat <<EOF >> debian/rules
override_dh_auto_build:
dh_auto_build || dh_auto_build || dh_auto_build || dh_auto_build || dh_auto_build || dh_auto_build
EOF
fi
# build packages (without debug symbols) # build packages (without debug symbols)
DEB_BUILD_OPTIONS="noddebs" dpkg-buildpackage -us -uc --jobs="${JOBS}" DEB_BUILD_OPTIONS="noddebs" dpkg-buildpackage -us -uc --jobs="${JOBS}"
@@ -1,5 +1,18 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5d15a3548..0786637b9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,7 +19,7 @@
# along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
#
-cmake_minimum_required(VERSION 3.18)
+cmake_minimum_required(VERSION 3.16)
project(weechat C)
diff --git a/debian-devel/rules b/debian-devel/rules diff --git a/debian-devel/rules b/debian-devel/rules
index cab713c93..d2756333b 100755 index 086056f76..559ccfffb 100755
--- a/debian-devel/rules --- a/debian-devel/rules
+++ b/debian-devel/rules +++ b/debian-devel/rules
@@ -8,6 +8,7 @@ override_dh_auto_configure: @@ -8,6 +8,7 @@ override_dh_auto_configure:
@@ -11,7 +24,7 @@ index cab713c93..d2756333b 100755
-DENABLE_MAN:BOOL=ON \ -DENABLE_MAN:BOOL=ON \
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \ -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
diff --git a/debian-stable/rules b/debian-stable/rules diff --git a/debian-stable/rules b/debian-stable/rules
index cab713c93..d2756333b 100755 index 086056f76..559ccfffb 100755
--- a/debian-stable/rules --- a/debian-stable/rules
+++ b/debian-stable/rules +++ b/debian-stable/rules
@@ -8,6 +8,7 @@ override_dh_auto_configure: @@ -8,6 +8,7 @@ override_dh_auto_configure:
@@ -22,3 +35,18 @@ index cab713c93..d2756333b 100755
-DENABLE_DOC:BOOL=ON \ -DENABLE_DOC:BOOL=ON \
-DENABLE_MAN:BOOL=ON \ -DENABLE_MAN:BOOL=ON \
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \ -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
diff --git a/src/plugins/ruby/CMakeLists.txt b/src/plugins/ruby/CMakeLists.txt
index 9f921fde8..2860f7d6d 100644
--- a/src/plugins/ruby/CMakeLists.txt
+++ b/src/plugins/ruby/CMakeLists.txt
@@ -28,8 +28,8 @@ if(RUBY_FOUND)
# caused by Ruby headers (with Ruby ≥ 3.1.0)
# see: https://github.com/ruby/ruby/pull/7085
add_definitions(-Wno-unused-parameter)
- include_directories(${Ruby_INCLUDE_DIRS})
- target_link_libraries(ruby ${Ruby_LIBRARIES} weechat_plugins_scripts coverage_config)
+ include_directories(${RUBY_INCLUDE_DIRS})
+ target_link_libraries(ruby ${RUBY_LIBRARY} weechat_plugins_scripts coverage_config)
endif(RUBY_FOUND)
install(TARGETS ruby LIBRARY DESTINATION "${WEECHAT_LIBDIR}/plugins")
+2 -2
View File
@@ -39,8 +39,8 @@
# devel-number the devel version as hex number ("0x04010000" for "4.1.0-dev") # devel-number the devel version as hex number ("0x04010000" for "4.1.0-dev")
# #
weechat_stable="4.4.3" weechat_stable="4.4.4"
weechat_devel="4.4.3" weechat_devel="4.4.5-dev"
stable_major=$(echo "${weechat_stable}" | cut -d"." -f1) stable_major=$(echo "${weechat_stable}" | cut -d"." -f1)
stable_minor=$(echo "${weechat_stable}" | cut -d"." -f2) stable_minor=$(echo "${weechat_stable}" | cut -d"." -f2)