diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2009-04-24 16:26:13 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2009-04-24 16:26:13 +0200 |
commit | 163c5d6dfb3df598b3204b7a68041fb093649e9c (patch) | |
tree | b807eb22d811241d8d9384b5330b05db25af6fc7 | |
parent | 671087e26a2f4c48189c25b73b8fab96a9bd15e8 (diff) | |
download | weechat-163c5d6dfb3df598b3204b7a68041fb093649e9c.zip |
Remove notify plugin (moved to core)
35 files changed, 646 insertions, 962 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3148a6052..2d102dc78 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,7 +49,6 @@ OPTION(DISABLE_FIFO "Disable FIFO plugin") OPTION(DISABLE_IRC "Disable IRC plugin") OPTION(DISABLE_JABBER "Disable Jabber plugin") OPTION(DISABLE_LOGGER "Disable Logger plugin") -OPTION(DISABLE_NOTIFY "Disable Notify plugin") OPTION(DISABLE_RELAY "Disable Relay plugin") OPTION(DISABLE_SCRIPTS "Disable script plugins") OPTION(DISABLE_PERL "Disable Perl scripting language") diff --git a/configure.in b/configure.in index 5cc7dbe9d..7a164303b 100644 --- a/configure.in +++ b/configure.in @@ -102,7 +102,6 @@ AH_VERBATIM([PLUGIN_FIFO], [#undef PLUGIN_FIFO]) AH_VERBATIM([PLUGIN_IRC], [#undef PLUGIN_IRC]) AH_VERBATIM([PLUGIN_JABBER], [#undef PLUGIN_JABBER]) AH_VERBATIM([PLUGIN_LOGGER], [#undef PLUGIN_LOGGER]) -AH_VERBATIM([PLUGIN_NOTIFY], [#undef PLUGIN_NOTIFY]) AH_VERBATIM([PLUGIN_RELAY], [#undef PLUGIN_RELAY]) AH_VERBATIM([PLUGIN_PERL], [#undef PLUGIN_PERL]) AH_VERBATIM([PLUGIN_PYTHON], [#undef PLUGIN_PYTHON]) @@ -129,7 +128,6 @@ AC_ARG_ENABLE(fifo, [ --disable-fifo turn off Fifo plugin (def AC_ARG_ENABLE(irc, [ --disable-irc turn off IRC plugin (default=compiled)],enable_irc=$enableval,enable_irc=yes) AC_ARG_ENABLE(jabber, [ --disable-jabber turn off Jabber plugin (default=compiled)],enable_jabber=$enableval,enable_jabber=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(relay, [ --disable-relay turn off Relay plugin (default=compiled)],enable_relay=$enableval,enable_relay=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) @@ -409,18 +407,6 @@ 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 - # --------------------------------- relay -------------------------------------- if test "x$enable_relay" = "xyes" ; then @@ -997,7 +983,6 @@ AM_CONDITIONAL(PLUGIN_FIFO, test "$enable_fifo" = "yes") AM_CONDITIONAL(PLUGIN_IRC, test "$enable_irc" = "yes") AM_CONDITIONAL(PLUGIN_JABBER, test "$enable_jabber" = "yes") AM_CONDITIONAL(PLUGIN_LOGGER, test "$enable_logger" = "yes") -AM_CONDITIONAL(PLUGIN_NOTIFY, test "$enable_notify" = "yes") AM_CONDITIONAL(PLUGIN_RELAY, test "$enable_relay" = "yes") AM_CONDITIONAL(PLUGIN_PERL, test "$enable_perl" = "yes") AM_CONDITIONAL(PLUGIN_PYTHON, test "$enable_python" = "yes") @@ -1029,7 +1014,6 @@ AC_OUTPUT([Makefile src/plugins/irc/Makefile src/plugins/jabber/Makefile src/plugins/logger/Makefile - src/plugins/notify/Makefile src/plugins/relay/Makefile src/plugins/scripts/Makefile src/plugins/scripts/perl/Makefile @@ -1096,9 +1080,6 @@ 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_relay" = "xyes"; then listplugins="$listplugins relay" fi diff --git a/doc/de/autogen/weechat_commands.xml b/doc/de/autogen/weechat_commands.xml index b385619bd..fa4843af0 100644 --- a/doc/de/autogen/weechat_commands.xml +++ b/doc/de/autogen/weechat_commands.xml @@ -52,7 +52,7 @@ Examples: /bar scroll nicklist * ye </programlisting> -<command>/buffer [clear [number | -all] | move number | close | list | notify | localvar | set property value | number | name]</command> +<command>/buffer [clear [number | -all] | move number | close | list | notify level | localvar | set property value | number | name]</command> <programlisting> Puffer verwalten @@ -60,7 +60,7 @@ Puffer verwalten move: move buffer in the list (may be relative, for example -1) close: close buffer list: list buffers (no parameter implies this list) - notify: display notify levels for all opened buffers + notify: set notify level for current buffer localvar: display local variables for current buffer set: set a property for current buffer number: jump to buffer by number diff --git a/doc/de/autogen/weechat_options.xml b/doc/de/autogen/weechat_options.xml index a4116a7d6..beb9902eb 100644 --- a/doc/de/autogen/weechat_options.xml +++ b/doc/de/autogen/weechat_options.xml @@ -366,6 +366,16 @@ </listitem> </itemizedlist> +<command>weechat.color.chat_value</command>: text color for values +<itemizedlist> + <listitem> + <para>type: color</para> + </listitem> + <listitem> + <para>values: a color name (default value: cyan)</para> + </listitem> +</itemizedlist> + <command>weechat.color.input_actions</command>: text color for actions in input line <itemizedlist> <listitem> diff --git a/doc/docgen.pl b/doc/docgen.pl index ad2c823bc..10c4d08e2 100644 --- a/doc/docgen.pl +++ b/doc/docgen.pl @@ -66,11 +66,10 @@ my %plugin_list = ("weechat" => "co", "alias" => "", "aspell" => "o", "charset" => "co", "demo" => "co", "fifo" => "co", "irc" => "co", "jabber" => "co", - "logger" => "co", "notify" => "co", - "relay" => "co", "perl" => "", - "python" => "", "ruby" => "", - "lua" => "", "tcl" => "", - "xfer" => "co"); + "logger" => "co", "relay" => "co", + "perl" => "", "python" => "", + "ruby" => "", "lua" => "", + "tcl" => "", "xfer" => "co"); # options to ignore my @ignore_options = ("aspell\\.dict\\..*", @@ -82,7 +81,8 @@ my @ignore_options = ("aspell\\.dict\\..*", "logger\\.mask\\..*", "weechat\\.proxy\\..*", "weechat\\.bar\\..*", - "weechat\\.debug\\..*"); + "weechat\\.debug\\..*", + "weechat\\.notify\\..*"); # infos to ignore my @ignore_infos_plugins = ("jabber"); diff --git a/doc/en/autogen/weechat_commands.xml b/doc/en/autogen/weechat_commands.xml index fb714edf6..0e2f284b0 100644 --- a/doc/en/autogen/weechat_commands.xml +++ b/doc/en/autogen/weechat_commands.xml @@ -52,7 +52,7 @@ Examples: /bar scroll nicklist * ye </programlisting> -<command>/buffer [clear [number | -all] | move number | close | list | notify | localvar | set property value | number | name]</command> +<command>/buffer [clear [number | -all] | move number | close | list | notify level | localvar | set property value | number | name]</command> <programlisting> manage buffers @@ -60,7 +60,7 @@ manage buffers move: move buffer in the list (may be relative, for example -1) close: close buffer list: list buffers (no parameter implies this list) - notify: display notify levels for all opened buffers + notify: set notify level for current buffer localvar: display local variables for current buffer set: set a property for current buffer number: jump to buffer by number diff --git a/doc/en/autogen/weechat_options.xml b/doc/en/autogen/weechat_options.xml index d6c4c499f..bc6e18483 100644 --- a/doc/en/autogen/weechat_options.xml +++ b/doc/en/autogen/weechat_options.xml @@ -366,6 +366,16 @@ </listitem> </itemizedlist> +<command>weechat.color.chat_value</command>: text color for values +<itemizedlist> + <listitem> + <para>type: color</para> + </listitem> + <listitem> + <para>values: a color name (default value: cyan)</para> + </listitem> +</itemizedlist> + <command>weechat.color.input_actions</command>: text color for actions in input line <itemizedlist> <listitem> diff --git a/doc/fr/autogen/weechat_commands.xml b/doc/fr/autogen/weechat_commands.xml index dd720cb75..ea3193824 100644 --- a/doc/fr/autogen/weechat_commands.xml +++ b/doc/fr/autogen/weechat_commands.xml @@ -52,7 +52,7 @@ Exemples : /bar scroll nicklist * ye </programlisting> -<command>/buffer [clear [nombre | -all] | move nombre | close | list | notify | localvar | set propriété valeur | nombre | nom]</command> +<command>/buffer [clear [nombre | -all] | move nombre | close | list | notify niveau | localvar | set propriété valeur | nombre | nom]</command> <programlisting> gestion des tampons @@ -60,7 +60,7 @@ gestion des tampons move: déplace le tampon dans la liste (peut être relatif, par exemple -1) close: ferme le tampon list: liste les tampons ouverts (pas de paramètre affiche cette liste) - notify: affiche les niveaux de notification pour tous les tampons ouverts + notify: définit le niveau de notification pour le tampon courant localvar: affiche la liste des variables locales pour le tampon courant set: modifier une propriété du tampon courant nombre: saute au tampon qui a ce numéro diff --git a/doc/fr/autogen/weechat_options.xml b/doc/fr/autogen/weechat_options.xml index 0d91b618a..728fdcf47 100644 --- a/doc/fr/autogen/weechat_options.xml +++ b/doc/fr/autogen/weechat_options.xml @@ -366,6 +366,16 @@ </listitem> </itemizedlist> +<command>weechat.color.chat_value</command>: couleur du texte pour les valeurs +<itemizedlist> + <listitem> + <para>type: couleur</para> + </listitem> + <listitem> + <para>valeurs: un nom de couleur (valeur par défaut: cyan)</para> + </listitem> +</itemizedlist> + <command>weechat.color.input_actions</command>: couleur du texte pour les actions dans la ligne de saisie <itemizedlist> <listitem> diff --git a/doc/include_autogen.xml b/doc/include_autogen.xml index 49f4e8d1a..4c650d3e7 100644 --- a/doc/include_autogen.xml +++ b/doc/include_autogen.xml @@ -8,7 +8,6 @@ <!ENTITY jabber_commands.xml SYSTEM "autogen/jabber_commands.xml"> <!ENTITY logger_commands.xml SYSTEM "autogen/logger_commands.xml"> <!ENTITY lua_commands.xml SYSTEM "autogen/lua_commands.xml"> -<!ENTITY notify_commands.xml SYSTEM "autogen/notify_commands.xml"> <!ENTITY perl_commands.xml SYSTEM "autogen/perl_commands.xml"> <!ENTITY python_commands.xml SYSTEM "autogen/python_commands.xml"> <!ENTITY relay_commands.xml SYSTEM "autogen/relay_commands.xml"> diff --git a/po/POTFILES.in b/po/POTFILES.in index fe508b5c6..154e34ed3 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -175,7 +175,6 @@ ./src/plugins/logger/logger-info.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 @@ -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: 2009-04-21 17:40+0200\n" +"POT-Creation-Date: 2009-04-24 16:15+0200\n" "PO-Revision-Date: 2009-01-03 00:42+0100\n" "Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -193,6 +193,10 @@ msgstr "%sChyba: neznámá volba pro příkaz \"%s\"" msgid "Buffers list:" msgstr "Seznam bufferů:" +#, fuzzy, c-format +msgid " %s[%s%d%s]%s (%s) %s%s%s (notify: %s)" +msgstr "%s%s %s(%s%s%s)%s skončil" + #, c-format msgid "%sError: incorrect buffer number" msgstr "%sChyba: nekorektní číslo bufferu" @@ -201,9 +205,6 @@ msgstr "%sChyba: nekorektní číslo bufferu" msgid "%sError: WeeChat main buffer can't be closed" msgstr "%sChyba: hlavní buffer WeeChat nemůže být zavřen" -msgid "Notify levels:" -msgstr "Level upozornění:" - #, c-format msgid "Local variables for buffer \"%s\":" msgstr "Lokální proměnné pro buffer \"%s\":" @@ -778,8 +779,8 @@ msgid "manage buffers" msgstr "řídit buffery" msgid "" -"[clear [number | -all] | move number | close | list | notify | localvar | " -"set property value | number | name]" +"[clear [number | -all] | move number | close | list | notify level | " +"localvar | set property value | number | name]" msgstr "" #, fuzzy @@ -789,7 +790,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: display notify levels for all opened buffers\n" +" notify: set notify level for current buffer\n" "localvar: display local variables for current buffer\n" " set: set a property for current buffer\n" " number: jump to buffer by number\n" @@ -1256,6 +1257,10 @@ msgstr "\t\tZměnil se den na %s" msgid "debug level for plugin (\"core\" for WeeChat core)" msgstr "" +#, fuzzy +msgid "Notify level for buffer" +msgstr "nenalezeno jméno kanálu pro buffer" + msgid "command executed when WeeChat starts, after loading plugins" msgstr "příkaz spuštěný při startu WeeChat, po načtení pluginů" @@ -1557,6 +1562,10 @@ msgid "background color for marker on lines where text sought is found" msgstr "barva pro vstupní text" #, fuzzy +msgid "text color for values" +msgstr "barva pro text rozhovoru" + +#, fuzzy msgid "text color for current buffer number in status bar" msgstr "barva pro aktuální kanál v stavovém řádku" @@ -2047,6 +2056,10 @@ msgid "Act: " msgstr "Aktivní: " #, fuzzy, c-format +msgid "Notify changed for \"%s%s.%s%s\": \"%s%s%s\" to \"%s%s%s\"" +msgstr "%s%s%s změnil téma pro %s%s%s na:" + +#, fuzzy, c-format msgid "%sError: a buffer with same name (%s) already exists" msgstr "" "%s nemohu načíst plugin \"%s\": plugin se stejným jménem již existuje\n" @@ -4783,43 +4796,6 @@ msgstr "" msgid "list of logger buffers" msgstr "časová známka pro buffer" -#, c-format -msgid "notify: debug: set notify for buffer %s to %d (%s)" -msgstr "notify: debug: nastavit notifikaci pro buffer %s na %d (%s)" - -#, 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 "%s%s: missing parameters" -msgstr "%s chybí argument pro volbu \"%s\"\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 "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: resetovat úroveň notifikace do výchozí hodnoty\n" -" none: buffer nikdy nebude v hotlistu\n" -"highlight: buffer bude v hotlistu pouze při zvýraznění\n" -" message: buffer bude v hotlistu pouze při zvýraznění a uživatelských " -"zprávách\n" -" all: buffer bude v hotlistu pro jakýkoliv vytištěný text" - #, fuzzy msgid "WeeChat version" msgstr "verze serveru" @@ -5734,6 +5710,46 @@ 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" +#~ msgid "notify: debug: set notify for buffer %s to %d (%s)" +#~ msgstr "notify: debug: nastavit notifikaci pro buffer %s na %d (%s)" + +#, fuzzy +#~ msgid "%s%s: unable to set notify level \"%s\" => \"%s\"" +#~ msgstr "%s nedostatek paměti pro infobar zprávu\n" + +#, fuzzy +#~ msgid "%s%s: missing parameters" +#~ msgstr "%s chybí argument pro volbu \"%s\"\n" + +#, fuzzy +#~ 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 "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: resetovat úroveň notifikace do výchozí hodnoty\n" +#~ " none: buffer nikdy nebude v hotlistu\n" +#~ "highlight: buffer bude v hotlistu pouze při zvýraznění\n" +#~ " message: buffer bude v hotlistu pouze při zvýraznění a uživatelských " +#~ "zprávách\n" +#~ " all: buffer bude v hotlistu pro jakýkoliv vytištěný text" + +#~ msgid "Notify levels:" +#~ msgstr "Level upozornění:" + #, fuzzy #~ msgid "list of aliases" #~ msgstr "Seznam pro aliasy:\n" @@ -6082,10 +6098,6 @@ msgstr "%s chybí argument pro volbu \"%s\"\n" #~ msgstr "Lokální proměnné pro buffer \"%s\":" #, fuzzy -#~ msgid " %s[%s%d%s]%s (%s) %s%s%s: %s%s%s%s" -#~ msgstr "%s%s %s(%s%s%s)%s skončil" - -#, fuzzy #~ msgid "Notify level: %s => %s" #~ msgstr "Level upozornění:" @@ -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: 2009-04-21 17:40+0200\n" +"POT-Creation-Date: 2009-04-24 16:15+0200\n" "PO-Revision-Date: 2009-01-03 00:42+0100\n" "Last-Translator: Thomas Schuetz <i18n@internet-villa.de>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -206,6 +206,10 @@ msgid "Buffers list:" msgstr "" #, fuzzy, c-format +msgid " %s[%s%d%s]%s (%s) %s%s%s (notify: %s)" +msgstr "%s%s %s(%s%s%s)%s hat das IRC verlassen" + +#, fuzzy, c-format msgid "%sError: incorrect buffer number" msgstr "%s falsche Puffernummer\n" @@ -213,9 +217,6 @@ msgstr "%s falsche Puffernummer\n" msgid "%sError: WeeChat main buffer can't be closed" msgstr "" -msgid "Notify levels:" -msgstr "Notify-Ebenen:" - #, fuzzy, c-format msgid "Local variables for buffer \"%s\":" msgstr "Timestamp für Puffer" @@ -835,8 +836,8 @@ msgid "manage buffers" msgstr "Puffer verwalten" msgid "" -"[clear [number | -all] | move number | close | list | notify | localvar | " -"set property value | number | name]" +"[clear [number | -all] | move number | close | list | notify level | " +"localvar | set property value | number | name]" msgstr "" #, fuzzy @@ -846,7 +847,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: display notify levels for all opened buffers\n" +" notify: set notify level for current buffer\n" "localvar: display local variables for current buffer\n" " set: set a property for current buffer\n" " number: jump to buffer by number\n" @@ -1278,6 +1279,10 @@ msgstr "Ein neuer Tag bricht an, heute ist der %s\n" msgid "debug level for plugin (\"core\" for WeeChat core)" msgstr "" +#, fuzzy +msgid "Notify level for buffer" +msgstr "Channelnamen für den Puffer nicht gefunden" + msgid "command executed when WeeChat starts, after loading plugins" msgstr "" @@ -1581,6 +1586,10 @@ msgid "background color for marker on lines where text sought is found" msgstr "Farbe der Eingabezeile" #, fuzzy +msgid "text color for values" +msgstr "Farbe vom Chat-Text" + +#, fuzzy msgid "text color for current buffer number in status bar" msgstr "Farbe des aktuellen Channels in der Statuszeile" @@ -2055,6 +2064,10 @@ msgid "Act: " msgstr "Aktiv: " #, fuzzy, c-format +msgid "Notify changed for \"%s%s.%s%s\": \"%s%s%s\" to \"%s%s%s\"" +msgstr "%s%s%s setzt das Topic für %s%s%s auf:" + +#, fuzzy, c-format msgid "%sError: a buffer with same name (%s) already exists" msgstr "" "%s kann Plugin \"%s\" nicht laden: ein gleichnamiges Plugin existiert " @@ -4730,37 +4743,6 @@ msgstr "" msgid "list of logger buffers" msgstr "Timestamp für Puffer" -#, 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 "%s%s: missing parameters" -msgstr "%s fehlende Argumente für die \"--dir\"-Option\n" - -#, 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 msgid "WeeChat version" msgstr "WeeChat-Slogan" @@ -5669,6 +5651,25 @@ msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s fehlende Argumente für die \"--dir\"-Option\n" #, fuzzy +#~ msgid "%s%s: unable to set notify level \"%s\" => \"%s\"" +#~ msgstr "%s nicht genügend Speicher für Infobar-Nachricht\n" + +#, fuzzy +#~ msgid "%s%s: missing parameters" +#~ msgstr "%s fehlende Argumente für die \"--dir\"-Option\n" + +#, fuzzy +#~ 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 "Notify levels:" +#~ msgstr "Notify-Ebenen:" + +#, fuzzy #~ msgid "list of aliases" #~ msgstr "Liste der Aliases:\n" @@ -5989,10 +5990,6 @@ msgstr "%s fehlende Argumente für die \"--dir\"-Option\n" #~ msgstr "Timestamp für Puffer" #, fuzzy -#~ msgid " %s[%s%d%s]%s (%s) %s%s%s: %s%s%s%s" -#~ msgstr "%s%s %s(%s%s%s)%s hat das IRC verlassen" - -#, fuzzy #~ msgid "Notify level: %s => %s" #~ msgstr "Notify-Ebenen:" @@ -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: 2009-04-21 17:40+0200\n" +"POT-Creation-Date: 2009-04-24 16:15+0200\n" "PO-Revision-Date: 2009-01-03 00:42+0100\n" "Last-Translator: Roberto González Cardenete <robert.glez@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -202,6 +202,10 @@ msgid "Buffers list:" msgstr "" #, fuzzy, c-format +msgid " %s[%s%d%s]%s (%s) %s%s%s (notify: %s)" +msgstr "%s%s %s(%s%s%s)%s ha salido" + +#, fuzzy, c-format msgid "%sError: incorrect buffer number" msgstr "%s número de búfer incorrecto\n" @@ -209,9 +213,6 @@ msgstr "%s número de búfer incorrecto\n" msgid "%sError: WeeChat main buffer can't be closed" msgstr "" -msgid "Notify levels:" -msgstr "Niveles de notificación:" - #, fuzzy, c-format msgid "Local variables for buffer \"%s\":" msgstr "fecha y hora para las búfers" @@ -831,8 +832,8 @@ msgid "manage buffers" msgstr "gestionar los búfers" msgid "" -"[clear [number | -all] | move number | close | list | notify | localvar | " -"set property value | number | name]" +"[clear [number | -all] | move number | close | list | notify level | " +"localvar | set property value | number | name]" msgstr "" #, fuzzy @@ -842,7 +843,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: display notify levels for all opened buffers\n" +" notify: set notify level for current buffer\n" "localvar: display local variables for current buffer\n" " set: set a property for current buffer\n" " number: jump to buffer by number\n" @@ -1254,6 +1255,10 @@ msgstr "DÃa cambiado a %s\n" msgid "debug level for plugin (\"core\" for WeeChat core)" msgstr "" +#, fuzzy +msgid "Notify level for buffer" +msgstr "nombre de canal no encontrado para el búfer" + msgid "command executed when WeeChat starts, after loading plugins" msgstr "" @@ -1562,6 +1567,10 @@ msgid "background color for marker on lines where text sought is found" msgstr "color para el texto de entrada" #, fuzzy +msgid "text color for values" +msgstr "color para el texto de conversación" + +#, fuzzy msgid "text color for current buffer number in status bar" msgstr "color para el canal actual en la barra de estado" @@ -2033,6 +2042,10 @@ msgid "Act: " msgstr "Act: " #, fuzzy, c-format +msgid "Notify changed for \"%s%s.%s%s\": \"%s%s%s\" to \"%s%s%s\"" +msgstr "%s%s%s ha cambiado el tema para %s%s%s a:" + +#, fuzzy, c-format msgid "%sError: a buffer with same name (%s) already exists" msgstr "" "%s no ha sido posible cargar el plugin \"%s\": un plugin con el mismo nombre " @@ -4718,38 +4731,6 @@ msgstr "" msgid "list of logger buffers" msgstr "fecha y hora para las búfers" -#, 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 "%s%s: missing parameters" -msgstr "%s falta un argumento para la opción --dir\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 msgid "WeeChat version" msgstr "eslógan de WeeChat" @@ -5662,6 +5643,26 @@ msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s falta un argumento para la opción --dir\n" #, fuzzy +#~ 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 +#~ msgid "%s%s: missing parameters" +#~ msgstr "%s falta un argumento para la opción --dir\n" + +#, fuzzy +#~ 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 "Notify levels:" +#~ msgstr "Niveles de notificación:" + +#, fuzzy #~ msgid "list of aliases" #~ msgstr "Lista de alias:\n" @@ -5973,10 +5974,6 @@ msgstr "%s falta un argumento para la opción --dir\n" #~ msgstr "fecha y hora para las búfers" #, fuzzy -#~ msgid " %s[%s%d%s]%s (%s) %s%s%s: %s%s%s%s" -#~ msgstr "%s%s %s(%s%s%s)%s ha salido" - -#, fuzzy #~ msgid "Notify level: %s => %s" #~ msgstr "Niveles de notificación:" @@ -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: 2009-04-21 17:40+0200\n" -"PO-Revision-Date: 2009-04-21 17:29+0200\n" +"POT-Creation-Date: 2009-04-24 16:15+0200\n" +"PO-Revision-Date: 2009-04-24 16:16+0200\n" "Last-Translator: FlashCode <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "MIME-Version: 1.0\n" @@ -196,6 +196,10 @@ msgid "Buffers list:" msgstr "Liste des tampons:" #, c-format +msgid " %s[%s%d%s]%s (%s) %s%s%s (notify: %s)" +msgstr " %s[%s%d%s]%s (%s) %s%s%s (notification: %s)" + +#, c-format msgid "%sError: incorrect buffer number" msgstr "%sErreur: numéro de tampon incorrect" @@ -203,9 +207,6 @@ msgstr "%sErreur: numéro de tampon incorrect" msgid "%sError: WeeChat main buffer can't be closed" msgstr "%sErreur: le tampon principal de WeeChat ne peut pas être fermé" -msgid "Notify levels:" -msgstr "Niveaux de notification:" - #, c-format msgid "Local variables for buffer \"%s\":" msgstr "Variables locales pour le tampon \"%s\" :" @@ -834,11 +835,11 @@ msgid "manage buffers" msgstr "gestion des tampons" msgid "" -"[clear [number | -all] | move number | close | list | notify | localvar | " -"set property value | number | name]" +"[clear [number | -all] | move number | close | list | notify level | " +"localvar | set property value | number | name]" msgstr "" -"[clear [nombre | -all] | move nombre | close | list | notify | localvar | " -"set propriété valeur | nombre | nom]" +"[clear [nombre | -all] | move nombre | close | list | notify niveau | " +"localvar | set propriété valeur | nombre | nom]" msgid "" " clear: clear buffer content (-all for all buffers, number for a buffer, " @@ -846,7 +847,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: display notify levels for all opened buffers\n" +" notify: set notify level for current buffer\n" "localvar: display local variables for current buffer\n" " set: set a property for current buffer\n" " number: jump to buffer by number\n" @@ -867,7 +868,7 @@ msgstr "" "1)\n" " close: ferme le tampon\n" " list: liste les tampons ouverts (pas de paramètre affiche cette liste)\n" -" notify: affiche les niveaux de notification pour tous les tampons ouverts\n" +" notify: définit le niveau de notification pour le tampon courant\n" "localvar: affiche la liste des variables locales pour le tampon courant\n" " set: modifier une propriété du tampon courant\n" " nombre: saute au tampon qui a ce numéro\n" @@ -1384,6 +1385,9 @@ msgstr "\t\tJour changé: %s" msgid "debug level for plugin (\"core\" for WeeChat core)" msgstr "niveau de debug pour l'extension (\"core\" pour le coeur de WeeChat)" +msgid "Notify level for buffer" +msgstr "Niveau de notification pour le tampon" + msgid "command executed when WeeChat starts, after loading plugins" msgstr "" "commande exécutée quand WeeChat démarre, après le chargement des extensions" @@ -1662,6 +1666,9 @@ msgstr "" "couleur du fond pour le marqueur sur les lignes où le texte demandé est " "trouvé" +msgid "text color for values" +msgstr "couleur du texte pour les valeurs" + msgid "text color for current buffer number in status bar" msgstr "" "couleur du texte pour le numéro du tampon courant dans la barre de statut" @@ -2143,6 +2150,10 @@ msgid "Act: " msgstr "Act: " #, c-format +msgid "Notify changed for \"%s%s.%s%s\": \"%s%s%s\" to \"%s%s%s\"" +msgstr "Notification changée pour \"%s%s.%s%s\": \"%s%s%s\" à \"%s%s%s\"" + +#, c-format msgid "%sError: a buffer with same name (%s) already exists" msgstr "%sErreur: un tampon avec le même nom (%s) existe déjà" @@ -4919,43 +4930,6 @@ msgstr "" msgid "list of logger buffers" msgstr "liste des enregistreurs de tampons (loggers)" -#, 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 "%s%s: missing parameters" -msgstr "%s%s: paramètres manquants" - -#, 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é" - msgid "WeeChat version" msgstr "version de WeeChat" @@ -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: 2009-04-21 17:40+0200\n" +"POT-Creation-Date: 2009-04-24 16:15+0200\n" "PO-Revision-Date: 2009-01-03 00:42+0100\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -207,6 +207,10 @@ msgid "Buffers list:" msgstr "" #, fuzzy, c-format +msgid " %s[%s%d%s]%s (%s) %s%s%s (notify: %s)" +msgstr "%s%s %s(%s%s%s)%s kilépett" + +#, fuzzy, c-format msgid "%sError: incorrect buffer number" msgstr "%s helytelen pufferszám\n" @@ -214,9 +218,6 @@ msgstr "%s helytelen pufferszám\n" msgid "%sError: WeeChat main buffer can't be closed" msgstr "" -msgid "Notify levels:" -msgstr "Értesítési szintek:" - #, fuzzy, c-format msgid "Local variables for buffer \"%s\":" msgstr "a pufferek időbélyege" @@ -835,8 +836,8 @@ msgid "manage buffers" msgstr "pufferek kezelése" msgid "" -"[clear [number | -all] | move number | close | list | notify | localvar | " -"set property value | number | name]" +"[clear [number | -all] | move number | close | list | notify level | " +"localvar | set property value | number | name]" msgstr "" #, fuzzy @@ -846,7 +847,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: display notify levels for all opened buffers\n" +" notify: set notify level for current buffer\n" "localvar: display local variables for current buffer\n" " set: set a property for current buffer\n" " number: jump to buffer by number\n" @@ -1291,6 +1292,10 @@ msgstr "A mai dátum: %s\n" msgid "debug level for plugin (\"core\" for WeeChat core)" msgstr "" +#, fuzzy +msgid "Notify level for buffer" +msgstr "szobanév nem található a pufferhez" + msgid "command executed when WeeChat starts, after loading plugins" msgstr "" @@ -1591,6 +1596,10 @@ msgid "background color for marker on lines where text sought is found" msgstr "szövegbeviteli mező színe" #, fuzzy +msgid "text color for values" +msgstr "üzenetek színe" + +#, fuzzy msgid "text color for current buffer number in status bar" msgstr "aktuális szoba színe a státuszsorban" @@ -2065,6 +2074,10 @@ msgid "Act: " msgstr "Akt: " #, fuzzy, c-format +msgid "Notify changed for \"%s%s.%s%s\": \"%s%s%s\" to \"%s%s%s\"" +msgstr "%s%s%s megváltoztatta a %s%s%s szoba témáját:" + +#, fuzzy, c-format msgid "%sError: a buffer with same name (%s) already exists" msgstr "%s nem sikerült a \"%s\" modult betölteni: már van ilyen nevű modul\n" @@ -4788,37 +4801,6 @@ msgstr "" msgid "list of logger buffers" msgstr "a pufferek időbélyege" -#, 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 "%s%s: missing parameters" -msgstr "%s hiányzó argumentum a(z) \"%s\" opciónak\n" - -#, 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 msgid "WeeChat version" msgstr "WeeChat szlogen" @@ -5721,6 +5703,25 @@ msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s hiányzó argumentum a(z) \"%s\" opciónak\n" #, fuzzy +#~ 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 +#~ msgid "%s%s: missing parameters" +#~ msgstr "%s hiányzó argumentum a(z) \"%s\" opciónak\n" + +#, fuzzy +#~ 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 "Notify levels:" +#~ msgstr "Értesítési szintek:" + +#, fuzzy #~ msgid "list of aliases" #~ msgstr "Aliaszok listája:\n" @@ -6036,10 +6037,6 @@ msgstr "%s hiányzó argumentum a(z) \"%s\" opciónak\n" #~ msgstr "a pufferek időbélyege" #, fuzzy -#~ msgid " %s[%s%d%s]%s (%s) %s%s%s: %s%s%s%s" -#~ msgstr "%s%s %s(%s%s%s)%s kilépett" - -#, fuzzy #~ msgid "Notify level: %s => %s" #~ msgstr "Értesítési szintek:" @@ -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: 2009-04-21 17:40+0200\n" +"POT-Creation-Date: 2009-04-24 16:15+0200\n" "PO-Revision-Date: 2009-01-03 00:42+0100\n" "Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -203,6 +203,10 @@ msgid "Buffers list:" msgstr "" #, fuzzy, c-format +msgid " %s[%s%d%s]%s (%s) %s%s%s (notify: %s)" +msgstr "%s%s %s(%s%s%s)%s вышел" + +#, fuzzy, c-format msgid "%sError: incorrect buffer number" msgstr "%s неправильный номер буфера\n" @@ -210,9 +214,6 @@ msgstr "%s неправильный номер буфера\n" msgid "%sError: WeeChat main buffer can't be closed" msgstr "" -msgid "Notify levels:" -msgstr "Уровни уведомления:" - #, fuzzy, c-format msgid "Local variables for buffer \"%s\":" msgstr "время в буферах" @@ -829,8 +830,8 @@ msgid "manage buffers" msgstr "управление буферами" msgid "" -"[clear [number | -all] | move number | close | list | notify | localvar | " -"set property value | number | name]" +"[clear [number | -all] | move number | close | list | notify level | " +"localvar | set property value | number | name]" msgstr "" #, fuzzy @@ -840,7 +841,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: display notify levels for all opened buffers\n" +" notify: set notify level for current buffer\n" "localvar: display local variables for current buffer\n" " set: set a property for current buffer\n" " number: jump to buffer by number\n" @@ -1287,6 +1288,10 @@ msgstr "Дата сменилась на %s\n" msgid "debug level for plugin (\"core\" for WeeChat core)" msgstr "" +#, fuzzy +msgid "Notify level for buffer" +msgstr "не найдено имя канала для буфера" + msgid "command executed when WeeChat starts, after loading plugins" msgstr "" @@ -1594,6 +1599,10 @@ msgid "background color for marker on lines where text sought is found" msgstr "цвет вводимого текста" #, fuzzy +msgid "text color for values" +msgstr "цвет чата" + +#, fuzzy msgid "text color for current buffer number in status bar" msgstr "цвет текущего канала в строке состояния" @@ -2069,6 +2078,10 @@ msgid "Act: " msgstr "Активны: " #, fuzzy, c-format +msgid "Notify changed for \"%s%s.%s%s\": \"%s%s%s\" to \"%s%s%s\"" +msgstr "%s%s%s сменил тему %s%s%s на:" + +#, fuzzy, c-format msgid "%sError: a buffer with same name (%s) already exists" msgstr "" "%s не могу загрузить plugin \"%s\": одноимённый plugin уже существует\n" @@ -4764,37 +4777,6 @@ msgstr "" msgid "list of logger buffers" 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 "%s%s: missing parameters" -msgstr "%s нет аргумента для параметра \"%s\"\n" - -#, 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 msgid "WeeChat version" msgstr "слоган WeeChat" @@ -5692,6 +5674,25 @@ msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s нет аргумента для параметра \"%s\"\n" #, fuzzy +#~ msgid "%s%s: unable to set notify level \"%s\" => \"%s\"" +#~ msgstr "%s недостаточно памяти для сообщения в строке информации\n" + +#, fuzzy +#~ msgid "%s%s: missing parameters" +#~ msgstr "%s нет аргумента для параметра \"%s\"\n" + +#, fuzzy +#~ msgid "%s%s: unknown notify level \"%s\"" +#~ msgstr "%s неизвестная функция клавиши \"%s\"\n" + +#, fuzzy +#~ msgid "change notify level for current buffer" +#~ msgstr "не найдено имя канала для буфера" + +#~ msgid "Notify levels:" +#~ msgstr "Уровни уведомления:" + +#, fuzzy #~ msgid "list of aliases" #~ msgstr "Список сокращений:\n" @@ -6008,10 +6009,6 @@ msgstr "%s нет аргумента для параметра \"%s\"\n" #~ msgstr "время в буферах" #, fuzzy -#~ msgid " %s[%s%d%s]%s (%s) %s%s%s: %s%s%s%s" -#~ msgstr "%s%s %s(%s%s%s)%s вышел" - -#, fuzzy #~ msgid "Notify level: %s => %s" #~ msgstr "Уровни уведомления:" diff --git a/po/srcfiles.cmake b/po/srcfiles.cmake index 606075ca4..2d6c497b2 100644 --- a/po/srcfiles.cmake +++ b/po/srcfiles.cmake @@ -176,7 +176,6 @@ SET(WEECHAT_SOURCES ./src/plugins/logger/logger-info.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 diff --git a/po/weechat.pot b/po/weechat.pot index e29fab8a5..63f007a20 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: 2009-04-21 17:40+0200\n" +"POT-Creation-Date: 2009-04-24 16:15+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -177,14 +177,15 @@ msgid "Buffers list:" msgstr "" #, c-format -msgid "%sError: incorrect buffer number" +msgid " %s[%s%d%s]%s (%s) %s%s%s (notify: %s)" msgstr "" #, c-format -msgid "%sError: WeeChat main buffer can't be closed" +msgid "%sError: incorrect buffer number" msgstr "" -msgid "Notify levels:" +#, c-format +msgid "%sError: WeeChat main buffer can't be closed" msgstr "" #, c-format @@ -745,8 +746,8 @@ msgid "manage buffers" msgstr "" msgid "" -"[clear [number | -all] | move number | close | list | notify | localvar | " -"set property value | number | name]" +"[clear [number | -all] | move number | close | list | notify level | " +"localvar | set property value | number | name]" msgstr "" msgid "" @@ -755,7 +756,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: display notify levels for all opened buffers\n" +" notify: set notify level for current buffer\n" "localvar: display local variables for current buffer\n" " set: set a property for current buffer\n" " number: jump to buffer by number\n" @@ -1099,6 +1100,9 @@ msgstr "" msgid "debug level for plugin (\"core\" for WeeChat core)" msgstr "" +msgid "Notify level for buffer" +msgstr "" + msgid "command executed when WeeChat starts, after loading plugins" msgstr "" @@ -1340,6 +1344,9 @@ msgstr "" msgid "background color for marker on lines where text sought is found" msgstr "" +msgid "text color for values" +msgstr "" + msgid "text color for current buffer number in status bar" msgstr "" @@ -1760,6 +1767,10 @@ msgid "Act: " msgstr "" #, c-format +msgid "Notify changed for \"%s%s.%s%s\": \"%s%s%s\" to \"%s%s%s\"" +msgstr "" + +#, c-format msgid "%sError: a buffer with same name (%s) already exists" msgstr "" @@ -4097,36 +4108,6 @@ msgstr "" msgid "list of logger buffers" 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 "%s%s: missing parameters" -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 "" - msgid "WeeChat version" msgstr "" diff --git a/src/core/wee-command.c b/src/core/wee-command.c index 2db87b221..a67dc8b60 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -525,7 +525,7 @@ command_buffer (void *data, struct t_gui_buffer *buffer, ptr_buffer = ptr_buffer->next_buffer) { gui_chat_printf (NULL, - " %s[%s%d%s]%s (%s) %s%s%s (notify: %d)", + _(" %s[%s%d%s]%s (%s) %s%s%s (notify: %s)"), GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS), GUI_COLOR(GUI_COLOR_CHAT), ptr_buffer->number, @@ -535,7 +535,7 @@ command_buffer (void *data, struct t_gui_buffer *buffer, GUI_COLOR(GUI_COLOR_CHAT_BUFFER), ptr_buffer->name, GUI_COLOR(GUI_COLOR_CHAT), - ptr_buffer->notify); + gui_buffer_notify_string[ptr_buffer->notify]); } return WEECHAT_RC_OK; @@ -631,21 +631,18 @@ command_buffer (void *data, struct t_gui_buffer *buffer, /* display buffer notify */ if (string_strcasecmp (argv[1], "notify") == 0) { - /* 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) + if (argc < 3) { gui_chat_printf (NULL, - " %d.%s: %d (%s)", - ptr_buffer->number, - ptr_buffer->name, - ptr_buffer->notify, - gui_buffer_notify_string[ptr_buffer->notify]); + _("%sError: missing arguments for \"%s\" " + "command"), + gui_chat_prefix[GUI_CHAT_PREFIX_ERROR], + "buffer"); + return WEECHAT_RC_ERROR; } - gui_chat_printf (NULL, ""); - + /* set notify level for current buffer */ + config_weechat_notify_set (gui_current_window->buffer, + argv_eol[2]); return WEECHAT_RC_OK; } @@ -1358,7 +1355,7 @@ command_help (void *data, struct t_gui_buffer *buffer, { gui_chat_printf (NULL, " %s: %s%s", _("current value"), - GUI_COLOR(GUI_COLOR_CHAT_HOST), + GUI_COLOR(GUI_COLOR_CHAT_VALUE), (CONFIG_BOOLEAN(ptr_option) == CONFIG_BOOLEAN_TRUE) ? "on" : "off"); } @@ -1414,7 +1411,7 @@ command_help (void *data, struct t_gui_buffer *buffer, gui_chat_printf (NULL, " %s: \"%s%s%s\"", _("current value"), - GUI_COLOR(GUI_COLOR_CHAT_HOST), + GUI_COLOR(GUI_COLOR_CHAT_VALUE), ptr_option->string_values[CONFIG_INTEGER(ptr_option)], GUI_COLOR(GUI_COLOR_CHAT)); } @@ -1451,7 +1448,7 @@ command_help (void *data, struct t_gui_buffer *buffer, { gui_chat_printf (NULL, " %s: %s%d", _("current value"), - GUI_COLOR(GUI_COLOR_CHAT_HOST), + GUI_COLOR(GUI_COLOR_CHAT_VALUE), CONFIG_INTEGER(ptr_option)); } else @@ -1502,7 +1499,7 @@ command_help (void *data, struct t_gui_buffer *buffer, { gui_chat_printf (NULL, " %s: \"%s%s%s\"", _("current value"), - GUI_COLOR(GUI_COLOR_CHAT_HOST), + GUI_COLOR(GUI_COLOR_CHAT_VALUE), CONFIG_STRING(ptr_option), GUI_COLOR(GUI_COLOR_CHAT)); } @@ -1534,7 +1531,7 @@ command_help (void *data, struct t_gui_buffer *buffer, { gui_chat_printf (NULL, " %s: %s%s", _("current value"), - GUI_COLOR(GUI_COLOR_CHAT_HOST), + GUI_COLOR(GUI_COLOR_CHAT_VALUE), gui_color_get_name (CONFIG_COLOR(ptr_option))); } else @@ -2774,7 +2771,7 @@ command_set_display_option (struct t_config_option *option, option->section->name, option->name, GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS), - GUI_COLOR(GUI_COLOR_CHAT_HOST), + GUI_COLOR(GUI_COLOR_CHAT_VALUE), (CONFIG_BOOLEAN(option) == CONFIG_BOOLEAN_TRUE) ? "on" : "off"); break; @@ -2787,7 +2784,7 @@ command_set_display_option (struct t_config_option *option, option->section->name, option->name, GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS), - GUI_COLOR(GUI_COLOR_CHAT_HOST), + GUI_COLOR(GUI_COLOR_CHAT_VALUE), option->string_values[CONFIG_INTEGER(option)]); } else @@ -2798,7 +2795,7 @@ command_set_display_option (struct t_config_option *option, option->section->name, option->name, GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS), - GUI_COLOR(GUI_COLOR_CHAT_HOST), + GUI_COLOR(GUI_COLOR_CHAT_VALUE), CONFIG_INTEGER(option)); } break; @@ -2809,7 +2806,7 @@ command_set_display_option (struct t_config_option *option, option->section->name, option->name, GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS), - GUI_COLOR(GUI_COLOR_CHAT_HOST), + GUI_COLOR(GUI_COLOR_CHAT_VALUE), CONFIG_STRING(option), GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS)); break; @@ -2821,7 +2818,7 @@ command_set_display_option (struct t_config_option *option, option->section->name, option->name, GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS), - GUI_COLOR(GUI_COLOR_CHAT_HOST), + GUI_COLOR(GUI_COLOR_CHAT_VALUE), (color_name) ? color_name : _("(unknown)")); break; case CONFIG_NUM_OPTION_TYPES: @@ -3295,7 +3292,7 @@ command_version_display (struct t_gui_buffer *buffer, GUI_COLOR(GUI_COLOR_CHAT_BUFFER), PACKAGE_VERSION, GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS), - GUI_COLOR(GUI_COLOR_CHAT_HOST), + GUI_COLOR(GUI_COLOR_CHAT_VALUE), _("compiled on"), __DATE__, __TIME__, @@ -3677,14 +3674,14 @@ command_init () hook_command (NULL, "buffer", N_("manage buffers"), N_("[clear [number | -all] | move number | close | list | " - "notify | localvar | set property value | number | name]"), + "notify level | localvar | set property value | number | name]"), N_(" clear: clear buffer content (-all for all buffers, " "number for a buffer, or nothing for current buffer)\n" " 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: display notify levels for all opened buffers\n" + " notify: set notify level for current buffer\n" "localvar: display local variables for current buffer\n" " set: set a property for current buffer\n" " number: jump to buffer by number\n" @@ -3701,7 +3698,7 @@ command_init () " || move %(buffers_numbers)" " || close" " || list" - " || notify" + " || notify reset|none|highlight|message|all" " || localvar" " || set" " || %(buffers_names)" diff --git a/src/core/wee-config.c b/src/core/wee-config.c index 307a6558d..2f19e071e 100644 --- a/src/core/wee-config.c +++ b/src/core/wee-config.c @@ -58,6 +58,7 @@ struct t_config_file *weechat_config_file = NULL; struct t_config_section *weechat_config_section_debug = NULL; struct t_config_section *weechat_config_section_proxy = NULL; struct t_config_section *weechat_config_section_bar = NULL; +struct t_config_section *weechat_config_section_notify = NULL; /* config, startup section */ @@ -123,6 +124,7 @@ struct t_config_option *config_color_chat_read_marker; struct t_config_option *config_color_chat_read_marker_bg; struct t_config_option *config_color_chat_text_found; struct t_config_option *config_color_chat_text_found_bg; +struct t_config_option *config_color_chat_value; struct t_config_option *config_color_status_number; struct t_config_option *config_color_status_name; struct t_config_option *config_color_status_data_msg; @@ -424,6 +426,9 @@ config_weechat_reload_cb (void *data, struct t_config_file *config_file) gui_layout_buffer_reset (&gui_layout_buffers, &last_gui_layout_buffer); gui_layout_window_reset (&gui_layout_windows); + /* remove all notify levels */ + config_file_section_free_options (weechat_config_section_notify); + /* remove all filters */ gui_filter_free_all (); @@ -431,6 +436,7 @@ config_weechat_reload_cb (void *data, struct t_config_file *config_file) if (rc == WEECHAT_CONFIG_READ_OK) { + gui_buffer_notify_set_all (); proxy_use_temp_proxies (); gui_bar_use_temp_bars (); gui_bar_create_default (); @@ -859,6 +865,151 @@ config_weechat_layout_write_cb (void *data, struct t_config_file *config_file, } /* + * config_weechat_notify_change_cb: callback when notify option is changed + */ + +void +config_weechat_notify_change_cb (void *data, struct t_config_option *option) +{ + /* make C compiler happy */ + (void) data; + (void) option; + + gui_buffer_notify_set_all (); +} + +/* + * config_weechat_notify_create_option_cb: callback to create option in "notify" + * section + */ + +int +config_weechat_notify_create_option_cb (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 = config_file_search_option (config_file, section, + option_name); + if (ptr_option) + { + if (value && value[0]) + rc = config_file_option_set (ptr_option, value, 1); + else + { + config_file_option_free (ptr_option); + rc = WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE; + } + } + else + { + if (value && value[0]) + { + ptr_option = config_file_new_option ( + config_file, section, + option_name, "integer", _("Notify level for buffer"), + "none|highlight|message|all", + 0, 0, "", value, 0, NULL, NULL, + &config_weechat_notify_change_cb, 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) + gui_buffer_notify_set_all (); + + return rc; +} + +/* + * config_weechat_notify_delete_option_cb: called when a notify option is + * deleted + */ + +int +config_weechat_notify_delete_option_cb (void *data, + struct t_config_file *config_file, + struct t_config_section *section, + struct t_config_option *option) +{ + /* make C compiler happy */ + (void) data; + (void) config_file; + (void) section; + + config_file_option_free (option); + + gui_buffer_notify_set_all (); + + return WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED; +} + +/* + * config_weechat_notify_set: set a notify level for a buffer + * negative value will reset notify for buffer to + * default value (and remove buffer from config file) + * return 1 if ok, 0 if error + */ + +int +config_weechat_notify_set (struct t_gui_buffer *buffer, const char *notify) +{ + const char *plugin_name; + char *option_name; + int i, value, length; + + if (!buffer || !notify) + return 0; + + value = -1; + for (i = 0; i < GUI_BUFFER_NUM_NOTIFY; i++) + { + if (strcmp (gui_buffer_notify_string[i], notify) == 0) + { + value = i; + break; + } + } + if ((value < 0) && (strcmp (notify, "reset") != 0)) + return 0; + + plugin_name = plugin_get_name (buffer->plugin); + length = strlen (plugin_name) + 1 + strlen (buffer->name) + 1; + option_name = malloc (length); + if (option_name) + { + snprintf (option_name, length, "%s.%s", plugin_name, buffer->name); + + /* create/update option */ + config_weechat_notify_create_option_cb (NULL, + weechat_config_file, + weechat_config_section_notify, + option_name, + (value < 0) ? + NULL : gui_buffer_notify_string[value]); + return 1; + } + + return 0; +} + +/* * config_weechat_filter_read_cb: read filter option from config file */ @@ -1479,6 +1630,12 @@ config_weechat_init_options () N_("background color for marker on lines where text sought is found"), NULL, -1, 0, "lightmagenta", NULL, 0, NULL, NULL, &config_change_color, NULL, NULL, NULL); + config_color_chat_value = config_file_new_option ( + weechat_config_file, ptr_section, + "chat_value", "color", + N_("text color for values"), + NULL, GUI_COLOR_CHAT_VALUE, 0, "cyan", NULL, 0, + NULL, NULL, &config_change_color, NULL, NULL, NULL); /* status window */ config_color_status_number = config_file_new_option ( weechat_config_file, ptr_section, @@ -1803,6 +1960,22 @@ config_weechat_init_options () return 0; } + /* notify */ + ptr_section = config_file_new_section (weechat_config_file, "notify", + 1, 1, + NULL, NULL, + NULL, NULL, + NULL, NULL, + &config_weechat_notify_create_option_cb, NULL, + &config_weechat_notify_delete_option_cb, NULL); + if (!ptr_section) + { + config_file_free (weechat_config_file); + return 0; + } + + weechat_config_section_notify = ptr_section; + /* filters */ ptr_section = config_file_new_section (weechat_config_file, "filter", 0, 0, diff --git a/src/core/wee-config.h b/src/core/wee-config.h index 4f8fb0c9c..be87d143e 100644 --- a/src/core/wee-config.h +++ b/src/core/wee-config.h @@ -20,6 +20,8 @@ #ifndef __WEECHAT_CONFIG_H #define __WEECHAT_CONFIG_H 1 +struct t_gui_buffer; + #include "wee-config-file.h" #define WEECHAT_CONFIG_NAME "weechat" @@ -68,6 +70,7 @@ enum t_config_look_save_layout_on_exit extern struct t_config_file *weechat_config_file; extern struct t_config_section *weechat_config_section_proxy; extern struct t_config_section *weechat_config_section_bar; +extern struct t_config_section *weechat_config_section_notify; extern struct t_config_option *config_startup_command_after_plugins; extern struct t_config_option *config_startup_command_before_plugins; @@ -127,6 +130,7 @@ extern struct t_config_option *config_color_chat_read_marker; extern struct t_config_option *config_color_chat_read_marker_bg; extern struct t_config_option *config_color_chat_text_found; extern struct t_config_option *config_color_chat_text_found_bg; +extern struct t_config_option *config_color_chat_value; extern struct t_config_option *config_color_status_number; extern struct t_config_option *config_color_status_name; extern struct t_config_option *config_color_status_data_msg; @@ -175,6 +179,8 @@ extern struct t_config_option *config_weechat_debug_get (const char *plugin_name extern int config_weechat_debug_set (const char *plugin_name, const char *value); extern void config_weechat_debug_set_all (); +extern int config_weechat_notify_set (struct t_gui_buffer *buffer, + const char *notify); extern int config_weechat_init (); extern int config_weechat_read (); extern int config_weechat_write (); diff --git a/src/gui/curses/gui-curses-color.c b/src/gui/curses/gui-curses-color.c index cd1aac5be..1403e5e69 100644 --- a/src/gui/curses/gui-curses-color.c +++ b/src/gui/curses/gui-curses-color.c @@ -381,6 +381,7 @@ gui_color_init_weechat () gui_color_build (GUI_COLOR_CHAT_HIGHLIGHT, CONFIG_COLOR(config_color_chat_highlight), CONFIG_COLOR(config_color_chat_highlight_bg)); gui_color_build (GUI_COLOR_CHAT_READ_MARKER, CONFIG_COLOR(config_color_chat_read_marker), CONFIG_COLOR(config_color_chat_read_marker_bg)); gui_color_build (GUI_COLOR_CHAT_TEXT_FOUND, CONFIG_COLOR(config_color_chat_text_found), CONFIG_COLOR(config_color_chat_text_found_bg)); + gui_color_build (GUI_COLOR_CHAT_VALUE, CONFIG_COLOR(config_color_chat_value), CONFIG_COLOR(config_color_chat_bg)); } /* diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c index 68cd3bac5..135a5919e 100644 --- a/src/gui/gui-buffer.c +++ b/src/gui/gui-buffer.c @@ -209,6 +209,106 @@ gui_buffer_local_var_remove_all (struct t_gui_buffer *buffer) } /* + * gui_buffer_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 +gui_buffer_notify_get (struct t_gui_buffer *buffer) +{ + const char *plugin_name; + char *option_name, *ptr_end; + int length; + struct t_config_option *ptr_option; + + plugin_name = plugin_get_name (buffer->plugin); + length = strlen (plugin_name) + 1 + strlen (buffer->name) + 1; + option_name = malloc (length); + if (option_name) + { + snprintf (option_name, length, "%s.%s", plugin_name, buffer->name); + + ptr_end = option_name + strlen (option_name); + while (ptr_end >= option_name) + { + ptr_option = config_file_search_option (weechat_config_file, + weechat_config_section_notify, + option_name); + if (ptr_option) + { + free (option_name); + return 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 = config_file_search_option (weechat_config_file, + weechat_config_section_notify, + option_name); + + free (option_name); + + if (ptr_option) + return CONFIG_INTEGER(ptr_option); + } + + /* notify level not found */ + return CONFIG_INTEGER(config_look_buffer_notify_default); +} + +/* + * gui_buffer_notify_set: set notify value on a buffer + */ + +void +gui_buffer_notify_set (struct t_gui_buffer *buffer) +{ + int old_notify, new_notify; + + old_notify = buffer->notify; + new_notify = gui_buffer_notify_get (buffer); + + if (new_notify != old_notify) + { + buffer->notify = new_notify; + gui_chat_printf (NULL, + _("Notify changed for \"%s%s.%s%s\": \"%s%s%s\" to \"%s%s%s\""), + GUI_COLOR(GUI_COLOR_CHAT_BUFFER), + plugin_get_name (buffer->plugin), + buffer->name, + GUI_COLOR(GUI_COLOR_CHAT), + GUI_COLOR(GUI_COLOR_CHAT_VALUE), + gui_buffer_notify_string[old_notify], + GUI_COLOR(GUI_COLOR_CHAT), + GUI_COLOR(GUI_COLOR_CHAT_VALUE), + gui_buffer_notify_string[buffer->notify], + GUI_COLOR(GUI_COLOR_CHAT)); + } +} + +/* + * gui_buffer_notify_set_all: set notify values on all opened buffers + */ + +void +gui_buffer_notify_set_all () +{ + struct t_gui_buffer *ptr_buffer; + + for (ptr_buffer = gui_buffers; ptr_buffer; + ptr_buffer = ptr_buffer->next_buffer) + { + gui_buffer_notify_set (ptr_buffer); + } +} + +/* * gui_buffer_insert: insert buffer in good position in list of buffers */ @@ -378,6 +478,9 @@ gui_buffer_new (struct t_weechat_plugin *plugin, first_buffer_creation = (gui_buffers == NULL); gui_buffer_insert (new_buffer); + /* set notify level */ + new_buffer->notify = gui_buffer_notify_get (new_buffer); + /* check if this buffer should be assigned to a window, according to windows layout saved */ gui_layout_window_check_buffer (new_buffer); diff --git a/src/gui/gui-buffer.h b/src/gui/gui-buffer.h index e39799c01..0f773eefa 100644 --- a/src/gui/gui-buffer.h +++ b/src/gui/gui-buffer.h @@ -184,6 +184,7 @@ extern char *gui_buffer_notify_string[]; /* buffer functions */ +extern void gui_buffer_notify_set_all (); extern struct t_gui_buffer *gui_buffer_new (struct t_weechat_plugin *plugin, const char *name, int (*input_callback)(void *data, diff --git a/src/gui/gui-color.h b/src/gui/gui-color.h index 602dd9f3b..50cee70d0 100644 --- a/src/gui/gui-color.h +++ b/src/gui/gui-color.h @@ -57,6 +57,7 @@ enum t_gui_color_enum GUI_COLOR_CHAT_HIGHLIGHT, GUI_COLOR_CHAT_READ_MARKER, GUI_COLOR_CHAT_TEXT_FOUND, + GUI_COLOR_CHAT_VALUE, /* number of colors */ GUI_COLOR_NUM_COLORS, diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt index 0b4eae29f..3fddaf1d3 100644 --- a/src/plugins/CMakeLists.txt +++ b/src/plugins/CMakeLists.txt @@ -70,10 +70,6 @@ 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_RELAY) ADD_SUBDIRECTORY( relay ) ENDIF(NOT DISABLE_RELAY) diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am index d55b3036c..e78730cec 100644 --- a/src/plugins/Makefile.am +++ b/src/plugins/Makefile.am @@ -58,10 +58,6 @@ if PLUGIN_LOGGER logger_dir = logger endif -if PLUGIN_NOTIFY -notify_dir = notify -endif - if PLUGIN_RELAY relay_dir = relay endif @@ -95,7 +91,7 @@ xfer_dir = xfer endif SUBDIRS = . $(alias_dir) $(aspell_dir) $(charset_dir) $(demo_dir) $(fifo_dir) \ - $(irc_dir) $(jabber_dir) $(logger_dir) $(notify_dir) $(relay_dir) \ - $(script_dir) $(trigger_dir) $(xfer_dir) + $(irc_dir) $(jabber_dir) $(logger_dir) $(relay_dir) $(script_dir) \ + $(trigger_dir) $(xfer_dir) EXTRA_DIST = CMakeLists.txt diff --git a/src/plugins/irc/irc-display.c b/src/plugins/irc/irc-display.c index 4099ae60f..ee483e540 100644 --- a/src/plugins/irc/irc-display.c +++ b/src/plugins/irc/irc-display.c @@ -142,14 +142,14 @@ irc_display_server (struct t_irc_server *server, int with_detail) IRC_SERVER_OPTION_STRING(server, IRC_SERVER_OPTION_ADDRESSES)); else weechat_printf (NULL, " addresses. . . . . . : %s'%s'", - IRC_COLOR_CHAT_HOST, + IRC_COLOR_CHAT_VALUE, weechat_config_string (server->options[IRC_SERVER_OPTION_ADDRESSES])); if (weechat_config_option_is_null (server->options[IRC_SERVER_OPTION_PROXY])) weechat_printf (NULL, " proxy. . . . . . . . : ('%s')", IRC_SERVER_OPTION_STRING(server, IRC_SERVER_OPTION_PROXY)); else weechat_printf (NULL, " proxy. . . . . . . . : %s'%s'", - IRC_COLOR_CHAT_HOST, + IRC_COLOR_CHAT_VALUE, weechat_config_string (server->options[IRC_SERVER_OPTION_PROXY])); if (weechat_config_option_is_null (server->options[IRC_SERVER_OPTION_IPV6])) weechat_printf (NULL, " ipv6 . . . . . . . . : (%s)", @@ -157,7 +157,7 @@ irc_display_server (struct t_irc_server *server, int with_detail) _("on") : _("off")); else weechat_printf (NULL, " ipv6 . . . . . . . . : %s%s", - IRC_COLOR_CHAT_HOST, + IRC_COLOR_CHAT_VALUE, weechat_config_boolean (server->options[IRC_SERVER_OPTION_IPV6]) ? _("on") : _("off")); if (weechat_config_option_is_null (server->options[IRC_SERVER_OPTION_SSL])) @@ -166,7 +166,7 @@ irc_display_server (struct t_irc_server *server, int with_detail) _("on") : _("off")); else weechat_printf (NULL, " ssl. . . . . . . . . : %s%s", - IRC_COLOR_CHAT_HOST, + IRC_COLOR_CHAT_VALUE, weechat_config_boolean (server->options[IRC_SERVER_OPTION_SSL]) ? _("on") : _("off")); if (weechat_config_option_is_null (server->options[IRC_SERVER_OPTION_PASSWORD])) @@ -174,7 +174,7 @@ irc_display_server (struct t_irc_server *server, int with_detail) _("(hidden)")); else weechat_printf (NULL, " password . . . . . . : %s%s", - IRC_COLOR_CHAT_HOST, + IRC_COLOR_CHAT_VALUE, _("(hidden)")); if (weechat_config_option_is_null (server->options[IRC_SERVER_OPTION_AUTOCONNECT])) weechat_printf (NULL, " autoconnect. . . . . : (%s)", @@ -182,7 +182,7 @@ irc_display_server (struct t_irc_server *server, int with_detail) _("on") : _("off")); else weechat_printf (NULL, " autoconnect. . . . . : %s%s", - IRC_COLOR_CHAT_HOST, + IRC_COLOR_CHAT_VALUE, weechat_config_boolean (server->options[IRC_SERVER_OPTION_AUTOCONNECT]) ? _("on") : _("off")); if (weechat_config_option_is_null (server->options[IRC_SERVER_OPTION_AUTORECONNECT])) @@ -191,7 +191,7 @@ irc_display_server (struct t_irc_server *server, int with_detail) _("on") : _("off")); else weechat_printf (NULL, " autoreconnect. . . . : %s%s", - IRC_COLOR_CHAT_HOST, + IRC_COLOR_CHAT_VALUE, weechat_config_boolean (server->options[IRC_SERVER_OPTION_AUTORECONNECT]) ? _("on") : _("off")); if (weechat_config_option_is_null (server->options[IRC_SERVER_OPTION_AUTORECONNECT_DELAY])) @@ -200,7 +200,7 @@ irc_display_server (struct t_irc_server *server, int with_detail) NG_("second", "seconds", IRC_SERVER_OPTION_INTEGER(server, IRC_SERVER_OPTION_AUTORECONNECT_DELAY))); else weechat_printf (NULL, " autoreconnect_delay. : %s%d %s", - IRC_COLOR_CHAT_HOST, + IRC_COLOR_CHAT_VALUE, weechat_config_integer (server->options[IRC_SERVER_OPTION_AUTORECONNECT_DELAY]), NG_("second", "seconds", weechat_config_integer (server->options[IRC_SERVER_OPTION_AUTORECONNECT_DELAY]))); if (weechat_config_option_is_null (server->options[IRC_SERVER_OPTION_NICKS])) @@ -208,28 +208,28 @@ irc_display_server (struct t_irc_server *server, int with_detail) IRC_SERVER_OPTION_STRING(server, IRC_SERVER_OPTION_NICKS)); else weechat_printf (NULL, " nicks. . . . . . . . : %s'%s'", - IRC_COLOR_CHAT_HOST, + IRC_COLOR_CHAT_VALUE, weechat_config_string (server->options[IRC_SERVER_OPTION_NICKS])); if (weechat_config_option_is_null (server->options[IRC_SERVER_OPTION_USERNAME])) weechat_printf (NULL, " username . . . . . . : ('%s')", IRC_SERVER_OPTION_STRING(server, IRC_SERVER_OPTION_USERNAME)); else weechat_printf (NULL, " username . . . . . . : %s'%s'", - IRC_COLOR_CHAT_HOST, + IRC_COLOR_CHAT_VALUE, weechat_config_string (server->options[IRC_SERVER_OPTION_USERNAME])); if (weechat_config_option_is_null (server->options[IRC_SERVER_OPTION_REALNAME])) weechat_printf (NULL, " realname . . . . . . : ('%s')", IRC_SERVER_OPTION_STRING(server, IRC_SERVER_OPTION_REALNAME)); else weechat_printf (NULL, " realname . . . . . . : %s'%s'", - IRC_COLOR_CHAT_HOST, + IRC_COLOR_CHAT_VALUE, weechat_config_string (server->options[IRC_SERVER_OPTION_REALNAME])); if (weechat_config_option_is_null (server->options[IRC_SERVER_OPTION_LOCAL_HOSTNAME])) weechat_printf (NULL, " local_hostname . . . : ('%s')", IRC_SERVER_OPTION_STRING(server, IRC_SERVER_OPTION_LOCAL_HOSTNAME)); else weechat_printf (NULL, " local_hostname . . . : %s'%s'", - IRC_COLOR_CHAT_HOST, + IRC_COLOR_CHAT_VALUE, weechat_config_string (server->options[IRC_SERVER_OPTION_LOCAL_HOSTNAME])); if (weechat_config_option_is_null (server->options[IRC_SERVER_OPTION_COMMAND])) { @@ -247,7 +247,7 @@ irc_display_server (struct t_irc_server *server, int with_detail) if (string && weechat_config_boolean (irc_config_look_hide_nickserv_pwd)) irc_display_hide_password (string, 1); weechat_printf (NULL, " command. . . . . . . : %s'%s'", - IRC_COLOR_CHAT_HOST, + IRC_COLOR_CHAT_VALUE, (string) ? string : weechat_config_string (server->options[IRC_SERVER_OPTION_COMMAND])); if (string) free (string); @@ -258,7 +258,7 @@ irc_display_server (struct t_irc_server *server, int with_detail) NG_("second", "seconds", IRC_SERVER_OPTION_INTEGER(server, IRC_SERVER_OPTION_COMMAND_DELAY))); else weechat_printf (NULL, " command_delay. . . . : %s%d %s", - IRC_COLOR_CHAT_HOST, + IRC_COLOR_CHAT_VALUE, weechat_config_integer (server->options[IRC_SERVER_OPTION_COMMAND_DELAY]), NG_("second", "seconds", weechat_config_integer (server->options[IRC_SERVER_OPTION_COMMAND_DELAY]))); if (weechat_config_option_is_null (server->options[IRC_SERVER_OPTION_AUTOJOIN])) @@ -266,7 +266,7 @@ irc_display_server (struct t_irc_server *server, int with_detail) IRC_SERVER_OPTION_STRING(server, IRC_SERVER_OPTION_AUTOJOIN)); else weechat_printf (NULL, " autojoin . . . . . . : %s'%s'", - IRC_COLOR_CHAT_HOST, + IRC_COLOR_CHAT_VALUE, weechat_config_string (server->options[IRC_SERVER_OPTION_AUTOJOIN])); if (weechat_config_option_is_null (server->options[IRC_SERVER_OPTION_AUTOREJOIN])) weechat_printf (NULL, " autorejoin . . . . . : (%s)", @@ -274,7 +274,7 @@ irc_display_server (struct t_irc_server *server, int with_detail) _("on") : _("off")); else weechat_printf (NULL, " autorejoin . . . . . : %s%s", - IRC_COLOR_CHAT_HOST, + IRC_COLOR_CHAT_VALUE, weechat_config_boolean (server->options[IRC_SERVER_OPTION_AUTOREJOIN]) ? _("on") : _("off")); } diff --git a/src/plugins/irc/irc.h b/src/plugins/irc/irc.h index de8e1ece2..ac8c2e14e 100644 --- a/src/plugins/irc/irc.h +++ b/src/plugins/irc/irc.h @@ -49,6 +49,7 @@ #define IRC_COLOR_CHAT_NICK_SELF weechat_color("chat_nick_self") #define IRC_COLOR_CHAT_NICK_OTHER weechat_color("chat_nick_other") #define IRC_COLOR_CHAT_SERVER weechat_color("chat_server") +#define IRC_COLOR_CHAT_VALUE weechat_color("chat_value") #define IRC_COLOR_NICKLIST_PREFIX1 weechat_color("nicklist_prefix1") #define IRC_COLOR_NICKLIST_PREFIX2 weechat_color("nicklist_prefix2") #define IRC_COLOR_NICKLIST_PREFIX3 weechat_color("nicklist_prefix3") diff --git a/src/plugins/jabber/jabber-display.c b/src/plugins/jabber/jabber-display.c index 7eace16c7..671b0073d 100644 --- a/src/plugins/jabber/jabber-display.c +++ b/src/plugins/jabber/jabber-display.c @@ -60,21 +60,21 @@ jabber_display_server (struct t_jabber_server *server, int with_detail) JABBER_SERVER_OPTION_STRING(server, JABBER_SERVER_OPTION_USERNAME)); else weechat_printf (NULL, " username . . . . . . : %s'%s'", - JABBER_COLOR_CHAT_HOST, + JABBER_COLOR_CHAT_VALUE, weechat_config_string (server->options[JABBER_SERVER_OPTION_USERNAME])); if (weechat_config_option_is_null (server->options[JABBER_SERVER_OPTION_SERVER])) weechat_printf (NULL, " server . . . . . . . : ('%s')", JABBER_SERVER_OPTION_STRING(server, JABBER_SERVER_OPTION_SERVER)); else weechat_printf (NULL, " server . . . . . . . : %s'%s'", - JABBER_COLOR_CHAT_HOST, + JABBER_COLOR_CHAT_VALUE, weechat_config_string (server->options[JABBER_SERVER_OPTION_SERVER])); if (weechat_config_option_is_null (server->options[JABBER_SERVER_OPTION_PROXY])) weechat_printf (NULL, " proxy. . . . . . . . : ('%s')", JABBER_SERVER_OPTION_STRING(server, JABBER_SERVER_OPTION_PROXY)); else weechat_printf (NULL, " proxy. . . . . . . . : %s'%s'", - JABBER_COLOR_CHAT_HOST, + JABBER_COLOR_CHAT_VALUE, weechat_config_string (server->options[JABBER_SERVER_OPTION_PROXY])); if (weechat_config_option_is_null (server->options[JABBER_SERVER_OPTION_IPV6])) weechat_printf (NULL, " ipv6 . . . . . . . . : (%s)", @@ -82,7 +82,7 @@ jabber_display_server (struct t_jabber_server *server, int with_detail) _("on") : _("off")); else weechat_printf (NULL, " ipv6 . . . . . . . . : %s%s", - JABBER_COLOR_CHAT_HOST, + JABBER_COLOR_CHAT_VALUE, weechat_config_boolean (server->options[JABBER_SERVER_OPTION_IPV6]) ? _("on") : _("off")); if (weechat_config_option_is_null (server->options[JABBER_SERVER_OPTION_TLS])) @@ -91,7 +91,7 @@ jabber_display_server (struct t_jabber_server *server, int with_detail) _("on") : _("off")); else weechat_printf (NULL, " tls. . . . . . . . . : %s%s", - JABBER_COLOR_CHAT_HOST, + JABBER_COLOR_CHAT_VALUE, weechat_config_boolean (server->options[JABBER_SERVER_OPTION_TLS]) ? _("on") : _("off")); if (weechat_config_option_is_null (server->options[JABBER_SERVER_OPTION_SASL])) @@ -100,7 +100,7 @@ jabber_display_server (struct t_jabber_server *server, int with_detail) _("on") : _("off")); else weechat_printf (NULL, " sasl . . . . . . . . : %s%s", - JABBER_COLOR_CHAT_HOST, + JABBER_COLOR_CHAT_VALUE, weechat_config_boolean (server->options[JABBER_SERVER_OPTION_SASL]) ? _("on") : _("off")); if (weechat_config_option_is_null (server->options[JABBER_SERVER_OPTION_RESOURCE])) @@ -108,21 +108,21 @@ jabber_display_server (struct t_jabber_server *server, int with_detail) JABBER_SERVER_OPTION_STRING(server, JABBER_SERVER_OPTION_RESOURCE)); else weechat_printf (NULL, " resource . . . . . . : %s'%s'", - JABBER_COLOR_CHAT_HOST, + JABBER_COLOR_CHAT_VALUE, weechat_config_string (server->options[JABBER_SERVER_OPTION_RESOURCE])); if (weechat_config_option_is_null (server->options[JABBER_SERVER_OPTION_PASSWORD])) weechat_printf (NULL, " password . . . . . . : %s", _("(hidden)")); else weechat_printf (NULL, " password . . . . . . : %s%s", - JABBER_COLOR_CHAT_HOST, + JABBER_COLOR_CHAT_VALUE, _("(hidden)")); if (weechat_config_option_is_null (server->options[JABBER_SERVER_OPTION_LOCAL_ALIAS])) weechat_printf (NULL, " local_alias. . . . . : ('%s')", JABBER_SERVER_OPTION_STRING(server, JABBER_SERVER_OPTION_LOCAL_ALIAS)); else weechat_printf (NULL, " local_alias. . . . . : %s'%s'", - JABBER_COLOR_CHAT_HOST, + JABBER_COLOR_CHAT_VALUE, weechat_config_string (server->options[JABBER_SERVER_OPTION_LOCAL_ALIAS])); if (weechat_config_option_is_null (server->options[JABBER_SERVER_OPTION_AUTOCONNECT])) weechat_printf (NULL, " autoconnect. . . . . : (%s)", @@ -130,7 +130,7 @@ jabber_display_server (struct t_jabber_server *server, int with_detail) _("on") : _("off")); else weechat_printf (NULL, " autoconnect. . . . . : %s%s", - JABBER_COLOR_CHAT_HOST, + JABBER_COLOR_CHAT_VALUE, weechat_config_boolean (server->options[JABBER_SERVER_OPTION_AUTOCONNECT]) ? _("on") : _("off")); if (weechat_config_option_is_null (server->options[JABBER_SERVER_OPTION_AUTORECONNECT])) @@ -139,7 +139,7 @@ jabber_display_server (struct t_jabber_server *server, int with_detail) _("on") : _("off")); else weechat_printf (NULL, " autoreconnect. . . . : %s%s", - JABBER_COLOR_CHAT_HOST, + JABBER_COLOR_CHAT_VALUE, weechat_config_boolean (server->options[JABBER_SERVER_OPTION_AUTORECONNECT]) ? _("on") : _("off")); if (weechat_config_option_is_null (server->options[JABBER_SERVER_OPTION_AUTORECONNECT_DELAY])) @@ -148,7 +148,7 @@ jabber_display_server (struct t_jabber_server *server, int with_detail) NG_("second", "seconds", JABBER_SERVER_OPTION_INTEGER(server, JABBER_SERVER_OPTION_AUTORECONNECT_DELAY))); else weechat_printf (NULL, " autoreconnect_delay. : %s%d %s", - JABBER_COLOR_CHAT_HOST, + JABBER_COLOR_CHAT_VALUE, weechat_config_integer (server->options[JABBER_SERVER_OPTION_AUTORECONNECT_DELAY]), NG_("second", "seconds", weechat_config_integer (server->options[JABBER_SERVER_OPTION_AUTORECONNECT_DELAY]))); if (weechat_config_option_is_null (server->options[JABBER_SERVER_OPTION_LOCAL_HOSTNAME])) @@ -156,14 +156,14 @@ jabber_display_server (struct t_jabber_server *server, int with_detail) JABBER_SERVER_OPTION_STRING(server, JABBER_SERVER_OPTION_LOCAL_HOSTNAME)); else weechat_printf (NULL, " local_hostname . . . : %s'%s'", - JABBER_COLOR_CHAT_HOST, + JABBER_COLOR_CHAT_VALUE, weechat_config_string (server->options[JABBER_SERVER_OPTION_LOCAL_HOSTNAME])); if (weechat_config_option_is_null (server->options[JABBER_SERVER_OPTION_COMMAND])) weechat_printf (NULL, " command. . . . . . . : ('%s')", JABBER_SERVER_OPTION_STRING(server, JABBER_SERVER_OPTION_COMMAND)); else weechat_printf (NULL, " command. . . . . . . : %s'%s'", - JABBER_COLOR_CHAT_HOST, + JABBER_COLOR_CHAT_VALUE, weechat_config_string (server->options[JABBER_SERVER_OPTION_COMMAND])); if (weechat_config_option_is_null (server->options[JABBER_SERVER_OPTION_COMMAND_DELAY])) weechat_printf (NULL, " command_delay. . . . : (%d %s)", @@ -171,7 +171,7 @@ jabber_display_server (struct t_jabber_server *server, int with_detail) NG_("second", "seconds", JABBER_SERVER_OPTION_INTEGER(server, JABBER_SERVER_OPTION_COMMAND_DELAY))); else weechat_printf (NULL, " command_delay. . . . : %s%d %s", - JABBER_COLOR_CHAT_HOST, + JABBER_COLOR_CHAT_VALUE, weechat_config_integer (server->options[JABBER_SERVER_OPTION_COMMAND_DELAY]), NG_("second", "seconds", weechat_config_integer (server->options[JABBER_SERVER_OPTION_COMMAND_DELAY]))); if (weechat_config_option_is_null (server->options[JABBER_SERVER_OPTION_AUTOJOIN])) @@ -179,7 +179,7 @@ jabber_display_server (struct t_jabber_server *server, int with_detail) JABBER_SERVER_OPTION_STRING(server, JABBER_SERVER_OPTION_AUTOJOIN)); else weechat_printf (NULL, " autojoin . . . . . . : %s'%s'", - JABBER_COLOR_CHAT_HOST, + JABBER_COLOR_CHAT_VALUE, weechat_config_string (server->options[JABBER_SERVER_OPTION_AUTOJOIN])); if (weechat_config_option_is_null (server->options[JABBER_SERVER_OPTION_AUTOREJOIN])) weechat_printf (NULL, " autorejoin . . . . . : (%s)", @@ -187,7 +187,7 @@ jabber_display_server (struct t_jabber_server *server, int with_detail) _("on") : _("off")); else weechat_printf (NULL, " autorejoin . . . . . : %s%s", - JABBER_COLOR_CHAT_HOST, + JABBER_COLOR_CHAT_VALUE, weechat_config_boolean (server->options[JABBER_SERVER_OPTION_AUTOREJOIN]) ? _("on") : _("off")); } diff --git a/src/plugins/jabber/jabber.h b/src/plugins/jabber/jabber.h index b2d260228..04d1cc173 100644 --- a/src/plugins/jabber/jabber.h +++ b/src/plugins/jabber/jabber.h @@ -48,6 +48,7 @@ #define JABBER_COLOR_CHAT_NICK_SELF weechat_color("chat_nick_self") #define JABBER_COLOR_CHAT_NICK_OTHER weechat_color("chat_nick_other") #define JABBER_COLOR_CHAT_SERVER weechat_color("chat_server") +#define JABBER_COLOR_CHAT_VALUE weechat_color("chat_value") #define JABBER_COLOR_NICKLIST_PREFIX1 weechat_color("nicklist_prefix1") #define JABBER_COLOR_NICKLIST_PREFIX2 weechat_color("nicklist_prefix2") #define JABBER_COLOR_NICKLIST_PREFIX3 weechat_color("nicklist_prefix3") diff --git a/src/plugins/notify/CMakeLists.txt b/src/plugins/notify/CMakeLists.txt deleted file mode 100644 index a5f0b634c..000000000 --- a/src/plugins/notify/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (c) 2003-2009 FlashCode <flashcode@flashtux.org> -# -# 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 <http://www.gnu.org/licenses/>. -# - -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 deleted file mode 100644 index 6e3624034..000000000 --- a/src/plugins/notify/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright (c) 2003-2009 FlashCode <flashcode@flashtux.org> -# -# 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 <http://www.gnu.org/licenses/>. -# - -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) - -EXTRA_DIST = CMakeLists.txt diff --git a/src/plugins/notify/notify.c b/src/plugins/notify/notify.c deleted file mode 100644 index 1e6ebf535..000000000 --- a/src/plugins/notify/notify.c +++ /dev/null @@ -1,505 +0,0 @@ -/* - * Copyright (c) 2003-2009 by FlashCode <flashcode@flashtux.org> - * 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 <http://www.gnu.org/licenses/>. - */ - -/* notify.c: Notify plugin for WeeChat: set/save buffer notify levels */ - - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <iconv.h> - -#include "../weechat-plugin.h" - - -#define NOTIFY_PLUGIN_NAME "notify" - -WEECHAT_PLUGIN_NAME(NOTIFY_PLUGIN_NAME); -WEECHAT_PLUGIN_DESCRIPTION("Notify plugin for WeeChat (set/save buffer notify levels)"); -WEECHAT_PLUGIN_AUTHOR("FlashCode <flashcode@flashtux.org>"); -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" }; - - -/* - * 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) -{ - const char *plugin_name, *name; - char *option_name; - int length; - - plugin_name = weechat_buffer_get_string (buffer, "plugin"); - name = weechat_buffer_get_string (buffer, "name"); - - length = strlen (plugin_name) + 1 + strlen (name) + 1; - option_name = malloc (length); - if (!option_name) - return NULL; - - snprintf (option_name, length, "%s.%s", plugin_name, name); - - return option_name; -} - -/* - * 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 (weechat_notify_plugin->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 opened buffers - */ - -void -notify_set_buffer_all () -{ - struct t_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, 0, 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_PLUGIN_NAME, - 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, - NULL, 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_opened_signal_cb: callback for "buffer_opened" signal - */ - -int -notify_buffer_opened_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, "%s: \"%s\" => %s", - NOTIFY_PLUGIN_NAME, name, notify_string[value]); - else - weechat_printf (NULL, _("%s: \"%s\" removed"), - NOTIFY_PLUGIN_NAME, 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_PLUGIN_NAME); - 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_PLUGIN_NAME, - 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; - - if (!notify_config_init ()) - { - weechat_printf (NULL, - _("%s%s: error creating configuration file"), - weechat_prefix("error"), NOTIFY_PLUGIN_NAME); - return WEECHAT_RC_ERROR; - } - notify_config_read (); - - /* /notify command */ - weechat_hook_command ("notify", - N_("change notify level for current buffer"), - N_("reset | none | highlight | message | all"), - N_(" 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 opened */ - weechat_hook_signal ("buffer_opened", ¬ify_buffer_opened_signal_cb, NULL); - - /* callback when a config option is changed */ - weechat_hook_config ("notify.buffer.*", ¬ify_config_cb, NULL); - - /* set notify for opened 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; -} |