Philipp Hörist pushed to branch master at gajim / gajim
Commits:
394d38e6 by Philipp Hörist at 2018-07-29T20:16:06Z
Add lost server discovery query
- - - - -
1 changed file:
- gajim/common/connection.py
Changes:
=====================================
gajim/common/connection.py
=====================================
--- a/gajim/common/connection.py
+++ b/gajim/common/connection.py
@@ -1456,6 +1456,7 @@ class Connection(CommonConnection, ConnectionHandlers):
# This starts the connect_machine
self.get_module('Discovery').discover_server_info()
self.get_module('Discovery').discover_account_info()
+ self.get_module('Discovery').discover_server_items()
self.sm.resuming = False # back to previous state
# Discover Stun server(s)
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/394d38e663098199bcef6f9340337df3ab…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/394d38e663098199bcef6f9340337df3ab…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
80aee95f by Philipp Hörist at 2018-07-29T17:35:45Z
Reset connect_maschine after disconnect on purpose
- - - - -
1 changed file:
- gajim/common/modules/discovery.py
Changes:
=====================================
gajim/common/modules/discovery.py
=====================================
--- a/gajim/common/modules/discovery.py
+++ b/gajim/common/modules/discovery.py
@@ -179,6 +179,7 @@ class Discovery:
self._con.get_module('PubSub').pass_disco(from_, *args)
def discover_server_info(self):
+ # Calling this method starts the connect_maschine()
server = self._con.get_own_jid().getDomain()
self.disco_info(server, success_cb=self._server_info_received)
@@ -199,7 +200,7 @@ class Discovery:
if nbxmpp.NS_ADDRESS in features:
self._con.addressing_supported = True
- self._con.connect_machine()
+ self._con.connect_machine(restart=True)
def _parse_transports(self, from_, identities, features, data, node):
for identity in identities:
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/80aee95f2ec38dfea321adbfc8c0161f49…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/80aee95f2ec38dfea321adbfc8c0161f49…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
4686bcb8 by Philipp Hörist at 2018-07-29T10:16:41Z
Dont idle draw avatars and pep images
The model is detached from the treeview at start, so put all
avatars into the model before we attach it again.
Only draw PEP images when we receiv them. We dont save them to the
database so it makes no sense to try and draw them on start.
- - - - -
1 changed file:
- gajim/roster_window.py
Changes:
=====================================
gajim/roster_window.py
=====================================
--- a/gajim/roster_window.py
+++ b/gajim/roster_window.py
@@ -396,10 +396,12 @@ class RosterWindow:
# Do not confuse get_contact_iter: Sync groups of family members
contact.groups = big_brother_contact.groups[:]
+ image = self._get_avatar_image(account, contact.jid)
+
for child_iter in parent_iters:
it = self.model.append(child_iter, [None,
contact.get_shown_name(), 'contact', contact.jid, account,
- None, None, None, None, None, None, visible] + \
+ None, None, None, None, image, None, visible] + \
[None] * self.nb_ext_renderers)
added_iters.append(it)
if contact.jid in self._iters[account]['contacts']:
@@ -424,11 +426,13 @@ class RosterWindow:
else:
typestr = 'contact'
+ image = self._get_avatar_image(account, contact.jid)
+
# we add some values here. see draw_contact
# for more
i_ = self.model.append(child_iterG, [None,
contact.get_shown_name(), typestr, contact.jid, account,
- None, None, None, None, None, None, visible] + \
+ None, None, None, None, image, None, visible] + \
[None] * self.nb_ext_renderers)
added_iters.append(i_)
if contact.jid in self._iters[account]['contacts']:
@@ -1399,16 +1403,21 @@ class RosterWindow:
for child_iter in iters:
self.model[child_iter][model_column] = pixbuf
+ def _get_avatar_image(self, account, jid):
+ if not app.config.get('show_avatars_in_roster'):
+ return None
+ scale = self.window.get_scale_factor()
+ surface = app.contacts.get_avatar(
+ account, jid, AvatarSize.ROSTER, scale)
+ return Gtk.Image.new_from_surface(surface)
+
def draw_avatar(self, jid, account):
iters = self._get_contact_iter(jid, account, model=self.model)
if not iters or not app.config.get('show_avatars_in_roster'):
return
jid = self.model[iters[0]][Column.JID]
+ image = self._get_avatar_image(account, jid)
- scale = self.window.get_scale_factor()
- surface = app.contacts.get_avatar(
- account, jid, AvatarSize.ROSTER, scale)
- image = Gtk.Image.new_from_surface(surface)
for child_iter in iters:
self.model[child_iter][Column.AVATAR_IMG] = image
return False
@@ -1417,10 +1426,10 @@ class RosterWindow:
contact_instances = app.contacts.get_contacts(account, jid)
contact = app.contacts.get_highest_prio_contact_from_contacts(
contact_instances)
- self.draw_contact(jid, account, contact_instances=contact_instances,
+ self.draw_contact(
+ jid, account,
+ contact_instances=contact_instances,
contact=contact)
- self.draw_all_pep_types(jid, account, contact=contact)
- self.draw_avatar(jid, account)
def adjust_and_draw_contact_context(self, jid, account):
"""
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/4686bcb8ca39f88170a268c4df70cb4a7e…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/4686bcb8ca39f88170a268c4df70cb4a7e…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
b913d274 by Philipp Hörist at 2018-07-28T11:23:49Z
Improve speed of loading roster
- - - - -
1 changed file:
- gajim/roster_window.py
Changes:
=====================================
gajim/roster_window.py
=====================================
--- a/gajim/roster_window.py
+++ b/gajim/roster_window.py
@@ -2603,7 +2603,7 @@ class RosterWindow:
def _nec_roster_received(self, obj):
if obj.received_from_server:
self.fill_contacts_and_groups_dicts(obj.roster, obj.conn.name)
- self.add_account_contacts(obj.conn.name, improve_speed=False)
+ self.add_account_contacts(obj.conn.name)
self.fire_up_unread_messages_events(obj.conn.name)
else:
# add self contact
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/b913d2745b454010a38fb9913d09835eb8…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/b913d2745b454010a38fb9913d09835eb8…
You're receiving this email because of your account on dev.gajim.org.