1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-11-16 05:15:36 +00:00
Commit graph

712 commits

Author SHA1 Message Date
Evangelos Ribeiro Tzaras
ae687b02aa manager: Clear providers after origins
Fixes a segmentation fault on shutdown in nua_unregister()
2023-04-21 10:35:13 +02:00
Evangelos Ribeiro Tzaras
8312eb92f8 main-window: Use gtk_widget_destroy() for windows
Top level widgets should typically call gtk_widget_destroy()
2023-04-21 10:35:13 +02:00
Evangelos Ribeiro Tzaras
b53d22fced account-overview: Respect object life cycle for signal handlers
Prevents the following failed assertion when shutting down Calls:

CallsAccountOverview:ERROR:../src/calls-account-overview.c:222:update_account_list: assertion failed: (CALLS_IS_ACCOUNT_OVERVIEW (self))
2023-04-21 10:35:13 +02:00
Evangelos Ribeiro Tzaras
93ff933569 manager: Respect object life cycle for signal handlers
Don't call signal handlers after the manager has been disposed.
2023-04-21 10:35:13 +02:00
Evangelos Ribeiro Tzaras
f9d238f988 application: Initialize objects before parsing options
This helps making object life cycles clearer and
with logging already set up we won't miss any early debugging messages.
2023-04-21 10:35:13 +02:00
Evangelos Ribeiro Tzaras
81370a9a1e application: Handle setting verbosity first
We want logging verbosity to be set before other command line options
are handled as we might be missing messages otherwise.
2023-04-21 10:35:13 +02:00
Evangelos Ribeiro Tzaras
cbde9e779a application: Don't leak CallsManager 2023-04-21 10:35:13 +02:00
Evangelos Ribeiro Tzaras
81b8928b16 new-call-box: Don't leak CallsOrigin
get_selected_origin () does not need to take a reference on CallsOrigin
2023-04-21 10:35:13 +02:00
Evangelos Ribeiro Tzaras
2cebcbf957 new-call-box: Use STR_IS_NULL_OR_EMPTY macro 2023-04-21 10:35:13 +02:00
Evangelos Ribeiro Tzaras
fee8f8ba9f manager: Use STR_IS_NULL_OR_EMPTY macro 2023-04-21 10:35:13 +02:00
Evangelos Ribeiro Tzaras
7809ec2349 call-window: Remove dead code 2023-04-21 10:35:13 +02:00
Evangelos Ribeiro Tzaras
8b2b18fc65 application: Remove unused macro 2023-04-21 10:35:13 +02:00
Evangelos Ribeiro Tzaras
a25ae2dfd2 main-window: Codestyle 2023-04-21 10:35:13 +02:00
Evangelos Ribeiro Tzaras
f0b03019b0 main-window: Sort includes 2023-04-21 10:35:13 +02:00
Evangelos Ribeiro Tzaras
6225748b9d resources: Sort alphabetically 2023-04-21 10:35:13 +02:00
Evangelos Ribeiro Tzaras
9da86179f4 build: Sort enum headers 2023-04-21 10:35:13 +02:00
Evangelos Ribeiro Tzaras
2587d7d738 best-match: Don't special case NULL best match
We always get a valid best match, even for NULL or empty ids,
so there is no more need to special case it.
2023-04-21 10:34:31 +02:00
Evangelos Ribeiro Tzaras
a478be1795 contacts-provider: Handle NULL and empty strings graceful in lookup
Fixes a crash where we asserted on best match when the id was NULL or
empty.

