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
By connecting to the "ui-call-added" and "ui-call-removed" signals instead of
"call-add" and "call-remove".
This allows us to shave off a few lines of code.
This is part of a refactoring which should help separating concerns between
CallsCall and CallsUiCallData better.
To accomplish this we want to stop passing around CallsCall objects and instead
pass CallsUiCallData objects.
In this commit we added new signals instead of changing the existing ones
because that results in a lot of churn. It allows to do the switch per module
allowing smaller individual patches and a more manageable patchset.
These are enabled or disabled based on availability of suitable origins.
Allows CallsCallRecordRows (GtkListBoxRows in the call history) to use protocol
specific instead of global dial action.
Closes#307
This simplifies the code quite a bit by removing the supported protocols from
being determined dynamically via the loaded plugins.
It was previously used to add/remove a GListStore to origins_by_protocol.
This is a prerequisite for having per protocol dial actions.
We already had our mapping between CallsCallStates and CuiCallStates in place,
but the _DIALING state got renamed to _CALLING.
Additionally bundle CallsCallStates that map to the same CuiCallState to remove
some code.
g_settings_get_string() and g_settings_get_strv() are transfer full,
so we should use g_value_take_string() instead of g_value_set_string() and
g_value_take_boxed() instead of g_value_set_boxed()
This is needed to make sure the object stays alive, because some implementations
will unref the call after it has been set to a disconnected state.
This has become apparent because tests started failing when origins switched
from the "state-changed" to the "notify::state" signal (as is done in the next
commits).
As this requires a patched GNOME Contacts, we want to be able to query if the
necessary actions to add new contacts is available before trying to use it.
Not all portions from the user interface are listening directly to messages from
accounts, so the manager should propagate them to allow the UI to pick them up.
Closes#340
Introduce a state-changed signal which also gives a reason for why the state
changed. This will allow the UI to give some meaningful feedback to the user.
Additionally we can get rid of a number of things that were not really states,
but rather reasons for why a state changed (f.e. authentication failures).