Commit Graph
100 Commits
Author SHA1 Message Date
Guido Günther 93e0c72d9f mm-origin: Handle missing SIM case more gracefully
This avoids warnings like

    gnome-calls[57992]: mm_sim_get_imsi: assertion 'MM_IS_SIM (self)' failed
    gnome-calls[57992]: mm_sim_dup_emergency_numbers: assertion 'MM_IS_SIM (self)' failed

in the logs

Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/735>
2024-06-16 15:00:35 +02:00
Guido GüntherandMarge Bot 71f5ffd7dc ci: Update image
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/730>
2024-05-14 08:40:16 +00:00
Guido GüntherandMarge Bot af7388db6c ci: Simplify image updates
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/730>
2024-05-14 08:40:16 +00:00
Guido Günther 34b68ec082 mm-origin: Don't crash when Modem has no location services
When no locationservice is available the API can return `NULL` without
setting an error.

Closes: https://gitlab.gnome.org/GNOME/calls/-/issues/641
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/728>
2024-04-24 16:44:00 +02:00
Guido Günther db9b771c19 Release 46.0
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/725>
2024-03-13 18:01:42 +01:00
Guido GüntherandMarge Bot 831741eecb d/control: Don't require root for building
Helps in ci

Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/723>
2024-03-13 14:50:47 +00:00
Guido GüntherandEvangelos Ribeiro Tzaras 041921ca26 calls-manager: Connect listener past the list model filters
The list model filters connect signal handlers for item-changed to
refilter the list models.

In order to enable protocols based on what the origin supports
`on_origins_changed` needs these filtered results. Since it is a signal
handler by itself connect it late so it runs later in the filter chain.

Closes: https://gitlab.gnome.org/GNOME/calls/-/issues/601
2024-03-13 10:17:16 +00:00
Guido Günther 3a467d85ad emergency-call-types: Add EU countries
They all support 112.
2024-02-10 17:10:14 +01:00
Guido Günther e49cd86035 emergency-calls-manager: Use network code to get emergency numbers
By far not all sims have emergency numbers and we want to respect the
users current location anyway.

We use a hash to avoid duplicates.
2024-02-10 17:10:10 +01:00
Guido Günther 678a41bade emergency-calls-manager: Move contact adding to separate function
Improves readability and will be get another call site soon.
2024-02-10 17:09:59 +01:00
Guido Günther 9c0acdd560 emergency-calls-manager: Fix object name 2024-02-10 17:09:57 +01:00
Guido Günther edb46acfa5 emergency-call-types: Add location source
We named it fallback but location is a better name as we get it
from the current country code.
2024-02-10 17:09:48 +01:00
Guido Günther 4951cf5b3b emergency-call-types: Use hash for flag lookups too 2024-02-10 17:09:45 +01:00
Guido Günther aaefc0443a emergency-call-types: Allow to lookup emergency numbers by country code
We build a hash as cache to speed up lookups. As this is a one time
thing we just do it once and don't bother to free it up.

We currently assume that all numbers can be used for the location based
lookups. Should that change we want to add a flag indicating that.
2024-02-10 17:09:37 +01:00
Guido Günther 6aa356590b mm-origin: Notify emergency number change when we get a location
Technically the emergency numbers exported by the origin doesn't change
but it's enough to trigger the DBus signal so clients see the updated
numbers.
2024-02-10 17:09:37 +01:00
Guido Günther fd4b796742 mm-origin: Get 3gpp network country code when available
We currently don't enable location gathering explicitly so we rely
on other services (like geoclue) to do so. Use

    mmcli -m 0 --location-enable-3gpp

