diff --git a/CMakeLists.txt b/CMakeLists.txt index b7c719a54..83b332e67 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,6 +46,7 @@ OPTION(ENABLE_DEMO "Enable Demo plugin") OPTION(DISABLE_FIFO "Disable FIFO plugin") OPTION(DISABLE_IRC "Disable IRC plugin") OPTION(DISABLE_LOGGER "Disable Logger plugin") +OPTION(DISABLE_NOTIFY "Disable Notify plugin") OPTION(DISABLE_SCRIPTS "Disable script plugins") OPTION(DISABLE_PERL "Disable Perl scripting language") OPTION(DISABLE_PYTHON "Disable Python scripting language") diff --git a/ChangeLog b/ChangeLog index 6e344b10b..e74fe9109 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,7 @@ WeeChat - Wee Enhanced Environment for Chat =========================================== -ChangeLog - 2008-06-15 +ChangeLog - 2008-06-17 Version 0.2.7 (under dev!): @@ -27,7 +27,7 @@ Version 0.2.7 (under dev!): * improve main loop: higher timout in select(), less CPU usage * add /reload command to reload WeeChat and plugins config files (signal SIGHUP is catched to reload config files) - * new plugins: IRC, alias, demo, fifo, logger, trigger, xfer + * new plugins: IRC, alias, demo, fifo, logger, notify, trigger, xfer * add hooks: command, timer, file descriptor, print, signal, config, completion, modifier * new plugin API with many new functions: hooks, buffer management, bars, diff --git a/configure.in b/configure.in index cdcb318ef..d4be42abe 100644 --- a/configure.in +++ b/configure.in @@ -101,6 +101,7 @@ AH_VERBATIM([PLUGIN_DEMO], [#undef PLUGIN_DEMO]) AH_VERBATIM([PLUGIN_FIFO], [#undef PLUGIN_FIFO]) AH_VERBATIM([PLUGIN_IRC], [#undef PLUGIN_IRC]) AH_VERBATIM([PLUGIN_LOGGER], [#undef PLUGIN_LOGGER]) +AH_VERBATIM([PLUGIN_NOTIFY], [#undef PLUGIN_NOTIFY]) AH_VERBATIM([PLUGIN_PERL], [#undef PLUGIN_PERL]) AH_VERBATIM([PLUGIN_PYTHON], [#undef PLUGIN_PYTHON]) AH_VERBATIM([PLUGIN_RUBY], [#undef PLUGIN_RUBY]) @@ -123,6 +124,7 @@ AC_ARG_ENABLE(demo, [ --enable-demo turn on Demo plugin (defa AC_ARG_ENABLE(fifo, [ --disable-fifo turn off Fifo plugin (default=compiled)],enable_fifo=$enableval,enable_fifo=yes) AC_ARG_ENABLE(irc, [ --disable-irc turn off IRC plugin (default=compiled)],enable_irc=$enableval,enable_irc=yes) AC_ARG_ENABLE(logger, [ --disable-logger turn off Logger plugin (default=compiled)],enable_logger=$enableval,enable_logger=yes) +AC_ARG_ENABLE(notify, [ --disable-notify turn off Notify plugin (default=compiled)],enable_notify=$enableval,enable_notify=yes) AC_ARG_ENABLE(scripts, [ --disable-scripts turn off script plugins (default=compiled if found)],enable_scripts=$enableval,enable_scripts=yes) AC_ARG_ENABLE(perl, [ --disable-perl turn off Perl script plugin (default=compiled if found)],enable_perl=$enableval,enable_perl=yes) AC_ARG_ENABLE(python, [ --disable-python turn off Python script plugin (default=compiled if found)],enable_python=$enableval,enable_python=yes) @@ -390,6 +392,18 @@ else not_asked="$not_asked logger" fi +# --------------------------------- notify ------------------------------------- + +if test "x$enable_notify" = "xyes" ; then + NOTIFY_CFLAGS="" + NOTIFY_LFLAGS="" + AC_SUBST(NOTIFY_CFLAGS) + AC_SUBST(NOTIFY_LFLAGS) + AC_DEFINE(PLUGIN_NOTIFY) +else + not_asked="$not_asked notify" +fi + # ---------------------------------- perl -------------------------------------- PERL_VERSION= @@ -883,6 +897,7 @@ AM_CONDITIONAL(PLUGIN_DEMO, test "$enable_demo" = "yes") AM_CONDITIONAL(PLUGIN_FIFO, test "$enable_fifo" = "yes") AM_CONDITIONAL(PLUGIN_IRC, test "$enable_irc" = "yes") AM_CONDITIONAL(PLUGIN_LOGGER, test "$enable_logger" = "yes") +AM_CONDITIONAL(PLUGIN_NOTIFY, test "$enable_notify" = "yes") AM_CONDITIONAL(PLUGIN_PERL, test "$enable_perl" = "yes") AM_CONDITIONAL(PLUGIN_PYTHON, test "$enable_python" = "yes") AM_CONDITIONAL(PLUGIN_RUBY, test "$enable_ruby" = "yes") @@ -911,6 +926,7 @@ AC_OUTPUT([Makefile src/plugins/fifo/Makefile src/plugins/irc/Makefile src/plugins/logger/Makefile + src/plugins/notify/Makefile src/plugins/scripts/Makefile src/plugins/scripts/perl/Makefile src/plugins/scripts/python/Makefile @@ -975,6 +991,9 @@ fi if test "x$enable_logger" = "xyes"; then listplugins="$listplugins logger" fi +if test "x$enable_notify" = "xyes"; then + listplugins="$listplugins notify" +fi if test "x$enable_perl" = "xyes"; then listplugins="$listplugins perl($PERL_VERSION)" fi diff --git a/po/POTFILES.in b/po/POTFILES.in index 5703819be..009f18c9d 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -127,6 +127,7 @@ ./src/plugins/logger/logger.h ./src/plugins/logger/logger-tail.c ./src/plugins/logger/logger-tail.h +./src/plugins/notify/notify.c ./src/plugins/plugin-api.c ./src/plugins/plugin-api.h ./src/plugins/plugin.c @@ -165,9 +166,9 @@ ./src/plugins/trigger/trigger-libirc.c ./src/plugins/trigger/trigger-libirc.h ./src/plugins/weechat-plugin.h -./src/plugins/xfer/xfer.c ./src/plugins/xfer/xfer-buffer.c ./src/plugins/xfer/xfer-buffer.h +./src/plugins/xfer/xfer.c ./src/plugins/xfer/xfer-chat.c ./src/plugins/xfer/xfer-chat.h ./src/plugins/xfer/xfer-command.c diff --git a/po/cs.po b/po/cs.po index d0fa973ec..144dbe4ff 100644 --- a/po/cs.po +++ b/po/cs.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-06-15 15:11+0200\n" +"POT-Creation-Date: 2008-06-17 15:58+0200\n" "PO-Revision-Date: 2007-09-06 12:44+0200\n" "Last-Translator: Jiri Golembiovsky \n" "Language-Team: weechat-dev \n" @@ -189,30 +189,6 @@ msgstr "" msgid "Notify levels:" msgstr "Level upozornění:" -#, fuzzy, c-format -msgid "%sError: incorrect notify level (must be between %d and %d)" -msgstr "%s nekorektní level upozornění (musí být mezi %d a %d)\n" - -#, fuzzy, c-format -msgid "New notify level for %s%s%s: %d %s" -msgstr "Nový level upozornění %s%s%s: %s%d %s" - -#, fuzzy -msgid "(hotlist: never)" -msgstr "(hotlist: nikdy)\n" - -#, fuzzy -msgid "(hotlist: highlights)" -msgstr "(hotlist: zvýraznění)\n" - -#, fuzzy -msgid "(hotlist: highlights + messages)" -msgstr "(hotlist: zvýraznění + zprávy)\n" - -#, fuzzy -msgid "(hotlist: highlights + messages + join/part (all))" -msgstr "(hotlist: zvýrazění + zprávy + připojení/odpojení (vše))\n" - #, fuzzy, c-format msgid "%sPlugin \"%s\" not found" msgstr "%s adresa \"%s\" nenalezena\n" @@ -627,10 +603,7 @@ msgid "" " move: move buffer in the list (may be relative, for example -1)\n" " close: close buffer\n" " list: list buffers (no parameter implies this list)\n" -" notify: set notify level for buffer (0=never, 1=highlight, 2=1+msg, 3=2" -"+join/part)\n" -" (when executed on server buffer, this sets default notify level for " -"whole server)\n" +" notify: display notify levels for all open buffers\n" " scroll: scroll in history (may be relative, and may end by a letter: s=sec, " "m=min, h=hour, d=day, M=month, y=year); if there is only letter, then scroll " "to beginning of this item\n" @@ -644,9 +617,8 @@ msgid "" " clear all buffers: /buffer clear -all\n" " move buffer: /buffer move 5\n" " close buffer: /buffer close this is part msg\n" -" set notify: /buffer notify 2\n" -" scroll 1 day up: /buffer scroll 1d == /buffer scroll -1d == /" -"buffer scroll -24h\n" +" scroll 1 day up: /buffer scroll 1d == /buffer scroll -1d == /buffer " +"scroll -24h\n" " scroll to beginning\n" " of this day: /buffer scroll d\n" " scroll 15 min down: /buffer scroll +15m\n" @@ -964,6 +936,11 @@ msgstr "WeeChat slogan (pokud je prázdné, není slogan použit)" msgid "the geekiest chat client!" msgstr "" +msgid "" +"default notify level for buffers (used to tell WeeChat if buffer must be " +"displayed in hotlist or not, according to importance of message)" +msgstr "" + #, fuzzy msgid "time format for buffers" msgstr "časová známka pro buffer" @@ -1463,13 +1440,6 @@ msgstr "uživatelské jméno pro proxy server" msgid "password for proxy server" msgstr "heslo pro proxy server" -msgid "" -"path for searching plugins ('%h' will be replaced by WeeChat home, ~/." -"weechat by default)" -msgstr "" -"cesta pro hledání pluginů ('%h' bude nahrazeno domácím adresářem WeeChat, ~/." -"weechat je výchozí)" - #, fuzzy msgid "" "comma separated list of plugins to load automatically at startup, \"*\" " @@ -1480,11 +1450,23 @@ msgstr "" "znamená všechny nalezené pluginy (jména mohou být částečná, například \"perl" "\" je OK pro \"libperl.so\")" +msgid "" +"enable debug messages by default in all plugins (option disabled by default, " +"which is highly recommended)" +msgstr "" + msgid "" "standard plugins extension in filename (for example \".so\" under Linux or " "\".dll\" under Microsoft Windows)" msgstr "" +msgid "" +"path for searching plugins ('%h' will be replaced by WeeChat home, ~/." +"weechat by default)" +msgstr "" +"cesta pro hledání pluginů ('%h' bude nahrazeno domácím adresářem WeeChat, ~/." +"weechat je výchozí)" + #, fuzzy msgid "save configuration files when unloading plugins" msgstr "uložit soubor s nastavením při ukončení" @@ -3930,6 +3912,41 @@ msgstr "**** End of log " msgid "===\t========== End of backlog (%d lines) ==========" msgstr "" +#, c-format +msgid "notify: debug: set notify for buffer %s to %d (%s)" +msgstr "" + +#, fuzzy, c-format +msgid "%s%s: unable to set notify level \"%s\" => \"%s\"" +msgstr "%s nedostatek paměti pro infobar zprávu\n" + +#, fuzzy, c-format +msgid "Notify level: %s => %s" +msgstr "Level upozornění:" + +#, fuzzy, c-format +msgid "Notify level: %s: removed" +msgstr "Level upozornění:" + +#, fuzzy, c-format +msgid "%s%s: unknown notify level \"%s\"" +msgstr "%s neznámá klávesová funkce \"%s\"\n" + +#, fuzzy +msgid "change notify level for current buffer" +msgstr "nenalezeno jméno kanálu pro buffer" + +msgid "[reset | none | highlight | message | all]" +msgstr "" + +msgid "" +" reset: reset notify level to default value\n" +" none: buffer will never be in hotlist\n" +"highlight: buffer will be in hotlist for highlights only\n" +" message: buffer will be in hotlist for highlights and user messages only\n" +" all: buffer will be in hotlist for any text printed" +msgstr "" + #, fuzzy, c-format msgid "%sError: unable to load plugin \"%s\": %s" msgstr "%s nemůžu načist plugin \"%s\": %s\n" @@ -4197,6 +4214,48 @@ msgstr "" msgid "%s%s: wrong arguments for function \"%s\"" msgstr "%s špatné parametry pro příkaz \"%s\"\n" +msgid "bytes" +msgstr "bajtů" + +msgid "KB" +msgstr "KB" + +msgid "MB" +msgstr "MB" + +msgid "GB" +msgstr "GB" + +msgid "Actions (letter+enter):" +msgstr "" + +msgid " [A] Accept" +msgstr " [A] Akceptovat" + +msgid " [C] Cancel" +msgstr " [C] Storno" + +msgid " [R] Remove" +msgstr " [R] Odebrat" + +#, fuzzy +msgid " [P] Purge finished" +msgstr " [P] Pročistit staré DCC" + +#, fuzzy +msgid " [Q] Close xfer list" +msgstr " [Q] Zavřít DCC pohled" + +msgid "xfer chat" +msgstr "" + +msgid "ETA" +msgstr "ETA" + +#, fuzzy +msgid "Xfer list" +msgstr "vyčisti hotlist" + #, fuzzy msgid "waiting" msgstr "Čekám" @@ -4247,9 +4306,6 @@ msgstr "DCC rozhovor zavřen s %s%s %s(%s%d.%d.%d.%d%s)\n" msgid "%s%s: not enough memory for new xfer" msgstr "%s nedostatek paměti pro nové DCC\n" -msgid "xfer chat" -msgstr "" - #, fuzzy, c-format msgid "%s: incoming file from %s (%d.%d.%d.%d): %s, %lu bytes (protocol: %s)" msgstr "" @@ -4332,45 +4388,6 @@ msgstr "" msgid "%s%s: aborting active xfer: \"%s\" from %s" msgstr "Ruším aktivní DCC: \"%s\" od %s\n" -msgid "bytes" -msgstr "bajtů" - -msgid "KB" -msgstr "KB" - -msgid "MB" -msgstr "MB" - -msgid "GB" -msgstr "GB" - -msgid "Actions (letter+enter):" -msgstr "" - -msgid " [A] Accept" -msgstr " [A] Akceptovat" - -msgid " [C] Cancel" -msgstr " [C] Storno" - -msgid " [R] Remove" -msgstr " [R] Odebrat" - -#, fuzzy -msgid " [P] Purge finished" -msgstr " [P] Pročistit staré DCC" - -#, fuzzy -msgid " [Q] Close xfer list" -msgstr " [Q] Zavřít DCC pohled" - -msgid "ETA" -msgstr "ETA" - -#, fuzzy -msgid "Xfer list" -msgstr "vyčisti hotlist" - #, fuzzy, c-format msgid "%s%s: error sending data to \"%s\" via xfer chat" msgstr "%s chyba posílání dat k \"%s\" přes DCC CHAT\n" @@ -4572,6 +4589,30 @@ msgstr "%s DCC: nemohu nastavit 'neblokovaci' volbu na soket\n" msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s chybí argument pro volbu \"%s\"\n" +#, fuzzy +#~ msgid "%sError: incorrect notify level (must be between %d and %d)" +#~ msgstr "%s nekorektní level upozornění (musí být mezi %d a %d)\n" + +#, fuzzy +#~ msgid "New notify level for %s%s%s: %d %s" +#~ msgstr "Nový level upozornění %s%s%s: %s%d %s" + +#, fuzzy +#~ msgid "(hotlist: never)" +#~ msgstr "(hotlist: nikdy)\n" + +#, fuzzy +#~ msgid "(hotlist: highlights)" +#~ msgstr "(hotlist: zvýraznění)\n" + +#, fuzzy +#~ msgid "(hotlist: highlights + messages)" +#~ msgstr "(hotlist: zvýraznění + zprávy)\n" + +#, fuzzy +#~ msgid "(hotlist: highlights + messages + join/part (all))" +#~ msgstr "(hotlist: zvýrazění + zprávy + připojení/odpojení (vše))\n" + #, fuzzy #~ msgid "words to highlight in buffers" #~ msgstr "přesunout na další zvýraznění v bufferu" diff --git a/po/de.po b/po/de.po index 9998da2c0..d5b8c228b 100644 --- a/po/de.po +++ b/po/de.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-06-15 15:11+0200\n" +"POT-Creation-Date: 2008-06-17 15:58+0200\n" "PO-Revision-Date: 2007-09-06 12:44+0200\n" "Last-Translator: Thomas Schuetz \n" "Language-Team: weechat-dev \n" @@ -194,30 +194,6 @@ msgstr "" msgid "Notify levels:" msgstr "Notify-Ebenen:" -#, fuzzy, c-format -msgid "%sError: incorrect notify level (must be between %d and %d)" -msgstr "%s ungültige Notify-Ebene (muss zwischen %d und %d liegen)\n" - -#, fuzzy, c-format -msgid "New notify level for %s%s%s: %d %s" -msgstr "Neue Notify-Ebenen für: %s%s%s: %s%d %s" - -#, fuzzy -msgid "(hotlist: never)" -msgstr "(Hotlist: keine Anzeige)\n" - -#, fuzzy -msgid "(hotlist: highlights)" -msgstr "(Hotlist: Hervorhebungen)\n" - -#, fuzzy -msgid "(hotlist: highlights + messages)" -msgstr "(Hotlist: Hervorhebungen und Nachrichten)\n" - -#, fuzzy -msgid "(hotlist: highlights + messages + join/part (all))" -msgstr "(Hotlist: Hervorhebungen, Nachrichten, Betreten und Verlassen)\n" - #, fuzzy, c-format msgid "%sPlugin \"%s\" not found" msgstr "%s Adresse \"%s\" nicht gefunden\n" @@ -635,10 +611,7 @@ msgid "" " move: move buffer in the list (may be relative, for example -1)\n" " close: close buffer\n" " list: list buffers (no parameter implies this list)\n" -" notify: set notify level for buffer (0=never, 1=highlight, 2=1+msg, 3=2" -"+join/part)\n" -" (when executed on server buffer, this sets default notify level for " -"whole server)\n" +" notify: display notify levels for all open buffers\n" " scroll: scroll in history (may be relative, and may end by a letter: s=sec, " "m=min, h=hour, d=day, M=month, y=year); if there is only letter, then scroll " "to beginning of this item\n" @@ -652,9 +625,8 @@ msgid "" " clear all buffers: /buffer clear -all\n" " move buffer: /buffer move 5\n" " close buffer: /buffer close this is part msg\n" -" set notify: /buffer notify 2\n" -" scroll 1 day up: /buffer scroll 1d == /buffer scroll -1d == /" -"buffer scroll -24h\n" +" scroll 1 day up: /buffer scroll 1d == /buffer scroll -1d == /buffer " +"scroll -24h\n" " scroll to beginning\n" " of this day: /buffer scroll d\n" " scroll 15 min down: /buffer scroll +15m\n" @@ -961,6 +933,11 @@ msgstr "WeeChat-Slogan (wenn leer, wird keiner benutzt)" msgid "the geekiest chat client!" msgstr "" +msgid "" +"default notify level for buffers (used to tell WeeChat if buffer must be " +"displayed in hotlist or not, according to importance of message)" +msgstr "" + #, fuzzy msgid "time format for buffers" msgstr "Timestamp für Puffer" @@ -1456,13 +1433,6 @@ msgstr "Benutzername für die Proxyverbindung" msgid "password for proxy server" msgstr "Passwort für die Proxyverbindung" -msgid "" -"path for searching plugins ('%h' will be replaced by WeeChat home, ~/." -"weechat by default)" -msgstr "" -"Suchpfad für WeeChat-Plugins ('%h' wird durch das WeeChat-Basisiverzeichnis " -"ersetzt, voreingestellt ist ~/.weechat)" - #, fuzzy msgid "" "comma separated list of plugins to load automatically at startup, \"*\" " @@ -1473,11 +1443,23 @@ msgstr "" "sollen, \"*\" lädt alle gefundenen Plugins (es können auch Teile des Namens " "angegeben werden, \"perl\" lädt z.B. auch \"libperl.so\")" +msgid "" +"enable debug messages by default in all plugins (option disabled by default, " +"which is highly recommended)" +msgstr "" + msgid "" "standard plugins extension in filename (for example \".so\" under Linux or " "\".dll\" under Microsoft Windows)" msgstr "" +msgid "" +"path for searching plugins ('%h' will be replaced by WeeChat home, ~/." +"weechat by default)" +msgstr "" +"Suchpfad für WeeChat-Plugins ('%h' wird durch das WeeChat-Basisiverzeichnis " +"ersetzt, voreingestellt ist ~/.weechat)" + #, fuzzy msgid "save configuration files when unloading plugins" msgstr "Konfiguration beim Verlassen abspeichern" @@ -3913,6 +3895,41 @@ msgstr "**** End of log " msgid "===\t========== End of backlog (%d lines) ==========" msgstr "" +#, c-format +msgid "notify: debug: set notify for buffer %s to %d (%s)" +msgstr "" + +#, fuzzy, c-format +msgid "%s%s: unable to set notify level \"%s\" => \"%s\"" +msgstr "%s nicht genügend Speicher für Infobar-Nachricht\n" + +#, fuzzy, c-format +msgid "Notify level: %s => %s" +msgstr "Notify-Ebenen:" + +#, fuzzy, c-format +msgid "Notify level: %s: removed" +msgstr "Notify-Ebenen:" + +#, fuzzy, c-format +msgid "%s%s: unknown notify level \"%s\"" +msgstr "%s unbekannte Tasten-Funktion \"%s\"\n" + +#, fuzzy +msgid "change notify level for current buffer" +msgstr "Channelnamen für den Puffer nicht gefunden" + +msgid "[reset | none | highlight | message | all]" +msgstr "" + +msgid "" +" reset: reset notify level to default value\n" +" none: buffer will never be in hotlist\n" +"highlight: buffer will be in hotlist for highlights only\n" +" message: buffer will be in hotlist for highlights and user messages only\n" +" all: buffer will be in hotlist for any text printed" +msgstr "" + #, fuzzy, c-format msgid "%sError: unable to load plugin \"%s\": %s" msgstr "%s kann Plugin \"%s\" nicht laden: %s\n" @@ -4182,6 +4199,48 @@ msgstr "" msgid "%s%s: wrong arguments for function \"%s\"" msgstr "%s fehlerhafte Argumente für der \"%s\"-Befehl\n" +msgid "bytes" +msgstr "Bytes" + +msgid "KB" +msgstr "KB" + +msgid "MB" +msgstr "MB" + +msgid "GB" +msgstr "GB" + +msgid "Actions (letter+enter):" +msgstr "" + +msgid " [A] Accept" +msgstr " [A] annehmen" + +msgid " [C] Cancel" +msgstr " [C] abbrechen" + +msgid " [R] Remove" +msgstr " [R] entfernen" + +#, fuzzy +msgid " [P] Purge finished" +msgstr " [P] alte DCCs entfernen" + +#, fuzzy +msgid " [Q] Close xfer list" +msgstr " [Q] DCC-Ansicht schließen" + +msgid "xfer chat" +msgstr "" + +msgid "ETA" +msgstr "ETA" + +#, fuzzy +msgid "Xfer list" +msgstr "Hotlist leeren" + #, fuzzy msgid "waiting" msgstr "warten" @@ -4232,9 +4291,6 @@ msgstr "DCC Chat mit %s%s %s(%s%d.%d.%d.%d%s) geschlossen \n" msgid "%s%s: not enough memory for new xfer" msgstr "%s nicht genug Speicher für neuen DCC\n" -msgid "xfer chat" -msgstr "" - #, fuzzy, c-format msgid "%s: incoming file from %s (%d.%d.%d.%d): %s, %lu bytes (protocol: %s)" msgstr "" @@ -4318,45 +4374,6 @@ msgstr "" msgid "%s%s: aborting active xfer: \"%s\" from %s" msgstr "Aktiver DCC wird abgebrochen: \"%s\" von %s\n" -msgid "bytes" -msgstr "Bytes" - -msgid "KB" -msgstr "KB" - -msgid "MB" -msgstr "MB" - -msgid "GB" -msgstr "GB" - -msgid "Actions (letter+enter):" -msgstr "" - -msgid " [A] Accept" -msgstr " [A] annehmen" - -msgid " [C] Cancel" -msgstr " [C] abbrechen" - -msgid " [R] Remove" -msgstr " [R] entfernen" - -#, fuzzy -msgid " [P] Purge finished" -msgstr " [P] alte DCCs entfernen" - -#, fuzzy -msgid " [Q] Close xfer list" -msgstr " [Q] DCC-Ansicht schließen" - -msgid "ETA" -msgstr "ETA" - -#, fuzzy -msgid "Xfer list" -msgstr "Hotlist leeren" - #, fuzzy, c-format msgid "%s%s: error sending data to \"%s\" via xfer chat" msgstr "%s Fehler beim Senden von Daten an \"%s\" via DCC CHAT\n" @@ -4562,6 +4579,30 @@ msgstr "%s DCC: kann die 'nonblock'-Option für den Socket nicht festlegen\n" msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s fehlende Argumente für die \"--dir\"-Option\n" +#, fuzzy +#~ msgid "%sError: incorrect notify level (must be between %d and %d)" +#~ msgstr "%s ungültige Notify-Ebene (muss zwischen %d und %d liegen)\n" + +#, fuzzy +#~ msgid "New notify level for %s%s%s: %d %s" +#~ msgstr "Neue Notify-Ebenen für: %s%s%s: %s%d %s" + +#, fuzzy +#~ msgid "(hotlist: never)" +#~ msgstr "(Hotlist: keine Anzeige)\n" + +#, fuzzy +#~ msgid "(hotlist: highlights)" +#~ msgstr "(Hotlist: Hervorhebungen)\n" + +#, fuzzy +#~ msgid "(hotlist: highlights + messages)" +#~ msgstr "(Hotlist: Hervorhebungen und Nachrichten)\n" + +#, fuzzy +#~ msgid "(hotlist: highlights + messages + join/part (all))" +#~ msgstr "(Hotlist: Hervorhebungen, Nachrichten, Betreten und Verlassen)\n" + #, fuzzy #~ msgid "words to highlight in buffers" #~ msgstr "scrolle zur nächsten Hervorhebung im Puffer" diff --git a/po/es.po b/po/es.po index 333e7471f..6c82c595a 100644 --- a/po/es.po +++ b/po/es.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-06-15 15:11+0200\n" +"POT-Creation-Date: 2008-06-17 15:58+0200\n" "PO-Revision-Date: 2007-09-19 12:09+0200\n" "Last-Translator: Roberto González Cardenete \n" "Language-Team: weechat-dev \n" @@ -190,30 +190,6 @@ msgstr "" msgid "Notify levels:" msgstr "Niveles de notificación:" -#, fuzzy, c-format -msgid "%sError: incorrect notify level (must be between %d and %d)" -msgstr "%s nivel de notificación incorrecto (debe estar entre %d y %d)\n" - -#, fuzzy, c-format -msgid "New notify level for %s%s%s: %d %s" -msgstr "Nuevo nivel de notificación para %s%s%s: %s%d %s" - -#, fuzzy -msgid "(hotlist: never)" -msgstr "(hotlist: nunca)\n" - -#, fuzzy -msgid "(hotlist: highlights)" -msgstr "(hotlist: resaltados)\n" - -#, fuzzy -msgid "(hotlist: highlights + messages)" -msgstr "(hotlist: resaltados + mensajes)\n" - -#, fuzzy -msgid "(hotlist: highlights + messages + join/part (all))" -msgstr "(hotlist: resaltados + mensajes + join/part (todos))\n" - #, fuzzy, c-format msgid "%sPlugin \"%s\" not found" msgstr "%s dirección \"%s\" no encontrada\n" @@ -631,10 +607,7 @@ msgid "" " move: move buffer in the list (may be relative, for example -1)\n" " close: close buffer\n" " list: list buffers (no parameter implies this list)\n" -" notify: set notify level for buffer (0=never, 1=highlight, 2=1+msg, 3=2" -"+join/part)\n" -" (when executed on server buffer, this sets default notify level for " -"whole server)\n" +" notify: display notify levels for all open buffers\n" " scroll: scroll in history (may be relative, and may end by a letter: s=sec, " "m=min, h=hour, d=day, M=month, y=year); if there is only letter, then scroll " "to beginning of this item\n" @@ -648,9 +621,8 @@ msgid "" " clear all buffers: /buffer clear -all\n" " move buffer: /buffer move 5\n" " close buffer: /buffer close this is part msg\n" -" set notify: /buffer notify 2\n" -" scroll 1 day up: /buffer scroll 1d == /buffer scroll -1d == /" -"buffer scroll -24h\n" +" scroll 1 day up: /buffer scroll 1d == /buffer scroll -1d == /buffer " +"scroll -24h\n" " scroll to beginning\n" " of this day: /buffer scroll d\n" " scroll 15 min down: /buffer scroll +15m\n" @@ -939,6 +911,11 @@ msgstr "eslógan de WeeChat (si está vacío, el eslógan no será uti msgid "the geekiest chat client!" msgstr "" +msgid "" +"default notify level for buffers (used to tell WeeChat if buffer must be " +"displayed in hotlist or not, according to importance of message)" +msgstr "" + #, fuzzy msgid "time format for buffers" msgstr "fecha y hora para las búfers" @@ -1445,13 +1422,6 @@ msgstr "nombre de usuario para el servidor proxy" msgid "password for proxy server" msgstr "contraseña para el servidor proxy" -msgid "" -"path for searching plugins ('%h' will be replaced by WeeChat home, ~/." -"weechat by default)" -msgstr "" -"ruta para encontrar plugins ('%h' será reemplazado por el directorio raíz " -"de Weechat, ~/.weechat por defecto)" - #, fuzzy msgid "" "comma separated list of plugins to load automatically at startup, \"*\" " @@ -1462,11 +1432,23 @@ msgstr "" "iniciar, \"*\" significa todos los plugins encontrados (los nombres pueden " "ser parciales, por ejemplo \"perl\" está bien para \"libperl.so\")" +msgid "" +"enable debug messages by default in all plugins (option disabled by default, " +"which is highly recommended)" +msgstr "" + msgid "" "standard plugins extension in filename (for example \".so\" under Linux or " "\".dll\" under Microsoft Windows)" msgstr "" +msgid "" +"path for searching plugins ('%h' will be replaced by WeeChat home, ~/." +"weechat by default)" +msgstr "" +"ruta para encontrar plugins ('%h' será reemplazado por el directorio raíz " +"de Weechat, ~/.weechat por defecto)" + #, fuzzy msgid "save configuration files when unloading plugins" msgstr "guardar configuración a disco" @@ -3916,6 +3898,42 @@ msgstr "**** Fin del log " msgid "===\t========== End of backlog (%d lines) ==========" msgstr "" +#, c-format +msgid "notify: debug: set notify for buffer %s to %d (%s)" +msgstr "" + +#, fuzzy, c-format +msgid "%s%s: unable to set notify level \"%s\" => \"%s\"" +msgstr "" +"No hay suficiente memoria para el mensaje de la barra de información\n" + +#, fuzzy, c-format +msgid "Notify level: %s => %s" +msgstr "Niveles de notificación:" + +#, fuzzy, c-format +msgid "Notify level: %s: removed" +msgstr "Niveles de notificación:" + +#, fuzzy, c-format +msgid "%s%s: unknown notify level \"%s\"" +msgstr "%s opción desconocida para el comando \"%s\"\n" + +#, fuzzy +msgid "change notify level for current buffer" +msgstr "nombre de canal no encontrado para el búfer" + +msgid "[reset | none | highlight | message | all]" +msgstr "" + +msgid "" +" reset: reset notify level to default value\n" +" none: buffer will never be in hotlist\n" +"highlight: buffer will be in hotlist for highlights only\n" +" message: buffer will be in hotlist for highlights and user messages only\n" +" all: buffer will be in hotlist for any text printed" +msgstr "" + #, fuzzy, c-format msgid "%sError: unable to load plugin \"%s\": %s" msgstr "%s no ha sido posible cargar el plugin \"%s\": %s\n" @@ -4185,6 +4203,48 @@ msgstr "" msgid "%s%s: wrong arguments for function \"%s\"" msgstr "%s argumentos incorrectos para el comando \"%s\"\n" +msgid "bytes" +msgstr "bytes" + +msgid "KB" +msgstr "" + +msgid "MB" +msgstr "" + +msgid "GB" +msgstr "" + +msgid "Actions (letter+enter):" +msgstr "" + +msgid " [A] Accept" +msgstr " [A] Aceptar" + +msgid " [C] Cancel" +msgstr " [C] Cancelar" + +msgid " [R] Remove" +msgstr " [R] Eliminar" + +#, fuzzy +msgid " [P] Purge finished" +msgstr " [P] Purgar los viejos DCC" + +#, fuzzy +msgid " [Q] Close xfer list" +msgstr " [Q] Cerrar la vista DCC" + +msgid "xfer chat" +msgstr "" + +msgid "ETA" +msgstr "Tiempo estimado de llegada" + +#, fuzzy +msgid "Xfer list" +msgstr "limpiar hotlist" + #, fuzzy msgid "waiting" msgstr "Esperando" @@ -4235,9 +4295,6 @@ msgstr "Charla DCC cerrada con %s%s %s(%s%d.%d.%d.%d%s)\n" msgid "%s%s: not enough memory for new xfer" msgstr "%s no hay memoria suficiente para un nuevo DCC\n" -msgid "xfer chat" -msgstr "" - #, fuzzy, c-format msgid "%s: incoming file from %s (%d.%d.%d.%d): %s, %lu bytes (protocol: %s)" msgstr "" @@ -4323,45 +4380,6 @@ msgstr "" msgid "%s%s: aborting active xfer: \"%s\" from %s" msgstr "Abandonar el DCC activo: \"%s\" de %s\n" -msgid "bytes" -msgstr "bytes" - -msgid "KB" -msgstr "" - -msgid "MB" -msgstr "" - -msgid "GB" -msgstr "" - -msgid "Actions (letter+enter):" -msgstr "" - -msgid " [A] Accept" -msgstr " [A] Aceptar" - -msgid " [C] Cancel" -msgstr " [C] Cancelar" - -msgid " [R] Remove" -msgstr " [R] Eliminar" - -#, fuzzy -msgid " [P] Purge finished" -msgstr " [P] Purgar los viejos DCC" - -#, fuzzy -msgid " [Q] Close xfer list" -msgstr " [Q] Cerrar la vista DCC" - -msgid "ETA" -msgstr "Tiempo estimado de llegada" - -#, fuzzy -msgid "Xfer list" -msgstr "limpiar hotlist" - #, fuzzy, c-format msgid "%s%s: error sending data to \"%s\" via xfer chat" msgstr "%s error enviando datos al \"%s\" con DCC CHAT\n" @@ -4570,6 +4588,30 @@ msgstr "%s no es posible crear el servidor\n" msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s falta un argumento para la opción --dir\n" +#, fuzzy +#~ msgid "%sError: incorrect notify level (must be between %d and %d)" +#~ msgstr "%s nivel de notificación incorrecto (debe estar entre %d y %d)\n" + +#, fuzzy +#~ msgid "New notify level for %s%s%s: %d %s" +#~ msgstr "Nuevo nivel de notificación para %s%s%s: %s%d %s" + +#, fuzzy +#~ msgid "(hotlist: never)" +#~ msgstr "(hotlist: nunca)\n" + +#, fuzzy +#~ msgid "(hotlist: highlights)" +#~ msgstr "(hotlist: resaltados)\n" + +#, fuzzy +#~ msgid "(hotlist: highlights + messages)" +#~ msgstr "(hotlist: resaltados + mensajes)\n" + +#, fuzzy +#~ msgid "(hotlist: highlights + messages + join/part (all))" +#~ msgstr "(hotlist: resaltados + mensajes + join/part (todos))\n" + #, fuzzy #~ msgid "words to highlight in buffers" #~ msgstr "desplazarse al resaltado siguiente en el búfer" diff --git a/po/fr.po b/po/fr.po index 10b044af2..d49db1542 100644 --- a/po/fr.po +++ b/po/fr.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-06-15 15:11+0200\n" -"PO-Revision-Date: 2008-06-15 15:11+0200\n" +"POT-Creation-Date: 2008-06-17 15:58+0200\n" +"PO-Revision-Date: 2008-06-17 13:24+0200\n" "Last-Translator: FlashCode \n" "Language-Team: weechat-dev \n" "MIME-Version: 1.0\n" @@ -183,26 +183,6 @@ msgstr "%sErreur: le tampon principal de WeeChat ne peut pas être fermé" msgid "Notify levels:" msgstr "Niveaux de notification:" -#, c-format -msgid "%sError: incorrect notify level (must be between %d and %d)" -msgstr "%sErreur: niveau de notification incorrect (doit être entre %d et %d)" - -#, c-format -msgid "New notify level for %s%s%s: %d %s" -msgstr "Nouveau niveau de notification pour %s%s%s: %d %s" - -msgid "(hotlist: never)" -msgstr "(hotlist: jamais)" - -msgid "(hotlist: highlights)" -msgstr "(hotlist: highlights)" - -msgid "(hotlist: highlights + messages)" -msgstr "(hotlist: highlights + messages)" - -msgid "(hotlist: highlights + messages + join/part (all))" -msgstr "(hotlist: highlights + messages + join/part (tous))" - #, c-format msgid "%sPlugin \"%s\" not found" msgstr "%sExtension \"%s\" non trouvée" @@ -605,10 +585,7 @@ msgid "" " move: move buffer in the list (may be relative, for example -1)\n" " close: close buffer\n" " list: list buffers (no parameter implies this list)\n" -" notify: set notify level for buffer (0=never, 1=highlight, 2=1+msg, 3=2" -"+join/part)\n" -" (when executed on server buffer, this sets default notify level for " -"whole server)\n" +" notify: display notify levels for all open buffers\n" " scroll: scroll in history (may be relative, and may end by a letter: s=sec, " "m=min, h=hour, d=day, M=month, y=year); if there is only letter, then scroll " "to beginning of this item\n" @@ -622,9 +599,8 @@ msgid "" " clear all buffers: /buffer clear -all\n" " move buffer: /buffer move 5\n" " close buffer: /buffer close this is part msg\n" -" set notify: /buffer notify 2\n" -" scroll 1 day up: /buffer scroll 1d == /buffer scroll -1d == /" -"buffer scroll -24h\n" +" scroll 1 day up: /buffer scroll 1d == /buffer scroll -1d == /buffer " +"scroll -24h\n" " scroll to beginning\n" " of this day: /buffer scroll d\n" " scroll 15 min down: /buffer scroll +15m\n" @@ -638,10 +614,7 @@ msgstr "" "1)\n" " close: ferme le tampon\n" " list: liste les tampons ouverts (pas de paramètre affiche cette liste)\n" -" notify: fixe le niveau de notification (0=jamais, 1=highlight, 2=1+msg, 3=2" -"+join/part)\n" -" (quand exécuté sur un tampon serveur, cela fixe le niveau de " -"notification par défaut pour le serveur entier)\n" +" notify: affiche les niveaux de notification pour tous les tampons ouverts\n" " scroll: fait défiler l'historique (peut être relatif, et peut se terminer " "par une lettre: s=sec, m=min, h=heure, d=jour, M=mois, y=année); s'il y a " "seulement une lettre, alors fait défiler jusqu'au début de cet élément\n" @@ -653,7 +626,6 @@ msgstr "" "Exemples:\n" " déplacer tampon: /buffer move 5\n" " fermer tampon: /buffer close c'est le message de départ\n" -" niveau de notif.: /buffer notify 2\n" " défiler 1 jour haut: /buffer scroll 1d == /buffer scroll -1d == /buffer " "scroll -24h\n" " défiler au début\n" @@ -971,6 +943,14 @@ msgstr "slogan WeeChat (si vide, le slogan ne sera pas utilisé)" msgid "the geekiest chat client!" msgstr "le client de discussion le plus geek !" +msgid "" +"default notify level for buffers (used to tell WeeChat if buffer must be " +"displayed in hotlist or not, according to importance of message)" +msgstr "" +"niveau de notification par défaut pour les tampons (utilisé pour dire à " +"WeeChat si le tampon doit être affiché dans la hotlist ou non, selon " +"l'importance du message)" + msgid "time format for buffers" msgstr "format de date/heure pour les tampons" @@ -1401,13 +1381,6 @@ msgstr "nom d'utilisateur pour le serveur proxy" msgid "password for proxy server" msgstr "mot de passe pour le serveur proxy" -msgid "" -"path for searching plugins ('%h' will be replaced by WeeChat home, ~/." -"weechat by default)" -msgstr "" -"chemin de recherche des extensions ('%h' sera remplacé par le répertoire de " -"base WeeChat, par défaut: ~/.weechat)" - msgid "" "comma separated list of plugins to load automatically at startup, \"*\" " "means all plugins found (names may be partial, for example \"perl\" is ok " @@ -1417,6 +1390,13 @@ msgstr "" "toutes (séparées par des virgules, les noms peuvent être partiels, par " "exemple \"perl\" est ok pour \"perl.so\")" +msgid "" +"enable debug messages by default in all plugins (option disabled by default, " +"which is highly recommended)" +msgstr "" +"active les messages de debug par défaut pour toutes les extensions (option " +"désactivée par défaut, ce qui est hautement recommandé)" + msgid "" "standard plugins extension in filename (for example \".so\" under Linux or " "\".dll\" under Microsoft Windows)" @@ -1424,6 +1404,13 @@ msgstr "" "extension par défaut des extensions (par example \".so\" sous Linux ou \".dll" "\" sous Microsoft Windows)" +msgid "" +"path for searching plugins ('%h' will be replaced by WeeChat home, ~/." +"weechat by default)" +msgstr "" +"chemin de recherche des extensions ('%h' sera remplacé par le répertoire de " +"base WeeChat, par défaut: ~/.weechat)" + msgid "save configuration files when unloading plugins" msgstr "" "sauvegarder les fichiers de configuration lors du déchargement des extensions" @@ -3871,6 +3858,47 @@ msgstr "%s\t**** Fin du log ****" msgid "===\t========== End of backlog (%d lines) ==========" msgstr "===\t========== Fin de l'historique (%d lignes) ==========" +#, c-format +msgid "notify: debug: set notify for buffer %s to %d (%s)" +msgstr "notify: debug: niveau de notification pour le tampon %s mis à %d (%s)" + +#, c-format +msgid "%s%s: unable to set notify level \"%s\" => \"%s\"" +msgstr "" +"%s%s: impossible de positionner le niveau de notification \"%s\" => \"%s\"" + +#, c-format +msgid "Notify level: %s => %s" +msgstr "Niveau de notification: %s => %s" + +#, c-format +msgid "Notify level: %s: removed" +msgstr "Niveau de notification: %s: supprimé" + +#, c-format +msgid "%s%s: unknown notify level \"%s\"" +msgstr "%s%s: niveau de notification inconnu \"%s\"" + +msgid "change notify level for current buffer" +msgstr "changer le niveau de notification pour le tampon courant" + +msgid "[reset | none | highlight | message | all]" +msgstr "[reset | none | highlight | message | all]" + +msgid "" +" reset: reset notify level to default value\n" +" none: buffer will never be in hotlist\n" +"highlight: buffer will be in hotlist for highlights only\n" +" message: buffer will be in hotlist for highlights and user messages only\n" +" all: buffer will be in hotlist for any text printed" +msgstr "" +" reset: réinitialiser le niveau de notification à sa valeur par défaut\n" +" none: le tampon ne sera jamais dans la hotlist\n" +"highlight: le tampon sera dans la hotlist pour les highlights seulement\n" +" message: le tampon sera dans la hotlist pour les highlights et les " +"messages d'utilisateurs seulement\n" +" all: le tampon sera dans la hotlist pour tout texte affiché" + #, c-format msgid "%sError: unable to load plugin \"%s\": %s" msgstr "%sErreur: impossible de charger l'extension \"%s\": %s" @@ -4151,6 +4179,45 @@ msgstr "" msgid "%s%s: wrong arguments for function \"%s\"" msgstr "%s%s: paramètres invalides pour la fonction \"%s\"" +msgid "bytes" +msgstr "octets" + +msgid "KB" +msgstr "Ko" + +msgid "MB" +msgstr "Mo" + +msgid "GB" +msgstr "Go" + +msgid "Actions (letter+enter):" +msgstr "Actions (lettre+entrée):" + +msgid " [A] Accept" +msgstr " [A] Accepter" + +msgid " [C] Cancel" +msgstr " [C] Annuler" + +msgid " [R] Remove" +msgstr " [R] Retirer" + +msgid " [P] Purge finished" +msgstr " [P] Purger terminés" + +msgid " [Q] Close xfer list" +msgstr " [Q] Fermer la liste xfer" + +msgid "xfer chat" +msgstr "discussion xfer" + +msgid "ETA" +msgstr "ETA" + +msgid "Xfer list" +msgstr "Liste Xfer" + msgid "waiting" msgstr "attente" @@ -4193,9 +4260,6 @@ msgstr "%s: discussion fermée avec %s (%d.%d.%d.%d)" msgid "%s%s: not enough memory for new xfer" msgstr "%s%s: pas assez de mémoire pour un nouveau xfer" -msgid "xfer chat" -msgstr "discussion xfer" - #, c-format msgid "%s: incoming file from %s (%d.%d.%d.%d): %s, %lu bytes (protocol: %s)" msgstr "" @@ -4276,42 +4340,6 @@ msgstr "" msgid "%s%s: aborting active xfer: \"%s\" from %s" msgstr "%s%s: abandon du xfer actif: \"%s\" de %s" -msgid "bytes" -msgstr "octets" - -msgid "KB" -msgstr "Ko" - -msgid "MB" -msgstr "Mo" - -msgid "GB" -msgstr "Go" - -msgid "Actions (letter+enter):" -msgstr "Actions (lettre+entrée):" - -msgid " [A] Accept" -msgstr " [A] Accepter" - -msgid " [C] Cancel" -msgstr " [C] Annuler" - -msgid " [R] Remove" -msgstr " [R] Retirer" - -msgid " [P] Purge finished" -msgstr " [P] Purger terminés" - -msgid " [Q] Close xfer list" -msgstr " [Q] Fermer la liste xfer" - -msgid "ETA" -msgstr "ETA" - -msgid "Xfer list" -msgstr "Liste Xfer" - #, c-format msgid "%s%s: error sending data to \"%s\" via xfer chat" msgstr "%s%s: erreur d'envoi de données à \"%s\" via discussion xfer" diff --git a/po/hu.po b/po/hu.po index b27a0fae5..fa58e1fa9 100644 --- a/po/hu.po +++ b/po/hu.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-06-15 15:11+0200\n" +"POT-Creation-Date: 2008-06-17 15:58+0200\n" "PO-Revision-Date: 2007-10-10 18:07+0200\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -195,28 +195,6 @@ msgstr "" msgid "Notify levels:" msgstr "Értesítési szintek:" -#, fuzzy, c-format -msgid "%sError: incorrect notify level (must be between %d and %d)" -msgstr "" -"%s helytelen értesítési szint (az értéknek %d és %d között kell lennie)\n" - -#, fuzzy, c-format -msgid "New notify level for %s%s%s: %d %s" -msgstr "A %s%s%s új értesítési szintje: %s%d %s" - -#, fuzzy -msgid "(hotlist: never)" -msgstr "kicsoda (szerver)" - -msgid "(hotlist: highlights)" -msgstr "" - -msgid "(hotlist: highlights + messages)" -msgstr "" - -msgid "(hotlist: highlights + messages + join/part (all))" -msgstr "" - #, fuzzy, c-format msgid "%sPlugin \"%s\" not found" msgstr "%s cím \"%s\" nem található\n" @@ -633,10 +611,7 @@ msgid "" " move: move buffer in the list (may be relative, for example -1)\n" " close: close buffer\n" " list: list buffers (no parameter implies this list)\n" -" notify: set notify level for buffer (0=never, 1=highlight, 2=1+msg, 3=2" -"+join/part)\n" -" (when executed on server buffer, this sets default notify level for " -"whole server)\n" +" notify: display notify levels for all open buffers\n" " scroll: scroll in history (may be relative, and may end by a letter: s=sec, " "m=min, h=hour, d=day, M=month, y=year); if there is only letter, then scroll " "to beginning of this item\n" @@ -650,9 +625,8 @@ msgid "" " clear all buffers: /buffer clear -all\n" " move buffer: /buffer move 5\n" " close buffer: /buffer close this is part msg\n" -" set notify: /buffer notify 2\n" -" scroll 1 day up: /buffer scroll 1d == /buffer scroll -1d == /" -"buffer scroll -24h\n" +" scroll 1 day up: /buffer scroll 1d == /buffer scroll -1d == /buffer " +"scroll -24h\n" " scroll to beginning\n" " of this day: /buffer scroll d\n" " scroll 15 min down: /buffer scroll +15m\n" @@ -971,6 +945,11 @@ msgstr "WeeChat szlogen (ha üres, akkor nem használja a program)" msgid "the geekiest chat client!" msgstr "" +msgid "" +"default notify level for buffers (used to tell WeeChat if buffer must be " +"displayed in hotlist or not, according to importance of message)" +msgstr "" + #, fuzzy msgid "time format for buffers" msgstr "a pufferek időbélyege" @@ -1466,13 +1445,6 @@ msgstr "felhasználónév a proxy szerverhez" msgid "password for proxy server" msgstr "jelszó a proxy szerverhez" -msgid "" -"path for searching plugins ('%h' will be replaced by WeeChat home, ~/." -"weechat by default)" -msgstr "" -"modulok elérési útvonala ('%h' helyére automatikusan a WeeChat saját " -"könyvtára, alapértelmezésben ~/.weechat, kerül)" - #, fuzzy msgid "" "comma separated list of plugins to load automatically at startup, \"*\" " @@ -1483,11 +1455,23 @@ msgstr "" "esetén az összes fellelt modul (az elnevezés lehet részleges, például a " "\"perl\" elegendő \"libperl.so\" helyett)" +msgid "" +"enable debug messages by default in all plugins (option disabled by default, " +"which is highly recommended)" +msgstr "" + msgid "" "standard plugins extension in filename (for example \".so\" under Linux or " "\".dll\" under Microsoft Windows)" msgstr "" +msgid "" +"path for searching plugins ('%h' will be replaced by WeeChat home, ~/." +"weechat by default)" +msgstr "" +"modulok elérési útvonala ('%h' helyére automatikusan a WeeChat saját " +"könyvtára, alapértelmezésben ~/.weechat, kerül)" + #, fuzzy msgid "save configuration files when unloading plugins" msgstr "beállítások mentése kilépéskor" @@ -3932,6 +3916,41 @@ msgstr "**** Naplófájl vége " msgid "===\t========== End of backlog (%d lines) ==========" msgstr "" +#, c-format +msgid "notify: debug: set notify for buffer %s to %d (%s)" +msgstr "" + +#, fuzzy, c-format +msgid "%s%s: unable to set notify level \"%s\" => \"%s\"" +msgstr "%s nincs elég memória az információs pult üzenethez\n" + +#, fuzzy, c-format +msgid "Notify level: %s => %s" +msgstr "Értesítési szintek:" + +#, fuzzy, c-format +msgid "Notify level: %s: removed" +msgstr "Értesítési szintek:" + +#, fuzzy, c-format +msgid "%s%s: unknown notify level \"%s\"" +msgstr "%s ismeretlen billentyűparancs \"%s\"\n" + +#, fuzzy +msgid "change notify level for current buffer" +msgstr "szobanév nem található a pufferhez" + +msgid "[reset | none | highlight | message | all]" +msgstr "" + +msgid "" +" reset: reset notify level to default value\n" +" none: buffer will never be in hotlist\n" +"highlight: buffer will be in hotlist for highlights only\n" +" message: buffer will be in hotlist for highlights and user messages only\n" +" all: buffer will be in hotlist for any text printed" +msgstr "" + #, fuzzy, c-format msgid "%sError: unable to load plugin \"%s\": %s" msgstr "%s nem sikerült a modult betölteni \"%s\": %s\n" @@ -4199,6 +4218,48 @@ msgstr "" msgid "%s%s: wrong arguments for function \"%s\"" msgstr "%s rossz argumentum a \"%s\" parancsnak\n" +msgid "bytes" +msgstr "byte" + +msgid "KB" +msgstr "KB" + +msgid "MB" +msgstr "MB" + +msgid "GB" +msgstr "GB" + +msgid "Actions (letter+enter):" +msgstr "" + +msgid " [A] Accept" +msgstr " [A] Elfogadás" + +msgid " [C] Cancel" +msgstr " [C] Mégsem" + +msgid " [R] Remove" +msgstr " [R] Eltávolítás" + +#, fuzzy +msgid " [P] Purge finished" +msgstr " [P] Régi DCC törlése" + +#, fuzzy +msgid " [Q] Close xfer list" +msgstr " [Q] DCC nézet bezárása" + +msgid "xfer chat" +msgstr "" + +msgid "ETA" +msgstr "ETA" + +#, fuzzy +msgid "Xfer list" +msgstr "hotlist törlése" + #, fuzzy msgid "waiting" msgstr "Várakozás" @@ -4249,9 +4310,6 @@ msgstr "DCC beszélgetés vége: %s%s %s(%s%d.%d.%d.%d%s)\n" msgid "%s%s: not enough memory for new xfer" msgstr "%s nincs elegendő memória új DCC számára\n" -msgid "xfer chat" -msgstr "" - #, fuzzy, c-format msgid "%s: incoming file from %s (%d.%d.%d.%d): %s, %lu bytes (protocol: %s)" msgstr "" @@ -4335,45 +4393,6 @@ msgstr "" msgid "%s%s: aborting active xfer: \"%s\" from %s" msgstr "\"%s\" aktív DCC megszakítása a következővel: %s\n" -msgid "bytes" -msgstr "byte" - -msgid "KB" -msgstr "KB" - -msgid "MB" -msgstr "MB" - -msgid "GB" -msgstr "GB" - -msgid "Actions (letter+enter):" -msgstr "" - -msgid " [A] Accept" -msgstr " [A] Elfogadás" - -msgid " [C] Cancel" -msgstr " [C] Mégsem" - -msgid " [R] Remove" -msgstr " [R] Eltávolítás" - -#, fuzzy -msgid " [P] Purge finished" -msgstr " [P] Régi DCC törlése" - -#, fuzzy -msgid " [Q] Close xfer list" -msgstr " [Q] DCC nézet bezárása" - -msgid "ETA" -msgstr "ETA" - -#, fuzzy -msgid "Xfer list" -msgstr "hotlist törlése" - #, fuzzy, c-format msgid "%s%s: error sending data to \"%s\" via xfer chat" msgstr "%s hiba a(z) \"%s\" felé DCC CHAT-tel történő adatküldés közben\n" @@ -4576,6 +4595,19 @@ msgstr "%s DCC: nem sikerült 'nonblock' opciót beállítani a csatornán\n" msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s hiányzó argumentum a(z) \"%s\" opciónak\n" +#, fuzzy +#~ msgid "%sError: incorrect notify level (must be between %d and %d)" +#~ msgstr "" +#~ "%s helytelen értesítési szint (az értéknek %d és %d között kell lennie)\n" + +#, fuzzy +#~ msgid "New notify level for %s%s%s: %d %s" +#~ msgstr "A %s%s%s új értesítési szintje: %s%d %s" + +#, fuzzy +#~ msgid "(hotlist: never)" +#~ msgstr "kicsoda (szerver)" + #, fuzzy #~ msgid "words to highlight in buffers" #~ msgstr "ugrás a következő kiemelésre a pufferben" diff --git a/po/ru.po b/po/ru.po index 28b703541..e8b8d50a7 100644 --- a/po/ru.po +++ b/po/ru.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-06-15 15:11+0200\n" +"POT-Creation-Date: 2008-06-17 15:58+0200\n" "PO-Revision-Date: 2007-09-06 12:44+0200\n" "Last-Translator: Pavel Shevchuk \n" "Language-Team: weechat-dev \n" @@ -191,30 +191,6 @@ msgstr "" msgid "Notify levels:" msgstr "Уровни уведомления:" -#, fuzzy, c-format -msgid "%sError: incorrect notify level (must be between %d and %d)" -msgstr "%s некорректный уровень уведомления (должен быть от %d до %d)\n" - -#, fuzzy, c-format -msgid "New notify level for %s%s%s: %d %s" -msgstr "Новый уровень уведомления для %s%s%s: %s%d %s" - -#, fuzzy -msgid "(hotlist: never)" -msgstr "(хотлист: никогда)\n" - -#, fuzzy -msgid "(hotlist: highlights)" -msgstr "(хотлист: подсвечивание)\n" - -#, fuzzy -msgid "(hotlist: highlights + messages)" -msgstr "(hotlist: подсвечивание + сообщения)\n" - -#, fuzzy -msgid "(hotlist: highlights + messages + join/part (all))" -msgstr "(хотлист: подсвечивание + сообщения + входы/выходы (всё))\n" - #, fuzzy, c-format msgid "%sPlugin \"%s\" not found" msgstr "%s адрес \"%s\" не найден\n" @@ -629,10 +605,7 @@ msgid "" " move: move buffer in the list (may be relative, for example -1)\n" " close: close buffer\n" " list: list buffers (no parameter implies this list)\n" -" notify: set notify level for buffer (0=never, 1=highlight, 2=1+msg, 3=2" -"+join/part)\n" -" (when executed on server buffer, this sets default notify level for " -"whole server)\n" +" notify: display notify levels for all open buffers\n" " scroll: scroll in history (may be relative, and may end by a letter: s=sec, " "m=min, h=hour, d=day, M=month, y=year); if there is only letter, then scroll " "to beginning of this item\n" @@ -646,9 +619,8 @@ msgid "" " clear all buffers: /buffer clear -all\n" " move buffer: /buffer move 5\n" " close buffer: /buffer close this is part msg\n" -" set notify: /buffer notify 2\n" -" scroll 1 day up: /buffer scroll 1d == /buffer scroll -1d == /" -"buffer scroll -24h\n" +" scroll 1 day up: /buffer scroll 1d == /buffer scroll -1d == /buffer " +"scroll -24h\n" " scroll to beginning\n" " of this day: /buffer scroll d\n" " scroll 15 min down: /buffer scroll +15m\n" @@ -968,6 +940,11 @@ msgstr "слоган WeeChat (если пусто - используется с msgid "the geekiest chat client!" msgstr "" +msgid "" +"default notify level for buffers (used to tell WeeChat if buffer must be " +"displayed in hotlist or not, according to importance of message)" +msgstr "" + #, fuzzy msgid "time format for buffers" msgstr "время в буферах" @@ -1469,13 +1446,6 @@ msgstr "имя пользователя, используемое при под msgid "password for proxy server" msgstr "пароль к proxy серверу" -msgid "" -"path for searching plugins ('%h' will be replaced by WeeChat home, ~/." -"weechat by default)" -msgstr "" -"путь поиска pluginов ('%h' заменяется на домашний каталог WeeChat, по " -"умолчанию - ~/.weechat)" - #, fuzzy msgid "" "comma separated list of plugins to load automatically at startup, \"*\" " @@ -1486,11 +1456,23 @@ msgstr "" "in'ов , \"*\" означает все найденные plug-in'ы (имена могут быть не полными, " "например \"perl\" успешно загрузит \"libperl.so\")" +msgid "" +"enable debug messages by default in all plugins (option disabled by default, " +"which is highly recommended)" +msgstr "" + msgid "" "standard plugins extension in filename (for example \".so\" under Linux or " "\".dll\" under Microsoft Windows)" msgstr "" +msgid "" +"path for searching plugins ('%h' will be replaced by WeeChat home, ~/." +"weechat by default)" +msgstr "" +"путь поиска pluginов ('%h' заменяется на домашний каталог WeeChat, по " +"умолчанию - ~/.weechat)" + #, fuzzy msgid "save configuration files when unloading plugins" msgstr "сохранять конфигурационный файл при выходе" @@ -3922,6 +3904,41 @@ msgstr "**** Конец log-файла" msgid "===\t========== End of backlog (%d lines) ==========" msgstr "" +#, c-format +msgid "notify: debug: set notify for buffer %s to %d (%s)" +msgstr "" + +#, fuzzy, c-format +msgid "%s%s: unable to set notify level \"%s\" => \"%s\"" +msgstr "%s недостаточно памяти для сообщения в строке информации\n" + +#, fuzzy, c-format +msgid "Notify level: %s => %s" +msgstr "Уровни уведомления:" + +#, fuzzy, c-format +msgid "Notify level: %s: removed" +msgstr "Уровни уведомления:" + +#, fuzzy, c-format +msgid "%s%s: unknown notify level \"%s\"" +msgstr "%s неизвестная функция клавиши \"%s\"\n" + +#, fuzzy +msgid "change notify level for current buffer" +msgstr "не найдено имя канала для буфера" + +msgid "[reset | none | highlight | message | all]" +msgstr "" + +msgid "" +" reset: reset notify level to default value\n" +" none: buffer will never be in hotlist\n" +"highlight: buffer will be in hotlist for highlights only\n" +" message: buffer will be in hotlist for highlights and user messages only\n" +" all: buffer will be in hotlist for any text printed" +msgstr "" + #, fuzzy, c-format msgid "%sError: unable to load plugin \"%s\": %s" msgstr "%s не могу загрузить plugin \"%s\": %s\n" @@ -4189,6 +4206,48 @@ msgstr "" msgid "%s%s: wrong arguments for function \"%s\"" msgstr "%s некорректные аргументы команды \"%s\"\n" +msgid "bytes" +msgstr "байтов" + +msgid "KB" +msgstr "КБ" + +msgid "MB" +msgstr "МБ" + +msgid "GB" +msgstr "ГБ" + +msgid "Actions (letter+enter):" +msgstr "" + +msgid " [A] Accept" +msgstr " [A] Принять" + +msgid " [C] Cancel" +msgstr " [C] Отменить" + +msgid " [R] Remove" +msgstr " [R] Удалить" + +#, fuzzy +msgid " [P] Purge finished" +msgstr " [P] Очистить список" + +#, fuzzy +msgid " [Q] Close xfer list" +msgstr " [Q] Закрыть окно" + +msgid "xfer chat" +msgstr "" + +msgid "ETA" +msgstr "осталось" + +#, fuzzy +msgid "Xfer list" +msgstr "очистить хотлист" + #, fuzzy msgid "waiting" msgstr "Ожидание" @@ -4239,9 +4298,6 @@ msgstr "DCC-чат закончен с %s%s %s(%s%d.%d.%d.%d%s)\n" msgid "%s%s: not enough memory for new xfer" msgstr "%s недостаточно памяти для нового DCC\n" -msgid "xfer chat" -msgstr "" - #, fuzzy, c-format msgid "%s: incoming file from %s (%d.%d.%d.%d): %s, %lu bytes (protocol: %s)" msgstr "Входящий файл от %s%s%s (%s%d.%d.%d.%d%s)%s: %s%s%s, %s%lu%s байт\n" @@ -4320,45 +4376,6 @@ msgstr "" msgid "%s%s: aborting active xfer: \"%s\" from %s" msgstr "Отменяю активное DCC-сединение: \"%s\" от %s\n" -msgid "bytes" -msgstr "байтов" - -msgid "KB" -msgstr "КБ" - -msgid "MB" -msgstr "МБ" - -msgid "GB" -msgstr "ГБ" - -msgid "Actions (letter+enter):" -msgstr "" - -msgid " [A] Accept" -msgstr " [A] Принять" - -msgid " [C] Cancel" -msgstr " [C] Отменить" - -msgid " [R] Remove" -msgstr " [R] Удалить" - -#, fuzzy -msgid " [P] Purge finished" -msgstr " [P] Очистить список" - -#, fuzzy -msgid " [Q] Close xfer list" -msgstr " [Q] Закрыть окно" - -msgid "ETA" -msgstr "осталось" - -#, fuzzy -msgid "Xfer list" -msgstr "очистить хотлист" - #, fuzzy, c-format msgid "%s%s: error sending data to \"%s\" via xfer chat" msgstr "%s ошибка при отправке данных \"%s\" через DCC-чат\n" @@ -4561,6 +4578,30 @@ msgstr "%s DCC: не могу установить неблокирующий р msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s нет аргумента для параметра \"%s\"\n" +#, fuzzy +#~ msgid "%sError: incorrect notify level (must be between %d and %d)" +#~ msgstr "%s некорректный уровень уведомления (должен быть от %d до %d)\n" + +#, fuzzy +#~ msgid "New notify level for %s%s%s: %d %s" +#~ msgstr "Новый уровень уведомления для %s%s%s: %s%d %s" + +#, fuzzy +#~ msgid "(hotlist: never)" +#~ msgstr "(хотлист: никогда)\n" + +#, fuzzy +#~ msgid "(hotlist: highlights)" +#~ msgstr "(хотлист: подсвечивание)\n" + +#, fuzzy +#~ msgid "(hotlist: highlights + messages)" +#~ msgstr "(hotlist: подсвечивание + сообщения)\n" + +#, fuzzy +#~ msgid "(hotlist: highlights + messages + join/part (all))" +#~ msgstr "(хотлист: подсвечивание + сообщения + входы/выходы (всё))\n" + #, fuzzy #~ msgid "words to highlight in buffers" #~ msgstr "промотать буфер до следующей подсветки" diff --git a/po/srcfiles.cmake b/po/srcfiles.cmake index 37718bae8..6891c4e63 100644 --- a/po/srcfiles.cmake +++ b/po/srcfiles.cmake @@ -128,6 +128,7 @@ SET(WEECHAT_SOURCES ./src/plugins/logger/logger.h ./src/plugins/logger/logger-tail.c ./src/plugins/logger/logger-tail.h +./src/plugins/notify/notify.c ./src/plugins/plugin-api.c ./src/plugins/plugin-api.h ./src/plugins/plugin.c @@ -166,9 +167,9 @@ SET(WEECHAT_SOURCES ./src/plugins/trigger/trigger-libirc.c ./src/plugins/trigger/trigger-libirc.h ./src/plugins/weechat-plugin.h -./src/plugins/xfer/xfer.c ./src/plugins/xfer/xfer-buffer.c ./src/plugins/xfer/xfer-buffer.h +./src/plugins/xfer/xfer.c ./src/plugins/xfer/xfer-chat.c ./src/plugins/xfer/xfer-chat.h ./src/plugins/xfer/xfer-command.c diff --git a/po/weechat.pot b/po/weechat.pot index 7ed7712b4..d5cdf433d 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-06-15 15:11+0200\n" +"POT-Creation-Date: 2008-06-17 15:58+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -166,26 +166,6 @@ msgstr "" msgid "Notify levels:" msgstr "" -#, c-format -msgid "%sError: incorrect notify level (must be between %d and %d)" -msgstr "" - -#, c-format -msgid "New notify level for %s%s%s: %d %s" -msgstr "" - -msgid "(hotlist: never)" -msgstr "" - -msgid "(hotlist: highlights)" -msgstr "" - -msgid "(hotlist: highlights + messages)" -msgstr "" - -msgid "(hotlist: highlights + messages + join/part (all))" -msgstr "" - #, c-format msgid "%sPlugin \"%s\" not found" msgstr "" @@ -556,10 +536,7 @@ msgid "" " move: move buffer in the list (may be relative, for example -1)\n" " close: close buffer\n" " list: list buffers (no parameter implies this list)\n" -" notify: set notify level for buffer (0=never, 1=highlight, 2=1+msg, 3=2" -"+join/part)\n" -" (when executed on server buffer, this sets default notify level for " -"whole server)\n" +" notify: display notify levels for all open buffers\n" " scroll: scroll in history (may be relative, and may end by a letter: s=sec, " "m=min, h=hour, d=day, M=month, y=year); if there is only letter, then scroll " "to beginning of this item\n" @@ -573,9 +550,8 @@ msgid "" " clear all buffers: /buffer clear -all\n" " move buffer: /buffer move 5\n" " close buffer: /buffer close this is part msg\n" -" set notify: /buffer notify 2\n" -" scroll 1 day up: /buffer scroll 1d == /buffer scroll -1d == /" -"buffer scroll -24h\n" +" scroll 1 day up: /buffer scroll 1d == /buffer scroll -1d == /buffer " +"scroll -24h\n" " scroll to beginning\n" " of this day: /buffer scroll d\n" " scroll 15 min down: /buffer scroll +15m\n" @@ -805,6 +781,11 @@ msgstr "" msgid "the geekiest chat client!" msgstr "" +msgid "" +"default notify level for buffers (used to tell WeeChat if buffer must be " +"displayed in hotlist or not, according to importance of message)" +msgstr "" + msgid "time format for buffers" msgstr "" @@ -1187,22 +1168,27 @@ msgstr "" msgid "password for proxy server" msgstr "" -msgid "" -"path for searching plugins ('%h' will be replaced by WeeChat home, ~/." -"weechat by default)" -msgstr "" - msgid "" "comma separated list of plugins to load automatically at startup, \"*\" " "means all plugins found (names may be partial, for example \"perl\" is ok " "for \"perl.so\")" msgstr "" +msgid "" +"enable debug messages by default in all plugins (option disabled by default, " +"which is highly recommended)" +msgstr "" + msgid "" "standard plugins extension in filename (for example \".so\" under Linux or " "\".dll\" under Microsoft Windows)" msgstr "" +msgid "" +"path for searching plugins ('%h' will be replaced by WeeChat home, ~/." +"weechat by default)" +msgstr "" + msgid "save configuration files when unloading plugins" msgstr "" @@ -3381,6 +3367,40 @@ msgstr "" msgid "===\t========== End of backlog (%d lines) ==========" msgstr "" +#, c-format +msgid "notify: debug: set notify for buffer %s to %d (%s)" +msgstr "" + +#, c-format +msgid "%s%s: unable to set notify level \"%s\" => \"%s\"" +msgstr "" + +#, c-format +msgid "Notify level: %s => %s" +msgstr "" + +#, c-format +msgid "Notify level: %s: removed" +msgstr "" + +#, c-format +msgid "%s%s: unknown notify level \"%s\"" +msgstr "" + +msgid "change notify level for current buffer" +msgstr "" + +msgid "[reset | none | highlight | message | all]" +msgstr "" + +msgid "" +" reset: reset notify level to default value\n" +" none: buffer will never be in hotlist\n" +"highlight: buffer will be in hotlist for highlights only\n" +" message: buffer will be in hotlist for highlights and user messages only\n" +" all: buffer will be in hotlist for any text printed" +msgstr "" + #, c-format msgid "%sError: unable to load plugin \"%s\": %s" msgstr "" @@ -3635,6 +3655,45 @@ msgstr "" msgid "%s%s: wrong arguments for function \"%s\"" msgstr "" +msgid "bytes" +msgstr "" + +msgid "KB" +msgstr "" + +msgid "MB" +msgstr "" + +msgid "GB" +msgstr "" + +msgid "Actions (letter+enter):" +msgstr "" + +msgid " [A] Accept" +msgstr "" + +msgid " [C] Cancel" +msgstr "" + +msgid " [R] Remove" +msgstr "" + +msgid " [P] Purge finished" +msgstr "" + +msgid " [Q] Close xfer list" +msgstr "" + +msgid "xfer chat" +msgstr "" + +msgid "ETA" +msgstr "" + +msgid "Xfer list" +msgstr "" + msgid "waiting" msgstr "" @@ -3677,9 +3736,6 @@ msgstr "" msgid "%s%s: not enough memory for new xfer" msgstr "" -msgid "xfer chat" -msgstr "" - #, c-format msgid "%s: incoming file from %s (%d.%d.%d.%d): %s, %lu bytes (protocol: %s)" msgstr "" @@ -3753,42 +3809,6 @@ msgstr "" msgid "%s%s: aborting active xfer: \"%s\" from %s" msgstr "" -msgid "bytes" -msgstr "" - -msgid "KB" -msgstr "" - -msgid "MB" -msgstr "" - -msgid "GB" -msgstr "" - -msgid "Actions (letter+enter):" -msgstr "" - -msgid " [A] Accept" -msgstr "" - -msgid " [C] Cancel" -msgstr "" - -msgid " [R] Remove" -msgstr "" - -msgid " [P] Purge finished" -msgstr "" - -msgid " [Q] Close xfer list" -msgstr "" - -msgid "ETA" -msgstr "" - -msgid "Xfer list" -msgstr "" - #, c-format msgid "%s%s: error sending data to \"%s\" via xfer chat" msgstr "" diff --git a/src/core/wee-command.c b/src/core/wee-command.c index 81b27125d..def88fda2 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -437,87 +437,20 @@ command_buffer (void *data, struct t_gui_buffer *buffer, /* display/change buffer notify */ if (string_strcasecmp (argv[1], "notify") == 0) { - if (argc < 3) + /* display notify level for all buffers */ + gui_chat_printf (NULL, ""); + gui_chat_printf (NULL, _("Notify levels:")); + for (ptr_buffer = gui_buffers; ptr_buffer; + ptr_buffer = ptr_buffer->next_buffer) { - /* display notify level for all buffers */ - gui_chat_printf (NULL, ""); - gui_chat_printf (NULL, _("Notify levels:")); - for (ptr_buffer = gui_buffers; ptr_buffer; - ptr_buffer = ptr_buffer->next_buffer) - { - gui_chat_printf (NULL, - " %d.%s: %d", - ptr_buffer->number, - ptr_buffer->name, - ptr_buffer->notify_level); - } - gui_chat_printf (NULL, ""); - } - else - { - /* set notify level for buffer */ - error = NULL; - number = strtol (argv[2], &error, 10); - if (error && !error[0]) - { - if ((number < GUI_BUFFER_NOTIFY_LEVEL_MIN) - || (number > GUI_BUFFER_NOTIFY_LEVEL_MAX)) - { - /* invalid highlight level */ - gui_chat_printf (NULL, - _("%sError: incorrect notify level " - "(must be between %d and %d)"), - gui_chat_prefix[GUI_CHAT_PREFIX_ERROR], - GUI_BUFFER_NOTIFY_LEVEL_MIN, - GUI_BUFFER_NOTIFY_LEVEL_MAX); - return WEECHAT_RC_ERROR; - } - gui_chat_printf (NULL, - _("New notify level for %s%s%s: " - "%d %s"), - GUI_COLOR(GUI_COLOR_CHAT_BUFFER), - buffer->name, - GUI_COLOR(GUI_COLOR_CHAT), - number, - GUI_COLOR(GUI_COLOR_CHAT)); - switch (number) - { - case GUI_HOTLIST_LOW: - gui_chat_printf (NULL, - _("(hotlist: never)")); - break; - case GUI_HOTLIST_MESSAGE: - gui_chat_printf (NULL, - _("(hotlist: highlights)")); - break; - case GUI_HOTLIST_PRIVATE: - gui_chat_printf (NULL, - _("(hotlist: highlights + " - "messages)")); - break; - case GUI_HOTLIST_HIGHLIGHT: - gui_chat_printf (NULL, - _("(hotlist: highlights + " - "messages + join/part " - "(all))")); - break; - default: - gui_chat_printf (NULL, ""); - break; - } - } - else - { - /* invalid number */ - gui_chat_printf (NULL, - _("%sError: incorrect notify level (must " - "be between %d and %d)"), - gui_chat_prefix[GUI_CHAT_PREFIX_ERROR], - GUI_BUFFER_NOTIFY_LEVEL_MIN, - GUI_BUFFER_NOTIFY_LEVEL_MAX); - return WEECHAT_RC_ERROR; - } + gui_chat_printf (NULL, + " %d.%s: %d (%s)", + ptr_buffer->number, + ptr_buffer->name, + ptr_buffer->notify, + gui_buffer_notify_string[ptr_buffer->notify]); } + gui_chat_printf (NULL, ""); return WEECHAT_RC_OK; } @@ -2645,10 +2578,7 @@ command_init () "example -1)\n" " close: close buffer\n" " list: list buffers (no parameter implies this list)\n" - " notify: set notify level for buffer (0=never, " - "1=highlight, 2=1+msg, 3=2+join/part)\n" - " (when executed on server buffer, this sets " - "default notify level for whole server)\n" + " notify: display notify levels for all open buffers\n" " scroll: scroll in history (may be relative, and may " "end by a letter: s=sec, m=min, h=hour, d=day, M=month, " "y=year); if there is only letter, then scroll to " @@ -2661,9 +2591,8 @@ command_init () " clear all buffers: /buffer clear -all\n" " move buffer: /buffer move 5\n" " close buffer: /buffer close this is part msg\n" - " set notify: /buffer notify 2\n" " scroll 1 day up: /buffer scroll 1d == /buffer " - " scroll -1d == /buffer scroll -24h\n" + "scroll -1d == /buffer scroll -24h\n" " scroll to beginning\n" " of this day: /buffer scroll d\n" " scroll 15 min down: /buffer scroll +15m\n" diff --git a/src/core/wee-config-file.c b/src/core/wee-config-file.c index 2c7cd8dfa..ae8680e8c 100644 --- a/src/core/wee-config-file.c +++ b/src/core/wee-config-file.c @@ -484,6 +484,31 @@ config_file_new_option (struct t_config_file *config_file, return new_option; } +/* + * config_file_option_full_name: build full name for an option + */ + +char * +config_file_option_full_name (struct t_config_option *option) +{ + int length_option; + char *option_full_name; + + length_option = strlen (option->config_file->name) + 1 + + strlen (option->section->name) + 1 + strlen (option->name) + 1; + option_full_name = malloc (length_option); + if (option_full_name) + { + snprintf (option_full_name, length_option, + "%s.%s.%s", + option->config_file->name, + option->section->name, + option->name); + } + + return option_full_name; +} + /* * config_file_search_option: search an option in a config or section */ @@ -748,7 +773,7 @@ config_file_string_to_boolean (const char *text) int config_file_option_reset (struct t_config_option *option, int run_callback) { - int rc, length_option; + int rc; char value[256], *option_full_name; if (!option) @@ -830,16 +855,9 @@ config_file_option_reset (struct t_config_option *option, int run_callback) { if (option->config_file && option->section) { - length_option = strlen (option->config_file->name) + 1 + - strlen (option->section->name) + 1 + strlen (option->name) + 1; - option_full_name = malloc (length_option); + option_full_name = config_file_option_full_name (option); if (option_full_name) { - snprintf (option_full_name, length_option, - "%s.%s.%s", - option->config_file->name, - option->section->name, - option->name); hook_config_exec (option_full_name, value); free (option_full_name); } @@ -862,7 +880,7 @@ int config_file_option_set (struct t_config_option *option, const char *value, int run_callback) { - int value_int, i, rc, length_option, new_value_ok; + int value_int, i, rc, new_value_ok; long number; char *error, *option_full_name; @@ -1079,16 +1097,9 @@ config_file_option_set (struct t_config_option *option, const char *value, { if (option->config_file && option->section) { - length_option = strlen (option->config_file->name) + 1 + - strlen (option->section->name) + 1 + strlen (option->name) + 1; - option_full_name = malloc (length_option); + option_full_name = config_file_option_full_name (option); if (option_full_name) { - snprintf (option_full_name, length_option, - "%s.%s.%s", - option->config_file->name, - option->section->name, - option->name); hook_config_exec (option_full_name, value); free (option_full_name); } @@ -1111,6 +1122,7 @@ int config_file_option_unset (struct t_config_option *option) { int rc; + char *option_full_name; rc = WEECHAT_CONFIG_OPTION_UNSET_OK_NO_RESET; @@ -1123,8 +1135,17 @@ config_file_option_unset (struct t_config_option *option) (option->callback_delete_data, option); } + + option_full_name = config_file_option_full_name (option); + config_file_option_free (option); rc = WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED; + + if (option_full_name) + { + hook_config_exec (option_full_name, NULL); + free (option_full_name); + } } else { diff --git a/src/core/wee-config.c b/src/core/wee-config.c index 827ce7705..afbd74278 100644 --- a/src/core/wee-config.c +++ b/src/core/wee-config.c @@ -68,6 +68,7 @@ struct t_config_option *config_startup_weechat_slogan; /* config, look & feel section */ +struct t_config_option *config_look_buffer_notify_default; struct t_config_option *config_look_buffer_time_format; struct t_config_option *config_look_color_nicks_number; struct t_config_option *config_look_color_real_white; @@ -184,9 +185,10 @@ struct t_config_option *config_proxy_password; /* config, plugin section */ -struct t_config_option *config_plugin_path; struct t_config_option *config_plugin_autoload; +struct t_config_option *config_plugin_debug; struct t_config_option *config_plugin_extension; +struct t_config_option *config_plugin_path; struct t_config_option *config_plugin_save_config_on_unload; /* hooks */ @@ -779,7 +781,15 @@ config_weechat_init () config_file_free (weechat_config_file); return 0; } - + + config_look_buffer_notify_default = config_file_new_option ( + weechat_config_file, ptr_section, + "buffer_notify_default", "integer", + N_("default notify level for buffers (used to tell WeeChat if buffer " + "must be displayed in hotlist or not, according to importance " + "of message)"), + "none|highlight|message|all", 0, 0, "all", + NULL, NULL, NULL, NULL, NULL, NULL); config_look_buffer_time_format = config_file_new_option ( weechat_config_file, ptr_section, "buffer_time_format", "string", @@ -1533,12 +1543,6 @@ config_weechat_init () return 0; } - config_plugin_path = config_file_new_option ( - weechat_config_file, ptr_section, - "path", "string", - N_("path for searching plugins ('%h' will be replaced by " - "WeeChat home, ~/.weechat by default)"), - NULL, 0, 0, "%h/plugins", NULL, NULL, NULL, NULL, NULL, NULL); config_plugin_autoload = config_file_new_option ( weechat_config_file, ptr_section, "autoload", "string", @@ -1547,6 +1551,12 @@ config_weechat_init () "be partial, for example \"perl\" is ok for " "\"perl.so\")"), NULL, 0, 0, "*", NULL, NULL, NULL, NULL, NULL, NULL); + config_plugin_debug = config_file_new_option ( + weechat_config_file, ptr_section, + "debug", "boolean", + N_("enable debug messages by default in all plugins (option disabled " + "by default, which is highly recommended)"), + NULL, 0, 0, "off", NULL, NULL, NULL, NULL, NULL, NULL); config_plugin_extension = config_file_new_option ( weechat_config_file, ptr_section, "extension", "string", @@ -1559,6 +1569,12 @@ config_weechat_init () ".so", #endif NULL, NULL, NULL, NULL, NULL, NULL); + config_plugin_path = config_file_new_option ( + weechat_config_file, ptr_section, + "path", "string", + N_("path for searching plugins ('%h' will be replaced by " + "WeeChat home, ~/.weechat by default)"), + NULL, 0, 0, "%h/plugins", NULL, NULL, NULL, NULL, NULL, NULL); config_plugin_save_config_on_unload = config_file_new_option ( weechat_config_file, ptr_section, "save_config_on_unload", "boolean", diff --git a/src/core/wee-config.h b/src/core/wee-config.h index a78d4c76c..09d712b51 100644 --- a/src/core/wee-config.h +++ b/src/core/wee-config.h @@ -54,6 +54,7 @@ extern struct t_config_option *config_startup_display_logo; extern struct t_config_option *config_startup_display_version; extern struct t_config_option *config_startup_weechat_slogan; +extern struct t_config_option *config_look_buffer_notify_default; extern struct t_config_option *config_look_buffer_time_format; extern struct t_config_option *config_look_color_nicks_number; extern struct t_config_option *config_look_color_real_white; @@ -162,11 +163,13 @@ extern struct t_config_option *config_proxy_port; extern struct t_config_option *config_proxy_username; extern struct t_config_option *config_proxy_password; -extern struct t_config_option *config_plugin_path; extern struct t_config_option *config_plugin_autoload; +extern struct t_config_option *config_plugin_debug; extern struct t_config_option *config_plugin_extension; +extern struct t_config_option *config_plugin_path; extern struct t_config_option *config_plugin_save_config_on_unload; + extern int config_weechat_init (); extern int config_weechat_read (); extern int config_weechat_reload (); diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c index a08c649af..8f664db88 100644 --- a/src/gui/gui-buffer.c +++ b/src/gui/gui-buffer.c @@ -57,6 +57,9 @@ struct t_gui_buffer *gui_buffers = NULL; /* first buffer */ struct t_gui_buffer *last_gui_buffer = NULL; /* last buffer */ struct t_gui_buffer *gui_previous_buffer = NULL; /* previous buffer */ +char *gui_buffer_notify_string[GUI_BUFFER_NUM_NOTIFY] = +{ "none", "highlight", "message", "all" }; + /* * gui_buffer_new: create a new buffer in current window @@ -99,7 +102,7 @@ gui_buffer_new (struct t_weechat_plugin *plugin, new_buffer->category = (category) ? strdup (category) : NULL; new_buffer->name = strdup (name); new_buffer->type = GUI_BUFFER_TYPE_FORMATED; - new_buffer->notify_level = GUI_BUFFER_NOTIFY_LEVEL_DEFAULT; + new_buffer->notify = CONFIG_INTEGER(config_look_buffer_notify_default); new_buffer->num_displayed = 0; /* close callback */ @@ -230,6 +233,21 @@ gui_buffer_valid (struct t_gui_buffer *buffer) return 0; } +/* + * gui_buffer_get_integer: get a buffer property as integer + */ + +int +gui_buffer_get_integer (struct t_gui_buffer *buffer, const char *property) +{ + if (string_strcasecmp (property, "notify") == 0) + return buffer->notify; + else if (string_strcasecmp (property, "lines_hidden") == 0) + return buffer->lines_hidden; + + return 0; +} + /* * gui_buffer_get_string: get a buffer property as string */ @@ -237,8 +255,6 @@ gui_buffer_valid (struct t_gui_buffer *buffer) char * gui_buffer_get_string (struct t_gui_buffer *buffer, const char *property) { - static char value[32]; - if (string_strcasecmp (property, "plugin") == 0) return (buffer->plugin) ? buffer->plugin->name : NULL; else if (string_strcasecmp (property, "category") == 0) @@ -249,11 +265,6 @@ gui_buffer_get_string (struct t_gui_buffer *buffer, const char *property) return buffer->title; else if (string_strcasecmp (property, "nick") == 0) return buffer->input_nick; - else if (string_strcasecmp (property, "lines_hidden") == 0) - { - snprintf (value, sizeof (value), "%d", buffer->lines_hidden); - return value; - } return NULL; } @@ -504,6 +515,19 @@ gui_buffer_set (struct t_gui_buffer *buffer, const char *property, else if (string_strcasecmp (value, "free") == 0) gui_buffer_set_type (buffer, GUI_BUFFER_TYPE_FREE); } + else if (string_strcasecmp (property, "notify") == 0) + { + error = NULL; + number = strtol (value, &error, 10); + if (error && !error[0] + && (number < GUI_BUFFER_NUM_NOTIFY)) + { + if (number < 0) + buffer->notify = CONFIG_INTEGER(config_look_buffer_notify_default); + else + buffer->notify = number; + } + } else if (string_strcasecmp (property, "title") == 0) { gui_buffer_set_title (buffer, value); @@ -1147,7 +1171,7 @@ gui_buffer_print_log () log_printf (" category . . . . . . . : '%s'", ptr_buffer->category); log_printf (" name . . . . . . . . . : '%s'", ptr_buffer->name); log_printf (" type . . . . . . . . . : %d", ptr_buffer->type); - log_printf (" notify_level . . . . . : %d", ptr_buffer->notify_level); + log_printf (" notify . . . . . . . . : %d", ptr_buffer->notify); log_printf (" num_displayed. . . . . : %d", ptr_buffer->num_displayed); log_printf (" title. . . . . . . . . : '%s'", ptr_buffer->title); log_printf (" lines. . . . . . . . . : 0x%x", ptr_buffer->lines); diff --git a/src/gui/gui-buffer.h b/src/gui/gui-buffer.h index 1aa59aa84..5156acda4 100644 --- a/src/gui/gui-buffer.h +++ b/src/gui/gui-buffer.h @@ -28,9 +28,15 @@ enum t_gui_buffer_type GUI_BUFFER_NUM_TYPES, }; -#define GUI_BUFFER_NOTIFY_LEVEL_MIN 0 -#define GUI_BUFFER_NOTIFY_LEVEL_MAX 3 -#define GUI_BUFFER_NOTIFY_LEVEL_DEFAULT GUI_BUFFER_NOTIFY_LEVEL_MAX +enum t_gui_buffer_notify +{ + GUI_BUFFER_NOTIFY_NONE = 0, + GUI_BUFFER_NOTIFY_HIGHLIGHT, + GUI_BUFFER_NOTIFY_MESSAGE, + GUI_BUFFER_NOTIFY_ALL, + /* number of buffer notify */ + GUI_BUFFER_NUM_NOTIFY, +}; #define GUI_TEXT_SEARCH_DISABLED 0 #define GUI_TEXT_SEARCH_BACKWARD 1 @@ -66,7 +72,7 @@ struct t_gui_buffer char *category; /* category name */ char *name; /* buffer name */ enum t_gui_buffer_type type; /* buffer type (formated, free, ..) */ - int notify_level; /* 0 = never */ + int notify; /* 0 = never */ /* 1 = highlight only */ /* 2 = highlight + msg */ /* 3 = highlight + msg + join/part */ @@ -152,6 +158,7 @@ struct t_gui_buffer extern struct t_gui_buffer *gui_buffers; extern struct t_gui_buffer *last_gui_buffer; extern struct t_gui_buffer *gui_previous_buffer; +extern char *gui_buffer_notify_string[]; /* buffer functions */ @@ -165,6 +172,8 @@ extern struct t_gui_buffer *gui_buffer_new (struct t_weechat_plugin *plugin, struct t_gui_buffer *buffer), void *close_callback_data); extern int gui_buffer_valid (struct t_gui_buffer *buffer); +extern int gui_buffer_get_integer (struct t_gui_buffer *buffer, + const char *property); extern char *gui_buffer_get_string (struct t_gui_buffer *buffer, const char *property); extern void *gui_buffer_get_pointer (struct t_gui_buffer *buffer, diff --git a/src/gui/gui-hotlist.c b/src/gui/gui-hotlist.c index 01fcac6ad..8f5c559a0 100644 --- a/src/gui/gui-hotlist.c +++ b/src/gui/gui-hotlist.c @@ -64,6 +64,30 @@ gui_hotlist_search (struct t_gui_hotlist *hotlist, struct t_gui_buffer *buffer) return NULL; } +/* + * gui_hotlist_check_buffer_notify: return: 1 if buffer notify is ok according + * to priority (buffer will be added + * to hotlist) + * 0 if buffer will not be added to + * hotlist + */ + +int +gui_hotlist_check_buffer_notify (struct t_gui_buffer *buffer, int priority) +{ + switch (priority) + { + case GUI_HOTLIST_LOW: + return (buffer->notify >= 3); + case GUI_HOTLIST_MESSAGE: + case GUI_HOTLIST_PRIVATE: + return (buffer->notify >= 2); + case GUI_HOTLIST_HIGHLIGHT: + return (buffer->notify >= 1); + } + return 1; +} + /* * gui_hotlist_find_pos: find position for a inserting in hotlist * (for sorting hotlist) @@ -208,6 +232,10 @@ gui_hotlist_add (struct t_gui_buffer *buffer, int priority, else if (priority > GUI_HOTLIST_MAX) priority = GUI_HOTLIST_MAX; + /* check if priority is ok according to buffer notify level value */ + if (!gui_hotlist_check_buffer_notify (buffer, priority)) + return; + if ((ptr_hotlist = gui_hotlist_search (gui_hotlist, buffer))) { /* return if priority is greater or equal than the one to add */ diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt index 59c1a0e13..9c0e475e0 100644 --- a/src/plugins/CMakeLists.txt +++ b/src/plugins/CMakeLists.txt @@ -64,6 +64,10 @@ IF(NOT DISABLE_LOGGER) ADD_SUBDIRECTORY( logger ) ENDIF(NOT DISABLE_LOGGER) +IF(NOT DISABLE_NOTIFY) + ADD_SUBDIRECTORY( notify ) +ENDIF(NOT DISABLE_NOTIFY) + IF(NOT DISABLE_SCRIPTS AND NOT DISABLE_PERL AND NOT DISABLE_PYTHON AND NOT DISABLE_RUBY AND NOT DISABLE_LUA) ADD_SUBDIRECTORY( scripts ) ENDIF(NOT DISABLE_SCRIPTS AND NOT DISABLE_PERL AND NOT DISABLE_PYTHON AND NOT DISABLE_RUBY AND NOT DISABLE_LUA) diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am index 7cd2c55e7..2203d6de5 100644 --- a/src/plugins/Makefile.am +++ b/src/plugins/Makefile.am @@ -60,6 +60,10 @@ if PLUGIN_LOGGER logger_dir = logger endif +if PLUGIN_NOTIFY +notify_dir = notify +endif + if PLUGIN_PERL script_dir = scripts endif @@ -85,5 +89,5 @@ xfer_dir = xfer endif SUBDIRS = . $(alias_dir) $(aspell_dir) $(charset_dir) $(debug_dir) \ - $(demo_dir) $(fifo_dir) $(irc_dir) $(logger_dir) $(script_dir) \ - $(trigger_dir) $(xfer_dir) + $(demo_dir) $(fifo_dir) $(irc_dir) $(logger_dir) $(notify_dir) \ + $(script_dir) $(trigger_dir) $(xfer_dir) diff --git a/src/plugins/charset/charset.c b/src/plugins/charset/charset.c index 49d5e0c14..0f4cc5134 100644 --- a/src/plugins/charset/charset.c +++ b/src/plugins/charset/charset.c @@ -99,7 +99,7 @@ charset_config_reload (void *data, struct t_config_file *config_file) } /* - * charset_config_set_option: set a charset + * charset_config_create_option: set a charset */ int @@ -523,6 +523,8 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) weechat_plugin = plugin; + charset_debug = weechat_config_boolean (weechat_config_get ("weechat.plugin.debug")); + /* get terminal & internal charsets */ charset_terminal = weechat_info_get ("charset_terminal"); charset_internal = weechat_info_get ("charset_internal"); diff --git a/src/plugins/demo/demo.c b/src/plugins/demo/demo.c index b0977f0da..50deeae5e 100644 --- a/src/plugins/demo/demo.c +++ b/src/plugins/demo/demo.c @@ -411,6 +411,8 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) weechat_plugin = plugin; + demo_debug = weechat_config_boolean (weechat_config_get ("weechat.plugin.debug")); + weechat_hook_command ("demo_printf", _("print some messages on current ubffer"), _("[text]"), diff --git a/src/plugins/irc/irc-debug.c b/src/plugins/irc/irc-debug.c index 4f16ce8f3..2bc8e721f 100644 --- a/src/plugins/irc/irc-debug.c +++ b/src/plugins/irc/irc-debug.c @@ -156,6 +156,7 @@ irc_debug_signal_debug_dump_cb (void *data, const char *signal, void irc_debug_init () { + irc_debug = weechat_config_boolean (weechat_config_get ("weechat.plugin.debug")); weechat_hook_signal ("debug", &irc_debug_signal_debug_cb, NULL); weechat_hook_signal ("debug_dump", &irc_debug_signal_debug_dump_cb, NULL); } diff --git a/src/plugins/notify/CMakeLists.txt b/src/plugins/notify/CMakeLists.txt new file mode 100644 index 000000000..063b7ef24 --- /dev/null +++ b/src/plugins/notify/CMakeLists.txt @@ -0,0 +1,22 @@ +# Copyright (c) 2003-2008 FlashCode +# +# This program 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. +# +# This program 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 this program. If not, see . +# + +ADD_LIBRARY(notify MODULE notify.c) +SET_TARGET_PROPERTIES(notify PROPERTIES PREFIX "") + +TARGET_LINK_LIBRARIES(notify) + +INSTALL(TARGETS notify LIBRARY DESTINATION lib/${PROJECT_NAME}/plugins) diff --git a/src/plugins/notify/Makefile.am b/src/plugins/notify/Makefile.am new file mode 100644 index 000000000..be71095dc --- /dev/null +++ b/src/plugins/notify/Makefile.am @@ -0,0 +1,25 @@ +# Copyright (c) 2003-2008 FlashCode +# +# This program 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. +# +# This program 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 this program. If not, see . +# + +INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\" $(NOTIFY_CFLAGS) + +libdir = ${weechat_libdir}/plugins + +lib_LTLIBRARIES = notify.la + +notify_la_SOURCES = notify.c +notify_la_LDFLAGS = -module +notify_la_LIBADD = $(NOTIFY_LFLAGS) diff --git a/src/plugins/notify/notify.c b/src/plugins/notify/notify.c new file mode 100644 index 000000000..d001cf419 --- /dev/null +++ b/src/plugins/notify/notify.c @@ -0,0 +1,540 @@ +/* + * Copyright (c) 2003-2008 by FlashCode + * See README for License detail, AUTHORS for developers list. + * + * This program 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. + * + * This program 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 this program. If not, see . + */ + +/* notify.c: Notify plugin for WeeChat: set/save buffer notify levels */ + + +#include +#include +#include +#include + +#include "../weechat-plugin.h" + + +WEECHAT_PLUGIN_NAME("notify"); +WEECHAT_PLUGIN_DESCRIPTION("Notify plugin for WeeChat (set/save buffer notify levels)"); +WEECHAT_PLUGIN_AUTHOR("FlashCode "); +WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION); +WEECHAT_PLUGIN_WEECHAT_VERSION(WEECHAT_VERSION); +WEECHAT_PLUGIN_LICENSE("GPL3"); + +#define NOTIFY_CONFIG_NAME "notify" + +struct t_weechat_plugin *weechat_notify_plugin = NULL; +#define weechat_plugin weechat_notify_plugin + +struct t_config_file *notify_config_file = NULL; +struct t_config_section *notify_config_section_buffer = NULL; + +#define NOTIFY_NUM_LEVELS 4 + +char *notify_string[NOTIFY_NUM_LEVELS] = +{ "none", "highlight", "message", "all" }; + +int notify_debug = 0; + + +/* + * notify_search: search a notify level by name + */ + +int +notify_search (const char *notify_name) +{ + int i; + + for (i = 0; i < NOTIFY_NUM_LEVELS; i++) + { + if (weechat_strcasecmp (notify_name, notify_string[i]) == 0) + return i; + } + + /* notify level not found */ + return -1; +} + +/* + * notify_build_option_name: build option name for a buffer + */ + +char * +notify_build_option_name (struct t_gui_buffer *buffer) +{ + char *option_name, *plugin_name, *category, *name; + int length; + + plugin_name = weechat_buffer_get_string (buffer, "plugin"); + category = weechat_buffer_get_string (buffer, "category"); + name = weechat_buffer_get_string (buffer, "name"); + + length = ((plugin_name) ? strlen (plugin_name) : 0) + 1 + + strlen (category) + 1 + strlen (name) + 1; + option_name = malloc (length); + if (!option_name) + return NULL; + + snprintf (option_name, length, "%s%s%s.%s", + (plugin_name) ? plugin_name : "", + (plugin_name) ? "." : "", + category, + name); + + return option_name; +} + +/* + * notify_debug_cb: callback for "debug" signal + */ + +int +notify_debug_cb (void *data, const char *signal, const char *type_data, + void *signal_data) +{ + /* make C compiler happy */ + (void) data; + (void) signal; + + if (strcmp (type_data, WEECHAT_HOOK_SIGNAL_STRING) == 0) + { + if (weechat_strcasecmp ((char *)signal_data, "notify") == 0) + { + notify_debug ^= 1; + if (notify_debug) + weechat_printf (NULL, _("%s: debug enabled"), "notify"); + else + weechat_printf (NULL, _("%s: debug disabled"), "notify"); + } + } + + return WEECHAT_RC_OK; +} + +/* + * notify_get: read a notify level in config file + * we first try with all arguments, then remove one by one + * to find notify level (from specific to general notify) + */ + +int +notify_get (const char *name) +{ + char *option_name, *ptr_end; + struct t_config_option *ptr_option; + + option_name = strdup (name); + if (option_name) + { + ptr_end = option_name + strlen (option_name); + while (ptr_end >= option_name) + { + ptr_option = weechat_config_search_option (notify_config_file, + notify_config_section_buffer, + option_name); + if (ptr_option) + { + free (option_name); + return weechat_config_integer (ptr_option); + } + ptr_end--; + while ((ptr_end >= option_name) && (ptr_end[0] != '.')) + { + ptr_end--; + } + if ((ptr_end >= option_name) && (ptr_end[0] == '.')) + ptr_end[0] = '\0'; + } + ptr_option = weechat_config_search_option (notify_config_file, + notify_config_section_buffer, + option_name); + + free (option_name); + + if (ptr_option) + return weechat_config_integer (ptr_option); + } + + /* notify level not found */ + return -1; +} + +/* + * notify_set_buffer: set notify for a buffer + */ + +void +notify_set_buffer (struct t_gui_buffer *buffer) +{ + char *option_name, notify_str[16]; + int notify; + + option_name = notify_build_option_name (buffer); + if (option_name) + { + notify = notify_get (option_name); + if (notify_debug) + { + weechat_printf (NULL, + _("notify: debug: set notify for buffer %s to " + "%d (%s)"), + option_name, notify, + (notify < 0) ? "reset" : notify_string[notify]); + } + /* set notify for buffer */ + snprintf (notify_str, sizeof (notify_str), "%d", notify); + weechat_buffer_set (buffer, "notify", notify_str); + free (option_name); + } +} + +/* + * notify_set_buffer_all: set notify for all open buffers + */ + +void +notify_set_buffer_all () +{ + struct t_plugin_infolist *ptr_infolist; + + ptr_infolist = weechat_infolist_get ("buffer", NULL, NULL); + if (ptr_infolist) + { + while (weechat_infolist_next (ptr_infolist)) + { + notify_set_buffer (weechat_infolist_pointer (ptr_infolist, + "pointer")); + } + weechat_infolist_free (ptr_infolist); + } +} + +/* + * notify_config_cb: callback for config hook + */ + +int +notify_config_cb (void *data, const char *option, const char *value) +{ + /* make C compiler happy */ + (void) data; + (void) option; + (void) value; + + notify_set_buffer_all (); + + return WEECHAT_RC_OK; +} + +/* + * notify_config_reaload: reload notify configuration file + */ + +int +notify_config_reload (void *data, struct t_config_file *config_file) +{ + /* make C compiler happy */ + (void) data; + + /* free all notify levels */ + weechat_config_section_free_options (notify_config_section_buffer); + + return weechat_config_reload (config_file); +} + +/* + * notify_config_create_option: set a notify level + */ + +int +notify_config_create_option (void *data, struct t_config_file *config_file, + struct t_config_section *section, + const char *option_name, const char *value) +{ + struct t_config_option *ptr_option; + int rc; + + /* make C compiler happy */ + (void) data; + + rc = WEECHAT_CONFIG_OPTION_SET_ERROR; + + if (option_name) + { + ptr_option = weechat_config_search_option (config_file, section, + option_name); + if (ptr_option) + { + if (value && value[0]) + rc = weechat_config_option_set (ptr_option, value, 1); + else + { + weechat_config_option_free (ptr_option); + rc = WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE; + } + } + else + { + if (value && value[0]) + { + ptr_option = weechat_config_new_option ( + config_file, section, + option_name, "integer", NULL, + "none|highlight|message|all", + 0, 0, value, NULL, NULL, NULL, NULL, NULL, NULL); + rc = (ptr_option) ? + WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE : WEECHAT_CONFIG_OPTION_SET_ERROR; + } + else + rc = WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE; + } + } + + if (rc == WEECHAT_CONFIG_OPTION_SET_ERROR) + { + weechat_printf (NULL, + _("%s%s: unable to set notify level \"%s\" => \"%s\""), + weechat_prefix ("error"), "notify", + option_name, value); + } + + return rc; +} + +/* + * notify_config_init: init notify configuration file + * return: 1 if ok, 0 if error + */ + +int +notify_config_init () +{ + struct t_config_section *ptr_section; + + notify_config_file = weechat_config_new (NOTIFY_CONFIG_NAME, + ¬ify_config_reload, NULL); + if (!notify_config_file) + return 0; + + ptr_section = weechat_config_new_section (notify_config_file, "buffer", + 1, 1, + NULL, NULL, + NULL, NULL, + NULL, NULL, + ¬ify_config_create_option, NULL); + if (!ptr_section) + { + weechat_config_free (notify_config_file); + return 0; + } + + notify_config_section_buffer = ptr_section; + + return 1; +} + +/* + * notify_config_read: read notify configuration file + */ + +int +notify_config_read () +{ + return weechat_config_read (notify_config_file); +} + +/* + * notify_config_write: write notify configuration file + */ + +int +notify_config_write () +{ + return weechat_config_write (notify_config_file); +} + +/* + * notify_buffer_open_signal_cb: callback for "buffer_open" signal + */ + +int +notify_buffer_open_signal_cb (void *data, const char *signal, + const char *type_data, void *signal_data) +{ + /* make C compiler happy */ + (void) data; + (void) signal; + (void) type_data; + + notify_set_buffer (signal_data); + + return WEECHAT_RC_OK; +} + +/* + * notify_set: set a notify level for a buffer + */ + +void +notify_set (struct t_gui_buffer *buffer, const char *name, int value) +{ + char notify_str[16]; + + /* create/update option */ + if (notify_config_create_option (NULL, + notify_config_file, + notify_config_section_buffer, + name, + (value < 0) ? + NULL : notify_string[value]) > 0) + { + /* set notify for buffer */ + snprintf (notify_str, sizeof (notify_str), "%d", value); + weechat_buffer_set (buffer, "notify", notify_str); + + /* display message */ + if (value >= 0) + weechat_printf (NULL, _("Notify level: %s => %s"), + name, notify_string[value]); + else + weechat_printf (NULL, _("Notify level: %s: removed"), name); + } +} + +/* + * notify_command_cb: callback for /notify command + */ + +int +notify_command_cb (void *data, struct t_gui_buffer *buffer, int argc, + char **argv, char **argv_eol) +{ + int notify_level; + char *option_name; + + /* make C compiler happy */ + (void) data; + + /* check arguments */ + if (argc < 2) + { + weechat_printf (NULL, + _("%s%s: missing parameters"), + weechat_prefix ("error"), "notify"); + return WEECHAT_RC_ERROR; + } + + /* check if notify level exists */ + if (weechat_strcasecmp (argv[1], "reset") == 0) + notify_level = -1; + else + { + notify_level = notify_search (argv_eol[1]); + if (notify_level < 0) + { + weechat_printf (NULL, + _("%s%s: unknown notify level \"%s\""), + weechat_prefix ("error"), "notify", + argv_eol[1]); + return WEECHAT_RC_ERROR; + } + } + + /* set buffer notify level */ + option_name = notify_build_option_name (buffer); + + if (option_name) + { + notify_set (buffer, option_name, notify_level); + free (option_name); + } + else + return WEECHAT_RC_ERROR; + + return WEECHAT_RC_OK; +} + +/* + * weechat_plugin_init: init notify plugin + */ + +int +weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) +{ + /* make C compiler happy */ + (void) argc; + (void) argv; + + weechat_plugin = plugin; + + notify_debug = weechat_config_boolean (weechat_config_get ("weechat.plugin.debug")); + + if (!notify_config_init ()) + { + weechat_printf (NULL, + _("%s%s: error creating configuration file"), + weechat_prefix("error"), "notify"); + return WEECHAT_RC_ERROR; + } + notify_config_read (); + + /* /notify command */ + weechat_hook_command ("notify", + _("change notify level for current buffer"), + _("[reset | none | highlight | message | all]"), + _(" reset: reset notify level to default value\n" + " none: buffer will never be in hotlist\n" + "highlight: buffer will be in hotlist for " + "highlights only\n" + " message: buffer will be in hotlist for " + "highlights and user messages only\n" + " all: buffer will be in hotlist for " + "any text printed"), + "reset|none|highlight|message|all", + ¬ify_command_cb, NULL); + + /* callback when a buffer is open */ + weechat_hook_signal ("buffer_open", ¬ify_buffer_open_signal_cb, NULL); + + /* callback when a config option is changed */ + weechat_hook_config ("notify.buffer.*", ¬ify_config_cb, NULL); + + /* callback for debug */ + weechat_hook_signal ("debug", ¬ify_debug_cb, NULL); + + /* set notify for open buffers */ + notify_set_buffer_all (); + + return WEECHAT_RC_OK; +} + +/* + * weechat_plugin_end: end notify plugin + */ + +int +weechat_plugin_end (struct t_weechat_plugin *plugin) +{ + /* make C compiler happy */ + (void) plugin; + + notify_config_write (); + + weechat_config_free (notify_config_file); + + return WEECHAT_RC_OK; +} diff --git a/src/plugins/plugin-api.c b/src/plugins/plugin-api.c index ca0c8d576..db7b10dcc 100644 --- a/src/plugins/plugin-api.c +++ b/src/plugins/plugin-api.c @@ -498,7 +498,7 @@ plugin_api_infolist_get_add_buffer (struct t_plugin_infolist *infolist, return 0; if (!plugin_infolist_new_var_integer (ptr_item, "type", buffer->type)) return 0; - if (!plugin_infolist_new_var_integer (ptr_item, "notify_level", buffer->notify_level)) + if (!plugin_infolist_new_var_integer (ptr_item, "notify", buffer->notify)) return 0; if (!plugin_infolist_new_var_integer (ptr_item, "num_displayed", buffer->num_displayed)) return 0; diff --git a/src/plugins/plugin.c b/src/plugins/plugin.c index 9626a3624..676907ff6 100644 --- a/src/plugins/plugin.c +++ b/src/plugins/plugin.c @@ -389,6 +389,7 @@ plugin_load (const char *filename) new_plugin->buffer_search = &gui_buffer_search_by_category_name; new_plugin->buffer_clear = &gui_buffer_clear; new_plugin->buffer_close = &gui_buffer_close; + new_plugin->buffer_get_integer = &gui_buffer_get_integer; new_plugin->buffer_get_string = &gui_buffer_get_string; new_plugin->buffer_get_pointer = &gui_buffer_get_pointer; new_plugin->buffer_set = &gui_buffer_set; diff --git a/src/plugins/scripts/lua/weechat-lua-api.c b/src/plugins/scripts/lua/weechat-lua-api.c index add53f967..92c8b2e31 100644 --- a/src/plugins/scripts/lua/weechat-lua-api.c +++ b/src/plugins/scripts/lua/weechat-lua-api.c @@ -3365,6 +3365,45 @@ weechat_lua_api_buffer_close (lua_State *L) LUA_RETURN_OK; } +/* + * weechat_lua_api_buffer_get_integer: get a buffer property as integer + */ + +static int +weechat_lua_api_buffer_get_integer (lua_State *L) +{ + const char *buffer, *property; + int n, value; + + /* make C compiler happy */ + (void) L; + + if (!lua_current_script) + { + WEECHAT_SCRIPT_MSG_NOT_INITIALIZED("buffer_get_integer"); + LUA_RETURN_INT(-1); + } + + buffer = NULL; + property = NULL; + + n = lua_gettop (lua_current_interpreter); + + if (n < 2) + { + WEECHAT_SCRIPT_MSG_WRONG_ARGUMENTS("buffer_get_integer"); + LUA_RETURN_INT(-1); + } + + buffer = lua_tostring (lua_current_interpreter, -2); + property = lua_tostring (lua_current_interpreter, -1); + + value = weechat_buffer_get_integer (script_str2ptr (buffer), + property); + + LUA_RETURN_INT(value); +} + /* * weechat_lua_api_buffer_get_string: get a buffer property as string */ @@ -4968,6 +5007,7 @@ const struct luaL_reg weechat_lua_api_funcs[] = { { "buffer_search", &weechat_lua_api_buffer_search }, { "buffer_clear", &weechat_lua_api_buffer_clear }, { "buffer_close", &weechat_lua_api_buffer_close }, + { "buffer_get_integer", &weechat_lua_api_buffer_get_integer }, { "buffer_get_string", &weechat_lua_api_buffer_get_string }, { "buffer_get_pointer", &weechat_lua_api_buffer_get_pointer }, { "buffer_set", &weechat_lua_api_buffer_set }, diff --git a/src/plugins/scripts/perl/weechat-perl-api.c b/src/plugins/scripts/perl/weechat-perl-api.c index 35e2091f1..586f0fbbd 100644 --- a/src/plugins/scripts/perl/weechat-perl-api.c +++ b/src/plugins/scripts/perl/weechat-perl-api.c @@ -2810,6 +2810,38 @@ static XS (XS_weechat_buffer_close) PERL_RETURN_OK; } +/* + * weechat::buffer_get_integer: get a buffer property as integer + */ + +static XS (XS_weechat_buffer_get_integer) +{ + char *buffer, *property; + int value; + dXSARGS; + + /* make C compiler happy */ + (void) cv; + + if (!perl_current_script) + { + WEECHAT_SCRIPT_MSG_NOT_INITIALIZED("buffer_get_integer"); + PERL_RETURN_INT(-1); + } + + if (items < 2) + { + WEECHAT_SCRIPT_MSG_WRONG_ARGUMENTS("buffer_get_integer"); + PERL_RETURN_INT(-1); + } + + buffer = SvPV (ST (0), PL_na); + property = SvPV (ST (1), PL_na); + value = weechat_buffer_get_integer (script_str2ptr (buffer), property); + + PERL_RETURN_INT(value); +} + /* * weechat::buffer_get_string: get a buffer property as string */ @@ -3898,6 +3930,7 @@ weechat_perl_api_init (pTHX) newXS ("weechat::buffer_search", XS_weechat_buffer_search, "weechat"); newXS ("weechat::buffer_clear", XS_weechat_buffer_clear, "weechat"); newXS ("weechat::buffer_close", XS_weechat_buffer_close, "weechat"); + newXS ("weechat::buffer_get_integer", XS_weechat_buffer_get_integer, "weechat"); newXS ("weechat::buffer_get_string", XS_weechat_buffer_get_string, "weechat"); newXS ("weechat::buffer_get_pointer", XS_weechat_buffer_get_pointer, "weechat"); newXS ("weechat::buffer_set", XS_weechat_buffer_set, "weechat"); diff --git a/src/plugins/scripts/python/weechat-python-api.c b/src/plugins/scripts/python/weechat-python-api.c index f6467e6c3..605c8d219 100644 --- a/src/plugins/scripts/python/weechat-python-api.c +++ b/src/plugins/scripts/python/weechat-python-api.c @@ -2986,6 +2986,39 @@ weechat_python_api_buffer_close (PyObject *self, PyObject *args) PYTHON_RETURN_OK; } +/* + * weechat_python_api_buffer_get_integer get a buffer property as integer + */ + +static PyObject * +weechat_python_api_buffer_get_integer (PyObject *self, PyObject *args) +{ + char *buffer, *property; + int value; + + /* make C compiler happy */ + (void) self; + + if (!python_current_script) + { + WEECHAT_SCRIPT_MSG_NOT_INITIALIZED("buffer_get_integer"); + PYTHON_RETURN_INT(-1); + } + + buffer = NULL; + property = NULL; + + if (!PyArg_ParseTuple (args, "ss", &buffer, &property)) + { + WEECHAT_SCRIPT_MSG_WRONG_ARGUMENTS("buffer_get_integer"); + PYTHON_RETURN_INT(-1); + } + + value = weechat_buffer_get_integer (script_str2ptr (buffer), property); + + PYTHON_RETURN_INT(value); +} + /* * weechat_python_api_buffer_get_string: get a buffer property as string */ @@ -4144,6 +4177,7 @@ PyMethodDef weechat_python_funcs[] = { "buffer_search", &weechat_python_api_buffer_search, METH_VARARGS, "" }, { "buffer_clear", &weechat_python_api_buffer_clear, METH_VARARGS, "" }, { "buffer_close", &weechat_python_api_buffer_close, METH_VARARGS, "" }, + { "buffer_get_integer", &weechat_python_api_buffer_get_integer, METH_VARARGS, "" }, { "buffer_get_string", &weechat_python_api_buffer_get_string, METH_VARARGS, "" }, { "buffer_get_pointer", &weechat_python_api_buffer_get_pointer, METH_VARARGS, "" }, { "buffer_set", &weechat_python_api_buffer_set, METH_VARARGS, "" }, diff --git a/src/plugins/scripts/ruby/weechat-ruby-api.c b/src/plugins/scripts/ruby/weechat-ruby-api.c index 4e58d8e7b..b0f91fcd6 100644 --- a/src/plugins/scripts/ruby/weechat-ruby-api.c +++ b/src/plugins/scripts/ruby/weechat-ruby-api.c @@ -3427,6 +3427,43 @@ weechat_ruby_api_buffer_close (VALUE class, VALUE buffer, RUBY_RETURN_OK; } +/* + * weechat_ruby_api_buffer_get_integer: get a buffer property as integer + */ + +static VALUE +weechat_ruby_api_buffer_get_integer (VALUE class, VALUE buffer, VALUE property) +{ + char *c_buffer, *c_property; + int value; + + /* make C compiler happy */ + (void) class; + + if (!ruby_current_script) + { + WEECHAT_SCRIPT_MSG_NOT_INITIALIZED("buffer_get_integer"); + RUBY_RETURN_INT(-1); + } + + if (NIL_P (buffer) || NIL_P (property)) + { + WEECHAT_SCRIPT_MSG_WRONG_ARGUMENTS("buffer_get_integer"); + RUBY_RETURN_INT(-1); + } + + Check_Type (buffer, T_STRING); + Check_Type (property, T_STRING); + + c_buffer = STR2CSTR (buffer); + c_property = STR2CSTR (property); + + value = weechat_buffer_get_integer (script_str2ptr (c_buffer), + c_property); + + RUBY_RETURN_INT(value); +} + /* * weechat_ruby_api_buffer_get_string: get a buffer property as string */ @@ -4771,6 +4808,7 @@ weechat_ruby_api_init (VALUE ruby_mWeechat) rb_define_module_function (ruby_mWeechat, "buffer_search", &weechat_ruby_api_buffer_search, 2); rb_define_module_function (ruby_mWeechat, "buffer_clear", &weechat_ruby_api_buffer_clear, 1); rb_define_module_function (ruby_mWeechat, "buffer_close", &weechat_ruby_api_buffer_close, 1); + rb_define_module_function (ruby_mWeechat, "buffer_get_integer", &weechat_ruby_api_buffer_get_integer, 2); rb_define_module_function (ruby_mWeechat, "buffer_get_string", &weechat_ruby_api_buffer_get_string, 2); rb_define_module_function (ruby_mWeechat, "buffer_get_pointer", &weechat_ruby_api_buffer_get_pointer, 2); rb_define_module_function (ruby_mWeechat, "buffer_set", &weechat_ruby_api_buffer_set, 3); diff --git a/src/plugins/weechat-plugin.h b/src/plugins/weechat-plugin.h index b60f62751..7188e1ff0 100644 --- a/src/plugins/weechat-plugin.h +++ b/src/plugins/weechat-plugin.h @@ -381,6 +381,7 @@ struct t_weechat_plugin struct t_gui_buffer *(*buffer_search) (const char *category, const char *name); void (*buffer_clear) (struct t_gui_buffer *buffer); void (*buffer_close) (struct t_gui_buffer *buffer, int switch_to_another); + int (*buffer_get_integer) (struct t_gui_buffer *buffer, const char *property); char *(*buffer_get_string) (struct t_gui_buffer *buffer, const char *property); void *(*buffer_get_pointer) (struct t_gui_buffer *buffer, const char *property); void (*buffer_set) (struct t_gui_buffer *buffer, const char *property, @@ -807,6 +808,8 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin); weechat_plugin->buffer_clear(__buffer) #define weechat_buffer_close(__buffer, __switch_to_another) \ weechat_plugin->buffer_close(__buffer, __switch_to_another) +#define weechat_buffer_get_integer(__buffer, __property) \ + weechat_plugin->buffer_get_integer(__buffer, __property) #define weechat_buffer_get_string(__buffer, __property) \ weechat_plugin->buffer_get_string(__buffer, __property) #define weechat_buffer_get_pointer(__buffer, __property) \ diff --git a/src/plugins/xfer/xfer.c b/src/plugins/xfer/xfer.c index c0c8951d6..52a11a2c9 100644 --- a/src/plugins/xfer/xfer.c +++ b/src/plugins/xfer/xfer.c @@ -1204,6 +1204,8 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) (void) argv; weechat_plugin = plugin; + + xfer_debug = weechat_config_boolean (weechat_config_get ("weechat.plugin.debug")); if (!xfer_config_init ()) return WEECHAT_RC_ERROR;