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.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
7ad6a28e by Philipp Hörist at 2018-07-26T15:27:56Z
Fix event name
- - - - -
1 changed file:
- gajim/common/modules/mam.py
Changes:
=====================================
gajim/common/modules/mam.py
=====================================
--- a/gajim/common/modules/mam.py
+++ b/gajim/common/modules/mam.py
@@ -581,7 +581,7 @@ class MamMessageReceivedEvent(NetworkIncomingEvent):
class MamGcMessageReceivedEvent(NetworkIncomingEvent):
- name = 'mam-message-received'
+ name = 'mam-gc-message-received'
class MamDecryptedMessageReceived(NetworkIncomingEvent):
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/7ad6a28e128042a423dc421c37c30cc49f…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/7ad6a28e128042a423dc421c37c30cc49f…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
313b913a by Philipp Hörist at 2018-07-25T21:17:12Z
Dont get own avatar_sha from contacts
- - - - -
1 changed file:
- gajim/gtk/profile.py
Changes:
=====================================
gajim/gtk/profile.py
=====================================
--- a/gajim/gtk/profile.py
+++ b/gajim/gtk/profile.py
@@ -156,12 +156,13 @@ class ProfileWindow(Gtk.ApplicationWindow):
menu = Gtk.Menu()
nick = app.config.get_per('accounts', self.account, 'name')
- sha = app.contacts.get_avatar_sha(self.account, self.jid)
+ if self.avatar_sha is None:
+ return
menuitem = Gtk.MenuItem.new_with_mnemonic(_('Save _As'))
menuitem.connect(
'activate',
gtkgui_helpers.on_avatar_save_as_menuitem_activate,
- sha, nick)
+ self.avatar_sha, nick)
menu.append(menuitem)
menu.connect('selection-done', lambda w: w.destroy())
# show the menu
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/313b913ae4867eec76294f9efef7eb1c61…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/313b913ae4867eec76294f9efef7eb1c61…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
cf580c62 by Philipp Hörist at 2018-07-25T17:33:03Z
Discover httpupload also on the user domain
- - - - -
2 changed files:
- gajim/common/modules/discovery.py
- gajim/common/modules/httpupload.py
Changes:
=====================================
gajim/common/modules/discovery.py
=====================================
--- a/gajim/common/modules/discovery.py
+++ b/gajim/common/modules/discovery.py
@@ -190,6 +190,7 @@ class Discovery:
self._con.get_module('VCardTemp').pass_disco(from_, *args)
self._con.get_module('Carbons').pass_disco(from_, *args)
self._con.get_module('PrivacyLists').pass_disco(from_, *args)
+ self._con.get_module('HTTPUpload').pass_disco(from_, *args)
identities, features, data, node = args
if nbxmpp.NS_REGISTER in features:
=====================================
gajim/common/modules/httpupload.py
=====================================
--- a/gajim/common/modules/httpupload.py
+++ b/gajim/common/modules/httpupload.py
@@ -106,7 +106,6 @@ class HTTPUpload:
for ctrl in app.interface.msg_win_mgr.get_controls(acct=self._account):
ctrl.update_actions()
- raise nbxmpp.NodeProcessed
def handle_outgoing_stanza(self, event):
if event.conn.name != self._account:
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/cf580c62de1e850bb15da7d2de4d9adc19…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/cf580c62de1e850bb15da7d2de4d9adc19…
You're receiving this email because of your account on dev.gajim.org.