1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-06-28 14:49:30 +00:00
Commit graph

28 commits

Author SHA1 Message Date
Anton Lazarev 8aea5498d7 calls-record-store: GtkApplicationWindow is not a GListModel
I'm not sure how this worked in GTK3, but it doesn't anymore. The list
model is now composed with the record store instead of inherited.

Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/714>
2024-04-06 08:15:26 -07: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 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 257278da2c record-store: Fix coding style 2023-02-01 08:48:35 +01: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 f997048a38 build: Rename config.h to calls-config.h
This guards against accidentally including configuration from elsewhere.
2022-12-22 15:08:18 +00:00
Evangelos Ribeiro Tzaras 19f8ac390b application: Shut down graceful on SIGTERM/SIGINT
This will allow cleaning up after ourselves, e.g. closing the record DB.

Fixes: #508
2022-11-17 10:00:03 +01:00
Evangelos Ribeiro Tzaras 991512e196 record-store: Removed deprecated CuiCallStates
They haven't been used since
4bc8e82ff6
and could probably have been removed sooner.
2022-09-20 12:27:21 +02:00
Evangelos Ribeiro Tzaras 82a03ac0b1 record-store: Add debug statement for call state changes
This can help debugging issues such as #463 and #455
2022-06-20 13:00:37 +00:00
Evangelos Ribeiro Tzaras 7ac862155b Uncrustify sources
Ran `find src plugins -iname '*.[c|h]' -print0 | xargs -0 uncrustify --no-backup`
with some minimal manual intervention.
2022-04-24 12:59:42 +02:00
Evangelos Ribeiro Tzaras 42557bf2a1 record-store: Switch to CallsUiCallData 2022-03-04 18:00:32 +01:00
Evangelos Ribeiro Tzaras a85f37e853 record-store: Sort include headers 2022-03-04 18:00:32 +01:00
Evangelos Ribeiro Tzaras f206b7d257 call: Rename property from "number" to "id"
The term number is not necessarily accurate when dealing with f.e. SIP.
2021-12-05 09:49:05 +01:00
Evangelos Ribeiro Tzaras 3e22ef8c74 record-store: Get rid of unused code 2021-12-02 05:52:44 +01:00
Evangelos Ribeiro Tzaras 4f64f5b61b record-store: Prefer using g_date_time_new_now_utc()
It actually does not make any difference for the storage in the database as
gom will make sure to convert any given times to the Zulu timezone (UTC+0)
but this change will make it more obvious in the code what's actually going on.
2021-10-15 18:01:47 +02:00
Evangelos Ribeiro Tzaras dbb829be06 debug: Add G_LOG_DOMAIN to every file using g_debug() 2021-06-18 11:12:13 +02:00
Evangelos Ribeiro Tzaras 90b598ed5b record-store: Add default case to switch statements
As caught by compiling with `-Wswitch-default`
2021-06-03 19:46:45 +00:00
Evangelos Ribeiro Tzaras 96a7d901c1 Fix old-style warnings all over the codebase
As caught by compiling with `-Wold-style-definition` and `-Wstrict-prototypes`.
2021-06-03 19:46:45 +00:00
Evangelos Ribeiro Tzaras 38abbc5b18 record-store: codestyle 2021-06-03 19:46:45 +00:00
Evangelos Ribeiro Tzaras 6d8c227b24 calls-record: Introduce the protocol property
This is in preparation for supporting multiple providers (which are handling
different protocols/URI schemes).

This commit also changes the underlying database schema.
2021-05-28 17:02:02 +02:00
Evangelos Ribeiro Tzaras f8cd126d6f record-store: Handle old and new database locations gracefully
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.
2021-02-04 01:19:26 +00:00
Evangelos Ribeiro Tzaras 4bf5cd5232 Implement delete call with context menu on longpress
* 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
2020-06-10 20:49:44 +02:00
Evangelos Ribeiro Tzaras b15c2876da record-store: Use g_autoptr(GError) to avoid having to g_error_free 2020-06-10 20:49:44 +02:00
Julian Sparber 1a2c2f3036
RecordStore: Use Manager 2020-03-27 12:05:34 +01:00
Julian Sparber e911f391c6
Use correct parent class when chaining up overridden functions
How `g_type_class_peek ()` was used it didn't return the correct parent
class in most cases.
G_DEFINE_TYPE macro creates a pointer we can use to get the parent
class `n_p_parent_class`.
Because we didn't use the correct parent class the object initialisation
wasn't fully completed for some GtkWidgets.
See https://developer.gnome.org/gobject/stable/chapter-gobject.html#gobject-instantiation
for more information.

This commit makes use of the `n_p_parent_class pointer` created for this
specific use case where ever possible.

Fixes: https://source.puri.sm/Librem5/calls/issues/118
2020-02-19 12:49:58 +01:00
Bob Ham 3c22bc9154 Hook up Recent Calls list to database
Closes use-cases#113
Closes use-cases#115
2019-08-01 14:39:55 +01:00
Bob Ham da298c0648 Record calls to an SQLite database via libgom
Closes use-cases#114
2019-07-22 14:37:41 +01:00