summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/de/weechat_user.de.txt4
-rw-r--r--doc/en/weechat_user.en.txt3
-rw-r--r--doc/fr/weechat_user.fr.txt3
-rw-r--r--doc/it/weechat_user.it.txt4
-rw-r--r--doc/weechat-curses.14
-rw-r--r--po/cs.po17
-rw-r--r--po/de.po17
-rw-r--r--po/es.po17
-rw-r--r--po/fr.po18
-rw-r--r--po/hu.po16
-rw-r--r--po/it.po17
-rw-r--r--po/pl.po17
-rw-r--r--po/pt_BR.po17
-rw-r--r--po/ru.po16
-rw-r--r--po/weechat.pot15
-rw-r--r--src/core/weechat.c9
-rw-r--r--src/gui/curses/gui-curses-color.c69
-rw-r--r--src/gui/gtk/gui-gtk-color.c12
-rw-r--r--src/gui/gui-color.h1
19 files changed, 234 insertions, 42 deletions
diff --git a/doc/de/weechat_user.de.txt b/doc/de/weechat_user.de.txt
index 77d5be50b..64d27fb58 100644
--- a/doc/de/weechat_user.de.txt
+++ b/doc/de/weechat_user.de.txt
@@ -281,6 +281,10 @@ Befehlszeile:
-a, --no-connect::
deaktiviert das automatische Verbinden mit den Servern beim Start von WeeChat
+// TRANSLATION MISSING
+-c, --colors::
+ Display default colors in terminal
+
-d, --dir 'path'::
legt den Konfigurationsordner für WeeChat fest (Voreinstellung: ~/.weechat) in
dem die Erweiterungen, Skripten, Protokolldateien etc.pp. gesichert werden.
diff --git a/doc/en/weechat_user.en.txt b/doc/en/weechat_user.en.txt
index bd47d4017..f8c9e3f4d 100644
--- a/doc/en/weechat_user.en.txt
+++ b/doc/en/weechat_user.en.txt
@@ -283,6 +283,9 @@ Command line arguments:
-a, --no-connect::
Disable auto-connect to servers when WeeChat is starting
+-c, --colors::
+ Display default colors in terminal
+
-d, --dir 'path'::
Set path as home for WeeChat (used for configuration files, logs, user
plugins and scripts), default value is '~/.weechat' (note: directory is
diff --git a/doc/fr/weechat_user.fr.txt b/doc/fr/weechat_user.fr.txt
index ec35c7a47..7c622116f 100644
--- a/doc/fr/weechat_user.fr.txt
+++ b/doc/fr/weechat_user.fr.txt
@@ -289,6 +289,9 @@ Paramètres de ligne de commande :
-a, --no-connect::
Supprimer la connexion automatique aux serveurs lors du démarrage
+-c, --colors::
+ Afficher les couleurs par défaut du terminal
+
-d, --dir 'path'::
Définir le répertoire comme étant la base de WeeChat
(utilisé pour les fichiers de configuration, logs, extensions
diff --git a/doc/it/weechat_user.it.txt b/doc/it/weechat_user.it.txt
index 4a6f48046..a58227ece 100644
--- a/doc/it/weechat_user.it.txt
+++ b/doc/it/weechat_user.it.txt
@@ -290,6 +290,10 @@ Argomenti a riga di comando:
-a, --no-connect::
Disabilita la connessione automatica ai server all'avvio di WeeChat
+// TRANSLATION MISSING
+-c, --colors::
+ Display default colors in terminal
+
-d, --dir 'path'::
Imposta una cartella come home per WeeChat (utilizzata per i file di
configurazione, log, plugin e script dell'utente), il valore predefinito
diff --git a/doc/weechat-curses.1 b/doc/weechat-curses.1
index 99fba44cd..e5565085d 100644
--- a/doc/weechat-curses.1
+++ b/doc/weechat-curses.1
@@ -23,6 +23,10 @@ It is compliant with IRC RFCs 1459, 2810, 2811, 2812, and 2813.
.br
disable auto-connect to servers at startup
.TP
+.B \-c, \-\-colors
+.br
+display default colors in terminal
+.TP
.B \-d, \-\-dir <dir>
.br
set WeeChat home dir
diff --git a/po/cs.po b/po/cs.po
index 761abdb30..2ddc46b61 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-12-09 22:59+0100\n"
+"POT-Creation-Date: 2010-12-17 12:25+0100\n"
"PO-Revision-Date: 2010-11-06 11:55+0100\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -43,8 +43,10 @@ msgstr ""
msgid "Usage: %s [option...] [plugin:option...]\n"
msgstr "Použití: %s [volba...] [plugin:volba...]\n"
+#, fuzzy
msgid ""
" -a, --no-connect disable auto-connect to servers at startup\n"
+" -c, --colors display default colors in terminal\n"
" -d, --dir <path> set WeeChat home directory (default: ~/.weechat)\n"
" -h, --help this help\n"
" -k, --keys display WeeChat default keys\n"
@@ -2527,6 +2529,16 @@ msgstr ""
"čtení - špatný podpis (formát aktualizačního souboru se mohl změnit od "
"poslední verze)"
+msgid "Terminal infos:"
+msgstr "Informace o terminálu:"
+
+msgid "No color support in terminal."
+msgstr ""
+
+#, fuzzy
+msgid "Default colors:"
+msgstr "Výchozí klávesové zkratky obnoveny"
+
msgid "Terminal lost, exiting WeeChat..."
msgstr "Terminál ztracen, ukončuji WeeChat..."
@@ -2537,9 +2549,6 @@ msgstr "Obdržen signál %s, ukončuji WeeChat.."
msgid "Signal SIGHUP received, reloading configuration files"
msgstr "Obdržen signál SIGHUP, znovunačítám konfigurační soubory"
-msgid "Terminal infos:"
-msgstr "Informace o terminálu:"
-
#, c-format
msgid " TERM='%s', size: %dx%d"
msgstr " TERM='%s', velikost: %dx%d"
diff --git a/po/de.po b/po/de.po
index 20b0d52e7..6d976fade 100644
--- a/po/de.po
+++ b/po/de.po
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.3-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-12-09 22:59+0100\n"
+"POT-Creation-Date: 2010-12-17 12:25+0100\n"
"PO-Revision-Date: 2010-12-07 23:21+0100\n"
"Last-Translator: Nils G.\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -47,8 +47,10 @@ msgstr ""
msgid "Usage: %s [option...] [plugin:option...]\n"
msgstr "Aufruf: %s [Option...] [Erweiterung:Option...]\n"
+#, fuzzy
msgid ""
" -a, --no-connect disable auto-connect to servers at startup\n"
+" -c, --colors display default colors in terminal\n"
" -d, --dir <path> set WeeChat home directory (default: ~/.weechat)\n"
" -h, --help this help\n"
" -k, --keys display WeeChat default keys\n"
@@ -2637,6 +2639,16 @@ msgstr ""
"lese - falsche Signatur (das Dateiformat wurde vermutlich seit der letzten "
"Version verändern)"
+msgid "Terminal infos:"
+msgstr "Terminal Informationen:"
+
+msgid "No color support in terminal."
+msgstr ""
+
+#, fuzzy
+msgid "Default colors:"
+msgstr "Standard rmodifier:"
+
msgid "Terminal lost, exiting WeeChat..."
msgstr "Terminal verloren, beende WeeChat..."
@@ -2647,9 +2659,6 @@ msgstr "Signal %s empfangen, beende WeeChat..."
msgid "Signal SIGHUP received, reloading configuration files"
msgstr "Signal SIGHUP empfangen, lese Konfigurationsdateien neu"
-msgid "Terminal infos:"
-msgstr "Terminal Informationen:"
-
#, c-format
msgid " TERM='%s', size: %dx%d"
msgstr " TERM='%s', Größe: %dx%d"
diff --git a/po/es.po b/po/es.po
index 858f17793..2ebec5471 100644
--- a/po/es.po
+++ b/po/es.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-12-09 22:59+0100\n"
+"POT-Creation-Date: 2010-12-17 12:25+0100\n"
"PO-Revision-Date: 2010-11-06 11:56+0100\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -44,8 +44,10 @@ msgstr ""
msgid "Usage: %s [option...] [plugin:option...]\n"
msgstr "Uso: %s [opción...] [plugin:opción...]\n"
+#, fuzzy
msgid ""
" -a, --no-connect disable auto-connect to servers at startup\n"
+" -c, --colors display default colors in terminal\n"
" -d, --dir <path> set WeeChat home directory (default: ~/.weechat)\n"
" -h, --help this help\n"
" -k, --keys display WeeChat default keys\n"
@@ -2560,6 +2562,16 @@ msgstr ""
"lectura - firma incorrecta (el formato del archivo de actualización puede "
"haber cambiado desde la última versión)"
+msgid "Terminal infos:"
+msgstr "Información de la terminal:"
+
+msgid "No color support in terminal."
+msgstr ""
+
+#, fuzzy
+msgid "Default colors:"
+msgstr "Atajos predefinidos restaurados"
+
msgid "Terminal lost, exiting WeeChat..."
msgstr "Se perdió la terminal, cerrando WeeChat..."
@@ -2570,9 +2582,6 @@ msgstr "Señal %s recibida, cerrando WeeChat..."
msgid "Signal SIGHUP received, reloading configuration files"
msgstr "Señal SIGHUP recibida, recargando archivos de configuración"
-msgid "Terminal infos:"
-msgstr "Información de la terminal:"
-
#, c-format
msgid " TERM='%s', size: %dx%d"
msgstr " TERM='%s', tamaño: %dx%d"
diff --git a/po/fr.po b/po/fr.po
index d831e3ed8..a665fb428 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-12-09 22:59+0100\n"
-"PO-Revision-Date: 2010-12-09 20:22+0100\n"
+"POT-Creation-Date: 2010-12-17 12:25+0100\n"
+"PO-Revision-Date: 2010-12-17 11:58+0100\n"
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: French\n"
@@ -46,6 +46,7 @@ msgstr "Utilisation: %s [option...] [extension:option...]\n"
msgid ""
" -a, --no-connect disable auto-connect to servers at startup\n"
+" -c, --colors display default colors in terminal\n"
" -d, --dir <path> set WeeChat home directory (default: ~/.weechat)\n"
" -h, --help this help\n"
" -k, --keys display WeeChat default keys\n"
@@ -62,6 +63,7 @@ msgid ""
" about possible options)\n"
msgstr ""
" -a, --no-connect désactiver l'auto-connexion aux serveurs au démarrage\n"
+" -c, --colors afficher les couleurs par défaut du terminal\n"
" -d, --dir <rep> définir le répertoire de base pour WeeChat (défaut: ~/."
"weechat)\n"
" -h, --help cette aide\n"
@@ -2598,6 +2600,15 @@ msgstr ""
"lecture - mauvaise signature (le format de fichier upgrade a peut-être "
"changé depuis la dernière version)"
+msgid "Terminal infos:"
+msgstr "Infos sur le terminal:"
+
+msgid "No color support in terminal."
+msgstr "Pas de support pour la couleur dans le terminal."
+
+msgid "Default colors:"
+msgstr "Couleurs par défaut:"
+
msgid "Terminal lost, exiting WeeChat..."
msgstr "Terminal perdu, sortie de WeeChat..."
@@ -2608,9 +2619,6 @@ msgstr "Signal %s reçu, sortie de WeeChat..."
msgid "Signal SIGHUP received, reloading configuration files"
msgstr "Signal SIGHUP reçu, rechargement des fichiers de configuration"
-msgid "Terminal infos:"
-msgstr "Infos sur le terminal:"
-
#, c-format
msgid " TERM='%s', size: %dx%d"
msgstr " TERM='%s', taille: %dx%d"
diff --git a/po/hu.po b/po/hu.po
index da46923ab..c5b68eeec 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-12-09 22:59+0100\n"
+"POT-Creation-Date: 2010-12-17 12:25+0100\n"
"PO-Revision-Date: 2010-11-05 17:17+0100\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -46,6 +46,7 @@ msgstr ""
#, fuzzy
msgid ""
" -a, --no-connect disable auto-connect to servers at startup\n"
+" -c, --colors display default colors in terminal\n"
" -d, --dir <path> set WeeChat home directory (default: ~/.weechat)\n"
" -h, --help this help\n"
" -k, --keys display WeeChat default keys\n"
@@ -2364,6 +2365,16 @@ msgid ""
"version)"
msgstr ""
+msgid "Terminal infos:"
+msgstr ""
+
+msgid "No color support in terminal."
+msgstr ""
+
+#, fuzzy
+msgid "Default colors:"
+msgstr "Alapértelmezett billentyűparancsok visszaállítva\n"
+
msgid "Terminal lost, exiting WeeChat..."
msgstr ""
@@ -2375,9 +2386,6 @@ msgstr ""
msgid "Signal SIGHUP received, reloading configuration files"
msgstr "%s nem sikerült a konfigurációs fájlt elmenteni\n"
-msgid "Terminal infos:"
-msgstr ""
-
#, c-format
msgid " TERM='%s', size: %dx%d"
msgstr ""
diff --git a/po/it.po b/po/it.po
index 28e4a1be7..7f71f58ab 100644
--- a/po/it.po
+++ b/po/it.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-12-11 12:39+0100\n"
+"POT-Creation-Date: 2010-12-17 12:25+0100\n"
"PO-Revision-Date: 2010-12-10 14:11+0100\n"
"Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -43,8 +43,10 @@ msgstr ""
msgid "Usage: %s [option...] [plugin:option...]\n"
msgstr "Utilizzo: %s [opzione...] [plugin:opzione...]\n"
+#, fuzzy
msgid ""
" -a, --no-connect disable auto-connect to servers at startup\n"
+" -c, --colors display default colors in terminal\n"
" -d, --dir <path> set WeeChat home directory (default: ~/.weechat)\n"
" -h, --help this help\n"
" -k, --keys display WeeChat default keys\n"
@@ -2574,6 +2576,16 @@ msgstr ""
"lettura - firma errata (l'aggiornamento del formato del file potrebbe essere "
"cambiato dall'ultima versione)"
+msgid "Terminal infos:"
+msgstr "Informazioni sul terminale:"
+
+msgid "No color support in terminal."
+msgstr ""
+
+#, fuzzy
+msgid "Default colors:"
+msgstr "Rmodifier predefiniti:"
+
msgid "Terminal lost, exiting WeeChat..."
msgstr "Terminale perduto, chiusura di WeeChat..."
@@ -2584,9 +2596,6 @@ msgstr "Ricevuto segnale %s, chiusura di WeeChat..."
msgid "Signal SIGHUP received, reloading configuration files"
msgstr "Ricevuto segnale SIGHUP, caricamento dei file di configurazione"
-msgid "Terminal infos:"
-msgstr "Informazioni sul terminale:"
-
#, c-format
msgid " TERM='%s', size: %dx%d"
msgstr " TERM='%s', dimensione %dx%d"
diff --git a/po/pl.po b/po/pl.po
index fbb7e7b26..2f8552f39 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-12-09 22:59+0100\n"
+"POT-Creation-Date: 2010-12-17 12:25+0100\n"
"PO-Revision-Date: 2010-11-06 11:56+0100\n"
"Last-Translator: Krzysztof Koroscik <soltys@szluug.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -45,8 +45,10 @@ msgstr ""
msgid "Usage: %s [option...] [plugin:option...]\n"
msgstr "Użycie: %s [argumenty...] [wtyczka:opcje...]\n"
+#, fuzzy
msgid ""
" -a, --no-connect disable auto-connect to servers at startup\n"
+" -c, --colors display default colors in terminal\n"
" -d, --dir <path> set WeeChat home directory (default: ~/.weechat)\n"
" -h, --help this help\n"
" -k, --keys display WeeChat default keys\n"
@@ -2556,6 +2558,16 @@ msgid ""
msgstr ""
"odczyt - zła sygnatura (format pliku mógł ulec zmianie od poprzedniej wersji)"
+msgid "Terminal infos:"
+msgstr "Informacje terminala:"
+
+msgid "No color support in terminal."
+msgstr ""
+
+#, fuzzy
+msgid "Default colors:"
+msgstr "Przywrócono domyślne przypisania klawiszy"
+
msgid "Terminal lost, exiting WeeChat..."
msgstr "Utracono terminal, wychodzę z WeeChat..."
@@ -2566,9 +2578,6 @@ msgstr "Otrzymano sygnał %s, wychodzę z WeeChat..."
msgid "Signal SIGHUP received, reloading configuration files"
msgstr "Otrzymano sygnał SIGHUP, przeładowuję pliki konfiguracyjne"
-msgid "Terminal infos:"
-msgstr "Informacje terminala:"
-
#, c-format
msgid " TERM='%s', size: %dx%d"
msgstr " TERM='%s', rozmiar: %dx%d"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index cd623b8c6..b4dd092fb 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-12-09 22:59+0100\n"
+"POT-Creation-Date: 2010-12-17 12:25+0100\n"
"PO-Revision-Date: 2010-11-13 09:26+0100\n"
"Last-Translator: Ivan Sichmann Freitas <ivansichfreitas@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -43,8 +43,10 @@ msgstr ""
msgid "Usage: %s [option...] [plugin:option...]\n"
msgstr "Uso: %s [opção...] [plugin:opção...]\n"
+#, fuzzy
msgid ""
" -a, --no-connect disable auto-connect to servers at startup\n"
+" -c, --colors display default colors in terminal\n"
" -d, --dir <path> set WeeChat home directory (default: ~/.weechat)\n"
" -h, --help this help\n"
" -k, --keys display WeeChat default keys\n"
@@ -2083,6 +2085,16 @@ msgid ""
"version)"
msgstr ""
+msgid "Terminal infos:"
+msgstr ""
+
+msgid "No color support in terminal."
+msgstr ""
+
+#, fuzzy
+msgid "Default colors:"
+msgstr "comando padrão:"
+
msgid "Terminal lost, exiting WeeChat..."
msgstr ""
@@ -2093,9 +2105,6 @@ msgstr ""
msgid "Signal SIGHUP received, reloading configuration files"
msgstr ""
-msgid "Terminal infos:"
-msgstr ""
-
#, c-format
msgid " TERM='%s', size: %dx%d"
msgstr ""
diff --git a/po/ru.po b/po/ru.po
index 508e972ef..812192f1d 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-12-09 22:59+0100\n"
+"POT-Creation-Date: 2010-12-17 12:25+0100\n"
"PO-Revision-Date: 2010-11-05 17:17+0100\n"
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -48,6 +48,7 @@ msgstr ""
#, fuzzy
msgid ""
" -a, --no-connect disable auto-connect to servers at startup\n"
+" -c, --colors display default colors in terminal\n"
" -d, --dir <path> set WeeChat home directory (default: ~/.weechat)\n"
" -h, --help this help\n"
" -k, --keys display WeeChat default keys\n"
@@ -2380,6 +2381,16 @@ msgid ""
"version)"
msgstr ""
+msgid "Terminal infos:"
+msgstr ""
+
+msgid "No color support in terminal."
+msgstr ""
+
+#, fuzzy
+msgid "Default colors:"
+msgstr "Комбинации клавиш по умолчанию восстановлены\n"
+
msgid "Terminal lost, exiting WeeChat..."
msgstr ""
@@ -2391,9 +2402,6 @@ msgstr ""
msgid "Signal SIGHUP received, reloading configuration files"
msgstr "%s не могу сохранить конфигурационный файл\n"
-msgid "Terminal infos:"
-msgstr ""
-
#, c-format
msgid " TERM='%s', size: %dx%d"
msgstr ""
diff --git a/po/weechat.pot b/po/weechat.pot
index d86b6c87a..54f5eef6c 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: 2010-12-09 22:59+0100\n"
+"POT-Creation-Date: 2010-12-17 12:25+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"
@@ -30,6 +30,7 @@ msgstr ""
msgid ""
" -a, --no-connect disable auto-connect to servers at startup\n"
+" -c, --colors display default colors in terminal\n"
" -d, --dir <path> set WeeChat home directory (default: ~/.weechat)\n"
" -h, --help this help\n"
" -k, --keys display WeeChat default keys\n"
@@ -2023,6 +2024,15 @@ msgid ""
"version)"
msgstr ""
+msgid "Terminal infos:"
+msgstr ""
+
+msgid "No color support in terminal."
+msgstr ""
+
+msgid "Default colors:"
+msgstr ""
+
msgid "Terminal lost, exiting WeeChat..."
msgstr ""
@@ -2033,9 +2043,6 @@ msgstr ""
msgid "Signal SIGHUP received, reloading configuration files"
msgstr ""
-msgid "Terminal infos:"
-msgstr ""
-
#, c-format
msgid " TERM='%s', size: %dx%d"
msgstr ""
diff --git a/src/core/weechat.c b/src/core/weechat.c
index 75dac6b3c..8d60ba4a0 100644
--- a/src/core/weechat.c
+++ b/src/core/weechat.c
@@ -110,6 +110,7 @@ weechat_display_usage (char *exec_name)
string_iconv_fprintf (stdout, "\n\n");
string_iconv_fprintf (stdout,
_(" -a, --no-connect disable auto-connect to servers at startup\n"
+ " -c, --colors display default colors in terminal\n"
" -d, --dir <path> set WeeChat home directory (default: ~/.weechat)\n"
" -h, --help this help\n"
" -k, --keys display WeeChat default keys\n"
@@ -173,7 +174,13 @@ weechat_parse_args (int argc, char *argv[])
for (i = 1; i < argc; i++)
{
- if ((strcmp (argv[i], "-d") == 0)
+ if ((strcmp (argv[i], "-c") == 0)
+ || (strcmp (argv[i], "--colors") == 0))
+ {
+ gui_color_display_terminal_colors ();
+ weechat_shutdown (EXIT_SUCCESS, 0);
+ }
+ else if ((strcmp (argv[i], "-d") == 0)
|| (strcmp (argv[i], "--dir") == 0))
{
if (i + 1 < argc)
diff --git a/src/gui/curses/gui-curses-color.c b/src/gui/curses/gui-curses-color.c
index 9d8a484a6..5508ac832 100644
--- a/src/gui/curses/gui-curses-color.c
+++ b/src/gui/curses/gui-curses-color.c
@@ -327,6 +327,75 @@ gui_color_init ()
}
/*
+ * gui_color_display_terminal_colors: display terminal colors
+ * This is called by command line option
+ * "-c" / "--colors"
+ */
+
+void
+gui_color_display_terminal_colors ()
+{
+ int lines, line, col, color;
+ int color_support, colors, color_pairs, change_color;
+ char str_line[1024], str_color[64];
+
+ color_support = 0;
+ colors = 0;
+ color_pairs = 0;
+ change_color = 0;
+
+ initscr ();
+ if (has_colors ())
+ {
+ color_support = 1;
+ start_color ();
+ use_default_colors ();
+ colors = COLORS;
+ color_pairs = COLOR_PAIRS;
+ change_color = can_change_color () ? 1 : 0;
+ refresh ();
+ endwin ();
+ }
+ printf ("\n");
+ printf ("%s $TERM=%s COLORS: %d, COLOR_PAIRS: %d, "
+ "can_change_color: %s\n",
+ _("Terminal infos:"),
+ getenv ("TERM"), colors, color_pairs,
+ (change_color) ? "yes" : "no");
+ if (colors == 0)
+ {
+ printf ("%s\n", _("No color support in terminal."));
+ }
+ else
+ {
+ printf ("\n");
+ printf ("%s\n", _("Default colors:"));
+ printf ("------------------------------------------------------------"
+ "--------------------\n");
+ lines = (colors < 16) ? colors : 16;
+ for (line = 0; line < lines; line++)
+ {
+ str_line[0] = '\0';
+ for (col = 0; col < 16; col++)
+ {
+ color = (col * 16) + line;
+ if (color < colors)
+ {
+ snprintf (str_color, sizeof (str_color),
+ "\33[0;38;5;%dm %03d ", color, color);
+ strcat (str_line, str_color);
+ }
+ }
+ printf ("%s\n", str_line);
+ }
+ printf ("\33[0m");
+ printf ("------------------------------------------------------------"
+ "--------------------\n");
+ }
+ printf ("\n");
+}
+
+/*
* gui_color_end: end GUI colors
*/
diff --git a/src/gui/gtk/gui-gtk-color.c b/src/gui/gtk/gui-gtk-color.c
index a4d7d0978..9cbd111d2 100644
--- a/src/gui/gtk/gui-gtk-color.c
+++ b/src/gui/gtk/gui-gtk-color.c
@@ -216,6 +216,18 @@ gui_color_init ()
}
/*
+ * gui_color_display_terminal_colors: display terminal colors
+ * This is called by command line option
+ * "-c" / "--colors"
+ */
+
+void
+gui_color_display_terminal_colors ()
+{
+ /* This function does nothing in Gtk GUI */
+}
+
+/*
* gui_color_end: end GUI colors
*/
diff --git a/src/gui/gui-color.h b/src/gui/gui-color.h
index 0bbbda209..a78cefa87 100644
--- a/src/gui/gui-color.h
+++ b/src/gui/gui-color.h
@@ -144,5 +144,6 @@ extern int gui_color_get_number ();
extern const char *gui_color_get_name (int num_color);
extern void gui_color_init_pairs ();
extern void gui_color_init_weechat ();
+extern void gui_color_display_terminal_colors ();
#endif /* __WEECHAT_GUI_COLOR_H */