1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-25 04:16:38 +02:00

Commands "/buffer (list)" and "/buffer move" now ok

This commit is contained in:
Sebastien Helleu
2004-09-19 09:21:50 +00:00
parent 24508e733c
commit a9e05f57ee
10 changed files with 690 additions and 302 deletions
+85 -69
View File
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.0.8-pre2\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2004-09-16 21:57+0200\n"
"POT-Creation-Date: 2004-09-19 11:19+0200\n"
"PO-Revision-Date: 2004-08-08 20:47+0200\n"
"Last-Translator: FlashCode <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1172,7 +1172,7 @@ msgstr "%s utilisateur non trouv
msgid "%s cannot create new private window \"%s\"\n"
msgstr "%s impossible de créer la fenêtre privée \"%s\"\n"
#: src/irc/irc-send.c:622 src/common/command.c:1178
#: src/irc/irc-send.c:622 src/common/command.c:1254
#, c-format
msgid "%s wrong argument count for \"%s\" command\n"
msgstr "%s nombre de paramètres erroné pour la commande \"%s\"\n"
@@ -2021,7 +2021,7 @@ msgstr "%s impossible de trouver le pseudo pour envoyer le message\n"
msgid "This window is not a channel!\n"
msgstr "Cette fenêtre n'est pas un canal !\n"
#: src/common/command.c:791 src/common/command.c:803
#: src/common/command.c:791 src/common/command.c:803 src/common/command.c:891
#, c-format
msgid "%s missing arguments for \"%s\" command\n"
msgstr "%s paramètres manquants pour la commande \"%s\"\n"
@@ -2039,102 +2039,122 @@ msgstr "Liste des alias:\n"
msgid "No alias defined.\n"
msgstr "Aucun alias défini.\n"
#: src/common/command.c:855
#: src/common/command.c:844
msgid "Opened buffers:\n"
msgstr "Tampons ouverts:\n"
#: src/common/command.c:857 src/common/command.c:1303
msgid "Server: "
msgstr "Serveur: "
#: src/common/command.c:863
msgid "Channel: "
msgstr "Canal: "
#: src/common/command.c:866 src/common/command.c:876
msgid " (server: "
msgstr " (serveur: "
#: src/common/command.c:873
msgid "Private with: "
msgstr "Privé avec: "
#: src/common/command.c:913 src/common/command.c:937
#, c-format
msgid "%s incorrect buffer number\n"
msgstr "%s numéro de buffer incorrect\n"
#: src/common/command.c:862
#: src/common/command.c:929
#, c-format
msgid "%s buffer \"%s\" not found for \"%s\" command\n"
msgstr "%s buffer \"%s\" non trouvé pour la commande \"%s\"\n"
#: src/common/command.c:885
#: src/common/command.c:961
#, c-format
msgid "unknown parameter \"%s\" for \"%s\" command\n"
msgstr "paramètre inconnu \"%s\" pour la commande \"%s\"\n"
#: src/common/command.c:914
#: src/common/command.c:990
#, c-format
msgid "%s already connected to server \"%s\"!\n"
msgstr "%s déjà connecté au serveur \"%s\" !\n"
#: src/common/command.c:937 src/common/command.c:972
#: src/common/command.c:1013 src/common/command.c:1048
#, c-format
msgid "%s server \"%s\" not found\n"
msgstr "%s serveur \"%s\" non trouvé\n"
#: src/common/command.c:962
#: src/common/command.c:1038
#, c-format
msgid "%s not connected to server \"%s\"!\n"
msgstr "%s non connecté au serveur \"%s\" !\n"
#: src/common/command.c:991
#: src/common/command.c:1067
#, c-format
msgid "> List of %s internal commands:\n"
msgstr "> Liste des commandes internes %s:\n"
#: src/common/command.c:996
#: src/common/command.c:1072
msgid "> List of IRC commands:\n"
msgstr "> Liste des commandes IRC:\n"
#: src/common/command.c:1011
#: src/common/command.c:1087
#, c-format
msgid "> Help on %s internal command \"%s\":\n"
msgstr "> Aide sur la commande interne %s \"%s\":\n"
#: src/common/command.c:1014 src/common/command.c:1035
#: src/common/command.c:1090 src/common/command.c:1111
#, c-format
msgid "Syntax: /%s %s\n"
msgstr "Syntaxe: /%s %s\n"
#: src/common/command.c:1033
#: src/common/command.c:1109
#, c-format
msgid "> Help on IRC command \"%s\":\n"
msgstr "> Aide sur la commande IRC \"%s\":\n"
#: src/common/command.c:1049
#: src/common/command.c:1125
#, c-format
msgid "No help available, \"%s\" is an unknown command\n"
msgstr "Pas d'aide disponible, la commande \"%s\" est inconnue\n"
#: src/common/command.c:1074
#: src/common/command.c:1150
msgid "Registered Perl scripts:\n"
msgstr "Scripts Perl enregistrés :\n"
#: src/common/command.c:1091 src/common/command.c:1113
#: src/common/command.c:1135
#: src/common/command.c:1167 src/common/command.c:1189
#: src/common/command.c:1211
msgid " (none)\n"
msgstr " (aucun)\n"
#: src/common/command.c:1096
#: src/common/command.c:1172
msgid "Perl message handlers:\n"
msgstr "Fonctions Perl pour messages :\n"
#: src/common/command.c:1105
#: src/common/command.c:1181
#, c-format
msgid " IRC(%s) => Perl(%s)\n"
msgstr " IRC(%s) => Perl(%s)\n"
#: src/common/command.c:1118
#: src/common/command.c:1194
msgid "Perl command handlers:\n"
msgstr "Commandes Perl :\n"
#: src/common/command.c:1127
#: src/common/command.c:1203
#, c-format
msgid " Command /%s => Perl(%s)\n"
msgstr " Commande /%s => Perl(%s)\n"
#: src/common/command.c:1147
#: src/common/command.c:1223
msgid "Perl scripts unloaded\n"
msgstr "Scripts Perl déchargés\n"
#: src/common/command.c:1172 src/common/command.c:1710
#: src/common/command.c:1248 src/common/command.c:1786
#, c-format
msgid "%s unknown option for \"%s\" command\n"
msgstr "%s option inconnue pour la commande \"%s\"\n"
#: src/common/command.c:1183
#: src/common/command.c:1259
msgid ""
"WeeChat was build without Perl support.\n"
"Please rebuild WeeChat with \"--enable-perl\" option for ./configure script\n"
@@ -2143,188 +2163,184 @@ msgstr ""
"Merci de reconstruire WeeChat avec l'option \"--enable-perl\" pour le "
"script ./configure\n"
#: src/common/command.c:1227
msgid "Server: "
msgstr "Serveur: "
#: src/common/command.c:1238
#: src/common/command.c:1314
msgid "connected"
msgstr "connecté"
#: src/common/command.c:1238
#: src/common/command.c:1314
msgid "not connected"
msgstr "non connecté"
#: src/common/command.c:1245
#: src/common/command.c:1321
#, c-format
msgid " Autoconnect: %s%s\n"
msgstr " Autoconnect: %s%s\n"
#: src/common/command.c:1246
#: src/common/command.c:1322
msgid "yes"
msgstr "oui"
#: src/common/command.c:1246
#: src/common/command.c:1322
msgid "no"
msgstr "non"
#: src/common/command.c:1248
#: src/common/command.c:1324
msgid " (temporary server, will not be saved)"
msgstr " (serveur temporaire, ne sera pas sauvé)"
#: src/common/command.c:1253
#: src/common/command.c:1329
#, c-format
msgid " Hostname : %s\n"
msgstr " Nom/IP : %s\n"
#: src/common/command.c:1258
#: src/common/command.c:1334
#, c-format
msgid " Port : %d\n"
msgstr " Port : %d\n"
#: src/common/command.c:1264
#: src/common/command.c:1340
msgid " Password : (hidden)\n"
msgstr " Mot passe : (caché)\n"
#: src/common/command.c:1268
#: src/common/command.c:1344
msgid " Password : (none)\n"
msgstr " Mot passe : (aucun)\n"
#: src/common/command.c:1272
#: src/common/command.c:1348
#, c-format
msgid " Nicks : %s"
msgstr " Pseudos : %s"
#: src/common/command.c:1289
#: src/common/command.c:1365
#, c-format
msgid " Username : %s\n"
msgstr " Nom utilis.: %s\n"
#: src/common/command.c:1294
#: src/common/command.c:1370
#, c-format
msgid " Realname : %s\n"
msgstr " Nom réel : %s\n"
#: src/common/command.c:1300
#: src/common/command.c:1376
#, c-format
msgid " Command : %s\n"
msgstr " Commande : %s\n"
#: src/common/command.c:1305
#: src/common/command.c:1381
msgid " Command : (none)\n"
msgstr " Commande : (aucune)\n"
#: src/common/command.c:1310
#: src/common/command.c:1386
#, c-format
msgid " Auto-join : %s\n"
msgstr " Auto-join : %s\n"
#: src/common/command.c:1315
#: src/common/command.c:1391
msgid " Auto-join : (none)\n"
msgstr " Auto-join : (aucun)\n"
#: src/common/command.c:1319
#: src/common/command.c:1395
msgid "No server.\n"
msgstr "Pas de serveur.\n"
#: src/common/command.c:1328
#: src/common/command.c:1404
#, c-format
msgid "%s missing servername for \"%s\" command\n"
msgstr "%s il manque le nom du serveur pour la commande \"%s\"\n"
#: src/common/command.c:1334
#: src/common/command.c:1410
#, c-format
msgid "%s too much arguments for \"%s\" command, ignoring arguments\n"
msgstr "%s trop de paramètres pour la commande \"%s\", paramètres ignorés\n"
#: src/common/command.c:1351
#: src/common/command.c:1427
#, c-format
msgid "%s server \"%s\" not found for \"%s\" command\n"
msgstr "%s le serveur \"%s\" n'existe pas pour la commande \"%s\"\n"
#: src/common/command.c:1357 src/common/command.c:1488
#: src/common/command.c:1433 src/common/command.c:1564
msgid "Server"
msgstr "Serveur"
#: src/common/command.c:1360
#: src/common/command.c:1436
msgid "has been deleted\n"
msgstr "a été supprimé\n"
#: src/common/command.c:1374
#: src/common/command.c:1450
#, c-format
msgid "%s missing parameters for \"%s\" command\n"
msgstr "%s paramètres manquants pour la commande \"%s\"\n"
#: src/common/command.c:1383
#: src/common/command.c:1459
#, c-format
msgid "%s server \"%s\" already exists, can't create it!\n"
msgstr "%s le serveur \"%s\" existe déjà, impossible de le créer !\n"
#: src/common/command.c:1407 src/common/command.c:1433
#: src/common/command.c:1445 src/common/command.c:1469
#: src/common/command.c:1483 src/common/command.c:1509
#: src/common/command.c:1521 src/common/command.c:1545
#, c-format
msgid "%s missing password for \"%s\" parameter\n"
msgstr "%s mot de passe manquant pour le paramètre \"%s\"\n"
#: src/common/command.c:1419
#: src/common/command.c:1495
#, c-format
msgid "%s missing nick(s) for \"%s\" parameter\n"
msgstr "%s pseudo(s) manquant(s) pour le paramètre \"%s\"\n"
#: src/common/command.c:1457
#: src/common/command.c:1533
#, c-format
msgid "%s missing command for \"%s\" parameter\n"
msgstr "%s commande manquante pour le paramètre \"%s\"\n"
#: src/common/command.c:1491
#: src/common/command.c:1567
msgid "created\n"
msgstr "créé\n"
#: src/common/command.c:1496
#: src/common/command.c:1572
#, c-format
msgid "%s unable to create server\n"
msgstr "%s impossible de créer le serveur\n"
#: src/common/command.c:1550
#: src/common/command.c:1626
#, c-format
msgid "%s option \"%s\" can not be changed while WeeChat is running\n"
msgstr "%s l'option \"%s\" ne peut pas être changée lorsque WeeChat tourne\n"
#: src/common/command.c:1562
#: src/common/command.c:1638
#, c-format
msgid "%s incorrect value for option \"%s\"\n"
msgstr "%s valeur incorrecte pour l'option \"%s\"\n"
#: src/common/command.c:1568
#: src/common/command.c:1644
#, c-format
msgid "%s config option \"%s\" not found\n"
msgstr "%s option de configuration \"%s\" non trouvée\n"
#: src/common/command.c:1618
#: src/common/command.c:1694
msgid "(unknown)"
msgstr "(inconnu)"
#: src/common/command.c:1638 src/common/command.c:1641
#: src/common/command.c:1714 src/common/command.c:1717
#, c-format
msgid "No config option found with \"%s\"\n"
msgstr "Aucune option de configuration trouvée avec \"%s\"\n"
#: src/common/command.c:1646
#: src/common/command.c:1722
#, c-format
msgid "%d config option(s) found with \"%s\"\n"
msgstr "%d option(s) de configuration trouvées avec \"%s\"\n"
#: src/common/command.c:1649
#: src/common/command.c:1725
#, c-format
msgid "%d config option(s) found\n"
msgstr "%d option(s) de configuration trouvées\n"
#: src/common/command.c:1669
#: src/common/command.c:1745
#, c-format
msgid "%s alias or command \"%s\" not found\n"
msgstr "%s alias ou commande \"%s\" non trouvé\n"
#: src/common/command.c:1678
#: src/common/command.c:1754
#, c-format
msgid "Alias \"%s\" removed\n"
msgstr "Alias \"%s\" supprimé\n"
+85 -69
View File
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2004-09-16 21:57+0200\n"
"POT-Creation-Date: 2004-09-19 11:19+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -1078,7 +1078,7 @@ msgstr ""
msgid "%s cannot create new private window \"%s\"\n"
msgstr ""
#: src/irc/irc-send.c:622 src/common/command.c:1178
#: src/irc/irc-send.c:622 src/common/command.c:1254
#, c-format
msgid "%s wrong argument count for \"%s\" command\n"
msgstr ""
@@ -1876,7 +1876,7 @@ msgstr ""
msgid "This window is not a channel!\n"
msgstr ""
#: src/common/command.c:791 src/common/command.c:803
#: src/common/command.c:791 src/common/command.c:803 src/common/command.c:891
#, c-format
msgid "%s missing arguments for \"%s\" command\n"
msgstr ""
@@ -1894,289 +1894,305 @@ msgstr ""
msgid "No alias defined.\n"
msgstr ""
#: src/common/command.c:855
#: src/common/command.c:844
msgid "Opened buffers:\n"
msgstr ""
#: src/common/command.c:857 src/common/command.c:1303
msgid "Server: "
msgstr ""
#: src/common/command.c:863
msgid "Channel: "
msgstr ""
#: src/common/command.c:866 src/common/command.c:876
msgid " (server: "
msgstr ""
#: src/common/command.c:873
msgid "Private with: "
msgstr ""
#: src/common/command.c:913 src/common/command.c:937
#, c-format
msgid "%s incorrect buffer number\n"
msgstr ""
#: src/common/command.c:862
#: src/common/command.c:929
#, c-format
msgid "%s buffer \"%s\" not found for \"%s\" command\n"
msgstr ""
#: src/common/command.c:885
#: src/common/command.c:961
#, c-format
msgid "unknown parameter \"%s\" for \"%s\" command\n"
msgstr ""
#: src/common/command.c:914
#: src/common/command.c:990
#, c-format
msgid "%s already connected to server \"%s\"!\n"
msgstr ""
#: src/common/command.c:937 src/common/command.c:972
#: src/common/command.c:1013 src/common/command.c:1048
#, c-format
msgid "%s server \"%s\" not found\n"
msgstr ""
#: src/common/command.c:962
#: src/common/command.c:1038
#, c-format
msgid "%s not connected to server \"%s\"!\n"
msgstr ""
#: src/common/command.c:991
#: src/common/command.c:1067
#, c-format
msgid "> List of %s internal commands:\n"
msgstr ""
#: src/common/command.c:996
#: src/common/command.c:1072
msgid "> List of IRC commands:\n"
msgstr ""
#: src/common/command.c:1011
#: src/common/command.c:1087
#, c-format
msgid "> Help on %s internal command \"%s\":\n"
msgstr ""
#: src/common/command.c:1014 src/common/command.c:1035
#: src/common/command.c:1090 src/common/command.c:1111
#, c-format
msgid "Syntax: /%s %s\n"
msgstr ""
#: src/common/command.c:1033
#: src/common/command.c:1109
#, c-format
msgid "> Help on IRC command \"%s\":\n"
msgstr ""
#: src/common/command.c:1049
#: src/common/command.c:1125
#, c-format
msgid "No help available, \"%s\" is an unknown command\n"
msgstr ""
#: src/common/command.c:1074
#: src/common/command.c:1150
msgid "Registered Perl scripts:\n"
msgstr ""
#: src/common/command.c:1091 src/common/command.c:1113
#: src/common/command.c:1135
#: src/common/command.c:1167 src/common/command.c:1189
#: src/common/command.c:1211
msgid " (none)\n"
msgstr ""
#: src/common/command.c:1096
#: src/common/command.c:1172
msgid "Perl message handlers:\n"
msgstr ""
#: src/common/command.c:1105
#: src/common/command.c:1181
#, c-format
msgid " IRC(%s) => Perl(%s)\n"
msgstr ""
#: src/common/command.c:1118
#: src/common/command.c:1194
msgid "Perl command handlers:\n"
msgstr ""
#: src/common/command.c:1127
#: src/common/command.c:1203
#, c-format
msgid " Command /%s => Perl(%s)\n"
msgstr ""
#: src/common/command.c:1147
#: src/common/command.c:1223
msgid "Perl scripts unloaded\n"
msgstr ""
#: src/common/command.c:1172 src/common/command.c:1710
#: src/common/command.c:1248 src/common/command.c:1786
#, c-format
msgid "%s unknown option for \"%s\" command\n"
msgstr ""
#: src/common/command.c:1183
#: src/common/command.c:1259
msgid ""
"WeeChat was build without Perl support.\n"
"Please rebuild WeeChat with \"--enable-perl\" option for ./configure script\n"
msgstr ""
#: src/common/command.c:1227
msgid "Server: "
msgstr ""
#: src/common/command.c:1238
#: src/common/command.c:1314
msgid "connected"
msgstr ""
#: src/common/command.c:1238
#: src/common/command.c:1314
msgid "not connected"
msgstr ""
#: src/common/command.c:1245
#: src/common/command.c:1321
#, c-format
msgid " Autoconnect: %s%s\n"
msgstr ""
#: src/common/command.c:1246
#: src/common/command.c:1322
msgid "yes"
msgstr ""
#: src/common/command.c:1246
#: src/common/command.c:1322
msgid "no"
msgstr ""
#: src/common/command.c:1248
#: src/common/command.c:1324
msgid " (temporary server, will not be saved)"
msgstr ""
#: src/common/command.c:1253
#: src/common/command.c:1329
#, c-format
msgid " Hostname : %s\n"
msgstr ""
#: src/common/command.c:1258
#: src/common/command.c:1334
#, c-format
msgid " Port : %d\n"
msgstr ""
#: src/common/command.c:1264
#: src/common/command.c:1340
msgid " Password : (hidden)\n"
msgstr ""
#: src/common/command.c:1268
#: src/common/command.c:1344
msgid " Password : (none)\n"
msgstr ""
#: src/common/command.c:1272
#: src/common/command.c:1348
#, c-format
msgid " Nicks : %s"
msgstr ""
#: src/common/command.c:1289
#: src/common/command.c:1365
#, c-format
msgid " Username : %s\n"
msgstr ""
#: src/common/command.c:1294
#: src/common/command.c:1370
#, c-format
msgid " Realname : %s\n"
msgstr ""
#: src/common/command.c:1300
#: src/common/command.c:1376
#, c-format
msgid " Command : %s\n"
msgstr ""
#: src/common/command.c:1305
#: src/common/command.c:1381
msgid " Command : (none)\n"
msgstr ""
#: src/common/command.c:1310
#: src/common/command.c:1386
#, c-format
msgid " Auto-join : %s\n"
msgstr ""
#: src/common/command.c:1315
#: src/common/command.c:1391
msgid " Auto-join : (none)\n"
msgstr ""
#: src/common/command.c:1319
#: src/common/command.c:1395
msgid "No server.\n"
msgstr ""
#: src/common/command.c:1328
#: src/common/command.c:1404
#, c-format
msgid "%s missing servername for \"%s\" command\n"
msgstr ""
#: src/common/command.c:1334
#: src/common/command.c:1410
#, c-format
msgid "%s too much arguments for \"%s\" command, ignoring arguments\n"
msgstr ""
#: src/common/command.c:1351
#: src/common/command.c:1427
#, c-format
msgid "%s server \"%s\" not found for \"%s\" command\n"
msgstr ""
#: src/common/command.c:1357 src/common/command.c:1488
#: src/common/command.c:1433 src/common/command.c:1564
msgid "Server"
msgstr ""
#: src/common/command.c:1360
#: src/common/command.c:1436
msgid "has been deleted\n"
msgstr ""
#: src/common/command.c:1374
#: src/common/command.c:1450
#, c-format
msgid "%s missing parameters for \"%s\" command\n"
msgstr ""
#: src/common/command.c:1383
#: src/common/command.c:1459
#, c-format
msgid "%s server \"%s\" already exists, can't create it!\n"
msgstr ""
#: src/common/command.c:1407 src/common/command.c:1433
#: src/common/command.c:1445 src/common/command.c:1469
#: src/common/command.c:1483 src/common/command.c:1509
#: src/common/command.c:1521 src/common/command.c:1545
#, c-format
msgid "%s missing password for \"%s\" parameter\n"
msgstr ""
#: src/common/command.c:1419
#: src/common/command.c:1495
#, c-format
msgid "%s missing nick(s) for \"%s\" parameter\n"
msgstr ""
#: src/common/command.c:1457
#: src/common/command.c:1533
#, c-format
msgid "%s missing command for \"%s\" parameter\n"
msgstr ""
#: src/common/command.c:1491
#: src/common/command.c:1567
msgid "created\n"
msgstr ""
#: src/common/command.c:1496
#: src/common/command.c:1572
#, c-format
msgid "%s unable to create server\n"
msgstr ""
#: src/common/command.c:1550
#: src/common/command.c:1626
#, c-format
msgid "%s option \"%s\" can not be changed while WeeChat is running\n"
msgstr ""
#: src/common/command.c:1562
#: src/common/command.c:1638
#, c-format
msgid "%s incorrect value for option \"%s\"\n"
msgstr ""
#: src/common/command.c:1568
#: src/common/command.c:1644
#, c-format
msgid "%s config option \"%s\" not found\n"
msgstr ""
#: src/common/command.c:1618
#: src/common/command.c:1694
msgid "(unknown)"
msgstr ""
#: src/common/command.c:1638 src/common/command.c:1641
#: src/common/command.c:1714 src/common/command.c:1717
#, c-format
msgid "No config option found with \"%s\"\n"
msgstr ""
#: src/common/command.c:1646
#: src/common/command.c:1722
#, c-format
msgid "%d config option(s) found with \"%s\"\n"
msgstr ""
#: src/common/command.c:1649
#: src/common/command.c:1725
#, c-format
msgid "%d config option(s) found\n"
msgstr ""
#: src/common/command.c:1669
#: src/common/command.c:1745
#, c-format
msgid "%s alias or command \"%s\" not found\n"
msgstr ""
#: src/common/command.c:1678
#: src/common/command.c:1754
#, c-format
msgid "Alias \"%s\" removed\n"
msgstr ""
+89 -13
View File
@@ -832,37 +832,113 @@ weechat_cmd_alias (char *arguments)
int
weechat_cmd_buffer (int argc, char **argv)
{
int number;
t_gui_buffer *ptr_buffer;
long number;
char *error;
if ((argc == 0) || ((argc == 1) && (strcasecmp (argv[0], "list") == 0)))
{
/* list opened bufferss */
gui_printf (NULL, "buffer list -- NOT DEVELOPED!\n");
/* list opened buffers */
irc_display_prefix (NULL, PREFIX_INFO);
gui_printf (NULL, _("Opened buffers:\n"));
for (ptr_buffer = gui_buffers; ptr_buffer; ptr_buffer = ptr_buffer->next_buffer)
{
irc_display_prefix (NULL, PREFIX_INFO);
gui_printf_color (NULL, COLOR_WIN_CHAT_DARK, "[");
gui_printf (NULL, "%d", ptr_buffer->number);
gui_printf_color (NULL, COLOR_WIN_CHAT_DARK, "] ");
if (ptr_buffer->dcc)
gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL, "DCC\n");
else if (BUFFER_IS_SERVER (ptr_buffer))
{
gui_printf (NULL, _("Server: "));
gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL,
"%s\n", SERVER(ptr_buffer)->name);
}
else if (BUFFER_IS_CHANNEL (ptr_buffer))
{
gui_printf (NULL, _("Channel: "));
gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL,
"%s", CHANNEL(ptr_buffer)->name);
gui_printf (NULL, _(" (server: "));
gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL,
"%s", SERVER(ptr_buffer)->name);
gui_printf (NULL, ")\n");
}
else if (BUFFER_IS_PRIVATE (ptr_buffer))
{
gui_printf (NULL, _("Private with: "));
gui_printf_color (NULL, COLOR_WIN_CHAT_NICK,
"%s", CHANNEL(ptr_buffer)->name);
gui_printf (NULL, _(" (server: "));
gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL,
"%s", SERVER(ptr_buffer)->name);
gui_printf (NULL, ")\n");
}
}
}
else
{
if (strcasecmp (argv[0], "move") == 0)
{
/* move buffer to another number in the list */
gui_printf (NULL, "buffer move -- NOT DEVELOPED!\n");
}
else
{
number = strtol (argv[0], &error, 10);
if (error)
if (argc < 2)
{
gui_printf (NULL, _("%s missing arguments for \"%s\" command\n"),
WEECHAT_ERROR, "buffer");
return -1;
}
error = NULL;
number = strtol (((argv[1][0] == '+') || (argv[1][0] == '-')) ? argv[1] + 1 : argv[1],
&error, 10);
if ((error) && (error[0] == '\0'))
{
if (argv[1][0] == '+')
gui_move_buffer_to_number (gui_current_window,
gui_current_window->buffer->number + ((int) number));
else if (argv[1][0] == '-')
gui_move_buffer_to_number (gui_current_window,
gui_current_window->buffer->number - ((int) number));
else
gui_move_buffer_to_number (gui_current_window, (int) number);
}
else
{
/* invalid number */
gui_printf (NULL, _("%s incorrect buffer number\n"),
WEECHAT_ERROR);
return -1;
}
if (!gui_switch_to_buffer_by_number (gui_current_window, number))
}
else
{
/* jump to buffer by number */
error = NULL;
number = strtol (argv[0], &error, 10);
if ((error) && (error[0] == '\0'))
{
gui_printf (NULL,
_("%s buffer \"%s\" not found for \"%s\" command\n"),
WEECHAT_ERROR, argv[0], "buffer");
if (!gui_switch_to_buffer_by_number (gui_current_window, (int) number))
{
gui_printf (NULL,
_("%s buffer \"%s\" not found for \"%s\" command\n"),
WEECHAT_ERROR, argv[0], "buffer");
return -1;
}
}
else
{
/* invalid number */
gui_printf (NULL, _("%s incorrect buffer number\n"),
WEECHAT_ERROR);
return -1;
}
}
}
return 0;
+85
View File
@@ -672,3 +672,88 @@ gui_switch_to_buffer_by_number (t_gui_window *window, int number)
/* buffer not found */
return NULL;
}
/*
* gui_switch_to_buffer_by_number: switch to another buffer with number
*/
void
gui_move_buffer_to_number (t_gui_window *window, int number)
{
t_gui_buffer *ptr_buffer;
int i;
/* buffer number is already ok ? */
if (number == window->buffer->number)
return;
if (number < 1)
number = 1;
/* remove buffer from list */
if (window->buffer == gui_buffers)
{
gui_buffers = window->buffer->next_buffer;
gui_buffers->prev_buffer = NULL;
}
if (window->buffer == last_gui_buffer)
{
last_gui_buffer = window->buffer->prev_buffer;
last_gui_buffer->next_buffer = NULL;
}
if (window->buffer->prev_buffer)
(window->buffer->prev_buffer)->next_buffer = window->buffer->next_buffer;
if (window->buffer->next_buffer)
(window->buffer->next_buffer)->prev_buffer = window->buffer->prev_buffer;
if (number == 1)
{
gui_buffers->prev_buffer = window->buffer;
window->buffer->prev_buffer = NULL;
window->buffer->next_buffer = gui_buffers;
gui_buffers = window->buffer;
}
else
{
/* assign new number to all buffers */
i = 1;
for (ptr_buffer = gui_buffers; ptr_buffer; ptr_buffer = ptr_buffer->next_buffer)
{
ptr_buffer->number = i++;
}
/* search for new position in the list */
for (ptr_buffer = gui_buffers; ptr_buffer; ptr_buffer = ptr_buffer->next_buffer)
{
if (ptr_buffer->number == number)
break;
}
if (ptr_buffer)
{
/* insert before buffer found */
window->buffer->prev_buffer = ptr_buffer->prev_buffer;
window->buffer->next_buffer = ptr_buffer;
if (ptr_buffer->prev_buffer)
(ptr_buffer->prev_buffer)->next_buffer = window->buffer;
ptr_buffer->prev_buffer = window->buffer;
}
else
{
/* number not found (too big)? => add to end */
window->buffer->prev_buffer = last_gui_buffer;
window->buffer->next_buffer = NULL;
last_gui_buffer->next_buffer = window->buffer;
last_gui_buffer = window->buffer;
}
}
/* assign new number to all buffers */
i = 1;
for (ptr_buffer = gui_buffers; ptr_buffer; ptr_buffer = ptr_buffer->next_buffer)
{
ptr_buffer->number = i++;
}
gui_redraw_buffer (window->buffer);
}
+1
View File
@@ -257,6 +257,7 @@ extern void gui_move_previous_word (t_gui_buffer *);
extern void gui_move_next_word (t_gui_buffer *);
extern void gui_buffer_insert_string (t_gui_buffer *, char *, int);
extern t_gui_buffer *gui_switch_to_buffer_by_number (t_gui_window *, int);
extern void gui_move_buffer_to_number (t_gui_window *, int);
/* GUI dependant functions */
extern int gui_assign_color (int *, char *);
extern int gui_get_color_by_name (char *);
+85 -69
View File
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.0.8-pre2\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2004-09-16 21:57+0200\n"
"POT-Creation-Date: 2004-09-19 11:19+0200\n"
"PO-Revision-Date: 2004-08-08 20:47+0200\n"
"Last-Translator: FlashCode <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1172,7 +1172,7 @@ msgstr "%s utilisateur non trouv
msgid "%s cannot create new private window \"%s\"\n"
msgstr "%s impossible de créer la fenêtre privée \"%s\"\n"
#: src/irc/irc-send.c:622 src/common/command.c:1178
#: src/irc/irc-send.c:622 src/common/command.c:1254
#, c-format
msgid "%s wrong argument count for \"%s\" command\n"
msgstr "%s nombre de paramètres erroné pour la commande \"%s\"\n"
@@ -2021,7 +2021,7 @@ msgstr "%s impossible de trouver le pseudo pour envoyer le message\n"
msgid "This window is not a channel!\n"
msgstr "Cette fenêtre n'est pas un canal !\n"
#: src/common/command.c:791 src/common/command.c:803
#: src/common/command.c:791 src/common/command.c:803 src/common/command.c:891
#, c-format
msgid "%s missing arguments for \"%s\" command\n"
msgstr "%s paramètres manquants pour la commande \"%s\"\n"
@@ -2039,102 +2039,122 @@ msgstr "Liste des alias:\n"
msgid "No alias defined.\n"
msgstr "Aucun alias défini.\n"
#: src/common/command.c:855
#: src/common/command.c:844
msgid "Opened buffers:\n"
msgstr "Tampons ouverts:\n"
#: src/common/command.c:857 src/common/command.c:1303
msgid "Server: "
msgstr "Serveur: "
#: src/common/command.c:863
msgid "Channel: "
msgstr "Canal: "
#: src/common/command.c:866 src/common/command.c:876
msgid " (server: "
msgstr " (serveur: "
#: src/common/command.c:873
msgid "Private with: "
msgstr "Privé avec: "
#: src/common/command.c:913 src/common/command.c:937
#, c-format
msgid "%s incorrect buffer number\n"
msgstr "%s numéro de buffer incorrect\n"
#: src/common/command.c:862
#: src/common/command.c:929
#, c-format
msgid "%s buffer \"%s\" not found for \"%s\" command\n"
msgstr "%s buffer \"%s\" non trouvé pour la commande \"%s\"\n"
#: src/common/command.c:885
#: src/common/command.c:961
#, c-format
msgid "unknown parameter \"%s\" for \"%s\" command\n"
msgstr "paramètre inconnu \"%s\" pour la commande \"%s\"\n"
#: src/common/command.c:914
#: src/common/command.c:990
#, c-format
msgid "%s already connected to server \"%s\"!\n"
msgstr "%s déjà connecté au serveur \"%s\" !\n"
#: src/common/command.c:937 src/common/command.c:972
#: src/common/command.c:1013 src/common/command.c:1048
#, c-format
msgid "%s server \"%s\" not found\n"
msgstr "%s serveur \"%s\" non trouvé\n"
#: src/common/command.c:962
#: src/common/command.c:1038
#, c-format
msgid "%s not connected to server \"%s\"!\n"
msgstr "%s non connecté au serveur \"%s\" !\n"
#: src/common/command.c:991
#: src/common/command.c:1067
#, c-format
msgid "> List of %s internal commands:\n"
msgstr "> Liste des commandes internes %s:\n"
#: src/common/command.c:996
#: src/common/command.c:1072
msgid "> List of IRC commands:\n"
msgstr "> Liste des commandes IRC:\n"
#: src/common/command.c:1011
#: src/common/command.c:1087
#, c-format
msgid "> Help on %s internal command \"%s\":\n"
msgstr "> Aide sur la commande interne %s \"%s\":\n"
#: src/common/command.c:1014 src/common/command.c:1035
#: src/common/command.c:1090 src/common/command.c:1111
#, c-format
msgid "Syntax: /%s %s\n"
msgstr "Syntaxe: /%s %s\n"
#: src/common/command.c:1033
#: src/common/command.c:1109
#, c-format
msgid "> Help on IRC command \"%s\":\n"
msgstr "> Aide sur la commande IRC \"%s\":\n"
#: src/common/command.c:1049
#: src/common/command.c:1125
#, c-format
msgid "No help available, \"%s\" is an unknown command\n"
msgstr "Pas d'aide disponible, la commande \"%s\" est inconnue\n"
#: src/common/command.c:1074
#: src/common/command.c:1150
msgid "Registered Perl scripts:\n"
msgstr "Scripts Perl enregistrés :\n"
#: src/common/command.c:1091 src/common/command.c:1113
#: src/common/command.c:1135
#: src/common/command.c:1167 src/common/command.c:1189
#: src/common/command.c:1211
msgid " (none)\n"
msgstr " (aucun)\n"
#: src/common/command.c:1096
#: src/common/command.c:1172
msgid "Perl message handlers:\n"
msgstr "Fonctions Perl pour messages :\n"
#: src/common/command.c:1105
#: src/common/command.c:1181
#, c-format
msgid " IRC(%s) => Perl(%s)\n"
msgstr " IRC(%s) => Perl(%s)\n"
#: src/common/command.c:1118
#: src/common/command.c:1194
msgid "Perl command handlers:\n"
msgstr "Commandes Perl :\n"
#: src/common/command.c:1127
#: src/common/command.c:1203
#, c-format
msgid " Command /%s => Perl(%s)\n"
msgstr " Commande /%s => Perl(%s)\n"
#: src/common/command.c:1147
#: src/common/command.c:1223
msgid "Perl scripts unloaded\n"
msgstr "Scripts Perl déchargés\n"
#: src/common/command.c:1172 src/common/command.c:1710
#: src/common/command.c:1248 src/common/command.c:1786
#, c-format
msgid "%s unknown option for \"%s\" command\n"
msgstr "%s option inconnue pour la commande \"%s\"\n"
#: src/common/command.c:1183
#: src/common/command.c:1259
msgid ""
"WeeChat was build without Perl support.\n"
"Please rebuild WeeChat with \"--enable-perl\" option for ./configure script\n"
@@ -2143,188 +2163,184 @@ msgstr ""
"Merci de reconstruire WeeChat avec l'option \"--enable-perl\" pour le "
"script ./configure\n"
#: src/common/command.c:1227
msgid "Server: "
msgstr "Serveur: "
#: src/common/command.c:1238
#: src/common/command.c:1314
msgid "connected"
msgstr "connecté"
#: src/common/command.c:1238
#: src/common/command.c:1314
msgid "not connected"
msgstr "non connecté"
#: src/common/command.c:1245
#: src/common/command.c:1321
#, c-format
msgid " Autoconnect: %s%s\n"
msgstr " Autoconnect: %s%s\n"
#: src/common/command.c:1246
#: src/common/command.c:1322
msgid "yes"
msgstr "oui"
#: src/common/command.c:1246
#: src/common/command.c:1322
msgid "no"
msgstr "non"
#: src/common/command.c:1248
#: src/common/command.c:1324
msgid " (temporary server, will not be saved)"
msgstr " (serveur temporaire, ne sera pas sauvé)"
#: src/common/command.c:1253
#: src/common/command.c:1329
#, c-format
msgid " Hostname : %s\n"
msgstr " Nom/IP : %s\n"
#: src/common/command.c:1258
#: src/common/command.c:1334
#, c-format
msgid " Port : %d\n"
msgstr " Port : %d\n"
#: src/common/command.c:1264
#: src/common/command.c:1340
msgid " Password : (hidden)\n"
msgstr " Mot passe : (caché)\n"
#: src/common/command.c:1268
#: src/common/command.c:1344
msgid " Password : (none)\n"
msgstr " Mot passe : (aucun)\n"
#: src/common/command.c:1272
#: src/common/command.c:1348
#, c-format
msgid " Nicks : %s"
msgstr " Pseudos : %s"
#: src/common/command.c:1289
#: src/common/command.c:1365
#, c-format
msgid " Username : %s\n"
msgstr " Nom utilis.: %s\n"
#: src/common/command.c:1294
#: src/common/command.c:1370
#, c-format
msgid " Realname : %s\n"
msgstr " Nom réel : %s\n"
#: src/common/command.c:1300
#: src/common/command.c:1376
#, c-format
msgid " Command : %s\n"
msgstr " Commande : %s\n"
#: src/common/command.c:1305
#: src/common/command.c:1381
msgid " Command : (none)\n"
msgstr " Commande : (aucune)\n"
#: src/common/command.c:1310
#: src/common/command.c:1386
#, c-format
msgid " Auto-join : %s\n"
msgstr " Auto-join : %s\n"
#: src/common/command.c:1315
#: src/common/command.c:1391
msgid " Auto-join : (none)\n"
msgstr " Auto-join : (aucun)\n"
#: src/common/command.c:1319
#: src/common/command.c:1395
msgid "No server.\n"
msgstr "Pas de serveur.\n"
#: src/common/command.c:1328
#: src/common/command.c:1404
#, c-format
msgid "%s missing servername for \"%s\" command\n"
msgstr "%s il manque le nom du serveur pour la commande \"%s\"\n"
#: src/common/command.c:1334
#: src/common/command.c:1410
#, c-format
msgid "%s too much arguments for \"%s\" command, ignoring arguments\n"
msgstr "%s trop de paramètres pour la commande \"%s\", paramètres ignorés\n"
#: src/common/command.c:1351
#: src/common/command.c:1427
#, c-format
msgid "%s server \"%s\" not found for \"%s\" command\n"
msgstr "%s le serveur \"%s\" n'existe pas pour la commande \"%s\"\n"
#: src/common/command.c:1357 src/common/command.c:1488
#: src/common/command.c:1433 src/common/command.c:1564
msgid "Server"
msgstr "Serveur"
#: src/common/command.c:1360
#: src/common/command.c:1436
msgid "has been deleted\n"
msgstr "a été supprimé\n"
#: src/common/command.c:1374
#: src/common/command.c:1450
#, c-format
msgid "%s missing parameters for \"%s\" command\n"
msgstr "%s paramètres manquants pour la commande \"%s\"\n"
#: src/common/command.c:1383
#: src/common/command.c:1459
#, c-format
msgid "%s server \"%s\" already exists, can't create it!\n"
msgstr "%s le serveur \"%s\" existe déjà, impossible de le créer !\n"
#: src/common/command.c:1407 src/common/command.c:1433
#: src/common/command.c:1445 src/common/command.c:1469
#: src/common/command.c:1483 src/common/command.c:1509
#: src/common/command.c:1521 src/common/command.c:1545
#, c-format
msgid "%s missing password for \"%s\" parameter\n"
msgstr "%s mot de passe manquant pour le paramètre \"%s\"\n"
#: src/common/command.c:1419
#: src/common/command.c:1495
#, c-format
msgid "%s missing nick(s) for \"%s\" parameter\n"
msgstr "%s pseudo(s) manquant(s) pour le paramètre \"%s\"\n"
#: src/common/command.c:1457
#: src/common/command.c:1533
#, c-format
msgid "%s missing command for \"%s\" parameter\n"
msgstr "%s commande manquante pour le paramètre \"%s\"\n"
#: src/common/command.c:1491
#: src/common/command.c:1567
msgid "created\n"
msgstr "créé\n"
#: src/common/command.c:1496
#: src/common/command.c:1572
#, c-format
msgid "%s unable to create server\n"
msgstr "%s impossible de créer le serveur\n"
#: src/common/command.c:1550
#: src/common/command.c:1626
#, c-format
msgid "%s option \"%s\" can not be changed while WeeChat is running\n"
msgstr "%s l'option \"%s\" ne peut pas être changée lorsque WeeChat tourne\n"
#: src/common/command.c:1562
#: src/common/command.c:1638
#, c-format
msgid "%s incorrect value for option \"%s\"\n"
msgstr "%s valeur incorrecte pour l'option \"%s\"\n"
#: src/common/command.c:1568
#: src/common/command.c:1644
#, c-format
msgid "%s config option \"%s\" not found\n"
msgstr "%s option de configuration \"%s\" non trouvée\n"
#: src/common/command.c:1618
#: src/common/command.c:1694
msgid "(unknown)"
msgstr "(inconnu)"
#: src/common/command.c:1638 src/common/command.c:1641
#: src/common/command.c:1714 src/common/command.c:1717
#, c-format
msgid "No config option found with \"%s\"\n"
msgstr "Aucune option de configuration trouvée avec \"%s\"\n"
#: src/common/command.c:1646
#: src/common/command.c:1722
#, c-format
msgid "%d config option(s) found with \"%s\"\n"
msgstr "%d option(s) de configuration trouvées avec \"%s\"\n"
#: src/common/command.c:1649
#: src/common/command.c:1725
#, c-format
msgid "%d config option(s) found\n"
msgstr "%d option(s) de configuration trouvées\n"
#: src/common/command.c:1669
#: src/common/command.c:1745
#, c-format
msgid "%s alias or command \"%s\" not found\n"
msgstr "%s alias ou commande \"%s\" non trouvé\n"
#: src/common/command.c:1678
#: src/common/command.c:1754
#, c-format
msgid "Alias \"%s\" removed\n"
msgstr "Alias \"%s\" supprimé\n"
+85 -69
View File
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2004-09-16 21:57+0200\n"
"POT-Creation-Date: 2004-09-19 11:19+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -1078,7 +1078,7 @@ msgstr ""
msgid "%s cannot create new private window \"%s\"\n"
msgstr ""
#: src/irc/irc-send.c:622 src/common/command.c:1178
#: src/irc/irc-send.c:622 src/common/command.c:1254
#, c-format
msgid "%s wrong argument count for \"%s\" command\n"
msgstr ""
@@ -1876,7 +1876,7 @@ msgstr ""
msgid "This window is not a channel!\n"
msgstr ""
#: src/common/command.c:791 src/common/command.c:803
#: src/common/command.c:791 src/common/command.c:803 src/common/command.c:891
#, c-format
msgid "%s missing arguments for \"%s\" command\n"
msgstr ""
@@ -1894,289 +1894,305 @@ msgstr ""
msgid "No alias defined.\n"
msgstr ""
#: src/common/command.c:855
#: src/common/command.c:844
msgid "Opened buffers:\n"
msgstr ""
#: src/common/command.c:857 src/common/command.c:1303
msgid "Server: "
msgstr ""
#: src/common/command.c:863
msgid "Channel: "
msgstr ""
#: src/common/command.c:866 src/common/command.c:876
msgid " (server: "
msgstr ""
#: src/common/command.c:873
msgid "Private with: "
msgstr ""
#: src/common/command.c:913 src/common/command.c:937
#, c-format
msgid "%s incorrect buffer number\n"
msgstr ""
#: src/common/command.c:862
#: src/common/command.c:929
#, c-format
msgid "%s buffer \"%s\" not found for \"%s\" command\n"
msgstr ""
#: src/common/command.c:885
#: src/common/command.c:961
#, c-format
msgid "unknown parameter \"%s\" for \"%s\" command\n"
msgstr ""
#: src/common/command.c:914
#: src/common/command.c:990
#, c-format
msgid "%s already connected to server \"%s\"!\n"
msgstr ""
#: src/common/command.c:937 src/common/command.c:972
#: src/common/command.c:1013 src/common/command.c:1048
#, c-format
msgid "%s server \"%s\" not found\n"
msgstr ""
#: src/common/command.c:962
#: src/common/command.c:1038
#, c-format
msgid "%s not connected to server \"%s\"!\n"
msgstr ""
#: src/common/command.c:991
#: src/common/command.c:1067
#, c-format
msgid "> List of %s internal commands:\n"
msgstr ""
#: src/common/command.c:996
#: src/common/command.c:1072
msgid "> List of IRC commands:\n"
msgstr ""
#: src/common/command.c:1011
#: src/common/command.c:1087
#, c-format
msgid "> Help on %s internal command \"%s\":\n"
msgstr ""
#: src/common/command.c:1014 src/common/command.c:1035
#: src/common/command.c:1090 src/common/command.c:1111
#, c-format
msgid "Syntax: /%s %s\n"
msgstr ""
#: src/common/command.c:1033
#: src/common/command.c:1109
#, c-format
msgid "> Help on IRC command \"%s\":\n"
msgstr ""
#: src/common/command.c:1049
#: src/common/command.c:1125
#, c-format
msgid "No help available, \"%s\" is an unknown command\n"
msgstr ""
#: src/common/command.c:1074
#: src/common/command.c:1150
msgid "Registered Perl scripts:\n"
msgstr ""
#: src/common/command.c:1091 src/common/command.c:1113
#: src/common/command.c:1135
#: src/common/command.c:1167 src/common/command.c:1189
#: src/common/command.c:1211
msgid " (none)\n"
msgstr ""
#: src/common/command.c:1096
#: src/common/command.c:1172
msgid "Perl message handlers:\n"
msgstr ""
#: src/common/command.c:1105
#: src/common/command.c:1181
#, c-format
msgid " IRC(%s) => Perl(%s)\n"
msgstr ""
#: src/common/command.c:1118
#: src/common/command.c:1194
msgid "Perl command handlers:\n"
msgstr ""
#: src/common/command.c:1127
#: src/common/command.c:1203
#, c-format
msgid " Command /%s => Perl(%s)\n"
msgstr ""
#: src/common/command.c:1147
#: src/common/command.c:1223
msgid "Perl scripts unloaded\n"
msgstr ""
#: src/common/command.c:1172 src/common/command.c:1710
#: src/common/command.c:1248 src/common/command.c:1786
#, c-format
msgid "%s unknown option for \"%s\" command\n"
msgstr ""
#: src/common/command.c:1183
#: src/common/command.c:1259
msgid ""
"WeeChat was build without Perl support.\n"
"Please rebuild WeeChat with \"--enable-perl\" option for ./configure script\n"
msgstr ""
#: src/common/command.c:1227
msgid "Server: "
msgstr ""
#: src/common/command.c:1238
#: src/common/command.c:1314
msgid "connected"
msgstr ""
#: src/common/command.c:1238
#: src/common/command.c:1314
msgid "not connected"
msgstr ""
#: src/common/command.c:1245
#: src/common/command.c:1321
#, c-format
msgid " Autoconnect: %s%s\n"
msgstr ""
#: src/common/command.c:1246
#: src/common/command.c:1322
msgid "yes"
msgstr ""
#: src/common/command.c:1246
#: src/common/command.c:1322
msgid "no"
msgstr ""
#: src/common/command.c:1248
#: src/common/command.c:1324
msgid " (temporary server, will not be saved)"
msgstr ""
#: src/common/command.c:1253
#: src/common/command.c:1329
#, c-format
msgid " Hostname : %s\n"
msgstr ""
#: src/common/command.c:1258
#: src/common/command.c:1334
#, c-format
msgid " Port : %d\n"
msgstr ""
#: src/common/command.c:1264
#: src/common/command.c:1340
msgid " Password : (hidden)\n"
msgstr ""
#: src/common/command.c:1268
#: src/common/command.c:1344
msgid " Password : (none)\n"
msgstr ""
#: src/common/command.c:1272
#: src/common/command.c:1348
#, c-format
msgid " Nicks : %s"
msgstr ""
#: src/common/command.c:1289
#: src/common/command.c:1365
#, c-format
msgid " Username : %s\n"
msgstr ""
#: src/common/command.c:1294
#: src/common/command.c:1370
#, c-format
msgid " Realname : %s\n"
msgstr ""
#: src/common/command.c:1300
#: src/common/command.c:1376
#, c-format
msgid " Command : %s\n"
msgstr ""
#: src/common/command.c:1305
#: src/common/command.c:1381
msgid " Command : (none)\n"
msgstr ""
#: src/common/command.c:1310
#: src/common/command.c:1386
#, c-format
msgid " Auto-join : %s\n"
msgstr ""
#: src/common/command.c:1315
#: src/common/command.c:1391
msgid " Auto-join : (none)\n"
msgstr ""
#: src/common/command.c:1319
#: src/common/command.c:1395
msgid "No server.\n"
msgstr ""
#: src/common/command.c:1328
#: src/common/command.c:1404
#, c-format
msgid "%s missing servername for \"%s\" command\n"
msgstr ""
#: src/common/command.c:1334
#: src/common/command.c:1410
#, c-format
msgid "%s too much arguments for \"%s\" command, ignoring arguments\n"
msgstr ""
#: src/common/command.c:1351
#: src/common/command.c:1427
#, c-format
msgid "%s server \"%s\" not found for \"%s\" command\n"
msgstr ""
#: src/common/command.c:1357 src/common/command.c:1488
#: src/common/command.c:1433 src/common/command.c:1564
msgid "Server"
msgstr ""
#: src/common/command.c:1360
#: src/common/command.c:1436
msgid "has been deleted\n"
msgstr ""
#: src/common/command.c:1374
#: src/common/command.c:1450
#, c-format
msgid "%s missing parameters for \"%s\" command\n"
msgstr ""
#: src/common/command.c:1383
#: src/common/command.c:1459
#, c-format
msgid "%s server \"%s\" already exists, can't create it!\n"
msgstr ""
#: src/common/command.c:1407 src/common/command.c:1433
#: src/common/command.c:1445 src/common/command.c:1469
#: src/common/command.c:1483 src/common/command.c:1509
#: src/common/command.c:1521 src/common/command.c:1545
#, c-format
msgid "%s missing password for \"%s\" parameter\n"
msgstr ""
#: src/common/command.c:1419
#: src/common/command.c:1495
#, c-format
msgid "%s missing nick(s) for \"%s\" parameter\n"
msgstr ""
#: src/common/command.c:1457
#: src/common/command.c:1533
#, c-format
msgid "%s missing command for \"%s\" parameter\n"
msgstr ""
#: src/common/command.c:1491
#: src/common/command.c:1567
msgid "created\n"
msgstr ""
#: src/common/command.c:1496
#: src/common/command.c:1572
#, c-format
msgid "%s unable to create server\n"
msgstr ""
#: src/common/command.c:1550
#: src/common/command.c:1626
#, c-format
msgid "%s option \"%s\" can not be changed while WeeChat is running\n"
msgstr ""
#: src/common/command.c:1562
#: src/common/command.c:1638
#, c-format
msgid "%s incorrect value for option \"%s\"\n"
msgstr ""
#: src/common/command.c:1568
#: src/common/command.c:1644
#, c-format
msgid "%s config option \"%s\" not found\n"
msgstr ""
#: src/common/command.c:1618
#: src/common/command.c:1694
msgid "(unknown)"
msgstr ""
#: src/common/command.c:1638 src/common/command.c:1641
#: src/common/command.c:1714 src/common/command.c:1717
#, c-format
msgid "No config option found with \"%s\"\n"
msgstr ""
#: src/common/command.c:1646
#: src/common/command.c:1722
#, c-format
msgid "%d config option(s) found with \"%s\"\n"
msgstr ""
#: src/common/command.c:1649
#: src/common/command.c:1725
#, c-format
msgid "%d config option(s) found\n"
msgstr ""
#: src/common/command.c:1669
#: src/common/command.c:1745
#, c-format
msgid "%s alias or command \"%s\" not found\n"
msgstr ""
#: src/common/command.c:1678
#: src/common/command.c:1754
#, c-format
msgid "Alias \"%s\" removed\n"
msgstr ""
+89 -13
View File
@@ -832,37 +832,113 @@ weechat_cmd_alias (char *arguments)
int
weechat_cmd_buffer (int argc, char **argv)
{
int number;
t_gui_buffer *ptr_buffer;
long number;
char *error;
if ((argc == 0) || ((argc == 1) && (strcasecmp (argv[0], "list") == 0)))
{
/* list opened bufferss */
gui_printf (NULL, "buffer list -- NOT DEVELOPED!\n");
/* list opened buffers */
irc_display_prefix (NULL, PREFIX_INFO);
gui_printf (NULL, _("Opened buffers:\n"));
for (ptr_buffer = gui_buffers; ptr_buffer; ptr_buffer = ptr_buffer->next_buffer)
{
irc_display_prefix (NULL, PREFIX_INFO);
gui_printf_color (NULL, COLOR_WIN_CHAT_DARK, "[");
gui_printf (NULL, "%d", ptr_buffer->number);
gui_printf_color (NULL, COLOR_WIN_CHAT_DARK, "] ");
if (ptr_buffer->dcc)
gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL, "DCC\n");
else if (BUFFER_IS_SERVER (ptr_buffer))
{
gui_printf (NULL, _("Server: "));
gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL,
"%s\n", SERVER(ptr_buffer)->name);
}
else if (BUFFER_IS_CHANNEL (ptr_buffer))
{
gui_printf (NULL, _("Channel: "));
gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL,
"%s", CHANNEL(ptr_buffer)->name);
gui_printf (NULL, _(" (server: "));
gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL,
"%s", SERVER(ptr_buffer)->name);
gui_printf (NULL, ")\n");
}
else if (BUFFER_IS_PRIVATE (ptr_buffer))
{
gui_printf (NULL, _("Private with: "));
gui_printf_color (NULL, COLOR_WIN_CHAT_NICK,
"%s", CHANNEL(ptr_buffer)->name);
gui_printf (NULL, _(" (server: "));
gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL,
"%s", SERVER(ptr_buffer)->name);
gui_printf (NULL, ")\n");
}
}
}
else
{
if (strcasecmp (argv[0], "move") == 0)
{
/* move buffer to another number in the list */
gui_printf (NULL, "buffer move -- NOT DEVELOPED!\n");
}
else
{
number = strtol (argv[0], &error, 10);
if (error)
if (argc < 2)
{
gui_printf (NULL, _("%s missing arguments for \"%s\" command\n"),
WEECHAT_ERROR, "buffer");
return -1;
}
error = NULL;
number = strtol (((argv[1][0] == '+') || (argv[1][0] == '-')) ? argv[1] + 1 : argv[1],
&error, 10);
if ((error) && (error[0] == '\0'))
{
if (argv[1][0] == '+')
gui_move_buffer_to_number (gui_current_window,
gui_current_window->buffer->number + ((int) number));
else if (argv[1][0] == '-')
gui_move_buffer_to_number (gui_current_window,
gui_current_window->buffer->number - ((int) number));
else
gui_move_buffer_to_number (gui_current_window, (int) number);
}
else
{
/* invalid number */
gui_printf (NULL, _("%s incorrect buffer number\n"),
WEECHAT_ERROR);
return -1;
}
if (!gui_switch_to_buffer_by_number (gui_current_window, number))
}
else
{
/* jump to buffer by number */
error = NULL;
number = strtol (argv[0], &error, 10);
if ((error) && (error[0] == '\0'))
{
gui_printf (NULL,
_("%s buffer \"%s\" not found for \"%s\" command\n"),
WEECHAT_ERROR, argv[0], "buffer");
if (!gui_switch_to_buffer_by_number (gui_current_window, (int) number))
{
gui_printf (NULL,
_("%s buffer \"%s\" not found for \"%s\" command\n"),
WEECHAT_ERROR, argv[0], "buffer");
return -1;
}
}
else
{
/* invalid number */
gui_printf (NULL, _("%s incorrect buffer number\n"),
WEECHAT_ERROR);
return -1;
}
}
}
return 0;
+85
View File
@@ -672,3 +672,88 @@ gui_switch_to_buffer_by_number (t_gui_window *window, int number)
/* buffer not found */
return NULL;
}
/*
* gui_switch_to_buffer_by_number: switch to another buffer with number
*/
void
gui_move_buffer_to_number (t_gui_window *window, int number)
{
t_gui_buffer *ptr_buffer;
int i;
/* buffer number is already ok ? */
if (number == window->buffer->number)
return;
if (number < 1)
number = 1;
/* remove buffer from list */
if (window->buffer == gui_buffers)
{
gui_buffers = window->buffer->next_buffer;
gui_buffers->prev_buffer = NULL;
}
if (window->buffer == last_gui_buffer)
{
last_gui_buffer = window->buffer->prev_buffer;
last_gui_buffer->next_buffer = NULL;
}
if (window->buffer->prev_buffer)
(window->buffer->prev_buffer)->next_buffer = window->buffer->next_buffer;
if (window->buffer->next_buffer)
(window->buffer->next_buffer)->prev_buffer = window->buffer->prev_buffer;
if (number == 1)
{
gui_buffers->prev_buffer = window->buffer;
window->buffer->prev_buffer = NULL;
window->buffer->next_buffer = gui_buffers;
gui_buffers = window->buffer;
}
else
{
/* assign new number to all buffers */
i = 1;
for (ptr_buffer = gui_buffers; ptr_buffer; ptr_buffer = ptr_buffer->next_buffer)
{
ptr_buffer->number = i++;
}
/* search for new position in the list */
for (ptr_buffer = gui_buffers; ptr_buffer; ptr_buffer = ptr_buffer->next_buffer)
{
if (ptr_buffer->number == number)
break;
}
if (ptr_buffer)
{
/* insert before buffer found */
window->buffer->prev_buffer = ptr_buffer->prev_buffer;
window->buffer->next_buffer = ptr_buffer;
if (ptr_buffer->prev_buffer)
(ptr_buffer->prev_buffer)->next_buffer = window->buffer;
ptr_buffer->prev_buffer = window->buffer;
}
else
{
/* number not found (too big)? => add to end */
window->buffer->prev_buffer = last_gui_buffer;
window->buffer->next_buffer = NULL;
last_gui_buffer->next_buffer = window->buffer;
last_gui_buffer = window->buffer;
}
}
/* assign new number to all buffers */
i = 1;
for (ptr_buffer = gui_buffers; ptr_buffer; ptr_buffer = ptr_buffer->next_buffer)
{
ptr_buffer->number = i++;
}
gui_redraw_buffer (window->buffer);
}
+1
View File
@@ -257,6 +257,7 @@ extern void gui_move_previous_word (t_gui_buffer *);
extern void gui_move_next_word (t_gui_buffer *);
extern void gui_buffer_insert_string (t_gui_buffer *, char *, int);
extern t_gui_buffer *gui_switch_to_buffer_by_number (t_gui_window *, int);
extern void gui_move_buffer_to_number (t_gui_window *, int);
/* GUI dependant functions */
extern int gui_assign_color (int *, char *);
extern int gui_get_color_by_name (char *);