Daniel Brötzmann pushed to branch mainwindow at gajim / gajim


Commits:
3245e591 by wurstsalat at 2021-10-28T23:49:48+02:00
CSS: Remove row backdrop transition (performance)

- - - - -
8c792a98 by wurstsalat at 2021-10-28T23:50:08+02:00
StatusIcon: Remove superfluous show_all

- - - - -
0957fd57 by wurstsalat at 2021-10-29T00:19:54+02:00
ChatList: Use MAM timestamp for MAM messages

- - - - -
5e9d207f by wurstsalat at 2021-10-29T00:21:51+02:00
ChatList: Don't use idle_add for set_message_text

- - - - -


3 changed files:

- gajim/data/style/gajim.css
- gajim/gtk/chat_list.py
- gajim/gtk/status_icon.py


Changes:

=====================================
gajim/data/style/gajim.css
=====================================
@@ -40,6 +40,8 @@ .message-input-focus {
     border-radius: 4px;
 }
 
+row:backdrop { transition: none; }
+
 .conversation-row:hover button {
     opacity: 1;
 }


=====================================
gajim/gtk/chat_list.py
=====================================
@@ -326,9 +326,11 @@ def _on_message_received(self, event):
         row = self._chats.get((event.account, event.jid))
         nick = self._get_nick_for_received_message(event)
         row.set_nick(nick)
-        row.set_timestamp(event.properties.timestamp)
-        GLib.idle_add(
-            row.set_message_text, event.msgtxt, event.additional_data)
+        if event.name == 'mam-message-received':
+            row.set_timestamp(event.properties.mam.timestamp)
+        else:
+            row.set_timestamp(event.properties.timestamp)
+        row.set_message_text(event.msgtxt, event.additional_data)
         self._add_unread(row, event.properties)
         self.invalidate_sort()
 
@@ -349,8 +351,7 @@ def _on_message_sent(self, event):
 
         # Set timestamp if it's None (outgoing MUC messages)
         row.set_timestamp(event.timestamp or time.time())
-        GLib.idle_add(
-            row.set_message_text, event.message, event.additional_data)
+        row.set_message_text(event.message, event.additional_data)
         self.invalidate_sort()
 
     @staticmethod
@@ -437,8 +438,7 @@ def __init__(self, workspace_id, account, jid, type_, 
pinned):
         # Get last chat message from archive
         line = app.storage.archive.get_last_conversation_line(account, jid)
         if line is not None and line.message is not None:
-            GLib.idle_add(
-                self.set_message_text, line.message, line.additional_data)
+            self.set_message_text(line.message, line.additional_data)
             if line.kind in (KindConstant.CHAT_MSG_SENT,
                              KindConstant.SINGLE_MSG_SENT):
                 self._ui.nick_label.set_text(_('Me:'))


=====================================
gajim/gtk/status_icon.py
=====================================
@@ -233,7 +233,6 @@ def _on_activate(self, *args):
             app.window.hide()
             return
 
-        app.window.show_all()
         if not app.window.get_property('visible'):
             # Window was minimized
             restore_main_window_position()



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/compare/451cf7d5c1a2848d0dd0566abceb9b7ddfc3d10c...5e9d207fdf31a1e9f3cc8111f6c27dedab79b193

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/compare/451cf7d5c1a2848d0dd0566abceb9b7ddfc3d10c...5e9d207fdf31a1e9f3cc8111f6c27dedab79b193
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to