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

635 commits

Author SHA1 Message Date
Evangelos Ribeiro Tzaras
01ca267c10 ringer: Never cancel async DBus calls and refactor
Previously our code assumed that g_cancellable_cancel() the async DBus
calls to libfeedback would guarantee that the underlying operation would
not be performed (i.e. triggering or ending a feedback).

However the endless ringing exhibited in #470 shows this assumption not
to hold. Therefore we avoid using g_cancellable_cancel () completely and
default to waiting for the async operation to finish.

update_ring () now sets the target state by inspecting managed calls and
the main logic will now step towards the target state:
Changing from regular/loud to soft/quiet ringing (or vice versa)
requires we first end feedback before (re)triggering it.

Additionally the "is-quiet" and "is-ringing" properties are replaced by
a new "state" property to allow changing the combination atomically.

Closes: #470
2022-12-03 20:55:37 +01:00
Evangelos Ribeiro Tzaras
48a77cda5c contact-provider: Allow can-add-contacts to be reset
Under normal conditions it is not expected that whether we can add
contacts or not (based on the presence of the appropriate action on
gnome-contacts) changes.

Nevertheless it can be beneficial for debugging when installing patched
and unpatched versions of gnome-contacts.
2022-12-03 20:55:25 +01:00
Evangelos Ribeiro Tzaras
d51151a028 contacts-provider: Remove unused variable 2022-12-03 20:55:25 +01:00
Evangelos Ribeiro Tzaras
caa74fa441 ui-call-data: Prevent timer being started multiple times
Fixes #502
2022-12-03 20:55:25 +01:00
Evangelos Ribeiro Tzaras
8a299d6dc7 ui-call-data: Add debugging for state changes
This should help fixing issues like #502 in the future.
2022-12-03 20:55:25 +01:00
Evangelos Ribeiro Tzaras
8567a93baa util: Add API to check address family of IP address 2022-12-03 20:55:25 +01:00
Evangelos Ribeiro Tzaras
25c87f9c2d util: Rename function to calls_find_in_model() and adjust documentation
Since it works for GListModel rename it appropriately.

It used to provide an inline implementation for g_list_store_find()
behind a glib version guard, but we bumped minimum version in
cfd3c2a7fe
so the docstring was updated and made more succinct.
2022-12-03 20:55:25 +01:00
Evangelos Ribeiro Tzaras
0b495de9eb util: Remove unused code 2022-12-03 20:55:25 +01:00
Evangelos Ribeiro Tzaras
e21155a35c application: Propagate verbosity to main instance
If another instance of calls was already running, invoking calls with
`-v` flag would set the verbosity for the newly created process and then
exit if it was not the primary instance.
2022-12-03 20:55:25 +01:00
Evangelos Ribeiro Tzaras
68c1a3f21e log: Use unsigned int for verbosity
Negative verbosity levels don't make sense.
2022-12-03 20:55:25 +01:00
Evangelos Ribeiro Tzaras
cfdc7de9ed application: Fix indentation 2022-12-03 20:55:25 +01:00
Evangelos Ribeiro Tzaras
c1f1a6417d new-call-box: Reindent 2022-12-03 20:54:55 +01:00
Evangelos Ribeiro Tzaras
d8446e680b new-call-box: Switch to using CuiDialpad
It has been in libcall-ui for some time, so let's use it.

This will also easy the transition to Gtk4 as it's one less widget we
have to worry about.
2022-12-03 20:54:55 +01:00
Evangelos Ribeiro Tzaras
2ac569cd71 meson: Sort sources alphabetically 2022-12-03 20:54:36 +01:00
Evangelos Ribeiro Tzaras
01897e5150 ringer: Cancel any ongoing actions on shutdown 2022-12-03 20:54:08 +01:00
Evangelos Ribeiro Tzaras
628389cf15 ringer: Move libfeedback related cleanup to finalize()
Leave the LfbEvent self->event alive in dispose()
to give potentially pending GAsyncReadyCallback invocations
or running GSources a better chance of finishing gracefully.
2022-12-03 20:54:01 +01:00
Evangelos Ribeiro Tzaras
845f1f7fca application: Don't show application window if started as daemon
If calls was already running as a daemon it and were invoked again with
`--daemon` it ended up showing the UI.

Now we always set the `daemon` variable and simplify activation logic as
a side effect.

Fixes #500
2022-09-21 11:58:24 +02:00
Evangelos Ribeiro Tzaras
bcb4061db1 application: Don't return value in start_proper()
It never returned FALSE, so change function prototype accordingly.
2022-09-21 11:58:23 +02:00
Evangelos Ribeiro Tzaras
e28b15b41a ringer: Remove deprecated CuiCallStates
They haven't been used since
4bc8e82ff6
and could probably have been removed sooner.
2022-09-20 12:27:23 +02: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
4348e794a9 manager: Remove unused include 2022-09-20 12:26:43 +02:00
Evangelos Ribeiro Tzaras
09688a1e80 call: Document call states 2022-09-01 18:08:27 +02:00
Evangelos Ribeiro Tzaras
1d20998e9a call: Prefer using enum values 2022-09-01 18:06:55 +02:00
Evangelos Ribeiro Tzaras
4592194c11 application: Fix typo in message emission 2022-09-01 18:06:55 +02:00
Evangelos Ribeiro Tzaras
5869296c14 application: Consistent use of user_data in action "activate" callbacks. 2022-09-01 18:06:55 +02:00
Evangelos Ribeiro Tzaras
b893c81375 application: Whitespaces style nitpicks 2022-09-01 18:06:55 +02:00
Evangelos Ribeiro Tzaras
f8c65b9326 Revert "new-call-box: Clear entry after dialing"
This reverts commit 528fb11dcd.