We could enable for a short time when there's an explicit emergency
number request.
2024-02-10 17:09:19 +01:00
Guido Günther c4630a2647 origin: Add network country code
This is technically only useful for mobile networks.
2024-02-10 17:09:10 +01:00
Guido Günther 4695f81f5c dbus: Fix typo 2024-02-10 17:09:01 +01:00
Guido Günther 66254fcad4 po: Ignore generated files 2024-02-10 17:08:54 +01:00
Guido Günther 7f81b0197b dir-locals: Ease formatting of CSS, meson and ui files 2024-02-10 17:08:45 +01:00
Guido Günther 6a5790dd34 dir-locals: Avoid tabs in C mode 2024-02-10 17:08:24 +01:00
Guido Günther fc15ba2e58 ci: Switch to a trixie based base image
Debian Bookworm doesn't get any GNOME updates and we want to ensure
we build and run against latest.
2024-01-14 10:36:37 +01:00
Guido Günther bfeabe09d0 ci: Switch to package test to trixie
PureOS Byzantium tracks Debian oldstable which isn't suitable for an
upstream test. Track Debian testing instead which has recent GNOME.
2024-01-13 12:25:56 +01:00
Guido GüntherandEvangelos Ribeiro Tzaras 47afc70552 mm-provider: Don't exit early when country code matches
This makes sure we fetch emergency numbers in any case (and also
further things should they be added later).
2023-04-09 15:38:01 +00:00
Guido GüntherandEvangelos Ribeiro Tzaras e5a4d899f8 emergency-calls-manager: Add support for dialing emergency numbers
We just pick the first matching provider.
2023-04-09 09:48:36 +00:00
Guido GüntherandEvangelos Ribeiro Tzaras b58be993a6 emergency-calls-manager: Don't leak origin
g_list_model_get_item is transfer full
2023-04-09 09:48:36 +00:00
Guido GüntherandEvangelos Ribeiro Tzaras b087bea16b Resolve emergency number types
We add a small hardcoded table for now. Future versions
will improve this to parse this out of ASOPs eccdata.

