Leave the LfbEvent self->event alive in dispose()
to give potentially pending GAsyncReadyCallback invocations
or running GSources a better chance of finishing gracefully.
If calls was already running as a daemon it and were invoked again with
`--daemon` it ended up showing the UI.
Now we always set the `daemon` variable and simplify activation logic as
a side effect.
Fixes#500
This helps avoiding some log spam when scrolling to the bottom:
16:29:17.1053 CallsHistoryBox[2798409]: DEBUG: Increasing history slice from 1825 to 1875
16:29:17.1215 CallsHistoryBox[2798409]: DEBUG: Increasing history slice from 1875 to 1925
16:29:20.6739 CallsHistoryBox[2798409]: DEBUG: Increasing history slice from 1925 to 1975
16:29:23.1919 CallsHistoryBox[2798409]: DEBUG: Increasing history slice from 1975 to 2025
16:29:24.2533 CallsHistoryBox[2798409]: DEBUG: Increasing history slice from 2025 to 2075
for a history of ~1400 records.
The slice get's increased by 50 items if scrolled to the bottom
and reset to the initial 75 items if scrolled back to the top.
The defined threshholds make sure that the UX still feels smooth.
Having more than ~200 widgets in a GtkListBox comes with a very
performance impact. This is especially noticable during while the main
window is being realized (even if Calls already runs in daemon mode).
We can limit the amount of widgets by using a slice list model.
Fixes: #374
The volatile qualifier was mostly used for historical reasons,
the documentation for `g_once_init_enter()` and `g_once_init_leave()`
has the following to say:
While `location` has a `volatile` qualifier,
this is a historical artifact and the pointer passed to it
should not be volatile.
See also https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719
This is an exact copy from GTK4.
as grabbed by chattys commit 1ed5084fb965908e3ee0304781b0de06479c869b
Slightly adapted for Calls.
Based on GTKs 01bd4cc4e18a1ea697fe61791ba710d0d55e8290
It's common to have spaces or other separator characters in telephone
numbers. If tel: link (example: tel:+1 855-698-1150) is clicked in browser all
unsupported characters are escaped (example: tel:+1%20(855)%20698-11-50).
15 ms does not seem to be enough time for phosh-antispam to be able
to hang up before the incoming call screen shows up. In my experiement,
90 looks to be the minimum time needed for the incoming call to not show up.
I put it to 100 ms just to be safe.
Key exchanges in SDES can only be done securely with TLS and the option
is disabled by default if not using TLS as the transport protocol.
This setting allows to override this behaviour if the user desires
it (f.e. if the user considers the network his packets go through to be trusted).
by adding functions to the public API which determine if state changes
should be shown to the user and use them (instead of duplicating similar
logic).
When trying to go online/offline we're always waiting for confirmation
from the stack (even if it's a timeout) so the delayed pattern is a good choice.
This breaks the settings binding cycle for the "autoload-plugins" and
"preferred-audio-codecs" settings which went something like this:
g_settings_bind () is used with
G_SETTINGS_BIND_DEFAULT (G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET).
It grabs the value of our setting and sets it for the bound property.
This emits the notify signal causing the same value to be set for the
setting.
In effect this caused the setting to be marked as non-default because
Calls had changed the setting without user action. This caused updated
defaults not to apply for existing installations.
We only have a single source of settings, so we should reflect that by
using a singleton. This also reduces our LoC.
This doesn't impair our ability to run tests because there we run with
GSETTINGS_BACKEND=memory