Closes: #567
2023-04-21 10:34:31 +02:00
Evangelos Ribeiro Tzaras
0da19790c5 contacts-provider: Simplify refcounting in lookup_id()
g_autoptr usage was a bit pointless here since
calls_contacts_provider_lookup_id() is transfer full
2023-04-21 10:34:31 +02:00
Evangelos Ribeiro Tzaras
343eb5919e best-match: Add gtk-doc annotations to the public API
Notably this adds ownership and nullable annotations, where appropriate.
2023-04-21 10:34:31 +02:00
Evangelos Ribeiro Tzaras
1b8ec26185 best-match: Allow both NULL and empty strings as phone number
This allows us to get rid of some special casing when retrieving
primary and secondary display information.
2023-04-21 10:34:31 +02:00
Guido Günther
a78ca7e8de emergency-calls-manager: Don't leak origin
g_list_model_get_item is transfer full
2023-04-21 10:33:08 +02:00
Guido Günther
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ünther
df9d541968 origin: Add interface to get emergency numbers 2023-02-12 08:00:56 +00:00
Guido Günther
e3d1193f7f dbus-manager: Use emergency-call manager 2023-02-12 08:00:56 +00:00
Guido Günther
4bdb6945bd Add emergency-call manager to interface with DBus 2023-02-12 08:00:56 +00:00
Guido Günther
213b27bf20 dbus: Add initial interface for emergency calls 2023-02-12 08:00:56 +00:00
Evangelos Ribeiro Tzaras
d901e4c8a6 application: Delay shutting down until database is done
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);
2023-02-09 19:07:32 +00:00
Evangelos Ribeiro Tzaras
fb07e0122d record-store: Emit signal once DB is migrated
This helps letting CallsApplication decide if it should run a few more
iterations to ensure any critical code finishes executing.
2023-02-09 19:07:32 +00:00
Evangelos Ribeiro Tzaras
01b8a1c873 record-store: Allow overriding database location
By setting the environment variable CALLS_RECORD_DIR the database
location can be overriden which is useful for testing.
2023-02-09 19:07:32 +00:00
Evangelos Ribeiro Tzaras
656c8f96bf account-overview: Respect object lifecycle for signals 2023-02-01 08:48:35 +01:00
Evangelos Ribeiro Tzaras
ffc3c984b0 application: Respect object lifecycle for signals 2023-02-01 08:48:35 +01:00
Evangelos Ribeiro Tzaras
6ab5905a9b call-window: Respect object lifecycle for signals 2023-02-01 08:48:35 +01:00
Evangelos Ribeiro Tzaras
63d065118f main-window: Respect object lifecycle for signals 2023-02-01 08:48:35 +01:00
Evangelos Ribeiro Tzaras
e168170f9e new-call-box: Respect object lifecycle for signals 2023-02-01 08:48:35 +01:00
Evangelos Ribeiro Tzaras
46736a63fa record-store: Ensure store stays alive during async tasks
As GOM does not allow us to cancel asynchronous tasks,
we need to hold references temporarily.
2023-02-01 08:48:35 +01:00
Evangelos Ribeiro Tzaras
b49e086549 application: Guard against setting application name twice
This is useful for testing the CallsApplication.
2023-02-01 08:48:35 +01:00
Evangelos Ribeiro Tzaras
ac6aff798d application: Shut down cleanly when application quits
Previously the application was only properly shut down
when it received SIGTERM/SIGINT.
2023-02-01 08:48:35 +01:00
Evangelos Ribeiro Tzaras
0c004b5204 application: Only destroy previously created widgets
If this is not the primary instance self->main_window and
self->call_window will not have been created in the first place.

Fixes: e878fabb27
2023-02-01 08:48:35 +01:00
Evangelos Ribeiro Tzaras
481c67a707 application: Coding style 2023-02-01 08:48:35 +01:00
Evangelos Ribeiro Tzaras
257278da2c record-store: Fix coding style 2023-02-01 08:48:35 +01:00
Evangelos Ribeiro Tzaras
673164803f new-call-box: Uncrustify 2023-02-01 08:48:35 +01:00
Evangelos Ribeiro Tzaras
ab6f1a4c45 mm-origin: Explicitly cast ussd state
This is better than the implicit conversion of the enum.
2023-01-31 08:55:38 +00:00
Evangelos Ribeiro Tzaras
0e6d5d9745 record-store: Don't crash on unexpected call state changes
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
2023-01-30 08:34:24 +00:00
Evangelos Ribeiro Tzaras
c0140b4109 contacts-box: Show favourites at the top
Closes: #493
2023-01-30 07:34:04 +00:00
Evangelos Ribeiro Tzaras
55147aed97 best-match: Add API to query if individual is a favourite 2023-01-30 07:34:04 +00:00
Evangelos Ribeiro Tzaras
bb6b76107c build: Rename util.{c,h} to calls-util.{c,h}
"util" is a very generic name. This guards against accidentally
including similarly named headers from elsewhere.
2023-01-22 07:33:02 +00:00
Evangelos Ribeiro Tzaras
ba77fb8de4 origin: Remove unused include 2023-01-22 07:33:02 +00:00
Evangelos Ribeiro Tzaras
575569398b provider: Remove unused include 2023-01-22 07:33:02 +00:00
Evangelos Ribeiro Tzaras
ee56c8e87c new-call-box: Add explicit include
util.h is included transitively, but explicit is better than implicit.
2023-01-22 07:33:02 +00:00