diff --git a/Messages/fr/LC_MESSAGES/gajim.po b/Messages/fr/LC_MESSAGES/gajim.po index ef2c382e1..2893151a8 100644 --- a/Messages/fr/LC_MESSAGES/gajim.po +++ b/Messages/fr/LC_MESSAGES/gajim.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gajim 2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2004-07-01 17:47-0400\n" +"POT-Creation-Date: 2004-09-06 15:31+0200\n" "PO-Revision-Date: 2004-05-16 19:40-0400\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -17,66 +17,72 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: runCore.py:34 +#: runCore.py:52 msgid "Core Stopped" msgstr "Core arrêté" -#: core/core.py:75 -#, python-format +#: common/thread.py:43 +msgid "plugin %s cannot be launched : " +msgstr "Le plugin %s ne peut pas être lancé : " + +#: core/core.py:87 +msgid "The plugin %s cannot be launched" +msgstr "Le plugin %s ne peut pas être lancé" + +#: core/core.py:89 +msgid "The plugin %s is already launched" +msgstr "Le plugin %s est déjà lancé" + +#: core/core.py:122 msgid "Can't create %s" msgstr "Impossible de créer %s" -#: core/core.py:80 +#: core/core.py:127 #, python-format msgid "creating %s" msgstr "crée %s" -#: core/core.py:157 core/core.py:362 +#: core/core.py:224 core/core.py:486 msgid "I would like to add you to my roster." msgstr "Je souhaiterai t'ajouter à ma liste de contactes" -#: core/core.py:218 -#, python-format +#: core/core.py:295 msgid "Couldn't connect to %s" msgstr "Impossible de se connecter à %s" -#: core/core.py:224 core/core.py:230 -#, python-format +#: core/core.py:301 core/core.py:307 msgid "Couldn't connect to %s : %s" msgstr "Impossible de se connecter à %s : %s" -#: core/core.py:254 -#, python-format +#: core/core.py:330 msgid "Authentification failed with %s, check your login and password" -msgstr "" -"Impossible de s'authentifier à %s, vérifiez votre login et votre mot de passe" +msgstr "Impossible de s'authentifier à %s, vérifiez votre login et votre mot de passe" -#: core/core.py:494 -#, python-format +#: core/core.py:648 msgid "Unknown Command %s" msgstr "Commande inconnue %s" -#: core/core.py:548 +#: core/core.py:703 msgid "Keyboard Interrupt : Bye!" msgstr "Interruption au clavier : Au revoir !" -#: plugins/logger/logger.py:44 +#: plugins/logger/logger.py:77 msgid "plugin logger stopped" msgstr "Module logger arrêté" -#: plugins/logger/logger.py:97 +#: plugins/logger/logger.py:132 msgid "creating ~/.gajim/" msgstr "crée ~/.gajim/" -#: plugins/logger/logger.py:102 +#: plugins/logger/logger.py:137 msgid "creating ~/.gajim/logs/" msgstr "Crée ~/.gajim/logs/" -#: plugins/logger/logger.py:109 +#: plugins/logger/logger.py:140 msgid "plugin logger loaded" msgstr "Module logger chargé" -#: plugins/gtkgui/config.py:102 plugins/gtkgui/config.py:494 +#: plugins/gtkgui/config.py:102 plugins/gtkgui/config.py:495 msgid "You must be connected to get your informations" msgstr "Vous devez être connecté pour récupérer vos informations" @@ -84,15 +90,15 @@ msgstr "Vous devez être connecté pour récupérer vos informations" msgid "You must be connected to publish your informations" msgstr "Vous devez être connecté pour publier vos informations" -#: plugins/gtkgui/config.py:398 +#: plugins/gtkgui/config.py:397 msgid "You must enter a name for this account" msgstr "Vous devez entrer un nom pour ce compte" -#: plugins/gtkgui/config.py:401 +#: plugins/gtkgui/config.py:400 msgid "Spaces are not permited in account name" msgstr "Vous ne pouvez pas utiliser d'espace pour le nom du compte" -#: plugins/gtkgui/config.py:404 +#: plugins/gtkgui/config.py:403 msgid "" "You must enter a Jabber ID for this account\n" "For example : login@hostname" @@ -100,205 +106,220 @@ msgstr "" "Vous devez entrer un identifiant Jabber pour ce compte\n" "Par exemple : login@serveur" -#: plugins/gtkgui/config.py:411 +#: plugins/gtkgui/config.py:410 msgid "Proxy Port must be a port number" msgstr "Le Port du proxy doivent être un numéro de port" -#: plugins/gtkgui/config.py:414 +#: plugins/gtkgui/config.py:413 msgid "You must enter a proxy host to use proxy" msgstr "Vous devez entrer un nom de proxy pour utiliser le proxy" -#: plugins/gtkgui/config.py:419 +#: plugins/gtkgui/config.py:418 msgid "Priority must be a number" msgstr "La Priorité doit être un numéro" -#: plugins/gtkgui/config.py:459 +#: plugins/gtkgui/config.py:458 msgid "An account already has this name" msgstr "Un autre compte porte déjà ce nom" -#: plugins/gtkgui/config.py:553 -#, python-format +#: plugins/gtkgui/config.py:554 msgid "Are you sure you want to remove this account (%s) ?" msgstr "Etes vous sur de vouloir supprimer ce compte (%s) ?" -#: plugins/gtkgui/config.py:603 plugins/gtkgui/messagesGlade.c:118 -#: plugins/gtkgui/messagesGlade.c:132 plugins/gtkgui/messagesGlade.c:168 +#: plugins/gtkgui/config.py:604 plugins/gtkgui/messagesGlade.c:121 +#: plugins/gtkgui/messagesGlade.c:135 plugins/gtkgui/messagesGlade.c:171 msgid "Name" msgstr "Nom" -#: plugins/gtkgui/config.py:606 +#: plugins/gtkgui/config.py:607 plugins/gtkgui/messagesGlade.c:220 msgid "Server" msgstr "Serveur" -#: plugins/gtkgui/config.py:659 -#, python-format +#: plugins/gtkgui/config.py:660 msgid "Register to %s" msgstr "S'enregistrer à %s" -#: plugins/gtkgui/config.py:733 +#: plugins/gtkgui/config.py:802 msgid "You must be connected to view Agents" msgstr "Vous devez être connecté pour voir les Agents" #: plugins/gtkgui/dialogs.py:307 -#, python-format msgid "Subscription request from %s" msgstr "Requête d'inscription de la part de %s" -#: plugins/gtkgui/gtkgui.py:142 +#: plugins/gtkgui/gtkgui.py:175 msgid "bad arguments" msgstr "Mauvais arguments" -#: plugins/gtkgui/gtkgui.py:368 +#: plugins/gtkgui/gtkgui.py:546 msgid "Status is now : " msgstr "L'état est maintenant : " -#: plugins/gtkgui/gtkgui.py:672 -#, python-format +#: plugins/gtkgui/gtkgui.py:866 msgid "%s is now %s (%s)" msgstr "%s est maintenant %s (%s)" -#: plugins/gtkgui/gtkgui.py:686 -#, python-format +#: plugins/gtkgui/gtkgui.py:880 msgid "Are you sure you want to remove the agent %s from your roster ?" msgstr "Etes vous sur de vouloir supprimer %s de votre liste ?" -#: plugins/gtkgui/gtkgui.py:715 +#: plugins/gtkgui/gtkgui.py:909 msgid "Start chat" msgstr "Envoyer un message" -#: plugins/gtkgui/gtkgui.py:718 +#: plugins/gtkgui/gtkgui.py:912 msgid "Rename" msgstr "Renomer" -#: plugins/gtkgui/gtkgui.py:723 +#: plugins/gtkgui/gtkgui.py:917 msgid "Subscription" msgstr "Autorisation" -#: plugins/gtkgui/gtkgui.py:728 +#: plugins/gtkgui/gtkgui.py:922 msgid "Resend authorization to" msgstr "Renvoyer l'autorisation à" -#: plugins/gtkgui/gtkgui.py:731 +#: plugins/gtkgui/gtkgui.py:925 msgid "Rerequest authorization from" msgstr "Redemander l'autorisation à" -#: plugins/gtkgui/gtkgui.py:734 plugins/gtkgui/messagesGlade.c:67 +#: plugins/gtkgui/gtkgui.py:928 plugins/gtkgui/messagesGlade.c:68 msgid "I would like to add you to my contact list, please." msgstr "Je souhaiterai t'ajouter à ma contact list" -#: plugins/gtkgui/gtkgui.py:738 plugins/gtkgui/gtkgui.py:792 +#: plugins/gtkgui/gtkgui.py:932 plugins/gtkgui/gtkgui.py:986 msgid "Remove" msgstr "Supprimer" -#: plugins/gtkgui/gtkgui.py:744 +#: plugins/gtkgui/gtkgui.py:938 msgid "Informations" msgstr "" -#: plugins/gtkgui/gtkgui.py:747 plugins/gtkgui/messagesGlade.c:23 +#: plugins/gtkgui/gtkgui.py:941 plugins/gtkgui/messagesGlade.c:24 msgid "History" msgstr "Historique" -#: plugins/gtkgui/gtkgui.py:758 +#: plugins/gtkgui/gtkgui.py:952 msgid "grp1" msgstr "" -#: plugins/gtkgui/gtkgui.py:760 +#: plugins/gtkgui/gtkgui.py:954 msgid "grp2" msgstr "" -#: plugins/gtkgui/gtkgui.py:762 +#: plugins/gtkgui/gtkgui.py:956 msgid "grp3" msgstr "" -#: plugins/gtkgui/gtkgui.py:776 +#: plugins/gtkgui/gtkgui.py:970 msgid "Log on" msgstr "Connecter" -#: plugins/gtkgui/gtkgui.py:782 +#: plugins/gtkgui/gtkgui.py:976 msgid "Log off" msgstr "Déconnecter" -#: plugins/gtkgui/gtkgui.py:828 plugins/gtkgui/gtkgui.py:1370 -#: plugins/gtkgui/messagesGlade.c:117 +#: plugins/gtkgui/gtkgui.py:1022 plugins/gtkgui/gtkgui.py:1653 +#: plugins/gtkgui/messagesGlade.c:120 msgid "Status" msgstr "Etat" -#: plugins/gtkgui/gtkgui.py:833 plugins/gtkgui/gtkgui.py:1374 -#: plugins/gtkgui/messagesGlade.c:16 +#: plugins/gtkgui/gtkgui.py:1027 plugins/gtkgui/gtkgui.py:1657 +#: plugins/gtkgui/messagesGlade.c:17 msgid "Online" msgstr "En ligne" -#: plugins/gtkgui/gtkgui.py:836 plugins/gtkgui/gtkgui.py:1377 -#: plugins/gtkgui/messagesGlade.c:17 +#: plugins/gtkgui/gtkgui.py:1030 plugins/gtkgui/gtkgui.py:1660 +#: plugins/gtkgui/messagesGlade.c:18 msgid "Away" msgstr "Absent" -#: plugins/gtkgui/gtkgui.py:839 plugins/gtkgui/gtkgui.py:1380 -#: plugins/gtkgui/messagesGlade.c:18 +#: plugins/gtkgui/gtkgui.py:1033 plugins/gtkgui/gtkgui.py:1663 +#: plugins/gtkgui/messagesGlade.c:19 msgid "NA" msgstr "Non Disponible" -#: plugins/gtkgui/gtkgui.py:842 plugins/gtkgui/gtkgui.py:1383 -#: plugins/gtkgui/messagesGlade.c:19 +#: plugins/gtkgui/gtkgui.py:1036 plugins/gtkgui/gtkgui.py:1666 +#: plugins/gtkgui/messagesGlade.c:20 msgid "DND" msgstr "Ne Pas Déranger" -#: plugins/gtkgui/gtkgui.py:845 plugins/gtkgui/gtkgui.py:1386 -#: plugins/gtkgui/messagesGlade.c:20 +#: plugins/gtkgui/gtkgui.py:1039 plugins/gtkgui/gtkgui.py:1669 +#: plugins/gtkgui/messagesGlade.c:21 msgid "Invisible" msgstr "" -#: plugins/gtkgui/gtkgui.py:850 plugins/gtkgui/gtkgui.py:1391 -#: plugins/gtkgui/messagesGlade.c:21 +#: plugins/gtkgui/gtkgui.py:1044 plugins/gtkgui/gtkgui.py:1674 +#: plugins/gtkgui/messagesGlade.c:22 msgid "Offline" msgstr "Déconnecter" -#: plugins/gtkgui/gtkgui.py:857 +#: plugins/gtkgui/gtkgui.py:1051 msgid "Edit account" msgstr "Editer le compte" -#: plugins/gtkgui/gtkgui.py:913 -#, python-format +#: plugins/gtkgui/gtkgui.py:1054 plugins/gtkgui/messagesGlade.c:11 +msgid "_Browse agents" +msgstr "A_gents" + +#: plugins/gtkgui/gtkgui.py:1110 msgid "Are you sure you want to remove %s (%s) from your roster ?" msgstr "Etes vous sur de vouloir supprimer %s (%s) de votre liste ?" -#: plugins/gtkgui/gtkgui.py:949 +#: plugins/gtkgui/gtkgui.py:1146 msgid "You must setup an account before connecting to jabber network." msgstr "" "Vous devez configurer un compte pour pouvoir vous connecter au réseau Jabber" -#: plugins/gtkgui/gtkgui.py:1069 +#: plugins/gtkgui/gtkgui.py:1284 msgid "plugin gtkgui stopped" msgstr "Module gtkgui arrêté" -#: plugins/gtkgui/gtkgui.py:1398 +#: plugins/gtkgui/gtkgui.py:1681 msgid "Chat with" msgstr "Discution avec" -#: plugins/gtkgui/gtkgui.py:1425 +#: plugins/gtkgui/gtkgui.py:1708 msgid "Quit" msgstr "Quitter" -#: plugins/gtkgui/gtkgui.py:1610 -#, python-format +#: plugins/gtkgui/gtkgui.py:1891 +msgid "error while sending" +msgstr "" + +#: plugins/gtkgui/gtkgui.py:1911 msgid "You are now authorized by %s" msgstr "%s vous a autorisé" -#: plugins/gtkgui/gtkgui.py:1614 -#, python-format +#: plugins/gtkgui/gtkgui.py:1915 msgid "You are now unsubscribed by %s" msgstr "%s vous a supprimé" -#: plugins/gtkgui/gtkgui.py:1624 -#, python-format +#: plugins/gtkgui/gtkgui.py:1931 msgid "error contacting %s" msgstr "Erreur survenue pour contacter %s" -#: plugins/gtkgui/gtkgui.py:1809 +#: plugins/gtkgui/gtkgui.py:2142 msgid "plugin gtkgui loaded" msgstr "Module gtkgui chargé" -#: plugins/gtkgui/messagesGlade.c:7 plugins/gtkgui/messagesGlade.c:42 +#: plugins/sock/sock.py:110 +msgid "Connection from " +msgstr "Connexion de " + +#: plugins/sock/sock.py:120 +msgid "disconnected" +msgstr "déconnecté" + +#: plugins/sock/sock.py:161 +msgid "plugin sock stopped" +msgstr "Module sock arrêté" + +#: plugins/sock/sock.py:166 +msgid "plugin sock loaded" +msgstr "Module sock chargé" + +#: plugins/gtkgui/messagesGlade.c:7 plugins/gtkgui/messagesGlade.c:43 msgid "Gajim" msgstr "" @@ -314,10 +335,6 @@ msgstr "_Préférences" msgid "A_ccounts" msgstr "_Comptes" -#: plugins/gtkgui/messagesGlade.c:11 -msgid "_Browse agents" -msgstr "A_gents" - #: plugins/gtkgui/messagesGlade.c:12 msgid "Add" msgstr "Ajouter" @@ -327,139 +344,146 @@ msgid "Show Offline" msgstr "Montrer les déconnectés" #: plugins/gtkgui/messagesGlade.c:14 +msgid "_Join Groupchat" +msgstr "" + +#: plugins/gtkgui/messagesGlade.c:15 msgid "_About" msgstr "_A Propos" -#: plugins/gtkgui/messagesGlade.c:15 +#: plugins/gtkgui/messagesGlade.c:16 msgid "_Quit" msgstr "_Quitter" -#: plugins/gtkgui/messagesGlade.c:22 +#: plugins/gtkgui/messagesGlade.c:23 msgid "Chat" msgstr "Discution" -#: plugins/gtkgui/messagesGlade.c:24 +#: plugins/gtkgui/messagesGlade.c:25 msgid "Clear" msgstr "Effacer" -#: plugins/gtkgui/messagesGlade.c:25 +#: plugins/gtkgui/messagesGlade.c:26 msgid "Anonymous " msgstr "Annonyme " -#: plugins/gtkgui/messagesGlade.c:26 +#: plugins/gtkgui/messagesGlade.c:27 msgid "Accounts" msgstr "Comptes" -#: plugins/gtkgui/messagesGlade.c:27 +#: plugins/gtkgui/messagesGlade.c:28 msgid "_Modify" msgstr "_Modifier" -#: plugins/gtkgui/messagesGlade.c:28 plugins/gtkgui/messagesGlade.c:166 -#: plugins/gtkgui/messagesGlade.c:202 +#: plugins/gtkgui/messagesGlade.c:29 plugins/gtkgui/messagesGlade.c:169 +#: plugins/gtkgui/messagesGlade.c:205 msgid "About" msgstr "A Propos" -#: plugins/gtkgui/messagesGlade.c:29 +#: plugins/gtkgui/messagesGlade.c:30 msgid "" "Gajim\n" "\n" -"Copyright 2003-2004 Gajim Team\n" +"Copyright c 2003-2004 Gajim Team\n" "\n" "Gajim Team\n" "Vincent Hanquez (tab@snarc.org)\n" "Yann Le Boulanger (asterix@crans.org)" msgstr "" -#: plugins/gtkgui/messagesGlade.c:36 +#: plugins/gtkgui/messagesGlade.c:37 msgid "Account Modification" msgstr "Modification du compte" -#: plugins/gtkgui/messagesGlade.c:37 +#: plugins/gtkgui/messagesGlade.c:38 msgid "Name : " msgstr "Nom : " -#: plugins/gtkgui/messagesGlade.c:38 plugins/gtkgui/messagesGlade.c:43 -#: plugins/gtkgui/messagesGlade.c:44 plugins/gtkgui/messagesGlade.c:45 -#: plugins/gtkgui/messagesGlade.c:49 plugins/gtkgui/messagesGlade.c:53 -#: plugins/gtkgui/messagesGlade.c:55 plugins/gtkgui/messagesGlade.c:66 -#: plugins/gtkgui/messagesGlade.c:93 plugins/gtkgui/messagesGlade.c:111 -#: plugins/gtkgui/messagesGlade.c:119 plugins/gtkgui/messagesGlade.c:126 -#: plugins/gtkgui/messagesGlade.c:138 plugins/gtkgui/messagesGlade.c:139 -#: plugins/gtkgui/messagesGlade.c:140 plugins/gtkgui/messagesGlade.c:141 -#: plugins/gtkgui/messagesGlade.c:142 plugins/gtkgui/messagesGlade.c:143 -#: plugins/gtkgui/messagesGlade.c:150 plugins/gtkgui/messagesGlade.c:151 -#: plugins/gtkgui/messagesGlade.c:152 plugins/gtkgui/messagesGlade.c:153 -#: plugins/gtkgui/messagesGlade.c:154 plugins/gtkgui/messagesGlade.c:155 -#: plugins/gtkgui/messagesGlade.c:161 plugins/gtkgui/messagesGlade.c:162 -#: plugins/gtkgui/messagesGlade.c:163 plugins/gtkgui/messagesGlade.c:164 -#: plugins/gtkgui/messagesGlade.c:174 plugins/gtkgui/messagesGlade.c:175 -#: plugins/gtkgui/messagesGlade.c:176 plugins/gtkgui/messagesGlade.c:177 -#: plugins/gtkgui/messagesGlade.c:178 plugins/gtkgui/messagesGlade.c:179 -#: plugins/gtkgui/messagesGlade.c:186 plugins/gtkgui/messagesGlade.c:187 -#: plugins/gtkgui/messagesGlade.c:188 plugins/gtkgui/messagesGlade.c:189 -#: plugins/gtkgui/messagesGlade.c:190 plugins/gtkgui/messagesGlade.c:191 -#: plugins/gtkgui/messagesGlade.c:197 plugins/gtkgui/messagesGlade.c:198 -#: plugins/gtkgui/messagesGlade.c:199 plugins/gtkgui/messagesGlade.c:200 +#: plugins/gtkgui/messagesGlade.c:39 plugins/gtkgui/messagesGlade.c:44 +#: plugins/gtkgui/messagesGlade.c:45 plugins/gtkgui/messagesGlade.c:46 +#: plugins/gtkgui/messagesGlade.c:50 plugins/gtkgui/messagesGlade.c:54 +#: plugins/gtkgui/messagesGlade.c:56 plugins/gtkgui/messagesGlade.c:67 +#: plugins/gtkgui/messagesGlade.c:96 plugins/gtkgui/messagesGlade.c:114 +#: plugins/gtkgui/messagesGlade.c:122 plugins/gtkgui/messagesGlade.c:129 +#: plugins/gtkgui/messagesGlade.c:141 plugins/gtkgui/messagesGlade.c:142 +#: plugins/gtkgui/messagesGlade.c:143 plugins/gtkgui/messagesGlade.c:144 +#: plugins/gtkgui/messagesGlade.c:145 plugins/gtkgui/messagesGlade.c:146 +#: plugins/gtkgui/messagesGlade.c:153 plugins/gtkgui/messagesGlade.c:154 +#: plugins/gtkgui/messagesGlade.c:155 plugins/gtkgui/messagesGlade.c:156 +#: plugins/gtkgui/messagesGlade.c:157 plugins/gtkgui/messagesGlade.c:158 +#: plugins/gtkgui/messagesGlade.c:164 plugins/gtkgui/messagesGlade.c:165 +#: plugins/gtkgui/messagesGlade.c:166 plugins/gtkgui/messagesGlade.c:167 +#: plugins/gtkgui/messagesGlade.c:177 plugins/gtkgui/messagesGlade.c:178 +#: plugins/gtkgui/messagesGlade.c:179 plugins/gtkgui/messagesGlade.c:180 +#: plugins/gtkgui/messagesGlade.c:181 plugins/gtkgui/messagesGlade.c:182 +#: plugins/gtkgui/messagesGlade.c:189 plugins/gtkgui/messagesGlade.c:190 +#: plugins/gtkgui/messagesGlade.c:191 plugins/gtkgui/messagesGlade.c:192 +#: plugins/gtkgui/messagesGlade.c:193 plugins/gtkgui/messagesGlade.c:194 +#: plugins/gtkgui/messagesGlade.c:200 plugins/gtkgui/messagesGlade.c:201 +#: plugins/gtkgui/messagesGlade.c:202 plugins/gtkgui/messagesGlade.c:203 +#: plugins/gtkgui/messagesGlade.c:215 plugins/gtkgui/messagesGlade.c:222 +#: plugins/gtkgui/messagesGlade.c:223 plugins/gtkgui/messagesGlade.c:224 +#: plugins/gtkgui/messagesGlade.c:225 msgid "*" msgstr "" -#: plugins/gtkgui/messagesGlade.c:39 +#: plugins/gtkgui/messagesGlade.c:40 msgid "Ressource: " msgstr "Ressource: " -#: plugins/gtkgui/messagesGlade.c:40 +#: plugins/gtkgui/messagesGlade.c:41 msgid "Password:" msgstr "Mot de passe: " -#: plugins/gtkgui/messagesGlade.c:41 +#: plugins/gtkgui/messagesGlade.c:42 msgid "Jabber ID:" msgstr "Identifiant Jabber: " -#: plugins/gtkgui/messagesGlade.c:46 +#: plugins/gtkgui/messagesGlade.c:47 msgid "Register new account" msgstr "Enregistrer un nouveau compte" -#: plugins/gtkgui/messagesGlade.c:47 +#: plugins/gtkgui/messagesGlade.c:48 msgid "Priority:" msgstr "Priorité:" -#: plugins/gtkgui/messagesGlade.c:48 +#: plugins/gtkgui/messagesGlade.c:49 msgid "5" msgstr "" -#: plugins/gtkgui/messagesGlade.c:50 +#: plugins/gtkgui/messagesGlade.c:51 msgid "Account" msgstr "Compte" -#: plugins/gtkgui/messagesGlade.c:51 +#: plugins/gtkgui/messagesGlade.c:52 msgid "Empty" msgstr "Vide" -#: plugins/gtkgui/messagesGlade.c:52 +#: plugins/gtkgui/messagesGlade.c:53 msgid "Preferences" msgstr "Préférences" -#: plugins/gtkgui/messagesGlade.c:54 +#: plugins/gtkgui/messagesGlade.c:55 msgid "Port:" msgstr "Port:" -#: plugins/gtkgui/messagesGlade.c:56 +#: plugins/gtkgui/messagesGlade.c:57 msgid "Host:" msgstr "Serveur:" -#: plugins/gtkgui/messagesGlade.c:57 +#: plugins/gtkgui/messagesGlade.c:58 msgid "Use proxy" msgstr "Utiliser un proxy" -#: plugins/gtkgui/messagesGlade.c:58 +#: plugins/gtkgui/messagesGlade.c:59 msgid "Proxy" msgstr "" -#: plugins/gtkgui/messagesGlade.c:59 +#: plugins/gtkgui/messagesGlade.c:60 msgid "Connection" msgstr "" -#: plugins/gtkgui/messagesGlade.c:60 +#: plugins/gtkgui/messagesGlade.c:61 msgid "" "Informations about you are stored\n" "on the server." @@ -467,127 +491,135 @@ msgstr "" "Les informations vous concernant sont stoquées\n" "sur le serveur" -#: plugins/gtkgui/messagesGlade.c:62 +#: plugins/gtkgui/messagesGlade.c:63 msgid "Edit personal details..." msgstr "Editer les informationss personnelles" -#: plugins/gtkgui/messagesGlade.c:63 +#: plugins/gtkgui/messagesGlade.c:64 msgid "Details" msgstr "Détails" -#: plugins/gtkgui/messagesGlade.c:64 +#: plugins/gtkgui/messagesGlade.c:65 msgid "Add user" msgstr "Ajouter un contact" -#: plugins/gtkgui/messagesGlade.c:65 +#: plugins/gtkgui/messagesGlade.c:66 msgid "Send subscription to :" msgstr "Demander l'authorisation à : " -#: plugins/gtkgui/messagesGlade.c:68 +#: plugins/gtkgui/messagesGlade.c:69 msgid "Subscribe" msgstr "Ajouter" -#: plugins/gtkgui/messagesGlade.c:69 +#: plugins/gtkgui/messagesGlade.c:70 msgid "Sure ?" msgstr "Sur ?" -#: plugins/gtkgui/messagesGlade.c:70 +#: plugins/gtkgui/messagesGlade.c:71 msgid "Subscription request" msgstr "Requête d'inscription" -#: plugins/gtkgui/messagesGlade.c:71 +#: plugins/gtkgui/messagesGlade.c:72 msgid "Subscription request from" msgstr "Requête d'inscription de la part de" -#: plugins/gtkgui/messagesGlade.c:72 plugins/gtkgui/messagesGlade.c:77 +#: plugins/gtkgui/messagesGlade.c:73 plugins/gtkgui/messagesGlade.c:80 msgid "_Close" msgstr "_Fermer" -#: plugins/gtkgui/messagesGlade.c:73 +#: plugins/gtkgui/messagesGlade.c:74 msgid "_Deny" msgstr "_Refuser" -#: plugins/gtkgui/messagesGlade.c:74 +#: plugins/gtkgui/messagesGlade.c:75 msgid "_Authorize" msgstr "_Autoriser" -#: plugins/gtkgui/messagesGlade.c:75 +#: plugins/gtkgui/messagesGlade.c:76 msgid "Agents browser" msgstr "Navigateur d'agents" -#: plugins/gtkgui/messagesGlade.c:76 +#: plugins/gtkgui/messagesGlade.c:77 +msgid "Re_gister" +msgstr "S'enre_gistrer à" + +#: plugins/gtkgui/messagesGlade.c:78 plugins/gtkgui/messagesGlade.c:226 +msgid "_Join" +msgstr "Re_joindre" + +#: plugins/gtkgui/messagesGlade.c:79 msgid "_Refresh" msgstr "_Rafraîchir" -#: plugins/gtkgui/messagesGlade.c:78 +#: plugins/gtkgui/messagesGlade.c:81 msgid "Register to" msgstr "S'enregistrer à" -#: plugins/gtkgui/messagesGlade.c:79 +#: plugins/gtkgui/messagesGlade.c:82 msgid "_OK" msgstr "" -#: plugins/gtkgui/messagesGlade.c:80 +#: plugins/gtkgui/messagesGlade.c:83 msgid "_Cancel" msgstr "_Annuler" -#: plugins/gtkgui/messagesGlade.c:81 +#: plugins/gtkgui/messagesGlade.c:84 msgid "Warning" msgstr "Attention" -#: plugins/gtkgui/messagesGlade.c:82 plugins/gtkgui/messagesGlade.c:108 +#: plugins/gtkgui/messagesGlade.c:85 plugins/gtkgui/messagesGlade.c:111 msgid "Message" msgstr "" -#: plugins/gtkgui/messagesGlade.c:83 +#: plugins/gtkgui/messagesGlade.c:86 msgid "Preferences" msgstr "Préférences>" -#: plugins/gtkgui/messagesGlade.c:84 +#: plugins/gtkgui/messagesGlade.c:87 msgid "Look&Feel" msgstr "Apparence" -#: plugins/gtkgui/messagesGlade.c:85 plugins/gtkgui/messagesGlade.c:101 +#: plugins/gtkgui/messagesGlade.c:88 plugins/gtkgui/messagesGlade.c:104 msgid "Events" msgstr "Evénements" -#: plugins/gtkgui/messagesGlade.c:86 plugins/gtkgui/messagesGlade.c:107 +#: plugins/gtkgui/messagesGlade.c:89 plugins/gtkgui/messagesGlade.c:110 msgid "Presence" msgstr "Présence" -#: plugins/gtkgui/messagesGlade.c:87 +#: plugins/gtkgui/messagesGlade.c:90 msgid "Outgoing Messages" msgstr "Messages sortants" -#: plugins/gtkgui/messagesGlade.c:88 +#: plugins/gtkgui/messagesGlade.c:91 msgid "Status Messages" msgstr "Messages d'état" -#: plugins/gtkgui/messagesGlade.c:89 +#: plugins/gtkgui/messagesGlade.c:92 msgid "Incoming Messages" msgstr "Messages entrant" -#: plugins/gtkgui/messagesGlade.c:90 +#: plugins/gtkgui/messagesGlade.c:93 msgid "Color" msgstr "Couleur" -#: plugins/gtkgui/messagesGlade.c:91 +#: plugins/gtkgui/messagesGlade.c:94 msgid "Icon in systray" msgstr "Icône dans la barre systême" -#: plugins/gtkgui/messagesGlade.c:92 +#: plugins/gtkgui/messagesGlade.c:95 msgid "Systray" msgstr "Barre systême" -#: plugins/gtkgui/messagesGlade.c:94 +#: plugins/gtkgui/messagesGlade.c:97 msgid "Icon Style" msgstr "Style d'Icône" -#: plugins/gtkgui/messagesGlade.c:95 +#: plugins/gtkgui/messagesGlade.c:98 msgid "Look" msgstr "" -#: plugins/gtkgui/messagesGlade.c:96 +#: plugins/gtkgui/messagesGlade.c:99 msgid "" "AutoPopup new\n" "messages" @@ -595,7 +627,7 @@ msgstr "" "ouvrir automatiquement\n" "les nouveaux messages" -#: plugins/gtkgui/messagesGlade.c:98 +#: plugins/gtkgui/messagesGlade.c:101 msgid "" "Allow AutoPopup \n" "when NOT online" @@ -603,191 +635,216 @@ msgstr "" "autoriser l'autopopup\n" "lorsqu'on est pas en ligne" -#: plugins/gtkgui/messagesGlade.c:100 +#: plugins/gtkgui/messagesGlade.c:103 msgid "AutoPopup" msgstr "Popup automatique" -#: plugins/gtkgui/messagesGlade.c:102 +#: plugins/gtkgui/messagesGlade.c:105 msgid "Auto Away After" msgstr "Passer absent après" -#: plugins/gtkgui/messagesGlade.c:103 plugins/gtkgui/messagesGlade.c:105 +#: plugins/gtkgui/messagesGlade.c:106 plugins/gtkgui/messagesGlade.c:108 msgid "Minutes" msgstr "" -#: plugins/gtkgui/messagesGlade.c:104 +#: plugins/gtkgui/messagesGlade.c:107 msgid "Auto eXtanded Away After" msgstr "Passer Non Disponible après" -#: plugins/gtkgui/messagesGlade.c:106 +#: plugins/gtkgui/messagesGlade.c:109 msgid "Auto Status" msgstr "Etat automatique" -#: plugins/gtkgui/messagesGlade.c:109 +#: plugins/gtkgui/messagesGlade.c:112 msgid "Enter your message :" msgstr "Entrez votre message :" -#: plugins/gtkgui/messagesGlade.c:110 +#: plugins/gtkgui/messagesGlade.c:113 msgid "Or choose your message :" msgstr "Ou choisissez votre message :" -#: plugins/gtkgui/messagesGlade.c:112 +#: plugins/gtkgui/messagesGlade.c:115 msgid "Information" msgstr "" -#: plugins/gtkgui/messagesGlade.c:113 +#: plugins/gtkgui/messagesGlade.c:116 msgid "name" msgstr "nom" -#: plugins/gtkgui/messagesGlade.c:114 +#: plugins/gtkgui/messagesGlade.c:117 msgid "ID" msgstr "Identifiant" -#: plugins/gtkgui/messagesGlade.c:115 +#: plugins/gtkgui/messagesGlade.c:118 msgid "id" msgstr "identfiant" -#: plugins/gtkgui/messagesGlade.c:116 +#: plugins/gtkgui/messagesGlade.c:119 msgid "status" msgstr "état" -#: plugins/gtkgui/messagesGlade.c:120 +#: plugins/gtkgui/messagesGlade.c:123 msgid "Resource :" msgstr "Ressource :" -#: plugins/gtkgui/messagesGlade.c:121 +#: plugins/gtkgui/messagesGlade.c:124 msgid "resource" msgstr "ressource" -#: plugins/gtkgui/messagesGlade.c:122 +#: plugins/gtkgui/messagesGlade.c:125 msgid "Subscription :" msgstr "Inscription :" -#: plugins/gtkgui/messagesGlade.c:123 +#: plugins/gtkgui/messagesGlade.c:126 msgid "sub" msgstr "" -#: plugins/gtkgui/messagesGlade.c:124 plugins/gtkgui/messagesGlade.c:144 -#: plugins/gtkgui/messagesGlade.c:180 +#: plugins/gtkgui/messagesGlade.c:127 plugins/gtkgui/messagesGlade.c:147 +#: plugins/gtkgui/messagesGlade.c:183 msgid "General" msgstr "Général" -#: plugins/gtkgui/messagesGlade.c:125 +#: plugins/gtkgui/messagesGlade.c:128 msgid "New Group :" msgstr "Nouveau Groupe :" -#: plugins/gtkgui/messagesGlade.c:127 +#: plugins/gtkgui/messagesGlade.c:130 msgid "Available groups" msgstr "Groupes possibles" -#: plugins/gtkgui/messagesGlade.c:128 +#: plugins/gtkgui/messagesGlade.c:131 msgid "Add ->" msgstr "Ajouter ->" -#: plugins/gtkgui/messagesGlade.c:129 +#: plugins/gtkgui/messagesGlade.c:132 msgid "<- Remove" msgstr "<- Supprimer" -#: plugins/gtkgui/messagesGlade.c:130 +#: plugins/gtkgui/messagesGlade.c:133 msgid "Current groups" msgstr "Groupes actuels" -#: plugins/gtkgui/messagesGlade.c:131 +#: plugins/gtkgui/messagesGlade.c:134 msgid "Groups" msgstr "Groupes" -#: plugins/gtkgui/messagesGlade.c:133 plugins/gtkgui/messagesGlade.c:169 +#: plugins/gtkgui/messagesGlade.c:136 plugins/gtkgui/messagesGlade.c:172 +#: plugins/gtkgui/messagesGlade.c:218 msgid "Nickname" msgstr "Surnom" -#: plugins/gtkgui/messagesGlade.c:134 plugins/gtkgui/messagesGlade.c:170 +#: plugins/gtkgui/messagesGlade.c:137 plugins/gtkgui/messagesGlade.c:173 msgid "Birthday" msgstr "Anniversaire" -#: plugins/gtkgui/messagesGlade.c:135 plugins/gtkgui/messagesGlade.c:171 +#: plugins/gtkgui/messagesGlade.c:138 plugins/gtkgui/messagesGlade.c:174 msgid "E-Mail" msgstr "" -#: plugins/gtkgui/messagesGlade.c:136 plugins/gtkgui/messagesGlade.c:172 +#: plugins/gtkgui/messagesGlade.c:139 plugins/gtkgui/messagesGlade.c:175 msgid "Homepage" msgstr "Page d'accueil" -#: plugins/gtkgui/messagesGlade.c:137 plugins/gtkgui/messagesGlade.c:173 +#: plugins/gtkgui/messagesGlade.c:140 plugins/gtkgui/messagesGlade.c:176 msgid "Phone #" msgstr "Téléphone" -#: plugins/gtkgui/messagesGlade.c:145 plugins/gtkgui/messagesGlade.c:181 +#: plugins/gtkgui/messagesGlade.c:148 plugins/gtkgui/messagesGlade.c:184 msgid "Street" msgstr "Rue" -#: plugins/gtkgui/messagesGlade.c:146 plugins/gtkgui/messagesGlade.c:182 +#: plugins/gtkgui/messagesGlade.c:149 plugins/gtkgui/messagesGlade.c:185 msgid "City" msgstr "Ville" -#: plugins/gtkgui/messagesGlade.c:147 plugins/gtkgui/messagesGlade.c:183 +#: plugins/gtkgui/messagesGlade.c:150 plugins/gtkgui/messagesGlade.c:186 msgid "State" msgstr "Etat" -#: plugins/gtkgui/messagesGlade.c:148 plugins/gtkgui/messagesGlade.c:184 +#: plugins/gtkgui/messagesGlade.c:151 plugins/gtkgui/messagesGlade.c:187 msgid "Postal Code" msgstr "Code postal" -#: plugins/gtkgui/messagesGlade.c:149 plugins/gtkgui/messagesGlade.c:185 +#: plugins/gtkgui/messagesGlade.c:152 plugins/gtkgui/messagesGlade.c:188 msgid "Country" msgstr "Pays" -#: plugins/gtkgui/messagesGlade.c:156 plugins/gtkgui/messagesGlade.c:192 +#: plugins/gtkgui/messagesGlade.c:159 plugins/gtkgui/messagesGlade.c:195 msgid "Location" msgstr "Adresse" -#: plugins/gtkgui/messagesGlade.c:157 plugins/gtkgui/messagesGlade.c:193 +#: plugins/gtkgui/messagesGlade.c:160 plugins/gtkgui/messagesGlade.c:196 msgid "Company" msgstr "Companie" -#: plugins/gtkgui/messagesGlade.c:158 plugins/gtkgui/messagesGlade.c:194 +#: plugins/gtkgui/messagesGlade.c:161 plugins/gtkgui/messagesGlade.c:197 msgid "Department" msgstr "Département" -#: plugins/gtkgui/messagesGlade.c:159 plugins/gtkgui/messagesGlade.c:195 +#: plugins/gtkgui/messagesGlade.c:162 plugins/gtkgui/messagesGlade.c:198 msgid "Position" msgstr "" -#: plugins/gtkgui/messagesGlade.c:160 plugins/gtkgui/messagesGlade.c:196 +#: plugins/gtkgui/messagesGlade.c:163 plugins/gtkgui/messagesGlade.c:199 msgid "Role" msgstr "Rôle" -#: plugins/gtkgui/messagesGlade.c:165 plugins/gtkgui/messagesGlade.c:201 +#: plugins/gtkgui/messagesGlade.c:168 plugins/gtkgui/messagesGlade.c:204 msgid "Work" msgstr "Emploi" -#: plugins/gtkgui/messagesGlade.c:167 +#: plugins/gtkgui/messagesGlade.c:170 msgid "jid" msgstr "" -#: plugins/gtkgui/messagesGlade.c:203 +#: plugins/gtkgui/messagesGlade.c:206 msgid "Publish" msgstr "Publier" -#: plugins/gtkgui/messagesGlade.c:204 +#: plugins/gtkgui/messagesGlade.c:207 msgid "Retrieve" msgstr "Récupérer" -#: plugins/gtkgui/messagesGlade.c:205 +#: plugins/gtkgui/messagesGlade.c:208 msgid "Close" msgstr "Fermer" -#: plugins/gtkgui/messagesGlade.c:206 +#: plugins/gtkgui/messagesGlade.c:209 msgid "Log" msgstr "Historique" -#: plugins/gtkgui/messagesGlade.c:207 +#: plugins/gtkgui/messagesGlade.c:210 msgid "earliest" msgstr "premiers" -#: plugins/gtkgui/messagesGlade.c:208 +#: plugins/gtkgui/messagesGlade.c:211 msgid "Previous" msgstr "Précédent" -#: plugins/gtkgui/messagesGlade.c:209 +#: plugins/gtkgui/messagesGlade.c:212 msgid "latest" msgstr "derniers" + +#: plugins/gtkgui/messagesGlade.c:213 +msgid "Group chat" +msgstr "Groupes de discution" + +#: plugins/gtkgui/messagesGlade.c:214 +msgid "Subject :" +msgstr "Sujet :" + +#: plugins/gtkgui/messagesGlade.c:216 +msgid "Group" +msgstr "Groupe" + +#: plugins/gtkgui/messagesGlade.c:217 +msgid "Join Groupchat" +msgstr "Rejoindre un groupe de discution" + +#: plugins/gtkgui/messagesGlade.c:219 +msgid "Room" +msgstr "Salon" + +#: plugins/gtkgui/messagesGlade.c:221 +msgid "Password" +msgstr "Mot de passe: " diff --git a/common/jabber.py b/common/jabber.py index c77fac0f0..07d15af27 100644 --- a/common/jabber.py +++ b/common/jabber.py @@ -705,8 +705,10 @@ class Client(Connection): def discoverItems(self,jid,node=None): """ According to JEP-0030: jid is mandatory, name, node, action is optional. """ ret=[] - for i in self._discover(NS_P_DISC_ITEMS,jid,node): - ret.append(i.attrs) + disco = self._discover(NS_P_DISC_ITEMS,jid,node) + if disco: + for i in disco: + ret.append(i.attrs) return ret def discoverInfo(self,jid,node=None): @@ -714,10 +716,31 @@ class Client(Connection): For identity: category, name is mandatory, type is optional. For feature: var is mandatory""" identities , features = [] , [] - for i in self._discover(NS_P_DISC_INFO,jid,node): - if i.getName()=='identity': identities.append(i.attrs) - elif i.getName()=='feature': features.append(i.getAttr('var')) - return identities , features + disco = self._discover(NS_P_DISC_INFO,jid,node) + if disco: + for i in disco: + if i.getName()=='identity': identities.append(i.attrs) + elif i.getName()=='feature': features.append(i.getAttr('var')) + return identities, features + + def browseAgent(self,jid,node=None): + identities, features, items = [], [], [] + iq=Iq(to=jid,type='get',query=NS_BROWSE) + rep=self.SendAndWaitForResponse(iq) + if not rep: + return identities, features, items + q = rep.getTag('service') + identities = [q.attrs] + if not q: + return identities, features, items + for node in q.kids: + if node.getName() == 'ns': + features.append(node.getData()) + else: + infos = node.attrs + infos['category'] = node.getName() + items.append(node.attrs) + return identities, features, items ############################################################################# diff --git a/common/plugin.py b/common/plugin.py index 6fb16af3d..c4927a387 100644 --- a/common/plugin.py +++ b/common/plugin.py @@ -31,7 +31,7 @@ class GajimPlugin: def load(self): thr = common.thread.GajimThread(self.name, self.queueIn, self.queueOut) - thr.setDaemon(1) +# thr.setDaemon(1) thr.start() # END load # END GajimPlugin diff --git a/core/core.py b/core/core.py index 5e8f484f1..9536e4a18 100644 --- a/core/core.py +++ b/core/core.py @@ -348,6 +348,16 @@ class GajimCore: self.data = self.data[end+1:] return list_ev + def request_infos(self, account, con, jid): + identities, features = con.discoverInfo(jid) + if not identities: + identities, features, items = con.browseAgent(jid) + else: + items = con.discoverItems(jid) + self.hub.sendPlugin('AGENT_INFO', account, (jid, identities, features, items)) + for item in items: + self.request_infos(account, con, item['jid']) + def read_queue(self): while self.hub.queueIn.empty() == 0: ev = self.hub.queueIn.get() @@ -513,13 +523,18 @@ class GajimCore: groups=ev[2][2]) #('REQ_AGENTS', account, ()) elif ev[0] == 'REQ_AGENTS': - agents = con.requestAgents() +# agents = con.requestAgents() + #do we need that ? + #con.discoverInfo('jabber.lagaule.org') + agents = con.discoverItems('jabber.lagaule.org') self.hub.sendPlugin('AGENTS', ev[1], agents) - #('REQ_AGENT_INFO', account, agent) - elif ev[0] == 'REQ_AGENT_INFO': + for agent in agents: + self.request_infos(ev[1], con, agent['jid']) + #('REG_AGENT_INFO', account, agent) + elif ev[0] == 'REG_AGENT_INFO': con.requestRegInfo(ev[2]) agent_info = con.getRegInfo() - self.hub.sendPlugin('AGENT_INFO', ev[1], (ev[2], agent_info)) + self.hub.sendPlugin('REG_AGENT_INFO', ev[1], (ev[2], agent_info)) #('REG_AGENT', account, infos) elif ev[0] == 'REG_AGENT': con.sendRegInfo(ev[2]) diff --git a/plugins/gtkgui/config.py b/plugins/gtkgui/config.py index 9fba4eec1..8a2bcc04c 100644 --- a/plugins/gtkgui/config.py +++ b/plugins/gtkgui/config.py @@ -116,6 +116,7 @@ class vCard_Window: def __init__(self, jid, plugin, account): self.xml = gtk.glade.XML(GTKGUI_GLADE, 'vcard', APP) + self.window = self.xml.get_widget('vcard') self.jid = jid self.plugin = plugin self.account = account @@ -254,6 +255,7 @@ class preference_Window: def __init__(self, plugin): """Initialize Preference window""" self.xml = gtk.glade.XML(GTKGUI_GLADE, 'Preferences', APP) + self.window = self.xml.get_widget('Preferences') self.plugin = plugin self.da_in = self.xml.get_widget('drawing_in') self.da_out = self.xml.get_widget('drawing_out') @@ -497,6 +499,7 @@ class accountPreference_Window: #info must be a dictionnary def __init__(self, plugin, infos = {}): self.xml = gtk.glade.XML(GTKGUI_GLADE, 'Account', APP) + self.window = self.xml.get_widget("Account") self.plugin = plugin self.account = '' self.modify = False @@ -595,6 +598,7 @@ class accounts_Window: def __init__(self, plugin): self.plugin = plugin self.xml = gtk.glade.XML(GTKGUI_GLADE, 'Accounts', APP) + self.window = self.xml.get_widget("Accounts") self.treeview = self.xml.get_widget("treeview") model = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING) self.treeview.set_model(model) @@ -688,10 +692,35 @@ class browseAgent_Window: """When list of available agent arrive : Fill the treeview with it""" model = self.treeview.get_model() - for jid in agents.keys(): - iter = model.append() -# model.set(iter, 0, agents[jid]['name'], 1, agents[jid]['service']) - model.set(iter, 0, agents[jid]['name'], 1, jid) + for agent in agents: + iter = model.append(None, (agent['name'], agent['jid'])) + self.agent_infos[agent['jid']] = {'features' : []} + + def agent_info(self, agent, identities, features, items): + """When we recieve informations about an agent""" + model = self.treeview.get_model() + iter = model.get_iter_root() + if not iter: + return + while (1): + if agent == model.get_value(iter, 1): + break + if model.iter_has_child(iter): + iter = model.iter_children(iter) + else: + if not model.iter_next(iter): + iter = model.iter_parent(iter) + iter = model.iter_next(iter) + if not iter: + return + self.agent_infos[agent]['features'] = features + if len(identities): + self.agent_infos[agent]['identities'] = identities + if identities[0].has_key('name'): + model.set_value(iter, 0, identities[0]['name']) + for item in items: + model.append(iter, (item['name'], item['jid'])) + self.agent_infos[item['jid']] = {'identities': [item]} def on_refresh(self, widget): """When refresh button is clicked : @@ -701,19 +730,54 @@ class browseAgent_Window: def on_row_activated(self, widget, path, col=0): """When a row is activated : + Register or join the selected agent""" + pass + + def on_join_button_clicked(self, widget): + """When we want to join a conference : Ask specific informations about the selected agent and close the window""" - model = self.treeview.get_model() - iter = model.get_iter(path) + model, iter = self.treeview.get_selection().get_selected() service = model.get_value(iter, 1) - self.plugin.send('REQ_AGENT_INFO', self.account, service) + room = '' + if string.find(service, '@') > -1: + services = string.split(service, '@') + room = services[0] + service = services[1] + if not self.plugin.windows.has_key('join_gc'): + self.plugin.windows['join_gc'] = join_gc(self.plugin, self.account, service, room) + + def on_register_button_clicked(self, widget): + """When we want to register an agent : + Ask specific informations about the selected agent and close the window""" + model, iter = self.treeview.get_selection().get_selected() + service = model.get_value(iter, 1) + self.plugin.send('REG_AGENT_INFO', self.account, service) widget.get_toplevel().destroy() + + def on_cursor_changed(self, widget): + """When we select a row : + activate buttons if needed""" + model, iter = self.treeview.get_selection().get_selected() + jid = model.get_value(iter, 1) + self.register_button.set_sensitive(False) + if self.agent_infos[jid].has_key('features'): + if common.jabber.NS_REGISTER in self.agent_infos[jid]['features']: + self.register_button.set_sensitive(True) + self.join_button.set_sensitive(False) + if self.agent_infos[jid].has_key('identities'): + if len(self.agent_infos[jid]['identities']): + if self.agent_infos[jid]['identities'][0].has_key('category'): + if self.agent_infos[jid]['identities'][0]['category'] == 'conference': + self.join_button.set_sensitive(True) def __init__(self, plugin, account): xml = gtk.glade.XML(GTKGUI_GLADE, 'browser', APP) + self.window = xml.get_widget('browser') self.treeview = xml.get_widget('treeview') self.plugin = plugin self.account = account - model = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING) + self.agent_infos = {} + model = gtk.TreeStore(gobject.TYPE_STRING, gobject.TYPE_STRING) self.treeview.set_model(model) #columns renderer = gtk.CellRendererText() @@ -724,11 +788,53 @@ class browseAgent_Window: self.treeview.insert_column_with_attributes(-1, 'Service', \ renderer, text=1) + self.register_button = xml.get_widget('register_button') + self.register_button.set_sensitive(False) + self.join_button = xml.get_widget('join_button') + self.join_button.set_sensitive(False) + xml.signal_connect('gtk_widget_destroy', self.delete_event) xml.signal_connect('on_refresh_clicked', self.on_refresh) xml.signal_connect('on_row_activated', self.on_row_activated) + xml.signal_connect('on_join_button_clicked', self.on_join_button_clicked) + xml.signal_connect('on_register_button_clicked', self.on_register_button_clicked) + xml.signal_connect('on_cursor_changed', self.on_cursor_changed) xml.signal_connect('on_close_clicked', self.on_close) if self.plugin.connected[account]: self.browse() else: warning_Window(_("You must be connected to view Agents")) + +class join_gc: + def delete_event(self, widget): + """close window""" + del self.plugin.windows['join_gc'] + + def on_close(self, widget): + """When Cancel button is clicked""" + widget.get_toplevel().destroy() + + def on_join(self, widget): + """When Join button is clicked""" + nick = self.xml.get_widget('entry_nick').get_text() + room = self.xml.get_widget('entry_room').get_text() + server = self.xml.get_widget('entry_server').get_text() + passw = self.xml.get_widget('entry_pass').get_text() + jid = '%s@%s' % (room, server) + self.plugin.windows[self.account]['gc'][jid] = gtkgui.gc(jid, nick, \ + self.plugin, self.account) + #TODO: verify entries + self.plugin.send('GC_JOIN', self.account, (nick, room, server, passw)) + widget.get_toplevel().destroy() + + def __init__(self, plugin, account, server='', room = ''): + self.plugin = plugin + self.account = account + self.xml = gtk.glade.XML(GTKGUI_GLADE, 'Join_gc', APP) + self.window = self.xml.get_widget('Join_gc') + self.xml.get_widget('entry_server').set_text(server) + self.xml.get_widget('entry_room').set_text(room) + self.xml.get_widget('entry_nick').set_text(self.plugin.nicks[self.account]) + self.xml.signal_connect('gtk_widget_destroy', self.delete_event) + self.xml.signal_connect('on_cancel_clicked', self.on_close) + self.xml.signal_connect('on_join_clicked', self.on_join) diff --git a/plugins/gtkgui/dialogs.py b/plugins/gtkgui/dialogs.py index 270e0ff9c..997ca13ff 100644 --- a/plugins/gtkgui/dialogs.py +++ b/plugins/gtkgui/dialogs.py @@ -151,6 +151,7 @@ class infoUser_Window: def __init__(self, user, plugin, account): self.xml = gtk.glade.XML(GTKGUI_GLADE, 'Info_user', APP) + self.window = self.xml.get_widget("Info_user") self.plugin = plugin self.user = user self.account = account @@ -234,6 +235,7 @@ class addContact_Window: self.plugin = plugin self.account = account self.xml = gtk.glade.XML(GTKGUI_GLADE, 'Add', APP) + self.window = self.xml.get_widget('Add') if jid: self.xml.get_widget('entry_who').set_text(jid) self.xml.signal_connect('gtk_widget_destroy', self.delete_event) @@ -263,6 +265,7 @@ class about_Window: def __init__(self, plugin): xml = gtk.glade.XML(GTKGUI_GLADE, 'About', APP) + self.window = xml.get_widget('About') self.plugin = plugin xml.signal_connect('gtk_widget_destroy', self.delete_event) xml.signal_connect('on_close_clicked', self.on_close) diff --git a/plugins/gtkgui/gtkgui.glade b/plugins/gtkgui/gtkgui.glade index 1e5e83361..ef46ab2e9 100644 --- a/plugins/gtkgui/gtkgui.glade +++ b/plugins/gtkgui/gtkgui.glade @@ -2515,6 +2515,45 @@ on the server. False 0 + + + True + GTK_BUTTONBOX_START + 5 + + + + True + True + True + Re_gister + True + GTK_RELIEF_NORMAL + True + + + + + + + True + True + True + _Join + True + GTK_RELIEF_NORMAL + True + + + + + + 2 + False + True + + + 5 @@ -2534,6 +2573,7 @@ on the server. False True + @@ -7152,6 +7192,7 @@ when NOT online GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST + diff --git a/plugins/gtkgui/gtkgui.py b/plugins/gtkgui/gtkgui.py index e0f44c7a8..bba3d0e89 100644 --- a/plugins/gtkgui/gtkgui.py +++ b/plugins/gtkgui/gtkgui.py @@ -63,8 +63,8 @@ APP = i18n.APP gtk.glade.bindtextdomain (APP, i18n.DIR) gtk.glade.textdomain (APP) -from config import * from dialogs import * +from config import * GTKGUI_GLADE='plugins/gtkgui/gtkgui.glade' @@ -393,6 +393,10 @@ class gc: #scroll to the end of the textview conversation.scroll_to_mark(buffer.get_mark('end'), 0.1, 0, 0, 0) + def on_focus(self, widget, event): + """When window get focus""" + self.plugin.systray.remove_jid(self.jid, self.account) + def __init__(self, jid, nick, plugin, account): self.jid = jid self.nick = nick @@ -435,39 +439,10 @@ class gc: color = self.plugin.config['statusmsgcolor'] self.tagStatus.set_property("foreground", color) self.xml.signal_connect('gtk_widget_destroy', self.delete_event) + self.xml.signal_connect('on_focus', self.on_focus) self.xml.signal_connect('on_msg_key_press_event', \ self.on_msg_key_press_event) -class join_gc: - def delete_event(self, widget): - """close window""" - del self.plugin.windows['join_gc'] - - def on_close(self, widget): - """When Cancel button is clicked""" - widget.get_toplevel().destroy() - - def on_join(self, widget): - """When Join button is clicked""" - nick = self.xml.get_widget('entry_nick').get_text() - room = self.xml.get_widget('entry_room').get_text() - server = self.xml.get_widget('entry_server').get_text() - passw = self.xml.get_widget('entry_pass').get_text() - jid = '%s@%s' % (room, server) - self.plugin.windows[self.account]['gc'][jid] = gc(jid, nick, \ - self.plugin, self.account) - #TODO: verify entries - self.plugin.send('GC_JOIN', self.account, (nick, room, server, passw)) - widget.get_toplevel().destroy() - - def __init__(self, plugin, account): - self.plugin = plugin - self.account = account - self.xml = gtk.glade.XML(GTKGUI_GLADE, 'Join_gc', APP) - self.xml.signal_connect('gtk_widget_destroy', self.delete_event) - self.xml.signal_connect('on_cancel_clicked', self.on_close) - self.xml.signal_connect('on_join_clicked', self.on_join) - class log_Window: """Class for bowser agent window : to know the agents on the selected server""" @@ -581,6 +556,7 @@ class log_Window: self.nb_line = 0 self.num_begin = 0 self.xml = gtk.glade.XML(GTKGUI_GLADE, 'Log', APP) + self.window = self.xml.get_widget('Log') self.xml.signal_connect('gtk_widget_destroy', self.delete_event) self.xml.signal_connect('on_close_clicked', self.on_close) self.xml.signal_connect('on_earliest_clicked', self.on_earliest) @@ -1076,6 +1052,9 @@ class roster_Window: item = gtk.MenuItem(_("Edit account")) menu.append(item) item.connect("activate", self.on_edit_account, account) + item = gtk.MenuItem(_("_Browse agents")) + menu.append(item) + item.connect("activate", self.on_browse, account) menu.popup(None, None, None, event.button, event.time) menu.show_all() @@ -1293,7 +1272,7 @@ class roster_Window: if type(w) == type({}): self.close_all(w) else: - w.event(gtk.gdk.Event(gtk.gdk.DESTROY)) + w.window.destroy() def on_quit(self, widget): """When we quit the gtk plugin : @@ -1302,7 +1281,7 @@ class roster_Window: self.plugin.send('CONFIG', None, ('GtkGui', self.plugin.config)) self.plugin.send('QUIT', None, ('gtkgui', 0)) print _("plugin gtkgui stopped") -# self.close_all(self.plugin.windows) + self.close_all(self.plugin.windows) self.plugin.systray.t.destroy() gtk.main_quit() # gtk.gdk.threads_leave() @@ -1427,9 +1406,6 @@ class roster_Window: image.set_from_pixbuf(pix) break for state in ('online', 'away', 'xa', 'dnd', 'invisible', 'offline'): -# image = gtk.Image() -# image.set_from_pixbuf(self.pixbufs[state]) -# image.show() self.xml.get_widget(state).set_image(self.pixbufs[state]) def on_show_off(self, widget): @@ -1747,6 +1723,10 @@ class systray: else: account = self.jids[0][0] jid = self.jids[0][1] + if string.find(jid, '@'): + if self.plugin.windows[account]['gc'].has_key(jid): + self.plugin.windows[account]['gc'][jid].window.present() + return if self.plugin.windows[account]['chats'].has_key(jid): self.plugin.windows[account]['chats'][jid].window.present() else: @@ -1933,13 +1913,19 @@ class plugin: #TODO: change icon warning_Window(_("You are now unsubscribed by %s") % jid) - def handle_event_agents(self, account, para): + def handle_event_agents(self, account, agents): #('AGENTS', account, agents) if self.windows[account].has_key('browser'): - self.windows[account]['browser'].agents(para) + self.windows[account]['browser'].agents(agents) def handle_event_agent_info(self, account, array): - #('AGENTS_INFO', account, (agent, infos)) + #('AGENT_INFO', account, (agent, identities, features, items)) + if self.windows[account].has_key('browser'): + self.windows[account]['browser'].agent_info(array[0], array[1], \ + array[2], array[3]) + + def handle_event_reg_agent_info(self, account, array): + #('REG_AGENTS_INFO', account, (agent, infos)) if not array[1].has_key('instructions'): warning_Window(_("error contacting %s") % array[0]) else: @@ -2044,6 +2030,8 @@ class plugin: self.handle_event_agents(ev[1], ev[2]) elif ev[0] == 'AGENT_INFO': self.handle_event_agent_info(ev[1], ev[2]) + elif ev[0] == 'REG_AGENT_INFO': + self.handle_event_reg_agent_info(ev[1], ev[2]) elif ev[0] == 'ACC_OK': self.handle_event_acc_ok(ev[1], ev[2]) elif ev[0] == 'QUIT': @@ -2091,13 +2079,16 @@ class plugin: def __init__(self, quIN, quOUT): gtk.gdk.threads_init() + #in pygtk2.4 + #gtk.window_set_default_icon(??pixbuf??) # gtk.gdk.threads_enter() self.queueIN = quIN self.queueOUT = quOUT self.send('REG_MESSAGE', 'gtkgui', ['ROSTER', 'WARNING', 'STATUS', \ 'NOTIFY', 'MSG', 'MSGERROR', 'SUBSCRIBED', 'UNSUBSCRIBED', \ - 'SUBSCRIBE', 'AGENTS', 'AGENT_INFO', 'QUIT', 'ACC_OK', 'CONFIG', \ - 'MYVCARD', 'VCARD', 'LOG_NB_LINE', 'LOG_LINE', 'VISUAL', 'GC_MSG']) + 'SUBSCRIBE', 'AGENTS', 'AGENT_INFO', 'REG_AGENT_INFO', 'QUIT', \ + 'ACC_OK', 'CONFIG', 'MYVCARD', 'VCARD', 'LOG_NB_LINE', 'LOG_LINE', \ + 'VISUAL', 'GC_MSG']) self.send('ASK_CONFIG', None, ('GtkGui', 'GtkGui', {'autopopup':1,\ 'autopopupaway':1,\ 'showoffline':0,\