It is cumbersome having to retype everything
if you've made a mistake when entering a number.
2022-09-01 17:52:52 +02:00
Evangelos Ribeiro Tzaras
8a928f2008 call: Remove waiting state
The waiting state is not used any more and made wrong assumptions to
begin with, so let's get rid of it.
2022-09-01 17:48:02 +02:00
Guido Günther
c893a44f9f main-window: Add translator comment to not translate the application name 2022-08-23 17:41:17 +00:00
Evangelos Ribeiro Tzaras
11ba83c16e Move plugin specific tests into dedicated directory
This will prove beneficial when we also add tests for the policy engine
plugins. The increased locality is also nice to have.
2022-08-19 08:43:57 +00:00
Evangelos Ribeiro Tzaras
55be6cd39e manager: Remove unused has_active_call() function
Introduced in f69c597387
but was never really used, so let's drop the dead code.
2022-08-10 16:00:00 +02:00
Evangelos Ribeiro Tzaras
21ae0a67c4 manager: Drop unused get_contact_name() declaration
The function has been removed since quite some time,
but the declaration did not get removed.

Fixes 889d5a0981
2022-08-10 15:07:02 +02:00
Evangelos Ribeiro Tzaras
757351b39c record-row: Add SMS action
Add a menu entry in the history popover to open the default "sms" URI
handler.

Closes: #182
2022-08-05 10:30:06 +02:00
Evangelos Ribeiro Tzaras
01f3757ce1 record-row: Simplify add-action logic
Get rid of some code by avoiding special casing
and potentially fix an issue (WIP).
2022-08-05 10:30:06 +02:00
Evangelos Ribeiro Tzaras
0d6095b42a record-row: Use STR_IS_NULL_OR_EMPTY macro 2022-08-05 10:30:06 +02:00
Evangelos Ribeiro Tzaras
8e23d77508 record-row: Chain up early to constructed() 2022-08-05 10:30:06 +02:00
Evangelos Ribeiro Tzaras
d94792f3c5 record-row: Rename callback to conform to on_* naming scheme 2022-08-05 10:30:06 +02:00
Evangelos Ribeiro Tzaras
37eba7b66f record-row: Remove unused code 2022-08-05 10:30:06 +02:00
Evangelos Ribeiro Tzaras
b81b216cf0 history-box: Cap size of slice at number of call records
This helps avoiding some log spam when scrolling to the bottom:

16:29:17.1053      CallsHistoryBox[2798409]:   DEBUG: Increasing history slice from 1825 to 1875
16:29:17.1215      CallsHistoryBox[2798409]:   DEBUG: Increasing history slice from 1875 to 1925
16:29:20.6739      CallsHistoryBox[2798409]:   DEBUG: Increasing history slice from 1925 to 1975
16:29:23.1919      CallsHistoryBox[2798409]:   DEBUG: Increasing history slice from 1975 to 2025
16:29:24.2533      CallsHistoryBox[2798409]:   DEBUG: Increasing history slice from 2025 to 2075

for a history of ~1400 records.
2022-07-27 16:54:26 +02:00
Evangelos Ribeiro Tzaras
9209a7801c history-box: Allow transition from non-empty to empty history
Since call records may be deleted, the transition from non-empty to
empty is also possible.
2022-07-27 16:45:42 +02:00
Evangelos Ribeiro Tzaras
a6faac2940 history-box: Dynamically adjust slice list model size
The slice get's increased by 50 items if scrolled to the bottom
and reset to the initial 75 items if scrolled back to the top.

The defined threshholds make sure that the UX still feels smooth.
2022-07-27 16:29:39 +02:00
Evangelos Ribeiro Tzaras
8ae03a1321 history-box: Switch to GtkSliceListModel
Having more than ~200 widgets in a GtkListBox comes with a very
performance impact. This is especially noticable during while the main
window is being realized (even if Calls already runs in daemon mode).

We can limit the amount of widgets by using a slice list model.

Fixes: #374
2022-07-27 16:27:07 +02:00
Evangelos Ribeiro Tzaras
3568af8553 meson: Add gtk sources to build 2022-07-27 16:26:25 +02:00
Evangelos Ribeiro Tzaras
44c892b6f7 Drop use of volatile
The volatile qualifier was mostly used for historical reasons,
the documentation for `g_once_init_enter()` and `g_once_init_leave()`
has the following to say:

While `location` has a `volatile` qualifier,
this is a historical artifact and the pointer passed to it
should not be volatile.

See also https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719
2022-07-27 16:26:25 +02:00
Evangelos Ribeiro Tzaras
fd5a24f853 history-box: Chain up to constructed() early 2022-07-27 16:26:24 +02:00
Evangelos Ribeiro Tzaras
01aa8c04c2 Add various gtk list models
This is an exact copy from GTK4.
as grabbed by chattys commit 1ed5084fb965908e3ee0304781b0de06479c869b

Slightly adapted for Calls.

Based on GTKs 01bd4cc4e18a1ea697fe61791ba710d0d55e8290
2022-07-27 16:06:57 +02:00
Evangelos Ribeiro Tzaras
36b10bc764 new-call-box: Don't auto select offline accounts 2022-06-21 12:19:38 +02:00
Evangelos Ribeiro Tzaras
ee64b33e24 new-call-box: Fix memory leak
calls_new_call_box_dial was taking a reference it never released.
2022-06-21 11:52:40 +02:00
Evangelos Ribeiro Tzaras
581c82fcd7 new-call-box: Order includes alphabetically 2022-06-21 11:52:40 +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