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
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
They are phased out in favour of their newly introduced ui-call-* pendants.
This was done to have a better separation of concerns and allows for some
cleanup in CallsCall.
Closes#397
This function is used in the activate callback for the per protocol dial actions
to choose the correct origin to place a call from. If an origin cannot be found
it will return NULL which will lead to the fallback "app.dial" action being
invoked.
The id property will be used to keep track of which origin was used for a call,
so that we can default to reusing the same origin when placing a call from the
history.
Previously cui_call_get_display_name() would return the ID of the caller if no
contact was found. As this has changed recently the test for got_contact broke.
Shuffles some code around so that the property bindings are at the end.
This allows us to return early if there is a NULL contact (as is the case
for anonymous callers).
This allows to get rid of any special casing that the users of the
calls_best_match_get_name() and calls_best_match_get_id() had to do previously.
We also allow passing in NULL for *_get_primary_info ()
and *_get_secondary_info () for the anonymous caller case.
The designs for the call details show information on the type of the call:
https://gitlab.gnome.org/Teams/Design/app-mockups/blob/master/calls/calls.png
So f.e. "Cellular", "Matrix WebRTC Video Call".
These properties can potentially also be useful in choosing the mechanism to
use for the audio controls from the call display.
This was handled explicitly in the Call window.
By changing the logic to delay the emission of "ui-call-removed" we make sure
that the Call UI and the exported DBus object is consistent.
We also need to change the test cases to use run a GMainLoop because we now have
to wait until signal comes in.
This "ui-active" property should be set to FALSE for new incoming calls and set
to TRUE after a short delay of 20ms. This property is used to delay showing the
call display and starting to ring.
This delay gives DBus clients like
phosh-antispam (https://gitlab.com/kop316/phosh-antispam)
some time to make a decision whether a call should be hung up or not and defer
starting to ring and showing the display only afterwards.
When introducing the per protocol dial actions we started setting the widget
self->target as the action target instead of the target property of
self->record.
Bizzarely we only sometimes got greeted with a critical:
11:30:20.5184 GLib[887977]:CRITICAL: g_variant_new_string: assertion 'g_utf8_validate (string, -1, NULL)' failed
Thread 1 "gnome-calls" received signal SIGTRAP, Trace/breakpoint trap.
g_logv (log_domain=0x7ffff7ea400e "GLib", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=<optimized out>) at ../../../glib/gmessages.c:1417
1417 ../../../glib/gmessages.c: No such file or directory.
(gdb) bt
at ../../../glib/gmessages.c:2898
Fixes: 687dd7ff383476523ae0a8a38879a171cb0b9a5a
Closes#398