gajim: prevent too long tooltips. Fixes #8465
changeset 4504e98bd824 in /home/hg/repos/gajim author: Yann Leboulanger <aste...@lagaule.org> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=4504e98bd824 description: prevent too long tooltips. Fixes #8465 diffstat: src/htmltextview.py | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diffs (12 lines): diff -r 81a6a0e863df -r 4504e98bd824 src/htmltextview.py --- a/src/htmltextview.py Mon Nov 28 21:09:40 2016 +0100 +++ b/src/htmltextview.py Mon Nov 28 21:52:40 2016 +0100 @@ -913,6 +913,8 @@ return text = getattr(tag, 'title', False) if text: +if len(text) > 50: +text = text[:47] + '...' position = w.get_origin()[1:] self.tooltip.show_tooltip(text, 8, position[1] + y) ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: fix time.time() call. Fixes #8446
changeset a970f1150535 in /home/hg/repos/gajim author: Yann Leboulanger <aste...@lagaule.org> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=a970f1150535 description: fix time.time() call. Fixes #8446 diffstat: src/common/connection.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (21 lines): diff -r 4504e98bd824 -r a970f1150535 src/common/connection.py --- a/src/common/connection.py Mon Nov 28 21:52:40 2016 +0100 +++ b/src/common/connection.py Mon Nov 28 22:23:42 2016 +0100 @@ -1632,7 +1632,7 @@ iq.addChild(name='ping', namespace=nbxmpp.NS_PING) iq.setID(id_) def _on_response(resp): -timePong = time_time() +timePong = time.time() if not nbxmpp.isResultNode(resp): gajim.nec.push_incoming_event(PingErrorEvent(None, conn=self, contact=pingTo)) @@ -1641,7 +1641,7 @@ gajim.nec.push_incoming_event(PingReplyEvent(None, conn=self, contact=pingTo, seconds=timeDiff, control=control)) if pingTo: -timePing = time_time() +timePing = time.time() self.connection.SendAndCallForResponse(iq, _on_response) else: self.connection.SendAndCallForResponse(iq, self._on_xmpp_ping_answer) ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: fix time.time() call. Fixes #8446
changeset 0a1fa037 in /home/hg/repos/gajim author: Yann Leboulanger <aste...@lagaule.org> branches: gajim_0.16 details:http://hg.gajim.org/gajim?cmd=changeset;node=0a1fa037 description: fix time.time() call. Fixes #8446 diffstat: src/common/connection.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (21 lines): diff -r fdb759b05f8b -r 0a1fa037 src/common/connection.py --- a/src/common/connection.py Mon Nov 28 21:52:40 2016 +0100 +++ b/src/common/connection.py Mon Nov 28 22:23:42 2016 +0100 @@ -1622,7 +1622,7 @@ iq.addChild(name='ping', namespace=nbxmpp.NS_PING) iq.setID(id_) def _on_response(resp): -timePong = time_time() +timePong = time.time() if not nbxmpp.isResultNode(resp): gajim.nec.push_incoming_event(PingErrorEvent(None, conn=self, contact=pingTo)) @@ -1631,7 +1631,7 @@ gajim.nec.push_incoming_event(PingReplyEvent(None, conn=self, contact=pingTo, seconds=timeDiff, control=control)) if pingTo: -timePing = time_time() +timePing = time.time() self.connection.SendAndCallForResponse(iq, _on_response) else: self.connection.SendAndCallForResponse(iq, self._on_xmpp_ping_answer) ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: prevent too long tooltips. Fixes #8465
changeset fdb759b05f8b in /home/hg/repos/gajim author: Yann Leboulanger <aste...@lagaule.org> branches: gajim_0.16 details:http://hg.gajim.org/gajim?cmd=changeset;node=fdb759b05f8b description: prevent too long tooltips. Fixes #8465 diffstat: src/htmltextview.py | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diffs (12 lines): diff -r 4b8f90033743 -r fdb759b05f8b src/htmltextview.py --- a/src/htmltextview.py Mon Nov 28 21:08:17 2016 +0100 +++ b/src/htmltextview.py Mon Nov 28 21:52:40 2016 +0100 @@ -871,6 +871,8 @@ return text = getattr(tag, 'title', False) if text: +if len(text) > 50: +text = text[:47] + '...' pointer = self.get_pointer() position = self.window.get_origin() self.tooltip.show_tooltip(text, 8, position[1] + pointer[1]) ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: [SaltyBones] Updated German translation
changeset 81a6a0e863df in /home/hg/repos/gajim author: Yann Leboulanger <aste...@lagaule.org> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=81a6a0e863df description: [SaltyBones] Updated German translation diffstat: po/de.po | 10130 ++-- 1 files changed, 5650 insertions(+), 4480 deletions(-) diffs (truncated from 15397 to 300 lines): diff -r 07eb45273e60 -r 81a6a0e863df po/de.po --- a/po/de.po Mon Nov 28 17:33:12 2016 +0100 +++ b/po/de.po Mon Nov 28 21:09:40 2016 +0100 @@ -7,59 +7,171 @@ # Sebastian Schäfer <sa...@uliweb.de>, 2007. # Nico Gulden <cilugne...@gmx.de>, 2007, 2008, 2009, 2010. # Niklas Hambüchen <n...@deditus.de>, 2009. +# Dominik George <n...@naturalnet.de>, 2014. msgid "" msgstr "" "Project-Id-Version: gajim 0.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-07-26 16:01+0200\n" -"PO-Revision-Date: 2010-08-03 22:43+0200\n" -"Last-Translator: Nico Gulden <cilugne...@gmx.de>\n" +"POT-Creation-Date: 2016-11-28 21:09+0100\n" +"PO-Revision-Date: 2016-11-27 12:58+0100\n" +"Last-Translator: Dominik George <n...@naturalnet.de>\n" "Language-Team: German <translat...@gajim.org>\n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Lokalize 0.2\n" - -#: ../data/gui/account_context_menu.ui.h:1 ../data/gui/roster_window.ui.h:7 -msgid "Join _Group Chat..." -msgstr "_Gruppenchat betreten …" +"X-Generator: Poedit 1.8.7.1\n" + +#: ../data/gui/account_context_menu.ui.h:1 +#: ../data/gui/zeroconf_context_menu.ui.h:1 +msgid "_Status" +msgstr "_Status" #: ../data/gui/account_context_menu.ui.h:2 +msgid "_Personal Events" +msgstr "_Persönliche Ereignisse" + +#: ../data/gui/account_context_menu.ui.h:3 ../data/gui/roster_window.ui.h:3 +#: ../data/gui/systray_context_menu.ui.h:2 +msgid "_Start Chat..." +msgstr "_Chat starten …" + +#: ../data/gui/account_context_menu.ui.h:4 +#: ../data/gui/chat_context_menu.ui.h:6 ../data/gui/roster_window.ui.h:5 +#: ../data/gui/systray_context_menu.ui.h:3 +msgid "Join _Group Chat" +msgstr "_Chatraum betreten …" + +#: ../data/gui/account_context_menu.ui.h:5 msgid "_Add Contact..." msgstr "Kont_akt hinzufügen …" -#: ../data/gui/account_context_menu.ui.h:3 ../data/gui/roster_window.ui.h:19 +#: ../data/gui/account_context_menu.ui.h:6 ../data/gui/roster_window.ui.h:7 msgid "_Discover Services" msgstr "_Dienste durchsuchen" -#: ../data/gui/account_context_menu.ui.h:4 +#: ../data/gui/account_context_menu.ui.h:7 msgid "_Execute Command..." msgstr "B_efehl ausführen …" -#: ../data/gui/account_context_menu.ui.h:5 -msgid "_Modify Account" -msgstr "Konto _bearbeiten" - -#: ../data/gui/account_context_menu.ui.h:6 +#: ../data/gui/account_context_menu.ui.h:8 msgid "_Open Gmail Inbox" msgstr "Google-Mail-Posteingang _öffnen" -#: ../data/gui/account_context_menu.ui.h:7 -msgid "_Personal Events" -msgstr "_Persönliche Ereignisse" - -#: ../data/gui/account_context_menu.ui.h:8 ../data/gui/roster_window.ui.h:24 -msgid "_Start Chat..." -msgstr "_Chat starten …" - #: ../data/gui/account_context_menu.ui.h:9 #: ../data/gui/zeroconf_context_menu.ui.h:2 -msgid "_Status" -msgstr "_Status" +msgid "_Modify Account..." +msgstr "_Konto bearbeiten …" #: ../data/gui/account_creation_wizard_window.ui.h:1 +#: ../data/gui/accounts_window.ui.h:1 ../data/gui/change_mood_dialog.ui.h:3 +#: ../src/config.py:1247 ../src/config.py:1262 ../src/config.py:1267 +#: ../src/config.py:1315 ../src/config.py:1425 ../src/config.py:1755 +#: ../src/config.py:1760 ../src/config.py:2369 ../src/config.py:2451 +#: ../src/config.py:2466 ../src/config.py:3758 ../src/config.py:3835 +#: ../src/dialogs.py:328 ../src/dialogs.py:330 ../src/dialogs.py:538 +#: ../src/dialogs.py:551 ../src/roster_window.py:3087 +#: ../src/roster_window.py:3093 ../src/roster_window.py:3098 +msgid "None" +msgstr "Kein Proxy" + +#: ../data/gui/account_creation_wizard_window.ui.h:2 +msgid "Gajim: Account Creation Wizard" +msgstr "Assistent zum Einrichten eines neuen Kontos" + +#: ../data/gui/account_creation_wizard_window.ui.h:3 +msgid "" +"You need to have an account in order to connect\n" +"to the Jabber network." +msgstr "" +"Sie müssen ein Konto erstellen, bevor Sie sich zum Jabber-Netzwerk \n" +"verbinden können.&qu
gajim: [SaltyBones] Updated German translation
changeset 4b8f90033743 in /home/hg/repos/gajim author: Yann Leboulanger <aste...@lagaule.org> branches: gajim_0.16 details:http://hg.gajim.org/gajim?cmd=changeset;node=4b8f90033743 description: [SaltyBones] Updated German translation diffstat: po/de.po | 3651 - 1 files changed, 1919 insertions(+), 1732 deletions(-) diffs (truncated from 8273 to 300 lines): diff -r a7ce6e82a6e6 -r 4b8f90033743 po/de.po --- a/po/de.po Thu Nov 24 22:44:52 2016 +0100 +++ b/po/de.po Mon Nov 28 21:08:17 2016 +0100 @@ -12,8 +12,8 @@ msgstr "" "Project-Id-Version: gajim 0.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-12-28 13:07+0100\n" -"PO-Revision-Date: 2010-08-03 22:43+0200\n" +"POT-Creation-Date: 2016-11-28 21:07+0100\n" +"PO-Revision-Date: 2016-11-27 12:58+0100\n" "Last-Translator: Dominik George <n...@naturalnet.de>\n" "Language-Team: German <translat...@gajim.org>\n" "Language: de\n" @@ -21,7 +21,7 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Lokalize 0.2\n" +"X-Generator: Poedit 1.8.7.1\n" #: ../data/gui/account_context_menu.ui.h:1 #: ../data/gui/zeroconf_context_menu.ui.h:1 @@ -186,10 +186,10 @@ #: ../src/config.py:1251 ../src/config.py:1266 ../src/config.py:1271 #: ../src/config.py:1319 ../src/config.py:1422 ../src/config.py:1743 #: ../src/config.py:1748 ../src/config.py:2359 ../src/config.py:2441 -#: ../src/config.py:2456 ../src/config.py:3752 ../src/config.py:3827 +#: ../src/config.py:2456 ../src/config.py:3753 ../src/config.py:3828 #: ../src/dialogs.py:316 ../src/dialogs.py:318 ../src/dialogs.py:524 -#: ../src/dialogs.py:537 ../src/roster_window.py:3194 -#: ../src/roster_window.py:3200 ../src/roster_window.py:3205 +#: ../src/dialogs.py:537 ../src/roster_window.py:3212 +#: ../src/roster_window.py:3218 ../src/roster_window.py:3223 msgid "None" msgstr "Kein Proxy" @@ -213,7 +213,7 @@ msgid "Re_name" msgstr "_Umbenennen" -#: ../data/gui/accounts_window.ui.h:6 ../src/config.py:4200 +#: ../data/gui/accounts_window.ui.h:6 ../src/config.py:4201 #: ../src/plugins/gui.py:92 msgid "Active" msgstr "Aktiv" @@ -238,14 +238,13 @@ #. No configured account #: ../data/gui/accounts_window.ui.h:9 ../data/gui/roster_window.ui.h:1 -#: ../data/gajim.desktop.in.in.h:1 ../src/common/helpers.py:1178 -#: ../src/common/helpers.py:1190 ../src/notify.py:316 ../src/notify.py:339 -#: ../src/notify.py:389 ../src/notify.py:405 +#: ../data/gajim.desktop.in.in.h:1 ../src/common/helpers.py:1197 +#: ../src/common/helpers.py:1209 ../src/notify.py:315 ../src/notify.py:338 +#: ../src/notify.py:388 ../src/notify.py:404 msgid "Gajim" msgstr "Gajim" #: ../data/gui/accounts_window.ui.h:10 -#, fuzzy msgid "Synchronize contacts" msgstr "Kontakte synchronisieren" @@ -302,9 +301,8 @@ msgstr "_Durchsuche" #: ../data/gui/accounts_window.ui.h:26 -#, fuzzy msgid "Certificate is e_ncrypted" -msgstr "Zertifikat abgelehnt" +msgstr "Zertifikat ist _verschlüsselt" #: ../data/gui/accounts_window.ui.h:27 msgid "Client certificate" @@ -336,9 +334,8 @@ msgstr "Unterhaltungsver_lauf für alle Kontakte dieses Kontos speichern" #: ../data/gui/accounts_window.ui.h:33 -#, fuzzy msgid "Synchronize logs with server" -msgstr "Kontakte synchronisieren" +msgstr "Verlauf mit Server synchronisieren" #: ../data/gui/accounts_window.ui.h:34 msgid "Synch_ronize account status with global status" @@ -369,9 +366,9 @@ "If checked, Gajim will also broadcast some more IPs except from just your " "IP, so file transfer has higher chances of working." msgstr "" -"Falls aktiviert, sendet Gajim von mehreren anstatt von nur Ihrer eigenen " -"IP-Adresse, wodurch die Wahrscheinlichkeit einer erfolgreichen " -"Dateiübertragung erhöht wird." +"Falls aktiviert, sendet Gajim von mehreren anstatt von nur Ihrer eigenen IP-" +"Adresse, wodurch die Wahrscheinlichkeit einer erfolgreichen Dateiübertragung " +"erhöht wird." #. nick choosen by contact #. FIXME: Ugly workaround. @@ -380,8 +377,8 @@ #. General group cannot be changed #: ../data/gui/accounts_window.ui.h:39 ../data/gui/preferences_window.ui.h:41 #: ../src/common/contacts.py:102 ../src/common/contacts.py:135 -#: ../src/dialogs.py:116 ../src/dialogs.py:128 ../src/roster_window.py:3136 -#: ../src/roster_window.py:4266 ../src/roster_window.py:5914 +#: ../src/dialogs.py:116 ../src/dialogs.py:128 ../src/roster_window.py:3154 +#: ../src/roster_window.py:4289 ../s
gajim: Fixed c error
changeset 07eb45273e60 in /home/hg/repos/gajim author: SaltyBones branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=07eb45273e60 description: Fixed c error diffstat: data/gui/chat_control.ui | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 27dc479797a7 -r 07eb45273e60 data/gui/chat_control.ui --- a/data/gui/chat_control.ui Thu Nov 24 22:44:52 2016 +0100 +++ b/data/gui/chat_control.ui Mon Nov 28 17:33:12 2016 +0100 @@ -102,7 +102,7 @@ True False -b4/b def +b4/b ghi True ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: fix sending zeroconf messages
changeset 27dc479797a7 in /home/hg/repos/gajim author: Yann Leboulanger <aste...@lagaule.org> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=27dc479797a7 description: fix sending zeroconf messages diffstat: src/common/connection_handlers.py | 7 +-- src/common/zeroconf/connection_zeroconf.py | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diffs (37 lines): diff -r b8382e8e3a57 -r 27dc479797a7 src/common/connection_handlers.py --- a/src/common/connection_handlers.py Thu Nov 24 22:42:33 2016 +0100 +++ b/src/common/connection_handlers.py Thu Nov 24 22:44:52 2016 +0100 @@ -882,6 +882,11 @@ # keep track of sessions this connection has with other JIDs self.sessions = {} +# IDs of sent messages (https://trac.gajim.org/ticket/8222) +self.sent_message_ids = [] + +self.received_message_hashes = [] + # We decrypt GPG messages one after the other. Keep queue in mem self.gpg_messages_to_decrypt = [] @@ -1442,8 +1447,6 @@ # ID of urn:xmpp:ping requests self.awaiting_xmpp_ping_id = None self.continue_connect_info = None -# IDs of sent messages (https://trac.gajim.org/ticket/8222) -self.sent_message_ids = [] try: self.sleeper = common.sleepy.Sleepy() diff -r b8382e8e3a57 -r 27dc479797a7 src/common/zeroconf/connection_zeroconf.py --- a/src/common/zeroconf/connection_zeroconf.pyThu Nov 24 22:42:33 2016 +0100 +++ b/src/common/zeroconf/connection_zeroconf.pyThu Nov 24 22:44:52 2016 +0100 @@ -343,7 +343,8 @@ def on_send_ok(msg_id): gajim.nec.push_incoming_event(MessageSentEvent(None, conn=self, jid=obj.jid, message=obj.message, keyID=obj.keyID, -chatstate=None)) +automatic_message=obj.automatic_message, chatstate=None, +msg_id=msg_id)) if obj.callback: obj.callback(msg_iq, *obj.callback_args) ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: don't crash when we get a wrong feature negotiation form
changeset b8382e8e3a57 in /home/hg/repos/gajim author: Yann Leboulanger <aste...@lagaule.org> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=b8382e8e3a57 description: don't crash when we get a wrong feature negotiation form diffstat: src/common/connection_handlers_events.py | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diffs (13 lines): diff -r 7dad93b4f1c9 -r b8382e8e3a57 src/common/connection_handlers_events.py --- a/src/common/connection_handlers_events.py Mon Nov 21 21:46:59 2016 + +++ b/src/common/connection_handlers_events.py Thu Nov 24 22:42:33 2016 +0100 @@ -1276,6 +1276,9 @@ if not form: return +if not form.getField('FORM_TYPE'): +return + if form['FORM_TYPE'] == 'urn:xmpp:ssn': self.session.handle_negotiation(form) else: ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Remove support for GNOME Keyring and KWalletCLI, instead ...
changeset f6197b419a24 in /home/hg/repos/gajim author: Emmanuel Gil Peyrot <linkma...@linkmauve.fr> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=f6197b419a24 description: Remove support for GNOME Keyring and KWalletCLI, instead always use libsecret. diffstat: README.html |3 +- src/common/config.py |2 - src/common/exceptions.py | 12 -- src/common/kwalletbinding.py | 80 src/common/passwords.py | 208 ++ src/features_window.py | 11 +- src/gui_interface.py |5 - 7 files changed, 19 insertions(+), 302 deletions(-) diffs (truncated from 432 to 300 lines): diff -r b0962a4c0866 -r f6197b419a24 README.html --- a/README.html Sat Nov 19 17:31:23 2016 +0100 +++ b/README.html Sun Nov 20 21:56:26 2016 + @@ -28,8 +28,7 @@ For zeroconf (bonjour), the "enable link-local messaging" checkbox, you need dbus-glib, python-avahi dnsutils (or whatever package provides the nslookup binary) for SRV support gir1.2-gtkspell3-3.0 and aspell-LANG where lang is your locale eg. en, fr etc -gir1.2-secret-1 or gir1.2-gnomekeyring-1.0 for GnomeKeyring support as password storage -kwalletcli (for support of KDE Wallet as password storage) +gir1.2-secret-1 for GNOMEÂ Keyring or KDE support as password storage gir1.2-notify-0.7 to get cooler popups D-Bus running to have gajim-remote working. Some distributions split dbus-x11, which is needed for dbus to work with Gajim. Version >= 0.80 is required. python3-dbus bindings (>=1.2.0) diff -r b0962a4c0866 -r f6197b419a24 src/common/config.py --- a/src/common/config.py Sat Nov 19 17:31:23 2016 +0100 +++ b/src/common/config.py Sun Nov 20 21:56:26 2016 + @@ -288,8 +288,6 @@ 'confirm_block': [ opt_str, '', _('Should we show the confirm block contact dialog or not? Empty string means we never show the dialog.')], 'confirm_custom_status': [ opt_str, '', _('Should we show the confirm custom status dialog or not? Empty string means we never show the dialog.')], 'enable_negative_priority': [ opt_bool, False, _('If True, you will be able to set a negative priority to your account in account modification window. BE CAREFUL, when you are logged in with a negative priority, you will NOT receive any message from your server.')], -'use_gnomekeyring': [opt_bool, True, _('If True, Gajim will use Gnome Keyring (if available) to store account passwords.')], -'use_kwalletcli': [opt_bool, True, _('If True, Gajim will use KDE Wallet (if kwalletcli is available) to store account passwords.')], 'show_contacts_number': [opt_bool, True, _('If True, Gajim will show number of online and total contacts in account and group rows.')], 'treat_incoming_messages': [ opt_str, '', _('Can be empty, \'chat\' or \'normal\'. If not empty, treat all incoming messages as if they were of this type')], 'scroll_roster_to_last_message': [opt_bool, True, _('If True, Gajim will scroll and select the contact who sent you the last message, if chat window is not already opened.')], diff -r b0962a4c0866 -r f6197b419a24 src/common/exceptions.py --- a/src/common/exceptions.py Sat Nov 19 17:31:23 2016 +0100 +++ b/src/common/exceptions.py Sun Nov 20 21:56:26 2016 + @@ -143,15 +143,3 @@ def __str__(self): return self.text - -class GnomeKeyringError(Exception): -""" -Error with Gnome Keyring -""" - -def __init__(self, error): -Exception.__init__(self) -self.error = error - -def __str__(self): -return str(self.error) diff -r b0962a4c0866 -r f6197b419a24 src/common/kwalletbinding.py --- a/src/common/kwalletbinding.py Sat Nov 19 17:31:23 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 + @@ -1,80 +0,0 @@ -# -*- coding:utf-8 -*- -## src/common/kwalletbinding.py -## -## Copyright (c) 2009 Thorsten Glaser -## -## This file is part of Gajim. -## -## Gajim is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published -## by the Free Software Foundation; version 3 only. This file is -## also available under the terms of The MirOS Licence. -## -## Gajim is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Gajim. If not, see <http://www.gnu.org/licenses/>. -## - -__all__ = ['kwallet_available', 'kwallet_get', 'kwallet_put'] - -import subprocess - - -def kwallet_available(): -""" -Return True if kwalletcli can be run, False otherwise -""" -try: -
gajim: Fixed typo and updated German translation
changeset 2faa34b18a19 in /home/hg/repos/gajim author: SaltyBones branches: gajim_0.16 details:http://hg.gajim.org/gajim?cmd=changeset;node=2faa34b18a19 description: Fixed typo and updated German translation diffstat: po/de.po | 507 ++-- src/dialogs.py |4 +- 2 files changed, 309 insertions(+), 202 deletions(-) diffs (truncated from 1504 to 300 lines): diff -r f1752fd85edf -r 2faa34b18a19 po/de.po --- a/po/de.po Sat Nov 05 23:51:31 2016 +0100 +++ b/po/de.po Sun Nov 20 14:05:21 2016 +0100 @@ -357,6 +357,8 @@ #: ../data/gui/accounts_window.ui.h:36 msgid "Receive conversations from other resources (If server supports it)" msgstr "" +"Unterhaltungen von anderen Ressourcen empfangen (Erfordert " +"Serverunterstützung)" #: ../data/gui/accounts_window.ui.h:37 msgid "Use file transfer proxies" @@ -367,9 +369,9 @@ "If checked, Gajim will also broadcast some more IPs except from just your " "IP, so file transfer has higher chances of working." msgstr "" -"Falls aktiviert, sendet Gajim von mehreren anstatt von nur Ihrer eigenen IP-" -"Adresse, wodurch die Wahrscheinlichkeit einer erfolgreichen Dateiübertragung " -"erhöht wird." +"Falls aktiviert, sendet Gajim von mehreren anstatt von nur Ihrer eigenen " +"IP-Adresse, wodurch die Wahrscheinlichkeit einer erfolgreichen " +"Dateiübertragung erhöht wird." #. nick choosen by contact #. FIXME: Ugly workaround. @@ -761,7 +763,7 @@ #: ../data/gui/atom_entry_window.ui.h:6 msgid "Next entry" -msgstr "" +msgstr "Nächster Eintrag" #: ../data/gui/blocked_contacts_window.ui.h:1 msgid "Blocked Contacts" @@ -1438,13 +1440,14 @@ msgid "Search:" msgstr "Suchen:" +#TODO test #: ../data/gui/history_window.ui.h:6 msgid "_In date search" -msgstr "" +msgstr "_Datumssuche" #: ../data/gui/history_window.ui.h:7 msgid "Searching only in the selected day " -msgstr "" +msgstr "Nur in gewähltem Tag suchen" #: ../data/gui/history_window.ui.h:8 #: ../data/gui/zeroconf_information_window.ui.h:5 @@ -1710,11 +1713,15 @@ msgid "Installed" msgstr "Installiert" +# TODO mark as donottranslate? +# TODO unify speliing of plug-in, plugin #: ../data/gui/plugins_window.ui.h:13 msgid "" "Plug-in decription should be displayed here. This text will be erased during " "PluginsWindow initialization." msgstr "" +"Plugin Beschreibung. Dieser Text wird bei der Initialisierung des " +"Pluginfensters gelöscht." #: ../data/gui/popup_notification_window.ui.h:1 msgid "Event Type" @@ -1937,8 +1944,8 @@ #: ../data/gui/preferences_window.ui.h:46 msgid "Allow popup/notifications when I'm _away/na/busy/invisible" msgstr "" -"Popups/Benachrichtigungen zulassen, wenn ich _abwesend/nicht verfügbar/" -"beschäftigt/unsichtbar bin" +"Popups/Benachrichtigungen zulassen, wenn ich _abwesend/nicht " +"verfügbar/beschäftigt/unsichtbar bin" #: ../data/gui/preferences_window.ui.h:47 msgid "Notify on new _GMail email" @@ -1962,8 +1969,8 @@ "If checked, Gajim will also include information about the sender of new " "emails" msgstr "" -"Falls aktiviert, fügt Gajim auch Informationen über den Absender neuer E-" -"Mails hinzu." +"Falls aktiviert, fügt Gajim auch Informationen über den Absender neuer " +"E-Mails hinzu." #: ../data/gui/preferences_window.ui.h:51 msgid "GMail Options" @@ -2069,9 +2076,9 @@ msgstr "" "Dieser Text wird als Statusnachricht zum Status Abwesend gesetzt, wenn der " "Computer für die angegebene Zeit nicht benutzt wurde. Wenn leer, wird die " -"aktuelle Statusnachricht belassen. $S kann für die vorherige Statusnachricht " -"eingesetzt werden. $T kann für die Zeit eingesetzt werden, seit der der " -"Status auf Abwesend gestellt ist." +"aktuelle Statusnachricht belassen. $S kann für die vorherige " +"Statusnachricht eingesetzt werden. $T kann für die Zeit eingesetzt werden, " +"seit der der Status auf Abwesend gestellt ist." #: ../data/gui/preferences_window.ui.h:73 msgid "" @@ -2146,8 +2153,8 @@ "etc...)" msgstr "" "Falls aktiviert, werden protokollspezifische Symbole verwendet. (Zum " -"Beispiel wird für einen MSN-Kontakt das jeweilige MSN-Symbol für den Status " -"\"Anwesend\", \"Abwesend\", \"Beschäftigt\", etc. angezeigt.)" +"Beispiel wird für einen MSN-Kontakt das jeweilige
gajim: Refactor Roster Tooltip
changeset 3dc0c2fae58b in /home/hg/repos/gajim author: lovetox <forenjun...@chelo.at> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=3dc0c2fae58b description: Refactor Roster Tooltip diffstat: data/gui/roster_window.ui |3 - data/gui/tooltip_roster_contact.ui | 370 + src/gui_interface.py | 15 +- src/roster_window.py | 194 +++- src/tooltips.py| 528 ++-- 5 files changed, 760 insertions(+), 350 deletions(-) diffs (truncated from 1320 to 300 lines): diff -r 2f47c7e8a9c0 -r 3dc0c2fae58b data/gui/roster_window.ui --- a/data/gui/roster_window.ui Fri Nov 18 03:41:37 2016 +0100 +++ b/data/gui/roster_window.ui Thu Nov 17 03:29:18 2016 +0100 @@ -366,12 +366,9 @@ - - - diff -r 2f47c7e8a9c0 -r 3dc0c2fae58b data/gui/tooltip_roster_contact.ui --- /dev/null Thu Jan 01 00:00:00 1970 + +++ b/data/gui/tooltip_roster_contact.uiThu Nov 17 03:29:18 2016 +0100 @@ -0,0 +1,370 @@ + + + + + +True +False +start +5 + + +True +False +start +start +True +0 + + +0 +0 +2 + + + + +True +False +start +start +Jabber ID: +0 +0 + + +0 +4 + + + + +True +False +0 +gtk-missing-image + + +2 +0 +14 + + + + +True +False +start +Resource: +0 +0 + + +0 +5 + + + + +True +False +start +start +0 +0 + + +0 +1 +2 + + + + +True +False +True +0 +0 + + +1 +5 + + + + +True +False +True +0 +0 + + + + + +1 +4 + + + + +True +False +start +start +Status: +True +40 +0 +0 + + +0 +2 + + + + +True +False +start +Idle since: +0 +0 + + +0 +12 + + + + +True +False +start +Idle for: +0 +0 + + +0 +13 + + + + +True +False +True +0 +0 + + +1 +12 + + + + +True +False +True +0 +0 + + +1 +13 + + + + +True +False +start +Mood: +0 +0 + + +0 +6 + + + + +True +False +start +Activity: +2 +0 +0 + + +0 +7 + + + + +True +False +start +Tune: +0 +0 + + +0 +8 + + + + +True +False +start +Location: +0 +0 + + +0 +9 + + + + +True +False +True +0 +0 + + +1 +6 + + + + +True +False +True +0 +0 + + +1 +7 + + + + +True +False +True +0 +0 + + +1 +8 + + + + +True ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Better align jid and resource in gc contact tooltip
changeset b0962a4c0866 in /home/hg/repos/gajim author: lovetox <forenjun...@chelo.at> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=b0962a4c0866 description: Better align jid and resource in gc contact tooltip diffstat: data/gui/tooltip_gc_contact.ui | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diffs (19 lines): diff -r 1348492cf5d5 -r b0962a4c0866 data/gui/tooltip_gc_contact.ui --- a/data/gui/tooltip_gc_contact.uiSat Nov 19 17:25:48 2016 +0100 +++ b/data/gui/tooltip_gc_contact.uiSat Nov 19 17:31:23 2016 +0100 @@ -120,6 +120,7 @@ True False +True 0 @@ -131,6 +132,7 @@ True False +True 0 ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Dont use super() fpr Gtk.Window init, fixes deprecated msg
changeset 1348492cf5d5 in /home/hg/repos/gajim author: lovetox <forenjun...@chelo.at> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=1348492cf5d5 description: Dont use super() fpr Gtk.Window init, fixes deprecated msg diffstat: src/tooltips.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 3dc0c2fae58b -r 1348492cf5d5 src/tooltips.py --- a/src/tooltips.py Thu Nov 17 03:29:18 2016 +0100 +++ b/src/tooltips.py Sat Nov 19 17:25:48 2016 +0100 @@ -314,7 +314,7 @@ class GCTooltip(Gtk.Window): # pylint: disable=E1101 def __init__(self, parent): -super().__init__(self, type=Gtk.WindowType.POPUP, transient_for=parent) +Gtk.Window.__init__(self, type=Gtk.WindowType.POPUP, transient_for=parent) self.row = None self.set_title('tooltip') self.set_border_width(3) ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Create GCTooltip window only when parent is available
changeset 2f47c7e8a9c0 in /home/hg/repos/gajim author: lovetox <forenjun...@chelo.at> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=2f47c7e8a9c0 description: Create GCTooltip window only when parent is available diffstat: src/groupchat_control.py | 22 -- src/roster_window.py | 1 + 2 files changed, 17 insertions(+), 6 deletions(-) diffs (51 lines): diff -r dcdd99cdc1e7 -r 2f47c7e8a9c0 src/groupchat_control.py --- a/src/groupchat_control.py Sun Nov 13 02:32:38 2016 + +++ b/src/groupchat_control.py Fri Nov 18 03:41:37 2016 +0100 @@ -359,13 +359,14 @@ if gtkgui_helpers.gtk_icon_theme.has_icon('document-open-recent'): img = self.xml.get_object('history_image') img.set_from_icon_name('document-open-recent', Gtk.IconSize.MENU) + +self.current_tooltip = None +if parent_win: +# On AutoJoin with minimize Groupchats are created without parent +# Tooltip Window has to be created with parent +self.set_tooltip() + widget = self.xml.get_object('list_treeview') -widget.set_has_tooltip(True) -widget.set_tooltip_window(tooltips.GCTooltip(self.parent_win.window)) -self.current_tooltip = None -id_ = widget.connect('query-tooltip', self.query_tooltip) -self.handlers[id_] = widget - id_ = widget.connect('row_expanded', self.on_list_treeview_row_expanded) self.handlers[id_] = widget @@ -526,6 +527,15 @@ # instance object gajim.plugin_manager.gui_extension_point('groupchat_control', self) +def set_tooltip(self): +widget = self.xml.get_object('list_treeview') +if widget.get_tooltip_window(): +return +widget.set_has_tooltip(True) +widget.set_tooltip_window(tooltips.GCTooltip(self.parent_win.window)) +id_ = widget.connect('query-tooltip', self.query_tooltip) +self.handlers[id_] = widget + def query_tooltip(self, widget, x_pos, y_pos, keyboard_mode, tooltip): try: row = self.list_treeview.get_path_at_pos(x_pos, y_pos)[0] diff -r dcdd99cdc1e7 -r 2f47c7e8a9c0 src/roster_window.py --- a/src/roster_window.py Sun Nov 13 02:32:38 2016 + +++ b/src/roster_window.py Fri Nov 18 03:41:37 2016 +0100 @@ -3419,6 +3419,7 @@ mw = gajim.interface.msg_win_mgr.create_window(ctrl.contact, ctrl.account, ctrl.type_id) ctrl.parent_win = mw +ctrl.set_tooltip() mw.new_tab(ctrl) mw.set_active_tab(ctrl) mw.window.get_window().focus(Gtk.get_current_event_time()) ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Remove the SRV feature, since the switch to Gio it?s alwa...
changeset dcdd99cdc1e7 in /home/hg/repos/gajim author: Emmanuel Gil Peyrot <linkma...@linkmauve.fr> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=dcdd99cdc1e7 description: Remove the SRV feature, since the switch to Gio it?s always enabled. diffstat: src/features_window.py | 9 - 1 files changed, 0 insertions(+), 9 deletions(-) diffs (26 lines): diff -r c44805f8d96b -r dcdd99cdc1e7 src/features_window.py --- a/src/features_window.pySun Nov 13 21:06:37 2016 +0100 +++ b/src/features_window.pySun Nov 13 02:32:38 2016 + @@ -72,10 +72,6 @@ _('Passwords can be stored securely and not just in plaintext.'), _('Requires gnome-keyring and python-gnome2-desktop, or kwalletcli.'), _('Feature not available under Windows.')), -_('SRV'): (self.srv_available, -_('Ability to connect to servers which are using SRV records.'), -_('Requires dnsutils.'), -_('Requires nslookup to use SRV records.')), _('Spell Checker'): (self.speller_available, _('Spellchecking of composed messages.'), _('Requires libgtkspell.'), @@ -199,11 +195,6 @@ return False return True -def srv_available(self): -if os.name == 'nt': -return True -return helpers.is_in_path('nslookup') - def speller_available(self): try: __import__('gtkspell') ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Replace ServiceDiscoveryTooltip with gtk_tree_view.set_to...
changeset bf2bfc1be419 in /home/hg/repos/gajim author: Emmanuel Gil Peyrot <linkma...@linkmauve.fr> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=bf2bfc1be419 description: Replace ServiceDiscoveryTooltip with gtk_tree_view.set_tooltip_column(). diffstat: src/disco.py| 127 ++- src/tooltips.py | 21 - 2 files changed, 33 insertions(+), 115 deletions(-) diffs (295 lines): diff -r 97bd4027f912 -r bf2bfc1be419 src/disco.py --- a/src/disco.py Sun Nov 13 12:51:29 2016 +0100 +++ b/src/disco.py Sat Nov 12 23:54:33 2016 + @@ -54,7 +54,6 @@ from gi.repository import Pango import dialogs -import tooltips import gtkgui_helpers import groups import adhoc_commands @@ -66,6 +65,12 @@ from common import helpers from common import ged +LABELS = { +1: _('This service has not yet responded with detailed information'), +2: _('This service could not respond with detailed information.\n' + 'It is most likely legacy or broken'), +} + # Dictionary mapping category, type pairs to browser class, image pairs. # This is a function, so we can call it after the classes are declared. # For the browser class, None means that the service will only be browsable @@ -119,13 +124,13 @@ ('gateway', 'twitter'): (False, 'twitter'), } -# Category type to "human-readable" description string, and sort priority +# Category type to "human-readable" description string _cat_to_descr = { -'other':(_('Others'), 2), -'gateway': (_('Transports'), 0), -'_jid': (_('Transports'), 0), +'other':_('Others'), +'gateway': _('Transports'), +'_jid': _('Transports'), #conference is a category for listing mostly groupchats in service discovery -'conference': (_('Conference'), 1), +'conference': _('Conference'), } @@ -1217,7 +1222,6 @@ self._progressbar_sourceid = None self._renderer = None self._progress = 0 -self.tooltip = tooltips.ServiceDiscoveryTooltip() self.register_button = None self.join_button = None self.execute_button = None @@ -1238,7 +1242,7 @@ identities.append(identity) # Set the pixmap for the row pix = self.cache.get_icon(identities, addr=addr) -self.model.append(None, (self.jid, self.node, pix, descr, 1)) +self.model.append(None, (self.jid, self.node, pix, descr, LABELS[1])) # Grab info on the service self.cache.get_info(self.jid, self.node, self._agent_info, force=False) @@ -1264,8 +1268,8 @@ cell.set_property('markup', markup) if jid: cell.set_property('cell_background_set', False) -if state > 0: -# 1 = fetching, 2 = error +if state is not None: +# fetching or error cell.set_property('foreground_set', True) else: # Normal/succes @@ -1284,9 +1288,9 @@ # Compare state state1 = model.get_value(iter1, 4) state2 = model.get_value(iter2, 4) -if state1 > state2: +if state1 is not None: return 1 -if state1 < state2: +if state2 is not None: return -1 descr1 = model.get_value(iter1, 3) descr2 = model.get_value(iter2, 3) @@ -1297,64 +1301,12 @@ return -1 return 0 -def _show_tooltip(self, state): -self.tooltip.timeout = 0 -view = self.window.services_treeview -w = view.get_window() -device = w.get_display().get_device_manager().get_client_pointer() -pointer = w.get_device_position(device) -props = view.get_path_at_pos(pointer[1], pointer[2]) -# check if the current pointer is at the same path -# as it was before setting the timeout -if props and self.tooltip.id == props[0]: -# bounding rectangle of coordinates for the cell within the treeview -rect = view.get_cell_area(props[0], props[1]) -# position of the treeview on the screen -position = w.get_origin()[1:] -self.tooltip.show_tooltip(state, rect.height, position[1] + rect.y) -else: -self.tooltip.hide_tooltip() - -# These are all callbacks to make tooltips work -def on_treeview_leave_notify_event(self, widget, event): -props = widget.get_path_at_pos(int(event.x), int(event.y)) -if self.tooltip.timeout > 0 or self.tooltip.shown: -if not props or self.tooltip.id == props[0]: -self.tooltip.hide_tooltip() - -def on_treeview_motion_notify_event(self, widget, event): -props = widget.get_path_at_pos(int(event.x), int(even
gajim: Dont use translated strings for MAM Preference command
changeset 97bd4027f912 in /home/hg/repos/gajim author: lovetox <forenjun...@chelo.at> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=97bd4027f912 description: Dont use translated strings for MAM Preference command diffstat: src/dialogs.py | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diffs (27 lines): diff -r 6068cd819e0b -r 97bd4027f912 src/dialogs.py --- a/src/dialogs.pySat Nov 05 14:49:38 2016 + +++ b/src/dialogs.pySun Nov 13 12:51:29 2016 +0100 @@ -4114,6 +4114,7 @@ class Archiving313PreferencesWindow: default_dict = {'always': 0, 'roster': 1, 'never': 2} +default_dict_cb = {0: 'always', 1: 'roster', 2: 'never'} def __init__(self, account): self.account = account @@ -4208,13 +4209,12 @@ def on_save_button_clicked(self, widget): self.set_widget_state(False) items = [] -iter_ = self.default_cb.get_active_iter() -default = self.default_cb.get_model().get_value(iter_, 0) +default = self.default_dict_cb[self.default_cb.get_active()] for item in self.archive_items_liststore: items.append((item[0].lower(), item[1].lower())) self.idle_id = GLib.timeout_add_seconds(3, self._nec_archiving_error) gajim.connections[self.account]. \ -set_archive_preferences(items, default.lower()) +set_archive_preferences(items, default) def on_close_button_clicked(self, widget): self.window.destroy() ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim-plugins: Catch import error
changeset 08fdd45011d4 in /home/hg/repos/gajim-plugins author: lovetox <forenjun...@chello.at> branches: details:gajim-plugins?cmd=changeset;node=08fdd45011d4 description: Catch import error diffstat: omemo/__init__.py | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diffs (37 lines): diff -r 8457659b652f -r 08fdd45011d4 omemo/__init__.py --- a/omemo/__init__.py Sun Oct 23 19:14:30 2016 +0200 +++ b/omemo/__init__.py Wed Oct 26 22:36:06 2016 +0200 @@ -31,8 +31,6 @@ from nbxmpp.simplexml import Node from nbxmpp import NS_CORRECT, NS_ADDRESS -from . import ui -from .ui import Ui from .xmpp import ( NS_NOTIFY, NS_OMEMO, NS_EME, BundleInformationAnnouncement, BundleInformationQuery, DeviceListAnnouncement, DevicelistQuery, @@ -75,6 +73,7 @@ if not ERROR_MSG: try: from .omemo.state import OmemoState +from .ui import Ui, OMEMOConfigDialog except Exception as e: log.error(e) ERROR_MSG = 'Error: ' + str(e) @@ -118,6 +117,7 @@ if ERROR_MSG: self.activatable = False self.available_text = ERROR_MSG +self.config_dialog = None return self.events_handlers = { 'mam-message-received': (ged.PRECORE, self.mam_message_received), @@ -139,7 +139,7 @@ self.events_handlers['muc-admin-received'] =\ (ged.PRECORE, self.room_memberlist_received) -self.config_dialog = ui.OMEMOConfigDialog(self) +self.config_dialog = OMEMOConfigDialog(self) self.gui_extension_points = {'chat_control': (self.connect_ui, self.disconnect_ui), 'groupchat_control': (self.connect_ui, ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim-plugins: Update manifest.ini and CHANGELOG
changeset 08658cc12dc5 in /home/hg/repos/gajim-plugins author: lovetox <forenjun...@chello.at> branches: details:gajim-plugins?cmd=changeset;node=08658cc12dc5 description: Update manifest.ini and CHANGELOG diffstat: omemo/CHANGELOG| 3 +++ omemo/manifest.ini | 2 +- 2 files changed, 4 insertions(+), 1 deletions(-) diffs (22 lines): diff -r fba936c92042 -r 08658cc12dc5 omemo/CHANGELOG --- a/omemo/CHANGELOG Tue Nov 01 23:00:35 2016 +0100 +++ b/omemo/CHANGELOG Tue Nov 01 23:05:44 2016 +0100 @@ -1,3 +1,6 @@ +0.9.6 / 2016-11-01 +- Bugfixes + 0.9.5 / 2016-10-10 - Add GroupChat BETA - Add Option to delete Fingerprints diff -r fba936c92042 -r 08658cc12dc5 omemo/manifest.ini --- a/omemo/manifest.iniTue Nov 01 23:00:35 2016 +0100 +++ b/omemo/manifest.iniTue Nov 01 23:05:44 2016 +0100 @@ -1,7 +1,7 @@ [info] name: OMEMO short_name: omemo -version: 0.9.5 +version: 0.9.6 description: OMEMO is an XMPP Extension Protocol (XEP) for secure multi-client end-to-end encryption based on Axolotl and PEP. You need to install some dependencys, you can find install instructions for your system in the Github Wiki. authors: Bahtiar `kalkin-` Gadimov <baht...@gadimov.de> Daniel Gultsch <dan...@gultsch.de> ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim-plugins: Update manifest.ini and CHANGELOG
changeset e5e7ac96b279 in /home/hg/repos/gajim-plugins author: lovetox <forenjun...@chello.at> branches: details:gajim-plugins?cmd=changeset;node=e5e7ac96b279 description: Update manifest.ini and CHANGELOG diffstat: omemo/CHANGELOG| 3 +++ omemo/manifest.ini | 2 +- 2 files changed, 4 insertions(+), 1 deletions(-) diffs (22 lines): diff -r 8e5145451caa -r e5e7ac96b279 omemo/CHANGELOG --- a/omemo/CHANGELOG Wed Nov 09 11:52:40 2016 +0100 +++ b/omemo/CHANGELOG Sat Nov 12 11:48:26 2016 +0100 @@ -1,3 +1,6 @@ +0.9.7 / 2016-11-12 +- Bugfixes + 0.9.6 / 2016-11-01 - Bugfixes diff -r 8e5145451caa -r e5e7ac96b279 omemo/manifest.ini --- a/omemo/manifest.iniWed Nov 09 11:52:40 2016 +0100 +++ b/omemo/manifest.iniSat Nov 12 11:48:26 2016 +0100 @@ -1,7 +1,7 @@ [info] name: OMEMO short_name: omemo -version: 0.9.6 +version: 0.9.7 description: OMEMO is an XMPP Extension Protocol (XEP) for secure multi-client end-to-end encryption based on Axolotl and PEP. You need to install some dependencys, you can find install instructions for your system in the Github Wiki. authors: Bahtiar `kalkin-` Gadimov <baht...@gadimov.de> Daniel Gultsch <dan...@gultsch.de> ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim-plugins: Improve handling of empty/invalid devicelists
changeset cdc8a9c02eb4 in /home/hg/repos/gajim-plugins author: lovetox <forenjun...@chello.at> branches: details:gajim-plugins?cmd=changeset;node=cdc8a9c02eb4 description: Improve handling of empty/invalid devicelists diffstat: omemo/__init__.py | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) diffs (37 lines): diff -r e3f514127f2e -r cdc8a9c02eb4 omemo/__init__.py --- a/omemo/__init__.py Wed Nov 02 20:07:24 2016 +0100 +++ b/omemo/__init__.py Tue Nov 08 23:53:09 2016 +0100 @@ -732,9 +732,13 @@ devices_list = list(set(unpack_device_list_update(event.stanza, event.conn.name))) +contact_jid = gajim.get_jid_without_resource(event.fjid) if len(devices_list) == 0: +log.error(account + + ' => Received empty or invalid Devicelist from: ' + + contact_jid) return False -contact_jid = gajim.get_jid_without_resource(event.fjid) + state = self.get_omemo_state(account) my_jid = gajim.get_jid_from_account(account) @@ -1068,15 +1072,16 @@ state = self.get_omemo_state(account) if successful(stanza): -log.info(account + ' => Devicelistquery was successful') devices_list = list(set(unpack_device_list_update(stanza, account))) if len(devices_list) == 0: +log.error(account + ' => Devicelistquery was NOT successful') +self.publish_own_devices_list(account) return False contact_jid = stanza.getAttr('from') if contact_jid == my_jid: state.set_own_devices(devices_list) state.store.sessionStore.setActiveState(devices_list, my_jid) - +log.info(account + ' => Devicelistquery was successful') # remove contact from list, so on send button pressed # we query for bundle and build a session if contact_jid in self.query_for_bundles: ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim-plugins: Optimize write operations to DB
changeset 826a1e7c7b63 in /home/hg/repos/gajim-plugins author: lovetox <forenjun...@chello.at> branches: details:gajim-plugins?cmd=changeset;node=826a1e7c7b63 description: Optimize write operations to DB diffstat: omemo/omemo/sql.py | 7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diffs (17 lines): diff -r 08658cc12dc5 -r 826a1e7c7b63 omemo/omemo/sql.py --- a/omemo/omemo/sql.pyTue Nov 01 23:05:44 2016 +0100 +++ b/omemo/omemo/sql.pyWed Nov 02 19:23:24 2016 +0100 @@ -27,6 +27,13 @@ :type dbConn: Connection """ self.dbConn = dbConn +c = self.dbConn.cursor() +c.execute("PRAGMA synchronous=NORMAL;") +c.execute("PRAGMA journal_mode;") +mode = c.fetchone()[0] +# WAL is a persistent DB mode, dont override it if user has set it +if mode != 'wal': +c.execute("PRAGMA journal_mode=MEMORY;") self.createDb() self.migrateDb() ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim-plugins: Make PRAGMA settings after DB creation
changeset 8e5145451caa in /home/hg/repos/gajim-plugins author: lovetox <forenjun...@chello.at> branches: details:gajim-plugins?cmd=changeset;node=8e5145451caa description: Make PRAGMA settings after DB creation diffstat: omemo/omemo/sql.py | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diffs (22 lines): diff -r cdc8a9c02eb4 -r 8e5145451caa omemo/omemo/sql.py --- a/omemo/omemo/sql.pyTue Nov 08 23:53:09 2016 +0100 +++ b/omemo/omemo/sql.pyWed Nov 09 11:52:40 2016 +0100 @@ -27,6 +27,8 @@ :type dbConn: Connection """ self.dbConn = dbConn +self.createDb() +self.migrateDb() c = self.dbConn.cursor() c.execute("PRAGMA synchronous=NORMAL;") c.execute("PRAGMA journal_mode;") @@ -34,8 +36,7 @@ # WAL is a persistent DB mode, dont override it if user has set it if mode != 'wal': c.execute("PRAGMA journal_mode=MEMORY;") -self.createDb() -self.migrateDb() +self.dbConn.commit() def createDb(self): if user_version(self.dbConn) == 0: ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim-plugins: Update README.md
changeset e3f514127f2e in /home/hg/repos/gajim-plugins author: lovetox <forenjun...@chello.at> branches: details:gajim-plugins?cmd=changeset;node=e3f514127f2e description: Update README.md diffstat: omemo/README.md | 29 + 1 files changed, 17 insertions(+), 12 deletions(-) diffs (52 lines): diff -r 826a1e7c7b63 -r e3f514127f2e omemo/README.md --- a/omemo/README.md Wed Nov 02 19:23:24 2016 +0100 +++ b/omemo/README.md Wed Nov 02 20:07:24 2016 +0100 @@ -20,24 +20,20 @@ Arch See [Arch Wiki](https://wiki.archlinux.org/index.php/Gajim#OMEMO_Support) + Debian +Packagename `gajim-omemo` available in backports and testing + Gentoo `layman -a flow && emerge gajim-omemo` -### Via PluginInstallerPlugin +### Via Gajim PluginManager Install the current stable version via the Gajim PluginManager. You *need* Gajim -version *0.16.5*. If your package manager does not provide an up to date version -you can install it from the official Mercurial repository. *DO NOT USE* gajim -0.16.4 it contains a vulnerability, which is fixed in 0.16.5. -```shell -hg clone https://hg.gajim.org/gajim -cd gajim -hg update gajim-0.16.5 --clean -``` +version *0.16.5* or higher. If your package manager does not provide an up to date version +you can visit gajim.org for further install instructions. -**NOTE:** You *have* to install `python-axolotl` via `pip`. Depending on your setup you might -want to use `pip2` as Gajim is using python2.7. If you are using the official repository, -do not forget to install the `nbxmpp` dependency via pip or you package manager. +**NOTE:** You *have* to install `python-axolotl` via PackageManager or depending on your setup you might +want to use `pip2` as Gajim is using python2.7. if you still have problems, we have written down the most common problems [here](https://github.com/omemo/gajim-omemo/wiki/It-doesnt-work,-what-should-i-do%3F-(Linux)) @@ -72,6 +68,15 @@ If you want to use these plugins together with *OMEMO* you have to install the `python-cryptography` package +## Performance +If you experience lag when sending a message, install `python-cryptography` +If that doesnt help, you can convert your database to WAL mode with +``` +sqlite3 omemo_y...@jid.com.db +PRAGMA journal_mode=WAL +``` +Warning: This mode could lead to data loss if Gajim crashes + ## Debugging To see OMEMO related debug output start Gajim with the parameter `-l gajim.plugin_system.omemo=DEBUG`. ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim-plugins: Update README.md
changeset 8457659b652f in /home/hg/repos/gajim-plugins author: lovetox <love...@users.noreply.github.com> branches: details:gajim-plugins?cmd=changeset;node=8457659b652f description: Update README.md diffstat: omemo/README.md | 7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diffs (17 lines): diff -r 2a857b271972 -r 8457659b652f omemo/README.md --- a/omemo/README.md Fri Oct 21 19:07:39 2016 +0200 +++ b/omemo/README.md Sun Oct 23 19:14:30 2016 +0200 @@ -57,6 +57,13 @@ you can receive messages from fingerprints where you didnt made a trust decision, but you cant receive Messages from *not trusted* fingerprints +## Groupchat + +Groupchat works only in rooms that are +- non-anonymous +- members-only +- works only with contacts that you have in your roster + ## Filetransfer For Filetransfer use the **httpupload** plugin. ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim-plugins: Fix message correction in MUCs
changeset fba936c92042 in /home/hg/repos/gajim-plugins author: lovetox <forenjun...@chello.at> branches: details:gajim-plugins?cmd=changeset;node=fba936c92042 description: Fix message correction in MUCs diffstat: omemo/__init__.py | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) diffs (28 lines): diff -r 08fdd45011d4 -r fba936c92042 omemo/__init__.py --- a/omemo/__init__.py Wed Oct 26 22:36:06 2016 +0200 +++ b/omemo/__init__.py Tue Nov 01 23:00:35 2016 +0100 @@ -547,6 +547,10 @@ if account in self.disabled_accounts: return try: +# If we send a correction msg, the stanza is saved +# in correction_msg +if event.correction_msg: +event.msg_iq = event.correction_msg if not event.msg_iq.getTag('body'): return state = self.get_omemo_state(account) @@ -588,7 +592,12 @@ # Store Hint for MAM store = Node('store', attrs={'xmlns': NS_HINTS}) event.msg_iq.addChild(node=store) -self.print_msg_to_log(event.msg_iq) +if event.correction_msg: +event.correction_msg = event.msg_iq +event.msg_iq = None +self.print_msg_to_log(event.correction_msg) +else: +self.print_msg_to_log(event.msg_iq) except Exception as e: log.debug(e) return True ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim-plugins: Update PKGBUILD to 0.9.5
changeset 2a857b271972 in /home/hg/repos/gajim-plugins author: Tommaso Sardelli <lacapannadellozio...@gmail.com> branches: details:gajim-plugins?cmd=changeset;node=2a857b271972 description: Update PKGBUILD to 0.9.5 diffstat: omemo/pkgs/PKGBUILD | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (21 lines): diff -r f8ccc46520e6 -r 2a857b271972 omemo/pkgs/PKGBUILD --- a/omemo/pkgs/PKGBUILD Tue Nov 01 17:47:23 2016 +0100 +++ b/omemo/pkgs/PKGBUILD Fri Oct 21 19:07:39 2016 +0200 @@ -2,7 +2,7 @@ pkgname=gajim-plugin-omemo _pkgname=gajim-omemo -pkgver=0.9 +pkgver=0.9.5 pkgrel=1 pkgdesc="Gajim plugin for OMEMO Multi-End Message and Object Encryption." arch=(any) @@ -12,7 +12,7 @@ provides=('gajim-plugin-omemo') conflicts=('gajim-plugin-omemo-git') source=("https://github.com/omemo/${_pkgname}/archive/${pkgver}.tar.gz;) -sha512sums=('536d0a9e368dadefefba34b02e74194c314eb0fc6343fcbb64390b7e447fb8be0214e921359959f831d0bcfaef09ae6825110ebeea947ac5a5ef3bc73da72541') +sha512sums=('5941d2e201bbed477a51994a0413a330c141d0a10696968583f68255f4d2a1a22b507d8cae57328cbbe72511918e42a54e17e7f6acbef0a064aedb0371b09b76') package() { cd $srcdir/gajim-omemo-${pkgver} ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Remove unused xdg code and make it check for absolute paths
changeset 6068cd819e0b in /home/hg/repos/gajim author: Emmanuel Gil Peyrot <linkma...@linkmauve.fr> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=6068cd819e0b description: Remove unused xdg code and make it check for absolute paths The xdg module has never been imported due to a catchall except clause, so we can safely assume it was unused and untested. diffstat: src/common/configpaths.py | 40 +--- 1 files changed, 13 insertions(+), 27 deletions(-) diffs (57 lines): diff -r 4b2e515d270c -r 6068cd819e0b src/common/configpaths.py --- a/src/common/configpaths.py Sat Nov 05 15:37:30 2016 + +++ b/src/common/configpaths.py Sat Nov 05 14:49:38 2016 + @@ -26,11 +26,6 @@ import sys import tempfile from common import defs -HAVE_XDG = True -try: -__import__(xdg) -except: -HAVE_XDG = False ( TYPE_CONFIG, @@ -88,28 +83,19 @@ self.config_root = self.cache_root = self.data_root = '.' else: # Unices # Pass in an Unicode string, and hopefully get one back. -if HAVE_XDG: -self.config_root = xdg.BaseDirectory.load_first_config('gajim') -if not self.config_root: -# Folder doesn't exist yet. -self.config_root = os.path.join(xdg.BaseDirectory.\ -xdg_config_dirs[0], 'gajim') - -self.cache_root = os.path.join(xdg.BaseDirectory.xdg_cache_home, - 'gajim') - -self.data_root = xdg.BaseDirectory.save_data_path('gajim') -if not self.data_root: -self.data_root = os.path.join(xdg.BaseDirectory.\ -xdg_data_dirs[0], 'gajim') -else: -expand = os.path.expanduser -base = os.getenv('XDG_CONFIG_HOME') or expand('~/.config') -self.config_root = os.path.join(base, 'gajim') -base = os.getenv('XDG_CACHE_HOME') or expand('~/.cache') -self.cache_root = os.path.join(base, 'gajim') -base = os.getenv('XDG_DATA_HOME') or expand('~/.local/share') -self.data_root = os.path.join(base, 'gajim') +expand = os.path.expanduser +base = os.getenv('XDG_CONFIG_HOME') +if base is None or base[0] != '/': +base = expand('~/.config') +self.config_root = os.path.join(base, 'gajim') +base = os.getenv('XDG_CACHE_HOME') +if base is None or base[0] != '/': +base = expand('~/.cache') +self.cache_root = os.path.join(base, 'gajim') +base = os.getenv('XDG_DATA_HOME') +if base is None or base[0] != '/': +base = expand('~/.local/share') +self.data_root = os.path.join(base, 'gajim') def add(self, name, type_, path): self.paths[name] = (type_, path) ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Fix unknown variables in htmltextview
changeset 520a0a46bcf1 in /home/hg/repos/gajim author: lovetox <forenjun...@chelo.at> branches: gajim_0.16 details:http://hg.gajim.org/gajim?cmd=changeset;node=520a0a46bcf1 description: Fix unknown variables in htmltextview diffstat: src/htmltextview.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r ddac4eb72c2a -r 520a0a46bcf1 src/htmltextview.py --- a/src/htmltextview.py Sat Nov 05 18:19:44 2016 +0100 +++ b/src/htmltextview.py Sat Nov 05 18:23:03 2016 +0100 @@ -704,7 +704,7 @@ cite = attrs.get('cite', None) if cite: tag = self.textbuf.create_tag(id_) -tag.title = title +tag.title = attrs.get('title', None) tag.is_anchor = True elif name in LIST_ELEMS: style += ';margin-left: 2em' ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Remove unreachable code, and simplify is_valid_bool.
changeset cf1d4f36eae9 in /home/hg/repos/gajim author: Emmanuel Gil Peyrot <linkma...@linkmauve.fr> branches: gajim_0.16 details:http://hg.gajim.org/gajim?cmd=changeset;node=cf1d4f36eae9 description: Remove unreachable code, and simplify is_valid_bool. diffstat: src/common/config.py | 16 +++- 1 files changed, 7 insertions(+), 9 deletions(-) diffs (27 lines): diff -r e34411e66704 -r cf1d4f36eae9 src/common/config.py --- a/src/common/config.py Fri Oct 21 22:40:50 2016 +0200 +++ b/src/common/config.py Sat Nov 05 14:53:48 2016 + @@ -599,16 +599,14 @@ def is_valid_bool(self, val): if val == 'True': return True -elif val == 'False': +if val == 'False': return False -else: -ival = self.is_valid_int(val) -if ival: -return True -elif ival is None: -return None -return False -return None +ival = self.is_valid_int(val) +if ival: +return True +if ival is None: +return None +return False def is_valid_string(self, val): return val ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Fix Bonjour code to not rely on undeclared variables
changeset ddac4eb72c2a in /home/hg/repos/gajim author: lovetox <forenjun...@chelo.at> branches: gajim_0.16 details:http://hg.gajim.org/gajim?cmd=changeset;node=ddac4eb72c2a description: Fix Bonjour code to not rely on undeclared variables diffstat: src/common/zeroconf/zeroconf_bonjour.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r dbd986b92c02 -r ddac4eb72c2a src/common/zeroconf/zeroconf_bonjour.py --- a/src/common/zeroconf/zeroconf_bonjour.py Sat Nov 05 18:17:55 2016 +0100 +++ b/src/common/zeroconf/zeroconf_bonjour.py Sat Nov 05 18:19:44 2016 +0100 @@ -171,7 +171,7 @@ if name != self.name: # update TXT data only, as intended according to resolve_all comment old_contact = self.contacts[name] -self.contacts[name] = old_contact[0:C_TXT] + (txt,) + old_contact[C_TXT+1:] +self.contacts[name] = old_contact[0:C_TXT] + (self.txt,) + old_contact[C_TXT+1:] def service_added_callback(self, sdRef, flags, errorCode, name, regtype, domain): ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Remove NameError in Avahi code.
changeset d90f2bac66bd in /home/hg/repos/gajim author: Emmanuel Gil Peyrot <linkma...@linkmauve.fr> branches: gajim_0.16 details:http://hg.gajim.org/gajim?cmd=changeset;node=d90f2bac66bd description: Remove NameError in Avahi code. diffstat: src/common/zeroconf/zeroconf_avahi.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 37d7514bc1fc -r d90f2bac66bd src/common/zeroconf/zeroconf_avahi.py --- a/src/common/zeroconf/zeroconf_avahi.py Sat Nov 05 18:13:13 2016 +0100 +++ b/src/common/zeroconf/zeroconf_avahi.py Sat Nov 05 15:06:08 2016 + @@ -175,7 +175,7 @@ # so this probably needs to be revised again. if old_resolved_info[i][0:2] == (interface, protocol): log.debug('Deleting resolved info for interface %i, protocol %i, host %s, aprotocol %i, address %s, port %i' % old_resolved_info[i]) -del cur_hosts[i] +del old_resolved_info[i] break resolved_info = resolved_info + old_resolved_info log.debug('Collected resolved info is now: %s' % (resolved_info,)) ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Replace NameError SSL with correctly-imported OpenSSL.SSL.
changeset dbd986b92c02 in /home/hg/repos/gajim author: lovetox <forenjun...@chelo.at> branches: gajim_0.16 details:http://hg.gajim.org/gajim?cmd=changeset;node=dbd986b92c02 description: Replace NameError SSL with correctly-imported OpenSSL.SSL. diffstat: src/common/socks5.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (14 lines): diff -r d90f2bac66bd -r dbd986b92c02 src/common/socks5.py --- a/src/common/socks5.py Sat Nov 05 15:06:08 2016 + +++ b/src/common/socks5.py Sat Nov 05 18:17:55 2016 +0100 @@ -897,8 +897,8 @@ """ try: buff = self._recv() -except (SSL.WantReadError, SSL.WantWriteError, -SSL.WantX509LookupError), e: +except (OpenSSL.SSL.WantReadError, OpenSSL.SSL.WantWriteError, +OpenSSL.SSL.WantX509LookupError) as e: log.info("SSL rehandshake request : " + repr(e)) raise e try: ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Fix wrong variable names and forgotten imports in message...
changeset 37d7514bc1fc in /home/hg/repos/gajim author: lovetox <forenjun...@chelo.at> branches: gajim_0.16 details:http://hg.gajim.org/gajim?cmd=changeset;node=37d7514bc1fc description: Fix wrong variable names and forgotten imports in message_archiving. diffstat: src/common/message_archiving.py | 8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diffs (34 lines): diff -r cf1d4f36eae9 -r 37d7514bc1fc src/common/message_archiving.py --- a/src/common/message_archiving.py Sat Nov 05 14:53:48 2016 + +++ b/src/common/message_archiving.py Sat Nov 05 18:13:13 2016 +0100 @@ -21,8 +21,12 @@ import nbxmpp from common import gajim from common import ged +from common import helpers from common.connection_handlers_events import ArchivingReceivedEvent +from calendar import timegm +from time import localtime + import logging log = logging.getLogger('gajim.c.message_archiving') @@ -188,7 +192,7 @@ msg=payload[0].getData(), nick=nick) elif payload[0].getName() == 'message': print 'Not implemented' -chat = iq_obj.getTag('chat') +chat = obj.stanza.getTag('chat') if chat: with_ = chat.getAttr('with') start_ = chat.getAttr('start') @@ -229,7 +233,7 @@ del self.awaiting_answers[id_] elif self.awaiting_answers[id_][0] == ARCHIVING_MODIFICATIONS_ARRIVED: -modified = iq_obj.getTag('modified') +modified = obj.stanza.getTag('modified') if modified: for element in modified.getChildren(): if element.getName() == 'changed': ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Add forgotten import dialogs in history_window.
changeset bd5bf727dfbd in /home/hg/repos/gajim author: Emmanuel Gil Peyrot <linkma...@linkmauve.fr> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=bd5bf727dfbd description: Add forgotten import dialogs in history_window. diffstat: src/history_window.py | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (11 lines): diff -r e8047fca9921 -r bd5bf727dfbd src/history_window.py --- a/src/history_window.py Sat Nov 05 15:22:03 2016 + +++ b/src/history_window.py Sat Nov 05 15:22:59 2016 + @@ -33,6 +33,7 @@ import gtkgui_helpers import conversation_textview +import dialogs from common import gajim from common import helpers ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Import reduce from functools, it isn?t a builtin anymore ...
changeset e5baaa087cfe in /home/hg/repos/gajim author: Emmanuel Gil Peyrot <linkma...@linkmauve.fr> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=e5baaa087cfe description: Import reduce from functools, it isn?t a builtin anymore in python3. diffstat: src/ipython_view.py | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diffs (12 lines): diff -r 852005a2ca26 -r e5baaa087cfe src/ipython_view.py --- a/src/ipython_view.py Sat Nov 05 15:30:34 2016 + +++ b/src/ipython_view.py Sat Nov 05 15:31:01 2016 + @@ -42,6 +42,8 @@ is available at U{http://www.opensource.org/licenses/bsd-license.php} """ +from functools import reduce + from gi.repository import Gtk from gi.repository import Gdk from gi.repository import GObject ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Rename typo s/fb/fd/ in remote_control.
changeset 4b2e515d270c in /home/hg/repos/gajim author: Emmanuel Gil Peyrot <linkma...@linkmauve.fr> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=4b2e515d270c description: Rename typo s/fb/fd/ in remote_control. diffstat: src/remote_control.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r a2bd7e386c30 -r 4b2e515d270c src/remote_control.py --- a/src/remote_control.py Sat Nov 05 15:36:27 2016 + +++ b/src/remote_control.py Sat Nov 05 15:37:30 2016 + @@ -909,7 +909,7 @@ else: invalid_file = True if not invalid_file and filesize < 16384: -with open(picture, 'rb') as fb: +with open(picture, 'rb') as fd: data = fd.read() avatar = base64.b64encode(data).decode('utf-8') avatar_mime_type = mimetypes.guess_type(picture)[0] ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Use the correct ctx variable name in jingle_xtls.
changeset debf41873d30 in /home/hg/repos/gajim author: Emmanuel Gil Peyrot <linkma...@linkmauve.fr> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=debf41873d30 description: Use the correct ctx variable name in jingle_xtls. diffstat: src/common/jingle_xtls.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 9fa9455bdd1d -r debf41873d30 src/common/jingle_xtls.py --- a/src/common/jingle_xtls.py Sat Nov 05 14:57:13 2016 + +++ b/src/common/jingle_xtls.py Sat Nov 05 14:58:34 2016 + @@ -120,7 +120,7 @@ dh_params_name = os.path.join(gajim.MY_CERT_DIR, DH_PARAMS) try: with open(dh_params_name, "r") as dh_params_file: -tx.load_tmp_dh(dh_params_name.encode('utf-8')) +ctx.load_tmp_dh(dh_params_name.encode('utf-8')) except FileNotFoundError as err: default_dh_params_name = os.path.join(gajim.DATA_DIR, 'other', DEFAULT_DH_PARAMS) ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Fix NameError in Avahi code.
changeset 7a5772df6bec in /home/hg/repos/gajim author: Emmanuel Gil Peyrot <linkma...@linkmauve.fr> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=7a5772df6bec description: Fix NameError in Avahi code. diffstat: src/common/zeroconf/zeroconf_avahi.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r bc8263139fd6 -r 7a5772df6bec src/common/zeroconf/zeroconf_avahi.py --- a/src/common/zeroconf/zeroconf_avahi.py Sat Nov 05 15:04:39 2016 + +++ b/src/common/zeroconf/zeroconf_avahi.py Sat Nov 05 15:06:08 2016 + @@ -175,7 +175,7 @@ # so this probably needs to be revised again. if old_resolved_info[i][0:2] == (interface, protocol): log.debug('Deleting resolved info for interface %i, protocol %i, host %s, aprotocol %i, address %s, port %i' % old_resolved_info[i]) -del cur_hosts[i] +del old_resolved_info[i] break resolved_info = resolved_info + old_resolved_info log.debug('Collected resolved info is now: %s' % (resolved_info,)) ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Remove unreachable code, and simplify is_valid_bool.
changeset 84e9332822bd in /home/hg/repos/gajim author: Emmanuel Gil Peyrot <linkma...@linkmauve.fr> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=84e9332822bd description: Remove unreachable code, and simplify is_valid_bool. diffstat: src/common/config.py | 16 +++- 1 files changed, 7 insertions(+), 9 deletions(-) diffs (27 lines): diff -r 5654a823e932 -r 84e9332822bd src/common/config.py --- a/src/common/config.py Mon Oct 31 02:11:46 2016 +0100 +++ b/src/common/config.py Sat Nov 05 14:53:48 2016 + @@ -605,16 +605,14 @@ def is_valid_bool(self, val): if val == 'True': return True -elif val == 'False': +if val == 'False': return False -else: -ival = self.is_valid_int(val) -if ival: -return True -elif ival is None: -return None -return False -return None +ival = self.is_valid_int(val) +if ival: +return True +if ival is None: +return None +return False def is_valid_string(self, val): return val ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Replace gtk.gdk with GdkPixbuf in gui_interface.
changeset a2bd7e386c30 in /home/hg/repos/gajim author: Emmanuel Gil Peyrot <linkma...@linkmauve.fr> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=a2bd7e386c30 description: Replace gtk.gdk with GdkPixbuf in gui_interface. diffstat: src/gui_interface.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r e5baaa087cfe -r a2bd7e386c30 src/gui_interface.py --- a/src/gui_interface.py Sat Nov 05 15:31:01 2016 + +++ b/src/gui_interface.py Sat Nov 05 15:36:27 2016 + @@ -2664,7 +2664,7 @@ return gtkgui_helpers.load_mood_icon(mood).get_pixbuf() elif isinstance(pep_obj, pep.UserTunePEP): path = os.path.join(gajim.DATA_DIR, 'emoticons', 'static', 'music.png') -return gtk.gdk.pixbuf_new_from_file(path) +return GdkPixbuf.Pixbuf.new_from_file(path) elif isinstance(pep_obj, pep.UserActivityPEP): pep_ = pep_obj._pep_specific_data activity = pep_['activity'] ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Fix wrong variable names and forgotten imports in message...
changeset 6f6feb1a0d2e in /home/hg/repos/gajim author: Emmanuel Gil Peyrot <linkma...@linkmauve.fr> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=6f6feb1a0d2e description: Fix wrong variable names and forgotten imports in message_archiving. diffstat: src/common/message_archiving.py | 8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diffs (34 lines): diff -r debf41873d30 -r 6f6feb1a0d2e src/common/message_archiving.py --- a/src/common/message_archiving.py Sat Nov 05 14:58:34 2016 + +++ b/src/common/message_archiving.py Sat Nov 05 15:02:46 2016 + @@ -21,8 +21,12 @@ import nbxmpp from common import gajim from common import ged +from common import helpers from common.connection_handlers_events import ArchivingReceivedEvent +from calendar import timegm +from time import localtime + import logging log = logging.getLogger('gajim.c.message_archiving') @@ -225,7 +229,7 @@ msg=payload[0].getData(), nick=nick) elif payload[0].getName() == 'message': print('Not implemented') -chat = iq_obj.getTag('chat') +chat = obj.stanza.getTag('chat') if chat: with_ = chat.getAttr('with') start_ = chat.getAttr('start') @@ -266,7 +270,7 @@ del self.awaiting_answers[id_] elif self.awaiting_answers[id_][0] == ARCHIVING_MODIFICATIONS_ARRIVED: -modified = iq_obj.getTag('modified') +modified = obj.stanza.getTag('modified') if modified: for element in modified.getChildren(): if element.getName() == 'changed': ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Add forgotten logging setup in dialogs.
changeset e8047fca9921 in /home/hg/repos/gajim author: Emmanuel Gil Peyrot <linkma...@linkmauve.fr> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=e8047fca9921 description: Add forgotten logging setup in dialogs. diffstat: src/dialogs.py | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diffs (13 lines): diff -r ad6cc1647156 -r e8047fca9921 src/dialogs.py --- a/src/dialogs.pySat Nov 05 15:16:20 2016 + +++ b/src/dialogs.pySat Nov 05 15:22:03 2016 + @@ -69,6 +69,9 @@ from common.exceptions import GajimGeneralException from common.connection_handlers_events import MessageOutgoingEvent +import logging +log = logging.getLogger('gajim.dialogs') + class EditGroupsDialog: """ ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Fix unknown variables in htmltextview.
changeset 852005a2ca26 in /home/hg/repos/gajim author: Emmanuel Gil Peyrot <linkma...@linkmauve.fr> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=852005a2ca26 description: Fix unknown variables in htmltextview. diffstat: src/htmltextview.py | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diffs (21 lines): diff -r bd5bf727dfbd -r 852005a2ca26 src/htmltextview.py --- a/src/htmltextview.py Sat Nov 05 15:22:59 2016 + +++ b/src/htmltextview.py Sat Nov 05 15:30:34 2016 + @@ -55,6 +55,8 @@ from common import gajim from gtkgui_helpers import get_icon_pixmap from common import helpers +from common.exceptions import GajimGeneralException +import dialogs import tooltips import logging @@ -735,7 +737,7 @@ cite = attrs.get('cite', None) if cite: tag = self.textbuf.create_tag(id_) -tag.title = title +tag.title = attrs.get('title', None) tag.is_anchor = True elif name in LIST_ELEMS: style += ';margin-left: 2em' ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Fix Bonjour code to not rely on undeclared variables.
changeset ad6cc1647156 in /home/hg/repos/gajim author: Emmanuel Gil Peyrot <linkma...@linkmauve.fr> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=ad6cc1647156 description: Fix Bonjour code to not rely on undeclared variables. diffstat: src/common/zeroconf/zeroconf_bonjour.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (21 lines): diff -r 309ec21b2b75 -r ad6cc1647156 src/common/zeroconf/zeroconf_bonjour.py --- a/src/common/zeroconf/zeroconf_bonjour.py Sat Nov 05 15:07:08 2016 + +++ b/src/common/zeroconf/zeroconf_bonjour.py Sat Nov 05 15:16:20 2016 + @@ -20,7 +20,7 @@ from common import gajim import select import re -from common.zeroconf.zeroconf import C_BARE_NAME, C_DOMAIN +from common.zeroconf.zeroconf import C_BARE_NAME, C_DOMAIN, C_TXT try: import pybonjour @@ -171,7 +171,7 @@ if name != self.name: # update TXT data only, as intended according to resolve_all comment old_contact = self.contacts[name] -self.contacts[name] = old_contact[0:C_TXT] + (txt,) + old_contact[C_TXT+1:] +self.contacts[name] = old_contact[0:C_TXT] + (self.txt,) + old_contact[C_TXT+1:] def service_added_callback(self, sdRef, flags, errorCode, name, regtype, domain): ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Add forgotten variable declaration in except.
changeset 9fa9455bdd1d in /home/hg/repos/gajim author: Emmanuel Gil Peyrot <linkma...@linkmauve.fr> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=9fa9455bdd1d description: Add forgotten variable declaration in except. diffstat: src/common/ged.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 12bd496db0a6 -r 9fa9455bdd1d src/common/ged.py --- a/src/common/ged.py Sat Nov 05 14:55:48 2016 + +++ b/src/common/ged.py Sat Nov 05 14:57:13 2016 + @@ -79,7 +79,7 @@ if event_name in self.handlers: try: self.handlers[event_name].remove((priority, handler)) -except ValueError: +except ValueError as error: log.warning('''Function (%s) with priority "%s" never registered as handler of event "%s". Couldn\'t remove. Error: %s''' %(handler, priority, event_name, error)) ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Move previously-dead code in passwords.
changeset bc8263139fd6 in /home/hg/repos/gajim author: Emmanuel Gil Peyrot <linkma...@linkmauve.fr> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=bc8263139fd6 description: Move previously-dead code in passwords. diffstat: src/common/passwords.py | 6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diffs (19 lines): diff -r 6f6feb1a0d2e -r bc8263139fd6 src/common/passwords.py --- a/src/common/passwords.py Sat Nov 05 15:02:46 2016 + +++ b/src/common/passwords.py Sat Nov 05 15:04:39 2016 + @@ -119,13 +119,11 @@ if len(items) > 1: warnings.warn("multiple gnome keyring items found for account %s;" " trying to use the first one..." % account_name) -if items: -return items[0].secret -else: -return None if err == GnomeKeyring.Result.NO_KEYRING_DAEMON: ## no keyring daemon: in the future, stop using it set_storage(SimplePasswordStorage()) +if items: +return items[0].secret return None def save_password(self, account_name, password, update=True): ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Replace NameError SSL with correctly-imported OpenSSL.SSL.
changeset 309ec21b2b75 in /home/hg/repos/gajim author: Emmanuel Gil Peyrot <linkma...@linkmauve.fr> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=309ec21b2b75 description: Replace NameError SSL with correctly-imported OpenSSL.SSL. diffstat: src/common/socks5.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (14 lines): diff -r 7a5772df6bec -r 309ec21b2b75 src/common/socks5.py --- a/src/common/socks5.py Sat Nov 05 15:06:08 2016 + +++ b/src/common/socks5.py Sat Nov 05 15:07:08 2016 + @@ -887,8 +887,8 @@ """ try: buff = self._recv().decode('utf-8') -except (SSL.WantReadError, SSL.WantWriteError, -SSL.WantX509LookupError) as e: +except (OpenSSL.SSL.WantReadError, OpenSSL.SSL.WantWriteError, +OpenSSL.SSL.WantX509LookupError) as e: log.info("SSL rehandshake request : " + repr(e)) raise e try: ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Add MAM Preference Dialog
changeset 5654a823e932 in /home/hg/repos/gajim author: lovetox <forenjun...@chelo.at> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=5654a823e932 description: Add MAM Preference Dialog diffstat: data/gui/archiving_313_preferences_item.ui | 143 ++ data/gui/archiving_313_preferences_window.ui | 213 +++ src/common/connection_handlers.py|3 + src/common/connection_handlers_events.py | 36 - src/common/message_archiving.py | 37 src/dialogs.py | 161 src/roster_window.py | 14 +- 7 files changed, 600 insertions(+), 7 deletions(-) diffs (truncated from 714 to 300 lines): diff -r 66fcb7c9a012 -r 5654a823e932 data/gui/archiving_313_preferences_item.ui --- /dev/null Thu Jan 01 00:00:00 1970 + +++ b/data/gui/archiving_313_preferences_item.uiMon Oct 31 02:11:46 2016 +0100 @@ -0,0 +1,143 @@ + + + + + + + + + + + +Always + + +Never + + + + +False +12 +False +True +dialog + + + +False +vertical +20 + + +False +end + + +gtk-close +True +True +True +True +True + + + +True +True +0 + + + + +gtk-ok +True +True +True +True +True + + + +True +True +1 + + + + +False +False +0 + + + + +True +False +5 +5 + + +True +False +Jabber ID: +0 + + +0 +0 + + + + +True +False +Preference: +0 + + +0 +1 + + + + +194 +True +True + + +1 +0 + + + + +True +False +start +dialog_pref_liststore + + + +0 + + + + +1 +1 + + + + +False +True +1 + + + + + + diff -r 66fcb7c9a012 -r 5654a823e932 data/gui/archiving_313_preferences_window.ui --- /dev/null Thu Jan 01 00:00:00 1970 + +++ b/data/gui/archiving_313_preferences_window.ui Mon Oct 31 02:11:46 2016 +0100 @@ -0,0 +1,213 @@ + + + + + +True +False +gtk-add + + + + + + + + + + + + + + + + +Always + + +Roster + + +Never + + + + +True +False +gtk-remove + + +False +12 +center +450 + + + +True +False +5 +10 + + +150 +True +True +True +True +in + + +True +True +archive_items_liststore + + + + + +Jabber ID +True +True +0 + + + +0 + + + + + + +Preference +True +True +1 + + + +1 + + + + + + + + +0 +1 +2 + + + + +True +
gajim-plugins: Add OSM as map preview provider
changeset f8ccc46520e6 in /home/hg/repos/gajim-plugins author: lovetox <forenjun...@chelo.at> branches: details:gajim-plugins?cmd=changeset;node=f8ccc46520e6 description: Add OSM as map preview provider diffstat: set_location/config_dialog.ui | 199 +++-- set_location/manifest.ini |2 +- set_location/set_location.py | 55 +-- 3 files changed, 213 insertions(+), 43 deletions(-) diffs (truncated from 649 to 300 lines): diff -r e1d7291ab37c -r f8ccc46520e6 set_location/config_dialog.ui --- a/set_location/config_dialog.ui Sun Oct 30 21:38:15 2016 +0100 +++ b/set_location/config_dialog.ui Tue Nov 01 17:47:23 2016 +0100 @@ -1,22 +1,50 @@ - + + +True +False +gtk-delete + + +True +False +gtk-save-as + + + + + + + + +Google + + +MapQuest OSM + + + +False True +False 9 True -vertical +False True +False True +False 0 Preset: @@ -30,9 +58,12 @@ True - +False + +True +True 1 @@ -45,7 +76,7 @@ image2 True 0 - + False @@ -63,7 +94,7 @@ True image1 True - + False @@ -81,14 +112,16 @@ True +False 6 -16 +17 2 7 5 True +False 0 alt: @@ -100,6 +133,7 @@ True +False 0 area: @@ -113,6 +147,7 @@ True +False 0 building: @@ -126,6 +161,7 @@ True +False 0 country: @@ -137,6 +173,7 @@ True +False 0 countrycode: @@ -148,6 +185,7 @@ True +False 0 description: @@ -159,6 +197,7 @@ True +False 0 floor: @@ -170,6 +209,7 @@ True +False 0 locality: @@ -181,6 +221,7 @@ True +False 0 lat: @@ -192,6 +233,7 @@ True +False 0 lon: @@ -203,6 +245,7 @@ True +False 0 postalcode: @@ -214,6 +257,7 @@ True +False 0 region: @@ -225,6 +269,7 @@ True +False 0 room: @@ -236,6 +281,7 @@ True +False 0 street: @@ -247,6 +293,7 @@ True +False 0 text: @@
gajim: Fix ad-hoc command window only displaying a very small area
changeset 66fcb7c9a012 in /home/hg/repos/gajim author: Emmanuel Gil Peyrot <linkma...@linkmauve.fr> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=66fcb7c9a012 description: Fix ad-hoc command window only displaying a very small area diffstat: data/gui/adhoc_commands_window.ui | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (21 lines): diff -r da49257cc3ce -r 66fcb7c9a012 data/gui/adhoc_commands_window.ui --- a/data/gui/adhoc_commands_window.ui Tue Oct 18 16:26:03 2016 +0200 +++ b/data/gui/adhoc_commands_window.ui Sun Oct 30 19:50:06 2016 + @@ -119,7 +119,7 @@ -False +True True 1 @@ -385,7 +385,7 @@ -False +True True 0 ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim-plugins: Handle unknown entities
changeset e1d7291ab37c in /home/hg/repos/gajim-plugins author: lovetox <forenjun...@chelo.at> branches: details:gajim-plugins?cmd=changeset;node=e1d7291ab37c description: Handle unknown entities diffstat: gotr/otrmodule.py | 6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diffs (17 lines): diff -r 678e16de4738 -r e1d7291ab37c gotr/otrmodule.py --- a/gotr/otrmodule.py Sun Oct 30 19:07:55 2016 +0100 +++ b/gotr/otrmodule.py Sun Oct 30 21:38:15 2016 +0100 @@ -707,8 +707,12 @@ self.stripped_data += '\n' def handle_entityref(self, name): -c = unichr(name2codepoint[name]) +try: +c = unichr(name2codepoint[name]) +except KeyError: +c = '&{};'.format(name) self.stripped_data += c + def handle_charref(self, name): if name.startswith('x'): c = unichr(int(name[1:], 16)) ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim-plugins: Handle apostrophe correctly
changeset 678e16de4738 in /home/hg/repos/gajim-plugins author: lovetox <forenjun...@chelo.at> branches: details:gajim-plugins?cmd=changeset;node=678e16de4738 description: Handle apostrophe correctly diffstat: gotr/manifest.ini | 2 +- gotr/otrmodule.py | 1 + 2 files changed, 2 insertions(+), 1 deletions(-) diffs (23 lines): diff -r 75ede510ed84 -r 678e16de4738 gotr/manifest.ini --- a/gotr/manifest.ini Fri Oct 21 03:47:13 2016 +0200 +++ b/gotr/manifest.ini Sun Oct 30 19:07:55 2016 +0100 @@ -1,7 +1,7 @@ [info] name: Off-The-Record Encryption short_name: gotr -version: 1.9.5 +version: 1.9.6 description: Provide OTR encryption. Read https://github.com/python-otr/gajim-otr/wiki;>https://github.com/python-otr/gajim-otr/wiki before use. authors: Kjell Braden <afflux.ga...@pentabarf.de> homepage: http://gajim-otr.pentabarf.de diff -r 75ede510ed84 -r 678e16de4738 gotr/otrmodule.py --- a/gotr/otrmodule.py Fri Oct 21 03:47:13 2016 +0200 +++ b/gotr/otrmodule.py Sun Oct 30 19:07:55 2016 +0100 @@ -82,6 +82,7 @@ from HTMLParser import HTMLParser from htmlentitydefs import name2codepoint +name2codepoint['apos'] = 0x0027 HAS_CRYPTO = True try: ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Store optional fields correctly in Bookmarks
changeset e34411e66704 in /home/hg/repos/gajim author: lovetox <forenjun...@chelo.at> branches: gajim_0.16 details:http://hg.gajim.org/gajim?cmd=changeset;node=e34411e66704 description: Store optional fields correctly in Bookmarks diffstat: src/common/connection.py | 10 +-- src/common/connection_handlers_events.py | 40 --- 2 files changed, 33 insertions(+), 17 deletions(-) diffs (101 lines): diff -r 738aa5082b6a -r e34411e66704 src/common/connection.py --- a/src/common/connection.py Sun Oct 16 22:40:41 2016 +0200 +++ b/src/common/connection.py Fri Oct 21 22:40:50 2016 +0200 @@ -2473,7 +2473,8 @@ """ if not gajim.account_is_connected(self.name): return -if self.pubsub_supported and storage_type != 'xml': +if self.pubsub_supported and self.pubsub_publish_options_supported \ +and storage_type != 'xml': self.send_pb_retrieve('', 'storage:bookmarks') # some server (ejabberd) are so slow to answer that we request via XML # if we don't get answer in the next 30 seconds @@ -2488,6 +2489,7 @@ storage_type can be set to 'pubsub' or 'xml' so store in only one method else it will be stored on both """ +NS_GAJIM_BM = 'xmpp:gajim.org/bookmarks' if not gajim.account_is_connected(self.name): return iq = nbxmpp.Node(tag='storage', attrs={'xmlns': 'storage:bookmarks'}) @@ -2495,8 +2497,9 @@ iq2 = iq.addChild(name = "conference") iq2.setAttr('jid', bm['jid']) iq2.setAttr('autojoin', bm['autojoin']) -iq2.setAttr('minimize', bm['minimize']) iq2.setAttr('name', bm['name']) +iq2.setTag('minimize', namespace=NS_GAJIM_BM). \ +setData(bm['minimize']) # Only add optional elements if not empty # Note: need to handle both None and '' as empty # thus shouldn't use "is not None" @@ -2505,7 +2508,8 @@ if bm.get('password', None): iq2.setTagData('password', bm['password']) if bm.get('print_status', None): -iq2.setTagData('print_status', bm['print_status']) +iq2.setTag('print_status', namespace=NS_GAJIM_BM). \ +setData(bm['print_status']) if self.pubsub_supported and self.pubsub_publish_options_supported and \ storage_type != 'xml': diff -r 738aa5082b6a -r e34411e66704 src/common/connection_handlers_events.py --- a/src/common/connection_handlers_events.py Sun Oct 16 22:40:41 2016 +0200 +++ b/src/common/connection_handlers_events.py Fri Oct 21 22:40:50 2016 +0200 @@ -508,29 +508,41 @@ class BookmarksHelper: def parse_bookmarks(self): self.bookmarks = [] +NS_GAJIM_BM = 'xmpp:gajim.org/bookmarks' confs = self.storage_node.getTags('conference') for conf in confs: autojoin_val = conf.getAttr('autojoin') -if autojoin_val is None: # not there (it's optional) +if not autojoin_val: # not there (it's optional) autojoin_val = False -minimize_val = conf.getAttr('minimize') -if minimize_val is None: # not there (it's optional) -minimize_val = False -print_status = conf.getTagData('print_status') -if not print_status: -print_status = conf.getTagData('show_status') +minimize_val = conf.getTag('minimize', namespace=NS_GAJIM_BM) +if not minimize_val: # not there, try old Gajim behaviour +minimize_val = conf.getAttr('minimize') +if not minimize_val: # not there (it's optional) +minimize_val = False +else: +minimize_val = minimize_val.getData() + +print_status = conf.getTag('print_status', namespace=NS_GAJIM_BM) +if not print_status: # not there, try old Gajim behaviour +print_status = conf.getTagData('print_status') + if not print_status: # not there, try old Gajim behaviour +print_status = conf.getTagData('show_status') +else: +print_status = print_status.getData() + try: jid = helpers.parse_jid(conf.getAttr('jid')) except helpers.InvalidFormat: -log.warn('Invalid JID: %s, ignoring it' % conf.getAttr('jid')) +log.warning('Invalid JID: %s, ignoring it' +% conf.getAttr('jid')) continue bm = {'name': conf.getAttr('name'), -'jid': jid, -'autojoin': autojoin_val, -'minimize': minimize_val, -'password': conf.getTagData('password'), -'nick':
gajim-plugins: Update PKGBUILD to 0.9
changeset 284da03d8f08 in /home/hg/repos/gajim-plugins author: Tommaso Sardelli <lacapannadellozio...@gmail.com> branches: details:gajim-plugins?cmd=changeset;node=284da03d8f08 description: Update PKGBUILD to 0.9 diffstat: omemo/pkgs/PKGBUILD | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diffs (23 lines): diff -r 1c3b1fee843c -r 284da03d8f08 omemo/pkgs/PKGBUILD --- a/omemo/pkgs/PKGBUILD Sun Aug 28 09:30:18 2016 +0200 +++ b/omemo/pkgs/PKGBUILD Tue Aug 30 08:22:47 2016 +0200 @@ -2,8 +2,8 @@ pkgname=gajim-plugin-omemo _pkgname=gajim-omemo -pkgver=0.8.1 -pkgrel=2 +pkgver=0.9 +pkgrel=1 pkgdesc="Gajim plugin for OMEMO Multi-End Message and Object Encryption." arch=(any) url="https://github.com/omemo/${_pkgname}; @@ -12,7 +12,7 @@ provides=('gajim-plugin-omemo') conflicts=('gajim-plugin-omemo-git') source=("https://github.com/omemo/${_pkgname}/archive/${pkgver}.tar.gz;) -sha512sums=('e9280033fbe111f5010f2e9e8fa32c5b8c0abe308000f9a043a1c5e8215c96f8be434876b1d72cc8d68aed4ddaebe9655c70f9648a2db718cba71d90434fee2e') +sha512sums=('536d0a9e368dadefefba34b02e74194c314eb0fc6343fcbb64390b7e447fb8be0214e921359959f831d0bcfaef09ae6825110ebeea947ac5a5ef3bc73da72541') package() { cd $srcdir/gajim-omemo-${pkgver} ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim-plugins: Add GroupChat
changeset cea2e7b54062 in /home/hg/repos/gajim-plugins author: lovetox <forenjun...@chello.at> branches: details:gajim-plugins?cmd=changeset;node=cea2e7b54062 description: Add GroupChat diffstat: omemo/__init__.py | 126 +-- omemo/omemo/liteaxolotlstore.py |3 + omemo/omemo/litesessionstore.py | 10 +++ omemo/omemo/state.py| 102 +++ omemo/ui.py | 112 ++- 5 files changed, 314 insertions(+), 39 deletions(-) diffs (truncated from 565 to 300 lines): diff -r 6b094611322a -r cea2e7b54062 omemo/__init__.py --- a/omemo/__init__.py Mon Sep 19 20:08:04 2016 +0200 +++ b/omemo/__init__.py Sun Oct 09 02:20:56 2016 +0200 @@ -22,6 +22,7 @@ import os import sqlite3 import shutil +import message_control from common import caps_cache, gajim, ged, configpaths from common.pep import SUPPORTED_PERSONAL_USER_EVENTS @@ -101,6 +102,7 @@ omemo_states = {} ui_list = {} +groupchat = {} @log_calls('OmemoPlugin') def init(self): @@ -119,15 +121,24 @@ (ged.PRECORE, self.handle_outgoing_stanza), 'message-outgoing': (ged.PRECORE, self.handle_outgoing_event), +'gc-stanza-message-outgoing': +(ged.PRECORE, self.handle_outgoing_gc_stanza), +'gc-presence-received': +(ged.PRECORE, self.gc_presence_received), +'gc-config-changed-received': +(ged.PRECORE, self.gc_config_changed_received), } self.config_dialog = ui.OMEMOConfigDialog(self) self.gui_extension_points = {'chat_control': (self.connect_ui, - self.disconnect_ui)} + self.disconnect_ui), + 'groupchat_control': (self.connect_ui, + self.disconnect_ui)} SUPPORTED_PERSONAL_USER_EVENTS.append(DevicelistPEP) self.plugin = self self.announced = [] self.query_for_bundles = [] self.disabled_accounts = [] +self.gc_message = {} self.config_default_values = {'DISABLED_ACCOUNTS': ([], ''), } @@ -335,8 +346,7 @@ if msg.stanza.getTag('openpgp', namespace=NS_PGP): return -if msg.stanza.getTag('encrypted', namespace=NS_OMEMO) and \ -msg.mtype == 'chat': +if msg.stanza.getTag('encrypted', namespace=NS_OMEMO): log.debug(account + ' => OMEMO msg received') state = self.get_omemo_state(account) @@ -345,14 +355,29 @@ log.debug('message was forwarded doing magic') else: from_jid = str(msg.stanza.getFrom()) + +if msg.mtype == 'groupchat': +from_jid = self.groupchat[msg.jid][msg.resource] + self.print_msg_to_log(msg.stanza) msg_dict = unpack_encrypted(msg.stanza.getTag ('encrypted', namespace=NS_OMEMO)) -msg_dict['sender_jid'] = gajim.get_jid_without_resource(from_jid) -plaintext = state.decrypt_msg(msg_dict) + +plaintext = '' +if msg_dict['sid'] == state.own_device_id: +if msg_dict['payload'] in self.gc_message: +plaintext = self.gc_message[msg_dict['payload']] +del self.gc_message[msg_dict['payload']] +else: +log.error(account + ' => Cant decrypt GroupChat Message ' + 'from ' + from_jid) +else: +msg_dict['sender_jid'] = gajim. \ +get_jid_without_resource(from_jid) +plaintext = state.decrypt_msg(msg_dict) if not plaintext: -return +return True msg.msgtxt = plaintext # Gajim bug: there must be a body or the message @@ -365,7 +390,7 @@ self.ui_list[account][contact_jid].activate_omemo() return False -elif msg.stanza.getTag('body') and msg.mtype == 'chat': +elif msg.stanza.getTag('body'): account = msg.conn.name from_jid = str(msg.stanza.getFrom()) @@ -386,6 +411,86 @@ ', Ui Warning not shown') @log_calls('OmemoPlugin') +def gc_presence_received(self, event): +if not event.real_jid: +return +room = event.room_jid +account = event.conn.name +jid = gajim.get_jid_without_resource(event.real_jid) +nick = event.nick + +if room not in self.groupchat: +self.groupchat[room] = {} + +if nick not in self.groupchat[room]: +self.groupchat[room][nick] = jid + +log.debug('PRESE
gajim-plugins: Update manifest.ini
changeset 708c7c7193eb in /home/hg/repos/gajim-plugins author: lovetox <love...@users.noreply.github.com> branches: details:gajim-plugins?cmd=changeset;node=708c7c7193eb description: Update manifest.ini diffstat: omemo/manifest.ini | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r dc5978e74a3b -r 708c7c7193eb omemo/manifest.ini --- a/omemo/manifest.iniMon Oct 10 12:59:22 2016 +0200 +++ b/omemo/manifest.iniMon Oct 10 12:59:50 2016 +0200 @@ -1,7 +1,7 @@ [info] name: OMEMO short_name: omemo -version: 0.9.0 +version: 0.9.5 description: OMEMO is an XMPP Extension Protocol (XEP) for secure multi-client end-to-end encryption based on Axolotl and PEP. You need to install some dependencys, you can find install instructions for your system in the Github Wiki. authors: Bahtiar `kalkin-` Gadimov <baht...@gadimov.de> Daniel Gultsch <dan...@gultsch.de> ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim-plugins: Refactoring UI
changeset e3922009f433 in /home/hg/repos/gajim-plugins author: lovetox <forenjun...@chello.at> branches: details:gajim-plugins?cmd=changeset;node=e3922009f433 description: Refactoring UI diffstat: omemo/config_dialog.ui |3 + omemo/fpr_dialog.ui| 25 ++-- omemo/ui.py| 256 ++-- 3 files changed, 112 insertions(+), 172 deletions(-) diffs (truncated from 537 to 300 lines): diff -r 0511dab4b3e0 -r e3922009f433 omemo/config_dialog.ui --- a/omemo/config_dialog.uiSun Oct 09 02:22:08 2016 +0200 +++ b/omemo/config_dialog.uiSun Oct 09 19:10:37 2016 +0200 @@ -206,6 +206,9 @@ True Name +True +True +1 diff -r 0511dab4b3e0 -r e3922009f433 omemo/fpr_dialog.ui --- a/omemo/fpr_dialog.ui Sun Oct 09 02:22:08 2016 +0200 +++ b/omemo/fpr_dialog.ui Sun Oct 09 19:10:37 2016 +0200 @@ -2,12 +2,6 @@ - - - - - - @@ -43,7 +37,9 @@ True True +True fingerprint_store +False 0 3 @@ -51,8 +47,11 @@ True Name +True +True +1 - + 1 @@ -64,7 +63,7 @@ True Trust - + 2 @@ -76,7 +75,7 @@ True Fingerprint - + 3 @@ -200,7 +199,7 @@ True Name - + 1 @@ -212,7 +211,7 @@ True Trust - + 2 @@ -224,7 +223,7 @@ True Fingerprint - + 3 @@ -291,8 +290,6 @@ True False -Copy to clipboard -True diff -r 0511dab4b3e0 -r e3922009f433 omemo/ui.py --- a/omemo/ui.py Sun Oct 09 02:22:08 2016 +0200 +++ b/omemo/ui.py Sun Oct 09 19:10:37 2016 +0200 @@ -28,6 +28,7 @@ # pylint: disable=import-error import gtkgui_helpers from common import gajim +from dialogs import YesNoDialog from plugins.gui import GajimPluginConfigDialog from axolotl.state.sessionrecord import SessionRecord # pylint: enable=import-error @@ -328,22 +329,13 @@ self.plugin.config['DISABLED_ACCOUNTS'] = [] self.disabled_accounts = self.plugin.config['DISABLED_ACCOUNTS'] +log.debug('Disabled Accounts:') log.debug(self.disabled_accounts) -self.fpr_model = gtk.ListStore(gobject.TYPE_INT, - gobject.TYPE_STRING, - gobject.TYPE_STRING, - gobject.TYPE_STRING, - gobject.TYPE_INT) - -self.device_model = gtk.ListStore(gobject.TYPE_STRING) +self.fpr_model = self.B.get_object('fingerprint_store') +self.device_model = self.B.get_object('deviceid_store') self.fpr_view = self.B.get_object('fingerprint_view') -self.fpr_view.set_model(self.fpr_model) -self.fpr_view.get_selection().set_mode(gtk.SELECTION_MULTIPLE) - -self.device_view = self.B.get_object('deviceid_view') -self.device_view.set_model(self.device_model) self.disabled_acc_store = self.B.get_object('disabled_account_store') self.account_store = self.B.get_object('account_store') @@ -358,7 +350,6 @@ self.plugin_active = False def on_run(self): -log.debug('on_run') for plugin in gajim.plugin_manager.active_plugins: log.debug(type(plugin)) if type(plugin).__name__ == 'OmemoPlugin': @@ -380,17 +371,12 @@ return False def update_account_store(self): -log.debug('update_account_store') -# get accounts -log.debug(self.disabled_accounts) for account in
gajim-plugins: Add axolotl to demandignore
changeset da1eb841ff4b in /home/hg/repos/gajim-plugins author: lovetox <forenjun...@chello.at> branches: details:gajim-plugins?cmd=changeset;node=da1eb841ff4b description: Add axolotl to demandignore diffstat: omemo/__init__.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 210303e1d814 -r da1eb841ff4b omemo/__init__.py --- a/omemo/__init__.py Wed Sep 07 00:38:43 2016 +0200 +++ b/omemo/__init__.py Sun Sep 04 00:46:47 2016 +0200 @@ -39,7 +39,7 @@ from common import demandimport demandimport.enable() -demandimport.ignore += ['_imp', '_thread'] +demandimport.ignore += ['_imp', '_thread', 'axolotl'] IQ_CALLBACK = {} ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim-plugins: Adding _thread to demandignore
changeset d11467d237cf in /home/hg/repos/gajim-plugins author: lovetox <forenjun...@chello.at> branches: details:gajim-plugins?cmd=changeset;node=d11467d237cf description: Adding _thread to demandignore This fixes an error with the newest Setuptools version on Debian https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=835472 diffstat: omemo/__init__.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 284da03d8f08 -r d11467d237cf omemo/__init__.py --- a/omemo/__init__.py Tue Aug 30 08:22:47 2016 +0200 +++ b/omemo/__init__.py Fri Sep 02 23:02:50 2016 +0200 @@ -39,7 +39,7 @@ from common import demandimport demandimport.enable() -demandimport.ignore += ['_imp'] +demandimport.ignore += ['_imp', '_thread'] IQ_CALLBACK = {} ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim-plugins: Add version check for GroupChat
changeset fff4c0f1ea62 in /home/hg/repos/gajim-plugins author: lovetox <forenjun...@chello.at> branches: details:gajim-plugins?cmd=changeset;node=fff4c0f1ea62 description: Add version check for GroupChat diffstat: omemo/__init__.py | 23 +++ 1 files changed, 15 insertions(+), 8 deletions(-) diffs (47 lines): diff -r e3922009f433 -r fff4c0f1ea62 omemo/__init__.py --- a/omemo/__init__.py Sun Oct 09 19:10:37 2016 +0200 +++ b/omemo/__init__.py Sun Oct 09 21:06:40 2016 +0200 @@ -80,6 +80,7 @@ ERROR_MSG = 'Error: ' + str(e) GAJIM_VER = gajim.config.get('version') +GROUPCHAT = False if os.name != 'nt': try: @@ -93,6 +94,12 @@ if not SETUPTOOLS_MISSING: if pkg.parse_version(GAJIM_VER) < pkg.parse_version('0.16.5'): ERROR_MSG = GAJIM_VERSION +if pkg.parse_version(GAJIM_VER) > pkg.parse_version('0.16.5'): +GROUPCHAT = True +else: +# if GAJIM_VER < 0.16.5, the Plugin fails on missing dependencys earlier +if not GAJIM_VER == '0.16.5': +GROUPCHAT = True # pylint: disable=no-init # pylint: disable=attribute-defined-outside-init @@ -120,14 +127,14 @@ 'stanza-message-outgoing': (ged.PRECORE, self.handle_outgoing_stanza), 'message-outgoing': -(ged.PRECORE, self.handle_outgoing_event), -'gc-stanza-message-outgoing': -(ged.PRECORE, self.handle_outgoing_gc_stanza), -'gc-presence-received': -(ged.PRECORE, self.gc_presence_received), -'gc-config-changed-received': -(ged.PRECORE, self.gc_config_changed_received), -} +(ged.PRECORE, self.handle_outgoing_event)} +if GROUPCHAT: +self.events_handlers['gc-stanza-message-outgoing'] =\ +(ged.PRECORE, self.handle_outgoing_gc_stanza) +self.events_handlers['gc-presence-received'] =\ +(ged.PRECORE, self.gc_presence_received) +self.events_handlers['gc-config-changed-received'] =\ +(ged.PRECORE, self.gc_config_changed_received) self.config_dialog = ui.OMEMOConfigDialog(self) self.gui_extension_points = {'chat_control': (self.connect_ui, self.disconnect_ui), ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim-plugins: Merge branch 'omemo-0.9.5'
changeset 75ede510ed84 in /home/hg/repos/gajim-plugins author: Bahtiar `kalkin-` Gadimov <baht...@gadimov.de> branches: details:gajim-plugins?cmd=changeset;node=75ede510ed84 description: Merge branch 'omemo-0.9.5' diffstat: omemo/CHANGELOG |5 + omemo/README.md |7 + omemo/__init__.py | 373 --- omemo/config_dialog.ui | 194 - omemo/fpr_dialog.ui | 27 +- omemo/manifest.ini |2 +- omemo/omemo/liteaxolotlstore.py | 18 + omemo/omemo/liteidentitykeystore.py | 13 +- omemo/omemo/litesessionstore.py | 57 ++- omemo/omemo/state.py| 151 +++-- omemo/pkgs/PKGBUILD |6 +- omemo/ui.py | 555 +++ 12 files changed, 1074 insertions(+), 334 deletions(-) diffs (truncated from 2101 to 300 lines): diff -r 1063fb15f4da -r 75ede510ed84 omemo/CHANGELOG --- a/omemo/CHANGELOG Mon Oct 17 15:14:30 2016 +0200 +++ b/omemo/CHANGELOG Fri Oct 21 03:47:13 2016 +0200 @@ -1,3 +1,8 @@ +0.9.5 / 2016-10-10 +- Add GroupChat BETA +- Add Option to delete Fingerprints +- Add Option to deactivate Accounts for OMEMO + 0.9.0 / 2016-08-28 - Send INFO message to resources who dont support OMEMO - Check dependencys and give correct error message diff -r 1063fb15f4da -r 75ede510ed84 omemo/README.md --- a/omemo/README.md Mon Oct 17 15:14:30 2016 +0200 +++ b/omemo/README.md Fri Oct 21 03:47:13 2016 +0200 @@ -57,6 +57,13 @@ you can receive messages from fingerprints where you didnt made a trust decision, but you cant receive Messages from *not trusted* fingerprints +## Filetransfer + +For Filetransfer use the **httpupload** plugin. + +For decrypting and showing pictures in chat use the **url_image_preview** plugin. + +If you want to use these plugins together with *OMEMO* you have to install the `python-cryptography` package ## Debugging To see OMEMO related debug output start Gajim with the parameter `-l diff -r 1063fb15f4da -r 75ede510ed84 omemo/__init__.py --- a/omemo/__init__.py Mon Oct 17 15:14:30 2016 +0200 +++ b/omemo/__init__.py Fri Oct 21 03:47:13 2016 +0200 @@ -21,14 +21,15 @@ import logging import os import sqlite3 -import os +import shutil +import message_control -from common import caps_cache, gajim, ged +from common import caps_cache, gajim, ged, configpaths from common.pep import SUPPORTED_PERSONAL_USER_EVENTS from plugins import GajimPlugin from plugins.helpers import log_calls from nbxmpp.simplexml import Node -from nbxmpp import NS_CORRECT +from nbxmpp import NS_CORRECT, NS_ADDRESS from . import ui from .ui import Ui @@ -40,7 +41,7 @@ from common import demandimport demandimport.enable() -demandimport.ignore += ['_imp'] +demandimport.ignore += ['_imp', '_thread', 'axolotl'] IQ_CALLBACK = {} @@ -54,42 +55,51 @@ NS_HINTS = 'urn:xmpp:hints' NS_PGP = 'urn:xmpp:openpgp:0' -DB_DIR = gajim.gajimpaths.data_root +DB_DIR_OLD = gajim.gajimpaths.data_root +DB_DIR_NEW = configpaths.gajimpaths['MY_DATA'] log = logging.getLogger('gajim.plugin_system.omemo') try: -from .omemo.state import OmemoState -except Exception as e: -log.error(e) -ERROR_MSG = 'Error: ' + str(e) - -try: -import google.protobuf +prototest = __import__('google.protobuf') except Exception as e: log.error(e) ERROR_MSG = PROTOBUF_MISSING try: -import axolotl +axolotltest = __import__('axolotl') except Exception as e: log.error(e) ERROR_MSG = AXOLOTL_MISSING +if not ERROR_MSG: +try: +from .omemo.state import OmemoState +except Exception as e: +log.error(e) +ERROR_MSG = 'Error: ' + str(e) + GAJIM_VER = gajim.config.get('version') +GROUPCHAT = False if os.name != 'nt': try: SETUPTOOLS_MISSING = False -from pkg_resources import parse_version +pkg = __import__('pkg_resources') except Exception as e: log.error(e) SETUPTOOLS_MISSING = True ERROR_MSG = 'You are missing the Setuptools package.' if not SETUPTOOLS_MISSING: -if parse_version(GAJIM_VER) < parse_version('0.16.5'): +if pkg.parse_version(GAJIM_VER) < pkg.parse_version('0.16.5'): ERROR_MSG = GAJIM_VERSION +if pkg.parse_version(GAJIM_VER) > pkg.parse_version('0.16.5'): +GROUPCHAT = True +else: +# if GAJIM_VER < 0.16.5, the Plugin fails on missing dependencys earlier +if not GAJIM_VER == '0.16.5': +GROUPCHAT = True # pylint: disable=no-init # pylint: disable=attribute-defined-outside-init @@ -99,6 +109,8 @@ omemo_states = {} ui_list = {} +groupchat = {} +temp_groupchat = {} @log_calls('OmemoPlugin') def init(self): @@ -116,15 +128,48 @@ 'stanza-message-outgoing': (ged.PRECORE, self.handle_outgoing_stanza),
gajim-plugins: Update CHANGELOG
changeset dc5978e74a3b in /home/hg/repos/gajim-plugins author: lovetox <love...@users.noreply.github.com> branches: details:gajim-plugins?cmd=changeset;node=dc5978e74a3b description: Update CHANGELOG diffstat: omemo/CHANGELOG | 5 + 1 files changed, 5 insertions(+), 0 deletions(-) diffs (12 lines): diff -r fff4c0f1ea62 -r dc5978e74a3b omemo/CHANGELOG --- a/omemo/CHANGELOG Sun Oct 09 21:06:40 2016 +0200 +++ b/omemo/CHANGELOG Mon Oct 10 12:59:22 2016 +0200 @@ -1,3 +1,8 @@ +0.9.5 / 2016-10-10 +- Add GroupChat BETA +- Add Option to delete Fingerprints +- Add Option to deactivate Accounts for OMEMO + 0.9.0 / 2016-08-28 - Send INFO message to resources who dont support OMEMO - Check dependencys and give correct error message ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim-plugins: Add delete fingerprint button
changeset 1f50cf60b330 in /home/hg/repos/gajim-plugins author: lovetox <forenjun...@chello.at> branches: details:gajim-plugins?cmd=changeset;node=1f50cf60b330 description: Add delete fingerprint button diffstat: omemo/config_dialog.ui | 17 +++ omemo/fpr_dialog.ui |2 + omemo/omemo/liteaxolotlstore.py | 12 ++ omemo/omemo/liteidentitykeystore.py | 13 +- omemo/omemo/litesessionstore.py | 39 +++ omemo/ui.py | 198 ++- 6 files changed, 183 insertions(+), 98 deletions(-) diffs (truncated from 474 to 300 lines): diff -r da1eb841ff4b -r 1f50cf60b330 omemo/config_dialog.ui --- a/omemo/config_dialog.uiSun Sep 04 00:46:47 2016 +0200 +++ b/omemo/config_dialog.uiTue Sep 06 22:50:18 2016 +0200 @@ -24,6 +24,8 @@ + + @@ -261,6 +263,21 @@ 0 + + +Delete Fingerprint +200 +True +True +True + + + +False +False +1 + + False diff -r da1eb841ff4b -r 1f50cf60b330 omemo/fpr_dialog.ui --- a/omemo/fpr_dialog.ui Sun Sep 04 00:46:47 2016 +0200 +++ b/omemo/fpr_dialog.ui Tue Sep 06 22:50:18 2016 +0200 @@ -18,6 +18,8 @@ + + diff -r da1eb841ff4b -r 1f50cf60b330 omemo/omemo/liteaxolotlstore.py --- a/omemo/omemo/liteaxolotlstore.py Sun Sep 04 00:46:47 2016 +0200 +++ b/omemo/omemo/liteaxolotlstore.py Tue Sep 06 22:50:18 2016 +0200 @@ -83,10 +83,16 @@ def saveIdentity(self, recepientId, identityKey): self.identityKeyStore.saveIdentity(recepientId, identityKey) +def deleteIdentity(self, recipientId, identityKey): +self.identityKeyStore.deleteIdentity(recipientId, identityKey) + def isTrustedIdentity(self, recepientId, identityKey): return self.identityKeyStore.isTrustedIdentity(recepientId, identityKey) +def setTrust(self, identityKey, trust): +return self.identityKeyStore.setTrust(identityKey, trust) + def getTrustedFingerprints(self, jid): return self.identityKeyStore.getTrustedFingerprints(jid) @@ -139,6 +145,12 @@ def deleteAllSessions(self, recepientId): self.sessionStore.deleteAllSessions(recepientId) +def getSessionsFromJid(self, recipientId): +return self.sessionStore.getSessionsFromJid(recipientId) + +def getAllSessions(self): +return self.sessionStore.getAllSessions() + def loadSignedPreKey(self, signedPreKeyId): return self.signedPreKeyStore.loadSignedPreKey(signedPreKeyId) diff -r da1eb841ff4b -r 1f50cf60b330 omemo/omemo/liteidentitykeystore.py --- a/omemo/omemo/liteidentitykeystore.py Sun Sep 04 00:46:47 2016 +0200 +++ b/omemo/omemo/liteidentitykeystore.py Tue Sep 06 22:50:18 2016 +0200 @@ -86,6 +86,13 @@ return result is not None +def deleteIdentity(self, recipientId, identityKey): +q = "DELETE FROM identities WHERE recipient_id = ? AND public_key = ?" +c = self.dbConn.cursor() +c.execute(q, (recipientId, + identityKey.getPublicKey().serialize())) +self.dbConn.commit() + def isTrustedIdentity(self, recipientId, identityKey): q = "SELECT trust FROM identities WHERE recipient_id = ? " \ "AND public_key = ?" @@ -160,8 +167,8 @@ c.execute(q, fingerprints) self.dbConn.commit() -def setTrust(self, _id, trust): -q = "UPDATE identities SET trust = ? WHERE _id = ?" +def setTrust(self, identityKey, trust): +q = "UPDATE identities SET trust = ? WHERE public_key = ?" c = self.dbConn.cursor() -c.execute(q, (trust, _id)) +c.execute(q, (trust, identityKey.getPublicKey().serialize())) self.dbConn.commit() diff -r da1eb841ff4b -r 1f50cf60b330 omemo/omemo/litesessionstore.py --- a/omemo/omemo/litesessionstore.py Sun Sep 04 00:46:47 2016 +0200 +++ b/omemo/omemo/litesessionstore.py Tue Sep 06 22:50:18 2016 +0200 @@ -82,6 +82,23 @@ self.dbConn.cursor().execute(q, (recipientId, )) self.dbConn.commit() +def getAllSessions(self): +q = "SELECT _id, recipient_id, device_id, record, active from sessions" +c = self.dbConn.cursor() +result = [] +for row in c.execute(q): +result.append((row[0], row[1], row[2], row[3], row[4])) +return result + +def getSessionsFromJid(self, recipientId): +q = "SELECT _id, recipient_id, device_id, record, active from sessions" \ +
gajim-plugins: Various improvements for Groupchat
changeset 31aba74f8a17 in /home/hg/repos/gajim-plugins author: lovetox <forenjun...@chello.at> branches: details:gajim-plugins?cmd=changeset;node=31aba74f8a17 description: Various improvements for Groupchat diffstat: omemo/__init__.py| 32 +--- omemo/omemo/state.py | 10 +++--- 2 files changed, 28 insertions(+), 14 deletions(-) diffs (130 lines): diff -r ec7f95eaa552 -r 31aba74f8a17 omemo/__init__.py --- a/omemo/__init__.py Tue Oct 11 15:05:38 2016 +0200 +++ b/omemo/__init__.py Tue Oct 11 20:50:28 2016 +0200 @@ -29,7 +29,7 @@ from plugins import GajimPlugin from plugins.helpers import log_calls from nbxmpp.simplexml import Node -from nbxmpp import NS_CORRECT +from nbxmpp import NS_CORRECT, NS_ADDRESS from . import ui from .ui import Ui @@ -138,6 +138,7 @@ (ged.PRECORE, self.gc_config_changed_received) self.events_handlers['muc-admin-received'] =\ (ged.PRECORE, self.room_memberlist_received) + self.config_dialog = ui.OMEMOConfigDialog(self) self.gui_extension_points = {'chat_control': (self.connect_ui, self.disconnect_ui), @@ -367,7 +368,15 @@ from_jid = str(msg.stanza.getFrom()) if msg.mtype == 'groupchat': -from_jid = self.groupchat[msg.jid][msg.resource] +address_tag = msg.stanza.getTag('addresses', +namespace=NS_ADDRESS) +if address_tag: # History Message from MUC +from_jid = address_tag.getTag( +'address', attrs={'type': 'ofrom'}).getAttr('jid') +else: +from_jid = self.groupchat[msg.jid][msg.resource] + +log.debug('GroupChat Message from: %s', from_jid) self.print_msg_to_log(msg.stanza) msg_dict = unpack_encrypted(msg.stanza.getTag @@ -394,10 +403,11 @@ # gets dropped from history msg.stanza.setBody(plaintext) -contact_jid = gajim.get_jid_without_resource(from_jid) -if account in self.ui_list and \ -contact_jid in self.ui_list[account]: -self.ui_list[account][contact_jid].activate_omemo() +if msg.mtype != 'groupchat': +contact_jid = gajim.get_jid_without_resource(from_jid) +if account in self.ui_list and \ +contact_jid in self.ui_list[account]: +self.ui_list[account][contact_jid].activate_omemo() return False elif msg.stanza.getTag('body'): @@ -490,8 +500,7 @@ if room not in self.groupchat: self.groupchat[room] = self.temp_groupchat[room] -log.debug('PRESENCE RECEIVED') -log.debug(room) +log.debug('OMEMO capable Room found: %s', room) gajim.connections[account].get_affiliation_list(room, 'owner') gajim.connections[account].get_affiliation_list(room, 'admin') @@ -499,7 +508,6 @@ self.ui_list[account][room].sensitive(True) - @log_calls('OmemoPlugin') def gc_config_changed_received(self, event): account = event.conn.name @@ -540,9 +548,11 @@ if event.msg_iq.getTag('replace', namespace=NS_CORRECT): event.msg_iq.delChild('encrypted', attrs={'xmlns': NS_OMEMO}) -plaintext = event.msg_iq.getBody().encode('utf8') +plaintext = event.msg_iq.getBody() msg_dict = state.create_gc_msg( -gajim.get_jid_from_account(account), to_jid, plaintext) +gajim.get_jid_from_account(account), +to_jid, +plaintext.encode('utf8')) if not msg_dict: return True diff -r ec7f95eaa552 -r 31aba74f8a17 omemo/omemo/state.py --- a/omemo/omemo/state.py Tue Oct 11 15:05:38 2016 +0200 +++ b/omemo/omemo/state.py Tue Oct 11 20:50:28 2016 +0200 @@ -271,6 +271,7 @@ iv = get_random_bytes(16) encrypted_keys = {} room = jid +encrypted_jids = [] devices_list = self.device_list_for(jid, True) @@ -286,6 +287,8 @@ jid_to = self.plugin.groupchat[room][nick] if jid_to == self.own_jid: continue +if jid_to in encrypted_jids: # We already encrypted to this JID +continue for rid, cipher in self.session_ciphers[jid_to].items(): try: if self.isTrusted(jid_to, rid) == TRUSTED: @@ -298,7 +301,7 @@ log.exception('ERROR:') log.warning('Failed to find key for device ' + str(rid)) - +encrypted_jids.append(jid_to) if len(encrypted_keys) == 0: log_msg = 'Encrypted keys
gajim-plugins: Option to disable accounts for OMEMO
changeset 6b094611322a in /home/hg/repos/gajim-plugins author: lovetox <forenjun...@chello.at> branches: details:gajim-plugins?cmd=changeset;node=6b094611322a description: Option to disable accounts for OMEMO diffstat: omemo/__init__.py | 78 ++--- omemo/config_dialog.ui | 146 +++- omemo/ui.py| 111 +++- 3 files changed, 293 insertions(+), 42 deletions(-) diffs (truncated from 526 to 300 lines): diff -r d0fcde466a48 -r 6b094611322a omemo/__init__.py --- a/omemo/__init__.py Sun Sep 18 18:13:01 2016 +0200 +++ b/omemo/__init__.py Mon Sep 19 20:08:04 2016 +0200 @@ -127,6 +127,12 @@ self.plugin = self self.announced = [] self.query_for_bundles = [] +self.disabled_accounts = [] + +self.config_default_values = {'DISABLED_ACCOUNTS': ([], ''), } + +for account in self.plugin.config['DISABLED_ACCOUNTS']: +self.disabled_accounts.append(account) def migrate_dbpath(self, account, my_jid): old_dbpath = os.path.join(DB_DIR_OLD, 'omemo_' + account + '.db') @@ -157,6 +163,8 @@ --- OmemoState """ +if account in self.disabled_accounts: +return if account not in self.omemo_states: self.deactivate_gajim_e2e(account) my_jid = gajim.get_jid_from_account(account) @@ -186,6 +194,8 @@ event : SignedInEvent """ account = event.conn.name +if account in self.disabled_accounts: +return log.debug(account + ' => Announce Support after Sign In') self.query_for_bundles = [] @@ -199,11 +209,15 @@ """ Method called when the Plugin is activated in the PluginManager """ self.query_for_bundles = [] -if NS_NOTIFY not in gajim.gajim_common_features: -gajim.gajim_common_features.append(NS_NOTIFY) -self._compute_caps_hash() -# Publish bundle information +# Publish bundle information and Entity Caps for account in gajim.connections: +if account in self.disabled_accounts: +log.debug(account + + ' => Account is disabled') +continue +if NS_NOTIFY not in gajim.gajim_optional_features[account]: +gajim.gajim_optional_features[account].append(NS_NOTIFY) +self._compute_caps_hash(account) if account not in self.announced: if gajim.account_is_connected(account): log.debug(account + @@ -218,23 +232,25 @@ Removes OMEMO from the Entity Capabilities list """ -if NS_NOTIFY in gajim.gajim_common_features: -gajim.gajim_common_features.remove(NS_NOTIFY) -self._compute_caps_hash() +for account in gajim.connections: +if account in self.disabled_accounts: +continue +if NS_NOTIFY in gajim.gajim_optional_features[account]: +gajim.gajim_optional_features[account].remove(NS_NOTIFY) +self._compute_caps_hash(account) @staticmethod -def _compute_caps_hash(): +def _compute_caps_hash(account): """ Computes the hash for Entity Capabilities and publishes it """ -for acc in gajim.connections: -gajim.caps_hash[acc] = caps_cache.compute_caps_hash( -[gajim.gajim_identity], -gajim.gajim_common_features + -gajim.gajim_optional_features[acc]) -# re-send presence with new hash -connected = gajim.connections[acc].connected -if connected > 1 and gajim.SHOW_LIST[connected] != 'invisible': -gajim.connections[acc].change_status( -gajim.SHOW_LIST[connected], gajim.connections[acc].status) +gajim.caps_hash[account] = caps_cache.compute_caps_hash( +[gajim.gajim_identity], +gajim.gajim_common_features + +gajim.gajim_optional_features[account]) +# re-send presence with new hash +connected = gajim.connections[account].connected +if connected > 1 and gajim.SHOW_LIST[connected] != 'invisible': +gajim.connections[account].change_status( +gajim.SHOW_LIST[connected], gajim.connections[account].status) @log_calls('OmemoPlugin') def mam_message_received(self, msg): @@ -251,12 +267,15 @@ --- Return means that the Event is passed on to Gajim """ +account = msg.conn.name +if account in self.disabled_accounts: +return + if msg.msg_.getTag('openpgp', namespace=NS_PGP): retu
gajim-plugins: Improvements for getting Memberlist in GroupChat
changeset ec7f95eaa552 in /home/hg/repos/gajim-plugins author: lovetox <forenjun...@chello.at> branches: details:gajim-plugins?cmd=changeset;node=ec7f95eaa552 description: Improvements for getting Memberlist in GroupChat diffstat: omemo/__init__.py | 87 +- 1 files changed, 78 insertions(+), 9 deletions(-) diffs (139 lines): diff -r 708c7c7193eb -r ec7f95eaa552 omemo/__init__.py --- a/omemo/__init__.py Mon Oct 10 12:59:50 2016 +0200 +++ b/omemo/__init__.py Tue Oct 11 15:05:38 2016 +0200 @@ -110,6 +110,7 @@ omemo_states = {} ui_list = {} groupchat = {} +temp_groupchat = {} @log_calls('OmemoPlugin') def init(self): @@ -135,6 +136,8 @@ (ged.PRECORE, self.gc_presence_received) self.events_handlers['gc-config-changed-received'] =\ (ged.PRECORE, self.gc_config_changed_received) +self.events_handlers['muc-admin-received'] =\ +(ged.PRECORE, self.room_memberlist_received) self.config_dialog = ui.OMEMOConfigDialog(self) self.gui_extension_points = {'chat_control': (self.connect_ui, self.disconnect_ui), @@ -417,29 +420,91 @@ log.debug('No Ui present for ' + jid + ', Ui Warning not shown') +def room_memberlist_received(self, event): +account = event.conn.name +if account in self.disabled_accounts: +return +log.debug('Room %s Memberlist received: %s', + event.fjid, event.users_dict) +room = event.fjid + +def jid_known(jid): +for nick in self.groupchat[room]: +if self.groupchat[room][nick] == jid: +return True +return False + +for jid in event.users_dict: +if not jid_known(jid): +# Add JID with JID because we have no Nick yet +self.groupchat[room][jid] = jid +log.debug('JID Added: ' + jid) + @log_calls('OmemoPlugin') def gc_presence_received(self, event): -if not event.real_jid: +account = event.conn.name +if account in self.disabled_accounts: return +if not hasattr(event, 'real_jid') or not event.real_jid: +return + room = event.room_jid -account = event.conn.name jid = gajim.get_jid_without_resource(event.real_jid) nick = event.nick +if '303' in event.status_code: # Nick Changed +if room in self.groupchat: +if nick in self.groupchat[room]: +del self.groupchat[room][nick] +self.groupchat[room][event.new_nick] = jid +log.debug('Nick Change: old: %s, new: %s, jid: %s ', + nick, event.new_nick, jid) +log.debug('Members after Change: %s', self.groupchat[room]) +else: +if nick in self.temp_groupchat[room]: +del self.temp_groupchat[room][nick] +self.temp_groupchat[room][event.new_nick] = jid + +return + if room not in self.groupchat: -self.groupchat[room] = {} -if nick not in self.groupchat[room]: -self.groupchat[room][nick] = jid +if room not in self.temp_groupchat: +self.temp_groupchat[room] = {} -log.debug('PRESENCE RECEIVED') -log.debug(self.groupchat[room]) +if nick not in self.temp_groupchat[room]: +self.temp_groupchat[room][nick] = jid -if '100' in event.status_code: +else: +# Check if we received JID over Memberlist +if jid in self.groupchat[room]: +del self.groupchat[room][jid] + +# Add JID with Nick +if nick not in self.groupchat[room]: +self.groupchat[room][nick] = jid +log.debug('JID Added: ' + jid) + +if '100' in event.status_code: # non-anonymous Room (Full JID) + +if room not in self.groupchat: +self.groupchat[room] = self.temp_groupchat[room] + +log.debug('PRESENCE RECEIVED') +log.debug(room) + +gajim.connections[account].get_affiliation_list(room, 'owner') +gajim.connections[account].get_affiliation_list(room, 'admin') +gajim.connections[account].get_affiliation_list(room, 'member') + self.ui_list[account][room].sensitive(True) + @log_calls('OmemoPlugin') def gc_config_changed_received(self, event): +account = event.conn.name +if account in self.disabled_accounts: +return log.debug('CONFIG CHANGE') log.debug(event.room_jid) log.debug(event.status_code) @@ -458,13 +523,17 @@ Return if encr
gajim-plugins: Further improve import error handling
changeset 658a55b36ce5 in /home/hg/repos/gajim-plugins author: lovetox <forenjun...@chello.at> branches: details:gajim-plugins?cmd=changeset;node=658a55b36ce5 description: Further improve import error handling diffstat: omemo/__init__.py | 21 +++-- 1 files changed, 11 insertions(+), 10 deletions(-) diffs (51 lines): diff -r 866cf8a00b63 -r 658a55b36ce5 omemo/__init__.py --- a/omemo/__init__.py Wed Sep 07 00:22:20 2016 +0200 +++ b/omemo/__init__.py Wed Sep 14 22:43:10 2016 +0200 @@ -58,36 +58,37 @@ log = logging.getLogger('gajim.plugin_system.omemo') try: -from .omemo.state import OmemoState -except Exception as e: -log.error(e) -ERROR_MSG = 'Error: ' + str(e) - -try: -import google.protobuf +prototest = __import__('google.protobuf') except Exception as e: log.error(e) ERROR_MSG = PROTOBUF_MISSING try: -import axolotl +axolotltest = __import__('axolotl') except Exception as e: log.error(e) ERROR_MSG = AXOLOTL_MISSING +if not ERROR_MSG: +try: +from .omemo.state import OmemoState +except Exception as e: +log.error(e) +ERROR_MSG = 'Error: ' + str(e) + GAJIM_VER = gajim.config.get('version') if os.name != 'nt': try: SETUPTOOLS_MISSING = False -from pkg_resources import parse_version +pkg = __import__('pkg_resources') except Exception as e: log.error(e) SETUPTOOLS_MISSING = True ERROR_MSG = 'You are missing the Setuptools package.' if not SETUPTOOLS_MISSING: -if parse_version(GAJIM_VER) < parse_version('0.16.5'): +if pkg.parse_version(GAJIM_VER) < pkg.parse_version('0.16.5'): ERROR_MSG = GAJIM_VERSION # pylint: disable=no-init ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim-plugins: Update README.md
changeset 210303e1d814 in /home/hg/repos/gajim-plugins author: lovetox <love...@users.noreply.github.com> branches: details:gajim-plugins?cmd=changeset;node=210303e1d814 description: Update README.md diffstat: omemo/README.md | 7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diffs (17 lines): diff -r d11467d237cf -r 210303e1d814 omemo/README.md --- a/omemo/README.md Fri Sep 02 23:02:50 2016 +0200 +++ b/omemo/README.md Wed Sep 07 00:38:43 2016 +0200 @@ -57,6 +57,13 @@ you can receive messages from fingerprints where you didnt made a trust decision, but you cant receive Messages from *not trusted* fingerprints +## Filetransfer + +For Filetransfer use the **httpupload** plugin. + +For decrypting and showing pictures in chat use the **url_image_preview** plugin. + +If you want to use these plugins together with *OMEMO* you have to install the `python-cryptography` package ## Debugging To see OMEMO related debug output start Gajim with the parameter `-l ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim-plugins: Migrate DB name to jid instead of account name
changeset 94f78e560b6b in /home/hg/repos/gajim-plugins author: lovetox <forenjun...@chello.at> branches: details:gajim-plugins?cmd=changeset;node=94f78e560b6b description: Migrate DB name to jid instead of account name JID is a more permanent identifier, because the account name can be changed in Gajim. The DB path is now in a profile DIR diffstat: omemo/__init__.py | 28 ++-- 1 files changed, 22 insertions(+), 6 deletions(-) diffs (61 lines): diff -r 658a55b36ce5 -r 94f78e560b6b omemo/__init__.py --- a/omemo/__init__.py Wed Sep 14 22:43:10 2016 +0200 +++ b/omemo/__init__.py Sun Sep 18 01:59:27 2016 +0200 @@ -21,8 +21,9 @@ import logging import os import sqlite3 +import shutil -from common import caps_cache, gajim, ged +from common import caps_cache, gajim, ged, configpaths from common.pep import SUPPORTED_PERSONAL_USER_EVENTS from plugins import GajimPlugin from plugins.helpers import log_calls @@ -53,7 +54,8 @@ NS_HINTS = 'urn:xmpp:hints' NS_PGP = 'urn:xmpp:openpgp:0' -DB_DIR = gajim.gajimpaths.data_root +DB_DIR_OLD = gajim.gajimpaths.data_root +DB_DIR_NEW = configpaths.gajimpaths['MY_DATA'] log = logging.getLogger('gajim.plugin_system.omemo') @@ -126,6 +128,21 @@ self.announced = [] self.query_for_bundles = [] +def migrate_dbpath(self, account, my_jid): +old_dbpath = os.path.join(DB_DIR_OLD, 'omemo_' + account + '.db') +new_dbpath = os.path.join(DB_DIR_NEW, 'omemo_' + my_jid + '.db') + +if os.path.exists(old_dbpath): +log.debug('Migrating DBName and Path ..') +try: +shutil.move(old_dbpath, new_dbpath) +return new_dbpath +except Exception: +log.exception('Migration Error:') +return old_dbpath + +return new_dbpath + @log_calls('OmemoPlugin') def get_omemo_state(self, account): """ Returns the the OmemoState for the specified account. @@ -142,11 +159,10 @@ """ if account not in self.omemo_states: self.deactivate_gajim_e2e(account) -db_path = os.path.join(DB_DIR, 'omemo_' + account + '.db') +my_jid = gajim.get_jid_from_account(account) +db_path = self.migrate_dbpath(account, my_jid) + conn = sqlite3.connect(db_path, check_same_thread=False) - -my_jid = gajim.get_jid_from_account(account) - self.omemo_states[account] = OmemoState(my_jid, conn, account, self.plugin) ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim-plugins: Show config dialog if there are no accounts
changeset d0fcde466a48 in /home/hg/repos/gajim-plugins author: lovetox <forenjun...@chello.at> branches: details:gajim-plugins?cmd=changeset;node=d0fcde466a48 description: Show config dialog if there are no accounts Fixes:#118 diffstat: omemo/ui.py | 50 ++ 1 files changed, 38 insertions(+), 12 deletions(-) diffs (96 lines): diff -r 94f78e560b6b -r d0fcde466a48 omemo/ui.py --- a/omemo/ui.py Sun Sep 18 01:59:27 2016 +0200 +++ b/omemo/ui.py Sun Sep 18 18:13:01 2016 +0200 @@ -266,11 +266,6 @@ self.device_model = gtk.ListStore(gobject.TYPE_STRING) -self.account_store = self.B.get_object('account_store') - -for account in sorted(gajim.contacts.get_accounts()): -self.account_store.append(row=(account,)) - self.fpr_view = self.B.get_object('fingerprint_view') self.fpr_view.set_model(self.fpr_model) self.fpr_view.get_selection().set_mode(gtk.SELECTION_MULTIPLE) @@ -278,19 +273,38 @@ self.device_view = self.B.get_object('deviceid_view') self.device_view.set_model(self.device_model) -if len(self.account_store) > 0: -self.B.get_object('account_combobox').set_active(0) - self.child.pack_start(self.B.get_object('notebook1')) self.B.connect_signals(self) def on_run(self): -self.update_context_list() -self.account_combobox_changed_cb(self.B.get_object('account_combobox')) +self.update_account_combobox() +self.clear_all() +if len(self.account_store) > 0: +self.account_combobox_changed_cb( +self.B.get_object('account_combobox')) + +def clear_all(self): +self.fpr_model.clear() +self.device_model.clear() +self.B.get_object('ID').set_markup('') +self.B.get_object('fingerprint_label').set_markup('') +self.B.get_object('trust_button').set_sensitive(False) +self.B.get_object('delfprbutton').set_sensitive(False) +self.B.get_object('refresh').set_sensitive(False) +self.B.get_object('cleardevice_button').set_sensitive(False) + +def update_account_combobox(self): +self.account_store = self.B.get_object('account_store') +self.account_store.clear() +for account in sorted(gajim.contacts.get_accounts()): +self.account_store.append(row=(account,)) +if len(self.account_store) > 0: +self.B.get_object('account_combobox').set_active(0) def account_combobox_changed_cb(self, box, *args): -self.update_context_list() +if len(self.account_store) > 0: +self.update_context_list() def delfpr_button_clicked(self, button, *args): active = self.B.get_object('account_combobox').get_active() @@ -429,8 +443,18 @@ self.device_model.clear() active = self.B.get_object('account_combobox').get_active() account = self.account_store[active][0] + +# Set buttons active +self.B.get_object('trust_button').set_sensitive(True) +self.B.get_object('delfprbutton').set_sensitive(True) +self.B.get_object('refresh').set_sensitive(True) +if account == 'Local': +self.B.get_object('cleardevice_button').set_sensitive(False) +else: +self.B.get_object('cleardevice_button').set_sensitive(True) + +# Set FPR Label and DeviceID state = self.plugin.get_omemo_state(account) - deviceid = state.own_device_id self.B.get_object('ID').set_markup('%s' % deviceid) @@ -440,6 +464,7 @@ self.B.get_object('fingerprint_label').set_markup('%s' % ownfpr) +# Set Fingerprint List trust_str = {0: 'False', 1: 'True', 2: 'Undecided'} session_db = state.store.getAllSessions() @@ -468,6 +493,7 @@ format(color[trust], fpr), deviceid)) +# Set Device ID List for item in state.own_devices: self.device_model.append([item]) ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim-plugins: Refactor create message process
changeset 866cf8a00b63 in /home/hg/repos/gajim-plugins author: lovetox <forenjun...@chello.at> branches: details:gajim-plugins?cmd=changeset;node=866cf8a00b63 description: Refactor create message process diffstat: omemo/omemo/state.py | 53 --- 1 files changed, 21 insertions(+), 32 deletions(-) diffs (100 lines): diff -r 1f50cf60b330 -r 866cf8a00b63 omemo/omemo/state.py --- a/omemo/omemo/state.py Tue Sep 06 22:50:18 2016 +0200 +++ b/omemo/omemo/state.py Wed Sep 07 00:22:20 2016 +0200 @@ -201,7 +201,7 @@ except (NoSessionException, InvalidMessageException) as e: log.warning('No Session found ' + e.message) log.warning('sender_jid => ' + str(sender_jid) + ' sid =>' + - str(sid)) +str(sid)) return except (DuplicateMessageException) as e: log.warning('Duplicate message found ' + str(e.args)) @@ -226,41 +226,34 @@ log.error('No known devices') return -for dev in devices_list: -self.get_session_cipher(jid, dev) -session_ciphers = self.session_ciphers[jid] -if not session_ciphers: -log.warning('No session ciphers for ' + jid) -return - # Encrypt the message key with for each of receivers devices -for rid, cipher in session_ciphers.items(): +for device in devices_list: try: -if self.isTrusted(cipher) == TRUSTED: -encrypted_keys[rid] = cipher.encrypt(key).serialize() +if self.isTrusted(jid, device) == TRUSTED: +cipher = self.get_session_cipher(jid, device) +encrypted_keys[device] = cipher.encrypt(key).serialize() else: log.debug('Skipped Device because Trust is: ' + - str(self.isTrusted(cipher))) + str(self.isTrusted(jid, device))) except: -log.warning('Failed to find key for device ' + str(rid)) +log.warning('Failed to find key for device ' + str(device)) if len(encrypted_keys) == 0: -log_msg = 'Encrypted keys empty' -log.error(log_msg) -raise NoValidSessions(log_msg) +log.error('Encrypted keys empty') +raise NoValidSessions('Encrypted keys empty') my_other_devices = set(self.own_devices) - set({self.own_device_id}) # Encrypt the message key with for each of our own devices -for dev in my_other_devices: +for device in my_other_devices: try: -cipher = self.get_session_cipher(from_jid, dev) -if self.isTrusted(cipher) == TRUSTED: -encrypted_keys[dev] = cipher.encrypt(key).serialize() +if self.isTrusted(from_jid, device) == TRUSTED: +cipher = self.get_session_cipher(from_jid, device) +encrypted_keys[device] = cipher.encrypt(key).serialize() else: log.debug('Skipped own Device because Trust is: ' + - str(self.isTrusted(cipher))) + str(self.isTrusted(from_jid, device))) except: -log.warning('Failed to find key for device ' + str(dev)) +log.warning('Failed to find key for device ' + str(device)) payload = encrypt(key, iv, plaintext) @@ -273,14 +266,10 @@ log.debug('Finished encrypting message') return result -def isTrusted(self, cipher): -self.cipher = cipher -self.state = self.cipher.sessionStore. \ -loadSession(self.cipher.recipientId, self.cipher.deviceId). \ -getSessionState() -self.key = self.state.getRemoteIdentityKey() -return self.store.identityKeyStore. \ -isTrustedIdentity(self.cipher.recipientId, self.key) +def isTrusted(self, recipient_id, device_id): +record = self.store.loadSession(recipient_id, device_id) +identity_key = record.getSessionState().getRemoteIdentityKey() +return self.store.isTrustedIdentity(recipient_id, identity_key) def getTrustedFingerprints(self, recipient_id): inactive = self.store.getInactiveSessionsKeys(recipient_id) @@ -364,10 +353,10 @@ def handleWhisperMessage(self, recipient_id, device_id, key): whisperMessage = WhisperMessage(serialized=key) -sessionCipher = self.get_session_cipher(recipient_id, device_id) log.debug(self.account + " => Received WhisperMessage from " + recipient_id) -if self.isTrusted(sessionCipher) >= TRUSTED: +if self.isTrusted(recipient_id, device_id): +sessionCipher = self.get
gajim-plugins: Add msg decryption from sid in GC as last resort
changeset 0d4a1370cfda in /home/hg/repos/gajim-plugins author: lovetox <forenjun...@chello.at> branches: details:gajim-plugins?cmd=changeset;node=0d4a1370cfda description: Add msg decryption from sid in GC as last resort diffstat: omemo/__init__.py | 26 +++--- omemo/omemo/liteaxolotlstore.py | 3 +++ omemo/omemo/litesessionstore.py | 8 3 files changed, 30 insertions(+), 7 deletions(-) diffs (83 lines): diff -r 4a5f4cca0e4d -r 0d4a1370cfda omemo/__init__.py --- a/omemo/__init__.py Mon Oct 17 21:19:01 2016 +0200 +++ b/omemo/__init__.py Tue Oct 18 17:35:46 2016 +0200 @@ -367,6 +367,10 @@ else: from_jid = str(msg.stanza.getFrom()) +self.print_msg_to_log(msg.stanza) +msg_dict = unpack_encrypted(msg.stanza.getTag +('encrypted', namespace=NS_OMEMO)) + if msg.mtype == 'groupchat': address_tag = msg.stanza.getTag('addresses', namespace=NS_ADDRESS) @@ -374,22 +378,30 @@ from_jid = address_tag.getTag( 'address', attrs={'type': 'ofrom'}).getAttr('jid') else: -from_jid = self.groupchat[msg.jid][msg.resource] +try: +from_jid = self.groupchat[msg.jid][msg.resource] +except KeyError: +log.debug('Groupchat: Last resort trying to ' + 'find SID in DB') +from_jid = state.store. \ +getJidFromDevice(msg_dict['sid']) +if not from_jid: +log.error(account + + ' => Cant decrypt GroupChat Message ' + 'from ' + msg.resource) +return True +self.groupchat[msg.jid][msg.resource] = from_jid log.debug('GroupChat Message from: %s', from_jid) -self.print_msg_to_log(msg.stanza) -msg_dict = unpack_encrypted(msg.stanza.getTag -('encrypted', namespace=NS_OMEMO)) - plaintext = '' if msg_dict['sid'] == state.own_device_id: if msg_dict['payload'] in self.gc_message: plaintext = self.gc_message[msg_dict['payload']] del self.gc_message[msg_dict['payload']] else: -log.error(account + ' => Cant decrypt GroupChat Message ' - 'from ' + from_jid) +log.error(account + ' => Cant decrypt own GroupChat ' + 'Message') else: msg_dict['sender_jid'] = gajim. \ get_jid_without_resource(from_jid) diff -r 4a5f4cca0e4d -r 0d4a1370cfda omemo/omemo/liteaxolotlstore.py --- a/omemo/omemo/liteaxolotlstore.py Mon Oct 17 21:19:01 2016 +0200 +++ b/omemo/omemo/liteaxolotlstore.py Tue Oct 18 17:35:46 2016 +0200 @@ -133,6 +133,9 @@ # TODO Reuse this return self.sessionStore.getSubDeviceSessions(recepientId) +def getJidFromDevice(self, device_id): +return self.sessionStore.getJidFromDevice(device_id) + def storeSession(self, recepientId, deviceId, sessionRecord): self.sessionStore.storeSession(recepientId, deviceId, sessionRecord) diff -r 4a5f4cca0e4d -r 0d4a1370cfda omemo/omemo/litesessionstore.py --- a/omemo/omemo/litesessionstore.py Mon Oct 17 21:19:01 2016 +0200 +++ b/omemo/omemo/litesessionstore.py Tue Oct 18 17:35:46 2016 +0200 @@ -48,6 +48,14 @@ deviceIds = [r[0] for r in result] return deviceIds +def getJidFromDevice(self, device_id): +q = "SELECT recipient_id from sessions WHERE device_id = ?" +c = self.dbConn.cursor() +c.execute(q, (device_id, )) +result = c.fetchone() + +return result[0] + def getActiveDeviceTuples(self): q = "SELECT recipient_id, device_id FROM sessions WHERE active = 1" c = self.dbConn.cursor() ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim-plugins: Add restart note for disabling accounts
changeset 0511dab4b3e0 in /home/hg/repos/gajim-plugins author: lovetox <forenjun...@chello.at> branches: details:gajim-plugins?cmd=changeset;node=0511dab4b3e0 description: Add restart note for disabling accounts diffstat: omemo/config_dialog.ui | 166 1 files changed, 97 insertions(+), 69 deletions(-) diffs (214 lines): diff -r cea2e7b54062 -r 0511dab4b3e0 omemo/config_dialog.ui --- a/omemo/config_dialog.uiSun Oct 09 02:20:56 2016 +0200 +++ b/omemo/config_dialog.uiSun Oct 09 02:22:08 2016 +0200 @@ -422,39 +422,81 @@ - + True False -12 -5 - + +30 True False +You have to restart Gajim for changes to take effect ! + + + + + + +False +True +0 + + + + +True +False +12 +5 - + True -True -automatic -automatic +False - + True True -account_store +automatic +automatic - -Active Accounts -0.5 + +True +True +account_store - - -0 - + +Active Accounts +0.5 + + + +0 + + + + +True +True +0 + + + + +Disable Account +True +True +True + + + +False +False +1 + @@ -464,73 +506,59 @@ - -Disable Account + True -True -True - - - -False -False -1 - - - - -True -True -0 - - - - -True -False - - -True -True -automatic -automatic +False - + True True -disabled_account_store +automatic +automatic - -Disabled Accounts -0.5 + +True +True +disabled_account_store - - -0 - + +Disabled Accounts +0.5 + + + +0 + + + + +True +True +0 + + + + +Activate Account +True +True +True + + + +False +False +1 + True True -
gajim-plugins: Remove duplicated os import
changeset 1c3b1fee843c in /home/hg/repos/gajim-plugins author: lovetox <forenjun...@chello.at> branches: details:gajim-plugins?cmd=changeset;node=1c3b1fee843c description: Remove duplicated os import diffstat: omemo/__init__.py | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diffs (11 lines): diff -r 1063fb15f4da -r 1c3b1fee843c omemo/__init__.py --- a/omemo/__init__.py Mon Oct 17 15:14:30 2016 +0200 +++ b/omemo/__init__.py Sun Aug 28 09:30:18 2016 +0200 @@ -21,7 +21,6 @@ import logging import os import sqlite3 -import os from common import caps_cache, gajim, ged from common.pep import SUPPORTED_PERSONAL_USER_EVENTS ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Add no-store hint to ChatStates
changeset da49257cc3ce in /home/hg/repos/gajim author: lovetox <forenjun...@chelo.at> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=da49257cc3ce description: Add no-store hint to ChatStates diffstat: src/common/connection.py | 17 + 1 files changed, 13 insertions(+), 4 deletions(-) diffs (39 lines): diff -r 74824f0bd5d4 -r da49257cc3ce src/common/connection.py --- a/src/common/connection.py Mon Oct 17 02:44:58 2016 +0200 +++ b/src/common/connection.py Tue Oct 18 16:26:03 2016 +0200 @@ -481,6 +481,12 @@ # tag is the active event if chatstate and contact and contact.supports(nbxmpp.NS_CHATSTATES): msg_iq.setTag(chatstate, namespace=nbxmpp.NS_CHATSTATES) +only_chatste = False +if not msgtxt: +only_chatste = True +if only_chatste and not session.enable_encryption: +msg_iq.setTag('no-store', + namespace=nbxmpp.NS_MSG_HINTS) # XEP-0184 if msgtxt and gajim.config.get_per('accounts', self.name, @@ -504,15 +510,18 @@ msg_iq = session.encrypt_stanza(msg_iq) if self.carbons_enabled: msg_iq.addChild(name='private', -namespace=nbxmpp.NS_CARBONS) +namespace=nbxmpp.NS_CARBONS) msg_iq.addChild(name='no-permanent-store', -namespace=nbxmpp.NS_MSG_HINTS) +namespace=nbxmpp.NS_MSG_HINTS) msg_iq.addChild(name='no-copy', -namespace=nbxmpp.NS_MSG_HINTS) +namespace=nbxmpp.NS_MSG_HINTS) +if only_chatste: +msg_iq.addChild(name='no-store', +namespace=nbxmpp.NS_MSG_HINTS) if callback: callback(jid, msg, keyID, forward_from, session, original_message, -subject, type_, msg_iq, xhtml) + subject, type_, msg_iq, xhtml) def log_message(self, jid, msg, forward_from, session, original_message, subject, type_, xhtml=None, additional_data={}): ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim-plugins: Use correct timeformat and rewrite show/hide code...
changeset 1063fb15f4da in /home/hg/repos/gajim-plugins author: lovetox <forenjun...@chelo.at> branches: details:gajim-plugins?cmd=changeset;node=1063fb15f4da description: Use correct timeformat and rewrite show/hide code - Fixes #8447 diffstat: appindicator_integration/manifest.ini | 2 +- appindicator_integration/plugin.py| 54 +- 2 files changed, 34 insertions(+), 22 deletions(-) diffs (124 lines): diff -r c7c2e519ed63 -r 1063fb15f4da appindicator_integration/manifest.ini --- a/appindicator_integration/manifest.ini Sun Oct 09 00:45:45 2016 +0200 +++ b/appindicator_integration/manifest.ini Mon Oct 17 15:14:30 2016 +0200 @@ -1,7 +1,7 @@ [info] name: Appindicator integration short_name: appindicator_integration -version: 0.1.5 +version: 0.1.6 description: This plugin integrates Gajim with the appindicator. You must have python-appindicator (and Gajim obviously) installed to enable this plugin. Rewriten from Ubuntu Ayatana Integration plugin homepage: http://trac-plugins.gajim.org/wiki/AppindicatorSupportPlugin diff -r c7c2e519ed63 -r 1063fb15f4da appindicator_integration/plugin.py --- a/appindicator_integration/plugin.pySun Oct 09 00:45:45 2016 +0200 +++ b/appindicator_integration/plugin.pyMon Oct 17 15:14:30 2016 +0200 @@ -10,13 +10,16 @@ import os import time import gobject -#GTK +# GTK import gtkgui_helpers import gtk +ERRORMSG = '' try: import appindicator except: -appindicator = None +ERRORMSG = 'python-appindicator is missing!Please install it.' +if os.name == 'nt': +ERRORMSG = 'This is a Plugin for Linux' # Gajim from common import gajim, ged from plugins import GajimPlugin @@ -28,16 +31,15 @@ @log_calls("AppindicatorIntegrationPlugin") def init(self): -self.config_dialog = None -self.test_activatable() -self.events_handlers = {'our-show': (ged.GUI2, self.set_indicator_icon)} - - -def test_activatable(self): -self.available_text = '' -if not appindicator: +if ERRORMSG: self.activatable = False -self.available_text += _(' Error: python-appindicator is missing!Please install it.') +self.available_text += _(ERRORMSG) +return +else: +self.config_dialog = None +self.events_handlers = {'our-show': (ged.GUI2, + self.set_indicator_icon)} +self.windowstate = None @log_calls("AppindicatorIntegrationPlugin") def activate(self): @@ -85,18 +87,28 @@ gajim.events.event_added_subscribe(self.on_event_added) gajim.events.event_removed_subscribe(self.on_event_removed) +self.roster = gajim.interface.roster.window +self.handlerid = self.roster.connect('window-state-event', + self.window_state_event_cb) + def connect(self, widget, data=None): for account in gajim.connections: if gajim.config.get_per('accounts', account, -'sync_with_global_status'): -gajim.connections[account].change_status('online','online') +'sync_with_global_status'): +gajim.connections[account].change_status('online', + 'online') +def window_state_event_cb(self, win, event): +if event.new_window_state & gtk.gdk.WINDOW_STATE_ICONIFIED: +self.windowstate = 'iconified' +elif event.new_window_state & gtk.gdk.WINDOW_STATE_WITHDRAWN: +self.windowstate = 'hidden' def set_indicator_icon(self, obj=''): is_connected = 0 for account in gajim.connections: if not gajim.config.get_per('accounts', account, -'sync_with_global_status'): +'sync_with_global_status'): continue if gajim.account_is_connected(account): is_connected = 1 @@ -119,17 +131,17 @@ self.indicator.set_status(appindicator.STATUS_PASSIVE) del self.indicator +self.roster.disconnect(self.handlerid) + def roster_raise(self, widget, data=None): win = gajim.interface.roster.window -if win.is_active(): +if win.get_property("visible") and self.windowstate != 'iconified': gobject.idle_add(win.hide) else: win.present() -# preserve the 'steal focus preservation' -#if self._is_first(): -#win.window.focus(gtk.get_current_event_time()) -#else: -win.window.focus(long(time.time())) +self.windowstate = 'shown' + +win.window.focus(gtk.get_current_event_time()) def on_exit_menuitem_activate(self, widget, data=None): gajim.interface.roster.on_quit_request()
gajim: Fix alignment in Account Window
changeset 6c0ecfa7a1bd in /home/hg/repos/gajim author: lovetox <forenjun...@chelo.at> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=6c0ecfa7a1bd description: Fix alignment in Account Window diffstat: data/gui/accounts_window.ui | 26 ++ 1 files changed, 18 insertions(+), 8 deletions(-) diffs (154 lines): diff -r 50f60d56cbd7 -r 6c0ecfa7a1bd data/gui/accounts_window.ui --- a/data/gui/accounts_window.ui Sun Oct 16 22:40:41 2016 +0200 +++ b/data/gui/accounts_window.ui Sun Oct 16 16:57:34 2016 +0200 @@ -55,11 +55,13 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 175 +True True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK +5 vertical 6 @@ -142,7 +144,7 @@ False -True +False @@ -150,6 +152,7 @@ True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK +5 False False @@ -199,9 +202,9 @@ True False -0 _Jabber ID: True +0 0 @@ -212,9 +215,9 @@ True False -0 _Password: True +0 0 @@ -225,9 +228,9 @@ True False -0 Resour_ce: True +0 0 @@ -238,9 +241,9 @@ True False -0 Priori_ty: True +0 0 @@ -429,10 +432,10 @@ True False -0 _Client Cert File: True cert_entry1 +0 False @@ -1263,6 +1266,9 @@ True False +11 +5 +5 True @@ -1273,9 +1279,9 @@ True False -0 bOpenPGP/b True +0 False @@ -1364,9 +1370,9 @@ True False -0 bPersonal Information/b True +0 0 @@ -1379,6 +1385,7 @@ True False First Name: +1 0 @@ -1390,6 +
gajim: prevent traceback when a wrong timezone arrive.
changeset 738aa5082b6a in /home/hg/repos/gajim author: Yann Leboulanger <aste...@lagaule.org> branches: gajim_0.16 details:http://hg.gajim.org/gajim?cmd=changeset;node=738aa5082b6a description: prevent traceback when a wrong timezone arrive. diffstat: src/common/connection_handlers_events.py | 6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diffs (16 lines): diff -r 1bfc811a5e43 -r 738aa5082b6a src/common/connection_handlers_events.py --- a/src/common/connection_handlers_events.py Sun Oct 16 10:38:09 2016 +0200 +++ b/src/common/connection_handlers_events.py Sun Oct 16 22:40:41 2016 +0200 @@ -208,7 +208,11 @@ tzo = qp.getTag('tzo').getData() if tzo.lower() == 'z': tzo = '0:0' -tzoh, tzom = tzo.split(':') +try: +tzoh, tzom = tzo.split(':') +except Exception, e: +# wrong tzo +return utc_time = qp.getTag('utc').getData() ZERO = datetime.timedelta(0) class UTC(datetime.tzinfo): ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Correctly restore disabled status for emoticons in pref w...
changeset 1bfc811a5e43 in /home/hg/repos/gajim author: lovetox <forenjun...@chelo.at> branches: gajim_0.16 details:http://hg.gajim.org/gajim?cmd=changeset;node=1bfc811a5e43 description: Correctly restore disabled status for emoticons in pref window diffstat: src/config.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 81c36bd94098 -r 1bfc811a5e43 src/config.py --- a/src/config.py Sat Oct 08 17:40:39 2016 +0200 +++ b/src/config.py Sun Oct 16 10:38:09 2016 +0200 @@ -167,7 +167,7 @@ if gajim.config.get('emoticons_theme') == l[i]: emoticons_combobox.set_active(i) if not gajim.config.get('emoticons_theme'): -emoticons_combobox.set_active(len(l)-1) +emoticons_combobox.set_active(0) # Set default for single window type choices = common.config.opt_one_window_types ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Add additional_data to ChatEvent
changeset dd9be0a66aef in /home/hg/repos/gajim author: lovetox <forenjun...@chelo.at> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=dd9be0a66aef description: Add additional_data to ChatEvent diffstat: src/common/events.py | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diffs (20 lines): diff -r e12519bd0b38 -r dd9be0a66aef src/common/events.py --- a/src/common/events.py Thu Oct 13 00:31:42 2016 +0200 +++ b/src/common/events.py Thu Oct 13 00:40:02 2016 +0200 @@ -67,7 +67,7 @@ def __init__ (self, message, subject, kind, time, encrypted, resource, msg_log_id, correct_id=None, xhtml=None, session=None, form_node=None, displaymarking=None, sent_forwarded=False, time_=None, show_in_roster=False, -show_in_systray=True): +show_in_systray=True, additional_data=None): Event.__init__(self, time_, show_in_roster=show_in_roster, show_in_systray=show_in_systray) self.message = message @@ -83,6 +83,7 @@ self.form_node = form_node self.displaymarking = displaymarking self.sent_forwarded = sent_forwarded +self.additional_data = additional_data class NormalEvent(ChatEvent): type_ = 'normal' ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Workaround for strftime bug on Windows
changeset f5b10ff9e6ee in /home/hg/repos/gajim author: lovetox <forenjun...@chelo.at> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=f5b10ff9e6ee description: Workaround for strftime bug on Windows see: http://bugs.python.org/issue8304 diffstat: src/conversation_textview.py | 7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diffs (17 lines): diff -r dd9be0a66aef -r f5b10ff9e6ee src/conversation_textview.py --- a/src/conversation_textview.py Thu Oct 13 00:40:02 2016 +0200 +++ b/src/conversation_textview.py Thu Oct 13 01:43:26 2016 +0200 @@ -1410,7 +1410,12 @@ '%(nb_days)i days ago', diff_day, {'nb_days': diff_day}, {'nb_days': diff_day}) if day_str: -format_ += i18n.direction_mark + day_str + direction_mark + ' ' +# strftime Windows bug has problems with Unicode +# see: http://bugs.python.org/issue8304 +if os.name != 'nt': +format_ += i18n.direction_mark + day_str + direction_mark + ' ' +else: +format_ += day_str + ' ' timestamp_str = gajim.config.get('time_stamp') timestamp_str = helpers.from_one_line(timestamp_str) format_ += timestamp_str ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Fix height of XMLConsole input field
changeset bf992be0151d in /home/hg/repos/gajim author: lovetox <forenjun...@chelo.at> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=bf992be0151d description: Fix height of XMLConsole input field diffstat: data/gui/xml_console_window.ui | 11 ++- 1 files changed, 6 insertions(+), 5 deletions(-) diffs (68 lines): diff -r 09ffc58c0df5 -r bf992be0151d data/gui/xml_console_window.ui --- a/data/gui/xml_console_window.uiTue Oct 11 23:15:15 2016 +0200 +++ b/data/gui/xml_console_window.uiThu Oct 13 00:18:33 2016 +0200 @@ -23,9 +23,9 @@ True False -0 bJabber Traffic/b True +0 False @@ -35,6 +35,7 @@ +100 True True in @@ -221,9 +222,9 @@ True False -0 bFilter/b True +0 @@ -247,13 +248,13 @@ 6 +150 True True never in -120 True True char @@ -261,7 +262,7 @@ -False +True True 0 @@ -348,9 +349,9 @@ True False -0 bXML Input/b True +0 ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Dont leak presence with ChatStates
changeset 86264c5ceecd in /home/hg/repos/gajim author: lovetox <forenjun...@chelo.at> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=86264c5ceecd description: Dont leak presence with ChatStates diffstat: src/chat_control.py | 28 ++-- 1 files changed, 18 insertions(+), 10 deletions(-) diffs (59 lines): diff -r f5b10ff9e6ee -r 86264c5ceecd src/chat_control.py --- a/src/chat_control.py Thu Oct 13 01:43:26 2016 +0200 +++ b/src/chat_control.py Thu Oct 13 02:07:34 2016 +0200 @@ -2367,24 +2367,26 @@ contact = self.contact jid = contact.jid current_state = contact.our_chatstate -if current_state is False: # jid doesn't support chatstates -return False # stop looping +if current_state is False: # jid doesn't support chatstates +return False # stop looping message_buffer = self.msg_textview.get_buffer() -if self.kbd_activity_in_last_5_secs and message_buffer.get_char_count(): +if (self.kbd_activity_in_last_5_secs and +message_buffer.get_char_count()): # Only composing if the keyboard activity was in text entry -self.send_chatstate('composing') -elif self.mouse_over_in_last_5_secs and current_state == 'inactive' and\ -jid == self.parent_win.get_active_jid(): -self.send_chatstate('active') +self.send_chatstate('composing', self.contact) +elif (self.mouse_over_in_last_5_secs and + current_state == 'inactive' and +jid == self.parent_win.get_active_jid()): +self.send_chatstate('active', self.contact) else: if current_state == 'composing': -self.send_chatstate('paused') # pause composing +self.send_chatstate('paused', self.contact) # pause composing # assume no activity and let the motion-notify or 'insert-text' make them # True refresh 30 seconds vars too or else it's 30 - 5 = 25 seconds! self.reset_kbd_mouse_timeout_vars() -return True # loop forever +return True # loop forever def check_for_possible_inactive_chatstate(self, arg): """ @@ -2662,12 +2664,18 @@ # and raises RuntimeException with appropriate message # more on that http://xmpp.org/extensions/xep-0085.html#statechart -# do not send nothing if we have chat state notifications disabled +# do not send if we have chat state notifications disabled # that means we won't reply to the from other peer # so we do not broadcast jep85 capabalities chatstate_setting = gajim.config.get('outgoing_chat_state_notifications') if chatstate_setting == 'disabled': return + +# Dont leak presence to contacts +# which are not allowed to see our status +if contact and contact.sub in ('to', 'none'): +return + elif chatstate_setting == 'composing_only' and state != 'active' and\ state != 'composing': return ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Fix textview height in subsription request dialog
changeset e12519bd0b38 in /home/hg/repos/gajim author: lovetox <forenjun...@chelo.at> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=e12519bd0b38 description: Fix textview height in subsription request dialog diffstat: data/gui/subscription_request_window.ui | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diffs (28 lines): diff -r bf992be0151d -r e12519bd0b38 data/gui/subscription_request_window.ui --- a/data/gui/subscription_request_window.ui Thu Oct 13 00:18:33 2016 +0200 +++ b/data/gui/subscription_request_window.ui Thu Oct 13 00:31:42 2016 +0200 @@ -17,6 +17,7 @@ False 12 Subscription Request +False dialog @@ -38,6 +39,7 @@ +100 True True 5 @@ -54,7 +56,7 @@ -False +True True 1 ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim-plugins: Incremented plugin versions changed in last commit
changeset f5a86da044ab in /home/hg/repos/gajim-plugins author: tmolitor <th...@eightysoft.de> branches: gtk3 details:gajim-plugins?cmd=changeset;node=f5a86da044ab description: Incremented plugin versions changed in last commit diffstat: juick/manifest.ini | 2 +- url_shortener/manifest.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diffs (24 lines): diff -r bde54bde9bdf -r f5a86da044ab juick/manifest.ini --- a/juick/manifest.iniWed Oct 12 02:55:32 2016 +0200 +++ b/juick/manifest.iniWed Oct 12 02:56:37 2016 +0200 @@ -1,7 +1,7 @@ [info] name: Juick short_name: Juick -version: 0.9.4 +version: 0.9.5 description: Clickable Juick links , Juick nicks, preview Juick picturs. The key combination alt + up in the textbox allow insert the number of last message (comment or topic). authors: Denis Fomin <fomi...@gmail.com> diff -r bde54bde9bdf -r f5a86da044ab url_shortener/manifest.ini --- a/url_shortener/manifest.iniWed Oct 12 02:55:32 2016 +0200 +++ b/url_shortener/manifest.iniWed Oct 12 02:56:37 2016 +0200 @@ -1,7 +1,7 @@ [info] name: Url Shortener short_name: url_shortener -version: 0.3.4 +version: 0.3.5 description: Plugin that allows users to shorten a long URL in messages. For example, you can turn this link: https://trac.gajim.org/timeline ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: default branch is 0.16.10
changeset 09ffc58c0df5 in /home/hg/repos/gajim author: Yann Leboulanger <aste...@lagaule.org> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=09ffc58c0df5 description: default branch is 0.16.10 diffstat: ChangeLog | 7 +++ autogen.sh | 2 +- gajim.nsi | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diffs (36 lines): diff -r b00c380d9994 -r 09ffc58c0df5 ChangeLog --- a/ChangeLog Fri Jun 03 20:47:40 2016 +0200 +++ b/ChangeLog Tue Oct 11 23:15:15 2016 +0200 @@ -1,3 +1,10 @@ +Gajim 0.16.6 ( September 2016) + + * Fix using gpg2 + * Improve message receips usage + * Improve roster filtering + * several minor bugs + Gajim 0.16.5 (28 December 2015) * Improve MAM implementation diff -r b00c380d9994 -r 09ffc58c0df5 autogen.sh --- a/autogen.shFri Jun 03 20:47:40 2016 +0200 +++ b/autogen.shTue Oct 11 23:15:15 2016 +0200 @@ -1,5 +1,5 @@ #!/usr/bin/env bash - gajimversion="0.16.5" + gajimversion="0.16.10.2" if [ -d ".hg" ]; then node=$(hg tip --template "{node}") hgversion="-${node:0:12}" diff -r b00c380d9994 -r 09ffc58c0df5 gajim.nsi --- a/gajim.nsi Fri Jun 03 20:47:40 2016 +0200 +++ b/gajim.nsi Tue Oct 11 23:15:15 2016 +0200 @@ -155,7 +155,7 @@ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "DisplayName" "Gajim" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "UninstallString" "$INSTDIR\Uninstall.exe" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "DisplayIcon" "$INSTDIR\build\Gajim.exe" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "DisplayVersion" "0.16.4" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "DisplayVersion" "0.16.10" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "URLInfoAbout" "http://www.gajim.org/; WriteUninstaller "$INSTDIR\Uninstall.exe" ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Add gajim-remote.desktop.in to POTFILES.skip. Fixes #8345
changeset b00c380d9994 in /home/hg/repos/gajim author: Yann Leboulanger <aste...@lagaule.org> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=b00c380d9994 description: Add gajim-remote.desktop.in to POTFILES.skip. Fixes #8345 diffstat: autogen.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 694045d6273c -r b00c380d9994 autogen.sh --- a/autogen.shTue Oct 11 21:02:30 2016 +0200 +++ b/autogen.shFri Jun 03 20:47:40 2016 +0200 @@ -17,7 +17,7 @@ && ls -1 data/gajim.desktop.in.in data/gajim-remote.desktop.in.in \ src/*.py src/common/*.py src/command_system/*.py src/command_system/implementation/*.py src/common/zeroconf/*.py src/plugins/*.py | grep -v ipython_view.py >> \ po/POTFILES.in \ - && echo -e "data/gajim.desktop.in\nsrc/ipython_view.py" > po/POTFILES.skip || exit 1 + && echo -e "data/gajim.desktop.in\ndata/gajim-remote.desktop.in\nsrc/ipython_view.py" > po/POTFILES.skip || exit 1 if [ $(find plugins/ -name '*.py' | wc -l) -gt 0 ];then ls -1 plugins/*/*.py plugins/*/*.ui >> po/POTFILES.skip fi ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: fix configure to require python3
changeset 694045d6273c in /home/hg/repos/gajim author: Yann Leboulanger <aste...@lagaule.org> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=694045d6273c description: fix configure to require python3 diffstat: configure.ac | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r f36fd235b49d -r 694045d6273c configure.ac --- a/configure.ac Tue Oct 11 09:51:31 2016 +0100 +++ b/configure.ac Tue Oct 11 21:02:30 2016 +0200 @@ -36,7 +36,7 @@ ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}" AC_SUBST(ACLOCAL_AMFLAGS) -AM_PATH_PYTHON([2.5]) +AM_PATH_PYTHON([3.5]) dnl dnl enable installation in python-2.x/site-packages/gajim ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim-plugins: [Linus Heckemann] Fix API change for print_specia...
changeset 362fab6a454d in /home/hg/repos/gajim-plugins author: lovetox <forenjun...@chelo.at> branches: gtk3 details:gajim-plugins?cmd=changeset;node=362fab6a454d description: [Linus Heckemann] Fix API change for print_special_text, and GTK deprecation warning diffstat: url_image_preview/manifest.ini | 2 +- url_image_preview/url_image_preview.py | 9 +++-- 2 files changed, 8 insertions(+), 3 deletions(-) diffs (38 lines): diff -r 1ef6c127f3ab -r 362fab6a454d url_image_preview/manifest.ini --- a/url_image_preview/manifest.iniMon Oct 10 14:28:41 2016 +0100 +++ b/url_image_preview/manifest.iniTue Oct 11 12:07:42 2016 +0200 @@ -1,7 +1,7 @@ [info] name: Url image preview short_name: url_image_preview -version: 0.5.4 +version: 0.5.5 description: Url image preview in chatbox. authors = Denis Fomin <fomi...@gmail.com> Yann Leboulanger <aste...@lagaule.org> diff -r 1ef6c127f3ab -r 362fab6a454d url_image_preview/url_image_preview.py --- a/url_image_preview/url_image_preview.pyMon Oct 10 14:28:41 2016 +0100 +++ b/url_image_preview/url_image_preview.pyTue Oct 11 12:07:42 2016 +0200 @@ -46,7 +46,7 @@ self.controls = [] def print_special_text(self, tv, special_text, other_tags, graphics=True, -additional_data): +additional_data={}): for control in self.controls: if control.chat_control.conv_textview != tv: continue @@ -142,7 +142,12 @@ self.xml.set_translation_domain('gajim_plugins') self.xml.add_objects_from_file(self.GTK_BUILDER_FILE_PATH, ['vbox1']) self.preview_size_spinbutton = self.xml.get_object('preview_size') -adjustment = Gtk.Adjustment(20, 10, 512, 1, 10, 0) +adjustment = Gtk.Adjustment(value=20, +lower=10, +upper=512, +step_increment=1, +page_increment=10, +page_size=0) self.preview_size_spinbutton.set_adjustment(adjustment) vbox = self.xml.get_object('vbox1') self.get_child().pack_start(vbox, True, True, 0) ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Allow startup even with malformed plugin manifests
changeset f36fd235b49d in /home/hg/repos/gajim author: Linus Heckemann <g...@sphalerite.org> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=f36fd235b49d description: Allow startup even with malformed plugin manifests diffstat: src/plugins/pluginmanager.py | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) diffs (21 lines): diff -r bbb2c16e481d -r f36fd235b49d src/plugins/pluginmanager.py --- a/src/plugins/pluginmanager.py Mon Oct 10 20:54:15 2016 +0200 +++ b/src/plugins/pluginmanager.py Tue Oct 11 09:51:31 2016 +0100 @@ -447,9 +447,14 @@ # read metadata from manifest.ini conf.remove_section('info') -conf_file = open(manifest_path, encoding='utf-8') -conf.read_file(conf_file) -conf_file.close() +with open(manifest_path, encoding='utf-8') as conf_file: +try: +conf.read_file(conf_file) +except configparser.Error: +log.warning(("Plugin {plugin} not loaded, error loading" + " manifest").format(plugin=elem_name) +, exc_info=True) +continue min_v = conf.get('info', 'min_gajim_version', fallback=None) max_v = conf.get('info', 'max_gajim_version', fallback=None) ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Support old print_status tag in Bookmarks
changeset bbb2c16e481d in /home/hg/repos/gajim author: lovetox <forenjun...@chelo.at> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=bbb2c16e481d description: Support old print_status tag in Bookmarks diffstat: src/common/connection_handlers_events.py | 6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diffs (16 lines): diff -r c9ab416e87df -r bbb2c16e481d src/common/connection_handlers_events.py --- a/src/common/connection_handlers_events.py Mon Oct 10 19:10:18 2016 +0200 +++ b/src/common/connection_handlers_events.py Mon Oct 10 20:54:15 2016 +0200 @@ -518,8 +518,10 @@ minimize_val = minimize_val.getData() print_status = conf.getTag('print_status', namespace=NS_GAJIM_BM) -if not print_status: -print_status = conf.getTagData('show_status') +if not print_status: # not there, try old Gajim behaviour +print_status = conf.getTagData('print_status') +if not print_status: # not there, try old Gajim behaviour +print_status = conf.getTagData('show_status') else: print_status = print_status.getData() ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Store optional fields correctly in Bookmarks
changeset c9ab416e87df in /home/hg/repos/gajim author: lovetox <forenjun...@chelo.at> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=c9ab416e87df description: Store optional fields correctly in Bookmarks diffstat: src/common/connection.py | 27 +- src/common/connection_handlers_events.py | 37 --- 2 files changed, 40 insertions(+), 24 deletions(-) diffs (126 lines): diff -r f196f08e65f9 -r c9ab416e87df src/common/connection.py --- a/src/common/connection.py Mon Oct 10 15:22:51 2016 +0200 +++ b/src/common/connection.py Mon Oct 10 19:10:18 2016 +0200 @@ -2474,7 +2474,8 @@ """ if not gajim.account_is_connected(self.name): return -if self.pubsub_supported and storage_type != 'xml': +if self.pubsub_supported and self.pubsub_publish_options_supported \ +and storage_type != 'xml': self.send_pb_retrieve('', 'storage:bookmarks') # some server (ejabberd) are so slow to answer that we request via XML # if we don't get answer in the next 30 seconds @@ -2489,15 +2490,17 @@ storage_type can be set to 'pubsub' or 'xml' so store in only one method else it will be stored on both """ +NS_GAJIM_BM = 'xmpp:gajim.org/bookmarks' if not gajim.account_is_connected(self.name): return iq = nbxmpp.Node(tag='storage', attrs={'xmlns': 'storage:bookmarks'}) for bm in self.bookmarks: -iq2 = iq.addChild(name = "conference") +iq2 = iq.addChild(name="conference") iq2.setAttr('jid', bm['jid']) iq2.setAttr('autojoin', bm['autojoin']) -iq2.setAttr('minimize', bm['minimize']) iq2.setAttr('name', bm['name']) +iq2.setTag('minimize', namespace=NS_GAJIM_BM). \ +setData(bm['minimize']) # Only add optional elements if not empty # Note: need to handle both None and '' as empty # thus shouldn't use "is not None" @@ -2506,21 +2509,23 @@ if bm.get('password', None): iq2.setTagData('password', bm['password']) if bm.get('print_status', None): -iq2.setTagData('print_status', bm['print_status']) +iq2.setTag('print_status', namespace=NS_GAJIM_BM). \ +setData(bm['print_status']) -if self.pubsub_supported and self.pubsub_publish_options_supported and \ -storage_type != 'xml': +if self.pubsub_supported and self.pubsub_publish_options_supported and\ +storage_type != 'xml': options = nbxmpp.Node(nbxmpp.NS_DATA + ' x', -attrs={'type': 'submit'}) -f = options.addChild('field', attrs={'var': 'FORM_TYPE', -'type': 'hidden'}) + attrs={'type': 'submit'}) +f = options.addChild('field', + attrs={'var': 'FORM_TYPE', 'type': 'hidden'}) f.setTagData('value', nbxmpp.NS_PUBSUB_PUBLISH_OPTIONS) -f = options.addChild('field', attrs={'var': 'pubsub#persist_items'}) +f = options.addChild('field', + attrs={'var': 'pubsub#persist_items'}) f.setTagData('value', 'true') f = options.addChild('field', attrs={'var': 'pubsub#access_model'}) f.setTagData('value', 'whitelist') self.send_pb_publish('', 'storage:bookmarks', iq, 'current', -options=options) + options=options) if storage_type != 'pubsub': iqA = nbxmpp.Iq(typ='set') iqB = iqA.addChild(name='query', namespace=nbxmpp.NS_PRIVATE) diff -r f196f08e65f9 -r c9ab416e87df src/common/connection_handlers_events.py --- a/src/common/connection_handlers_events.py Mon Oct 10 15:22:51 2016 +0200 +++ b/src/common/connection_handlers_events.py Mon Oct 10 19:10:18 2016 +0200 @@ -499,33 +499,44 @@ self.namespace = self.storage_node.getNamespace() return True + class BookmarksHelper: def parse_bookmarks(self): self.bookmarks = [] +NS_GAJIM_BM = 'xmpp:gajim.org/bookmarks' confs = self.storage_node.getTags('conference') for conf in confs: autojoin_val = conf.getAttr('autojoin') -if autojoin_val is None: # not there (it's optional) +if not autojoin_val: # not there (it's optional) autojoin_val = False -minimize_val = conf.getAttr('minimize') -if minimize_val is None: # not there (it's optional) -minimize_val = False -print_status = conf.getTagData('print_status') +minimize_val = conf.getTag('minimize', namespace=NS_GAJIM
gajim-plugins: Fix url_image_preview for gtk3
changeset 1ef6c127f3ab in /home/hg/repos/gajim-plugins author: Linus Heckemann <g...@sphalerite.org> branches: gtk3 details:gajim-plugins?cmd=changeset;node=1ef6c127f3ab description: Fix url_image_preview for gtk3 diffstat: url_image_preview/manifest.ini | 2 +- url_image_preview/url_image_preview.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diffs (25 lines): diff -r 506034128f9a -r 1ef6c127f3ab url_image_preview/manifest.ini --- a/url_image_preview/manifest.iniThu Oct 06 19:33:44 2016 +0200 +++ b/url_image_preview/manifest.iniMon Oct 10 14:28:41 2016 +0100 @@ -1,7 +1,7 @@ [info] name: Url image preview short_name: url_image_preview -version: 0.5.3 +version: 0.5.4 description: Url image preview in chatbox. authors = Denis Fomin <fomi...@gmail.com> Yann Leboulanger <aste...@lagaule.org> diff -r 506034128f9a -r 1ef6c127f3ab url_image_preview/url_image_preview.py --- a/url_image_preview/url_image_preview.pyThu Oct 06 19:33:44 2016 +0200 +++ b/url_image_preview/url_image_preview.pyMon Oct 10 14:28:41 2016 +0100 @@ -45,7 +45,8 @@ control.disconnect_from_chat_control() self.controls = [] -def print_special_text(self, tv, special_text, other_tags, graphics=True): +def print_special_text(self, tv, special_text, other_tags, graphics=True, +additional_data): for control in self.controls: if control.chat_control.conv_textview != tv: continue ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: start running tests
changeset f196f08e65f9 in /home/hg/repos/gajim author: Yann Leboulanger <aste...@lagaule.org> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=f196f08e65f9 description: start running tests diffstat: src/common/contacts.py | 2 +- test/integration/test_roster.py | 2 +- test/lib/__init__.py| 4 ++-- test/runtests.py| 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diffs (47 lines): diff -r 5cc25f8ab431 -r f196f08e65f9 src/common/contacts.py --- a/src/common/contacts.pyMon Oct 10 13:47:56 2016 +0100 +++ b/src/common/contacts.pyMon Oct 10 15:22:51 2016 +0200 @@ -238,7 +238,7 @@ self._metacontact_manager.add_account(account_name) def get_accounts(self): -return self._accounts.keys() +return list(self._accounts.keys()) def remove_account(self, account): del self._accounts[account] diff -r 5cc25f8ab431 -r f196f08e65f9 test/integration/test_roster.py --- a/test/integration/test_roster.py Mon Oct 10 13:47:56 2016 +0100 +++ b/test/integration/test_roster.py Mon Oct 10 15:22:51 2016 +0200 @@ -139,7 +139,7 @@ # Contacts kept their info contact = instances[0] -self.assertEquals(contact.groups, contacts[acc][jid]['groups'], +self.assertEquals(sorted(contact.groups), sorted(contacts[acc][jid]['groups']), msg='Group Missmatch') groups = contacts[acc][jid]['groups'] or ['General',] diff -r 5cc25f8ab431 -r f196f08e65f9 test/lib/__init__.py --- a/test/lib/__init__.py Mon Oct 10 13:47:56 2016 +0100 +++ b/test/lib/__init__.py Mon Oct 10 15:22:51 2016 +0200 @@ -23,8 +23,8 @@ pluginsconfigdir = configdir + '/pluginsconfig' # define _ for i18n -import __builtin__ -__builtin__._ = lambda x: x +import builtins +builtins._ = lambda x: x def setup_env(): # wipe config directory diff -r 5cc25f8ab431 -r f196f08e65f9 test/runtests.py --- a/test/runtests.py Mon Oct 10 13:47:56 2016 +0100 +++ b/test/runtests.py Mon Oct 10 15:22:51 2016 +0200 @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ''' ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Fix fuzzy time
changeset 5cc25f8ab431 in /home/hg/repos/gajim author: Linus Heckemann <g...@sphalerite.org> branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=5cc25f8ab431 description: Fix fuzzy time diffstat: src/conversation_textview.py | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diffs (13 lines): diff -r ecce88d89f6c -r 5cc25f8ab431 src/conversation_textview.py --- a/src/conversation_textview.py Sat Oct 08 17:38:10 2016 +0200 +++ b/src/conversation_textview.py Mon Oct 10 13:47:56 2016 +0100 @@ -1323,8 +1323,7 @@ self.last_time_printout = time.mktime(tim) end_iter = buffer_.get_end_iter() if gajim.config.get('print_time_fuzzy') > 0: -ft = self.fc.fuzzy_time(gajim.config.get('print_time_fuzzy'), tim) -tim_format = ft.decode(locale.getpreferredencoding()) +tim_format = self.fc.fuzzy_time(gajim.config.get('print_time_fuzzy'), tim) else: tim_format = self.get_time_to_show(tim, direction_mark) buffer_.insert_with_tags_by_name(end_iter, tim_format + '\n', ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim-plugins: Fix leaking cleartext when using XHTML - Fixes #145
changeset c7c2e519ed63 in /home/hg/repos/gajim-plugins author: lovetox <forenjun...@chelo.at> branches: details:gajim-plugins?cmd=changeset;node=c7c2e519ed63 description: Fix leaking cleartext when using XHTML - Fixes #145 diffstat: gotr/manifest.ini | 2 +- gotr/otrmodule.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diffs (25 lines): diff -r 35d50ee17f89 -r c7c2e519ed63 gotr/manifest.ini --- a/gotr/manifest.ini Sat Oct 08 20:42:16 2016 +0200 +++ b/gotr/manifest.ini Sun Oct 09 00:45:45 2016 +0200 @@ -1,7 +1,7 @@ [info] name: Off-The-Record Encryption short_name: gotr -version: 1.9.4 +version: 1.9.5 description: Provide OTR encryption. Read https://github.com/python-otr/gajim-otr/wiki;>https://github.com/python-otr/gajim-otr/wiki before use. authors: Kjell Braden <afflux.ga...@pentabarf.de> homepage: http://gajim-otr.pentabarf.de diff -r 35d50ee17f89 -r c7c2e519ed63 gotr/otrmodule.py --- a/gotr/otrmodule.py Sat Oct 08 20:42:16 2016 +0200 +++ b/gotr/otrmodule.py Sun Oct 09 00:45:45 2016 +0200 @@ -623,7 +623,8 @@ sendMessage(potr.context.FRAGMENT_SEND_ALL_BUT_LAST, xhtml) if xhtml != encrypted_msg.strip(): #.strip() because sendMessage() adds whitespaces encrypted = True -event.msg_iq.setXHTML(encrypted_msg) +event.msg_iq.delChild('html') +event.msg_iq.setBody(encrypted_msg) elif body: body = escape(body).encode('utf8') encrypted_msg = self.us[event.conn.name].\ ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim-plugins: Fix backtrace when invalid url fragments are enco...
changeset 35d50ee17f89 in /home/hg/repos/gajim-plugins author: tmolitor <th...@eightysoft.de> branches: details:gajim-plugins?cmd=changeset;node=35d50ee17f89 description: Fix backtrace when invalid url fragments are encountered... diffstat: url_image_preview/manifest.ini | 2 +- url_image_preview/url_image_preview.py | 17 ++--- 2 files changed, 11 insertions(+), 8 deletions(-) diffs (39 lines): diff -r 32f4e9334baf -r 35d50ee17f89 url_image_preview/manifest.ini --- a/url_image_preview/manifest.iniThu Sep 22 18:53:06 2016 +0200 +++ b/url_image_preview/manifest.iniSat Oct 08 20:42:16 2016 +0200 @@ -1,7 +1,7 @@ [info] name: Url image preview short_name: url_image_preview -version: 0.9.7 +version: 0.9.8 description: Displays a preview of links to images authors = Denis Fomin <fomi...@gmail.com> Yann Leboulanger <aste...@lagaule.org> diff -r 32f4e9334baf -r 35d50ee17f89 url_image_preview/url_image_preview.py --- a/url_image_preview/url_image_preview.pyThu Sep 22 18:53:06 2016 +0200 +++ b/url_image_preview/url_image_preview.pySat Oct 08 20:42:16 2016 +0200 @@ -200,13 +200,16 @@ encrypted = False if len(urlparts.fragment): fragment = [] -for i in range(0, len(urlparts.fragment), 2): -fragment.append(chr(int(urlparts.fragment[i:i + 2], 16))) -fragment = ''.join(fragment) -key = fragment[16:] -iv = fragment[:16] -if len(key) == 32 and len(iv) == 16: -encrypted = True +try: +for i in range(0, len(urlparts.fragment), 2): +fragment.append(chr(int(urlparts.fragment[i:i + 2], 16))) +fragment = ''.join(fragment) +key = fragment[16:] +iv = fragment[:16] +if len(key) == 32 and len(iv) == 16: +encrypted = True +except: +pass # file exists but thumbnail got deleted if os.path.exists(filepath) and not os.path.exists(thumbpath): ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: [pitchum] Fix datetime parsing - Fixes #8444
changeset 81c36bd94098 in /home/hg/repos/gajim author: lovetox <forenjun...@chelo.at> branches: gajim_0.16 details:http://hg.gajim.org/gajim?cmd=changeset;node=81c36bd94098 description: [pitchum] Fix datetime parsing - Fixes #8444 diffstat: src/common/helpers.py | 8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diffs (18 lines): diff -r 2eace08470b1 -r 81c36bd94098 src/common/helpers.py --- a/src/common/helpers.py Mon Oct 03 23:02:23 2016 +0200 +++ b/src/common/helpers.py Sat Oct 08 17:40:39 2016 +0200 @@ -643,8 +643,12 @@ tim = tim.split('.')[0] tim = time.strptime(date + 'T' + tim, '%Y%m%dT%H:%M:%S') if zone: -tim = datetime.datetime.fromtimestamp(time.mktime(t)) -zone = strptime.time(zone, '%H:%M') +zone = zone.replace(':', '') +tim = datetime.datetime.fromtimestamp(time.mktime(tim)) +if len(zone) > 2: +zone = time.strptime(zone, '%H%M') +else: +zone = time.strptime(zone, '%H') zone = datetime.timedelta(hours=zone.tm_hour, minutes=zone.tm_min) tim += zone * sign tim = tim.timetuple() ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits