summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--po/POTFILES.in2
-rw-r--r--po/cs.po51
-rw-r--r--po/de.po52
-rw-r--r--po/es.po50
-rw-r--r--po/fr.po74
-rw-r--r--po/hu.po51
-rw-r--r--po/ru.po51
-rw-r--r--po/srcfiles.cmake2
-rw-r--r--po/weechat.pot39
-rw-r--r--src/core/wee-command.c6
-rw-r--r--src/core/wee-config.c2
-rw-r--r--src/gui/Makefile.am1
-rw-r--r--src/gui/curses/gui-curses-main.c26
-rw-r--r--src/gui/curses/gui-curses-status.c9
-rw-r--r--src/gui/curses/gui-curses-window.c25
-rw-r--r--src/gui/curses/gui-curses.h1
-rw-r--r--src/gui/gtk/gui-gtk-status.c5
-rw-r--r--src/gui/gtk/gui-gtk-window.c12
-rw-r--r--src/gui/gui-action.c20
-rw-r--r--src/gui/gui-buffer.c37
-rw-r--r--src/gui/gui-buffer.h2
-rw-r--r--src/gui/gui-chat.c6
-rw-r--r--src/gui/gui-hotlist.c10
-rw-r--r--src/gui/gui-hotlist.h5
-rw-r--r--src/gui/gui-nicklist.c5
-rw-r--r--src/gui/gui-status.c27
-rw-r--r--src/gui/gui-status.h4
-rw-r--r--src/gui/gui-window.c27
-rw-r--r--src/gui/gui-window.h1
-rw-r--r--src/plugins/alias/alias.c2
-rw-r--r--src/plugins/irc/irc-channel.c2
-rw-r--r--src/plugins/irc/irc-command.c14
-rw-r--r--src/plugins/irc/irc-completion.c37
-rw-r--r--src/plugins/irc/irc-dcc.c78
-rw-r--r--src/plugins/irc/irc-protocol.c92
-rw-r--r--src/plugins/weechat-plugin.h13
36 files changed, 459 insertions, 382 deletions
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 0669d539c..63fcf13cb 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -67,6 +67,7 @@
./src/gui/gui-main.h
./src/gui/gui-nicklist.c
./src/gui/gui-nicklist.h
+./src/gui/gui-status.c
./src/gui/gui-status.h
./src/gui/gui-window.c
./src/gui/gui-window.h
@@ -100,6 +101,7 @@
./src/plugins/irc/irc-display.h
./src/plugins/irc/irc.h
./src/plugins/irc/irc-input.c
+./src/plugins/irc/irc-input.h
./src/plugins/irc/irc-log.c
./src/plugins/irc/irc-mode.c
./src/plugins/irc/irc-mode.h
diff --git a/po/cs.po b/po/cs.po
index f2157f211..75715635c 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2008-01-02 12:39+0100\n"
+"POT-Creation-Date: 2008-01-06 12:35+0100\n"
"PO-Revision-Date: 2007-09-06 12:44+0200\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -229,16 +229,20 @@ msgstr "%s nemohu napojit kalávesu \"%s\"\n"
msgid "Plugins loaded:"
msgstr "Načtené pluginy:\n"
+#, c-format
+msgid " written by \"%s\", license: %s"
+msgstr ""
+
#, fuzzy
-msgid " commands hooked:"
+msgid " commands hooked:"
msgstr " obsluhovače příkazu:\n"
#, fuzzy
-msgid " timers hooked:"
+msgid " timers hooked:"
msgstr " obsluhovače časovače:\n"
#, c-format
-msgid " %d %s (%d calls remaining)"
+msgid " %d %s (%d calls remaining)"
msgstr ""
#, fuzzy
@@ -254,50 +258,50 @@ msgstr[0] "sekunda"
msgstr[1] "sekunda"
#, c-format
-msgid " %d %s (no call limit)"
+msgid " %d %s (no call limit)"
msgstr ""
#, fuzzy
-msgid " fd hooked:"
+msgid " fd hooked:"
msgstr " obsluhovače příkazu:\n"
#, fuzzy, c-format
-msgid " %d (flags: %d)"
+msgid " %d (flags: %d)"
msgstr " %d sekund\n"
#, fuzzy
-msgid " prints hooked:"
+msgid " prints hooked:"
msgstr " obsluhovače časovače:\n"
-#, c-format
-msgid " buffer: %s / %s, message: \"%s\""
-msgstr ""
+#, fuzzy, c-format
+msgid " buffer: %s / %s, message: \"%s\""
+msgstr " (není obsluhovač zprávy)\n"
#, fuzzy
msgid "(none)"
msgstr "(neznámý)"
#, fuzzy, c-format
-msgid " message: \"%s\""
+msgid " message: \"%s\""
msgstr " (není obsluhovač zprávy)\n"
#, fuzzy
-msgid " signals hooked:"
+msgid " signals hooked:"
msgstr " obsluhovače zpráv:\n"
#, fuzzy, c-format
-msgid " signal: %s"
+msgid " signal: %s"
msgstr " IRC(%s)\n"
msgid "(all)"
msgstr ""
#, fuzzy
-msgid " configuration options hooked:"
+msgid " configuration options hooked:"
msgstr "nastaví konfigurační možnosti"
#, fuzzy
-msgid " completion hooked:"
+msgid " completions hooked:"
msgstr " obsluhovače příkazu:\n"
#, fuzzy
@@ -3232,16 +3236,12 @@ msgid_plural "channels"
msgstr[0] "%d kanál"
msgstr[1] "%d kanálů"
-#, c-format
-msgid "%s cannot find nick for sending message\n"
-msgstr "%s nemohu najít přezdívku pro poslání zprávy\n"
-
-#, c-format
-msgid "%s you are not connected to server\n"
+#, fuzzy, c-format
+msgid "%s%s: you are not connected to server"
msgstr "%s nepřipojen k serveru\n"
-#, fuzzy
-msgid "This buffer is not a channel!\n"
+#, fuzzy, c-format
+msgid "%s: this buffer is not a channel!"
msgstr "Tohe není okno kanálu!\n"
#, c-format
@@ -4071,6 +4071,9 @@ msgstr "Plugin \"%s\" odebrán.\n"
msgid "Saving plugins configuration to disk"
msgstr "Ukládám konfiguraci na disk\n"
+#~ msgid "%s cannot find nick for sending message\n"
+#~ msgstr "%s nemohu najít přezdívku pro poslání zprávy\n"
+
#~ msgid "Nicks %s%s%s: %s["
#~ msgstr "Přezdívkz %s%s%s: %s["
diff --git a/po/de.po b/po/de.po
index 4874bbe3a..c7afcd634 100644
--- a/po/de.po
+++ b/po/de.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2008-01-02 12:39+0100\n"
+"POT-Creation-Date: 2008-01-06 12:35+0100\n"
"PO-Revision-Date: 2007-09-06 12:44+0200\n"
"Last-Translator: Thomas Schuetz <i18n@internet-villa.de>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -235,16 +235,20 @@ msgstr "%s kann die Taste \"%s\" nicht zuordnen\n"
msgid "Plugins loaded:"
msgstr "Plugins geladen:\n"
+#, c-format
+msgid " written by \"%s\", license: %s"
+msgstr ""
+
#, fuzzy
-msgid " commands hooked:"
+msgid " commands hooked:"
msgstr " Befehls-Handler:\n"
#, fuzzy
-msgid " timers hooked:"
+msgid " timers hooked:"
msgstr " Timer-Handler:\n"
#, c-format
-msgid " %d %s (%d calls remaining)"
+msgid " %d %s (%d calls remaining)"
msgstr ""
#, fuzzy
@@ -260,50 +264,50 @@ msgstr[0] "Sekunde"
msgstr[1] "Sekunde"
#, c-format
-msgid " %d %s (no call limit)"
+msgid " %d %s (no call limit)"
msgstr ""
#, fuzzy
-msgid " fd hooked:"
+msgid " fd hooked:"
msgstr " Befehls-Handler:\n"
#, fuzzy, c-format
-msgid " %d (flags: %d)"
+msgid " %d (flags: %d)"
msgstr " %d Sekunden\n"
#, fuzzy
-msgid " prints hooked:"
+msgid " prints hooked:"
msgstr " Timer-Handler:\n"
-#, c-format
-msgid " buffer: %s / %s, message: \"%s\""
-msgstr ""
+#, fuzzy, c-format
+msgid " buffer: %s / %s, message: \"%s\""
+msgstr " (kein Message-Handler)\n"
#, fuzzy
msgid "(none)"
msgstr "(unbekannt)"
#, fuzzy, c-format
-msgid " message: \"%s\""
+msgid " message: \"%s\""
msgstr " (kein Message-Handler)\n"
#, fuzzy
-msgid " signals hooked:"
+msgid " signals hooked:"
msgstr " Message-Handler:\n"
#, fuzzy, c-format
-msgid " signal: %s"
+msgid " signal: %s"
msgstr " IRC(%s)\n"
msgid "(all)"
msgstr ""
#, fuzzy
-msgid " configuration options hooked:"
+msgid " configuration options hooked:"
msgstr "Konfigurationsparameter setzen"
#, fuzzy
-msgid " completion hooked:"
+msgid " completions hooked:"
msgstr " Befehls-Handler:\n"
#, fuzzy
@@ -3223,17 +3227,12 @@ msgid_plural "channels"
msgstr[0] "ungültige Channelmaske"
msgstr[1] "ungültige Channelmaske"
-#, c-format
-msgid "%s cannot find nick for sending message\n"
-msgstr ""
-"%s kann keinen Nickname finden, an den die Nachricht gesendet werden soll\n"
-
#, fuzzy, c-format
-msgid "%s you are not connected to server\n"
+msgid "%s%s: you are not connected to server"
msgstr "%s keine Verbindung zum Server \"%s\"!\n"
-#, fuzzy
-msgid "This buffer is not a channel!\n"
+#, fuzzy, c-format
+msgid "%s: this buffer is not a channel!"
msgstr "Dieses Fenster ist kein Channel!\n"
#, fuzzy, c-format
@@ -4069,6 +4068,11 @@ msgstr "Plugin \"%s\" entladen.\n"
msgid "Saving plugins configuration to disk"
msgstr "Konfiguration wird gespeichert\n"
+#~ msgid "%s cannot find nick for sending message\n"
+#~ msgstr ""
+#~ "%s kann keinen Nickname finden, an den die Nachricht gesendet werden "
+#~ "soll\n"
+
#~ msgid "Nicks %s%s%s: %s["
#~ msgstr "Nicks %s%s%s: %s["
diff --git a/po/es.po b/po/es.po
index 809170bf9..1b486f365 100644
--- a/po/es.po
+++ b/po/es.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2008-01-02 12:39+0100\n"
+"POT-Creation-Date: 2008-01-06 12:35+0100\n"
"PO-Revision-Date: 2007-09-19 12:09+0200\n"
"Last-Translator: Roberto González Cardenete <robert.glez@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -231,16 +231,20 @@ msgstr "%s No ha sido posible atar la clave \"%s\"\n"
msgid "Plugins loaded:"
msgstr "Plugins cargados:\n"
+#, c-format
+msgid " written by \"%s\", license: %s"
+msgstr ""
+
#, fuzzy
-msgid " commands hooked:"
+msgid " commands hooked:"
msgstr " manejadores de comando:\n"
#, fuzzy
-msgid " timers hooked:"
+msgid " timers hooked:"
msgstr " manejadores de temporización:\n"
#, c-format
-msgid " %d %s (%d calls remaining)"
+msgid " %d %s (%d calls remaining)"
msgstr ""
#, fuzzy
@@ -256,50 +260,50 @@ msgstr[0] "segundo"
msgstr[1] "segundo"
#, c-format
-msgid " %d %s (no call limit)"
+msgid " %d %s (no call limit)"
msgstr ""
#, fuzzy
-msgid " fd hooked:"
+msgid " fd hooked:"
msgstr " manejadores de comando:\n"
#, fuzzy, c-format
-msgid " %d (flags: %d)"
+msgid " %d (flags: %d)"
msgstr " %d segundos\n"
#, fuzzy
-msgid " prints hooked:"
+msgid " prints hooked:"
msgstr " manejadores de temporización:\n"
-#, c-format
-msgid " buffer: %s / %s, message: \"%s\""
-msgstr ""
+#, fuzzy, c-format
+msgid " buffer: %s / %s, message: \"%s\""
+msgstr " (sin manejador de mensaje)\n"
#, fuzzy
msgid "(none)"
msgstr "(desconocido)"
#, fuzzy, c-format
-msgid " message: \"%s\""
+msgid " message: \"%s\""
msgstr " (sin manejador de mensaje)\n"
#, fuzzy
-msgid " signals hooked:"
+msgid " signals hooked:"
msgstr " manejadores de mensaje:\n"
#, fuzzy, c-format
-msgid " signal: %s"
+msgid " signal: %s"
msgstr " IRC(%s)\n"
msgid "(all)"
msgstr ""
#, fuzzy
-msgid " configuration options hooked:"
+msgid " configuration options hooked:"
msgstr "poner opciones de configuración"
#, fuzzy
-msgid " completion hooked:"
+msgid " completions hooked:"
msgstr " manejadores de comando:\n"
#, fuzzy
@@ -3225,16 +3229,12 @@ msgid_plural "channels"
msgstr[0] "máscara de canal incorrecta"
msgstr[1] "máscara de canal incorrecta"
-#, c-format
-msgid "%s cannot find nick for sending message\n"
-msgstr "%s no ha sido posible encontrar el usuario al que enviar el mensaje\n"
-
#, fuzzy, c-format
-msgid "%s you are not connected to server\n"
+msgid "%s%s: you are not connected to server"
msgstr "%s ¡no conectado al servidor \"%s\"!\n"
-#, fuzzy
-msgid "This buffer is not a channel!\n"
+#, fuzzy, c-format
+msgid "%s: this buffer is not a channel!"
msgstr "¡Esta ventana no es un canal!\n"
#, fuzzy, c-format
@@ -4082,6 +4082,10 @@ msgstr "Plugin \"%s\" descargado.\n"
msgid "Saving plugins configuration to disk"
msgstr "Guardar configuración a disco\n"
+#~ msgid "%s cannot find nick for sending message\n"
+#~ msgstr ""
+#~ "%s no ha sido posible encontrar el usuario al que enviar el mensaje\n"
+
#~ msgid "Nicks %s%s%s: %s["
#~ msgstr "Usuarios %s%s%s: %s["
diff --git a/po/fr.po b/po/fr.po
index c36579bf7..ab3410f84 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2008-01-02 12:39+0100\n"
-"PO-Revision-Date: 2008-01-02 12:39+0100\n"
+"POT-Creation-Date: 2008-01-06 12:35+0100\n"
+"PO-Revision-Date: 2008-01-06 12:36+0100\n"
"Last-Translator: FlashCode <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"MIME-Version: 1.0\n"
@@ -214,15 +214,19 @@ msgstr "%sErreur: impossible de créer la touche \"%s\""
msgid "Plugins loaded:"
msgstr "Extensions chargées:"
-msgid " commands hooked:"
-msgstr " commandes accrochées:"
+#, c-format
+msgid " written by \"%s\", license: %s"
+msgstr " écrit par \"%s\", licence: %s"
+
+msgid " commands hooked:"
+msgstr " commandes accrochées:"
-msgid " timers hooked:"
-msgstr " gestionnaires de temps accrochés:"
+msgid " timers hooked:"
+msgstr " gestionnaires de temps accrochés:"
#, c-format
-msgid " %d %s (%d calls remaining)"
-msgstr " %d %s (%d appels restants)"
+msgid " %d %s (%d calls remaining)"
+msgstr " %d %s (%d appels restants)"
msgid "second"
msgid_plural "seconds"
@@ -235,45 +239,45 @@ msgstr[0] "milliseconde"
msgstr[1] "millisecondes"
#, c-format
-msgid " %d %s (no call limit)"
-msgstr " %d %s (pas de limite d'appel)"
+msgid " %d %s (no call limit)"
+msgstr " %d %s (pas de limite d'appel)"
-msgid " fd hooked:"
-msgstr " fichiers accrochés:"
+msgid " fd hooked:"
+msgstr " fichiers accrochés:"
#, c-format
-msgid " %d (flags: %d)"
-msgstr " %d (drapeaux: %d)"
+msgid " %d (flags: %d)"
+msgstr " %d (drapeaux: %d)"
-msgid " prints hooked:"
-msgstr " impressions accrochées:"
+msgid " prints hooked:"
+msgstr " impressions accrochées:"
#, c-format
-msgid " buffer: %s / %s, message: \"%s\""
-msgstr " tampon: %s / %s, message: \"%s\""
+msgid " buffer: %s / %s, message: \"%s\""
+msgstr " tampon: %s / %s, message: \"%s\""
msgid "(none)"
msgstr "(aucun)"
#, c-format
-msgid " message: \"%s\""
-msgstr " message: \"%s\""
+msgid " message: \"%s\""
+msgstr " message: \"%s\""
-msgid " signals hooked:"
-msgstr " signaux accrochés:"
+msgid " signals hooked:"
+msgstr " signaux accrochés:"
#, c-format
-msgid " signal: %s"
-msgstr " signal: %s"
+msgid " signal: %s"
+msgstr " signal: %s"
msgid "(all)"
msgstr "(tous)"
-msgid " configuration options hooked:"
-msgstr " options de configuration accrochées:"
+msgid " configuration options hooked:"
+msgstr " options de configuration accrochées:"
-msgid " completion hooked:"
-msgstr " completion accrochées:"
+msgid " completions hooked:"
+msgstr " completion accrochées:"
msgid "No plugin found."
msgstr "Aucune extension trouvée."
@@ -3138,15 +3142,12 @@ msgstr[0] "canal"
msgstr[1] "canaux"
#, c-format
-msgid "%s cannot find nick for sending message\n"
-msgstr "%s impossible de trouver le pseudo pour envoyer le message\n"
+msgid "%s%s: you are not connected to server"
+msgstr "%s%s: vous n'êtes pas connecté au serveur"
#, c-format
-msgid "%s you are not connected to server\n"
-msgstr "%s vous n'êtes pas connecté au serveur\n"
-
-msgid "This buffer is not a channel!\n"
-msgstr "Ce tampon n'est pas un canal !\n"
+msgid "%s: this buffer is not a channel!"
+msgstr "%s: ce tampon n'est pas un canal !"
#, c-format
msgid "Not enough memory to write log file \"%s\"\n"
@@ -3989,5 +3990,8 @@ msgstr "%sExtension \"%s\" déchargée"
msgid "Saving plugins configuration to disk"
msgstr "Sauvegarde de la configuration des extensions sur disque"
+#~ msgid "%s cannot find nick for sending message\n"
+#~ msgstr "%s impossible de trouver le pseudo pour envoyer le message\n"
+
#~ msgid "Nicks %s%s%s: %s["
#~ msgstr "Pseudos %s%s%s: %s["
diff --git a/po/hu.po b/po/hu.po
index 684f02919..071c93729 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -12,7 +12,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2008-01-02 12:39+0100\n"
+"POT-Creation-Date: 2008-01-06 12:35+0100\n"
"PO-Revision-Date: 2007-10-10 18:07+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -234,16 +234,20 @@ msgstr "%s nem sikerült a(z) \"%s\" billentyűt hozzárendelni\n"
msgid "Plugins loaded:"
msgstr "Betöltött modulok:\n"
+#, c-format
+msgid " written by \"%s\", license: %s"
+msgstr ""
+
#, fuzzy
-msgid " commands hooked:"
+msgid " commands hooked:"
msgstr " parancskezelők:\n"
#, fuzzy
-msgid " timers hooked:"
+msgid " timers hooked:"
msgstr " időkezelők:\n"
#, c-format
-msgid " %d %s (%d calls remaining)"
+msgid " %d %s (%d calls remaining)"
msgstr ""
#, fuzzy
@@ -259,50 +263,50 @@ msgstr[0] "másodperc"
msgstr[1] "másodperc"
#, c-format
-msgid " %d %s (no call limit)"
+msgid " %d %s (no call limit)"
msgstr ""
#, fuzzy
-msgid " fd hooked:"
+msgid " fd hooked:"
msgstr " parancskezelők:\n"
#, fuzzy, c-format
-msgid " %d (flags: %d)"
+msgid " %d (flags: %d)"
msgstr " %d másodperc\n"
#, fuzzy
-msgid " prints hooked:"
+msgid " prints hooked:"
msgstr " időkezelők:\n"
-#, c-format
-msgid " buffer: %s / %s, message: \"%s\""
-msgstr ""
+#, fuzzy, c-format
+msgid " buffer: %s / %s, message: \"%s\""
+msgstr " (nincs üzenetkezelő)\n"
#, fuzzy
msgid "(none)"
msgstr "(ismeretlen)"
#, fuzzy, c-format
-msgid " message: \"%s\""
+msgid " message: \"%s\""
msgstr " (nincs üzenetkezelő)\n"
#, fuzzy
-msgid " signals hooked:"
+msgid " signals hooked:"
msgstr " üzenetkezelők:\n"
#, fuzzy, c-format
-msgid " signal: %s"
+msgid " signal: %s"
msgstr " IRC(%s)\n"
msgid "(all)"
msgstr ""
#, fuzzy
-msgid " configuration options hooked:"
+msgid " configuration options hooked:"
msgstr "konfigurációs paraméterek beállítása"
#, fuzzy
-msgid " completion hooked:"
+msgid " completions hooked:"
msgstr " parancskezelők:\n"
#, fuzzy
@@ -3234,16 +3238,12 @@ msgid_plural "channels"
msgstr[0] "%d szoba"
msgstr[1] "%d szoba"
-#, c-format
-msgid "%s cannot find nick for sending message\n"
-msgstr "%s nem található név az üzenet küldéséhez\n"
-
-#, c-format
-msgid "%s you are not connected to server\n"
+#, fuzzy, c-format
+msgid "%s%s: you are not connected to server"
msgstr "%s nincs csatlakozva szerverhez!\n"
-#, fuzzy
-msgid "This buffer is not a channel!\n"
+#, fuzzy, c-format
+msgid "%s: this buffer is not a channel!"
msgstr "Ez az ablak nem egy szoba!\n"
#, c-format
@@ -4071,6 +4071,9 @@ msgstr "A \"%s\" modul eltávolítva.\n"
msgid "Saving plugins configuration to disk"
msgstr "Beállítások mentése a lemezre\n"
+#~ msgid "%s cannot find nick for sending message\n"
+#~ msgstr "%s nem található név az üzenet küldéséhez\n"
+
#~ msgid "Nicks %s%s%s: %s["
#~ msgstr "Felhasználók a %s%s%s szobában: %s["
diff --git a/po/ru.po b/po/ru.po
index c6d38d7c8..95b372316 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2008-01-02 12:39+0100\n"
+"POT-Creation-Date: 2008-01-06 12:35+0100\n"
"PO-Revision-Date: 2007-09-06 12:44+0200\n"
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -231,16 +231,20 @@ msgstr "%s не могу установить клавишу \"%s\"\n"
msgid "Plugins loaded:"
msgstr "Загруженные plugin'ы\n"
+#, c-format
+msgid " written by \"%s\", license: %s"
+msgstr ""
+
#, fuzzy
-msgid " commands hooked:"
+msgid " commands hooked:"
msgstr " обработчики команд:\n"
#, fuzzy
-msgid " timers hooked:"
+msgid " timers hooked:"
msgstr " обработчики таймера:\n"
#, c-format
-msgid " %d %s (%d calls remaining)"
+msgid " %d %s (%d calls remaining)"
msgstr ""
#, fuzzy
@@ -256,50 +260,50 @@ msgstr[0] "секунда"
msgstr[1] "секунда"
#, c-format
-msgid " %d %s (no call limit)"
+msgid " %d %s (no call limit)"
msgstr ""
#, fuzzy
-msgid " fd hooked:"
+msgid " fd hooked:"
msgstr " обработчики команд:\n"
#, fuzzy, c-format
-msgid " %d (flags: %d)"
+msgid " %d (flags: %d)"
msgstr " %d секунд\n"
#, fuzzy
-msgid " prints hooked:"
+msgid " prints hooked:"
msgstr " обработчики таймера:\n"
-#, c-format
-msgid " buffer: %s / %s, message: \"%s\""
-msgstr ""
+#, fuzzy, c-format
+msgid " buffer: %s / %s, message: \"%s\""
+msgstr " (нет обработчика сообщений)\n"
#, fuzzy
msgid "(none)"
msgstr "(неизвестен)"
#, fuzzy, c-format
-msgid " message: \"%s\""
+msgid " message: \"%s\""
msgstr " (нет обработчика сообщений)\n"
#, fuzzy
-msgid " signals hooked:"
+msgid " signals hooked:"
msgstr " обработчики сообщений:\n"
#, fuzzy, c-format
-msgid " signal: %s"
+msgid " signal: %s"
msgstr " IRC(%s)\n"
msgid "(all)"
msgstr ""
#, fuzzy
-msgid " configuration options hooked:"
+msgid " configuration options hooked:"
msgstr "настроить параметры конфигурации"
#, fuzzy
-msgid " completion hooked:"
+msgid " completions hooked:"
msgstr " обработчики команд:\n"
#, fuzzy
@@ -3222,16 +3226,12 @@ msgid_plural "channels"
msgstr[0] "%d канал"
msgstr[1] "%d каналов"
-#, c-format
-msgid "%s cannot find nick for sending message\n"
-msgstr "%s не могу найти адресата сообщения\n"
-
-#, c-format
-msgid "%s you are not connected to server\n"
+#, fuzzy, c-format
+msgid "%s%s: you are not connected to server"
msgstr "%s вы не подключены к серверу\n"
-#, fuzzy
-msgid "This buffer is not a channel!\n"
+#, fuzzy, c-format
+msgid "%s: this buffer is not a channel!"
msgstr "Это окно не является каналом!\n"
#, c-format
@@ -4053,6 +4053,9 @@ msgstr "Plugin \"%s\" выгружен.\n"
msgid "Saving plugins configuration to disk"
msgstr "Сохраняю конфигурацию\n"
+#~ msgid "%s cannot find nick for sending message\n"
+#~ msgstr "%s не могу найти адресата сообщения\n"
+
#~ msgid "Nicks %s%s%s: %s["
#~ msgstr "Ники %s%s%s: %s["
diff --git a/po/srcfiles.cmake b/po/srcfiles.cmake
index f2e079d5f..785db7e3e 100644
--- a/po/srcfiles.cmake
+++ b/po/srcfiles.cmake
@@ -68,6 +68,7 @@ SET(WEECHAT_SOURCES
./src/gui/gui-main.h
./src/gui/gui-nicklist.c
./src/gui/gui-nicklist.h
+./src/gui/gui-status.c
./src/gui/gui-status.h
./src/gui/gui-window.c
./src/gui/gui-window.h
@@ -101,6 +102,7 @@ SET(WEECHAT_SOURCES
./src/plugins/irc/irc-display.h
./src/plugins/irc/irc.h
./src/plugins/irc/irc-input.c
+./src/plugins/irc/irc-input.h
./src/plugins/irc/irc-log.c
./src/plugins/irc/irc-mode.c
./src/plugins/irc/irc-mode.h
diff --git a/po/weechat.pot b/po/weechat.pot
index 0d18fd7ef..6bb172721 100644
--- a/po/weechat.pot
+++ b/po/weechat.pot
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2008-01-02 12:39+0100\n"
+"POT-Creation-Date: 2008-01-06 12:35+0100\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"
@@ -195,14 +195,18 @@ msgstr ""
msgid "Plugins loaded:"
msgstr ""
-msgid " commands hooked:"
+#, c-format
+msgid " written by \"%s\", license: %s"
+msgstr ""
+
+msgid " commands hooked:"
msgstr ""
-msgid " timers hooked:"
+msgid " timers hooked:"
msgstr ""
#, c-format
-msgid " %d %s (%d calls remaining)"
+msgid " %d %s (%d calls remaining)"
msgstr ""
msgid "second"
@@ -216,44 +220,44 @@ msgstr[0] ""
msgstr[1] ""
#, c-format
-msgid " %d %s (no call limit)"
+msgid " %d %s (no call limit)"
msgstr ""
-msgid " fd hooked:"
+msgid " fd hooked:"
msgstr ""
#, c-format
-msgid " %d (flags: %d)"
+msgid " %d (flags: %d)"
msgstr ""
-msgid " prints hooked:"
+msgid " prints hooked:"
msgstr ""
#, c-format
-msgid " buffer: %s / %s, message: \"%s\""
+msgid " buffer: %s / %s, message: \"%s\""
msgstr ""
msgid "(none)"
msgstr ""
#, c-format
-msgid " message: \"%s\""
+msgid " message: \"%s\""
msgstr ""
-msgid " signals hooked:"
+msgid " signals hooked:"
msgstr ""
#, c-format
-msgid " signal: %s"
+msgid " signal: %s"
msgstr ""
msgid "(all)"
msgstr ""
-msgid " configuration options hooked:"
+msgid " configuration options hooked:"
msgstr ""
-msgid " completion hooked:"
+msgid " completions hooked:"
msgstr ""
msgid "No plugin found."
@@ -2709,14 +2713,11 @@ msgstr[0] ""
msgstr[1] ""
#, c-format
-msgid "%s cannot find nick for sending message\n"
+msgid "%s%s: you are not connected to server"
msgstr ""
#, c-format
-msgid "%s you are not connected to server\n"
-msgstr ""
-
-msgid "This buffer is not a channel!\n"
+msgid "%s: this buffer is not a channel!"
msgstr ""
#, c-format
diff --git a/src/core/wee-command.c b/src/core/wee-command.c
index 4c9ae76bb..5c515d161 100644
--- a/src/core/wee-command.c
+++ b/src/core/wee-command.c
@@ -142,8 +142,8 @@ command_buffer (void *data, struct t_gui_buffer *buffer,
return WEECHAT_RC_ERROR;
}
gui_buffer_close (buffer, 1);
- gui_status_draw (gui_current_window->buffer, 1);
- gui_input_draw (gui_current_window->buffer, 1);
+ gui_status_refresh_needed = 1;
+ buffer->input_refresh_needed = 1;
}
else if (string_strcasecmp (argv[1], "notify") == 0)
{
@@ -897,7 +897,7 @@ command_plugin_list (char *name, int full)
{
/* second line of plugin info */
gui_chat_printf (NULL,
- _(" written by \"%s\", license: s%"),
+ _(" written by \"%s\", license: %s"),
ptr_plugin->author,
ptr_plugin->license);
diff --git a/src/core/wee-config.c b/src/core/wee-config.c
index 6dc8e5da0..1643c2187 100644
--- a/src/core/wee-config.c
+++ b/src/core/wee-config.c
@@ -258,7 +258,7 @@ void
config_change_hotlist ()
{
gui_hotlist_resort ();
- gui_status_draw (gui_current_window->buffer, 1);
+ gui_status_refresh_needed = 1;
}
/*
diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am
index eb5fb0fe0..49d963709 100644
--- a/src/gui/Makefile.am
+++ b/src/gui/Makefile.am
@@ -39,6 +39,7 @@ lib_weechat_gui_common_a_SOURCES = gui-action.c \
gui-keyboard.c \
gui-keyboard.h \
gui-main.h \
+ gui-status.c \
gui-status.h \
gui-window.c \
gui-window.h \
diff --git a/src/gui/curses/gui-curses-main.c b/src/gui/curses/gui-curses-main.c
index 22c04bf54..db3aa0a39 100644
--- a/src/gui/curses/gui-curses-main.c
+++ b/src/gui/curses/gui-curses-main.c
@@ -44,6 +44,7 @@
#include "../gui-input.h"
#include "../gui-history.h"
#include "../gui-nicklist.h"
+#include "../gui-status.h"
#include "../gui-window.h"
#include "gui-curses.h"
@@ -161,23 +162,44 @@ gui_main_loop ()
/* execute hook timers */
hook_timer_exec ();
- /* refresh needed ? */
- if (gui_refresh_screen_needed)
+ /* refresh window if needed */
+ if (gui_window_refresh_needed)
gui_window_refresh_screen (0);
+
+ /* refresh status bar if needed */
+ if (gui_status_refresh_needed)
+ {
+ gui_status_draw (1);
+ gui_status_refresh_needed = 0;
+ }
for (ptr_buffer = gui_buffers; ptr_buffer;
ptr_buffer = ptr_buffer->next_buffer)
{
+ /* refresh title if needed */
+ if (ptr_buffer->title_refresh_needed)
+ {
+ gui_chat_draw_title (ptr_buffer, 1);
+ ptr_buffer->title_refresh_needed = 0;
+ }
+ /* refresh chat if needed */
if (ptr_buffer->chat_refresh_needed)
{
gui_chat_draw (ptr_buffer, 0);
ptr_buffer->chat_refresh_needed = 0;
}
+ /* refresh nicklist if needed */
if (ptr_buffer->nicklist_refresh_needed)
{
gui_nicklist_draw (ptr_buffer, 0);
ptr_buffer->nicklist_refresh_needed = 0;
}
+ /* refresh input if needed */
+ if (ptr_buffer->input_refresh_needed)
+ {
+ gui_input_draw (ptr_buffer, 1);
+ ptr_buffer->input_refresh_needed = 0;
+ }
}
/* wait for keyboard or network activity */
diff --git a/src/gui/curses/gui-curses-status.c b/src/gui/curses/gui-curses-status.c
index b8b1596c5..495dfd943 100644
--- a/src/gui/curses/gui-curses-status.c
+++ b/src/gui/curses/gui-curses-status.c
@@ -40,11 +40,11 @@
/*
- * gui_status_draw: draw status window for a buffer
+ * gui_status_draw: draw status window
*/
void
-gui_status_draw (struct t_gui_buffer *buffer, int erase)
+gui_status_draw (int erase)
{
struct t_gui_window *ptr_win;
struct t_gui_hotlist *ptr_hotlist;
@@ -52,9 +52,6 @@ gui_status_draw (struct t_gui_buffer *buffer, int erase)
int x;
int display_name, names_count;
- /* make C compiler happy */
- (void) buffer;
-
if (!gui_ok)
return;
@@ -139,7 +136,7 @@ gui_status_draw (struct t_gui_buffer *buffer, int erase)
GUI_COLOR_STATUS_DATA_OTHER);
display_name = ((CONFIG_INTEGER(config_look_hotlist_names_level) & 1) != 0);
break;
- case GUI_HOTLIST_MSG:
+ case GUI_HOTLIST_MESSAGE:
gui_window_set_weechat_color (GUI_CURSES(ptr_win)->win_status,
GUI_COLOR_STATUS_DATA_MSG);
display_name = ((CONFIG_INTEGER(config_look_hotlist_names_level) & 2) != 0);
diff --git a/src/gui/curses/gui-curses-window.c b/src/gui/curses/gui-curses-window.c
index a78009bfb..951de91db 100644
--- a/src/gui/curses/gui-curses-window.c
+++ b/src/gui/curses/gui-curses-window.c
@@ -46,9 +46,6 @@
#include "gui-curses.h"
-int gui_refresh_screen_needed = 0;
-
-
/*
* gui_window_get_width: get screen width (terminal width in chars for Curses)
*/
@@ -444,7 +441,7 @@ gui_window_redraw_buffer (struct t_gui_buffer *buffer)
gui_chat_draw (buffer, 1);
if (GUI_CURSES(ptr_win)->win_nick)
gui_nicklist_draw (buffer, 1);
- gui_status_draw (buffer, 1);
+ gui_status_draw (1);
if (CONFIG_BOOLEAN(config_look_infobar))
gui_infobar_draw (buffer, 1);
gui_input_draw (buffer, 1);
@@ -576,7 +573,7 @@ gui_window_page_up (struct t_gui_window *window)
window->start_line = NULL;
window->start_line_pos = 0;
}
- gui_status_draw (window->buffer, 1);
+ gui_status_refresh_needed = 1;
}
}
@@ -618,7 +615,7 @@ gui_window_page_down (struct t_gui_window *window)
window->start_line_pos = 0;
gui_hotlist_remove_buffer (window->buffer);
}
- gui_status_draw (window->buffer, 1);
+ gui_status_refresh_needed = 1;
}
}
@@ -646,7 +643,7 @@ gui_window_scroll_up (struct t_gui_window *window)
window->start_line = NULL;
window->start_line_pos = 0;
}
- gui_status_draw (window->buffer, 1);
+ gui_status_refresh_needed = 1;
}
}
@@ -689,7 +686,7 @@ gui_window_scroll_down (struct t_gui_window *window)
window->start_line_pos = 0;
gui_hotlist_remove_buffer (window->buffer);
}
- gui_status_draw (window->buffer, 1);
+ gui_status_refresh_needed = 1;
}
}
@@ -713,7 +710,7 @@ gui_window_scroll_top (struct t_gui_window *window)
window->start_line = NULL;
window->start_line_pos = 0;
}
- gui_status_draw (window->buffer, 1);
+ gui_status_refresh_needed = 1;
}
}
@@ -738,7 +735,7 @@ gui_window_scroll_bottom (struct t_gui_window *window)
window->start_line_pos = 0;
gui_hotlist_remove_buffer (window->buffer);
}
- gui_status_draw (window->buffer, 1);
+ gui_status_refresh_needed = 1;
}
}
@@ -1308,7 +1305,7 @@ gui_window_refresh_screen (int force)
{
int new_height, new_width;
- if (force || (gui_refresh_screen_needed == 1))
+ if (force || (gui_window_refresh_needed == 1))
{
endwin ();
refresh ();
@@ -1324,8 +1321,8 @@ gui_window_refresh_screen (int force)
}
}
- if (!force && (gui_refresh_screen_needed > 0))
- gui_refresh_screen_needed--;
+ if (!force && (gui_window_refresh_needed > 0))
+ gui_window_refresh_needed--;
}
/*
@@ -1335,7 +1332,7 @@ gui_window_refresh_screen (int force)
void
gui_window_refresh_screen_sigwinch ()
{
- gui_refresh_screen_needed = 1;
+ gui_window_refresh_needed = 1;
//gui_window_refresh_screen (0);
signal (SIGWINCH, &gui_window_refresh_screen_sigwinch);
}
diff --git a/src/gui/curses/gui-curses.h b/src/gui/curses/gui-curses.h
index 7122877f8..2dc52e34c 100644
--- a/src/gui/curses/gui-curses.h
+++ b/src/gui/curses/gui-curses.h
@@ -47,7 +47,6 @@ struct t_gui_curses_objects
};
extern struct t_gui_color gui_weechat_colors[];
-extern int gui_refresh_screen_needed;
/* color functions */
extern int gui_color_get_pair (int num_color);
diff --git a/src/gui/gtk/gui-gtk-status.c b/src/gui/gtk/gui-gtk-status.c
index 4bc6d6bfe..88745be0b 100644
--- a/src/gui/gtk/gui-gtk-status.c
+++ b/src/gui/gtk/gui-gtk-status.c
@@ -33,13 +33,12 @@
/*
- * gui_status_draw: draw status window for a buffer
+ * gui_status_draw: draw status window
*/
void
-gui_status_draw (struct t_gui_buffer *buffer, int erase)
+gui_status_draw (int erase)
{
/* TODO: write this function for Gtk */
- (void) buffer;
(void) erase;
}
diff --git a/src/gui/gtk/gui-gtk-window.c b/src/gui/gtk/gui-gtk-window.c
index db4d580de..f59021ba2 100644
--- a/src/gui/gtk/gui-gtk-window.c
+++ b/src/gui/gtk/gui-gtk-window.c
@@ -247,7 +247,7 @@ gui_window_page_up (struct t_gui_window *window)
(-1) * (window->win_chat_height - 1) :
(-1) * ((window->win_chat_height - 1) * 2));
gui_chat_draw (window->buffer, 0);
- gui_status_draw (window->buffer, 0);
+ gui_status_refresh_needed = 1;
}
}
@@ -283,7 +283,7 @@ gui_window_page_down (struct t_gui_window *window)
}
gui_chat_draw (window->buffer, 0);
- gui_status_draw (window->buffer, 0);
+ gui_status_refresh_needed = 1;
}
}
@@ -306,7 +306,7 @@ gui_window_scroll_up (struct t_gui_window *window)
(-1) * ( (window->win_chat_height - 1) +
CONFIG_INTEGER(config_look_scroll_amount)));
gui_chat_draw (window->buffer, 0);
- gui_status_draw (window->buffer, 0);
+ gui_status_refresh_needed = 1;
}
}
@@ -343,7 +343,7 @@ gui_window_scroll_down (struct t_gui_window *window)
}
gui_chat_draw (window->buffer, 0);
- gui_status_draw (window->buffer, 0);
+ gui_status_refresh_needed = 1;
}
}
@@ -362,7 +362,7 @@ gui_window_scroll_top (struct t_gui_window *window)
window->start_line = window->buffer->lines;
window->start_line_pos = 0;
gui_chat_draw (window->buffer, 0);
- gui_status_draw (window->buffer, 0);
+ gui_status_refresh_needed = 1;
}
}
@@ -381,7 +381,7 @@ gui_window_scroll_bottom (struct t_gui_window *window)
window->start_line = NULL;
window->start_line_pos = 0;
gui_chat_draw (window->buffer, 0);
- gui_status_draw (window->buffer, 0);
+ gui_status_refresh_needed = 1;
}
}
diff --git a/src/gui/gui-action.c b/src/gui/gui-action.c
index d0301454f..1f0eb5337 100644
--- a/src/gui/gui-action.c
+++ b/src/gui/gui-action.c
@@ -684,8 +684,8 @@ gui_action_up (char *args)
((t_irc_dcc *)(window->dcc_first))->prev_dcc;
window->dcc_selected =
((t_irc_dcc *)(window->dcc_selected))->prev_dcc;
- gui_chat_draw (gui_current_window->buffer, 1);
- gui_input_draw (gui_current_window->buffer, 1);
+ gui_current_window->buffer->chat_refresh_needed = 1;
+ gui_current_window->buffer->input_refresh_needed = 1;
}
}
}
@@ -824,8 +824,8 @@ gui_action_down (char *args)
else
window->dcc_selected =
irc_dcc_list->next_dcc;
- gui_chat_draw (gui_current_window->buffer, 1);
- gui_input_draw (gui_current_window->buffer, 1);
+ gui_current_window->buffer->chat_refresh_needed = 1;
+ gui_current_window->buffer->input_refresh_needed = 1;
}
}
}
@@ -1329,8 +1329,8 @@ gui_action_scroll_previous_highlight (char *args)
window->start_line_pos = 0;
window->first_line_displayed =
(window->start_line == gui_current_window->buffer->lines);
- gui_chat_draw (gui_current_window->buffer, 1);
- gui_status_draw (gui_current_window->buffer, 0);
+ gui_current_window->buffer->chat_refresh_needed = 1;
+ gui_current_window->buffer->input_refresh_needed = 1;
return;
}
ptr_line = ptr_line->prev_line;
@@ -1366,8 +1366,8 @@ gui_action_scroll_next_highlight (char *args)
window->start_line_pos = 0;
window->first_line_displayed =
(window->start_line == gui_current_window->buffer->lines);
- gui_chat_draw (gui_current_window->buffer, 1);
- gui_status_draw (gui_current_window->buffer, 0);
+ gui_current_window->buffer->chat_refresh_needed = 1;
+ gui_current_window->buffer->input_refresh_needed = 1;
return;
}
ptr_line = ptr_line->next_line;
@@ -1399,8 +1399,8 @@ gui_action_scroll_unread (char *args)
gui_current_window->start_line_pos = 0;
gui_current_window->first_line_displayed =
(gui_current_window->start_line == gui_current_window->buffer->lines);
- gui_chat_draw (gui_current_window->buffer, 1);
- gui_status_draw (gui_current_window->buffer, 0);
+ gui_current_window->buffer->chat_refresh_needed = 1;
+ gui_status_refresh_needed = 1;
}
}
}
diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c
index 7b0271073..4423c67bb 100644
--- a/src/gui/gui-buffer.c
+++ b/src/gui/gui-buffer.c
@@ -102,6 +102,7 @@ gui_buffer_new (struct t_weechat_plugin *plugin, char *category, char *name,
/* title */
new_buffer->title = NULL;
+ new_buffer->title_refresh_needed = 1;
/* chat lines */
new_buffer->lines = NULL;
@@ -118,7 +119,7 @@ gui_buffer_new (struct t_weechat_plugin *plugin, char *category, char *name,
new_buffer->nicklist_max_length = -1;
new_buffer->nicklist_display_groups = 1;
new_buffer->nicklist_visible_count = 0;
- new_buffer->nicklist_refresh_needed = 0;
+ new_buffer->nicklist_refresh_needed = 1;
gui_nicklist_add_group (new_buffer, NULL, "root", NULL, 0);
/* input */
@@ -134,6 +135,7 @@ gui_buffer_new (struct t_weechat_plugin *plugin, char *category, char *name,
new_buffer->input_buffer_length = 0;
new_buffer->input_buffer_pos = 0;
new_buffer->input_buffer_1st_display = 0;
+ new_buffer->input_refresh_needed = 1;
/* init completion */
new_completion = (struct t_gui_completion *)malloc (sizeof (struct t_gui_completion));
@@ -244,6 +246,7 @@ gui_buffer_set_category (struct t_gui_buffer *buffer, char *category)
free (buffer->category);
buffer->category = strdup (category);
}
+ gui_status_refresh_needed = 1;
}
/*
@@ -259,6 +262,7 @@ gui_buffer_set_name (struct t_gui_buffer *buffer, char *name)
free (buffer->name);
buffer->name = strdup (name);
}
+ gui_status_refresh_needed = 1;
}
/*
@@ -271,6 +275,7 @@ gui_buffer_set_title (struct t_gui_buffer *buffer, char *new_title)
if (buffer->title)
free (buffer->title);
buffer->title = (new_title && new_title[0]) ? strdup (new_title) : NULL;
+ buffer->title_refresh_needed = 1;
}
/*
@@ -281,6 +286,7 @@ void
gui_buffer_set_nicklist (struct t_gui_buffer *buffer, int nicklist)
{
buffer->nicklist = (nicklist) ? 1 : 0;
+ gui_window_refresh_windows ();
}
/*
@@ -305,6 +311,7 @@ gui_buffer_set_nicklist_display_groups (struct t_gui_buffer *buffer,
buffer->nicklist_display_groups = (display_groups) ? 1 : 0;
buffer->nicklist_visible_count = 0;
gui_nicklist_compute_visible_count (buffer, buffer->nicklist_root);
+ buffer->nicklist_refresh_needed = 1;
}
/*
@@ -317,6 +324,7 @@ gui_buffer_set_nick (struct t_gui_buffer *buffer, char *new_nick)
if (buffer->input_nick)
free (buffer->input_nick);
buffer->input_nick = (new_nick && new_nick[0]) ? strdup (new_nick) : NULL;
+ buffer->input_refresh_needed = 1;
}
/*
@@ -337,27 +345,21 @@ gui_buffer_set (struct t_gui_buffer *buffer, char *property, char *value)
else if (string_strcasecmp (property, "category") == 0)
{
gui_buffer_set_category (buffer, value);
- gui_status_draw (buffer, 1);
}
else if (string_strcasecmp (property, "name") == 0)
{
gui_buffer_set_name (buffer, value);
- gui_status_draw (buffer, 1);
}
else if (string_strcasecmp (property, "title") == 0)
{
gui_buffer_set_title (buffer, value);
- gui_chat_draw_title (buffer, 1);
}
else if (string_strcasecmp (property, "nicklist") == 0)
{
error = NULL;
number = strtol (value, &error, 10);
if (error && (error[0] == '\0'))
- {
gui_buffer_set_nicklist (buffer, number);
- gui_window_refresh_windows ();
- }
}
else if (string_strcasecmp (property, "nicklist_case_sensitive") == 0)
{
@@ -376,7 +378,20 @@ gui_buffer_set (struct t_gui_buffer *buffer, char *property, char *value)
else if (string_strcasecmp (property, "nick") == 0)
{
gui_buffer_set_nick (buffer, value);
- gui_input_draw (buffer, 1);
+ }
+ else if (string_strcasecmp (property, "hotlist") == 0)
+ {
+ if (strcmp (value, "-") == 0)
+ gui_add_hotlist = 0;
+ else if (strcmp (value, "+") == 0)
+ gui_add_hotlist = 1;
+ else
+ {
+ error = NULL;
+ number = strtol (value, &error, 10);
+ if (error && (error[0] == '\0'))
+ gui_hotlist_add (buffer, number, NULL, 1);
+ }
}
}
@@ -576,8 +591,8 @@ gui_buffer_clear (struct t_gui_buffer *buffer)
}
}
- gui_chat_draw (buffer, 1);
- gui_status_draw (buffer, 1);
+ buffer->chat_refresh_needed = 1;
+ gui_status_refresh_needed = 1;
}
/*
@@ -685,7 +700,7 @@ gui_buffer_close (struct t_gui_buffer *buffer, int switch_to_another)
free (buffer);
if (gui_windows && gui_current_window && gui_current_window->buffer)
- gui_status_draw (gui_current_window->buffer, 1);
+ gui_status_refresh_needed = 1;
}
/*
diff --git a/src/gui/gui-buffer.h b/src/gui/gui-buffer.h
index c95ef719a..6b9583660 100644
--- a/src/gui/gui-buffer.h
+++ b/src/gui/gui-buffer.h
@@ -66,6 +66,7 @@ struct t_gui_buffer
/* buffer title */
char *title; /* buffer title */
+ int title_refresh_needed; /* refresh for title is needed ? */
/* chat content */
struct t_gui_line *lines; /* lines of chat window */
@@ -97,6 +98,7 @@ struct t_gui_buffer
int input_buffer_length; /* number of chars in buffer */
int input_buffer_pos; /* position into buffer */
int input_buffer_1st_display; /* first char displayed on screen */
+ int input_refresh_needed; /* refresh for input is needed ? */
/* completion */
struct t_gui_completion *completion; /* completion */
diff --git a/src/gui/gui-chat.c b/src/gui/gui-chat.c
index c541cca85..ac7338b34 100644
--- a/src/gui/gui-chat.c
+++ b/src/gui/gui-chat.c
@@ -404,8 +404,8 @@ gui_chat_line_free (struct t_gui_line *line)
{
ptr_win->start_line = ptr_win->start_line->next_line;
ptr_win->start_line_pos = 0;
- gui_chat_draw (ptr_win->buffer, 0);
- gui_status_draw (ptr_win->buffer, 0);
+ ptr_win->buffer->chat_refresh_needed = 1;
+ gui_status_refresh_needed = 1;
}
}
if (line->str_time)
@@ -566,7 +566,7 @@ gui_chat_printf_date (struct t_gui_buffer *buffer, time_t date,
|| (gui_buffer_is_scrolled (buffer))))
{
gui_hotlist_add (buffer, 0, NULL, 1);
- gui_status_draw (buffer, 0);
+ gui_status_refresh_needed = 1;
}
}
}
diff --git a/src/gui/gui-hotlist.c b/src/gui/gui-hotlist.c
index ef8e2b4ca..5843236e2 100644
--- a/src/gui/gui-hotlist.c
+++ b/src/gui/gui-hotlist.c
@@ -32,6 +32,7 @@
#include "../core/wee-util.h"
#include "gui-hotlist.h"
#include "gui-buffer.h"
+#include "gui-status.h"
#include "gui-window.h"
@@ -190,7 +191,7 @@ gui_hotlist_add (struct t_gui_buffer *buffer, int priority,
{
struct t_gui_hotlist *new_hotlist, *ptr_hotlist;
- if (!buffer)
+ if (!buffer || !gui_add_hotlist)
return;
/* do not highlight current buffer */
@@ -198,6 +199,11 @@ gui_hotlist_add (struct t_gui_buffer *buffer, int priority,
&& (!allow_current_buffer) && (!gui_buffer_is_scrolled (buffer)))
return;
+ if (priority < GUI_HOTLIST_MIN)
+ priority = GUI_HOTLIST_MIN;
+ else if (priority > GUI_HOTLIST_MAX)
+ priority = GUI_HOTLIST_MAX;
+
if ((ptr_hotlist = gui_hotlist_search (gui_hotlist, buffer)))
{
/* return if priority is greater or equal than the one to add */
@@ -226,6 +232,8 @@ gui_hotlist_add (struct t_gui_buffer *buffer, int priority,
new_hotlist->prev_hotlist = NULL;
gui_hotlist_add_hotlist (&gui_hotlist, &last_gui_hotlist, new_hotlist);
+
+ gui_status_refresh_needed = 1;
}
/*
diff --git a/src/gui/gui-hotlist.h b/src/gui/gui-hotlist.h
index e913e1efc..3099cc0b1 100644
--- a/src/gui/gui-hotlist.h
+++ b/src/gui/gui-hotlist.h
@@ -21,10 +21,13 @@
#define __WEECHAT_GUI_HOTLIST_H 1
#define GUI_HOTLIST_LOW 0
-#define GUI_HOTLIST_MSG 1
+#define GUI_HOTLIST_MESSAGE 1
#define GUI_HOTLIST_PRIVATE 2
#define GUI_HOTLIST_HIGHLIGHT 3
+#define GUI_HOTLIST_MIN 0
+#define GUI_HOTLIST_MAX 3
+
struct t_gui_hotlist
{
int priority; /* 0=crappy msg (join/part), 1=msg, */
diff --git a/src/gui/gui-nicklist.c b/src/gui/gui-nicklist.c
index 47a945e0c..30aa8adb7 100644
--- a/src/gui/gui-nicklist.c
+++ b/src/gui/gui-nicklist.c
@@ -39,6 +39,7 @@
#include "gui-nicklist.h"
#include "gui-buffer.h"
#include "gui-color.h"
+#include "gui-status.h"
/*
@@ -196,6 +197,7 @@ gui_nicklist_add_group (struct t_gui_buffer *buffer,
{
buffer->nicklist_refresh_needed = 1;
buffer->nicklist_visible_count++;
+ gui_status_refresh_needed = 1;
}
return new_group;
@@ -337,6 +339,7 @@ gui_nicklist_add_nick (struct t_gui_buffer *buffer,
{
buffer->nicklist_refresh_needed = 1;
buffer->nicklist_visible_count++;
+ gui_status_refresh_needed = 1;
}
return new_nick;
@@ -372,6 +375,7 @@ gui_nicklist_remove_nick (struct t_gui_buffer *buffer,
buffer->nicklist_refresh_needed = 1;
if (buffer->nicklist_visible_count > 0)
buffer->nicklist_visible_count--;
+ gui_status_refresh_needed = 1;
}
free (nick);
@@ -427,6 +431,7 @@ gui_nicklist_remove_group (struct t_gui_buffer *buffer,
if (buffer->nicklist_display_groups
&& (buffer->nicklist_visible_count > 0))
buffer->nicklist_visible_count--;
+ gui_status_refresh_needed = 1;
}
free (group);
diff --git a/src/gui/gui-status.c b/src/gui/gui-status.c
new file mode 100644
index 000000000..1347b5bc2
--- /dev/null
+++ b/src/gui/gui-status.c
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2003-2008 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/>.
+ */
+
+/* gui-status.c: status functions, used by all GUI */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+
+int gui_status_refresh_needed = 0; /* refresh needed for status bar ? */
diff --git a/src/gui/gui-status.h b/src/gui/gui-status.h
index 73954b30e..e41b63a7e 100644
--- a/src/gui/gui-status.h
+++ b/src/gui/gui-status.h
@@ -20,10 +20,10 @@
#ifndef __WEECHAT_GUI_STATUS_H
#define __WEECHAT_GUI_STATUS_H 1
-struct t_gui_buffer;
+extern int gui_status_refresh_needed;
/* statusbar functions (GUI dependent) */
-extern void gui_status_draw (struct t_gui_buffer *buffer, int erase);
+extern void gui_status_draw (int erase);
#endif /* gui-status.h */
diff --git a/src/gui/gui-window.c b/src/gui/gui-window.c
index 98568a691..33f8edb66 100644
--- a/src/gui/gui-window.c
+++ b/src/gui/gui-window.c
@@ -47,6 +47,7 @@
int gui_init_ok = 0; /* = 1 if GUI is initialized*/
int gui_ok = 0; /* = 1 if GUI is ok */
/* (0 when size too small) */
+int gui_window_refresh_needed = 0; /* = 1 if refresh needed */
struct t_gui_window *gui_windows = NULL; /* first window */
struct t_gui_window *last_gui_window = NULL; /* last window */
@@ -617,8 +618,8 @@ gui_window_scroll (struct t_gui_window *window, char *scroll)
window->start_line_pos = 0;
window->first_line_displayed =
(window->start_line == window->buffer->lines);
- gui_chat_draw (window->buffer, 1);
- gui_status_draw (window->buffer, 0);
+ window->buffer->chat_refresh_needed = 1;
+ gui_status_refresh_needed = 1;
return;
}
}
@@ -656,8 +657,8 @@ gui_window_search_text (struct t_gui_window *window)
window->start_line_pos = 0;
window->first_line_displayed =
(window->start_line == window->buffer->lines);
- gui_chat_draw (window->buffer, 1);
- gui_status_draw (window->buffer, 1);
+ window->buffer->chat_refresh_needed = 1;
+ gui_status_refresh_needed = 1;
return 1;
}
ptr_line = ptr_line->prev_line;
@@ -681,8 +682,8 @@ gui_window_search_text (struct t_gui_window *window)
window->start_line_pos = 0;
window->first_line_displayed =
(window->start_line == window->buffer->lines);
- gui_chat_draw (window->buffer, 1);
- gui_status_draw (window->buffer, 1);
+ window->buffer->chat_refresh_needed = 1;
+ gui_status_refresh_needed = 1;
return 1;
}
ptr_line = ptr_line->next_line;
@@ -711,8 +712,8 @@ gui_window_search_start (struct t_gui_window *window)
window->buffer->text_search_input =
strdup (window->buffer->input_buffer);
gui_input_delete_line (window->buffer);
- gui_status_draw (window->buffer, 1);
- gui_input_draw (window->buffer, 1);
+ gui_status_refresh_needed = 1;
+ window->buffer->input_refresh_needed = 1;
}
/*
@@ -731,8 +732,8 @@ gui_window_search_restart (struct t_gui_window *window)
window->buffer->text_search_found = 1;
else
{
- gui_chat_draw (window->buffer, 1);
- gui_status_draw (window->buffer, 1);
+ window->buffer->chat_refresh_needed = 1;
+ gui_status_refresh_needed = 1;
}
}
@@ -756,9 +757,9 @@ gui_window_search_stop (struct t_gui_window *window)
window->start_line = NULL;
window->start_line_pos = 0;
gui_hotlist_remove_buffer (window->buffer);
- gui_chat_draw (window->buffer, 0);
- gui_status_draw (window->buffer, 1);
- gui_input_draw (window->buffer, 1);
+ window->buffer->chat_refresh_needed = 1;
+ gui_status_refresh_needed = 1;
+ window->buffer->input_refresh_needed = 1;
}
/*
diff --git a/src/gui/gui-window.h b/src/gui/gui-window.h
index a6df1faeb..83a621e87 100644
--- a/src/gui/gui-window.h
+++ b/src/gui/gui-window.h
@@ -22,6 +22,7 @@
extern int gui_init_ok;
extern int gui_ok;
+extern int gui_window_refresh_needed;
/* window structures */
diff --git a/src/plugins/alias/alias.c b/src/plugins/alias/alias.c
index d34a1bb40..128df444c 100644
--- a/src/plugins/alias/alias.c
+++ b/src/plugins/alias/alias.c
@@ -707,7 +707,7 @@ alias_completion_cb (void *data, char *completion, struct t_gui_buffer *buffer,
for (ptr_alias = alias_list; ptr_alias;
ptr_alias = ptr_alias->next_alias)
{
- weechat_list_add (list, ptr_alias->name, "sort");
+ weechat_list_add (list, ptr_alias->name, WEECHAT_LIST_POS_SORT);
}
return WEECHAT_RC_OK;
diff --git a/src/plugins/irc/irc-channel.c b/src/plugins/irc/irc-channel.c
index 81d119d15..d501aa8d5 100644
--- a/src/plugins/irc/irc-channel.c
+++ b/src/plugins/irc/irc-channel.c
@@ -469,7 +469,7 @@ irc_channel_add_nick_speaking (struct t_irc_channel *channel, char *nick)
if (!channel->nicks_speaking)
channel->nicks_speaking = weechat_list_new ();
- weechat_list_add (channel->nicks_speaking, nick, "end");
+ weechat_list_add (channel->nicks_speaking, nick, WEECHAT_LIST_POS_END);
size = weechat_list_size (channel->nicks_speaking);
if (size > IRC_CHANNEL_NICKS_SPEAKING_LIMIT)
diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c
index aefbc5d3a..0bb4ad114 100644
--- a/src/plugins/irc/irc-command.c
+++ b/src/plugins/irc/irc-command.c
@@ -156,7 +156,7 @@ irc_command_ame (void *data, struct t_gui_buffer *buffer, int argc,
if (argc > 1)
{
- //gui_add_hotlist = 0;
+ weechat_buffer_set (NULL, "hotlist", "-");
for (ptr_server = irc_servers; ptr_server;
ptr_server = ptr_server->next_server)
{
@@ -171,7 +171,7 @@ irc_command_ame (void *data, struct t_gui_buffer *buffer, int argc,
}
}
}
- //gui_add_hotlist = 1;
+ weechat_buffer_set (NULL, "hotlist", "+");
}
return WEECHAT_RC_OK;
}
@@ -196,7 +196,7 @@ irc_command_amsg (void *data, struct t_gui_buffer *buffer, int argc,
if (argc > 1)
{
- //gui_add_hotlist = 0;
+ weechat_buffer_set (NULL, "hotlist", "-");
for (ptr_server = irc_servers; ptr_server;
ptr_server = ptr_server->next_server)
{
@@ -236,7 +236,7 @@ irc_command_amsg (void *data, struct t_gui_buffer *buffer, int argc,
}
}
}
- //gui_add_hotlist = 1;
+ weechat_buffer_set (NULL, "hotlist", "+");
}
else
return WEECHAT_RC_ERROR;
@@ -387,7 +387,7 @@ irc_command_away (void *data, struct t_gui_buffer *buffer, int argc,
(void) data;
(void) argv;
- //gui_add_hotlist = 0;
+ weechat_buffer_set (NULL, "hotlist", "-");
if ((argc > 2) && (weechat_strcasecmp (argv[1], "-all") == 0))
{
for (ptr_server = irc_servers; ptr_server;
@@ -400,8 +400,8 @@ irc_command_away (void *data, struct t_gui_buffer *buffer, int argc,
else
irc_command_away_server (ptr_server, argv_eol[1]);
- //gui_status_draw (window->buffer, 1);
- //gui_add_hotlist = 1;
+ weechat_buffer_set (NULL, "hotlist", "+");
+
return WEECHAT_RC_OK;
}
diff --git a/src/plugins/irc/irc-completion.c b/src/plugins/irc/irc-completion.c
index 114a02a27..b86cc6440 100644
--- a/src/plugins/irc/irc-completion.c
+++ b/src/plugins/irc/irc-completion.c
@@ -50,7 +50,7 @@ irc_completion_server_cb (void *data, char *completion,
(void) completion;
if (ptr_server)
- weechat_list_add (list, ptr_server->name, "sort");
+ weechat_list_add (list, ptr_server->name, WEECHAT_LIST_POS_SORT);
return WEECHAT_RC_OK;
}
@@ -90,7 +90,8 @@ irc_completion_server_nicks_cb (void *data, char *completion,
for (ptr_nick = ptr_channel2->nicks; ptr_nick;
ptr_nick = ptr_nick->next_nick)
{
- weechat_list_add (list, ptr_nick->name, "sort");
+ weechat_list_add (list, ptr_nick->name,
+ WEECHAT_LIST_POS_SORT);
}
}
}
@@ -102,12 +103,13 @@ irc_completion_server_nicks_cb (void *data, char *completion,
for (ptr_nick = ptr_channel->nicks; ptr_nick;
ptr_nick = ptr_nick->next_nick)
{
- weechat_list_add (list, ptr_nick->name, "beginning");
+ weechat_list_add (list, ptr_nick->name,
+ WEECHAT_LIST_POS_BEGINNING);
}
}
/* add self nick at the end */
- weechat_list_add (list, ptr_server->nick, "end");
+ weechat_list_add (list, ptr_server->nick, WEECHAT_LIST_POS_END);
}
return WEECHAT_RC_OK;
@@ -131,7 +133,7 @@ irc_completion_servers_cb (void *data, char *completion,
for (ptr_server = irc_servers; ptr_server;
ptr_server = ptr_server->next_server)
{
- weechat_list_add (list, ptr_server->name, "sort");
+ weechat_list_add (list, ptr_server->name, WEECHAT_LIST_POS_SORT);
}
return WEECHAT_RC_OK;
@@ -152,7 +154,7 @@ irc_completion_channel_cb (void *data, char *completion,
(void) completion;
if (ptr_channel)
- weechat_list_add (list, ptr_channel->name, "sort");
+ weechat_list_add (list, ptr_channel->name, WEECHAT_LIST_POS_SORT);
return WEECHAT_RC_OK;
}
@@ -184,7 +186,8 @@ irc_completion_channel_nicks_cb (void *data, char *completion,
for (ptr_nick = ptr_channel->nicks; ptr_nick;
ptr_nick = ptr_nick->next_nick)
{
- weechat_list_add (list, ptr_nick->name, "sort");
+ weechat_list_add (list, ptr_nick->name,
+ WEECHAT_LIST_POS_SORT);
}
/* add nicks speaking recently on this channel */
@@ -196,18 +199,19 @@ irc_completion_channel_nicks_cb (void *data, char *completion,
nick = weechat_list_string (weechat_list_get (ptr_channel->nicks_speaking, i));
if (nick && irc_nick_search (ptr_channel, nick))
{
- weechat_list_add (list, nick, "beginning");
+ weechat_list_add (list, nick,
+ WEECHAT_LIST_POS_BEGINNING);
}
}
}
/* add self nick at the end */
- weechat_list_add (list, ptr_server->nick, "end");
+ weechat_list_add (list, ptr_server->nick, WEECHAT_LIST_POS_END);
}
if ((ptr_channel->type == IRC_CHANNEL_TYPE_PRIVATE)
|| (ptr_channel->type == IRC_CHANNEL_TYPE_DCC_CHAT))
{
- weechat_list_add (list, ptr_channel->name, "sort");
+ weechat_list_add (list, ptr_channel->name, WEECHAT_LIST_POS_SORT);
}
}
@@ -241,7 +245,7 @@ irc_completion_channel_nicks_hosts_cb (void *data, char *completion,
for (ptr_nick = ptr_channel->nicks; ptr_nick;
ptr_nick = ptr_nick->next_nick)
{
- weechat_list_add (list, ptr_nick->name, "sort");
+ weechat_list_add (list, ptr_nick->name, WEECHAT_LIST_POS_SORT);
if (ptr_nick->host)
{
length = strlen (ptr_nick->name) + 1 +
@@ -251,7 +255,7 @@ irc_completion_channel_nicks_hosts_cb (void *data, char *completion,
{
snprintf (buf, length, "%s!%s",
ptr_nick->name, ptr_nick->host);
- weechat_list_add (list, buf, "sort");
+ weechat_list_add (list, buf, WEECHAT_LIST_POS_SORT);
free (buf);
}
}
@@ -260,7 +264,8 @@ irc_completion_channel_nicks_hosts_cb (void *data, char *completion,
if ((ptr_channel->type == IRC_CHANNEL_TYPE_PRIVATE)
|| (ptr_channel->type == IRC_CHANNEL_TYPE_DCC_CHAT))
{
- weechat_list_add (list, ptr_channel->name, "sort");
+ weechat_list_add (list, ptr_channel->name,
+ WEECHAT_LIST_POS_SORT);
}
}
@@ -285,7 +290,7 @@ irc_completion_channel_topic_cb (void *data, char *completion,
if (ptr_channel && ptr_channel->topic && ptr_channel->topic[0])
{
- weechat_list_add (list, ptr_channel->topic, "sort");
+ weechat_list_add (list, ptr_channel->topic, WEECHAT_LIST_POS_SORT);
}
return WEECHAT_RC_OK;
@@ -313,7 +318,7 @@ irc_completion_channels_cb (void *data, char *completion,
for (ptr_channel = ptr_server->channels; ptr_channel;
ptr_channel = ptr_channel->next_channel)
{
- weechat_list_add (list, ptr_channel->name, "sort");
+ weechat_list_add (list, ptr_channel->name, WEECHAT_LIST_POS_SORT);
}
}
@@ -338,7 +343,7 @@ irc_completion_msg_part_cb (void *data, char *completion,
{
weechat_list_add (list,
weechat_config_string (irc_config_irc_default_msg_part),
- "sort");
+ WEECHAT_LIST_POS_SORT);
}
return WEECHAT_RC_OK;
diff --git a/src/plugins/irc/irc-dcc.c b/src/plugins/irc/irc-dcc.c
index 86817fb35..e8157ae18 100644
--- a/src/plugins/irc/irc-dcc.c
+++ b/src/plugins/irc/irc-dcc.c
@@ -57,19 +57,13 @@ char *irc_dcc_status_string[] = /* strings for DCC status */
*/
void
-irc_dcc_redraw (int highlight)
+irc_dcc_redraw (char *hotlist)
{
- (void) highlight;
- /*struct t_gui_buffer *ptr_buffer;
-
- ptr_buffer = gui_buffer_get_dcc (gui_current_window);
- gui_window_redraw_buffer (ptr_buffer);
- if (highlight && gui_add_hotlist && (ptr_buffer->num_displayed == 0))
- {
- gui_hotlist_add (highlight, NULL, ptr_buffer, 0);
- gui_status_draw (gui_current_window->buffer, 0);
- }
- */
+ struct t_gui_buffer *ptr_buffer;
+
+ ptr_buffer = weechat_buffer_search ("irc", "<dcc>");
+ if (ptr_buffer && hotlist)
+ weechat_buffer_set (ptr_buffer, "hotlist", hotlist);
}
/*
@@ -208,7 +202,7 @@ irc_dcc_find_filename (struct t_irc_dcc *ptr_dcc)
if (!irc_cfg_dcc_auto_rename)
{
irc_dcc_close (ptr_dcc, IRC_DCC_FAILED);
- irc_dcc_redraw (GUI_HOTLIST_MSG);
+ irc_dcc_redraw (WEECHAT_HOTLIST_MSG);
return;
}
@@ -216,7 +210,7 @@ irc_dcc_find_filename (struct t_irc_dcc *ptr_dcc)
if (!filename2)
{
irc_dcc_close (ptr_dcc, IRC_DCC_FAILED);
- irc_dcc_redraw (GUI_HOTLIST_MSG);
+ irc_dcc_redraw (WEECHAT_HOTLIST_MESSAGE);
return;
}
ptr_dcc->filename_suffix = 0;
@@ -562,7 +556,7 @@ irc_dcc_channel_for_chat (struct t_irc_dcc *dcc)
"DCC CHAT?)\n"),
WEECHAT_ERROR);
irc_dcc_close (dcc, IRC_DCC_FAILED);
- irc_dcc_redraw (GUI_HOTLIST_MSG);
+ irc_dcc_redraw (WEECHAT_HOTLIST_MESSAGE);
return;
}
@@ -611,7 +605,7 @@ irc_dcc_recv_connect_init (struct t_irc_dcc *dcc)
if (!irc_dcc_connect (dcc))
{
irc_dcc_close (dcc, IRC_DCC_FAILED);
- irc_dcc_redraw (GUI_HOTLIST_MSG);
+ irc_dcc_redraw (WEECHAT_HOTLIST_MESSAGE);
}
else
{
@@ -628,7 +622,7 @@ irc_dcc_recv_connect_init (struct t_irc_dcc *dcc)
irc_dcc_channel_for_chat (dcc);
}
}
- irc_dcc_redraw (GUI_HOTLIST_MSG);
+ irc_dcc_redraw (WEECHAT_HOTLIST_MESSAGE);
}
/*
@@ -647,7 +641,7 @@ irc_dcc_accept (struct t_irc_dcc *dcc)
"PRIVMSG %s :\01DCC RESUME %s %d %u\01",
dcc->nick, dcc->filename,
dcc->port, dcc->start_resume);
- irc_dcc_redraw (GUI_HOTLIST_MSG);
+ irc_dcc_redraw (WEECHAT_HOTLIST_MESSAGE);
}
else
irc_dcc_recv_connect_init (dcc);
@@ -684,7 +678,7 @@ irc_dcc_accept_resume (struct t_irc_server *server, char *filename, int port,
ptr_dcc->filename,
GUI_COLOR(GUI_COLOR_CHAT),
ptr_dcc->start_resume);
- irc_dcc_redraw (GUI_HOTLIST_MSG);
+ irc_dcc_redraw (WEECHAT_HOTLIST_MESSAGE);
}
else
gui_chat_printf (server->buffer,
@@ -854,7 +848,7 @@ irc_dcc_add (struct t_irc_server *server, int type, unsigned long addr, int port
GUI_COLOR(GUI_COLOR_CHAT_CHANNEL),
size,
GUI_COLOR(GUI_COLOR_CHAT));
- irc_dcc_redraw (GUI_HOTLIST_MSG);
+ irc_dcc_redraw (WEECHAT_HOTLIST_MESSAGE);
}
if (type == IRC_DCC_FILE_SEND)
{
@@ -873,7 +867,7 @@ irc_dcc_add (struct t_irc_server *server, int type, unsigned long addr, int port
GUI_COLOR(GUI_COLOR_CHAT_CHANNEL),
size,
GUI_COLOR(GUI_COLOR_CHAT));
- irc_dcc_redraw (GUI_HOTLIST_MSG);
+ irc_dcc_redraw (WEECHAT_HOTLIST_MESSAGE);
}
if (type == IRC_DCC_CHAT_RECV)
{
@@ -889,7 +883,7 @@ irc_dcc_add (struct t_irc_server *server, int type, unsigned long addr, int port
(addr >> 8) & 0xff,
addr & 0xff,
GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS));
- irc_dcc_redraw (GUI_HOTLIST_MSG);
+ irc_dcc_redraw (WEECHAT_HOTLIST_MESSAGE);
}
if (type == IRC_DCC_CHAT_SEND)
{
@@ -897,13 +891,13 @@ irc_dcc_add (struct t_irc_server *server, int type, unsigned long addr, int port
_("Sending DCC chat request to %s%s\n"),
GUI_COLOR(GUI_COLOR_CHAT_NICK),
nick);
- irc_dcc_redraw (GUI_HOTLIST_MSG);
+ irc_dcc_redraw (WEECHAT_HOTLIST_MESSAGE);
}
if (IRC_DCC_IS_FILE(type) && (!new_dcc->local_filename))
{
irc_dcc_close (new_dcc, IRC_DCC_FAILED);
- irc_dcc_redraw (GUI_HOTLIST_MSG);
+ irc_dcc_redraw (WEECHAT_HOTLIST_MESSAGE);
return NULL;
}
@@ -919,7 +913,7 @@ irc_dcc_add (struct t_irc_server *server, int type, unsigned long addr, int port
new_dcc->local_filename,
GUI_COLOR(GUI_COLOR_CHAT),
new_dcc->start_resume);
- irc_dcc_redraw (GUI_HOTLIST_MSG);
+ irc_dcc_redraw (WEECHAT_HOTLIST_MESSAGE);
}
/* connect if needed and redraw DCC buffer */
@@ -928,7 +922,7 @@ irc_dcc_add (struct t_irc_server *server, int type, unsigned long addr, int port
if (!irc_dcc_connect (new_dcc))
{
irc_dcc_close (new_dcc, IRC_DCC_FAILED);
- irc_dcc_redraw (GUI_HOTLIST_MSG);
+ irc_dcc_redraw (WEECHAT_HOTLIST_MESSAGE);
return NULL;
}
}
@@ -937,7 +931,7 @@ irc_dcc_add (struct t_irc_server *server, int type, unsigned long addr, int port
|| ( (type == IRC_DCC_FILE_RECV) && (irc_cfg_dcc_auto_accept_files) ) )
irc_dcc_accept (new_dcc);
else
- irc_dcc_redraw (GUI_HOTLIST_PRIVATE);
+ irc_dcc_redraw (WEECHAT_HOTLIST_PRIVATE);
gui_status_draw (gui_current_window->buffer, 0);
return new_dcc;
@@ -1350,7 +1344,7 @@ irc_dcc_chat_recv (struct t_irc_dcc *dcc)
else
{
irc_dcc_close (dcc, IRC_DCC_ABORTED);
- irc_dcc_redraw (GUI_HOTLIST_MSG);
+ irc_dcc_redraw (WEECHAT_HOTLIST_MESSAGE);
}
}
@@ -1370,7 +1364,7 @@ irc_dcc_file_create_pipe (struct t_irc_dcc *dcc)
_("%s DCC: unable to create pipe\n"),
WEECHAT_ERROR);
irc_dcc_close (dcc, IRC_DCC_FAILED);
- irc_dcc_redraw (GUI_HOTLIST_MSG);
+ irc_dcc_redraw (WEECHAT_HOTLIST_MESSAGE);
return 0;
}
@@ -1640,18 +1634,18 @@ irc_dcc_file_child_read (struct t_irc_dcc *dcc)
dcc->status = IRC_DCC_ACTIVE;
dcc->start_transfer = time (NULL);
dcc->last_check_time = time (NULL);
- irc_dcc_redraw (GUI_HOTLIST_MSG);
+ irc_dcc_redraw (WEECHAT_HOTLIST_MESSAGE);
}
else
- irc_dcc_redraw (GUI_HOTLIST_LOW);
+ irc_dcc_redraw (WEECHAT_HOTLIST_LOW);
break;
case IRC_DCC_DONE:
irc_dcc_close (dcc, IRC_DCC_DONE);
- irc_dcc_redraw (GUI_HOTLIST_MSG);
+ irc_dcc_redraw (WEECHAT_HOTLIST_MESSAGE);
break;
case IRC_DCC_FAILED:
irc_dcc_close (dcc, IRC_DCC_FAILED);
- irc_dcc_redraw (GUI_HOTLIST_MSG);
+ irc_dcc_redraw (WEECHAT_HOTLIST_MESSAGE);
break;
}
}
@@ -1679,7 +1673,7 @@ irc_dcc_file_send_fork (struct t_irc_dcc *dcc)
_("%s DCC: unable to fork\n"),
WEECHAT_ERROR);
irc_dcc_close (dcc, IRC_DCC_FAILED);
- irc_dcc_redraw (GUI_HOTLIST_MSG);
+ irc_dcc_redraw (WEECHAT_HOTLIST_MESSAGE);
return;
/* child process */
case 0:
@@ -1720,7 +1714,7 @@ irc_dcc_file_recv_fork (struct t_irc_dcc *dcc)
_("%s DCC: unable to fork\n"),
WEECHAT_ERROR);
irc_dcc_close (dcc, IRC_DCC_FAILED);
- irc_dcc_redraw (GUI_HOTLIST_MSG);
+ irc_dcc_redraw (WEECHAT_HOTLIST_MESSAGE);
return;
/* child process */
case 0:
@@ -1759,7 +1753,7 @@ irc_dcc_handle ()
_("%s DCC: timeout\n"),
WEECHAT_ERROR);
irc_dcc_close (dcc, IRC_DCC_FAILED);
- irc_dcc_redraw (GUI_HOTLIST_MSG);
+ irc_dcc_redraw (WEECHAT_HOTLIST_MESSAGE);
continue;
}
}
@@ -1792,7 +1786,7 @@ irc_dcc_handle ()
"sending file\n"),
WEECHAT_ERROR);
irc_dcc_close (dcc, IRC_DCC_FAILED);
- irc_dcc_redraw (GUI_HOTLIST_MSG);
+ irc_dcc_redraw (WEECHAT_HOTLIST_MESSAGE);
continue;
}
dcc->sock = sock;
@@ -1804,13 +1798,13 @@ irc_dcc_handle ()
"socket\n"),
WEECHAT_ERROR);
irc_dcc_close (dcc, IRC_DCC_FAILED);
- irc_dcc_redraw (GUI_HOTLIST_MSG);
+ irc_dcc_redraw (WEECHAT_HOTLIST_MESSAGE);
continue;
}
dcc->addr = ntohl (addr.sin_addr.s_addr);
dcc->status = IRC_DCC_ACTIVE;
dcc->start_transfer = time (NULL);
- irc_dcc_redraw (GUI_HOTLIST_MSG);
+ irc_dcc_redraw (WEECHAT_HOTLIST_MESSAGE);
irc_dcc_file_send_fork (dcc);
}
}
@@ -1843,19 +1837,19 @@ irc_dcc_handle ()
if (sock < 0)
{
irc_dcc_close (dcc, IRC_DCC_FAILED);
- irc_dcc_redraw (GUI_HOTLIST_MSG);
+ irc_dcc_redraw (WEECHAT_HOTLIST_MESSAGE);
continue;
}
dcc->sock = sock;
if (fcntl (dcc->sock, F_SETFL, O_NONBLOCK) == -1)
{
irc_dcc_close (dcc, IRC_DCC_FAILED);
- irc_dcc_redraw (GUI_HOTLIST_MSG);
+ irc_dcc_redraw (WEECHAT_HOTLIST_MESSAGE);
continue;
}
dcc->addr = ntohl (addr.sin_addr.s_addr);
dcc->status = IRC_DCC_ACTIVE;
- irc_dcc_redraw (GUI_HOTLIST_MSG);
+ irc_dcc_redraw (WEECHAT_HOTLIST_MESSAGE);
irc_dcc_channel_for_chat (dcc);
}
}
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c
index ef2159eee..424b3c0d2 100644
--- a/src/plugins/irc/irc-protocol.c
+++ b/src/plugins/irc/irc-protocol.c
@@ -659,16 +659,8 @@ irc_protocol_cmd_invite (struct t_irc_server *server, int argc, char **argv,
IRC_COLOR_CHAT,
IRC_COLOR_CHAT_NICK,
irc_protocol_get_nick_from_host (argv[0]));
- /*
- if (gui_add_hotlist
- && ((server->buffer->num_displayed == 0)
- || (gui_buffer_is_scrolled (server->buffer))))
- {
- gui_hotlist_add (GUI_HOTLIST_HIGHLIGHT, NULL,
- server->buffer, 0);
- gui_status_draw (gui_current_window->buffer, 1);
- }
- */
+ weechat_buffer_set (server->buffer, "hotlist",
+ WEECHAT_HOTLIST_HIGHLIGHT);
}
else
{
@@ -747,7 +739,7 @@ irc_protocol_cmd_join (struct t_irc_server *server, int argc, char **argv,
{
free (ptr_channel->topic);
ptr_channel->topic = NULL;
- //gui_chat_draw_title (ptr_channel->buffer, 1);
+ weechat_buffer_set (ptr_channel->buffer, "title", NULL);
}
ptr_channel->display_creation_date = 1;
}
@@ -758,10 +750,6 @@ irc_protocol_cmd_join (struct t_irc_server *server, int argc, char **argv,
0, 0, 0, 0, 0, 0, 0);
if (ptr_nick)
ptr_nick->host = strdup (irc_protocol_get_address_from_host (argv[0]));
-
- /* redraw nicklist and status bar */
- //gui_nicklist_draw (ptr_channel->buffer, 1, 1);
- //gui_status_draw (ptr_channel->buffer, 1);
return WEECHAT_RC_OK;
}
@@ -862,8 +850,6 @@ irc_protocol_cmd_kick (struct t_irc_server *server, char *irc_message, char *hos
/* my nick was kicked => free all nicks, channel is not active any
more */
irc_nick_free_all (ptr_channel);
- //gui_nicklist_draw (ptr_channel->buffer, 1, 1);
- //gui_status_draw (ptr_channel->buffer, 1);
if (server->autorejoin)
irc_command_join_server (server, ptr_channel->name);
}
@@ -873,11 +859,7 @@ irc_protocol_cmd_kick (struct t_irc_server *server, char *irc_message, char *hos
nick */
ptr_nick = irc_nick_search (ptr_channel, pos_nick);
if (ptr_nick)
- {
irc_nick_free (ptr_channel, ptr_nick);
- //gui_nicklist_draw (ptr_channel->buffer, 1, 1);
- //gui_status_draw (ptr_channel->buffer, 1);
- }
}
return WEECHAT_RC_OK;
@@ -1125,8 +1107,11 @@ irc_protocol_cmd_nick (struct t_irc_server *server, char *irc_message, char *hos
if (ptr_nick)
{
nick_is_me = (strcmp (ptr_nick->name, server->nick) == 0) ? 1 : 0;
- //if (nick_is_me)
- // gui_add_hotlist = 0;
+
+ /* temporary disable hotlist */
+ weechat_buffer_set (NULL, "hotlist", "-");
+
+ /* change nick and display message on all channels */
irc_nick_change (server, ptr_channel, ptr_nick, arguments);
if (!ignore)
{
@@ -1146,8 +1131,9 @@ irc_protocol_cmd_nick (struct t_irc_server *server, char *irc_message, char *hos
IRC_COLOR_CHAT_NICK,
arguments);
}
- //gui_nicklist_draw (ptr_channel->buffer, 1, 1);
- //gui_add_hotlist = 1;
+
+ /* enable hotlist */
+ weechat_buffer_set (NULL, "hotlist", "+");
}
break;
}
@@ -1157,21 +1143,13 @@ irc_protocol_cmd_nick (struct t_irc_server *server, char *irc_message, char *hos
{
free (server->nick);
server->nick = strdup (arguments);
- /*
- gui_status_draw (gui_current_window->buffer, 1);
- for (ptr_window = gui_windows; ptr_window;
- ptr_window = ptr_window->next_window)
+
+ for (ptr_channel = server->channels; ptr_channel;
+ ptr_channel = ptr_channel->next_channel)
{
- if ((ptr_window->buffer->protocol == irc_protocol)
- && (IRC_BUFFER_SERVER(ptr_window->buffer) == server))
- gui_input_draw (ptr_window->buffer, 1);
+ weechat_buffer_set (ptr_channel->buffer, "nick",
+ server->nick);
}
- */
- }
- else
- {
- //gui_status_draw (gui_current_window->buffer, 1);
- //gui_input_draw (gui_current_window->buffer, 1);
}
return WEECHAT_RC_OK;
@@ -1368,20 +1346,14 @@ irc_protocol_cmd_notice (struct t_irc_server *server, char *irc_message, char *h
weechat_printf (server->buffer, "%s%s",
IRC_COLOR_CHAT,
pos);
-
+
if ((nick)
&& (weechat_strcasecmp (nick, "nickserv") != 0)
&& (weechat_strcasecmp (nick, "chanserv") != 0)
&& (weechat_strcasecmp (nick, "memoserv") != 0))
{
- //if (gui_add_hotlist
- // && ((server->buffer->num_displayed == 0)
- // || (gui_buffer_is_scrolled (server->buffer))))
- //{
- // gui_hotlist_add (GUI_HOTLIST_PRIVATE, NULL,
- // server->buffer, 0);
- // gui_status_draw (gui_current_window->buffer, 1);
- //}
+ weechat_buffer_set (server->buffer, "hotlist",
+ WEECHAT_HOTLIST_PRIVATE);
}
}
}
@@ -1516,13 +1488,6 @@ irc_protocol_cmd_part (struct t_irc_server *server, char *irc_message, char *hos
}
else
irc_nick_free (ptr_channel, ptr_nick);
-
- if (ptr_channel)
- {
- //gui_nicklist_draw (ptr_channel->buffer, 1, 1);
- //gui_status_draw (ptr_channel->buffer, 1);
- }
- //gui_input_draw (gui_current_window->buffer, 1);
}
}
else
@@ -1893,6 +1858,8 @@ irc_protocol_cmd_privmsg (struct t_irc_server *server, char *irc_message, char *
ptr_channel->name,
nick,
pos);
+ weechat_buffer_set (ptr_channel->buffer, "hotlist",
+ WEECHAT_HOTLIST_HIGHLIGHT);
//(void) plugin_msg_handler_exec (server->name,
// "weechat_highlight",
// irc_message);
@@ -1905,6 +1872,8 @@ irc_protocol_cmd_privmsg (struct t_irc_server *server, char *irc_message, char *
(ptr_nick) ? NULL : nick,
NULL),
pos);
+ weechat_buffer_set (ptr_channel->buffer, "hotlist",
+ WEECHAT_HOTLIST_MESSAGE);
}
irc_channel_add_nick_speaking (ptr_channel, nick);
}
@@ -2306,6 +2275,8 @@ irc_protocol_cmd_privmsg (struct t_irc_server *server, char *irc_message, char *
//(void) plugin_msg_handler_exec (server->name,
// "weechat_highlight",
// irc_message);
+ weechat_buffer_set (ptr_channel->buffer, "hotlist",
+ WEECHAT_HOTLIST_HIGHLIGHT);
}
else
{
@@ -2319,6 +2290,8 @@ irc_protocol_cmd_privmsg (struct t_irc_server *server, char *irc_message, char *
//(void) plugin_msg_handler_exec (server->name,
// "weechat_pv",
// irc_message);
+ weechat_buffer_set (ptr_channel->buffer, "hotlist",
+ WEECHAT_HOTLIST_MESSAGE);
}
}
}
@@ -2394,7 +2367,8 @@ irc_protocol_cmd_privmsg (struct t_irc_server *server, char *irc_message, char *
if (!ptr_channel->topic)
{
ptr_channel->topic = strdup (host2);
- //gui_chat_draw_title (ptr_channel->buffer, 1);
+ weechat_buffer_set (ptr_channel->buffer, "title",
+ ptr_channel->topic);
}
if (highlight || irc_protocol_is_highlight (pos, server->nick))
@@ -2505,8 +2479,6 @@ irc_protocol_cmd_quit (struct t_irc_server *server, char *irc_message, char *hos
arguments,
IRC_COLOR_CHAT_DELIMITERS);
}
- //gui_nicklist_draw (ptr_channel->buffer, 1, 1);
- //gui_status_draw (ptr_channel->buffer, 1);
}
}
@@ -2678,7 +2650,7 @@ irc_protocol_cmd_topic (struct t_irc_server *server, char *irc_message, char *ho
ptr_channel->topic = strdup (pos);
else
ptr_channel->topic = strdup ("");
- //gui_chat_draw_title (ptr_channel->buffer, 1);
+ weechat_buffer_set (ptr_channel->buffer, "title", ptr_channel->topic);
}
return WEECHAT_RC_OK;
@@ -2778,9 +2750,6 @@ irc_protocol_cmd_001 (struct t_irc_server *server, char *irc_message, char *host
else
irc_server_autojoin_channels (server);
- //gui_status_draw (server->buffer, 1);
- //gui_input_draw (server->buffer, 1);
-
return WEECHAT_RC_OK;
}
@@ -4328,7 +4297,6 @@ irc_protocol_cmd_341 (struct t_irc_server *server, char *irc_message, char *host
IRC_COLOR_CHAT,
IRC_COLOR_CHAT_CHANNEL,
pos_channel);
- //gui_status_draw (gui_current_window->buffer, 1);
}
}
else
diff --git a/src/plugins/weechat-plugin.h b/src/plugins/weechat-plugin.h
index 4d688ac51..5fe6c9c52 100644
--- a/src/plugins/weechat-plugin.h
+++ b/src/plugins/weechat-plugin.h
@@ -52,9 +52,16 @@ struct t_weelist;
#define WEECHAT_RC_WITH_HIGHLIGHT 4 /* ok and ask for highlight */
/* (for message handler only) */
-#define WEELIST_POS_SORT "sort"
-#define WEELIST_POS_BEGINNING "beginning"
-#define WEELIST_POS_END "end"
+/* list management (order of elements) */
+#define WEECHAT_LIST_POS_SORT "sort"
+#define WEECHAT_LIST_POS_BEGINNING "beginning"
+#define WEECHAT_LIST_POS_END "end"
+
+/* buffer hotlist */
+#define WEECHAT_HOTLIST_LOW "0"
+#define WEECHAT_HOTLIST_MESSAGE "1"
+#define WEECHAT_HOTLIST_PRIVATE "2"
+#define WEECHAT_HOTLIST_HIGHLIGHT "3"
struct t_weechat_plugin
{