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

820 commits

Author SHA1 Message Date
Evangelos Ribeiro Tzaras
69106910f8 manager: Don't raise critical when origin id lookup fails
We don't store origin ids yet
because https://gitlab.gnome.org/GNOME/calls/-/merge_requests/505
is pending on
https://gitlab.gnome.org/GNOME/gom/-/merge_requests/12 and
https://gitlab.gnome.org/GNOME/gom/-/merge_requests/13
2022-04-05 09:27:07 +02:00
Evangelos Ribeiro Tzaras
134c4af9c7 record-row: Avoid raising critical
When the record has a NULL id there won't be a CallsBestMatch we can use to bind
properties.
2022-03-04 18:00:32 +01:00
Evangelos Ribeiro Tzaras
1593625373 manager: Remove call-add and call-remove signal
They are phased out in favour of their newly introduced ui-call-* pendants.
This was done to have a better separation of concerns and allows for some
cleanup in CallsCall.

Closes #397
2022-03-04 18:00:32 +01:00
Evangelos Ribeiro Tzaras
42557bf2a1 record-store: Switch to CallsUiCallData 2022-03-04 18:00:32 +01:00
Evangelos Ribeiro Tzaras
7e538d736e ui-call-data: Provide API to get the name of the origin used
This will be used as a fallback when displaying the call details (see #222).
2022-03-04 18:00:32 +01:00
Evangelos Ribeiro Tzaras
d24d1c8c59 manager: Implement lookup_origin_by_id()
This function is used in the activate callback for the per protocol dial actions
to choose the correct origin to place a call from. If an origin cannot be found
it will return NULL which will lead to the fallback "app.dial" action being
invoked.
2022-03-04 18:00:32 +01:00
Evangelos Ribeiro Tzaras
30c4e90499 ui-call-data: Store origin id and adapt to changes 2022-03-04 18:00:32 +01:00
Evangelos Ribeiro Tzaras
16b86c29b2 origin: Add id property and adapt to changes
The id property will be used to keep track of which origin was used for a call,
so that we can default to reusing the same origin when placing a call from the
history.
2022-03-04 18:00:32 +01:00
Evangelos Ribeiro Tzaras
64ff76e62f manager: Remove unused function declaration
If we have the origin, we can always go directly with calls_origin_dial().
2022-03-04 18:00:32 +01:00
Evangelos Ribeiro Tzaras
3ebc3ed88d call: Prefer pragma once over explicit include guard 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
094d402d9b notifier: Fix logic error
After introducing the STR_IS_NULL_OR_EMPTY macro the rewrite of the logic was
inverted.

Fixes d3677ad5d1
2022-02-25 14:30:35 +01:00
Evangelos Ribeiro Tzaras
d3677ad5d1 notifier: Fix expression testing if there is a contact
Previously cui_call_get_display_name() would return the ID of the caller if no
contact was found. As this has changed recently the test for got_contact broke.
2022-02-18 10:55:53 +01:00
Evangelos Ribeiro Tzaras
53129e92af util: Add STR_IS_NULL_OR_EMPTY macro
Shamelessly copied from
https://gitlab.gnome.org/World/Phosh/phosh/-/blob/main/src/util.h#L13
2022-02-18 10:55:53 +01:00
Evangelos Ribeiro Tzaras
5b171bf2c5 record-row: Handle calls with NULL id gracefully
Shuffles some code around so that the property bindings are at the end.
This allows us to return early if there is a NULL contact (as is the case
for anonymous callers).
2022-02-18 10:55:53 +01:00
Evangelos Ribeiro Tzaras
cd075d9269 record-row: Use primary info instead of name property
RECHECK if bestmatch can ever have a NULL id!
2022-02-18 10:55:53 +01:00
Evangelos Ribeiro Tzaras
7f40314810 best-match: Add property for primary and secondary display information
This allows to get rid of any special casing that the users of the
calls_best_match_get_name() and calls_best_match_get_id() had to do previously.

We also allow passing in NULL for *_get_primary_info ()
and *_get_secondary_info () for the anonymous caller case.
2022-02-18 10:55:53 +01:00
Evangelos Ribeiro Tzaras
79875cb64e ui-call-data: Handle anonymous callers gracefully 2022-02-18 10:55:53 +01:00
Evangelos Ribeiro Tzaras
9ffcbe2de8 contacts-provider: Don't throw a critical when trying to lookup NULL id
Anonymous callers will show up with a NULL id, so don't emit a critical here.

Fixes 006673a9e1
2022-02-18 10:55:53 +01:00
Evangelos Ribeiro Tzaras
c36b6d713a call: Allow setting NULL id
A NULL id will be reported for anonymous callers.
2022-02-18 10:55:53 +01:00
Evangelos Ribeiro Tzaras
73ac050cef call: Annotate properties and add introspection attributes on getters/setters
See https://gnome.pages.gitlab.gnome.org/gi-docgen/attributes.html
2022-02-18 10:55:53 +01:00
Evangelos Ribeiro Tzaras
4187eec127 notifier: Codestyle 2022-02-18 10:55:53 +01:00
Evangelos Ribeiro Tzaras
1e734dbbff notifier: Chain up to parents constructed() before doing anything else
Not strictly needed here, because we don't depend on the parent being
constructed but this is how it should generally be done.
2022-02-18 10:55:53 +01:00
Evangelos Ribeiro Tzaras
690ac121e9 best-match: Assert CALLS_IS_BEST_MATCH in private functions 2022-02-18 10:55:53 +01:00
Evangelos Ribeiro Tzaras
51598700d7 best-match: Codestyle 2022-02-18 10:55:53 +01:00
Evangelos Ribeiro Tzaras
6e7984cb5d application: Reuse existing functions in app.dial action
For that we must move open_sip_uri() and open_tel_uri() up to avoid having to
add forward declarations.

Fixes #402
2022-02-18 09:20:07 +00:00
Evangelos Ribeiro Tzaras
006673a9e1 contacts-provider: Guard against lookup with NULL id
If the id is NULL g_str_hash(NULL) will be called which tries dereferencing the
pointer.

Fixes #408
2022-02-15 08:02:18 +01:00
Evangelos Ribeiro Tzaras
8bf2f2cf1d main-window: Bump copyright year in about window 2022-02-13 00:01:50 +01:00
Evangelos Ribeiro Tzaras
f50f0b8b74 call: Add call-type property
The designs for the call details show information on the type of the call:
https://gitlab.gnome.org/Teams/Design/app-mockups/blob/master/calls/calls.png
So f.e. "Cellular", "Matrix WebRTC Video Call".

These properties can potentially also be useful in choosing the mechanism to
use for the audio controls from the call display.
2022-02-09 19:35:46 +01:00
Evangelos Ribeiro Tzaras
34b447a4ca call: Get rid of get_contact() API
This function isn't used anywhere since the recent refactoring, so let's drop
this dead code.
2022-02-09 19:35:43 +01:00
Evangelos Ribeiro Tzaras
d7ba7927d7 manager: Add section documentation 2022-02-06 09:56:31 +01:00
Evangelos Ribeiro Tzaras
3fe976505c manager: Delay UI Call removal and adjust to changes
This was handled explicitly in the Call window.
By changing the logic to delay the emission of "ui-call-removed" we make sure
that the Call UI and the exported DBus object is consistent.

We also need to change the test cases to use run a GMainLoop because we now have
to wait until signal comes in.
2022-02-03 12:37:05 +01:00
Evangelos Ribeiro Tzaras
cde517096b dbus: Add hint property
This is a dictionary to allow for future extensibility. Currently we're only
hinting if the UI should be shown for a given call.
2022-02-03 12:37:05 +01:00
Evangelos Ribeiro Tzaras
3d85ef802f call-window: Take ui-active property into account
Only show the display after the "pre-ring" phase has passed.

Fixes #371
2022-02-03 12:37:05 +01:00
Evangelos Ribeiro Tzaras
93cf894a8c ringer: Take ui-active property into account
Only start ringing once the UI is deemed active, i.e. the "pre-ring" phase has
passed.

Fixes #371
2022-02-03 12:37:05 +01:00
Evangelos Ribeiro Tzaras
1d5c8952ad ui-call-data: Add property to delay showing call display and ringing
This "ui-active" property should be set to FALSE for new incoming calls and set
to TRUE after a short delay of 20ms. This property is used to delay showing the
call display and starting to ring.

This delay gives DBus clients like
phosh-antispam (https://gitlab.com/kop316/phosh-antispam)
some time to make a decision whether a call should be hung up or not and defer
starting to ring and showing the display only afterwards.
2022-02-03 12:37:05 +01:00
Evangelos Ribeiro Tzaras
d15614a645 selector: Fix property binding
CallsCall used "name", while CuiCall uses "display-name".
2022-02-03 07:16:04 +01:00
Evangelos Ribeiro Tzaras
896af6f8af record-row: Fix passing widget instead of string as action target
When introducing the per protocol dial actions we started setting the widget
self->target as the action target instead of the target property of
self->record.

Bizzarely we only sometimes got greeted with a critical:

11:30:20.5184                 GLib[887977]:CRITICAL: g_variant_new_string: assertion 'g_utf8_validate (string, -1, NULL)' failed

Thread 1 "gnome-calls" received signal SIGTRAP, Trace/breakpoint trap.
g_logv (log_domain=0x7ffff7ea400e "GLib", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=<optimized out>) at ../../../glib/gmessages.c:1417
1417	../../../glib/gmessages.c: No such file or directory.
(gdb) bt
    at ../../../glib/gmessages.c:2898

Fixes: 687dd7ff383476523ae0a8a38879a171cb0b9a5a
Closes #398
2022-02-01 23:28:50 +01:00
Evangelos Ribeiro Tzaras
d452e0a702 dbus-manager: Fix wrong property being bound
Fixes cf6c563ead
2022-02-01 23:28:50 +01:00
Evangelos Ribeiro Tzaras
aa04401b06 dbus-manager: Prefer canonical signal names 2022-02-01 23:28:50 +01:00
Evangelos Ribeiro Tzaras
423ce4668e record-row: Remove unnecessary G_OBJECT cast 2022-02-01 23:28:50 +01:00
Evangelos Ribeiro Tzaras
e4dc6548c5 ui-call-data: Document calls_call_state_to_cui_call_state() 2022-02-01 23:28:50 +01:00
Evangelos Ribeiro Tzaras
3fa290f5a7 notifier: Switch to CallsUiCallData 2022-02-01 06:11:58 +01:00
Evangelos Ribeiro Tzaras
98b8155fc6 manager: Switch to CallsUiCallData 2022-02-01 06:11:58 +01:00
Evangelos Ribeiro Tzaras
bb8f662a01 ui-call-data: Remove get_call() function
No need to expose the internal CallsCall object as all properties relevant for
the UI are proxied out anyway.
2022-02-01 06:11:58 +01:00
Evangelos Ribeiro Tzaras
5bca8eabfe call: Remove API for silencing
This now lives in CallsUiCallData and got removed after the last user of the
code (CallsDbusManager) switched.
2022-02-01 06:11:58 +01:00
Evangelos Ribeiro Tzaras
cf6c563ead dbus-manager: Switch to CallsUiCallData
This allows to simplify the code a bit.
2022-02-01 06:11:58 +01:00
Evangelos Ribeiro Tzaras
5b9609c4f7 ringer: Use CallsUiCallData instead of CallsCall
This will allow us to handle pre-ringing better.
2022-02-01 06:11:58 +01:00
Evangelos Ribeiro Tzaras
b9e49986f0 call: Remove unused calls_call_state_to_string()
We're now using cui_call_state_to_string(), so this is unused.
2022-02-01 06:11:58 +01:00
Evangelos Ribeiro Tzaras
fa5969892e call-window: Switch to CallsUiCallData
By connecting to the "ui-call-added" and "ui-call-removed" signals instead of
"call-add" and "call-remove".

This allows us to shave off a few lines of code.
2022-02-01 06:11:58 +01:00
Evangelos Ribeiro Tzaras
1d364eafda ui-call-data: Add proxy properties for CallsCall
TODO: This could do with some tests
2022-02-01 06:11:58 +01:00
Evangelos Ribeiro Tzaras
dd8cc08649 ui-call-data: Allow contact provider to be NULL
The contact provider can be NULL in the ringer tests, because we're stubbing it.
Early return in that case and make sure the call is already set.
2022-02-01 06:11:58 +01:00
Evangelos Ribeiro Tzaras
db7674d0f9 manager: Add new set of add and remove signals for CuiCalls
This is part of a refactoring which should help separating concerns between
CallsCall and CallsUiCallData better.

To accomplish this we want to stop passing around CallsCall objects and instead
pass CallsUiCallData objects.
In this commit we added new signals instead of changing the existing ones
because that results in a lot of churn. It allows to do the switch per module
allowing smaller individual patches and a more manageable patchset.
2022-02-01 06:11:58 +01:00
Evangelos Ribeiro Tzaras
1518a4b6fb ui-call-data: Add "state-changed" signal
This signal is for use in the UI components that are interested in both the old
and new state.
2022-02-01 06:11:58 +01:00
Evangelos Ribeiro Tzaras
2f32e09982 ringer: Switch to state notify signal 2022-02-01 06:11:58 +01:00
Evangelos Ribeiro Tzaras
500581d35d call: Add transfer annotation for get_protocol() 2022-02-01 06:11:58 +01:00
Evangelos Ribeiro Tzaras
805ed4e0f4 notifier: Expand on comment 2022-02-01 06:11:58 +01:00
Evangelos Ribeiro Tzaras
9f50bc509f notifier: Remove unused GList 2022-02-01 06:11:58 +01:00
Evangelos Ribeiro Tzaras
25c2d5b104 notifier: Sort include headers 2022-02-01 06:11:58 +01:00
Evangelos Ribeiro Tzaras
5e2061da46 ringer: Reorder headers
config.h goes first then sort alphabetically.
2022-02-01 06:11:04 +01:00
Evangelos Ribeiro Tzaras
d75d4916af manager: Use state flags instead of an enum and adapt to changes
This gives us some more granularity and is overall a better fit than the states
previously used.

Closes #327
2022-01-31 17:08:38 +00:00
Evangelos Ribeiro Tzaras
b00deccdcb record-row: Use per protocol dial action
This allows us to deactivate actions if there is no origin that can handle them.

Closes #293
2022-01-31 17:08:38 +00:00
Evangelos Ribeiro Tzaras
dd4a02aea2 manager: Add per protocol dial actions
These are enabled or disabled based on availability of suitable origins.
Allows CallsCallRecordRows (GtkListBoxRows in the call history) to use protocol
specific instead of global dial action.

Closes #307
2022-01-31 17:08:38 +00:00
Evangelos Ribeiro Tzaras
15943b9776 manager: Hardcode supported protocols and adapt to changes
This simplifies the code quite a bit by removing the supported protocols from
being determined dynamically via the loaded plugins.

It was previously used to add/remove a GListStore to origins_by_protocol.

This is a prerequisite for having per protocol dial actions.
2022-01-31 17:08:38 +00:00
Evangelos Ribeiro Tzaras
18aea10ca3 manager: Remove unused key argument in g_hash_table_iter_next()
We're only interested in the value here.
2022-01-31 17:08:38 +00:00
Evangelos Ribeiro Tzaras
edbf046bfd ui-call-data: Implement "active-time" property 2022-01-31 15:51:45 +01:00
Evangelos Ribeiro Tzaras
8543fc7ab5 Update libcallui subproject and adjust to CuiCallState changes
We already had our mapping between CallsCallStates and CuiCallStates in place,
but the _DIALING state got renamed to _CALLING.

Additionally bundle CallsCallStates that map to the same CuiCallState to remove
some code.
2022-01-31 15:25:46 +01:00
Evangelos Ribeiro Tzaras
ab3ff5772b settings: Fix memory leak
g_settings_get_string() and g_settings_get_strv() are transfer full,
so we should use g_value_take_string() instead of g_value_set_string() and
g_value_take_boxed() instead of g_value_set_boxed()
2022-01-27 18:02:15 +01:00
Evangelos Ribeiro Tzaras
7587efb78a log: Fix One Definition Rule
As caught by running with enabled address sanitization.
2022-01-27 18:02:15 +01:00
Evangelos Ribeiro Tzaras
1d1489e167 call: Fix memory leaks 2022-01-27 18:02:15 +01:00
Evangelos Ribeiro Tzaras
9569afa073 origin: Add transfer annotation for calls_origin_get_calls () 2022-01-27 18:02:15 +01:00
Evangelos Ribeiro Tzaras
a7677798d1 dbus-manager: Fix critical when transforming call states
Fixes c796df9260
2022-01-26 08:27:31 +01:00
Evangelos Ribeiro Tzaras
656643c522 call: Temporarily hold ref while setting new state
This is needed to make sure the object stays alive, because some implementations
will unref the call after it has been set to a disconnected state.

This has become apparent because tests started failing when origins switched
from the "state-changed" to the "notify::state" signal (as is done in the next
commits).
2022-01-20 10:23:09 +00:00
Evangelos Ribeiro Tzaras
c594726ce5 best-match: Fix potential memory leak
We would leak memory if calls_best_match_set_phone_number would be called a
second time with a SIP address.
2022-01-20 10:23:09 +00:00
Evangelos Ribeiro Tzaras
ebc5e584bb manager: Use ternary operator instead of if/else block
Less code is better code.
2022-01-20 10:23:09 +00:00
Evangelos Ribeiro Tzaras
f01c99c587 ui-call-data: Remove unused struct 2022-01-20 10:23:09 +00:00
Evangelos Ribeiro Tzaras
36c4f2b349 ui-call-data: Add license header 2022-01-20 10:23:09 +00:00
Evangelos Ribeiro Tzaras
6567b7cad7 call-selector-item: Codestyle
Move public functions to the bottom
2022-01-20 10:23:09 +00:00
Evangelos Ribeiro Tzaras
c0a67d2cce contacts-provider: Remove static from action name string
There was no reason to have it static in the first place.
2022-01-20 10:23:09 +00:00
Evangelos Ribeiro Tzaras
99057452c5 dbus: Document interface in a way that gtk-doc can use
Fixes #394
2022-01-20 10:50:48 +01:00
Evangelos Ribeiro Tzaras
12ae596352 contacts-provider: Overhaul documentation
This commit describes what CallsContactsProvider is used for,
documents signals, properties and the public API.
2022-01-20 10:17:26 +01:00
Evangelos Ribeiro Tzaras
bcdb703ec3 origin: Remove unused parameter from docstring 2022-01-20 10:17:26 +01:00
Evangelos Ribeiro Tzaras
4dd4ba3be3 provider: Remove unused parameter from docstring 2022-01-20 10:17:26 +01:00
Evangelos Ribeiro Tzaras
52eebaad83 message-source: Fix typo 2022-01-20 10:17:26 +01:00
Evangelos Ribeiro Tzaras
c796df9260 dbus-manager: Use CuiCallStates instead of CallsCallStates
CallsCallStates are considered internal call states and do not map 1:1 to
CuiCallStates.
2022-01-20 07:42:08 +00:00
Evangelos Ribeiro Tzaras
e3afefcef2 ui-call-data: Add call state mapping to public API
This allows it to get used in the DBus manager in a GBindingTransformFunc
until to make sure we don't use emit deprecated values over DBus.
2022-01-20 07:42:08 +00:00
Evangelos Ribeiro Tzaras
4bc8e82ff6 ui-call-data: Don't use deprecated states in mapping
For the UI we don't distinguish between dialing and alerting or between
waiting and incoming.
2022-01-20 07:42:08 +00:00
Evangelos Ribeiro Tzaras
6e9fadbee2 dbus: document states 2022-01-20 07:42:08 +00:00
Evangelos Ribeiro Tzaras
54092e45d4 call: Fix typos in section docstring 2022-01-18 03:53:11 +00:00
Evangelos Ribeiro Tzaras
827594dc2e record-row: Add context menu entry for adding a new contact
Fixes #157
2022-01-18 02:12:37 +00:00
Evangelos Ribeiro Tzaras
5588bd934a contacts-provider: Add API to add new contacts 2022-01-18 02:12:37 +00:00
Evangelos Ribeiro Tzaras
c6d867cd72 contacts-provider: Add GDBusActionGroup to query if contacts can be added
As this requires a patched GNOME Contacts, we want to be able to query if the
necessary actions to add new contacts is available before trying to use it.
2022-01-18 02:12:37 +00:00
Evangelos Ribeiro Tzaras
56da32d1b6 contacts-provider: Remove unused config.h include 2022-01-18 02:12:37 +00:00
Evangelos Ribeiro Tzaras
8ad21b211c contacts-provider: Codestyle 2022-01-18 02:12:37 +00:00
Evangelos Ribeiro Tzaras
bc4ed210b2 contacts-provider: Sort includes 2022-01-18 02:12:37 +00:00
Evangelos Ribeiro Tzaras
339093876c manager: Propagate messages from account
Not all portions from the user interface are listening directly to messages from
accounts, so the manager should propagate them to allow the UI to pick them up.

Closes #340
2022-01-11 12:00:10 +00:00
Evangelos Ribeiro Tzaras
cc8da717b1 account-overview: Reindent ui file
This was done to avoid the diff noise in the previous commit introducing
the in app notifications to the account overview.
2022-01-11 12:00:10 +00:00
Evangelos Ribeiro Tzaras
2a9791a9a3 account-overview: Show notification on account message
Accounts implement the CallsMessageSource interface and emit messages when
there are state changes of which the user should be informed.

Closes #340
2022-01-11 12:00:10 +00:00
Evangelos Ribeiro Tzaras
4cd3a0dcc3 account: Add message emission API
This can be used when wanting to show a human readable description in the UI
for example when the account state changes.
2022-01-11 12:00:10 +00:00
Evangelos Ribeiro Tzaras
cdb6f90acc account: Rework account states
Introduce a state-changed signal which also gives a reason for why the state
changed. This will allow the UI to give some meaningful feedback to the user.

Additionally we can get rid of a number of things that were not really states,
but rather reasons for why a state changed (f.e. authentication failures).
2022-01-11 12:00:10 +00:00
Evangelos Ribeiro Tzaras
6d877fd9d3 manager: Implement message source interface
This allows the user interface to pick up messages by having them propagate
from the managed providers, origins, calls, etc.
2022-01-11 12:00:10 +00:00
Evangelos Ribeiro Tzaras
6de5e9a54c manager: Remove the "error" signal and adapt to changes
We can now use the message source interface to signal any feedback to the user.
2022-01-11 12:00:10 +00:00
Evangelos Ribeiro Tzaras
d1b20bec39 message-source: Add API to emit message 2022-01-11 12:00:10 +00:00
Evangelos Ribeiro Tzaras
e148930cc4 application: Sort includes alphabetically 2022-01-11 12:00:10 +00:00
Evangelos Ribeiro Tzaras
6a3702dea3 manager: Clean up includes
The manager is not using the account providers anywhere.
2022-01-11 12:00:10 +00:00
Evangelos Ribeiro Tzaras
8a6787d959 message-source: Get rid of unnecessary semicolon
Our .dir-locals.el makes Emacs understand that we don't need a semicolon after
the various G_* macros.
2022-01-11 12:00:10 +00:00
Evangelos Ribeiro Tzaras
7d05508ace message-source: Clean up includes
Include directly what's being used here.
2022-01-11 12:00:10 +00:00
Evangelos Ribeiro Tzaras
3c32739369 message-source: Use pragma once instead of include guard 2022-01-11 12:00:10 +00:00
Evangelos Ribeiro Tzaras
c6a8dcf140 util: Use pragma once instead of include guard 2022-01-11 12:00:10 +00:00
Evangelos Ribeiro Tzaras
eab45610bd manager: Codestyle
We use two empty lines between functions, unless they are documented with
docstrings in which case there is only one empty line.
2022-01-11 12:00:10 +00:00
Evangelos Ribeiro Tzaras
66224c9a48 origin: Get rid of "numeric-addresses" property 2021-12-26 17:45:12 +01:00
Evangelos Ribeiro Tzaras
6d031e2ab6 new-call-box: Decide if numeric input is needed based on the origins protocol
The numeric addresses property conveys no additional information.
By changing the logic here we can get rid of the "numeric-addresses" property
alltogether.
2021-12-26 17:45:12 +01:00
Evangelos Ribeiro Tzaras
7fe8a90d77 settings: Add GSetting for preferred audio codecs 2021-12-21 15:05:47 +01:00
Evangelos Ribeiro Tzaras
dc809e54e5 settings: Add docstring for autoload-plugins setter and getter 2021-12-21 15:05:47 +01:00
Evangelos Ribeiro Tzaras
a63023e315 settings: Chain up to parents constructed() early
Not strictly necessary since we're not depending on anything the parents
constructed() might be doing, but it's a good practice.
2021-12-21 15:05:47 +01:00
Evangelos Ribeiro Tzaras
4e09ada0df best-match: Fix header include
We only need gio.h here because of GLoadable.
2021-12-21 15:05:47 +01:00
Evangelos Ribeiro Tzaras
c12b7a8c69 call: Use protocol fallback
We're falling back to "tel" as the default case.
2021-12-20 12:25:19 +01:00
Evangelos Ribeiro Tzaras
dbfa593a07 call: Move name property to base class
This let's us avoid some duplication in the derived classes.
2021-12-20 12:25:19 +01:00
Evangelos Ribeiro Tzaras
a1fefcdbac call: Move id property into base class
This allows us to avoid some duplication in the derived classes.
2021-12-20 12:25:19 +01:00
Evangelos Ribeiro Tzaras
a048b4c83d call: Move state property into base class
This let's us get rid of a lot of duplication in the derived classes.

Additionally we set the initial state to CALLS_CALL_STATE_INCOMING if
inbound is TRUE and CALLS_CALL_STATE_DIALING otherwise.
2021-12-20 12:25:19 +01:00
Evangelos Ribeiro Tzaras
ddf1dd7349 call: Move inbound property into base class
This avoids some repetition in the derived classes.
2021-12-20 12:25:18 +01:00
Evangelos Ribeiro Tzaras
88cd7ce222 call: Add unknown state
This is the default fallback state and is useful f.e. in the oFono plugin
if the GDBOVoiceCall doesn't provide a state in its' properties.
2021-12-20 12:25:18 +01:00
Evangelos Ribeiro Tzaras
cead5ada88 call-window: Use g_assert in private functions 2021-12-20 12:25:18 +01:00
Evangelos Ribeiro Tzaras
09699254c8 call: Codestyle 2021-12-20 12:25:18 +01:00
Evangelos Ribeiro Tzaras
08456c8043 in-app-notification: Use g_clear_* instead of emulating it 2021-12-16 06:39:38 +01:00
Evangelos Ribeiro Tzaras
3e37870824 in-app-notification: Use unsigned integers for timeout property
It's used in g_timeout_add_seconds and that expects a guint.
Set the minimum timeout to 1 second.
2021-12-16 06:39:38 +01:00
Evangelos Ribeiro Tzaras
d7b4aff0d8 in-app-notification: Use DEFAULT_TIMEOUT_SECONDS as the default timeout
By setting the G_PARAM_CONSTRUCT flag for the timeout property we make sure
that the default value is set if it has not been given explicitly in
g_object_new().
2021-12-16 06:39:38 +01:00
Evangelos Ribeiro Tzaras
fd6fcbc3c0 in-app-notification: Codestyle 2021-12-16 06:39:38 +01:00
Evangelos Ribeiro Tzaras
4df3ea005d record-row: Only create popover when needed
Creating a popover for each CallsCallRecordRow comes with a big performance
hit when scrolling the history, so we should avoid doing this.

Fixes #198
2021-12-10 18:12:30 +01:00
Evangelos Ribeiro Tzaras
42b5b9d600 record-row: Use API to query call icon name
This makes sure we don't need to allocate icon string names for each record.
2021-12-07 11:05:12 +01:00
Evangelos Ribeiro Tzaras
abdb601afa util: Add API to query call icon names
This can later be used in the call history or in the call details
instead of always constructing the name repeatedly in private functions.
2021-12-07 11:05:12 +01:00
Evangelos Ribeiro Tzaras
625b26be32 record-row: Codestyle 2021-12-07 11:05:12 +01:00
Evangelos Ribeiro Tzaras
c37e9d8462 dbus: Add method to silence ringing
Fixes #329
2021-12-07 07:56:02 +00:00
Evangelos Ribeiro Tzaras
2d18667ee7 call-window: Use g_clear_handle_id instead of emulating it 2021-12-05 16:51:26 +01:00
Evangelos Ribeiro Tzaras
8f6ca20a2c call-window: Clear handle id when hiding call window
This fixes GLib criticals like
GLib[464166]:CRITICAL: Source ID 17 was not found when attempting to remove it
2021-12-05 16:50:19 +01:00
Evangelos Ribeiro Tzaras
0f72780814 ringer: Restart ringer if quiet parameter changed
This makes sure the following sequence of events works:

- Call A incoming
- Rings loudly
- Call B incoming
- Still rings loudly
- Call A accepted
- Rings quietly
- Call A hung up
- Rings loudly again

Being able to restart the ringing is needed for this case because we cannot
retroactively change the feedback levels of a event that has already been
triggered.

Without this patch Calls would continue ringing for the scenario above even
after call A was accepted.
2021-12-05 10:04:05 +01:00
Evangelos Ribeiro Tzaras
b89f6a6f17 ringer: Add is-quiet property and getter
This let's us query if the ringer is ringing quietly.
2021-12-05 10:04:03 +01:00
Evangelos Ribeiro Tzaras
410cf8945a ringer: Check if incoming call is silenced
Avoid ringing in this case.
2021-12-05 09:49:05 +01:00
Evangelos Ribeiro Tzaras
1587e4c78c call: Add API to silence ringing 2021-12-05 09:49:05 +01:00
Evangelos Ribeiro Tzaras
f02d22150e ringer: Add debugging 2021-12-05 09:49:05 +01:00
Evangelos Ribeiro Tzaras
9fff41fd53 ringer: Make sure to reset feedback profile if not set to "quiet" 2021-12-05 09:49:05 +01:00
Evangelos Ribeiro Tzaras
e604779497 ringer: Don't warn if feedback triggering got cancelled 2021-12-05 09:49:05 +01:00
Evangelos Ribeiro Tzaras
3e26294f3c ringer: Track ringer state
This allows to cancel triggered feedbacks.
2021-12-05 09:49:05 +01:00
Evangelos Ribeiro Tzaras
1e5edea855 ringer: Disconnect signal handlers on dispose 2021-12-05 09:49:05 +01:00
Evangelos Ribeiro Tzaras
fd7193a525 ringer: Refactor to keep track of ongoing calls
This makes it easier to silence a call.
2021-12-05 09:49:05 +01:00
Evangelos Ribeiro Tzaras
17a2c94387 ringer: codestyle 2021-12-05 09:49:05 +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
Christopher Davis
50847dfe43 ui: Remove explicit can-focus
Glade misleads us into thinking we need these, but the
property is somewhat confusing in GTK3. In general we don't
want `can-focus` to be true for containers, as that will
break keynav for the children. For non-containers, the
defaults are appropriate.

Instead of manually setting `can-focus`, we should just
use the default values. GTK has sane defaults.

Fixes https://gitlab.gnome.org/GNOME/calls/-/issues/366
2021-12-04 14:40:08 -08:00
Evangelos Ribeiro Tzaras
3e22ef8c74 record-store: Get rid of unused code 2021-12-02 05:52:44 +01:00
Evangelos Ribeiro Tzaras
edfb4455f8 application: Chain up shutdown 2021-12-02 05:52:44 +01:00
Evangelos Ribeiro Tzaras
85689dbb45 history-box: Codestyle 2021-12-02 05:52:44 +01:00
Evangelos Ribeiro Tzaras
aad6b85a2b application: Codestyle 2021-12-02 05:52:44 +01:00
Christopher Davis
69db235cea style: Make error color white in both light and dark mode 2021-11-30 13:04:13 -08:00
Christopher Davis
fb23d42075 application: Check libhandy version at compilation
This only enables the dark style preference if we have
a libhandy version of 1.5.0 or newer.
2021-11-30 13:04:13 -08:00
Christopher Davis
ce7aca63b2 application: Opt in to libhandy dark style preference
GNOME 42 will have a dark style preference. This commit
adds support for it by opting in via HdyStyleManager.
2021-11-30 12:14:15 -08:00
Christopher Davis
aaf87e5e89 new-call-box: Clamp everything
This prevents items from stretching out of bounds.
2021-11-30 19:37:28 +00:00
Evangelos Ribeiro Tzaras
04f43b2ce2 call-window: Delay closing window
Fixes #301
2021-11-25 19:14:42 +01:00
Evangelos Ribeiro Tzaras
b083e588fa call-window: codestyle 2021-11-25 19:14:42 +01:00
Evangelos Ribeiro Tzaras
989a52fac5 record-row: Removed unused define 2021-11-25 19:14:42 +01:00
Christopher Davis
89dd2d6e8f contacts-box: mimmic HdyStatusPage styling for contacts 2021-11-24 15:16:29 +00:00
Christopher Davis
409f6598d9 history-box: Use HdyStatusPage for empty state
We have a standard widget for empty states in HdyStatusPage.
This commit uses that instead of rolling our own.
2021-11-24 15:16:29 +00:00
Christopher Davis
48825b4ccd Remove history-header-bar.ui
This is unused.
2021-11-24 13:41:10 +00:00
Christopher Davis
ddbf404af4 main-window: Remove unused placeholder text
This way translators aren't translating something that
will never be seen.
2021-11-24 13:41:10 +00:00
Evangelos Ribeiro Tzaras
a28d694623 dbus: Add API to send DTMF
Addresses the calls side of #343
2021-11-23 08:50:01 +00:00
Evangelos Ribeiro Tzaras
0761c4a53a dbus: Set can-dtmf property
This lets consumers on DBus know if this call is capable of sending DTMF.
2021-11-23 08:50:01 +00:00
Evangelos Ribeiro Tzaras
afd1034dd1 util: Make dtmf tone checking function public
Moves the function out of calls-call.c into util.c
2021-11-23 08:50:01 +00:00
Evangelos Ribeiro Tzaras
acec33bb6c call: Get rid of unnecessary cast to int 2021-11-23 08:50:01 +00:00
Evangelos Ribeiro Tzaras
a353a03d01 call: Get rid of tone_stop
It wasn't used by any plugin backend and helps getting rid of a lot of code.
2021-11-23 08:50:01 +00:00
Evangelos Ribeiro Tzaras
2bbb923226 call-data: Notify on avatar changes
Otherwise the call display will not update.
2021-11-19 15:56:45 +01:00
Evangelos Ribeiro Tzaras
cfac02a00c call-data: Fix assertion in notify handlers 2021-11-19 15:56:45 +01:00
Evangelos Ribeiro Tzaras
da648829b4 best-match: Rename best_match variable to matched_individual
This makes it a bit clearer what the variable is used for.
2021-11-19 15:56:45 +01:00
Evangelos Ribeiro Tzaras
dc96d892f5 Remove encryption indicator
Not used anymore since we switched to libcall-ui.
Should've been removed as a part of !425.
2021-11-19 15:56:37 +01: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
Evangelos Ribeiro Tzaras
76ec1e6941 record-row: Use avatars in history
Fixes #147
2021-11-18 12:15:25 +01:00
Evangelos Ribeiro Tzaras
4e9eedb5fa call-data: Implement avatar property
Fixes #161
2021-11-18 12:15:25 +01:00
Evangelos Ribeiro Tzaras
edd8560291 Remove CallsCallDisplay 2021-11-16 09:39:34 +01:00
Evangelos Ribeiro Tzaras
dc454837d6 Switch from CallsCallDisplay to CuiCallDisplay
Closes #302
2021-11-16 09:39:34 +01:00
Evangelos Ribeiro Tzaras
4321381f23 Introduce CallsUiCallData to feed CuiDisplay
We need a proxy object because implementing the CuiCall interface in the
CallsCall base class has it's own set of problems (f.e. the "state" property
would have a type collision CallsCallState vs CuiCallState).
2021-11-16 09:39:34 +01:00
Evangelos Ribeiro Tzaras
c5636ab71c call: Add API to query whether this call can do DTMF
This allows enable or disable UI elements.
2021-11-16 09:39:34 +01:00
Evangelos Ribeiro Tzaras
bf72169f68 application: Initialize libcall-ui 2021-11-16 09:39:34 +01:00
Evangelos Ribeiro Tzaras
ac4150139d call-window: Remove unused CALLS_WAYLAND ifdef 2021-11-16 09:39:34 +01:00
Evangelos Ribeiro Tzaras
f985332a37 Remove unused typedef 2021-11-16 09:39:34 +01:00
Evangelos Ribeiro Tzaras
620804ab01 main-window: Remove unused header 2021-11-16 09:39:34 +01:00
Evangelos Ribeiro Tzaras
2fc5533e1a call-window: Improve readability of remove_call function
The casual reader might be tricked into believing CallsCallSelectorItem would
leak here, which was not actually the case.
2021-10-28 14:51:19 +00:00
Evangelos Ribeiro Tzaras
d7d97e8f67 call-window: Remove unnecessary code
As the "visible-child-name" from main_stack and header_bar_stack is already
bidirectionally bound.
2021-10-28 15:56:14 +02:00
Evangelos Ribeiro Tzaras
4593a82b21 number-query: Fall back to string comparison if parsing EPhoneNumber fails
Fixes #345
2021-10-27 11:07:54 +00:00
Evangelos Ribeiro Tzaras
94d730c3ed Let provider plugin decide whether to automatically hang up secondary calls
Revert "manager: hang up secondary calls"

This reverts commit 94345e0916 and moves that
functionality to the ModemManager plugin.

Fixes #290
2021-10-22 06:00:45 +02:00
Evangelos Ribeiro Tzaras
28516cda32 new-call-box: Clarify accessible name 2021-10-19 09:43:48 +02:00
Evangelos Ribeiro Tzaras
a2df022606 application: Reword description for the -p flag
Closes #338
2021-10-18 17:07:51 +02:00
Evangelos Ribeiro Tzaras
b36725c69b selector-item: Name label does not need to be translatable
The code will set a name here, so the label as in the ui file will never be
shown in the running application.

Closes #338
2021-10-18 17:07:48 +02:00
Evangelos Ribeiro Tzaras
386cb3e906 i18n: main-window: Clarify "Recent" to mean the call history
Closes #338
2021-10-18 17:07:40 +02:00
Evangelos Ribeiro Tzaras
2bfecf1249 i18n: notifier: Use comment to clarify if a name or number is meant
Closes #338
2021-10-18 17:07:15 +02:00
Evangelos Ribeiro Tzaras
57ec06a6f5 record-row: Take timezone into account for displaying in the UI
Since the database uses UTC times we have to take the timezone offset into
account when displaying times in the UI.

Fixes #163
2021-10-15 18:14:39 +02: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
110dcdf4ad record-row: Clarify "Call" for translators with a comment
Fixes #319
2021-10-07 21:29:45 +00:00
Evangelos Ribeiro Tzaras
fbb6316fee record-row: Right justify time
Fixes #336
2021-09-28 08:04:12 +00:00
Evangelos Ribeiro Tzaras
33ad4dbe86 Simplify country code handling 2021-09-27 08:46:09 +00:00
Evangelos Ribeiro Tzaras
04d391c5dd settings: Add GSettings bindings 2021-09-27 08:46:09 +00:00
Evangelos Ribeiro Tzaras
b5defda27f network-watch: Don't fail initialization when unable to fetch local IP
This would mean we're failing when Calls is started with all NICs not connected
or disabled. To make matters worse this would only be fixable by restarting
Calls.
2021-09-24 05:24:41 +00:00
Evangelos Ribeiro Tzaras
ab20b6b8e3 network-watch: Only g_set_error if error is not NULL 2021-09-24 05:24:41 +00:00
Evangelos Ribeiro Tzaras
4fc0a52873 network-watch: More descriptive warning
And make sure we're not continually spamming warnings.

Closes #330
2021-09-24 05:24:41 +00:00
Evangelos Ribeiro Tzaras
9d27d5bae6 best-match: Don't free unowned data
Fixes #331
2021-09-24 05:13:31 +02:00
Evangelos Ribeiro Tzaras
d9e5c6a252 best-match: codestyle 2021-09-24 05:13:31 +02:00
Evangelos Ribeiro Tzaras
bd045be4e4 number-query: Take country code into account
Fixes #312
2021-09-23 09:54:44 +02:00
Evangelos Ribeiro Tzaras
d936a4572d contact-box: Do not hardcode length of match_fields[] 2021-09-23 09:54:44 +02:00
Evangelos Ribeiro Tzaras
528fb11dcd new-call-box: Clear entry after dialing
Closes #332
2021-09-20 03:31:28 +02:00
Evangelos Ribeiro Tzaras
b458f6f040 record-row: Reword accessible name
"party" in "Call the party" could lead to confusion.
Fixes #319
2021-09-20 03:31:28 +02:00
Evangelos Ribeiro Tzaras
1a14075945 application: Do not prepend country code when dialing
Fixes #176
2021-09-20 03:31:28 +02:00
Evangelos Ribeiro Tzaras
464f3a993e application: Clarify that -l flag is to be used with numbers only
This will also help unifying handling of tel: URIs.
2021-09-20 03:31:28 +02:00
Evangelos Ribeiro Tzaras
3714f99d38 Introduce CallsNetworkWatch to notify of network changes
The libsofia-sip stack needs to bind to a specific interface when there are
multiple network interfaces available.
Handles should be recreated when the default route changes.
2021-09-02 09:17:12 +02:00
Evangelos Ribeiro Tzaras
876ffb1e8c new-call-box: Always update the UI when the list of origins changes
Otherwise this can lead to being stuck in numeric/non-numeric input mode.
2021-08-26 12:47:57 +00:00
Evangelos Ribeiro Tzaras
a85b9cd5c3 manager: Initialize g_auto variable to NULL 2021-08-25 11:06:32 +02:00
Evangelos Ribeiro Tzaras
9c777b7db8 new-call-box: Hide empty results
Because the empty result looks weird.
2021-08-19 01:46:59 +02:00
Evangelos Ribeiro Tzaras
b1c22e4310 new-call-box: Press enter to place a call
Connect to the "activate" signal and take appropriate action
for both numeric and non-numeric cases.
2021-08-19 01:44:06 +02:00
Evangelos Ribeiro Tzaras
a21bc475e4 new-call-box: Reindent 2021-08-19 01:35:47 +02:00
Evangelos Ribeiro Tzaras
da4c6b043a new-call-box: Add placeholder texts for text input fields 2021-08-14 20:46:11 +02:00
Evangelos Ribeiro Tzaras
2c06497b08 new-call-box: Tweak the UI
- Fills horizontally now
- Make sure the "dial" and "backspace" button are still properly aligned
  by using HdyClamp with the keypads typical size (rougly 250)
- Remove unnecessary default values from the xml
  (f.e. "can-focus" on GtkEntry or GtkButton)
2021-08-14 20:46:11 +02:00
Evangelos Ribeiro Tzaras
3779aa1062 new-call-box: Set numeric input property based on selected origin 2021-08-14 20:46:11 +02:00
Evangelos Ribeiro Tzaras
db848b2c9f new-call-box: Add entry for non-numeric inputs 2021-08-14 20:46:11 +02:00
Evangelos Ribeiro Tzaras
e9661ce01c new-call-box: Introduce numeric-input-only property
This property will show the keypad for numeric inputs (i.e. telephone numbers)
or an entry allowing arbitrary inputs for SIP or other protocols.
2021-08-14 20:46:11 +02:00
Evangelos Ribeiro Tzaras
c61d63383f new-call-box: Remove unnecessary GtkBox 2021-08-14 20:46:11 +02:00
Evangelos Ribeiro Tzaras
1312b2624c new-call-box: Remove unused GtkListStore 2021-08-14 20:46:11 +02:00
Evangelos Ribeiro Tzaras
179c844a80 calls-new-call-box: Only show origin combo box if there is a choice 2021-08-14 20:46:11 +02:00
Evangelos Ribeiro Tzaras
62711da7fc new-call-box: Simplify HdyComboRow binding 2021-08-13 02:13:27 +02:00
Evangelos Ribeiro Tzaras
c7731b189a origin: Add "numeric-addresses" property
This will be useful in the dialpad to determine whether we should allow
only numeric input or not.
2021-08-13 02:13:27 +02:00
Mohammed Sadiq
8af2563859 Add and use new logger
This helps provider better logs.  With this, the user can now run
with `-v` for verbose logs, use more `-v` to be more verbose,
eg `calls -vvvvv` log shall be very verbose
2021-08-11 09:38:19 +00:00
Guido Günther
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ünther
26f0c9cb01 calls-notifier: Set log domain 2021-08-04 02:36:34 +00:00
Mohammed Sadiq
fe84a02af2 history-box: Use content style for listbox
So as to match the design and less code to maintain
2021-08-03 12:42:46 +00:00
Mohammed Sadiq
47a7d58074 application: Fix handling commandline arguments
handle_local_options() are supposed to be handled only in local instance,
and not in remote instance.
2021-07-30 00:12:50 +00:00
Evangelos Ribeiro Tzaras
9d9e989be4 secret-store: Work around bug in gnome-keyring preventing keyring unlocking
When a keyring is cold (unlocked) the schema is set as
"org.freedesktop.Secret.Generic". If we require the name to strictly match
while searching we won't ever get a match.

See https://gitlab.gnome.org/GNOME/gnome-keyring/-/issues/89 and
https://gitlab.gnome.org/GNOME/libsecret/-/issues/7 for more information

Closes #316
2021-07-21 17:30:51 +02:00
Evangelos Ribeiro Tzaras
241909c942 main-window: Fix the action name for the about dialog 2021-07-20 10:18:03 +02:00
Evangelos Ribeiro Tzaras
373465cc2c about: Update copyright 2021-07-20 10:18:03 +02:00
Evangelos Ribeiro Tzaras
1f0ad8cf7c about: Update authors 2021-07-20 10:18:03 +02:00
Evangelos Ribeiro Tzaras
c5e4c80a47 Introduce CallsSecretStore to store credentials 2021-07-20 10:17:17 +02:00
Evangelos Ribeiro Tzaras
803e089cfc account-overview: Hook up available providers
Fixes #264.
2021-07-20 10:17:17 +02:00
Evangelos Ribeiro Tzaras
fc7156fe75 Introduce CallsAccountOverview: A UI to allow managing VoIP accounts
CallsAccountOverview allows user to view, add and edit VoIP accounts
(currently SIP only).

Each CallsAccount is represented by a CallsAccountRow.

account-row: Staying alive
2021-07-20 10:17:17 +02:00
Evangelos Ribeiro Tzaras
fadeaeb6b5 main-window: Add menu button
This will be used to manage VoIP accounts (SIP), show the About dialog
and so on. We will leave this hidden for now.
2021-07-20 10:17:17 +02:00
Evangelos Ribeiro Tzaras
64bb170efa account-provider: Repurpose to allow graphical credential editing 2021-07-20 10:17:17 +02:00
Evangelos Ribeiro Tzaras
d5bf31bdaf manager: Temporarily hold a reference to provider being unloaded 2021-07-20 10:17:17 +02:00
Evangelos Ribeiro Tzaras
2b31a9677e manager: Emit signal when loaded providers have changed 2021-07-20 10:17:17 +02:00
Evangelos Ribeiro Tzaras
cc3a562f03 manager: Add API to query loaded providers 2021-07-20 10:17:17 +02:00
Evangelos Ribeiro Tzaras
a638b64402 account: Add address property 2021-07-20 10:17:17 +02:00
Evangelos Ribeiro Tzaras
dd3fbf646e account: Add API to query account state 2021-07-20 10:17:17 +02:00
Evangelos Ribeiro Tzaras
82ff6d0ac5 account: Use explicit notify for account state property 2021-07-20 10:17:17 +02:00
Evangelos Ribeiro Tzaras
babd013bd7 Remove CallsCredentials and adapt to changes
The provider knows best which credentials it needs and CallsCredentials
was not generic to begin with, so get rid of it.
2021-07-20 10:17:17 +02:00
Evangelos Ribeiro Tzaras
2af2b316ec Various codestyle fixes 2021-07-20 10:17:17 +02:00
Adrien Plazas
d4ee8b4bc9 main-window: Fix the indentation
It was purposefully left broken to ease code review.
2021-07-16 08:43:43 +00:00
Adrien Plazas
f4f41d9db5 main-window: Make it a HdyApplicationWindow
This gives the window some nice rounded corners, and gives us more
freedom in how to implement the UI.

This purposefully leaves the indentation broken to ease code review, it
will be fixed in the next commit.
2021-07-16 08:43:43 +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
Evangelos Ribeiro Tzaras
69b919d7ab DBus: Use org.gnome prefix and adapt to changes
In preparation to moving to GNOME all the IDs, DBus object paths, etc should
change.
2021-07-12 13:35:57 +00:00
Evangelos Ribeiro Tzaras
b74601f7c4 schema: Use org.gnome prefix and adapt to changes
In preparation to moving to GNOME all the IDs, DBus object paths, etc should
change.
2021-07-12 13:35:57 +00:00
Evangelos Ribeiro Tzaras
6e371d2f3f resources: Use /org/gnome prefix and adapt to changes
In preparation to moving to GNOME all the IDs, DBus object paths, etc should
change.
2021-07-12 13:35:57 +00:00
Evangelos Ribeiro Tzaras
9f45e8b0a5 call-display: Ellipsize labels at the end
Fixes #283
2021-07-01 02:02:09 +02:00
Evangelos Ribeiro Tzaras
c293b7029d best-match: Preliminary handling of SIP addresses
This does not perform any contact lookup, but instead introduces a benign
hack to be able to get something sensible when calling
`calls_best_match_get_name()` and avoids unnecessary warnings.
2021-07-01 02:01:32 +02:00
Evangelos Ribeiro Tzaras
fd45f04886 best-match: codestyle 2021-07-01 02:00:52 +02:00
Evangelos Ribeiro Tzaras
23e7fd3a60 manager: Don't use peas_engine_prepend_search_path
as it does not really "prepend" the search path.
See https://gitlab.gnome.org/GNOME/libpeas/-/issues/19

Closes #300
2021-06-29 14:47:03 +02:00
Evangelos Ribeiro Tzaras
e00b90d64e application: settings: Add autoload-plugins setting
This setting will be used to define the provider plugins to be loaded on
application startup if calls has been invoked without `--provider`
2021-06-26 08:57:53 +02:00
Evangelos Ribeiro Tzaras
4f6fb722b1 application: Allow invoking with multiple -p arguments
When calls is invoked with one or more `--provider` arguments,
the application will only load the providers specified by the command line.

If no `--provider` argument is given, the application will instead fall back
to loading providers defined in the settings (see next commit).
2021-06-26 08:57:53 +02:00
Evangelos Ribeiro Tzaras
cfd3c2a7fe util: Get rid of conditional compilation in calls_find_in_store()
This is not needed anymore after bumping the required glib version to 2.64.
2021-06-25 07:34:38 +00:00
Evangelos Ribeiro Tzaras
cce8318a64 notifier: Explicitly handle unknown callers
Closes #288
2021-06-18 17:13:48 +00: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
160d3e42a8 ringer: Follow coding style for G_LOG_DOMAIN
Closes #294
2021-06-18 11:12:13 +02:00
Evangelos Ribeiro Tzaras
b550160a0d util: Make position argument in calls_find_store() optional 2021-06-11 17:52:43 +02:00
Evangelos Ribeiro Tzaras
ccae753194 manager: codestyle 2021-06-11 17:50:42 +02:00
Evangelos Ribeiro Tzaras
ddcd91d3d9 manager: Fix whitespace 2021-06-11 17:50:22 +02:00
Evangelos Ribeiro Tzaras
acc35ad224 main-window: Add default case to switch statement
As caught by compiling with `-Wswitch-default`
2021-06-03 19:46:45 +00: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
f097a39e04 call-display: Add default case to switch statement
As caught by compiling with `-Wswitch-default`
2021-06-03 19:46:45 +00:00
Evangelos Ribeiro Tzaras
2847508034 Fix missing-declarations warnings all over the codebase
As caught by compiling with `-Wmissing-declarations`
by either making functions static, or declaring them in the header.
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
9877f4469b display: Fix typo 2021-06-03 19:46:45 +00:00
Evangelos Ribeiro Tzaras
588955b59e display: codestyle 2021-06-03 19:46:45 +00:00
Guido Günther
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
Evangelos Ribeiro Tzaras
8d937bedf6 Initial DBus API 2021-06-03 14:29:36 +00:00
Evangelos Ribeiro Tzaras
cb533aabb7 manager: Update country code
By connecting to the "notify::country-code" signal of our origins.
2021-06-01 14:52:23 +02:00
Evangelos Ribeiro Tzaras
7d3426598d application: settings: Add country code setting
This helps to unbreak country code lookup (see 5fd39121).
2021-06-01 14:52:23 +02:00
Evangelos Ribeiro Tzaras
4990529c6c tests: manager: Add multiple provider tests
The test suite can be further expanded later. For now this suffices to
have some basic regression testing for multiple provider support in place.
2021-06-01 14:52:23 +02:00
Evangelos Ribeiro Tzaras
44f2002f86 manager: Differentiate the NO_ORIGIN state
This avoids confusion when only the SIP plugin is loaded, but no account
is being used.

For this we introduce two new functions in the abstract CallsProvider class:
`is_modem()` to indicate whether the the provider deals with PTSN telephony and
`is_operational()` which by default simply checks if there any avalaible origins
2021-06-01 14:52:23 +02:00
Evangelos Ribeiro Tzaras
98d66743a1 application: Don't add a provider if one is already present
If we initially invoked `gnome-calls -p sip` and later invoke
`gnome-calls sip:user@host` we don't expect to have the default MM provider
added.
2021-06-01 14:52:23 +02:00
Evangelos Ribeiro Tzaras
3f3b108cea new-call-box: Honour auto-use-default-origins setting 2021-06-01 14:52:23 +02:00
Evangelos Ribeiro Tzaras
fef1531749 application: Add CallsSettings class
This makes it easy to access application wide settings.
2021-06-01 14:52:23 +02:00
Evangelos Ribeiro Tzaras
0b2f146053 manager: support multiple providers
This includes the following changes:
- Introduce a `providers` hash table to keep track of multiple CallProvider's
  and remove the `provider` member
- Remove `calls_manager_get_provider()` and `calls_manager_set_provider()`
  in favour of `calls_manager_add_provider()`, `calls_manager_remove_provider()`
  and `calls_manager_has_provider()`
- Introduce a `origins` GListStore to keep track of available origins.
  `origins` is updated in `items_changed_cb()` when the origins of any
  CallsProvider are updated.
- Adapt to changes with respect to `calls_manager_get_origins()`.
- Introduce `origins_by_protocol` hash table to keep track of available origins
  per protocol.
- Adjust tests
- We temporarily break country code lookup which was handled previously
  with the "default-origin" mechanism. We will add it back to the CallsSettings
  class which will provide a better application-wide mechanism.
2021-06-01 14:52:18 +02:00
Evangelos Ribeiro Tzaras
0c966fdf83 origin: Add API to query supported protocols
This will allow selecting a suitable origin when placing outgoing calls.
2021-05-28 17:02:02 +02:00
Evangelos Ribeiro Tzaras
7ad0f4cdd6 provider: Add API to query supported protocols
These are the protocols that the provider plugin may support. The origins
must be queried independently whether or not they support any given protocol.

Example: A SIP origin/account may or may not support the "tel" protocol.
2021-05-28 17:02:02 +02: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
53f69b06dd call: Introduce protocol property 2021-05-28 13:18:24 +02:00
Evangelos Ribeiro Tzaras
1e84812938 util: Add simple API to query protocol 2021-05-28 13:18:24 +02:00
Evangelos Ribeiro Tzaras
80ec7d8a35 account-provider: Add debugging in the public functions 2021-05-28 13:18:24 +02:00
Evangelos Ribeiro Tzaras
fecdc1fff8 cleanup: Fix calls_origin_get_name() related memory leaks
Document calls_origin_get_name() correctly as transfer-full.
Additionaly fix related memory leaks.
2021-05-28 13:18:24 +02:00
Evangelos Ribeiro Tzaras
1543802c88 provider: whitespace and indentation 2021-05-28 13:18:24 +02:00
Evangelos Ribeiro Tzaras
2ac43f391a manager: Set peas search path only once
There is no need to redo it for every added plugin.
2021-05-20 02:52:11 +02:00
Mohammed Sadiq
b1278f6140 build: Avoid building files multiple times
We don't have to build each source for every test, instead we could
create a static library link it with every test, which will be a lot
faster.
2021-05-17 20:00:04 +05:30
Evangelos Ribeiro Tzaras
14ef4f6b17 Add CallsAccountProviderInterface
This interface should by implemented by providers for which the user can add
or remove accounts.
2021-05-04 06:41:43 +02:00
Evangelos Ribeiro Tzaras
781adaddee sip: origin: Use CallsAccountState instead of SipAccountState 2021-05-04 05:57:42 +02:00
Evangelos Ribeiro Tzaras
0e5bd82568 Add CallsAccountInterface
This interface should be implemented by origins which represent an online
account. This means they must have a implement a property representing the
credentials and another representing the account state (online, offline, etc).
2021-05-04 05:57:42 +02:00
Evangelos Ribeiro Tzaras
3f72d34c49 Add CallsCredentials class and use it in CallsSipProvider
CallsCredentials is a dumb container to store account credentials.
This is done in preparation for the account management in the UI.
2021-05-04 05:57:06 +02:00