Operations on the database are not cancellable, so we need to ensure any
critical code (such as database migration) has completed.
Otherwise we risk leaving the database in a locked state (or worse):
WARNING **: 09:24:53.428: Failed to determine schema version: sqlite3_prepare_v2 failed: database is locked: CREATE TABLE IF NOT EXISTS _gom_version (version INTEGER);
It has been reported that the BM818 sometimes unexpectedly
changes the call state from "active" back to "ringing-in"
(as reported by ModemManager) shortly after accepting an incoming call.
ModemManager[734]: <info> [modem1/call1] user request to accept call
ModemManager[734]: <info> [modem1/call1] call is accepted
ModemManager[734]: <info> [modem1/call1] call state changed: ringing-in -> active (accepted)
ModemManager[734]: <info> [modem1/call1] call state changed: active -> ringing-in (unknown)
This leads to a failed assertion and program termination.
Instead of crashing raising a critical warning is more appropriate
and may allow the user to pick up the call after all.
Closes: #547
self->best_match is never NULL:
The test suite used to wrap calls_contacts_provder_new() to always return
NULL which in turn caused the best match to be NULL.
This was done to avoid warnings raised by libfolks
about missing the primary store (eds).
This is no longer necessary as the environment now tells folks which
backend to use.
self->best_match is never NULL:
The test suite used to wrap calls_contacts_provder_new() to always return
NULL which in turn caused the best match to be NULL.
This was done to avoid warnings raised by libfolks
about missing the primary store (eds).
This is no longer necessary as the environment now tells folks which
backend to use.
self->best_match is never NULL:
The test suite used to wrap calls_contacts_provder_new() to always return
NULL which in turn caused the best match to be NULL.
This was done to avoid warnings raised by libfolks
about missing the primary store (eds).
This is no longer necessary as the environment now tells folks which
backend to use.
The windows need to be removed from the GtkApplication because they are
holding references to the application which prevents proper cleanup.
Fixes: #508
As libfeedback uses GDbusProxy under the hood which defaults to timing
out after 25 seconds there is no need to handle timeouts explicitly.
Furthermore 1 second seems to not always be enough time to get a
response which leads to endless ringing.
Fixes#543
There is no need to enable or disable actions until the popover
is actually presented.
This also get's rid of having to be notified of changes to the
"can-add-contact" property which led to a segfault as the signal handler
was not properly cleared.
Fixes: #535
As the "can-add-contact" property is now always checked,
the menu item will be properly shown.
Fixes: #485
_GNU_SOURCE is needed for strcasestr().
The macro should be defined before including any headers. This broke
recently because glib.h seems to include string.h now.
Using rescan allows use to give a priority to search paths. So this way
plugins in `CALLS_PLUGIN_DIR` take precedence over plugins we ship.
This also makes sure that the plugin test searches in the same location
as CallsManager.
When the only feedback of an event is unavailable on a system (e.g. no
vibration motor or LED) the "feedback-ended" signal is emitted
immediately and the end reason will be LFB_EVENT_END_REASON_NOT_FOUND.
In this case we need to change the target state, so that our logic does
not end up retriggering the event infinitely.
Previously our code assumed that g_cancellable_cancel() the async DBus
calls to libfeedback would guarantee that the underlying operation would
not be performed (i.e. triggering or ending a feedback).
However the endless ringing exhibited in #470 shows this assumption not
to hold. Therefore we avoid using g_cancellable_cancel () completely and
default to waiting for the async operation to finish.
update_ring () now sets the target state by inspecting managed calls and
the main logic will now step towards the target state:
Changing from regular/loud to soft/quiet ringing (or vice versa)
requires we first end feedback before (re)triggering it.
Additionally the "is-quiet" and "is-ringing" properties are replaced by
a new "state" property to allow changing the combination atomically.
Closes: #470
Under normal conditions it is not expected that whether we can add
contacts or not (based on the presence of the appropriate action on
gnome-contacts) changes.
Nevertheless it can be beneficial for debugging when installing patched
and unpatched versions of gnome-contacts.
Since it works for GListModel rename it appropriately.
It used to provide an inline implementation for g_list_store_find()
behind a glib version guard, but we bumped minimum version in
cfd3c2a7fe
so the docstring was updated and made more succinct.
If another instance of calls was already running, invoking calls with
`-v` flag would set the verbosity for the newly created process and then
exit if it was not the primary instance.
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
Leave the LfbEvent self->event alive in dispose()
to give potentially pending GAsyncReadyCallback invocations
or running GSources a better chance of finishing gracefully.
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