Author: js Date: 2008-11-28 19:47:04 +0100 (Fri, 28 Nov 2008) New Revision: 10716
Modified: branches/osx_newbuildsys/configure.ac branches/osx_newbuildsys/gajim.nsi branches/osx_newbuildsys/po/de.po branches/osx_newbuildsys/po/ru.po branches/osx_newbuildsys/src/chat_control.py branches/osx_newbuildsys/src/common/config.py branches/osx_newbuildsys/src/common/connection.py branches/osx_newbuildsys/src/common/defs.py branches/osx_newbuildsys/src/common/helpers.py branches/osx_newbuildsys/src/common/optparser.py branches/osx_newbuildsys/src/common/pep.py branches/osx_newbuildsys/src/common/pubsub.py branches/osx_newbuildsys/src/common/socks5.py branches/osx_newbuildsys/src/common/xmpp/auth_nb.py branches/osx_newbuildsys/src/common/xmpp/dispatcher_nb.py branches/osx_newbuildsys/src/common/xmpp/simplexml.py branches/osx_newbuildsys/src/common/xmpp/transports_nb.py branches/osx_newbuildsys/src/common/zeroconf/client_zeroconf.py branches/osx_newbuildsys/src/common/zeroconf/connection_zeroconf.py branches/osx_newbuildsys/src/config.py branches/osx_newbuildsys/src/conversation_textview.py branches/osx_newbuildsys/src/features_window.py branches/osx_newbuildsys/src/gajim.py branches/osx_newbuildsys/src/history_window.py branches/osx_newbuildsys/src/message_window.py branches/osx_newbuildsys/src/music_track_listener.py branches/osx_newbuildsys/src/notify.py branches/osx_newbuildsys/src/roster_window.py branches/osx_newbuildsys/src/session.py Log: Merge trunk r10714.
Modified: branches/osx_newbuildsys/configure.ac =================================================================== --- branches/osx_newbuildsys/configure.ac 2008-11-28 18:38:03 UTC (rev 10715) +++ branches/osx_newbuildsys/configure.ac 2008-11-28 18:47:04 UTC (rev 10716) @@ -1,5 +1,5 @@ AC_INIT([Gajim - A Jabber Instant Messager], - [0.12-beta1],[http://trac.gajim.org/%5D,%5Bgajim]) + [0.12.0.1-svn],[http://trac.gajim.org/%5D,%5Bgajim]) AC_PREREQ([2.59]) AC_CONFIG_MACRO_DIR(m4) AC_CONFIG_SRCDIR(src)
Modified: branches/osx_newbuildsys/gajim.nsi =================================================================== --- branches/osx_newbuildsys/gajim.nsi 2008-11-28 18:38:03 UTC (rev 10715) +++ branches/osx_newbuildsys/gajim.nsi 2008-11-28 18:47:04 UTC (rev 10716) @@ -146,21 +146,21 @@ File "THANKS.artists"
SetOutPath "$INSTDIR\bin" - File "bin_cairo.pyd" + File "bin\cairo._cairo.pyd" File "bin_ctypes.pyd" - File "bin_gobject.pyd" - File "bin_gtk.pyd" + File "bin\gobject._gobject.pyd" + File "bin\gtk._gtk.pyd" File "bin_hashlib.pyd" File "bin_socket.pyd" File "bin_sqlite3.pyd" File "bin_ssl.pyd" File "bin_win32sysloader.pyd" - File "bin\AES.pyd" + File "bin\Crypto.Cipher.AES.pyd" File "bin\atk.pyd" File "bin\bz2.pyd" - File "bin\crypto.pyd" + File "bin\OpenSSL.crypto.pyd" File "bin\gajim.exe" - File "bin\glade.pyd" + File "bin\gtk.glade.pyd" File "bin\history_manager.exe" File "bin\libeay32.dll" File "bin\libglade-2.0-0.dll" @@ -172,12 +172,12 @@ File "bin\pyexpat.pyd" File "bin\python25.dll" File "bin\pywintypes25.dll" - File "bin\rand.pyd" + File "bin\OpenSSL.rand.pyd" File "bin\select.pyd" - File "bin\SHA256.pyd" + File "bin\Crypto.Hash.SHA256.pyd" File "bin\sqlite3.dll" File "bin\ssleay32.dll" - File "bin\SSL.pyd" + File "bin\OpenSSL.SSL.pyd" File "bin\unicodedata.pyd" File "bin\w9xpopen.exe" File "bin\win32api.pyd"
Modified: branches/osx_newbuildsys/po/de.po =================================================================== --- branches/osx_newbuildsys/po/de.po 2008-11-28 18:38:03 UTC (rev 10715) +++ branches/osx_newbuildsys/po/de.po 2008-11-28 18:47:04 UTC (rev 10716) @@ -9418,7 +9418,7 @@
#: ../src/systray.py:322 msgid "Hide this menu" -msgstr "Versteckt dieses Menü" +msgstr "Dieses Menü ausblenden"
#: ../src/tooltips.py:327 ../src/tooltips.py:521 msgid "Jabber ID: "
Modified: branches/osx_newbuildsys/po/ru.po =================================================================== --- branches/osx_newbuildsys/po/ru.po 2008-11-28 18:38:03 UTC (rev 10715) +++ branches/osx_newbuildsys/po/ru.po 2008-11-28 18:47:04 UTC (rev 10716) @@ -13,8 +13,8 @@ msgstr "" "Project-Id-Version: ru\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-11-16 20:37+0100\n" -"PO-Revision-Date: 2008-11-18 00:30+0300\n" +"POT-Creation-Date: 2008-11-23 17:55+0100\n" +"PO-Revision-Date: 2008-11-23 16:54+0300\n" "Last-Translator: Fomin Denis fominde@mail.ru\n" "Language-Team: Русский ru@li.org\n" "MIME-Version: 1.0\n" @@ -1024,30 +1024,44 @@ msgid "_Start Chat" msgstr "_Начать беседу"
+#. Execute Command #: ../data/glade/chat_control_popup_menu.glade.h:1 +#: ../data/glade/roster_contact_context_menu.glade.h:5 +#: ../src/roster_window.py:5695 +msgid "Execute Command..." +msgstr "Выполнить команду..." + +#: ../data/glade/chat_control_popup_menu.glade.h:2 msgid "Invite _Contacts" msgstr "Пригласить _участников"
-#: ../data/glade/chat_control_popup_menu.glade.h:2 +#. Send Custom Status +#: ../data/glade/chat_control_popup_menu.glade.h:3 +#: ../data/glade/roster_contact_context_menu.glade.h:8 +#: ../src/roster_window.py:5074 ../src/roster_window.py:5661 +msgid "Send Cus_tom Status" +msgstr "Установи_ть статус" + +#: ../data/glade/chat_control_popup_menu.glade.h:4 #: ../data/glade/gc_occupants_menu.glade.h:3 #: ../data/glade/zeroconf_contact_context_menu.glade.h:4 msgid "Send _File" msgstr "Отправить _файл"
-#: ../data/glade/chat_control_popup_menu.glade.h:3 +#: ../data/glade/chat_control_popup_menu.glade.h:5 msgid "Toggle End to End Encryption" msgstr "Включить End to End шифрование"
-#: ../data/glade/chat_control_popup_menu.glade.h:4 +#: ../data/glade/chat_control_popup_menu.glade.h:6 msgid "Toggle Open_PGP Encryption" msgstr "Включить Open_PGP шифрование"
-#: ../data/glade/chat_control_popup_menu.glade.h:5 +#: ../data/glade/chat_control_popup_menu.glade.h:7 #: ../data/glade/gc_occupants_menu.glade.h:4 msgid "_Add to Roster" msgstr "_Добавить в ростер"
-#: ../data/glade/chat_control_popup_menu.glade.h:6 +#: ../data/glade/chat_control_popup_menu.glade.h:8 #: ../data/glade/gc_control_popup_menu.glade.h:6 #: ../data/glade/gc_occupants_menu.glade.h:7 #: ../data/glade/roster_contact_context_menu.glade.h:17 @@ -1197,7 +1211,7 @@ "Контакт\n" "Баннер в окне чата"
-#: ../data/glade/gajim_themes_window.glade.h:6 ../src/chat_control.py:752 +#: ../data/glade/gajim_themes_window.glade.h:6 ../src/chat_control.py:753 msgid "Bold" msgstr "Полужирный"
@@ -1221,7 +1235,7 @@ msgid "Inactive" msgstr "Неактивен"
-#: ../data/glade/gajim_themes_window.glade.h:12 ../src/chat_control.py:753 +#: ../data/glade/gajim_themes_window.glade.h:12 ../src/chat_control.py:754 msgid "Italic" msgstr "Курсив"
@@ -1429,8 +1443,8 @@ msgid "Room:" msgstr "Комната:"
-#: ../data/glade/join_groupchat_window.glade.h:7 ../src/disco.py:1197 -#: ../src/disco.py:1618 +#: ../data/glade/join_groupchat_window.glade.h:7 ../src/disco.py:1199 +#: ../src/disco.py:1620 msgid "_Join" msgstr "_Присоединиться"
@@ -2359,12 +2373,6 @@ msgid "Edit _Groups..." msgstr "Редактировать _группы"
-#. Execute Command -#: ../data/glade/roster_contact_context_menu.glade.h:5 -#: ../src/roster_window.py:5695 -msgid "Execute Command..." -msgstr "Выполнить команду..." - #. Invite to #. Invite to Groupchat #: ../data/glade/roster_contact_context_menu.glade.h:6 @@ -2376,12 +2384,6 @@ msgid "Remo_ve" msgstr "_Удалить"
-#. Send Custom Status -#: ../data/glade/roster_contact_context_menu.glade.h:8 -#: ../src/roster_window.py:5074 ../src/roster_window.py:5661 -msgid "Send Cus_tom Status" -msgstr "Установи_ть статус" - #: ../data/glade/roster_contact_context_menu.glade.h:9 msgid "Send Single _Message..." msgstr "Отправить одиночное _сообщение..." @@ -2490,7 +2492,7 @@ msgid "_Contents" msgstr "_Содержание"
-#: ../data/glade/roster_window.glade.h:17 ../src/disco.py:1351 +#: ../data/glade/roster_window.glade.h:17 ../src/disco.py:1353 msgid "_Edit" msgstr "_Правка"
@@ -2535,7 +2537,7 @@ msgid "_Information" msgstr "_Информация о контакте"
-#: ../data/glade/search_window.glade.h:5 ../src/disco.py:1209 +#: ../data/glade/search_window.glade.h:5 ../src/disco.py:1211 msgid "_Search" msgstr "_Поиск"
@@ -2830,7 +2832,7 @@ msgid "Text" msgstr "Текст"
-#: ../src/advanced.py:102 ../src/chat_control.py:772 +#: ../src/advanced.py:102 ../src/chat_control.py:773 msgid "Color" msgstr "Цвет"
@@ -2860,145 +2862,145 @@ #. #!/bin/sh #. LANG=$(for i in *.po; do j=${i/.po/}; echo -n "_('"$j"')":" '"$j"', " ; done) #. echo "{_('en'):'en'",$LANG"}" -#: ../src/chat_control.py:68 +#: ../src/chat_control.py:69 msgid "English" msgstr "Английский"
-#: ../src/chat_control.py:68 +#: ../src/chat_control.py:69 msgid "Belarusian" msgstr "Белорусский"
-#: ../src/chat_control.py:68 +#: ../src/chat_control.py:69 msgid "Bulgarian" msgstr "Болгарский"
-#: ../src/chat_control.py:68 +#: ../src/chat_control.py:69 msgid "Breton" msgstr "Бретонский"
-#: ../src/chat_control.py:68 +#: ../src/chat_control.py:69 msgid "Czech" msgstr "Чешский"
-#: ../src/chat_control.py:68 +#: ../src/chat_control.py:69 msgid "German" msgstr "Немецкий"
-#: ../src/chat_control.py:68 +#: ../src/chat_control.py:69 msgid "Greek" msgstr "Греческий"
-#: ../src/chat_control.py:68 +#: ../src/chat_control.py:69 msgid "British" msgstr "Британский"
-#: ../src/chat_control.py:68 +#: ../src/chat_control.py:69 msgid "Esperanto" msgstr "Эсперанто"
-#: ../src/chat_control.py:68 +#: ../src/chat_control.py:69 msgid "Spanish" msgstr "Испанский"
-#: ../src/chat_control.py:68 +#: ../src/chat_control.py:69 msgid "Basque" msgstr "Баскский"
-#: ../src/chat_control.py:68 +#: ../src/chat_control.py:69 msgid "French" msgstr "Французский"
-#: ../src/chat_control.py:68 +#: ../src/chat_control.py:69 msgid "Croatian" msgstr "Хорватский"
-#: ../src/chat_control.py:68 +#: ../src/chat_control.py:69 msgid "Italian" msgstr "Итальянский"
-#: ../src/chat_control.py:68 +#: ../src/chat_control.py:69 msgid "Norwegian (b)" msgstr "Норвежский (букмол)"
-#: ../src/chat_control.py:68 +#: ../src/chat_control.py:69 msgid "Dutch" msgstr "Голландский"
-#: ../src/chat_control.py:68 +#: ../src/chat_control.py:69 msgid "Norwegian" msgstr "Норвежский"
-#: ../src/chat_control.py:68 +#: ../src/chat_control.py:69 msgid "Polish" msgstr "Польский"
-#: ../src/chat_control.py:68 +#: ../src/chat_control.py:69 msgid "Portuguese" msgstr "Португальский"
-#: ../src/chat_control.py:68 +#: ../src/chat_control.py:69 msgid "Brazilian Portuguese" msgstr "Португальский (Бразилия)"
-#: ../src/chat_control.py:68 +#: ../src/chat_control.py:69 msgid "Russian" msgstr "Русский"
-#: ../src/chat_control.py:68 +#: ../src/chat_control.py:69 msgid "Serbian" msgstr "Сербский"
-#: ../src/chat_control.py:68 +#: ../src/chat_control.py:69 msgid "Slovak" msgstr "Словацкий"
-#: ../src/chat_control.py:68 +#: ../src/chat_control.py:69 msgid "Swedish" msgstr "Шведский"
-#: ../src/chat_control.py:68 +#: ../src/chat_control.py:69 msgid "Chinese (Ch)" msgstr "Китайский"
-#: ../src/chat_control.py:336 +#: ../src/chat_control.py:337 msgid "Spelling language" msgstr "Язык проверки орфографии"
#. we are not connected -#: ../src/chat_control.py:359 ../src/chat_control.py:555 +#: ../src/chat_control.py:360 ../src/chat_control.py:556 msgid "A connection is not available" msgstr "Подключение недоступно"
-#: ../src/chat_control.py:360 ../src/chat_control.py:556 +#: ../src/chat_control.py:361 ../src/chat_control.py:557 msgid "Your message can not be sent until you are connected." msgstr "Ваше сообщение не может быть отправлено, пока вы не подключитесь."
-#: ../src/chat_control.py:754 +#: ../src/chat_control.py:755 msgid "Underline" msgstr "Подчеркнутый"
-#: ../src/chat_control.py:755 +#: ../src/chat_control.py:756 msgid "Strike" msgstr "Зачеркнутый"
-#: ../src/chat_control.py:778 +#: ../src/chat_control.py:779 msgid "Font" msgstr "Шрифт"
-#: ../src/chat_control.py:787 +#: ../src/chat_control.py:788 msgid "Clear formating" msgstr "Удалить форматирование"
-#: ../src/chat_control.py:1215 ../src/chat_control.py:1611 +#: ../src/chat_control.py:1218 ../src/chat_control.py:1620 msgid "GPG encryption enabled" msgstr "GPG шифрование включено"
#. Add to roster #. add_to_roster_menuitem -#: ../src/chat_control.py:1237 ../src/chat_control.py:2107 +#: ../src/chat_control.py:1246 ../src/chat_control.py:2122 #: ../src/common/contacts.py:113 ../src/common/helpers.py:73 #: ../src/common/helpers.py:303 ../src/conversation_textview.py:845 -#: ../src/dialogs.py:904 ../src/gajim.py:1633 ../src/normal_control.py:483 +#: ../src/dialogs.py:904 ../src/gajim.py:1637 ../src/normal_control.py:483 #: ../src/roster_window.py:916 ../src/roster_window.py:1542 #: ../src/roster_window.py:1544 ../src/roster_window.py:1880 #: ../src/roster_window.py:3111 ../src/roster_window.py:3135 @@ -3006,19 +3008,19 @@ msgid "Not in Roster" msgstr "Не в ростере"
-#: ../src/chat_control.py:1369 ../src/tooltips.py:627 +#: ../src/chat_control.py:1378 ../src/tooltips.py:627 msgid "Unknown Artist" msgstr "Неизвестный исполнитель"
-#: ../src/chat_control.py:1371 ../src/tooltips.py:632 +#: ../src/chat_control.py:1380 ../src/tooltips.py:632 msgid "Unknown Title" msgstr "Неизвестная песня"
-#: ../src/chat_control.py:1373 ../src/tooltips.py:637 +#: ../src/chat_control.py:1382 ../src/tooltips.py:637 msgid "Unknown Source" msgstr "Неизвестный альбом"
-#: ../src/chat_control.py:1377 ../src/tooltips.py:639 +#: ../src/chat_control.py:1386 ../src/tooltips.py:639 #, python-format msgid "" "<b>"%(title)s"</b> by <i>%(artist)s</i>\n" @@ -3027,7 +3029,7 @@ "<b>«%(title)s»</b> <i>%(artist)s</i>\n" "из <i>%(source)s</i>"
-#: ../src/chat_control.py:1382 +#: ../src/chat_control.py:1391 #, python-format msgid "" "%(title)s by %(artist)s\n" @@ -3036,17 +3038,17 @@ "%(title)s by %(artist)s\n" "из %(source)s"
-#: ../src/chat_control.py:1506 +#: ../src/chat_control.py:1515 #, python-format msgid "%(nickname)s from group chat %(room_name)s" msgstr "%(nickname)s из комнаты %(room_name)s"
#. No key assigned nor a key is used by remote contact -#: ../src/chat_control.py:1591 ../src/dialogs.py:3911 +#: ../src/chat_control.py:1600 ../src/dialogs.py:3911 msgid "No GPG key assigned" msgstr "Ключ GPG не присвоен"
-#: ../src/chat_control.py:1592 +#: ../src/chat_control.py:1601 msgid "" "No GPG key is assigned to this contact. So you cannot encrypt messages with " "GPG." @@ -3054,50 +3056,50 @@ "Этому контакту не присвоен ключ GPG, поэтому вы не можете зашифровать " "сообщения с помощью GPG."
-#: ../src/chat_control.py:1601 +#: ../src/chat_control.py:1610 msgid "GPG encryption disabled" msgstr "GPG шифрование выключено"
-#: ../src/chat_control.py:1626 +#: ../src/chat_control.py:1635 msgid "Session WILL be logged" msgstr "Для сеанса БУДЕТ сохранена история сообщений"
-#: ../src/chat_control.py:1628 +#: ../src/chat_control.py:1637 msgid "Session WILL NOT be logged" msgstr "Для сеанса НЕ БУДЕТ сохранена история сообщений"
#. encryption %s active -#: ../src/chat_control.py:1642 +#: ../src/chat_control.py:1651 msgid "is" msgstr "было"
-#: ../src/chat_control.py:1642 +#: ../src/chat_control.py:1651 msgid "is NOT" msgstr "НЕ"
#. chat session %s be logged -#: ../src/chat_control.py:1644 +#: ../src/chat_control.py:1653 msgid "will" msgstr "будет"
-#: ../src/chat_control.py:1644 +#: ../src/chat_control.py:1653 msgid "will NOT" msgstr "НЕ будет"
#. About encrypted chat session -#: ../src/chat_control.py:1648 +#: ../src/chat_control.py:1657 msgid "and authenticated" msgstr "и заверено"
#. About encrypted chat session -#: ../src/chat_control.py:1652 +#: ../src/chat_control.py:1661 msgid "and NOT authenticated" msgstr "и НЕ заверено"
#. status will become 'is' or 'is not', authentificaed will become #. 'and authentificated' or 'and not authentificated', logged will become #. 'will' or 'will not' -#: ../src/chat_control.py:1658 +#: ../src/chat_control.py:1667 #, python-format msgid "" "%(type)s encryption %(status)s active %(authenticated)s.\n" @@ -3106,26 +3108,26 @@ "%(type)s шифрование %(status)s включено %(authenticated)s.\n" "Для сеанса %(logged)s сохранена история сообщений."
-#: ../src/chat_control.py:1706 +#: ../src/chat_control.py:1715 msgid "Command not supported for zeroconf account." msgstr "Команда не поддерживается учетной записью zeroconf."
-#: ../src/chat_control.py:1717 ../src/groupchat_control.py:1653 +#: ../src/chat_control.py:1726 ../src/groupchat_control.py:1653 #, python-format msgid "Commands: %s" msgstr "Команды: %s"
-#: ../src/chat_control.py:1720 ../src/groupchat_control.py:1667 +#: ../src/chat_control.py:1729 ../src/groupchat_control.py:1667 #, python-format msgid "Usage: /%s, clears the text window." msgstr "Использование: /%s, очищает текстовое окно."
-#: ../src/chat_control.py:1723 ../src/groupchat_control.py:1672 +#: ../src/chat_control.py:1732 ../src/groupchat_control.py:1672 #, python-format msgid "Usage: /%s, hide the chat buttons." msgstr "Использование: /%s, скрывает кнопки беседы."
-#: ../src/chat_control.py:1726 ../src/groupchat_control.py:1688 +#: ../src/chat_control.py:1735 ../src/groupchat_control.py:1688 #, python-format msgid "" "Usage: /%(command)s <action>, sends action to the current group chat. Use " @@ -3134,38 +3136,38 @@ "Использование: /%(command)s <действие>, совершает действие в текущей " "комнате. Используйте третье лицо (например, «/%(command)s взрывается».)"
-#: ../src/chat_control.py:1731 +#: ../src/chat_control.py:1740 #, python-format msgid "Usage: /%s, sends a ping to the contact" msgstr "Использование: /%s, посылает пинг контакту"
-#: ../src/chat_control.py:1734 +#: ../src/chat_control.py:1743 #, python-format msgid "Usage: /%s, send the message to the contact" msgstr "Использование: /%s, посылает сообщение контакту"
-#: ../src/chat_control.py:1737 ../src/groupchat_control.py:1711 +#: ../src/chat_control.py:1746 ../src/groupchat_control.py:1711 #, python-format msgid "No help info for /%s" msgstr "Нет подсказки для /%s"
-#: ../src/chat_control.py:1870 +#: ../src/chat_control.py:1878 msgid "Session negotiation cancelled" msgstr "Установление сеанса отменено"
-#: ../src/chat_control.py:1877 +#: ../src/chat_control.py:1885 msgid "This session is encrypted" msgstr "Сеанс зашифрован"
-#: ../src/chat_control.py:1880 +#: ../src/chat_control.py:1888 msgid " and WILL be logged" msgstr " и БУДЕТ сохранена история сообщений"
-#: ../src/chat_control.py:1882 +#: ../src/chat_control.py:1890 msgid " and WILL NOT be logged" msgstr " и НЕ БУДЕТ сохранена история сообщений"
-#: ../src/chat_control.py:1887 +#: ../src/chat_control.py:1895 msgid "" "Remote contact's identity not verified. Click the shield button for more " "details." @@ -3173,25 +3175,25 @@ "Личность удаленного контакта не подтверждена. Нажмите на кнопке со щитом для " "подробностей."
-#: ../src/chat_control.py:1889 +#: ../src/chat_control.py:1897 msgid "E2E encryption disabled" msgstr "E2E шифрование выключено"
-#: ../src/chat_control.py:1918 ../src/chat_control.py:1931 +#: ../src/chat_control.py:1926 ../src/chat_control.py:1939 msgid "The following message was NOT encrypted" msgstr "Последнее сообщение НЕ БЫЛО зашифровано"
-#: ../src/chat_control.py:1924 +#: ../src/chat_control.py:1932 msgid "The following message was encrypted" msgstr "Последнее сообщение зашифровано"
#. %s is being replaced in the code with JID -#: ../src/chat_control.py:2295 +#: ../src/chat_control.py:2365 #, python-format msgid "You just received a new message from "%s"" msgstr "Получено новое сообщение от «%s»"
-#: ../src/chat_control.py:2296 +#: ../src/chat_control.py:2366 msgid "" "If you close this tab and you have history disabled, this message will be " "lost." @@ -3199,15 +3201,15 @@ "Если вы закроете эту вкладку и у вас отключена функция ведения истории " "сообщений, то это сообщение будет утеряно."
-#: ../src/chat_control.py:2446 ../src/common/connection_handlers.py:1847 +#: ../src/chat_control.py:2515 ../src/common/connection_handlers.py:1847 #: ../src/common/connection_handlers.py:1893 #: ../src/common/connection_handlers.py:2081 #: ../src/common/connection_handlers.py:2207 ../src/common/connection.py:1222 -#: ../src/gajim.py:170 +#: ../src/gajim.py:174 msgid "Database Error" msgstr "Ошибка базы данных"
-#: ../src/chat_control.py:2447 +#: ../src/chat_control.py:2516 #, python-format msgid "" "The database file (%s) cannot be read. Try to repair it or remove it (all " @@ -3216,7 +3218,7 @@ "Файл базы данных (%s) не может быть прочитан. Попробуйте восстановить его " "или удалить (вся история будет утеряна)."
-#: ../src/chat_control.py:2678 +#: ../src/chat_control.py:2763 #, python-format msgid "%(name)s is now %(status)s" msgstr "%(name)s теперь %(status)s" @@ -3360,7 +3362,7 @@ #. sorted alphanum #: ../src/common/config.py:112 ../src/common/config.py:448 #: ../src/common/optparser.py:215 ../src/common/optparser.py:433 -#: ../src/common/optparser.py:467 ../src/gajim.py:3121 +#: ../src/common/optparser.py:467 ../src/gajim.py:3125 msgid "default" msgstr "По_умолчанию"
@@ -3882,12 +3884,13 @@ msgstr "Измените значение для изменения размера отображаемых формул LaTeX."
#: ../src/common/config.py:267 +#, fuzzy msgid "" "Valid uri schemes. Only schemes in this list will be made accepted as "real" "" uri." msgstr "" "Допустимые uri схемы. Только схемы из этого списка будут приняты как «real» " -"uri." +"uri.(mailto и xmpp обрабатываются отдельно)"
#: ../src/common/config.py:278 msgid "" @@ -4136,7 +4139,7 @@ #: ../src/common/connection_handlers.py:1891 #: ../src/common/connection_handlers.py:2079 #: ../src/common/connection_handlers.py:2205 ../src/common/connection.py:1220 -#: ../src/gajim.py:392 +#: ../src/gajim.py:396 msgid "Disk Write Error" msgstr "Ошибка записи на диск"
@@ -4153,7 +4156,7 @@ #: ../src/common/connection_handlers.py:1894 #: ../src/common/connection_handlers.py:2082 #: ../src/common/connection_handlers.py:2208 ../src/common/connection.py:1223 -#: ../src/gajim.py:171 +#: ../src/gajim.py:175 #, python-format msgid "" "The database file (%s) cannot be read. Try to repair it (see http://trac." @@ -4175,7 +4178,7 @@ #: ../src/common/connection_handlers.py:2044 #: ../src/common/connection_handlers.py:2047 #: ../src/common/connection_handlers.py:2050 -#: ../src/common/connection_handlers.py:2054 ../src/gajim.py:556 +#: ../src/common/connection_handlers.py:2054 ../src/gajim.py:560 msgid "Unable to join group chat" msgstr "Не получается войти в комнату"
@@ -4432,7 +4435,7 @@ msgid "Could not connect to "%s"" msgstr "Не могу соединиться с «%s»"
-#: ../src/common/connection.py:611 ../src/gajim.py:1052 +#: ../src/common/connection.py:611 ../src/gajim.py:1056 msgid "Check your connection or try again later." msgstr "Проверьте настройки сети или попробуйте еще раз позже."
@@ -4532,7 +4535,7 @@
#: ../src/common/contacts.py:96 ../src/common/contacts.py:348 #: ../src/common/helpers.py:73 ../src/disco.py:117 ../src/disco.py:118 -#: ../src/disco.py:1348 ../src/gajim.py:802 ../src/roster_window.py:818 +#: ../src/disco.py:1350 ../src/gajim.py:806 ../src/roster_window.py:818 #: ../src/roster_window.py:1471 ../src/roster_window.py:1538 #: ../src/roster_window.py:1540 ../src/roster_window.py:1677 msgid "Transports" @@ -5802,7 +5805,7 @@
#. Name column #: ../src/config.py:1319 ../src/dialogs.py:1824 ../src/dialogs.py:1888 -#: ../src/disco.py:768 ../src/disco.py:1562 ../src/disco.py:1809 +#: ../src/disco.py:770 ../src/disco.py:1564 ../src/disco.py:1811 #: ../src/history_window.py:87 msgid "Name" msgstr "Имя" @@ -5818,6 +5821,7 @@ "переподключиться."
#: ../src/config.py:1531 ../src/config.py:1630 +#, fuzzy msgid "OpenPGP is not usable in this computer" msgstr "Невозможно использовать OpenPGP на этом компьютере"
@@ -5980,7 +5984,7 @@
#. Address column #. holds JID (who said this) -#: ../src/config.py:2407 ../src/disco.py:775 ../src/history_manager.py:184 +#: ../src/config.py:2407 ../src/disco.py:777 ../src/history_manager.py:184 msgid "JID" msgstr "JID"
@@ -6066,7 +6070,7 @@ msgid "Removing %s account" msgstr "Удаление учетной записи %s"
-#: ../src/config.py:2580 ../src/gajim.py:1424 ../src/roster_window.py:1943 +#: ../src/config.py:2580 ../src/gajim.py:1428 ../src/roster_window.py:1943 msgid "Password Required" msgstr "Требуется пароль"
@@ -6157,11 +6161,11 @@ msgid "Please provide a server on which you want to register." msgstr "Укажите сервер, на котором вы хотите зарегистрироваться."
-#: ../src/config.py:3189 ../src/gajim.py:2000 +#: ../src/config.py:3189 ../src/gajim.py:2004 msgid "Certificate Already in File" msgstr "Сертификат уже находится в файле"
-#: ../src/config.py:3190 ../src/gajim.py:2001 +#: ../src/config.py:3190 ../src/gajim.py:2005 #, python-format msgid "This certificate is already in file %s, so it's not added again." msgstr "Этот сертификат уже есть в файле %s, поэтому он не был добавлен." @@ -6181,7 +6185,7 @@ "Ошибка SSL: %(error)s\n" "Соединиться с этим сервером?"
-#: ../src/config.py:3264 ../src/gajim.py:2024 +#: ../src/config.py:3264 ../src/gajim.py:2028 #, python-format msgid "" "Add this certificate to the list of trusted certificates.\n" @@ -6240,15 +6244,15 @@ msgstr "Искать в _словаре"
#: ../src/conversation_textview.py:712 -#, fuzzy, python-format +#, python-format msgid "Dictionary URL is missing an "%s" and it is not WIKTIONARY" -msgstr "URL словаря пропущен в «%s» и это не WIKTIONARY" +msgstr "В URL словаря отсутствует «%s» и это не WIKTIONARY"
#. we must have %s in the url #: ../src/conversation_textview.py:725 -#, fuzzy, python-format +#, python-format msgid "Web Search URL is missing an "%s"" -msgstr "URL Web-поиска отсутствует в «%s»" +msgstr "В URL Web-поиска отсутствует «%s»"
#: ../src/conversation_textview.py:728 msgid "Web _Search for it" @@ -6470,7 +6474,7 @@ msgid "Subscription request from %s" msgstr "Запрос на подписку от %s"
-#: ../src/dialogs.py:1669 ../src/gajim.py:2624 +#: ../src/dialogs.py:1669 ../src/gajim.py:2628 #, python-format msgid "You are already in group chat %s" msgstr "Вы уже в комнате %s" @@ -6619,32 +6623,32 @@ msgid "New Private Message" msgstr "Новое личное сообщение"
-#: ../src/dialogs.py:2060 ../src/gajim.py:1587 ../src/notify.py:472 +#: ../src/dialogs.py:2060 ../src/gajim.py:1591 ../src/notify.py:472 #: ../src/osx/growler.py:13 msgid "New E-mail" msgstr "Новое письмо"
-#: ../src/dialogs.py:2062 ../src/gajim.py:1653 ../src/notify.py:466 +#: ../src/dialogs.py:2062 ../src/gajim.py:1657 ../src/notify.py:466 #: ../src/osx/growler.py:14 msgid "File Transfer Request" msgstr "Запрос передачи"
-#: ../src/dialogs.py:2064 ../src/gajim.py:1553 ../src/gajim.py:1620 +#: ../src/dialogs.py:2064 ../src/gajim.py:1557 ../src/gajim.py:1624 #: ../src/notify.py:468 ../src/osx/growler.py:14 msgid "File Transfer Error" msgstr "Ошибка передачи"
-#: ../src/dialogs.py:2066 ../src/gajim.py:1695 ../src/gajim.py:1717 -#: ../src/gajim.py:1734 ../src/notify.py:470 ../src/osx/growler.py:15 +#: ../src/dialogs.py:2066 ../src/gajim.py:1699 ../src/gajim.py:1721 +#: ../src/gajim.py:1738 ../src/notify.py:470 ../src/osx/growler.py:15 msgid "File Transfer Completed" msgstr "Передача файла завершена"
-#: ../src/dialogs.py:2067 ../src/gajim.py:1698 ../src/notify.py:470 +#: ../src/dialogs.py:2067 ../src/gajim.py:1702 ../src/notify.py:470 #: ../src/osx/growler.py:15 msgid "File Transfer Stopped" msgstr "Передача остановлена"
-#: ../src/dialogs.py:2069 ../src/gajim.py:1445 ../src/notify.py:474 +#: ../src/dialogs.py:2069 ../src/gajim.py:1449 ../src/notify.py:474 #: ../src/osx/growler.py:16 msgid "Groupchat Invitation" msgstr "Приглашение в комнату" @@ -6944,7 +6948,7 @@ "По этому адресу сервисы отсутствуют или не отвечают. Проверьте адрес и " "попробуйте еще раз."
-#: ../src/disco.py:661 ../src/disco.py:955 +#: ../src/disco.py:661 ../src/disco.py:957 msgid "The service is not browsable" msgstr "Сервис недоступен для просмотра"
@@ -6956,64 +6960,64 @@ msgid "Invalid Server Name" msgstr "Неверное имя сервера"
-#: ../src/disco.py:754 +#: ../src/disco.py:756 #, python-format msgid "Browsing %(address)s using account %(account)s" msgstr "Просмотр %(address)s с учетной записью %(account)s"
-#: ../src/disco.py:794 +#: ../src/disco.py:796 msgid "_Browse" msgstr "_Браузер"
-#: ../src/disco.py:956 +#: ../src/disco.py:958 msgid "This service does not contain any items to browse." msgstr "Этот сервис не содержит ничего, что можно было бы просмотреть."
-#: ../src/disco.py:1179 +#: ../src/disco.py:1181 msgid "_Execute Command" msgstr "В_ыполнить команду..."
-#: ../src/disco.py:1189 ../src/disco.py:1353 +#: ../src/disco.py:1191 ../src/disco.py:1355 msgid "Re_gister" msgstr "За_регистрироваться"
-#: ../src/disco.py:1390 +#: ../src/disco.py:1392 #, python-format msgid "Scanning %(current)d / %(total)d.." msgstr "Сканирую %(current)d / %(total)d.."
#. Users column -#: ../src/disco.py:1572 +#: ../src/disco.py:1574 msgid "Users" msgstr "Пользователи"
#. Description column -#: ../src/disco.py:1580 +#: ../src/disco.py:1582 msgid "Description" msgstr "Описание"
#. Id column -#: ../src/disco.py:1588 +#: ../src/disco.py:1590 msgid "Id" msgstr "ID"
-#: ../src/disco.py:1818 +#: ../src/disco.py:1820 msgid "Subscribed" msgstr "Подписка"
-#: ../src/disco.py:1826 +#: ../src/disco.py:1828 msgid "Node" msgstr "Узел"
-#: ../src/disco.py:1883 +#: ../src/disco.py:1885 msgid "New post" msgstr "Новое сообщение"
-#: ../src/disco.py:1889 +#: ../src/disco.py:1891 msgid "_Subscribe" msgstr "_Подписаться"
-#: ../src/disco.py:1895 +#: ../src/disco.py:1897 msgid "_Unsubscribe" msgstr "_Отписаться"
@@ -7446,36 +7450,36 @@ msgid "Pause" msgstr "Пауза"
-#: ../src/gajim.py:83 +#: ../src/gajim.py:87 #, python-format msgid "%s is not a valid loglevel" msgstr "%s не является допустимым loglevel"
-#: ../src/gajim.py:156 +#: ../src/gajim.py:160 msgid "Gajim needs X server to run. Quiting..." msgstr "Gajim для запуска требуется X-сервер. Выход..."
-#: ../src/gajim.py:186 +#: ../src/gajim.py:190 msgid "Gajim needs PyGTK 2.8 or above" msgstr "Gajim требуется PyGTK 2.8 или выше"
-#: ../src/gajim.py:187 +#: ../src/gajim.py:191 msgid "Gajim needs PyGTK 2.8 or above to run. Quiting..." msgstr "Gajim для запуска требуется PyGTK 2.8 или выше. Выход..."
-#: ../src/gajim.py:189 +#: ../src/gajim.py:193 msgid "Gajim needs GTK 2.8 or above" msgstr "Gajim требуется GTK 2.8 или выше"
-#: ../src/gajim.py:190 +#: ../src/gajim.py:194 msgid "Gajim needs GTK 2.8 or above to run. Quiting..." msgstr "Gajim для запуска требуется GTK 2.8 или выше. Выход..."
-#: ../src/gajim.py:195 +#: ../src/gajim.py:199 msgid "GTK+ runtime is missing libglade support" msgstr "У GTK отсутствует поддержка libglade."
-#: ../src/gajim.py:197 +#: ../src/gajim.py:201 #, python-format msgid "" "Please remove your current GTK+ runtime and install the latest stable " @@ -7483,20 +7487,20 @@ msgstr "" "Удалите вашу текущую версию GTK и установите последнюю стабильную версию с %s"
-#: ../src/gajim.py:199 +#: ../src/gajim.py:203 msgid "" "Please make sure that GTK+ and PyGTK have libglade support in your system." msgstr "Удостоверьтесь, что GTK+ и PyGTK поддерживают libglade."
-#: ../src/gajim.py:204 +#: ../src/gajim.py:208 msgid "Gajim needs PySQLite2 to run" msgstr "Gajim для запуска требуется PySQLite2"
-#: ../src/gajim.py:212 +#: ../src/gajim.py:216 msgid "Gajim needs pywin32 to run" msgstr "Gajim для запуска требуется pywin32"
-#: ../src/gajim.py:213 +#: ../src/gajim.py:217 #, python-format msgid "" "Please make sure that Pywin32 is installed on your system. You can get it at " @@ -7506,11 +7510,11 @@ "его на сайте: %s"
#. set the icon to all newly opened wind -#: ../src/gajim.py:366 +#: ../src/gajim.py:370 msgid "Gajim is already running" msgstr "Gajim уже запущен"
-#: ../src/gajim.py:367 +#: ../src/gajim.py:371 msgid "" "Another instance of Gajim seems to be running\n" "Run anyway?" @@ -7518,25 +7522,25 @@ "По-видимому, уже запущен другой экземпляр Gajim\n" "Запустить ещё один?"
-#: ../src/gajim.py:493 +#: ../src/gajim.py:497 msgid "Passphrase Required" msgstr "Требуется парольная фраза"
-#: ../src/gajim.py:494 +#: ../src/gajim.py:498 #, python-format msgid "Enter GPG key passphrase for key %(keyid)s (account %(account)s)." msgstr "Введите пароль для ключа %(keyid)s (аккаунт %(account)s)."
#. ask again -#: ../src/gajim.py:509 +#: ../src/gajim.py:513 msgid "Wrong Passphrase" msgstr "Неверная парольная фраза"
-#: ../src/gajim.py:510 +#: ../src/gajim.py:514 msgid "Please retype your GPG passphrase or press Cancel." msgstr "Введите парольную фразу для GPG еще раз или нажмите «Отмена»."
-#: ../src/gajim.py:557 +#: ../src/gajim.py:561 #, python-format msgid "" "Your desired nickname in group chat %s is in use or registered by another " @@ -7547,50 +7551,50 @@ "другим пользователем.\n" "Укажите другой ник:"
-#: ../src/gajim.py:571 +#: ../src/gajim.py:575 msgid "Do you accept this request?" msgstr "Вы принимаете этот запрос?"
-#: ../src/gajim.py:573 +#: ../src/gajim.py:577 #, python-format msgid "Do you accept this request on account %s?" msgstr "Вы принимаете запрос %s?"
-#: ../src/gajim.py:576 +#: ../src/gajim.py:580 #, python-format msgid "HTTP (%(method)s) Authorization for %(url)s (id: %(id)s)" msgstr "HTTP (%(method)s) Авторизация для %(url)s (id: %(id)s)"
-#: ../src/gajim.py:624 ../src/notify.py:478 ../src/osx/growler.py:17 +#: ../src/gajim.py:628 ../src/notify.py:478 ../src/osx/growler.py:17 msgid "Connection Failed" msgstr "Соединение разорвалось"
-#: ../src/gajim.py:930 ../src/gajim.py:934 +#: ../src/gajim.py:934 ../src/gajim.py:938 #, python-format msgid "Error %(code)s: %(msg)s" msgstr "Ошибка %(code)s: %(msg)s"
#. ('MSGNOTSENT', account, (jid, ierror_msg, msg, time, session)) -#: ../src/gajim.py:944 ../src/gajim.py:957 +#: ../src/gajim.py:948 ../src/gajim.py:961 #, python-format msgid "error while sending %(message)s ( %(error)s )" msgstr "ошибка при отправке %(message)s ( %(error)s )"
-#: ../src/gajim.py:989 +#: ../src/gajim.py:993 msgid "Authorization accepted" msgstr "Авторизация принята"
-#: ../src/gajim.py:990 +#: ../src/gajim.py:994 #, python-format msgid "The contact "%s" has authorized you to see his or her status." msgstr "Контакт «%s» авторизовал вас, теперь вы можете видеть его статус."
-#: ../src/gajim.py:1009 +#: ../src/gajim.py:1013 #, python-format msgid "Contact "%s" removed subscription from you" msgstr "Контакт «%s» отозвал подписку с вами"
-#: ../src/gajim.py:1010 +#: ../src/gajim.py:1014 msgid "" "You will always see him or her as offline.\n" "Do you want to remove him or her from your contact list?" @@ -7598,73 +7602,73 @@ "Вы всегда будете видеть его или её как отключенными.\n" "Удалить его или её из контакт-листа?"
-#: ../src/gajim.py:1051 +#: ../src/gajim.py:1055 #, python-format msgid "Contact with "%s" cannot be established" msgstr "Связь с «%s» не может быть установлена"
-#: ../src/gajim.py:1227 ../src/groupchat_control.py:1164 +#: ../src/gajim.py:1231 ../src/groupchat_control.py:1164 #, python-format msgid "%(nick)s is now known as %(new_nick)s" msgstr "%(nick)s теперь известен как %(new_nick)s"
-#: ../src/gajim.py:1245 ../src/groupchat_control.py:1339 +#: ../src/gajim.py:1249 ../src/groupchat_control.py:1339 #: ../src/history_window.py:417 ../src/notify.py:232 #, python-format msgid "%(nick)s is now %(status)s" msgstr "%(nick)s теперь %(status)s"
-#: ../src/gajim.py:1308 +#: ../src/gajim.py:1312 #, python-format msgid "%(jid)s has set the subject to %(subject)s" msgstr "%(jid)s установил(а) тему: %(subject)s"
#. Can be a presence (see chg_contact_status in groupchat_control.py) #. Can be a message (see handle_event_gc_config_change in gajim.py) -#: ../src/gajim.py:1372 ../src/groupchat_control.py:1124 +#: ../src/gajim.py:1376 ../src/groupchat_control.py:1124 msgid "Any occupant is allowed to see your full JID" msgstr "Любой участник может увидеть ваш настоящий JID"
-#: ../src/gajim.py:1375 +#: ../src/gajim.py:1379 msgid "Room now shows unavailable member" msgstr "Теперь в комнате отображается недоступный участник"
-#: ../src/gajim.py:1377 +#: ../src/gajim.py:1381 msgid "room now does not show unavailable members" msgstr "теперь в комнате не отображаются недоступные участники"
-#: ../src/gajim.py:1380 +#: ../src/gajim.py:1384 msgid "A non-privacy-related room configuration change has occurred" msgstr "" "Произошло изменение настроек комнаты, не относящееся к настройкам приватности"
#. Can be a presence (see chg_contact_status in groupchat_control.py) -#: ../src/gajim.py:1383 +#: ../src/gajim.py:1387 msgid "Room logging is now enabled" msgstr "Запись логов конференции включена"
-#: ../src/gajim.py:1385 +#: ../src/gajim.py:1389 msgid "Room logging is now disabled" msgstr "Запись логов конференции выключена"
-#: ../src/gajim.py:1387 +#: ../src/gajim.py:1391 msgid "Room is now non-anonymous" msgstr "Конференция не анонимна"
-#: ../src/gajim.py:1390 +#: ../src/gajim.py:1394 msgid "Room is now semi-anonymous" msgstr "Конференция частично анонимна"
-#: ../src/gajim.py:1393 +#: ../src/gajim.py:1397 msgid "Room is now fully-anonymous" msgstr "Конференция полностью анонимна"
-#: ../src/gajim.py:1425 +#: ../src/gajim.py:1429 #, python-format msgid "A Password is required to join the room %s. Please type it." msgstr "Чтобы войти в комнату %s, нужен пароль."
-#: ../src/gajim.py:1459 +#: ../src/gajim.py:1463 msgid "" "You configured Gajim to use GPG agent, but there is no GPG agent running or " "it returned a wrong passphrase.\n" @@ -7672,20 +7676,20 @@ "Gajim настроен на использование GPG агента, но GPG агент не запущен или он " "возвратил неверный пароль.\n"
-#: ../src/gajim.py:1461 +#: ../src/gajim.py:1465 msgid "You are currently connected without your OpenPGP key." msgstr "Вы сейчас соединены без OpenPGP ключа."
-#: ../src/gajim.py:1464 +#: ../src/gajim.py:1468 msgid "Your passphrase is incorrect" msgstr "Ваша парольная фраза неверна"
-#: ../src/gajim.py:1564 +#: ../src/gajim.py:1568 #, python-format msgid "New mail on %(gmail_mail_address)s" msgstr "Новое письмо на %(gmail_mail_address)s"
-#: ../src/gajim.py:1566 +#: ../src/gajim.py:1570 #, python-format msgid "You have %d new mail conversation" msgid_plural "You have %d new mail conversations" @@ -7693,7 +7697,7 @@ msgstr[1] "У вас есть %d непрочитанных письма" msgstr[2] "У вас есть %d непрочитанных писем"
-#: ../src/gajim.py:1579 +#: ../src/gajim.py:1583 #, python-format msgid "" "\n" @@ -7708,34 +7712,34 @@ "Тема: %(subject)s\n" "%(snippet)s"
-#: ../src/gajim.py:1650 +#: ../src/gajim.py:1654 #, python-format msgid "%s wants to send you a file." msgstr "%s хочет отправить вам файл."
-#: ../src/gajim.py:1718 +#: ../src/gajim.py:1722 #, python-format msgid "You successfully received %(filename)s from %(name)s." msgstr "Успешно получен файл %(filename)s от %(name)s."
#. ft stopped -#: ../src/gajim.py:1722 +#: ../src/gajim.py:1726 #, python-format msgid "File transfer of %(filename)s from %(name)s stopped." msgstr "Передача файла %(filename)s от %(name)s приостановлена."
-#: ../src/gajim.py:1735 +#: ../src/gajim.py:1739 #, python-format msgid "You successfully sent %(filename)s to %(name)s." msgstr "%(name)s успешно получил(а) отправленный вами файл %(filename)s."
#. ft stopped -#: ../src/gajim.py:1739 +#: ../src/gajim.py:1743 #, python-format msgid "File transfer of %(filename)s to %(name)s stopped." msgstr "Передача файла %(filename)s к %(name)s приостановлена."
-#: ../src/gajim.py:1827 +#: ../src/gajim.py:1831 #, python-format msgid "" "Unable to decrypt message from %s\n" @@ -7744,36 +7748,36 @@ "Не удалось расшифровать сообщение от %s\n" "Возможно, оно было испорчено."
-#: ../src/gajim.py:1834 +#: ../src/gajim.py:1838 msgid "Unable to decrypt message" msgstr "Сообщение не удалось расшифровать"
-#: ../src/gajim.py:1905 +#: ../src/gajim.py:1909 msgid "Username Conflict" msgstr "Такое имя уже есть"
-#: ../src/gajim.py:1906 +#: ../src/gajim.py:1910 msgid "Please type a new username for your local account" msgstr "Введите новое имя пользователя для локальной учетной записи"
-#: ../src/gajim.py:1918 +#: ../src/gajim.py:1922 msgid "Ping?" msgstr "Ping?"
-#: ../src/gajim.py:1931 +#: ../src/gajim.py:1935 #, python-format msgid "Pong! (%s s.)" msgstr "Pong! (%s сек.)"
-#: ../src/gajim.py:1942 +#: ../src/gajim.py:1946 msgid "Error." msgstr "Ошибка."
-#: ../src/gajim.py:1967 +#: ../src/gajim.py:1971 msgid "Resource Conflict" msgstr "Такое имя уже есть"
-#: ../src/gajim.py:1968 +#: ../src/gajim.py:1972 msgid "" "You are already connected to this account with the same resource. Please " "type a new one" @@ -7781,11 +7785,11 @@ "Вы уже подсоединены к этой учетной записи с таким же ресурсом. Введите " "другой ресурс"
-#: ../src/gajim.py:2021 +#: ../src/gajim.py:2025 msgid "Error verifying SSL certificate" msgstr "Ошибка при проверке SSL сертификата"
-#: ../src/gajim.py:2022 +#: ../src/gajim.py:2026 #, python-format msgid "" "There was an error verifying the SSL certificate of your jabber server: %" @@ -7796,15 +7800,15 @@ "s\n" "Вы всё ещё хотите подключиться к этому серверу?"
-#: ../src/gajim.py:2027 +#: ../src/gajim.py:2031 msgid "Ignore this error for this certificate." msgstr "Игнорировать эту ошибку для данного сертификата."
-#: ../src/gajim.py:2042 +#: ../src/gajim.py:2046 msgid "SSL certificate error" msgstr "Ошибка SSL сертификата"
-#: ../src/gajim.py:2043 +#: ../src/gajim.py:2047 #, python-format msgid "" "It seems the SSL certificate has changed or your connection is being " @@ -7819,26 +7823,26 @@ "Новый отпечаток: %(new)s\n" "Вы всё ещё хотите соединиться и обновить отпечаток сертификата?"
-#: ../src/gajim.py:2065 ../src/gajim.py:2095 +#: ../src/gajim.py:2069 ../src/gajim.py:2099 msgid "Insecure connection" msgstr "Небезопасное соединение"
-#: ../src/gajim.py:2066 +#: ../src/gajim.py:2070 msgid "" "You are about to send your password on an unencrypted connection. Are you " "sure you want to do that?" msgstr "Вы хотите отправить пароль через небезопасное соединение. Вы уверены?"
-#: ../src/gajim.py:2068 ../src/gajim.py:2098 +#: ../src/gajim.py:2072 ../src/gajim.py:2102 msgid "Yes, I really want to connect insecurely" msgstr "Да, я действительно хочу соединиться небезопасно"
-#: ../src/gajim.py:2069 ../src/gajim.py:2099 ../src/groupchat_control.py:1843 +#: ../src/gajim.py:2073 ../src/gajim.py:2103 ../src/groupchat_control.py:1843 #: ../src/roster_window.py:3790 msgid "Do _not ask me again" msgstr "Не _переспрашивать"
-#: ../src/gajim.py:2096 +#: ../src/gajim.py:2100 msgid "" "You are about to send your password on an insecure connection. You should " "install PyOpenSSL to prevent that. Are you sure you want to do that?" @@ -7846,27 +7850,27 @@ "Вы хотите отправить пароль через небезопасное соединение. Вы уверены? " "(Установите PyOpenSSL, чтобы этого не происходило.)"
-#: ../src/gajim.py:2113 +#: ../src/gajim.py:2117 msgid "PEP node was not removed" msgstr "PEP узел не был удален"
-#: ../src/gajim.py:2114 +#: ../src/gajim.py:2118 #, python-format msgid "PEP node %(node)s was not removed: %(message)s" msgstr "PEP узел %(node)s не был удален: %(message)s"
#. theme doesn't exist, disable emoticons -#: ../src/gajim.py:2582 ../src/gajim.py:2603 +#: ../src/gajim.py:2586 ../src/gajim.py:2607 msgid "Emoticons disabled" msgstr "Смайлики выключены"
-#: ../src/gajim.py:2583 +#: ../src/gajim.py:2587 msgid "" "Your configured emoticons theme has not been found, so emoticons have been " "disabled." msgstr "Тема смайликов не найдена, они будут отключены."
-#: ../src/gajim.py:2604 +#: ../src/gajim.py:2608 msgid "" "Your configured emoticons theme cannot been loaded. You maybe need to update " "the format of emoticons.py file. See http://trac.gajim.org/wiki/Emoticons " @@ -7875,30 +7879,30 @@ "Смайлики не могут быть загружены. Возможно, вам нужно обновить формат файла " "emoticons.py. Подробности на http://trac.gajim.org/wiki/Emoticons."
-#: ../src/gajim.py:2630 ../src/roster_window.py:3324 +#: ../src/gajim.py:2634 ../src/roster_window.py:3324 msgid "You cannot join a group chat while you are invisible" msgstr "Вы не можете зайти в комнату, так как вы в режиме невидимости."
#. it is good to notify the user #. in case he or she cannot see the output of the console -#: ../src/gajim.py:2910 +#: ../src/gajim.py:2914 msgid "Could not save your settings and preferences" msgstr "Не могу сохранить ваши установки и настройки"
-#: ../src/gajim.py:3007 +#: ../src/gajim.py:3011 msgid "Bookmark already set" msgstr "Закладка уже установлена"
-#: ../src/gajim.py:3008 +#: ../src/gajim.py:3012 #, python-format msgid "Group Chat "%s" is already in your bookmarks." msgstr "Комната «%s» уже есть в ваших закладках."
-#: ../src/gajim.py:3021 +#: ../src/gajim.py:3025 msgid "Bookmark has been added successfully" msgstr "Закладка успешно добавлена"
-#: ../src/gajim.py:3022 +#: ../src/gajim.py:3026 msgid "You can manage your bookmarks via Actions menu in your roster." msgstr "Вы можете управлять закладками через меню «Действия» в ростере."
@@ -8608,12 +8612,12 @@ msgid "Kicking %s" msgstr "Выгоняем %s"
-#: ../src/groupchat_control.py:2084 ../src/groupchat_control.py:2388 +#: ../src/groupchat_control.py:2084 ../src/groupchat_control.py:2390 msgid "You may specify a reason below:" msgstr "Вы можете указать причину ниже:"
#. ask for reason -#: ../src/groupchat_control.py:2387 +#: ../src/groupchat_control.py:2389 #, python-format msgid "Banning %s" msgstr "Забанить %s" @@ -9148,8 +9152,8 @@ #. for single message #. join gc #: ../src/roster_window.py:4587 ../src/roster_window.py:4658 -#: ../src/roster_window.py:4667 ../src/systray.py:243 ../src/systray.py:254 -#: ../src/systray.py:266 +#: ../src/roster_window.py:4667 ../src/systray.py:219 ../src/systray.py:224 +#: ../src/systray.py:230 #, python-format msgid "using account %s" msgstr "используя учетную запись %s" @@ -9166,7 +9170,7 @@ msgid "using %s account" msgstr "учетной записи %s"
-#: ../src/roster_window.py:4716 ../src/systray.py:303 +#: ../src/roster_window.py:4716 ../src/systray.py:257 msgid "_Manage Bookmarks..." msgstr "Управление _закладками..."
@@ -9259,7 +9263,7 @@ msgid "History Manager" msgstr "Менеджер истории"
-#: ../src/roster_window.py:5997 ../src/systray.py:341 +#: ../src/roster_window.py:5997 msgid "_Join New Group Chat" msgstr "_Войти в новую комнату"
@@ -9323,11 +9327,11 @@ "\n" "Продолжить этот сеанс?"
-#: ../src/systray.py:188 +#: ../src/systray.py:176 msgid "_Change Status Message..." msgstr "_Изменить сообщение о статусе..."
-#: ../src/systray.py:322 +#: ../src/systray.py:270 msgid "Hide this menu" msgstr "Скрыть это меню"
Modified: branches/osx_newbuildsys/src/chat_control.py =================================================================== --- branches/osx_newbuildsys/src/chat_control.py 2008-11-28 18:38:03 UTC (rev 10715) +++ branches/osx_newbuildsys/src/chat_control.py 2008-11-28 18:47:04 UTC (rev 10716) @@ -747,13 +747,13 @@
def on_formattings_button_clicked(self, widget): '''popup formattings menu''' - menu = gtk.Menu() - - menuitems = ((_('Bold'), 'bold'), - (_('Italic'), 'italic'), - (_('Underline'), 'underline'), - (_('Strike'), 'strike')) + menu = gtk.Menu()
+ menuitems = ((_('Bold'), 'bold'), + (_('Italic'), 'italic'), + (_('Underline'), 'underline'), + (_('Strike'), 'strike')) + active_tags = self.msg_textview.get_active_tags()
for menuitem in menuitems: @@ -1299,9 +1299,9 @@ self._mood_image.hide()
def update_activity(self): - activity = None + activity = None subactivity = None - text = None + text = None
if isinstance(self.contact, GC_Contact): return @@ -1353,7 +1353,7 @@
def update_tune(self): artist = None - title = None + title = None source = None
if isinstance(self.contact, GC_Contact): @@ -1804,8 +1804,7 @@ composing_xep = composing_xep, process_command = process_command, xhtml = xhtml) if id: - # XXX: Once we have fallback to disco, remove - # notexistant check + # XXX: Once we have fallback to disco, remove notexistant check if gajim.capscache.is_supported(contact, NS_RECEIPTS) \ and not gajim.capscache.is_supported(contact, 'notexistant') and gajim.config.get_per('accounts', @@ -2416,8 +2415,7 @@ want_e2e = not e2e_is_active and not self.gpg_is_active \ and e2e_pref
- # XXX: Once we have fallback to disco, remove - # notexistant check + # XXX: Once we have fallback to disco, remove notexistant check if want_e2e and not self.no_autonegotiation \ and gajim.HAVE_PYCRYPTO \ and gajim.capscache.is_supported(self.contact, @@ -2648,12 +2646,17 @@
def _on_toggle_e2e_menuitem_activate(self, widget): if self.session and self.session.enable_encryption: + # e2e was enabled, disable it jid = str(self.session.jid) thread_id = self.session.thread_id
self.session.terminate_e2e()
gajim.connections[self.account].delete_session(jid, thread_id) + + # presumably the user had a good reason to shut it off, so + # disable autonegotiation too + self.no_autonegotiation = True else: self.begin_e2e_negotiation()
Modified: branches/osx_newbuildsys/src/common/config.py =================================================================== --- branches/osx_newbuildsys/src/common/config.py 2008-11-28 18:38:03 UTC (rev 10715) +++ branches/osx_newbuildsys/src/common/config.py 2008-11-28 18:47:04 UTC (rev 10716) @@ -156,6 +156,10 @@ 'roster_y-position': [ opt_int, 0 ], 'roster_width': [ opt_int, 200 ], 'roster_height': [ opt_int, 400 ], + 'history_window_width': [ opt_int, 650 ], + 'history_window_height': [ opt_int, 450 ], + 'history_window_x-position': [ opt_int, 0 ], + 'history_window_y-position': [ opt_int, 0 ], 'latest_disco_addresses': [ opt_str, '' ], 'recently_groupchat': [ opt_str, '' ], 'time_stamp': [ opt_str, '[%X] ', _('This option let you customize timestamp that is printed in conversation. For exemple "[%H:%M] " will show "[hour:minute] ". See python doc on strftime for full documentation: http://docs.python.org/lib/module-time.html') ], @@ -264,7 +268,7 @@ 'attach_notifications_to_systray': [opt_bool, False, _('If True, notification windows from notification-daemon will be attached to systray icon.')], 'check_idle_every_foo_seconds': [opt_int, 2, _('Choose interval between 2 checks of idleness.')], 'latex_png_dpi': [opt_str, '108',_('Change the value to change the size of latex formulas displayed. The higher is larger.') ], - 'uri_schemes': [opt_str, 'aaa aaas acap cap cid crid data dav dict dns fax file ftp go gopher h323 http https icap im imap info ipp iris iris.beep iris.xpc iris.xpcs iris.lwz ldap mailto mid modem msrp msrps mtqp mupdate news nfs nntp opaquelocktoken pop pres rtsp service shttp sip sips snmp soap.beep soap.beeps tag tel telnet tftp thismessage tip tv urn vemmi xmlrpc.beep xmlrpc.beeps xmpp z39.50r z39.50s about cvs daap ed2k feed fish git iax2 irc ircs ldaps magnet mms rsync ssh svn sftp smb webcal', _('Valid uri schemes. Only schemes in this list will be made accepted as "real" uri.')], + 'uri_schemes': [opt_str, 'aaa aaas acap cap cid crid data dav dict dns fax file ftp go gopher h323 http https icap im imap info ipp iris iris.beep iris.xpc iris.xpcs iris.lwz ldap mid modem msrp msrps mtqp mupdate news nfs nntp opaquelocktoken pop pres rtsp service shttp sip sips snmp soap.beep soap.beeps tag tel telnet tftp thismessage tip tv urn vemmi xmlrpc.beep xmlrpc.beeps z39.50r z39.50s about cvs daap ed2k feed fish git iax2 irc ircs ldaps magnet mms rsync ssh svn sftp smb webcal', _('Valid uri schemes. Only schemes in this list will be accepted as "real" uri. (mailto and xmpp are handled seperately)')], }
__options_per_key = {
Modified: branches/osx_newbuildsys/src/common/connection.py =================================================================== --- branches/osx_newbuildsys/src/common/connection.py 2008-11-28 18:38:03 UTC (rev 10715) +++ branches/osx_newbuildsys/src/common/connection.py 2008-11-28 18:47:04 UTC (rev 10716) @@ -153,7 +153,7 @@ self.blocked_list = [] self.blocked_contacts = [] self.blocked_groups = [] - self.music_track_info = None + self.music_track_info = 0 self.pep_supported = False self.mood = {} self.tune = {} @@ -378,7 +378,7 @@ elif event == common.xmpp.transports.DATA_SENT: self.dispatch('STANZA_SENT', unicode(data))
- def select_next_host(self, hosts): + def _select_next_host(self, hosts): '''Chooses best 'real' host basing on the SRV priority and weight data; more info in RFC2782''' hosts_best_prio = [] @@ -510,7 +510,7 @@ ssl_p = gajim.config.get_per('accounts', self.name, 'custom_port') for i in self._hosts: i['ssl_port'] = ssl_p - self.connect_to_next_host() + self._connect_to_next_host()
def on_proxy_failure(self, reason): log.debug('Connection to proxy failed') @@ -521,7 +521,7 @@ self.dispatch('CONNECTION_LOST', (_('Connection to proxy failed'), reason))
- def connect_to_next_type(self, retry=False): + def _connect_to_next_type(self, retry=False): log.debug('Connection to next type') if len(self._connection_types): self._current_type = self._connection_types.pop(0) @@ -537,12 +537,12 @@ con = common.xmpp.NonBlockingClient(self._hostname, debug = d, caller = self, on_connect = self.on_connect_success, on_proxy_failure = self.on_proxy_failure, - on_connect_failure = self.connect_to_next_type) + on_connect_failure = self._connect_to_next_type) else: con = common.xmpp.NonBlockingClient(self._hostname, debug = [], caller = self, on_connect = self.on_connect_success, on_proxy_failure = self.on_proxy_failure, - on_connect_failure = self.connect_to_next_type) + on_connect_failure = self._connect_to_next_type) self.last_connection = con # increase default timeout for server responses common.xmpp.dispatcher_nb.DEFAULT_TIMEOUT_SECONDS = self.try_connecting_for_foo_secs @@ -565,9 +565,9 @@ con.connect((self._current_host['host'], port), proxy=self._proxy, secure = secur) else: - self.connect_to_next_host(retry) + self._connect_to_next_host(retry)
- def connect_to_next_host(self, retry = False): + def _connect_to_next_host(self, retry = False): log.debug('Connection to next host') if len(self._hosts): # No config option exist when creating a new account @@ -581,10 +581,10 @@ 'connection_types').split() else: self._connection_types = ['tls', 'ssl', 'plain'] - host = self.select_next_host(self._hosts) + host = self._select_next_host(self._hosts) self._current_host = host self._hosts.remove(host) - self.connect_to_next_type() + self._connect_to_next_type()
else: if not retry and self.retrycount == 0: @@ -619,7 +619,7 @@ if _con_type == 'tcp': _con_type = 'plain' if _con_type != self._current_type: - self.connect_to_next_type() + self._connect_to_next_type() return con.RegisterDisconnectHandler(self._on_disconnected) if _con_type == 'plain' and gajim.config.get_per('accounts', self.name, @@ -1075,7 +1075,8 @@ original_message=None, delayed=None): if not self.connection: return 1 - if msg and not xhtml and gajim.config.get('rst_formatting_outgoing_messages'): + if msg and not xhtml and gajim.config.get( + 'rst_formatting_outgoing_messages'): from common.rst_xhtml_generator import create_xhtml xhtml = create_xhtml(msg) if not msg and chatstate is None and form_node is None: @@ -1109,11 +1110,6 @@ tim = localtime() self.dispatch('MSGNOTSENT', (jid, error, msgtxt, tim, session)) return 3 - if msgtxt and not xhtml and gajim.config.get( - 'rst_formatting_outgoing_messages'): - # Generate a XHTML part using reStructured text markup - from common.rst_xhtml_generator import create_xhtml - xhtml = create_xhtml(msgtxt) if type_ == 'chat': msg_iq = common.xmpp.Message(to = fjid, body = msgtxt, typ = type_, xhtml = xhtml)
Modified: branches/osx_newbuildsys/src/common/defs.py =================================================================== --- branches/osx_newbuildsys/src/common/defs.py 2008-11-28 18:38:03 UTC (rev 10715) +++ branches/osx_newbuildsys/src/common/defs.py 2008-11-28 18:47:04 UTC (rev 10716) @@ -28,7 +28,7 @@ docdir = '../' datadir = '../'
-version = '0.12-beta1' +version = '0.12.0.1-svn'
import sys, os.path for base in ('.', 'common'):
Modified: branches/osx_newbuildsys/src/common/helpers.py =================================================================== --- branches/osx_newbuildsys/src/common/helpers.py 2008-11-28 18:38:03 UTC (rev 10715) +++ branches/osx_newbuildsys/src/common/helpers.py 2008-11-28 18:47:04 UTC (rev 10716) @@ -454,7 +454,7 @@ pass
else: - if kind == 'mail' and not uri.startswith('mailto:'): + if kind in ('mail', 'sth_at_sth') and not uri.startswith('mailto:'): uri = 'mailto:' + uri
if gajim.config.get('openwith') == 'gnome-open': @@ -469,7 +469,7 @@ elif gajim.config.get('openwith') == 'custom': if kind == 'url': command = gajim.config.get('custombrowser') - if kind == 'mail': + if kind in ('mail', 'sth_at_sth'): command = gajim.config.get('custommailapp') if command == '': # if no app is configured return
Modified: branches/osx_newbuildsys/src/common/optparser.py =================================================================== --- branches/osx_newbuildsys/src/common/optparser.py 2008-11-28 18:38:03 UTC (rev 10715) +++ branches/osx_newbuildsys/src/common/optparser.py 2008-11-28 18:47:04 UTC (rev 10716) @@ -185,6 +185,8 @@ self.update_config_to_01143() if old < [0, 11, 4, 4] and new >= [0, 11, 4, 4]: self.update_config_to_01144() + if old < [0, 12, 0, 1] and new >= [0, 12, 0, 1]: + self.update_config_to_01201()
gajim.logger.init_vars() gajim.config.set('version', new_version) @@ -599,4 +601,11 @@ con.close() gajim.config.set('version', '0.11.4.4')
+ def update_config_to_01201(self): + if 'uri_schemes' in self.old_values: + new_values = self.old_values['uri_schemes'].replace(' mailto', '').\ + replace(' xmpp', '') + gajim.config.set('uri_schemes', new_values) + gajim.config.set('version', '0.12.0.1') + # vim: se ts=3:
Modified: branches/osx_newbuildsys/src/common/pep.py =================================================================== --- branches/osx_newbuildsys/src/common/pep.py 2008-11-28 18:38:03 UTC (rev 10715) +++ branches/osx_newbuildsys/src/common/pep.py 2008-11-28 18:47:04 UTC (rev 10716) @@ -459,8 +459,7 @@ contact.contact_name = nick gajim.interface.roster.draw_contact(user, name)
- ctrl = gajim.interface.msg_win_mgr.get_control(user, - name) + ctrl = gajim.interface.msg_win_mgr.get_control(user, name) if ctrl: ctrl.update_ui() win = ctrl.parent_win @@ -469,7 +468,7 @@ elif retract: contact.contact_name = ''
-def user_send_mood(account, mood, message = ''): +def user_send_mood(account, mood, message=''): if not gajim.connections[account].pep_supported: return item = xmpp.Node('mood', {'xmlns': xmpp.NS_MOOD}) @@ -481,7 +480,7 @@
gajim.connections[account].send_pb_publish('', xmpp.NS_MOOD, item, '0')
-def user_send_activity(account, activity, subactivity = '', message = ''): +def user_send_activity(account, activity, subactivity='', message=''): if not gajim.connections[account].pep_supported: return item = xmpp.Node('activity', {'xmlns': xmpp.NS_ACTIVITY}) @@ -493,11 +492,10 @@ i = item.addChild('text') i.addData(message)
- gajim.connections[account].send_pb_publish('', xmpp.NS_ACTIVITY, - item, '0') + gajim.connections[account].send_pb_publish('', xmpp.NS_ACTIVITY, item, '0')
-def user_send_tune(account, artist = '', title = '', source = '', track = 0, -length = 0, items = None): +def user_send_tune(account, artist='', title='', source='', track=0, length=0, +items=None): if not (gajim.config.get_per('accounts', account, 'publish_tune') and \ gajim.connections[account].pep_supported): return @@ -549,6 +547,7 @@ acc = gajim.connections[name] del acc.activity acc.activity = {} + user_send_tune(name) del acc.tune acc.tune = {} del acc.mood
Modified: branches/osx_newbuildsys/src/common/pubsub.py =================================================================== --- branches/osx_newbuildsys/src/common/pubsub.py 2008-11-28 18:38:03 UTC (rev 10715) +++ branches/osx_newbuildsys/src/common/pubsub.py 2008-11-28 18:47:04 UTC (rev 10716) @@ -30,6 +30,8 @@ self.__callbacks={}
def send_pb_subscription_query(self, jid, cb, *args, **kwargs): + if not self.connection or self.connected < 2: + return query = xmpp.Iq('get', to=jid) pb = query.addChild('pubsub', {'xmlns': xmpp.NS_PUBSUB}) pb.addChild('subscriptions') @@ -39,6 +41,8 @@ self.__callbacks[id]=(cb, args, kwargs)
def send_pb_subscribe(self, jid, node, cb, *args, **kwargs): + if not self.connection or self.connected < 2: + return our_jid = gajim.get_jid_from_account(self.name) query = xmpp.Iq('set', to=jid) pb = query.addChild('pubsub', namespace=xmpp.NS_PUBSUB) @@ -49,6 +53,8 @@ self.__callbacks[id]=(cb, args, kwargs)
def send_pb_unsubscribe(self, jid, node, cb, *args, **kwargs): + if not self.connection or self.connected < 2: + return our_jid = gajim.get_jid_from_account(self.name) query = xmpp.Iq('set', to=jid) pb = query.addChild('pubsub', namespace=xmpp.NS_PUBSUB) @@ -60,6 +66,8 @@
def send_pb_publish(self, jid, node, item, id_): '''Publish item to a node.''' + if not self.connection or self.connected < 2: + return query = xmpp.Iq('set', to=jid) e = query.addChild('pubsub', namespace=xmpp.NS_PUBSUB) e = e.addChild('publish', {'node': node}) @@ -69,6 +77,8 @@
def send_pb_retract(self, jid, node, id_): '''Delete item from a node''' + if not self.connection or self.connected < 2: + return query = xmpp.Iq('set', to=jid) r = query.addChild('pubsub', namespace=xmpp.NS_PUBSUB) r = r.addChild('retract', {'node': node, 'notify': '1'}) @@ -78,6 +88,8 @@
def send_pb_delete(self, jid, node): '''Deletes node.''' + if not self.connection or self.connected < 2: + return query = xmpp.Iq('set', to=jid) d = query.addChild('pubsub', namespace=xmpp.NS_PUBSUB) d = d.addChild('delete', {'node': node}) @@ -94,6 +106,8 @@
def send_pb_create(self, jid, node, configure = False, configure_form = None): '''Creates new node.''' + if not self.connection or self.connected < 2: + return query = xmpp.Iq('set', to=jid) c = query.addChild('pubsub', namespace=xmpp.NS_PUBSUB) c = c.addChild('create', {'node': node}) @@ -105,6 +119,8 @@ self.connection.send(query)
def send_pb_configure(self, jid, node, form): + if not self.connection or self.connected < 2: + return query = xmpp.Iq('set', to=jid) c = query.addChild('pubsub', namespace=xmpp.NS_PUBSUB_OWNER) c = c.addChild('configure', {'node': node}) @@ -120,6 +136,8 @@ pass
def request_pb_configuration(self, jid, node): + if not self.connection or self.connected < 2: + return query = xmpp.Iq('get', to=jid) e = query.addChild('pubsub', namespace=xmpp.NS_PUBSUB_OWNER) e = e.addChild('configure', {'node': node})
Modified: branches/osx_newbuildsys/src/common/socks5.py =================================================================== --- branches/osx_newbuildsys/src/common/socks5.py 2008-11-28 18:38:03 UTC (rev 10715) +++ branches/osx_newbuildsys/src/common/socks5.py 2008-11-28 18:47:04 UTC (rev 10716) @@ -68,7 +68,7 @@ self.error_cb = error_cb self.on_success = None self.on_failure = None - + def start_listener(self, port, sha_str, sha_handler, sid): ''' start waiting for incomming connections on (host, port) and do a socks5 authentication using sid for generated sha @@ -87,16 +87,16 @@ return None self.connected += 1 return self.listener - + def send_success_reply(self, file_props, streamhost): if 'streamhost-used' in file_props and \ - file_props['streamhost-used'] is True: - if 'proxyhosts' in file_props: - for proxy in file_props['proxyhosts']: - if proxy == streamhost: - self.on_success(streamhost) - return 2 - return 0 + file_props['streamhost-used'] is True: + if 'proxyhosts' in file_props: + for proxy in file_props['proxyhosts']: + if proxy == streamhost: + self.on_success(streamhost) + return 2 + return 0 if 'streamhosts' in file_props: for host in file_props['streamhosts']: if streamhost['state'] == 1: @@ -105,22 +105,21 @@ self.on_success(streamhost) return 1 return 0 - - def connect_to_hosts(self, account, sid, on_success = None, - on_failure = None): + + def connect_to_hosts(self, account, sid, on_success=None, on_failure=None): self.on_success = on_success self.on_failure = on_failure file_props = self.files_props[account][sid] file_props['failure_cb'] = on_failure - - # add streamhosts to the queue + + # add streamhosts to the queue for streamhost in file_props['streamhosts']: receiver = Socks5Receiver(self.idlequeue, streamhost, sid, file_props) self.add_receiver(account, receiver) streamhost['idx'] = receiver.queue_idx - + def _socket_connected(self, streamhost, file_props): - ''' called when there is a host connected to one of the + ''' called when there is a host connected to one of the senders's streamhosts. Stop othere attempts for connections ''' for host in file_props['streamhosts']: if host != streamhost and 'idx' in host: @@ -130,14 +129,14 @@ return # set state -2, meaning that this streamhost is stopped, # but it may be connectected later - if host['state'] >=0: + if host['state'] >= 0: self.remove_receiver(host['idx']) host['idx'] = -1 host['state'] = -2 - + def reconnect_receiver(self, receiver, streamhost): - ''' Check the state of all streamhosts and if all has failed, then - emit connection failure cb. If there are some which are still + ''' Check the state of all streamhosts and if all has failed, then + emit connection failure cb. If there are some which are still not connected try to establish connection to one of them. ''' self.idlequeue.remove_timeout(receiver.fd) @@ -156,7 +155,8 @@ for host in file_props['streamhosts']: if host['state'] == -2: host['state'] = 0 - receiver = Socks5Receiver(self.idlequeue, host, host['sid'], file_props) + receiver = Socks5Receiver(self.idlequeue, host, host['sid'], + file_props) self.add_receiver(receiver.account, receiver) host['idx'] = receiver.queue_idx # we still have chances to connect @@ -169,7 +169,7 @@ receiver.disconnect() file_props['error'] = -1 self.process_result(-1, receiver) - + def _connection_refused(self, streamhost, file_props, idx): ''' cb, called when we loose connection during transfer''' if file_props is None: @@ -182,10 +182,10 @@ return # failure_cb exists - this means that it has never been called if 'failure_cb' in file_props and file_props['failure_cb']: - file_props['failure_cb'](streamhost['initiator'], streamhost['id'], + file_props['failure_cb'](streamhost['initiator'], streamhost['id'], file_props['sid'], code = 404) del(file_props['failure_cb']) - + def add_receiver(self, account, sock5_receiver): ''' add new file request ''' self.readers[self.idx] = sock5_receiver @@ -200,23 +200,21 @@ self.process_result(result, sock5_receiver) return 1 return None - + def get_file_from_sender(self, file_props, account): if file_props is None: return - if 'hash' in file_props and \ - file_props['hash'] in self.senders: - + if 'hash' in file_props and file_props['hash'] in self.senders: sender = self.senders[file_props['hash']] sender.account = account result = self.get_file_contents(0) self.process_result(result, sender) - + def result_sha(self, sha_str, idx): if sha_str in self.sha_handlers: props = self.sha_handlers[sha_str] props[0](props[1], idx) - + def activate_proxy(self, idx): if idx not in self.readers: return @@ -242,15 +240,14 @@ self.idlequeue.plug_idle(reader, True, False) result = reader.write_next() self.process_result(result, reader) - + def send_file(self, file_props, account): - if 'hash' in file_props and \ - file_props['hash'] in self.senders: + if 'hash' in file_props and file_props['hash'] in self.senders: sender = self.senders[file_props['hash']] file_props['streamhost-used'] = True sender.account = account if file_props['type'] == 's': - sender.file_props = file_props + sender.file_props = file_props result = sender.send_file() self.process_result(result, sender) else: @@ -258,28 +255,27 @@ file_props['last-time'] = self.idlequeue.current_time() file_props['received-len'] = 0 sender.file_props = file_props - + def add_file_props(self, account, file_props): ''' file_prop to the dict of current file_props. It is identified by account name and sid ''' - if file_props is None or \ - ('sid' in file_props) is False: + if file_props is None or ('sid' in file_props) is False: return _id = file_props['sid'] if account not in self.files_props: self.files_props[account] = {} self.files_props[account][_id] = file_props - + def remove_file_props(self, account, sid): if account in self.files_props: fl_props = self.files_props[account] if sid in fl_props: del(fl_props[sid]) - + if len(self.files_props) == 0: self.connected = 0 - + def get_file_props(self, account, sid): ''' get fil_prop by account name and session id ''' if account in self.files_props: @@ -287,14 +283,14 @@ if sid in fl_props: return fl_props[sid] return None - + def on_connection_accepted(self, sock): - sock_hash = sock.__hash__() + sock_hash = sock.__hash__() if sock_hash not in self.senders: - self.senders[sock_hash] = Socks5Sender(self.idlequeue, - sock_hash, self, sock[0], sock[1][0], sock[1][1]) + self.senders[sock_hash] = Socks5Sender(self.idlequeue, sock_hash, self, + sock[0], sock[1][0], sock[1][1]) self.connected += 1 - + def process_result(self, result, actor): ''' Take appropriate actions upon the result: [ 0, - 1 ] complete/end transfer @@ -310,9 +306,9 @@ self.complete_transfer_cb(account, actor.file_props) elif self.progress_transfer_cb is not None: self.progress_transfer_cb(actor.account, actor.file_props) - - def remove_receiver(self, idx, do_disconnect = True): - ''' Remove reciver from the list and decrease + + def remove_receiver(self, idx, do_disconnect=True): + ''' Remove reciver from the list and decrease the number of active connections with 1''' if idx != -1: if idx in self.readers: @@ -323,11 +319,11 @@ reader.disconnect() else: if reader.streamhost is not None: - reader.streamhost['state'] = -1 + reader.streamhost['state'] = -1 del(self.readers[idx]) - - def remove_sender(self, idx, do_disconnect = True): - ''' Remove sender from the list of senders and decrease the + + def remove_sender(self, idx, do_disconnect=True): + ''' Remove sender from the list of senders and decrease the number of active connections with 1''' if idx != -1: if idx in self.senders: @@ -342,13 +338,14 @@ self.listener.disconnect() self.listener = None self.connected -= 1 - + class Socks5: def __init__(self, idlequeue, host, port, initiator, target, sid): if host is not None: try: self.host = host - self.ais = socket.getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM) + self.ais = socket.getaddrinfo(host, port, socket.AF_UNSPEC, + socket.SOCK_STREAM) except socket.gaierror: self.ais = None self.idlequeue = idlequeue @@ -364,7 +361,7 @@ self.size = 0 self.remaining_buff = '' self.file = None - + def open_file_for_reading(self): if self.file is None: try: @@ -376,7 +373,7 @@ except IOError, e: self.close_file() raise IOError, e - + def close_file(self): if self.file: if not self.file.closed: @@ -385,7 +382,7 @@ except Exception: pass self.file = None - + def get_fd(self): ''' Test if file is already open and return its fd, or just open the file and return the fd. @@ -404,7 +401,7 @@ self.file_props['last-time'] = self.idlequeue.current_time() self.file_props['received-len'] = offset return fd - + def rem_fd(self, fd): if 'fd' in self.file_props: del(self.file_props['fd']) @@ -412,21 +409,20 @@ fd.close() except Exception: pass - - + def receive(self): - ''' Reads small chunks of data. + ''' Reads small chunks of data. Calls owner's disconnected() method if appropriate.''' received = '' - try: + try: add = self._recv(64) - except Exception, e: - add='' - received +=add + except Exception, e: + add = '' + received += add if len(add) == 0: self.disconnect() return add - + def send_raw(self,raw_data): ''' Writes raw outgoing data. ''' try: @@ -434,7 +430,7 @@ except Exception, e: self.disconnect() return len(raw_data) - + def write_next(self): if self.remaining_buff != '': buff = self.remaining_buff @@ -483,12 +479,10 @@ self.state = 8 # end connection self.disconnect() return -1 - + def get_file_contents(self, timeout): - ''' read file contents from socket and write them to file ''', \ - self.file_props['type'], self.file_props['sid'] - if self.file_props is None or \ - ('file-name' in self.file_props) is False: + ''' read file contents from socket and write them to file ''' + if self.file_props is None or ('file-name' in self.file_props) is False: self.file_props['error'] = -2 return None fd = None @@ -510,7 +504,7 @@ return 0 else: fd = self.get_fd() - try: + try: buff = self._recv(MAX_BUFF_LEN) except Exception, e: buff = '' @@ -549,7 +543,7 @@ if self.file_props['received-len'] != 0: return self.file_props['received-len'] return None - + def disconnect(self): ''' Closes open descriptors and remover socket descr. from idleque ''' # be sure that we don't leave open file @@ -565,12 +559,12 @@ self.connected = False self.fd = -1 self.state = -1 - + def _get_auth_buff(self): - ''' Message, that we support 1 one auth mechanism: + ''' Message, that we support 1 one auth mechanism: the 'no auth' mechanism. ''' return struct.pack('!BBB', 0x05, 0x01, 0x00) - + def _parse_auth_buff(self, buff): ''' Parse the initial message and create a list of auth mechanisms ''' @@ -583,30 +577,31 @@ except Exception: return None return auth_mechanisms + def _get_auth_response(self): ''' socks version(5), number of extra auth methods (we send 0x00 - no auth ) ''' return struct.pack('!BB', 0x05, 0x00) - + def _get_connect_buff(self): ''' Connect request by domain name ''' - buff = struct.pack('!BBBBB%dsBB' % len(self.host), - 0x05, 0x01, 0x00, 0x03, len(self.host), self.host, + buff = struct.pack('!BBBBB%dsBB' % len(self.host), + 0x05, 0x01, 0x00, 0x03, len(self.host), self.host, self.port >> 8, self.port & 0xff) return buff - + def _get_request_buff(self, msg, command = 0x01): - ''' Connect request by domain name, + ''' Connect request by domain name, sid sha, instead of domain name (jep 0096) ''' - buff = struct.pack('!BBBBB%dsBB' % len(msg), + buff = struct.pack('!BBBBB%dsBB' % len(msg), 0x05, command, 0x00, 0x03, len(msg), msg, 0, 0) return buff - + def _parse_request_buff(self, buff): try: # don't trust on what comes from the outside - version, req_type, reserved, host_type, = \ - struct.unpack('!BBBB', buff[:4]) + version, req_type, reserved, host_type, = struct.unpack('!BBBB', + buff[:4]) if host_type == 0x01: host_arr = struct.unpack('!iiii', buff[4:8]) host, = '.'.join(str(s) for s in host_arr) @@ -615,18 +610,18 @@ host_len, = struct.unpack('!B' , buff[4]) host, = struct.unpack('!%ds' % host_len, buff[5:5 + host_len]) portlen = len(buff[host_len + 5:]) - if portlen == 1: + if portlen == 1: port, = struct.unpack('!B', buff[host_len + 5]) - elif portlen == 2: + elif portlen == 2: port, = struct.unpack('!H', buff[host_len + 5:]) # file data, comes with auth message (Gaim bug) - else: + else: port, = struct.unpack('!H', buff[host_len + 5: host_len + 7]) self.remaining_buff = buff[host_len + 7:] except Exception: return (None, None, None) return (req_type, host, port) - + def read_connect(self): ''' connect responce: version, auth method ''' buff = self._recv() @@ -636,7 +631,7 @@ version, method = None, None if version != 0x05 or method == 0xff: self.disconnect() - + def continue_paused_transfer(self): if self.state < 5: return @@ -644,18 +639,20 @@ self.idlequeue.plug_idle(self, False, True) else: self.idlequeue.plug_idle(self, True, False) - + def _get_sha1_auth(self): ''' get sha of sid + Initiator jid + Target jid ''' if 'is_a_proxy' in self.file_props: del(self.file_props['is_a_proxy']) - return sha.new('%s%s%s' % (self.sid, self.file_props['proxy_sender'], + return sha.new('%s%s%s' % (self.sid, self.file_props['proxy_sender'], self.file_props['proxy_receiver'])).hexdigest() - return sha.new('%s%s%s' % (self.sid, self.initiator, self.target)).hexdigest() - + return sha.new('%s%s%s' % (self.sid, self.initiator, self.target)).\ + hexdigest() + class Socks5Sender(Socks5, IdleObject): ''' class for sending file to socket over socks5 ''' - def __init__(self, idlequeue, sock_hash, parent, _sock, host = None, port = None): + def __init__(self, idlequeue, sock_hash, parent, _sock, host=None, + port=None): self.queue_idx = sock_hash self.queue = parent Socks5.__init__(self, idlequeue, host, port, None, None, None) @@ -669,7 +666,7 @@ self.file_props = None # start waiting for data self.idlequeue.plug_idle(self, False, True) - + def read_timeout(self): self.idlequeue.remove_timeout(self.fd) if self.state > 5: @@ -680,9 +677,9 @@ if SEND_TIMEOUT > 0: self.idlequeue.set_read_timeout(self.fd, SEND_TIMEOUT) else: - # stop transfer, there is no error code for this + # stop transfer, there is no error code for this self.pollend() - + def pollout(self): if not self.connected: self.disconnect() @@ -696,7 +693,7 @@ if self.file_props['paused']: self.file_props['continue_cb'] = self.continue_paused_transfer self.idlequeue.plug_idle(self, False, False) - return + return result = self.write_next() self.queue.process_result(result, self) if result is None or result <= 0: @@ -712,13 +709,13 @@ self.state += 1 # unplug and plug this time for reading self.idlequeue.plug_idle(self, False, True) - + def pollend(self): self.state = 8 # end connection self.disconnect() self.file_props['error'] = -1 self.queue.process_result(-1, self) - + def pollin(self): if self.connected: if self.state < 5: @@ -727,17 +724,16 @@ self.queue.result_sha(self.sha_msg, self.queue_idx) if result == -1: self.disconnect() - + elif self.state == 5: - if self.file_props is not None and \ - self.file_props['type'] == 'r': + if self.file_props is not None and self.file_props['type'] == 'r': result = self.get_file_contents(0) self.queue.process_result(result, self) else: self.disconnect() - + def send_file(self): - ''' start sending the file over verified connection ''' + ''' start sending the file over verified connection ''' if self.file_props['started']: return self.file_props['error'] = 0 @@ -756,7 +752,7 @@ # plug for writing self.idlequeue.plug_idle(self, True, False) return self.write_next() # initial for nl byte - + def main(self): ''' initial requests for verifying the connection ''' if self.state == 1: # initial read @@ -775,8 +771,8 @@ # unplug & plug for writing self.idlequeue.plug_idle(self, True, False) return None - - def disconnect(self, cb = True): + + def disconnect(self, cb=True): ''' Closes the socket. ''' # close connection and remove us from the queue Socks5.disconnect(self) @@ -788,20 +784,20 @@
class Socks5Listener(IdleObject): def __init__(self, idlequeue, port): - ''' handle all incomming connections on (0.0.0.0, port) + ''' handle all incomming connections on (0.0.0.0, port) This class implements IdleObject, but we will expect only pollin events though ''' self.port = port self.ais = socket.getaddrinfo(None, port, socket.AF_UNSPEC, - socket.SOCK_STREAM, socket.SOL_TCP, socket.AI_PASSIVE) - self.queue_idx = -1 + socket.SOCK_STREAM, socket.SOL_TCP, socket.AI_PASSIVE) + self.queue_idx = -1 self.idlequeue = idlequeue self.queue = None self.started = False self._sock = None self.fd = -1 - + def bind(self): for ai in self.ais: #try the different possibilities (ipv6, ipv4, etc.) @@ -825,16 +821,16 @@ self.fd = self._serv.fileno() self.idlequeue.plug_idle(self, False, True) self.started = True - + def pollend(self): ''' called when we stop listening on (host, port) ''' self.disconnect() - + def pollin(self): ''' accept a new incomming connection and notify queue''' sock = self.accept_conn() self.queue.on_connection_accepted(sock) - + def disconnect(self): ''' free all resources, we are not listening anymore ''' self.idlequeue.remove_timeout(self.fd) @@ -846,13 +842,13 @@ self._serv.close() except Exception: pass - + def accept_conn(self): ''' accepts a new incomming connection ''' _sock = self._serv.accept() _sock[0].setblocking(False) return _sock - + class Socks5Receiver(Socks5, IdleObject): def __init__(self, idlequeue, streamhost, sid, file_props = None): self.queue_idx = -1 @@ -871,9 +867,10 @@ self.file_props['paused'] = False self.file_props['continue_cb'] = self.continue_paused_transfer self.file_props['stalled'] = False - Socks5.__init__(self, idlequeue, streamhost['host'], int(streamhost['port']), - streamhost['initiator'], streamhost['target'], sid) - + Socks5.__init__(self, idlequeue, streamhost['host'], + int(streamhost['port']), streamhost['initiator'], streamhost['target'], + sid) + def read_timeout(self): self.idlequeue.remove_timeout(self.fd) if self.state > 5: @@ -886,11 +883,11 @@ if READ_TIMEOUT > 0: self.idlequeue.set_read_timeout(self.fd, READ_TIMEOUT) else: - # stop transfer, there is no error code for this + # stop transfer, there is no error code for this self.pollend() else: self.queue.reconnect_receiver(self, self.streamhost) - + def connect(self): ''' create the socket and plug it to the idlequeue ''' if self.ais is None: @@ -898,10 +895,10 @@
for ai in self.ais: try: - self._sock=socket.socket(*ai[:3]) + self._sock = socket.socket(*ai[:3]) # this will not block the GUI self._sock.setblocking(False) - self._server=ai[4] + self._server = ai[4] break except Exception: if sys.exc_value[0] == errno.EINPROGRESS: @@ -914,11 +911,12 @@ self.do_connect() self.idlequeue.set_read_timeout(self.fd, CONNECT_TIMEOUT) return None - + def _is_connected(self): if self.state < 5: return False return True + def pollout(self): self.idlequeue.remove_timeout(self.fd) if self.state == 0: @@ -939,7 +937,7 @@ # unplug and plug for reading self.idlequeue.plug_idle(self, False, True) self.idlequeue.set_read_timeout(self.fd, CONNECT_TIMEOUT) - + def pollend(self): if self.state >= 5: # error during transfer @@ -948,7 +946,7 @@ self.queue.process_result(-1, self) else: self.queue.reconnect_receiver(self, self.streamhost) - + def pollin(self): self.idlequeue.remove_timeout(self.fd) if self.connected: @@ -965,10 +963,9 @@ self.idlequeue.set_read_timeout(self.fd, STALLED_TIMEOUT) result = self.get_file_contents(0) self.queue.process_result(result, self) - else: self.disconnect() - + def do_connect(self): try: self._sock.connect(self._server) @@ -979,7 +976,7 @@ (errnum, errstr) = ee self.connect_timeout += 1 if errnum == 111 or self.connect_timeout > 1000: - self.queue._connection_refused(self.streamhost, + self.queue._connection_refused(self.streamhost, self.file_props, self.queue_idx) return None # win32 needs this @@ -994,13 +991,13 @@ self.file_props['connected'] = True self.file_props['disconnect_cb'] = self.disconnect self.state = 1 # connected - + # stop all others connections to sender's streamhosts self.queue._socket_connected(self.streamhost, self.file_props) self.idlequeue.plug_idle(self, True, False) return 1 # we are connected - - def main(self, timeout = 0): + + def main(self, timeout=0): ''' begin negotiation. on success 'address' != 0 ''' result = 1 buff = self.receive() @@ -1008,7 +1005,7 @@ # end connection self.pollend() return - + if self.state == 2: # read auth response if buff is None or len(buff) != 2: return None @@ -1027,7 +1024,7 @@ addrlen = ord(buff[4]) address = struct.unpack('!%ds' % addrlen, buff[5:addrlen + 5]) portlen = len(buff[addrlen + 5:]) - if portlen == 1: + if portlen == 1: port, = struct.unpack('!B', buff[addrlen + 5]) elif portlen == 2: port, = struct.unpack('!H', buff[addrlen + 5:]) @@ -1036,14 +1033,14 @@ self.remaining_buff = buff[addrlen + 7:] self.state = 5 # for senders: init file_props and send '\n' if self.queue.on_success: - result = self.queue.send_success_reply(self.file_props, + result = self.queue.send_success_reply(self.file_props, self.streamhost) if result == 0: self.state = 8 self.disconnect() - - # for senders: init file_props - if result == 1 and self.state == 5: + + # for senders: init file_props + if result == 1 and self.state == 5: if self.file_props['type'] == 's': self.file_props['error'] = 0 self.file_props['disconnect_cb'] = self.disconnect @@ -1063,15 +1060,15 @@ self.idlequeue.plug_idle(self, False, True) self.file_props['continue_cb'] = self.continue_paused_transfer # we have set up the connection, next - retrieve file - self.state = 6 + self.state = 6 if self.state < 5: self.idlequeue.plug_idle(self, True, False) self.state += 1 return None - - def disconnect(self, cb = True): + + def disconnect(self, cb=True): ''' Closes the socket. Remove self from queue if cb is True''' - # close connection + # close connection Socks5.disconnect(self) if cb is True: self.file_props['disconnect_cb'] = None
Modified: branches/osx_newbuildsys/src/common/xmpp/auth_nb.py =================================================================== --- branches/osx_newbuildsys/src/common/xmpp/auth_nb.py 2008-11-28 18:38:03 UTC (rev 10715) +++ branches/osx_newbuildsys/src/common/xmpp/auth_nb.py 2008-11-28 18:47:04 UTC (rev 10716) @@ -135,24 +135,31 @@ self.startsasl='not-supported' self.DEBUG('SASL not supported by server', 'error') return - mecs=[] + self.mecs=[] for mec in feats.getTag('mechanisms', namespace=NS_SASL).getTags('mechanism'): - mecs.append(mec.getData()) + self.mecs.append(mec.getData()) self._owner.RegisterHandler('challenge', self.SASLHandler, xmlns=NS_SASL) self._owner.RegisterHandler('failure', self.SASLHandler, xmlns=NS_SASL) self._owner.RegisterHandler('success', self.SASLHandler, xmlns=NS_SASL) - if "GSSAPI" in mecs and have_kerberos: - rc, self.gss_vc = kerberos.authGSSClientInit('xmpp@' + - self._owner.Server) + self.MechanismHandler() + + def MechanismHandler(self): + if "GSSAPI" in self.mecs and have_kerberos: + self.mecs.remove("GSSAPI") + rc, self.gss_vc = kerberos.authGSSClientInit('xmpp@' + + self._owner.socket._hostfqdn) + rc = kerberos.authGSSClientStep(self.gss_vc, '') response = kerberos.authGSSClientResponse(self.gss_vc) node=Node('auth',attrs={'xmlns': NS_SASL, 'mechanism': 'GSSAPI'}, payload=(response or "")) self.mechanism = "GSSAPI" self.gss_step = GSS_STATE_STEP - elif "DIGEST-MD5" in mecs: + elif "DIGEST-MD5" in self.mecs: + self.mecs.remove("DIGEST-MD5") node=Node('auth',attrs={'xmlns': NS_SASL, 'mechanism': 'DIGEST-MD5'}) self.mechanism = "DIGEST-MD5" - elif "PLAIN" in mecs: + elif "PLAIN" in self.mecs: + self.mecs.remove("PLAIN") sasl_data='%s\x00%s\x00%s' % (self.username+'@' + self._owner.Server, self.username, self.password) node=Node('auth', attrs={'xmlns':NS_SASL,'mechanism':'PLAIN'}, @@ -177,6 +184,10 @@ except Exception: reason = challenge self.DEBUG('Failed SASL authentification: %s' % reason, 'error') + if len(self.mecs) > 0: + # There are other mechanisms to test + self.MechanismHandler() + raise NodeProcessed if self.on_sasl : self.on_sasl () raise NodeProcessed @@ -195,7 +206,7 @@ incoming_data = challenge.getData() data=base64.decodestring(incoming_data) self.DEBUG('Got challenge:'+data,'ok') - if self.mechanism == "GSSAPI": + if self.mechanism == 'GSSAPI': if self.gss_step == GSS_STATE_STEP: rc = kerberos.authGSSClientStep(self.gss_vc, incoming_data) if rc != kerberos.AUTH_GSS_CONTINUE: @@ -204,7 +215,7 @@ rc = kerberos.authGSSClientUnwrap(self.gss_vc, incoming_data) response = kerberos.authGSSClientResponse(self.gss_vc) rc = kerberos.authGSSClientWrap(self.gss_vc, response, - self.username) + kerberos.authGSSClientUserName(self.gss_vc)) response = kerberos.authGSSClientResponse(self.gss_vc) if not response: response = ''
Modified: branches/osx_newbuildsys/src/common/xmpp/dispatcher_nb.py =================================================================== --- branches/osx_newbuildsys/src/common/xmpp/dispatcher_nb.py 2008-11-28 18:38:03 UTC (rev 10715) +++ branches/osx_newbuildsys/src/common/xmpp/dispatcher_nb.py 2008-11-28 18:47:04 UTC (rev 10716) @@ -141,6 +141,10 @@ self.DEBUG('Invalid XML received from server. Forcing disconnect.', 'error') self._owner.Connection.pollend() return 0 + except ValueError, e: + self.DEBUG(str(e), 'error') + self._owner.Connection.pollend() + return 0 if len(self._pendingExceptions) > 0: _pendingException = self._pendingExceptions.pop() raise _pendingException[0], _pendingException[1], _pendingException[2]
Modified: branches/osx_newbuildsys/src/common/xmpp/simplexml.py =================================================================== --- branches/osx_newbuildsys/src/common/xmpp/simplexml.py 2008-11-28 18:38:03 UTC (rev 10715) +++ branches/osx_newbuildsys/src/common/xmpp/simplexml.py 2008-11-28 18:47:04 UTC (rev 10716) @@ -386,7 +386,11 @@ else: self._document_attrs[attr] = val ns = self._document_nsp.get(nsp, 'http://www.gajim.org/xmlns/undeclared-root') - self.stream_header_received(ns, name, attrs) + try: + self.stream_header_received(ns, name, attrs) + except ValueError, e: + self._document_attrs = None + raise ValueError(str(e)) if not self.last_is_data and self._ptr.parent: self._ptr.parent.data.append('') self.last_is_data = 0
Modified: branches/osx_newbuildsys/src/common/xmpp/transports_nb.py =================================================================== --- branches/osx_newbuildsys/src/common/xmpp/transports_nb.py 2008-11-28 18:38:03 UTC (rev 10715) +++ branches/osx_newbuildsys/src/common/xmpp/transports_nb.py 2008-11-28 18:47:04 UTC (rev 10716) @@ -246,6 +246,7 @@ self._exported_methods=[self.send, self.disconnect, self.onreceive, self.set_send_timeout, self.start_disconnect, self.set_timeout, self.remove_timeout] self._server = server + self._hostfqdn = server[0] self.on_connect = on_connect self.on_connect_failure = on_connect_failure self.on_receive = None @@ -304,6 +305,7 @@ server=self._server else: self._server = server + self._hostfqdn = self._server[0] self.printed_error = False self.state = 0 try:
Modified: branches/osx_newbuildsys/src/common/zeroconf/client_zeroconf.py =================================================================== --- branches/osx_newbuildsys/src/common/zeroconf/client_zeroconf.py 2008-11-28 18:38:03 UTC (rev 10715) +++ branches/osx_newbuildsys/src/common/zeroconf/client_zeroconf.py 2008-11-28 18:47:04 UTC (rev 10716) @@ -164,10 +164,11 @@ if on_not_ok: on_not_ok('Connection to host could not be established.') return - if self.conn_holder.number_of_awaiting_messages.has_key(self.fd): - self.conn_holder.number_of_awaiting_messages[self.fd] += 1 + id = stanza.getThread() + if self.conn_holder.ids_of_awaiting_messages.has_key(self.fd): + self.conn_holder.ids_of_awaiting_messages[self.fd].append(id) else: - self.conn_holder.number_of_awaiting_messages[self.fd] = 1 + self.conn_holder.ids_of_awaiting_messages[self.fd] = [id]
def add_stanza(self, stanza, is_message=False): if self.Connection: @@ -178,15 +179,16 @@ self.stanzaqueue.append((stanza, is_message))
if is_message: - if self.conn_holder.number_of_awaiting_messages.has_key(self.fd): - self.conn_holder.number_of_awaiting_messages[self.fd] += 1 + id = stanza.getThread() + if self.conn_holder.ids_of_awaiting_messages.has_key(self.fd): + self.conn_holder.ids_of_awaiting_messages[self.fd].append(id) else: - self.conn_holder.number_of_awaiting_messages[self.fd] = 1 + self.conn_holder.ids_of_awaiting_messages[self.fd] = [id]
return True
def on_message_sent(self, connection_id): - self.conn_holder.number_of_awaiting_messages[connection_id] -= 1 + self.conn_holder.ids_of_awaiting_messages[connection_id].pop(0)
def on_connect(self, conn): self.Connection = conn @@ -245,8 +247,8 @@
def on_disconnect(self): if self.conn_holder: - if self.conn_holder.number_of_awaiting_messages.has_key(self.fd): - del self.conn_holder.number_of_awaiting_messages[self.fd] + if self.conn_holder.ids_of_awaiting_messages.has_key(self.fd): + del self.conn_holder.ids_of_awaiting_messages[self.fd] self.conn_holder.remove_connection(self.sock_hash) if self.__dict__.has_key('Dispatcher'): self.Dispatcher.PlugOut() @@ -402,11 +404,11 @@ self._plug_idle()
def read_timeout(self): - if self.client.conn_holder.number_of_awaiting_messages.has_key(self.fd) \ - and self.client.conn_holder.number_of_awaiting_messages[self.fd] > 0: - self.client._caller.dispatch('MSGERROR',[unicode(self.client.to), -1, - _('Connection to host could not be established: Timeout while sending data.'), None, None]) - self.client.conn_holder.number_of_awaiting_messages[self.fd] = 0 + ids = self.client.conn_holder.ids_of_awaiting_messages + if self.fd in ids and len(ids[self.fd]) > 0: + for id in ids[self.fd]: + self._owner.Dispatcher.Event('', DATA_ERROR, (self.client.to, id)) + ids[self.fd] = [] self.pollend()
def do_connect(self): @@ -577,7 +579,7 @@ self.ip_to_hash = {} self.hash_to_port = {} self.listener = None - self.number_of_awaiting_messages = {} + self.ids_of_awaiting_messages = {}
def connect(self, show, msg): self.port = self.start_listener(self.caller.port)
Modified: branches/osx_newbuildsys/src/common/zeroconf/connection_zeroconf.py =================================================================== --- branches/osx_newbuildsys/src/common/zeroconf/connection_zeroconf.py 2008-11-28 18:38:03 UTC (rev 10715) +++ branches/osx_newbuildsys/src/common/zeroconf/connection_zeroconf.py 2008-11-28 18:47:04 UTC (rev 10716) @@ -360,18 +360,25 @@ def get_status(self): return STATUS_LIST[self.connected]
- def send_message(self, jid, msg, keyID, type_ = 'chat', subject='', - chatstate = None, msg_id = None, composing_xep = None, resource = None, - user_nick = None, session=None, forward_from=None, form_node=None, original_message=None): + def send_message(self, jid, msg, keyID, type_='chat', subject='', + chatstate=None, msg_id=None, composing_xep=None, resource=None, + user_nick=None, xhtml=None, session=None, forward_from=None, form_node=None, + original_message=None, delayed=None): fjid = jid
+ if msg and not xhtml and gajim.config.get( + 'rst_formatting_outgoing_messages'): + from common.rst_xhtml_generator import create_xhtml + xhtml = create_xhtml(msg) if not self.connection: return if not msg and chatstate is None: return
if self.status in ('invisible', 'offline'): - self.dispatch('MSGERROR', [unicode(jid), '-1', _('You are not connected or not visible to others. Your message could not be sent.'), None, None]) + self.dispatch('MSGERROR', [unicode(jid), -1, + _('You are not connected or not visible to others. Your message ' + 'could not be sent.'), None, None, session]) return
msgtxt = msg @@ -397,15 +404,16 @@ return 3
if type_ == 'chat': - msg_iq = common.xmpp.Message(to = fjid, body = msgtxt, typ = type_) + msg_iq = common.xmpp.Message(to=fjid, body=msgtxt, typ=type_, + xhtml=xhtml)
else: if subject: - msg_iq = common.xmpp.Message(to = fjid, body = msgtxt, - typ = 'normal', subject = subject) + msg_iq = common.xmpp.Message(to=fjid, body=msgtxt, typ='normal', + subject=subject, xhtml=xhtml) else: - msg_iq = common.xmpp.Message(to = fjid, body = msgtxt, - typ = 'normal') + msg_iq = common.xmpp.Message(to=fjid, body=msgtxt, typ='normal', + xhtml=xhtml)
if msgenc: msg_iq.setTag(common.xmpp.NS_ENCRYPTED + ' x').setData(msgenc) @@ -428,6 +436,20 @@ if chatstate is 'composing' or msgtxt: chatstate_node.addChild(name = 'composing')
+ if forward_from: + addresses = msg_iq.addChild('addresses', + namespace=common.xmpp.NS_ADDRESS) + addresses.addChild('address', attrs = {'type': 'ofrom', + 'jid': forward_from}) + + # XEP-0203 + if delayed: + our_jid = gajim.get_jid_from_account(self.name) + '/' + \ + self.server_resource + timestamp = time.strftime('%Y-%m-%dT%TZ', time.gmtime(delayed)) + msg_iq.addChild('delay', namespace=common.xmpp.NS_DELAY2, + attrs={'from': our_jid, 'stamp': timestamp}) + if session: session.last_send = time.time() msg_iq.setThread(session.thread_id) @@ -455,13 +477,13 @@
def on_send_not_ok(reason): reason += ' ' + _('Your message could not be sent.') - self.dispatch('MSGERROR', [jid, '-1', reason, None, None, session]) + self.dispatch('MSGERROR', [jid, -1, reason, None, None, session])
ret = self.connection.send(msg_iq, msg is not None, on_ok=on_send_ok, on_not_ok=on_send_not_ok) if ret == -1: # Contact Offline - self.dispatch('MSGERROR', [jid, '-1', _('Contact is offline. Your message could not be sent.'), None, None, session]) + self.dispatch('MSGERROR', [jid, -1, _('Contact is offline. Your message could not be sent.'), None, None, session]) return ret
def send_stanza(self, stanza): @@ -553,6 +575,13 @@ self.dispatch('STANZA_ARRIVED', unicode(data, errors = 'ignore')) elif event == common.xmpp.transports.DATA_SENT: self.dispatch('STANZA_SENT', unicode(data)) + elif event == common.xmpp.transports.DATA_ERROR: + thread_id = data[1] + frm = unicode(data[0]) + session = self.get_or_create_session(frm, thread_id) + self.dispatch('MSGERROR', [frm, -1, + _('Connection to host could not be established: Timeout while ' + 'sending data.'), None, None, session])
# END ConnectionZeroconf
Modified: branches/osx_newbuildsys/src/config.py =================================================================== --- branches/osx_newbuildsys/src/config.py 2008-11-28 18:38:03 UTC (rev 10715) +++ branches/osx_newbuildsys/src/config.py 2008-11-28 18:47:04 UTC (rev 10716) @@ -1528,7 +1528,7 @@ self.xml.get_widget('gpg_choose_button2').set_sensitive(True) self.init_account_gpg() else: - gpg_key_label.set_text(_('OpenPGP is not usable in this computer')) + gpg_key_label.set_text(_('OpenPGP is not usable on this computer')) self.xml.get_widget('gpg_choose_button2').set_sensitive(False)
for opt in ('first_name', 'last_name', 'jabber_id', 'email'): @@ -1627,7 +1627,7 @@ self.xml.get_widget('gpg_choose_button1').set_sensitive(True) self.init_account_gpg() else: - gpg_key_label.set_text(_('OpenPGP is not usable in this computer')) + gpg_key_label.set_text(_('OpenPGP is not usable on this computer')) self.xml.get_widget('gpg_choose_button1').set_sensitive(False)
# General tab
Modified: branches/osx_newbuildsys/src/conversation_textview.py =================================================================== --- branches/osx_newbuildsys/src/conversation_textview.py 2008-11-28 18:38:03 UTC (rev 10715) +++ branches/osx_newbuildsys/src/conversation_textview.py 2008-11-28 18:47:04 UTC (rev 10716) @@ -157,8 +157,8 @@
class ConversationTextview: - '''Class for the conversation textview (where user reads already said messages) - for chat/groupchat windows''' + '''Class for the conversation textview (where user reads already said + messages) for chat/groupchat windows'''
FOCUS_OUT_LINE_PIXBUF = gtk.gdk.pixbuf_new_from_file(os.path.join( gajim.DATA_DIR, 'pixmaps', 'muc_separator.png')) @@ -267,6 +267,19 @@ id = self.tagMail.connect('event', self.hyperlink_handler, 'mail') self.handlers[id] = self.tagMail
+ self.tagXMPP = buffer.create_tag('xmpp') + self.tagXMPP.set_property('foreground', color) + self.tagXMPP.set_property('underline', pango.UNDERLINE_SINGLE) + id = self.tagXMPP.connect('event', self.hyperlink_handler, 'xmpp') + self.handlers[id] = self.tagXMPP + + self.tagSthAtSth = buffer.create_tag('sth_at_sth') + self.tagSthAtSth.set_property('foreground', color) + self.tagSthAtSth.set_property('underline', pango.UNDERLINE_SINGLE) + id = self.tagSthAtSth.connect('event', self.hyperlink_handler, + 'sth_at_sth') + self.handlers[id] = self.tagSthAtSth + tag = buffer.create_tag('bold') tag.set_property('weight', pango.WEIGHT_BOLD)
@@ -440,7 +453,7 @@
self.xep0184_shown[id_] = SHOWN return False - gobject.timeout_add_seconds(4, show_it) + gobject.timeout_add_seconds(3, show_it)
buffer.end_user_action()
@@ -610,7 +623,8 @@ over_line = False xep0184_warning = False for tag in tags: - if tag in (tag_table.lookup('url'), tag_table.lookup('mail')): + if tag in (tag_table.lookup('url'), tag_table.lookup('mail'), \ + tag_table.lookup('xmpp'), tag_table.lookup('sth_at_sth')): self.tv.get_window(gtk.TEXT_WINDOW_TEXT).set_cursor( gtk.gdk.Cursor(gtk.gdk.HAND2)) self.change_cursor = tag @@ -755,7 +769,7 @@ if tags: # we clicked on sth special (it can be status message too) for tag in tags: tag_name = tag.get_property('name') - if tag_name in ('url', 'mail'): + if tag_name in ('url', 'mail', 'xmpp', 'sth_at_sth'): return True # we block normal context menu
# we check if sth was selected and if it was we assign @@ -828,6 +842,8 @@ join_group_chat_menuitem.set_image(muc_icon)
text = text.lower() + if text.startswith('xmpp:'): + text = text[5:] id = childs[2].connect('activate', self.on_copy_link_activate, text) self.handlers[id] = childs[2] id = childs[3].connect('activate', self.on_open_link_activate, kind, @@ -855,6 +871,16 @@ else: childs[7].hide() # hide add to roster menuitem
+ if kind == 'xmpp': + childs[2].hide() # copy mail address + childs[3].hide() # open mail composer + childs[4].hide() # jid section separator + elif kind == 'mail': + childs[4].hide() # jid section separator + childs[5].hide() # start chat + childs[6].hide() # join group chat + childs[7].hide() # add to roster + childs[0].hide() # copy link location childs[1].hide() # open link in browser
@@ -876,7 +902,18 @@ self.make_link_menu(event, kind, word) else: # we launch the correct application - helpers.launch_browser_mailer(kind, word) + if kind == 'xmpp': + word = word[5:] + if '?' in word: + (jid, action) = word.split('?') + if action == 'join': + self.on_join_group_chat_menuitem_activate(None, jid) + else: + self.on_start_chat_activate(None, jid) + else: + self.on_start_chat_activate(None, word) + else: + helpers.launch_browser_mailer(kind, word)
def html_hyperlink_handler(self, texttag, widget, event, iter_, kind, href): if event.type == gtk.gdk.BUTTON_PRESS: @@ -966,8 +1003,13 @@ file.close()
try: - p = Popen(['latex', '--interaction=nonstopmode', tmpfile + '.tex'], - cwd=gettempdir()) + if os.name == 'nt': + # CREATE_NO_WINDOW + p = Popen(['latex', '--interaction=nonstopmode', + tmpfile + '.tex'], creationflags=0x08000000, cwd=gettempdir()) + else: + p = Popen(['latex', '--interaction=nonstopmode', + tmpfile + '.tex'], cwd=gettempdir()) exitcode = p.wait() except Exception, e: exitcode = _('Error executing "%(command)s": %(error)s') % { @@ -977,15 +1019,20 @@ if exitcode == 0: latex_png_dpi = gajim.config.get('latex_png_dpi') try: - p = Popen(['dvipng', '-bg', 'rgb 1.0 1.0 1.0', '-T', 'tight', '-D', - latex_png_dpi, tmpfile + '.dvi', '-o', tmpfile + '.png'], - cwd=gettempdir()) + if os.name == 'nt': + # CREATE_NO_WINDOW + p = Popen(['dvipng', '-bg', 'rgb 1.0 1.0 1.0', '-T', 'tight', + '-D', latex_png_dpi, tmpfile + '.dvi', '-o', + tmpfile + '.png'], creationflags=0x08000000, cwd=gettempdir()) + else: + p = Popen(['dvipng', '-bg', 'rgb 1.0 1.0 1.0', '-T', 'tight', + '-D', latex_png_dpi, tmpfile + '.dvi', '-o', + tmpfile + '.png'], cwd=gettempdir()) exitcode = p.wait() except Exception, e: exitcode = _('Error executing "%(command)s": %(error)s') % { - 'command': 'dvipng -bg rgb 1.0 1.0 1.0 -T tight -D %s %s.dvi -o %s.png' %\ - (latex_png_dpi, tmpfile, tmpfile), - 'error': str(e)} + 'command': 'dvipng -bg rgb 1.0 1.0 1.0 -T tight -D %s %s.dvi -o ' + '%s.png' % (latex_png_dpi, tmpfile, tmpfile), 'error': str(e)}
extensions = ['.tex', '.log', '.aux', '.dvi'] for ext in extensions: @@ -1040,11 +1087,16 @@ text_is_valid_uri: tags.append('url') use_other_tags = False - elif special_text.startswith('mailto:') or \ - gajim.interface.sth_at_sth_dot_sth_re.match(special_text): - # it's a mail + elif special_text.startswith('mailto:'): tags.append('mail') use_other_tags = False + elif special_text.startswith('xmpp:'): + tags.append('xmpp') + use_other_tags = False + elif gajim.interface.sth_at_sth_dot_sth_re.match(special_text): + # it's a JID or mail + tags.append('sth_at_sth') + use_other_tags = False elif special_text.startswith('*'): # it's a bold text tags.append('bold') if special_text[1] == '/' and special_text[-2] == '/' and\ @@ -1095,7 +1147,8 @@ imagepath = self.latex_to_image(special_text) except LatexError, e: # print the error after the line has been written - gobject.idle_add(self.print_conversation_line, str(e), '', 'info', '', None) + gobject.idle_add(self.print_conversation_line, str(e), '', 'info', + '', None) imagepath = None end_iter = buffer.get_end_iter() anchor = buffer.create_child_anchor(end_iter)
Modified: branches/osx_newbuildsys/src/features_window.py =================================================================== --- branches/osx_newbuildsys/src/features_window.py 2008-11-28 18:38:03 UTC (rev 10715) +++ branches/osx_newbuildsys/src/features_window.py 2008-11-28 18:47:04 UTC (rev 10716) @@ -277,15 +277,26 @@ file.flush() file.close() try: - p = Popen(['latex', '--interaction=nonstopmode', tmpfile + '.tex'], - cwd=gettempdir()) + if os.name == 'nt': + # CREATE_NO_WINDOW + p = Popen(['latex', '--interaction=nonstopmode', tmpfile + '.tex'], + creationflags=0x08000000, cwd=gettempdir()) + else: + p = Popen(['latex', '--interaction=nonstopmode', tmpfile + '.tex'], + cwd=gettempdir()) exitcode = p.wait() except Exception: exitcode = 1 if exitcode == 0: try: - p = Popen(['dvipng', '-bg', 'white', '-T', 'tight', - tmpfile + '.dvi', '-o', tmpfile + '.png'], cwd=gettempdir()) + if os.name == 'nt': + # CREATE_NO_WINDOW + p = Popen(['dvipng', '-bg', 'white', '-T', 'tight', + tmpfile + '.dvi', '-o', tmpfile + '.png'], + creationflags=0x08000000, cwd=gettempdir()) + else: + p = Popen(['dvipng', '-bg', 'white', '-T', 'tight', + tmpfile + '.dvi', '-o', tmpfile + '.png'], cwd=gettempdir()) exitcode = p.wait() except Exception: exitcode = 1
Modified: branches/osx_newbuildsys/src/gajim.py =================================================================== --- branches/osx_newbuildsys/src/gajim.py 2008-11-28 18:38:03 UTC (rev 10715) +++ branches/osx_newbuildsys/src/gajim.py 2008-11-28 18:47:04 UTC (rev 10716) @@ -954,7 +954,8 @@ if array[3]: msg = _('error while sending %(message)s ( %(error)s )') % { 'message': array[3], 'error': msg} - array[5].roster_message(jid, msg, array[4], msg_type='error') + if session: + session.roster_message(jid, msg, array[4], msg_type='error')
def handle_event_msgsent(self, account, array): #('MSGSENT', account, (jid, msg, keyID)) @@ -983,7 +984,7 @@ c = gajim.contacts.get_first_contact_from_jid(account, jid) c.resource = array[1] self.roster.remove_contact_from_groups(c.jid, account, - [('Not in Roster'),]) + [_('Not in Roster'), _('Observers')], update=False) else: keyID = '' attached_keys = gajim.config.get_per('accounts', account,
Modified: branches/osx_newbuildsys/src/history_window.py =================================================================== --- branches/osx_newbuildsys/src/history_window.py 2008-11-28 18:38:03 UTC (rev 10715) +++ branches/osx_newbuildsys/src/history_window.py 2008-11-28 18:47:04 UTC (rev 10716) @@ -119,6 +119,13 @@ if jid: self.jid_entry.set_text(jid)
+ gtkgui_helpers.resize_window(self.window, + gajim.config.get('history_window_width'), + gajim.config.get('history_window_height')) + gtkgui_helpers.move_window(self.window, + gajim.config.get('history_window_x-position'), + gajim.config.get('history_window_y-position')) + xml.signal_autoconnect(self) self.window.show_all()
@@ -217,9 +224,11 @@
def on_history_window_key_press_event(self, widget, event): if event.keyval == gtk.keysyms.Escape: + self.save_state() self.window.destroy()
def on_close_button_clicked(self, widget): + self.save_state() self.window.destroy()
def on_jid_entry_activate(self, widget): @@ -588,4 +597,15 @@ self._load_history(jid, account) self.results_window.set_property('visible', False)
+ def save_state(self): + x,y = self.window.window.get_root_origin() + width, height = self.window.get_size() + + gajim.config.set('history_window_x-position', x) + gajim.config.set('history_window_y-position', y) + gajim.config.set('history_window_width', width); + gajim.config.set('history_window_height', height); + + gajim.interface.save_config() + # vim: se ts=3:
Modified: branches/osx_newbuildsys/src/message_window.py =================================================================== --- branches/osx_newbuildsys/src/message_window.py 2008-11-28 18:38:03 UTC (rev 10715) +++ branches/osx_newbuildsys/src/message_window.py 2008-11-28 18:47:04 UTC (rev 10716) @@ -452,6 +452,9 @@ label = None elif self.get_num_controls() == 1: label = name + state = control.contact.chatstate + if state and bool(len(state)): + label = '%s (%s)' % (label, _(state.capitalize())) else: label = _('Messages')
@@ -579,6 +582,8 @@ else: status_img.set_from_pixbuf(tab_img.get_pixbuf())
+ self.show_title() + def repaint_themed_widgets(self): '''Repaint controls in the window with theme color''' # iterate through controls and repaint
Modified: branches/osx_newbuildsys/src/music_track_listener.py =================================================================== --- branches/osx_newbuildsys/src/music_track_listener.py 2008-11-28 18:38:03 UTC (rev 10715) +++ branches/osx_newbuildsys/src/music_track_listener.py 2008-11-28 18:47:04 UTC (rev 10716) @@ -87,6 +87,17 @@ 'NameOwnerChanged', 'org.freedesktop.DBus', arg0='org.bansheeproject.Banshee')
+ ## Quod Libet + bus.add_signal_receiver(self._quodlibet_state_change_cb, + 'SongStarted', 'net.sacredchao.QuodLibet') + bus.add_signal_receiver(self._quodlibet_state_change_cb, + 'Paused', 'net.sacredchao.QuodLibet') + bus.add_signal_receiver(self._quodlibet_state_change_cb, + 'Unpaused', 'net.sacredchao.QuodLibet') + bus.add_signal_receiver(self._player_name_owner_changed, + 'NameOwnerChanged', 'org.freedesktop.DBus', + arg0='net.sacredchao.QuodLibet') + def _player_name_owner_changed(self, name, old, new): if not new: self.emit('music-track-changed', None) @@ -143,11 +154,11 @@
def _rhythmbox_properties_extract(self, props): info = MusicTrackInfo() - info.title = props['title'] - info.album = props['album'] - info.artist = props['artist'] - info.duration = int(props['duration']) - info.track_number = int(props['track-number']) + info.title = props.get('title', None) + info.album = props.get('album', None) + info.artist = props.get('artist', None) + info.duration = int(props.get('duration', 0)) + info.track_number = int(props.get('track-number', 0)) return info
def _banshee_state_changed_cb(self, state): @@ -170,6 +181,21 @@ info.duration = int(props.get('length', 0)) return info
+ def _quodlibet_state_change_cb(self, state=None): + info = self.get_playing_track() + if info: + self.emit('music-track-changed', info) + else: + self.emit('music-track-changed', None) + + def _quodlibet_properties_extract(self, props): + info = MusicTrackInfo() + info.title = props.get('title', None) + info.album = props.get('album', None) + info.artist = props.get('artist', None) + info.duration = int(props.get('~#length', 0)) + return info + def get_playing_track(self): '''Return a MusicTrackInfo for the currently playing song, or None if no song is playing''' @@ -236,6 +262,23 @@ self._last_playing_music = song return song
+ ## Check Quod Libet playing track + test = False + if hasattr(bus, 'name_has_owner'): + if bus.name_has_owner('net.sacredchao.QuodLibet'): + test = True + elif dbus.dbus_bindings.bus_name_has_owner(bus.get_connection(), + 'net.sacredchao.QuodLibet'): + test = True + if test: + quodlibet = bus.get_object('net.sacredchao.QuodLibet', + '/net/sacredchao/QuodLibet') + if quodlibet.IsPlaying(): + currentTrack = quodlibet.CurrentSong() + song = self._quodlibet_properties_extract(currentTrack) + self._last_playing_music = song + return song + return None
# here we test :)
Modified: branches/osx_newbuildsys/src/notify.py =================================================================== --- branches/osx_newbuildsys/src/notify.py 2008-11-28 18:38:03 UTC (rev 10715) +++ branches/osx_newbuildsys/src/notify.py 2008-11-28 18:47:04 UTC (rev 10716) @@ -328,6 +328,9 @@ '''Notifies a user of an event. It first tries to a valid implementation of the Desktop Notification Specification. If that fails, then we fall back to the older style PopupNotificationWindow method.''' + # escape text like <3 + text = gobject.markup_escape_text(text) + title = gobject.markup_escape_text(title) if gajim.config.get('use_notif_daemon') and dbus_support.supported: try: DesktopNotification(event_type, jid, account, msg_type,
Modified: branches/osx_newbuildsys/src/roster_window.py =================================================================== --- branches/osx_newbuildsys/src/roster_window.py 2008-11-28 18:38:03 UTC (rev 10715) +++ branches/osx_newbuildsys/src/roster_window.py 2008-11-28 18:47:04 UTC (rev 10716) @@ -2716,8 +2716,8 @@ for jid in gajim.contacts.get_jid_list(acc): contact = gajim.contacts.get_first_contact_from_jid(acc, jid) if old_text in contact.groups: + self.add_contact_to_groups(jid, acc, [new_text,]) self.remove_contact_from_groups(jid, acc, [old_text,]) - self.add_contact_to_groups(jid, acc, [new_text,])
def on_canceled(): if 'rename' in gajim.interface.instances:
Modified: branches/osx_newbuildsys/src/session.py =================================================================== --- branches/osx_newbuildsys/src/session.py 2008-11-28 18:38:03 UTC (rev 10715) +++ branches/osx_newbuildsys/src/session.py 2008-11-28 18:47:04 UTC (rev 10716) @@ -145,7 +145,7 @@
pm = False if groupchat_control and groupchat_control.type_id == \ - message_control.TYPE_GC: + message_control.TYPE_GC and resource: # It's a Private message pm = True msg_type = 'pm'