If we can't determine the type of a number we add it verbatim.
2023-04-06 16:37:59 +00:00
Guido GüntherandEvangelos Ribeiro Tzaras 9f68e242fd build: Run tests under C locale
This allows us to check for strings that contain translations.
We could also force a locale (see phosh's screenshot tests) at
a later point.
2023-04-06 16:37:59 +00:00
Guido GüntherandEvangelos Ribeiro Tzaras b880ddf1d7 mm-provider: Implement get_country_code 2023-04-06 16:37:59 +00:00
Guido GüntherandEvangelos Ribeiro Tzaras 69250ac121 mm-provider: Fetch emergency numbers from sim 2023-04-06 16:37:59 +00:00
Guido GüntherandEvangelos Ribeiro Tzaras a8cb3dd7c7 emergency-calls: Notify on DBus when emergency numbers change
This is needed if an origin changes it's emergency numbers on the fly
(e.g. when initializing them late).
2023-04-06 16:37:59 +00:00
Guido GüntherandEvangelos Ribeiro Tzaras 6cdae3fd40 origin: Allow to fetch country code
This is an optional method as not all origins might support this
(e.g. SIP).
2023-04-06 16:37:59 +00:00
Guido GüntherandEvangelos Ribeiro Tzaras d598acd96b mm-provider: Initialize parent class first 2023-04-06 16:37:59 +00:00
Guido GüntherandEvangelos Ribeiro Tzaras 372aa452c3 tests: Add emergency call DBus test
Make sure the API gets exported and we can query numbers
2023-02-12 08:00:56 +00:00
Guido GüntherandEvangelos Ribeiro Tzaras ca4e77a8b0 tests/dbus: Check for error early
This gives a detailed error messages whereas checking if `proxy`
is `NULL` tells us only that on error.
2023-02-12 08:00:56 +00:00
Guido GüntherandEvangelos Ribeiro Tzaras 8a4a7c6131 mm: Implement empty emegency call property
This allows the tests to pass.
2023-02-12 08:00:56 +00:00
Guido GüntherandEvangelos Ribeiro Tzaras 75cbc30dc0 sip: Implement empty emegency call property
This allows the tests to pass.
2023-02-12 08:00:56 +00:00
Guido GüntherandEvangelos Ribeiro Tzaras d5cba4db7f emergency-calls-manager: Query origins for numbers
When the origins change we notify that emergency numbers
might have changed.
2023-02-12 08:00:56 +00:00
Guido GüntherandEvangelos Ribeiro Tzaras 9af09a0db9 dummy: Support getting emergency call numbers 2023-02-12 08:00:56 +00:00
Guido GüntherandEvangelos Ribeiro Tzaras df9d541968 origin: Add interface to get emergency numbers 2023-02-12 08:00:56 +00:00
Guido GüntherandEvangelos Ribeiro Tzaras e3d1193f7f dbus-manager: Use emergency-call manager 2023-02-12 08:00:56 +00:00
Guido GüntherandEvangelos Ribeiro Tzaras 4bdb6945bd Add emergency-call manager to interface with DBus 2023-02-12 08:00:56 +00:00
Guido GüntherandEvangelos Ribeiro Tzaras 213b27bf20 dbus: Add initial interface for emergency calls 2023-02-12 08:00:56 +00:00
Guido GüntherandEvangelos Ribeiro Tzaras 4fb2115b9b tests/dbus: Switch to g_test_init
gtk_test_init() runs gtk_init() which then breaks isolation.
2023-02-12 08:00:56 +00:00
Guido GüntherandEvangelos Ribeiro Tzaras c893a44f9f main-window: Add translator comment to not translate the application name 2022-08-23 17:41:17 +00:00
Guido GüntherandEvangelos Ribeiro Tzaras 8d3a3dc65d data: Indicate that we're using feedbackd
This will allow configuration tools to pick up that intent.
2022-06-21 01:37:22 +00:00
Guido Günther 8f9f7311fa dbus: Expose path to avatar icon file if it exists
We only support file based GLoadableIcon atm. Support for bytestreams
can be added later on.
2021-11-18 12:57:23 +01:00
Guido GüntherandEvangelos Ribeiro Tzaras a1fa33c7af notifier: Add notification category
This helps shells to adjust the kind of haptic/visual/audio
feedback for the notification.
2021-08-04 02:36:34 +00:00
Guido GüntherandEvangelos Ribeiro Tzaras 36ec623098 build: Allow glib 2.70
This one as g_notification_set_category()
2021-08-04 02:36:34 +00:00
Guido GüntherandEvangelos Ribeiro Tzaras 26f0c9cb01 calls-notifier: Set log domain 2021-08-04 02:36:34 +00:00
Guido Günther f45ba43720 dbus: Add more DBus properties
These are needed to allow Phosh to handle incoming calls on
the locked screen.
2021-07-12 17:36:24 +02:00
Guido Günther 8bf320e006 Drop layer-surface
This drops the layer-surface code to put calls on top of the lockscreen.
This only works with wlroots based compositors and even there makes e.g.
unlocking the screen during a phone calls impossible.
2021-07-12 17:36:24 +02:00
Guido Günther cad39e05ee dbus-manager: Fix typo in log-domain 2021-07-12 17:33:12 +02:00
Guido GüntherandEvangelos Ribeiro Tzaras 6f93b48ef4 Expose call objects on DBus
This exports call objects on the session bus:

 $ gdbus monitor --session -d sm.puri.Calls
 …
 /sm/puri/Calls: org.freedesktop.DBus.ObjectManager.InterfacesAdded (objectpath '/sm/puri/Calls/Call/1', {'sm.puri.Calls.Call': {'Inbound': <false>, 'State': <uint32 0>, 'Id': <''>, 'Party': <''>}})
 /sm/puri/Calls/Call/1: org.freedesktop.DBus.Properties.PropertiesChanged ('sm.puri.Calls.Call', {'Id': <'0987654321'>, 'Inbound': <true>, 'State': <uint32 5>}, @as [])
 /sm/puri/Calls: org.freedesktop.DBus.ObjectManager.InterfacesRemoved (objectpath '/sm/puri/Calls/Call/1', ['sm.puri.Calls.Call'])
 $ gdbus call --session --dest sm.puri.Calls --object-path /sm/puri/Calls/Call/1 --method sm.puri.Calls.Call.Hangup

Currenty hangup and accept methods are implemented as well as exposing
the current call state.
2021-06-03 14:29:36 +00:00
Guido GüntherandEvangelos Ribeiro Tzaras e5827adb60 calls: Fix gtk-doc transfer annotation
Broken-by: 501d2914
2021-04-06 13:01:36 +00:00
Guido GüntherandEvangelos Ribeiro Tzaras 01f015a21c provider: Fix gtk-doc transfer annotations
Broken-by: 9e92fb88
2021-04-06 13:01:36 +00:00
Guido Günther 443d23dd56 build: deduplicate sources
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.
2021-04-06 14:18:06 +02:00
Guido Günther 5933a4005d build: Move generated souces before source file list
This will be needed in the next commit
2021-04-06 12:50:31 +02:00
Guido GüntherandEvangelos Ribeiro Tzaras 55559d91db window: Don't unhibit with 0 cookie
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
2021-04-01 16:50:51 +00:00
Guido Günther b04d564bcf manager: Allow to add plugin dir via environent
This eases testing of plugins from the source tree:

  CALLS_PLUGIN_DIR=_build/plugins/dummy/ _build/src/gnome-calls -p dummy
2021-04-01 14:07:27 +02:00
Guido Günther 97c2dde0eb notifier: Fix compile warning
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.
2021-03-01 10:04:02 +01:00
Guido Günther acbbe4697f gitlab-ci: Use byzantium instead of Debian bullseye
We didn't have bullseye images back then.
2021-01-20 10:53:17 +01:00
Guido GüntherandGuido Gunther 06993ebb9b gitlab-template: Add Librem 5 2020-12-22 08:04:19 +00:00
Guido GüntherandGuido Gunther 2fb87c6a74 d/control: Update description 2020-11-17 11:00:52 +00:00
Guido Günther 1e3c117978 data: Check desktop file in build dir
It got moved in f6f9e3f039
2020-11-17 10:55:31 +01:00
Guido Günther 9afd49e6e7 debian: Add desktop-file-utils
This makes sure we valiate desktop files
2020-11-17 10:52:10 +01:00
Guido GüntherandGuido Gunther d0e3e580c9 gitlab-ci: Fail when C files are missing from POTFILES.in
If there are translation in C files but not in POTFILES.in
fail the pipeline.
2020-11-13 08:08:38 +00:00
Guido GüntherandGuido Gunther 6921a104c8 po: Add calls-notifier.c
It has translatable strings.
2020-11-13 08:08:38 +00:00
Guido Günther aa98fa3471 Document changes and release 0.1.8 2020-09-18 13:03:25 +02:00
Guido Günther 4ebede421b doap: Fix sytnax
Wrap each person within <maintainer/>
2020-09-18 10:33:39 +02:00
Guido Günther 04e8998a0f doap: Add devrtz to list of maintainers
He's been the most active contributor recently.
2020-09-14 19:37:28 +02:00
Guido GüntherandGuido Gunther 4227e29009 calls-main-window: Bring back old error string when no modem is present
Calls can't tell the difference between no SIM and no modem
atm.

Closes: #159, #152
2020-09-10 08:58:25 +00:00
Guido GüntherandGuido Gunther 91cdde3ac9 main-window: Allow the in app notification to wrap
Othewise we overflow the window. Center it too.
2020-09-10 08:58:25 +00:00
Guido GüntherandGuido Gunther 78921fadea gitlab-ci: Allow to only build a package 2020-09-10 08:58:24 +00:00
Guido Günther 4a617b2485 po: Add Spanish to LINGUAS 2020-08-14 10:07:14 +02:00
Guido GüntherandGuido Gunther b95de5c9e0 calls-call-record-row: Ignore anonymous callsers
These have an empty string which leads to

    Error parsing phone number `': Keine Telefonnumme
2020-07-22 06:52:07 +00:00
Guido GüntherandGuido Gunther 1f8435f4dd call-record-row: Use g_autoptr for the GError 2020-07-22 06:52:07 +00:00
Guido Günther 829972183d po: Add Hungarian to LINGUAS 2020-07-20 10:46:27 +02:00
Guido Günther 99fb1981d0 Document changes and release 0.1.7 2020-07-02 12:26:10 +02:00
Guido Günther 803cec41a5 calls-call-record-row: Set call back button insensitive for anonymous caller
They can't be called back, we don't have a number

See: #144
2020-07-02 12:10:10 +02:00
Guido Günther 0bc8c7bc4e calls-call-record-row: Print 'Anonymous caller' on empty numbers
If no number is present use `Anonymous caller` instead of an
empty label in the call history.

See: #144
2020-07-02 12:10:10 +02:00
Guido Günther e74891557e Document changes and release 0.1.6 2020-06-11 18:16:55 +02:00
Guido Günther 281ccbd8e6 Show notification on missed calls
Closes: #153
2020-06-09 13:44:57 +02:00
Guido GüntherandGuido Gunther c3e6a444db tests: Disable atk bridge
Otherwise this can trigger test failures. Similar to what we
did in libhandy.

Fixes errors like:
---
G_DEBUG='gc-friendly,fatal-warnings' G_TEST_BUILDDIR='/home/purism/builds/calls/_build/tests' PYTHONDONTWRITEBYTECODE='yes' MALLOC_CHECK_='2' GSETTINGS_BACKEND='memory' G_TEST_SRCDIR='/home/purism/builds/calls/tests' /home/purism/builds/calls/_build/tests/manager
--- stderr ---

(/home/purism/builds/calls/_build/tests/manager:10212): dbind-WARNING **: 12:01:50.237: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
-------
2020-06-08 09:46:58 +00:00
Guido Günther ecca21b0ed ringer: Use libfeedback
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)
2020-06-05 16:42:24 +02:00
Guido Günther 1fcc5f585e debian: Build-depend on libfeedback-dev 2020-06-05 16:37:01 +02:00
Guido Günther f96ad96b3f ringer: Make more functions static 2020-06-05 16:37:01 +02:00
Guido Günther f7185ea70e build: Specifify glib versions
This avoids deprecation warnings due to GTimeVal used in
libebook-contacts.h

See https://tecnocode.co.uk/2019/08/24/gtimeval-deprecation-in-glib-2-61-2/

It's already fixed in newer eds so we can drop
this once we move to a newer stack.
2020-06-05 16:36:32 +02:00
Guido Günther 09cbdf4181 calls-call-record-row: Ref the returned contact
calls_contacts_lookup_phone_number is transfer-none
2020-06-05 14:59:37 +02:00
Guido Günther fb73046e71 calls-contacts: Document lookup_phone_number
This makes sure we have clear ownership rules
2020-06-05 14:59:37 +02:00
Guido GüntherandMohammed Sadiq 89c91c8271 po: Update pot file
Update the pot file after marking many strings as not needing
translation.
2020-05-29 13:11:44 +00:00
Guido GüntherandMohammed Sadiq 956916ae1f Drop translations from property names and descriptions
They're never used anywhere.

Closes: #155, #121
2020-05-29 13:11:44 +00:00
Guido Günther 0b35ca102a po: Add plugins to POTFILES.skip
They're not meant to be translated
2020-05-28 11:19:27 +02:00
Guido Günther 30a4bee445 debian: Add gbp.conf
This makes correct taging so much simpler
2020-05-18 16:15:10 +02:00
Guido Günther e9c9bf65ff Document changes and release 0.1.5 2020-05-18 11:01:43 +02:00
Guido GüntherandGuido Gunther 11cc1a219a Build against Debian bullseye 2020-05-12 10:49:44 +00:00
Guido Günther d18bd0fc66 Update POTFILES.in
See: #146
2020-04-10 12:25:18 +02:00
Guido Günther 9f4c0cf3d0 Add potfile
Generated via

   ninja  -C _build/ calls-pot
2020-01-14 18:19:21 +01:00
Guido Günther 3db2a8aa5c po: Update pofiles.in
Closes: #76
2020-01-14 18:18:17 +01:00
Guido Günther ad56f9aa85 gitlab-ci: Build package and run autopkgtest / lintian
Use prebuilt pipelines to build debs for arm64 and amd64. Test
the amd64 ones using (potential) autopkgtests and lintian.
2020-01-13 12:19:46 +01:00