Philipp Hörist pushed to branch master at gajim / gajim
Commits:
456d7f87 by Philipp Hörist at 2017-10-20T19:09:41+02:00
Catch OSError when converting with Pillow
- - - - -
1 changed file:
- gajim/gui_interface.py
Changes:
=====================================
gajim/gui_interface.py
=====================================
--- a/gajim/gui_interface.py
+++ b/gajim/gui_interface.py
@@ -2399,7 +2399,7 @@ class Interface:
'avatar image using pillow', filename)
try:
avatar = Image.open(path).convert("RGBA")
- except NameError:
+ except (NameError, OSError):
app.log('avatar').warning('Pillow convert failed: %s', filename)
app.log('avatar').debug('Error', exc_info=True)
return
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/456d7f87ffa0f1d9c3bf3fa3ca5274a189…
---
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/456d7f87ffa0f1d9c3bf3fa3ca5274a189…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
2c7861bc by Philipp Hörist at 2017-10-19T15:54:49+02:00
Groupchat: Dont update avatar on offline presence
- - - - -
1 changed file:
- gajim/common/connection_handlers.py
Changes:
=====================================
gajim/common/connection_handlers.py
=====================================
--- a/gajim/common/connection_handlers.py
+++ b/gajim/common/connection_handlers.py
@@ -313,6 +313,9 @@ class ConnectionVcard:
if server.startswith('irc') or obj.avatar_sha is None:
return
+ if obj.show == 'offline':
+ return
+
gc_contact = app.contacts.get_gc_contact(
self.name, obj.room_jid, obj.nick)
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/2c7861bc1de8f8b0547e02b4ca8fd167c1…
---
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/2c7861bc1de8f8b0547e02b4ca8fd167c1…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
1f0cc2b6 by Philipp Hörist at 2017-10-17T16:28:56+02:00
Fix bindtextdomain not available on MacOS
- - - - -
0d16ef32 by Philipp Hörist at 2017-10-17T18:36:02+02:00
Fix StatusIcon on MacOS
- - - - -
2 changed files:
- gajim/common/i18n.py
- gajim/statusicon.py
Changes:
=====================================
gajim/common/i18n.py
=====================================
--- a/gajim/common/i18n.py
+++ b/gajim/common/i18n.py
@@ -76,7 +76,10 @@ else:
if base is None or base[0] != '/':
base = os.path.expanduser('~/.local/share')
localedir = os.path.join(base, "locale")
- locale.bindtextdomain(APP, localedir)
+
+ if hasattr(locale, 'bindtextdomain'):
+ locale.bindtextdomain(APP, localedir)
+
gettext.install(APP, localedir)
if gettext._translations:
=====================================
gajim/statusicon.py
=====================================
--- a/gajim/statusicon.py
+++ b/gajim/statusicon.py
@@ -26,6 +26,7 @@
from gi.repository import Gtk
from gi.repository import Gdk
import os
+import sys
from gajim import dialogs
from gajim import config
@@ -85,6 +86,8 @@ class StatusIcon:
if not self.status_icon:
self.status_icon = Gtk.StatusIcon()
self.statusicon_size = '16'
+ if sys.platform == 'darwin':
+ self.statusicon_size = '24'
self.status_icon.set_property('has-tooltip', True)
self.status_icon.connect('activate', self.on_status_icon_left_clicked)
self.status_icon.connect('popup-menu',
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/f234722456bebeb5d113e63e5d6eeeda9…
---
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/f234722456bebeb5d113e63e5d6eeeda9…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
29cf416d by Philipp Hörist at 2017-10-15T21:34:32+02:00
Send Presence probe on unblock
- - - - -
03e32668 by Philipp Hörist at 2017-10-15T21:34:42+02:00
MUC: Hide block menu if privacy list is absent
- - - - -
ed764789 by Philipp Hörist at 2017-10-15T21:34:42+02:00
Show blocked contacts as offline
- - - - -
3 changed files:
- gajim/common/connection.py
- gajim/common/connection_handlers.py
- gajim/groupchat_control.py
Changes:
=====================================
gajim/common/connection.py
=====================================
--- a/gajim/common/connection.py
+++ b/gajim/common/connection.py
@@ -1639,6 +1639,7 @@ class Connection(CommonConnection, ConnectionHandlers):
self.connection.send(iq)
return
for contact in contact_list:
+ contact.show = 'offline'
self.send_custom_status('offline', message, contact.jid)
max_order = self.get_max_blocked_list_order()
new_rule = {'order': str(max_order + 1),
@@ -1687,6 +1688,9 @@ class Connection(CommonConnection, ConnectionHandlers):
return
for contact in contact_list:
self.send_custom_status(show, self.status, contact.jid)
+ # Send a presence Probe to get the current Status
+ probe = nbxmpp.Presence(contact.jid, 'probe', frm=self.get_own_jid())
+ self.connection.send(probe)
def block_group(self, group, contact_list, message):
if not self.privacy_rules_supported:
=====================================
gajim/common/connection_handlers.py
=====================================
--- a/gajim/common/connection_handlers.py
+++ b/gajim/common/connection_handlers.py
@@ -2104,9 +2104,15 @@ ConnectionHandlersBase, ConnectionJingle, ConnectionIBBytestream):
for jid in obj.blocked_jids:
if jid not in self.blocked_contacts:
self.blocked_contacts.append(jid)
+ contact_list = app.contacts.get_contacts(self.name, jid)
+ for contact in contact_list:
+ contact.show = 'offline'
for jid in obj.unblocked_jids:
if jid in self.blocked_contacts:
self.blocked_contacts.remove(jid)
+ # Send a presence Probe to get the current Status
+ probe = nbxmpp.Presence(jid, 'probe', frm=self.get_own_jid())
+ self.connection.send(probe)
def _nec_stream_other_host_received(self, obj):
if obj.conn.name != self.name:
=====================================
gajim/groupchat_control.py
=====================================
--- a/gajim/groupchat_control.py
+++ b/gajim/groupchat_control.py
@@ -2613,7 +2613,12 @@ class GroupchatControl(ChatControlBase):
item = xml.get_object('block_menuitem')
item2 = xml.get_object('unblock_menuitem')
- if helpers.jid_is_blocked(self.account, fjid):
+ if not app.connections[self.account].privacy_rules_supported:
+ item2.set_no_show_all(True)
+ item.set_no_show_all(True)
+ item.hide()
+ item2.hide()
+ elif helpers.jid_is_blocked(self.account, fjid):
item.set_no_show_all(True)
item.hide()
id_ = item2.connect('activate', self.on_unblock, nick)
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/2446c7e3ed969e0426e4dae446fffd27a…
---
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/2446c7e3ed969e0426e4dae446fffd27a…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
64d3bf63 by Philipp Hörist at 2017-10-15T00:52:34+02:00
Discover PEP on the account jid
see: https://xmpp.org/extensions/xep-0163.html#support
- - - - -
2e9de770 by Philipp Hörist at 2017-10-15T01:56:52+02:00
Remove discovery of generic pubsub support
We use PubSub only on our account jid, this use case is what PEP
was made for. If PEP is discovered we know that certain PubSub
features are supported, see: https://xmpp.org/extensions/xep-0163.html#defaults
The current check for <feature var='http://jabber.org/protocol/pubsub'/>
is pretty useless, as it just tells us that there is a PubSub implementation
but not much about the features. Only `publish` and `subscribe` are MUST
in XEP-0060 which is not enough for our needs.
If there is ever need to discover a generic PubSub implementation
that is not PEP we should check for all the PubSub features we need
instead of only for <feature var='http://jabber.org/protocol/pubsub'/>
- - - - -
3 changed files:
- gajim/common/connection.py
- gajim/groupchat_control.py
- gajim/server_info.py
Changes:
=====================================
gajim/common/connection.py
=====================================
--- a/gajim/common/connection.py
+++ b/gajim/common/connection.py
@@ -670,7 +670,6 @@ class Connection(CommonConnection, ConnectionHandlers):
self.music_track_info = 0
self.location_info = {}
- self.pubsub_supported = False
self.register_supported = False
self.pubsub_publish_options_supported = False
# Do we auto accept insecure connection
@@ -1914,28 +1913,25 @@ class Connection(CommonConnection, ConnectionHandlers):
self.archiving_supported = True
self.archiving_313_supported = True
get_action(self.name + '-archive').set_enabled(True)
+ for identity in obj.identities:
+ if identity['category'] == 'pubsub':
+ self.pep_supported = identity.get('type') == 'pep'
+ break
+ if nbxmpp.NS_PUBSUB_PUBLISH_OPTIONS in obj.features:
+ self.pubsub_publish_options_supported = True
+ else:
+ # Remove stored bookmarks accessible to everyone.
+ self.send_pb_purge(our_jid, 'storage:bookmarks')
+ self.send_pb_delete(our_jid, 'storage:bookmarks')
if obj.fjid == hostname:
if nbxmpp.NS_SECLABEL in obj.features:
self.seclabel_supported = True
- for identity in obj.identities:
- if identity['category'] == 'pubsub' and identity.get(
- 'type') == 'pep':
- self.pep_supported = True
- break
if nbxmpp.NS_VCARD in obj.features:
self.vcard_supported = True
get_action(self.name + '-profile').set_enabled(True)
if nbxmpp.NS_REGISTER in obj.features:
self.register_supported = True
- if nbxmpp.NS_PUBSUB in obj.features:
- self.pubsub_supported = True
- if nbxmpp.NS_PUBSUB_PUBLISH_OPTIONS in obj.features:
- self.pubsub_publish_options_supported = True
- else:
- # Remove stored bookmarks accessible to everyone.
- self.send_pb_purge(our_jid, 'storage:bookmarks')
- self.send_pb_delete(our_jid, 'storage:bookmarks')
if nbxmpp.NS_BLOCKING in obj.features:
self.blocking_supported = True
if nbxmpp.NS_ADDRESS in obj.features:
@@ -2364,8 +2360,7 @@ class Connection(CommonConnection, ConnectionHandlers):
return
if storage_type != 'xml':
- pubsub = self.pubsub_supported or self.pep_supported
- if pubsub and self.pubsub_publish_options_supported:
+ if self.pep_supported and self.pubsub_publish_options_supported:
self.send_pb_retrieve('', 'storage:bookmarks')
app.log('bookmarks').info('Request Bookmarks (PubSub)')
# some server (ejabberd) are so slow to answer that we
@@ -2423,8 +2418,7 @@ class Connection(CommonConnection, ConnectionHandlers):
storage_node = self.get_bookmarks_storage_node()
if storage_type != 'xml':
- pubsub = self.pubsub_supported or self.pep_supported
- if pubsub and self.pubsub_publish_options_supported:
+ if self.pep_supported and self.pubsub_publish_options_supported:
self.send_pb_publish(
'', 'storage:bookmarks', storage_node, 'current',
options=self.get_bookmark_publish_options())
=====================================
gajim/groupchat_control.py
=====================================
--- a/gajim/groupchat_control.py
+++ b/gajim/groupchat_control.py
@@ -354,7 +354,7 @@ class GroupchatControl(ChatControlBase):
img.set_from_icon_name('bookmark-new', Gtk.IconSize.MENU)
widget.set_sensitive(
app.connections[self.account].private_storage_supported or \
- (app.connections[self.account].pubsub_supported and \
+ (app.connections[self.account].pep_supported and \
app.connections[self.account].pubsub_publish_options_supported))
widget.show()
@@ -971,7 +971,7 @@ class GroupchatControl(ChatControlBase):
notify_menuitem.set_active(app.config.get_per('rooms', self.contact.jid,
'notify_on_all_messages'))
conn = app.connections[self.account]
- if not conn.private_storage_supported and (not conn.pubsub_supported or \
+ if not conn.private_storage_supported and (not conn.pep_supported or \
not conn.pubsub_publish_options_supported):
bookmark_room_menuitem.set_sensitive(False)
if app.gc_connected[self.account][self.room_jid]:
=====================================
gajim/server_info.py
=====================================
--- a/gajim/server_info.py
+++ b/gajim/server_info.py
@@ -118,9 +118,8 @@ class ServerInfoDialog(Gtk.Dialog):
Feature('XEP-0016: Privacy Lists', con.privacy_rules_supported, None),
Feature('XEP-0045: Multi-User Chat', con.muc_jid, None),
Feature('XEP-0054: vcard-temp', con.vcard_supported, None),
- Feature('XEP-0060: PubSub', con.pubsub_supported, None),
- Feature('XEP-0060: Publish Options', con.pubsub_publish_options_supported, None),
Feature('XEP-0163: Personal Eventing Protocol', con.pep_supported, None),
+ Feature('XEP-0163: #publish-options', con.pubsub_publish_options_supported, None),
Feature('XEP-0191: Blocking Command', con.blocking_supported, nbxmpp.NS_BLOCKING),
Feature('XEP-0198: Stream Management', con.sm.enabled, nbxmpp.NS_STREAM_MGMT),
Feature('XEP-0280: Message Carbons', con.carbons_enabled, nbxmpp.NS_CARBONS),
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/16ad6080663e575be1367bcc35d446d51…
---
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/16ad6080663e575be1367bcc35d446d51…
You're receiving this email because of your account on dev.gajim.org.