Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
1c0787e5 by wurstsalat at 2022-01-19T23:33:43+01:00
Accounts: Fix trailing whitespace
- - - - -
1 changed file:
- gajim/gtk/accounts.py
Changes:
=====================================
gajim/gtk/accounts.py
=====================================
@@ -832,7 +832,7 @@ def __init__(self, account: str) -> None:
'chat_history_max_age',
props={'entries': history_max_age},
desc=_('How long Gajim should keep your chat history')),
-
+
Setting(SettingKind.ACTION,
_('Export Chat History'),
SettingType.ACTION,
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/1c0787e51423bb90d6a69a848319a900…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/1c0787e51423bb90d6a69a848319a900…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
4dff3a2d by lovetox at 2022-01-18T13:40:21+01:00
Revert behavior of write_file_async()
Seems Python collects variables as soon as they are not needed
anymore, even if the function has not ended.
This means we have to someway use `data` even with nested function
callbacks.
- - - - -
1 changed file:
- gajim/common/helpers.py
Changes:
=====================================
gajim/common/helpers.py
=====================================
@@ -1280,7 +1280,8 @@ def write_file_async(
user_data: Optional[Any] = None):
def _on_write_finished(outputstream: Gio.OutputStream,
- result: Gio.AsyncResult) -> None:
+ result: Gio.AsyncResult,
+ _data: bytes) -> None:
try:
successful, _bytes_written = outputstream.write_all_finish(result)
except GLib.Error as error:
@@ -1295,10 +1296,14 @@ def _on_file_created(file: Gio.File, result: Gio.AsyncResult) -> None:
callback(False, error, user_data)
return
+ # Pass data as user_data to the callback, because
+ # write_all_async() takes no reference to the data
+ # and python gc collects it before the data is written
outputstream.write_all_async(data,
GLib.PRIORITY_DEFAULT,
None,
- _on_write_finished)
+ _on_write_finished,
+ data)
file = Gio.File.new_for_path(str(path))
file.create_async(Gio.FileCreateFlags.PRIVATE,
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/4dff3a2dd4e95e9de3eba9c69398bef9…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/4dff3a2dd4e95e9de3eba9c69398bef9…
You're receiving this email because of your account on dev.gajim.org.