1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-09-29 23:35:26 +00:00
Commit graph

648 commits

Author SHA1 Message Date
Evangelos Ribeiro Tzaras
a52a2a39f8 record-row: Defer enabling popup actions until displaying
There is no need to enable or disable actions until the popover
is actually presented.

This also get's rid of having to be notified of changes to the
"can-add-contact" property which led to a segfault as the signal handler
was not properly cleared.

Fixes: #535

As the "can-add-contact" property is now always checked,
the menu item will be properly shown.

Fixes: #485
2022-12-31 18:37:08 +01: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
Дилян Палаузов
d363583802 ringer: Fix typo 2022-12-20 07:34:39 +01:00
Evangelos Ribeiro Tzaras
21ece5dc5f log: Use feature test macro before any include
_GNU_SOURCE is needed for strcasestr().

The macro should be defined before including any headers. This broke
recently because glib.h seems to include string.h now.
2022-12-03 19:46:25 +01:00
Evangelos Ribeiro Tzaras
3225be22a3 application: Print positive delta when changing verbosity
Since we already take into account if it's increasing or decreasing
we should make the amount (Increased/Decreased by N) positive.
2022-12-03 19:46:25 +01:00
Evangelos Ribeiro Tzaras
707eee51cb log: Fix returned verbosity delta
When we increase verbosity we want values > 0 returned.
2022-12-03 19:46:25 +01:00
Julian Sparber
486846b069 manager: Only set search path from CALLS_PLUGIN_DIR when path exists
Libpeas has issues searching in a path that doesn't exsist.
2022-12-03 12:32:29 +01:00
Julian Sparber
d804b996f4 plugins: Rescan for plugins after adding search paths
Using rescan allows use to give a priority to search paths. So this way
plugins in `CALLS_PLUGIN_DIR` take precedence over plugins we ship.

This also makes sure that the plugin test searches in the same location
as CallsManager.
2022-12-03 12:32:29 +01:00
Evangelos Ribeiro Tzaras
0ead013d4d account-overview: Set window title
Set window title for the overview as well for adding or editing an account.
2022-11-18 13:49:47 +00:00
Evangelos Ribeiro Tzaras
7135d02e3e account-overview: Close windows when pressing Escape
Closes: #511
2022-11-18 13:49:47 +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
e1f0b83d25 ringer: Break loop if triggered event was ended immediately
When the only feedback of an event is unavailable on a system (e.g. no
vibration motor or LED) the "feedback-ended" signal is emitted
immediately and the end reason will be LFB_EVENT_END_REASON_NOT_FOUND.

In this case we need to change the target state, so that our logic does
not end up retriggering the event infinitely.
2022-11-15 09:52:17 +00:00
Evangelos Ribeiro Tzaras
e52f327aae ringer: Cancel async libfeedback calls on timeout
If libfeedback has not finished triggering/ending a feedback after one
second we give up and set an error state.
2022-11-15 09:52:17 +00:00
Evangelos Ribeiro Tzaras
1056cba62a 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-11-15 09:52:17 +00:00
Evangelos Ribeiro Tzaras
79401f6227 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-11-08 11:28:18 +00:00
Evangelos Ribeiro Tzaras
b948629274 contacts-provider: Remove unused variable 2022-11-08 11:28:18 +00:00
Evangelos Ribeiro Tzaras
352a7852f6 ui-call-data: Prevent timer being started multiple times
Fixes #502
2022-11-05 23:51:19 +00:00
Evangelos Ribeiro Tzaras
9b0b1741cc ui-call-data: Add debugging for state changes
This should help fixing issues like #502 in the future.
2022-11-05 23:51:19 +00:00
Evangelos Ribeiro Tzaras
1deee0b71b util: Add API to check address family of IP address 2022-11-01 11:04:35 +00:00
Evangelos Ribeiro Tzaras
29a2059e0e 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-11-01 11:04:35 +00:00
Evangelos Ribeiro Tzaras
0bcf3fa08e util: Remove unused code 2022-11-01 11:04:35 +00:00
Evangelos Ribeiro Tzaras
f7e632dcb4 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-11-01 10:19:08 +00:00
Evangelos Ribeiro Tzaras
a5eb750350 log: Use unsigned int for verbosity
Negative verbosity levels don't make sense.
2022-11-01 10:19:08 +00:00
Evangelos Ribeiro Tzaras
a278cb660c application: Fix indentation 2022-11-01 10:19:08 +00:00
Evangelos Ribeiro Tzaras
8173d4a9ee new-call-box: Reindent 2022-10-13 13:24:19 +00:00
Evangelos Ribeiro Tzaras
8a16439cc8 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-10-13 13:24:19 +00:00
Evangelos Ribeiro Tzaras
f2a22d0c02 meson: Sort sources alphabetically 2022-09-21 12:40:31 +02:00
Evangelos Ribeiro Tzaras
c3c315d8e7 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-20 13:41:43 +02:00
Evangelos Ribeiro Tzaras
3badf72725 application: Don't return value in start_proper()
It never returned FALSE, so change function prototype accordingly.
2022-09-20 13:30:31 +02:00
Evangelos Ribeiro Tzaras
8c6d64ddaf ringer: Cancel any ongoing actions on shutdown 2022-09-20 12:27:38 +02:00
Evangelos Ribeiro Tzaras
97626c467f 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-09-20 12:27:26 +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