This interface should be implemented by origins which represent an online
account. This means they must have a implement a property representing the
credentials and another representing the account state (online, offline, etc).
This should make sure that we always have 'config.h' available and
should fix issues with flatpak build as seen in #257:
`fatal error: config.h: No such file or directory`
While these macros are not too bad, they will still be removed for the sake
of consistency (no other purism project uses macros this heavily).
Fixes part of #214
This is a bit of a hack to get the country code property hooked up
and will require a rework when multiple provider support is being added.
As the default origin is not being used anywhere else in the code
it's currently not a problem that we're not tracking if the default
origin is being removed.
Additionally test-manager.c needed some adjustment.
Shorten the needed sources from
calls_sources, calls_enum_sources, calls_resources,
wl_proto_sources, wayland_sources,
to
calls_sources
so adding new things such as generated dbus sources doesn't have to
happen in four locations but just one.
Simply return NULL when these methods are called.
If not implemented, calling these methods may result
in crash when the subclasses haven't implemented them.
IPv6 should work, but sofia's outbound engine keep printing
errors involving the outbound engine. Working theory:
Failing ICMPv6 (pings) can make sofia think we don't have connectivity.
Note that we also don't get any answers from the SIP servers we tried so far.
The upper layers do not bother whether there's an inhibitor when
calling uninhibit (and shouldn't) so don't put out out warning
when called with 0 cookie.
Closes: #249
Fixes
../src/calls-notifier.c: In function ‘state_changed_cb’:
/usr/include/glib-2.0/glib/gmacros.h:1132:17: warning: ‘notification’ may be used uninitialized in this function [-Wmaybe-uninitialized]
which wasn't problematic with the current code flow but
can easily become a problem when shuffling stuff around.
Calls can't handle multiple calls, so there is no
point in handling all URIs.
Handle opening URI in activate(), which will be helpful
when we use local_command_line()
Also, this commit fixes presenting window on initial
launch of Calls with a “tel:” URI
And adapt to changes
It's easier to track changes if we are using GListModel than
a GList. Also, eventually we shall have multiple providers,
and we can use GtkFlattenListModel to merge multiple origins
without manually managing pointers ourself.
Since several widgets has APIs to handle GListModels, it will
also help us create widgets from GListModels easily.
Currently, when any call is terminated, audio profile/routing is
switched to the default one.
This is a problem when already into a call and getting a second one:
rejecting the new call will keep the first one going, but with the wrong
audio profile, making it difficult (or, on the PinePhone, impossible) to
keep talking.
This patch makes sure there is no other ongoing call before switching
the audio mode, so that it's possible to keep the first call going even
after rejecting the second one.
Because we rename the project and binaries to 'gnome-calls' we want
to make sure that the call history is preserved by doing the following:
If there is an old directory '~/.local/share/calls' try to rename it to
'gnome-calls'. Use new location if it succeeds and fall back to old location if it failed.
GtkApplication by default appends "icons" to the app id and add that
to the icon search path. So let's just use that instead of adding
custom one.
This commit also fixes missing icon for "Add call" button in active
call window
`callaudiod` is a device-agnostic service for routing audio during voice
calls, called through `libcallaudio`.
It allows us to automatically switch profiles when entering a call,
enable the speaker output or mute the microphone, and can therefore be
used to replace the current Librem 5-specific hacks.
For some locales, the buttons' labels can be quite long, making the
window wider than the display.
Using a line wrap will solve this issue when there wouldn't be shorter
translation alternatives. This requires reducing the encryption indicator's
margins so the window height doesn't grow beyond the available display size.
* src/calls-manager.h: Add lookup function to header
* src/calls-manager.c: Implement lookup function to be used for the call
history, call notifier and call display
* src/calls-call-holder.c: Use calls_manager_get_contact_name ()
* src/calls-notifier.c: Use calls_manager_get_contact_name ()
Since passing a CallsContacts pointer down to every class it needs, started to
become laborous - especially since the intermediates classes don't need
the reference themselves - it was made a singleton
* src/calls-contacts.c: Added calls_contacts_get_default () function and
removed calls_contacts_new ()
* src/calls-contacts.h: Added _get_default () prototype and removed the
_new () prototype
* src/calls-application.c: Use calls_contacts_get_default () now
* src/calls-history-box.c: Removed self->contacts completely
* src/calls-history-box.h: Got rid of CallsContacts argument in _new()
* src/calls-main-window.c: Removed self->contacts completely
* src/calls-main-window.h: Got rid of CallsContacts argument in _new()
* src/calls-call-record-row.c: Use calls_contacts_get_default () now
* src/calls-call-record-row.h: Got rid of CallsContacts argument in
_new()
* src/calls-call-holder.c: Use calls_contacts_get_default () now
* src/calls-call-holder.h: Got rid of CallsContacts argument in _new()
* src/calls-call-window.c: Removed self->contacts completely
* src/calls-call-window.h: Got rid of CallsContacts argument in _new()
* src/calls-notifier.c: Use calls_contacts_get_default () now
* src/calls-notifier.h: Got rid of CallsContacts argument in _new()
* src/ui/call-record-row.ui: Add menu, GtkPopover. Surround existing
elements with GtkEventBox to capture longpress/rightclicks
* src/calls-call-record-row.c: Provide functions emiting "call-delete"
signal, add widgets from ui file
* src/calls-record.c: Add "call-delete" signal
* src/calls-history-box.c: Add callback for "call-delete" signal
* src/calls-record-store.c: Add callback for "call-delete" signal
* src/util.c: Add convenience function calls_find_in_store for finding
items in ListModel
* src/util.h: Add declaration of calls_find_in_store
This triggers e.g. haptic feeback as well and can later on be used
for LED feedback.
We can drop the audio theme setting completely since feedbackd picks up
the global GNOME setting.
Since feedbackd currently does not cancel gsound's via a cancellable
this might make the phone ring a bit too long atm but that will be fixed
on the feedbackd side
(https://source.puri.sm/Librem5/feedbackd/-/issues/10)
* meson_options.txt: Added option librem5-hack, defaults to true
* src/meson.build: Added conditional define USE_UGLY_CODE which will be
set when librem5-hack option is used
* src/calls-call-display.c: ifdef'ed ugly_hacks call
This removes the status message at the end of the NewCallBox, since it
will be replaced by a permanent InfoBar.
As a side effect this removes also the disconnect message when a call
ends.
Fixes: https://source.puri.sm/Librem5/calls/issues/119
The manager is a central place for handling data e.g. calls history and
provider managment.
This introduces only the base for feature work. Therefore it manages
only the provider for now, but the manager isn't yet used anywhere.
The propagets events from the provider and origins. It also adds a new
signal called `error`. The `error` signal should be emited only when
something went wrong and we need to inform the user about it, containing
the message to be displayed to the user. Windows should connect to the
event and display a in-app-notification on error. This event isn't
emitted, because the plugins don't give us a usable error.
This is part of a larger refactoring effort, with the goal to replace
all the get_*() member functions in provider abstraction interfaces with
GObject properties. See also: https://source.puri.sm/Librem5/calls/issues/6