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


Commits:
54e1e89e by wurstsalat at 2023-05-21T23:56:57+02:00
cfix: XMLConsole: Fix typo in log formatting

- - - - -
a7c7b9d3 by wurstsalat at 2023-05-21T23:56:57+02:00
cfix: XMLConsole: Set filtering attributes correctly

- - - - -


1 changed file:

- gajim/gtk/xml_console.py


Changes:

=====================================
gajim/gtk/xml_console.py
=====================================
@@ -187,7 +187,7 @@ def _create_tags(self) -> None:
 
     def _add_log_record(self, record: logging.LogRecord) -> None:
         buf = self._ui.log_view.get_buffer()
-        msg = (f'{record.asctime} {record.levelname} {record.name}: '
+        msg = (f'{record.asctime} {record.levelname} {record.name} '
                f'{record.getMessage()}\n')
         end_iter = buf.get_end_iter()
         buf.insert(end_iter, msg)
@@ -462,7 +462,7 @@ def _set_account(self, value: str, _data: Any) -> None:
                 tag.set_property('invisible', account != value)
 
     def _on_setting(self, value: bool, data: str) -> None:
-        setattr(self, data, value)
+        setattr(self, f'_{data}', value)
         value = not value
         table = self._ui.protocol_view.get_buffer().get_tag_table()
         tag = table.lookup(data)
@@ -515,13 +515,13 @@ def _print_stanza(self,
         elif stanza.startswith('<r') or stanza.startswith('<a'):
             type_ = 'stream'
 
-        stanza = '<!-- {kind} {time} ({account}) -->\n{stanza}\n\n'.format(
+        text = '<!-- {kind} {time} ({account}) -->\n{stanza}\n\n'.format(
             kind=kind.capitalize(),
             time=time.strftime('%c'),
             account=account_label,
             stanza=stanza)
         buffer_.insert_with_tags_by_name(
-            end_iter, stanza, type_, kind, event.account)
+            end_iter, text, type_, kind, event.account)
 
         if is_at_the_end:
             GLib.idle_add(scroll_to_end, self._ui.scrolled)



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/compare/62ad4d8f674632e2225612d04d7c95d0a122cc84...a7c7b9d3cc7aa0c2218f049ff36d664bc3430370

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/compare/62ad4d8f674632e2225612d04d7c95d0a122cc84...a7c7b9d3cc7aa0c2218f049ff36d664bc3430370
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