Anton Lazarev
0727996edf
calls-account-overview: Adapt to GtkBin/GtkContainer removal
...
https://docs.gtk.org/gtk4/migrating-3to4.html#adapt-to-gtkbin-removal
https://docs.gtk.org/gtk4/migrating-3to4.html#adapt-to-gtkcontainer-removal
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/714 >
2024-04-06 08:15:25 -07:00
Anton Lazarev
f7354a06c6
calls-call-window: Adapt to GtkContainer removal
...
https://docs.gtk.org/gtk4/migrating-3to4.html#adapt-to-gtkcontainer-removal
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/714 >
2024-04-06 08:15:25 -07:00
Anton Lazarev
50126f05f0
calls-application: Replace GtkClipboard with GdkClipboard
...
https://docs.gtk.org/gtk4/migrating-3to4.html#replace-gtkclipboard-with-gdkclipboard
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/714 >
2024-04-06 08:15:25 -07:00
Anton Lazarev
31d6a9dcf3
calls-new-call-box: adapt to AdwComboRow
API changes
...
https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/migrating-libhandy-1-4-to-libadwaita.html#adapt-to-adwcomborow-api-changes
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/714 >
2024-04-06 08:15:25 -07:00
Anton Lazarev
ca059116b9
calls-application: Stop using GdkScreen
...
https://docs.gtk.org/gtk4/migrating-3to4.html#adapt-to-gtkwidgets-size-allocation-changes
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/714 >
2024-04-06 08:15:25 -07:00
Anton Lazarev
fef4e02b50
calls-main-window: Adapt to GTKWidget's size allocation changes
...
https://docs.gtk.org/gtk4/migrating-3to4.html#adapt-to-gtkwidgets-size-allocation-changes
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/714 >
2024-04-06 08:15:25 -07:00
Anton Lazarev
f6c9ff5c2e
calls-main-window: Adapt to GtkContainer removal
...
https://docs.gtk.org/gtk4/migrating-3to4.html#adapt-to-gtkcontainer-removal
Now using `GtkStackPage` to manage icons.
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/714 >
2024-04-06 08:15:25 -07:00
Anton Lazarev
674906f788
calls-application: Unconditionally use AdwStyleManager
...
> In libadwaita color schemes will be the only way to request dark
appearance.
https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/migrating-libhandy-1-4-to-libadwaita.html#use-hdystylemanager-instead-of-gtksettingsgtk-application-prefer-dark-theme
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/714 >
2024-04-06 08:15:24 -07:00
Anton Lazarev
2b972ba035
treewide: gtk_widget_destroy()
removal
...
https://docs.gtk.org/gtk4/migrating-3to4.html#adapt-to-gtk_widget_destroy-removal
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/714 >
2024-04-06 08:15:24 -07:00
Anton Lazarev
34a7651f44
treewide: Replace hide/show with set_visible
...
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/714 >
2024-04-06 08:15:24 -07:00
Anton Lazarev
12b78ca5f6
calls-best-match: AdwAvatar API changes
...
https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/migrating-libhandy-1-4-to-libadwaita.html#adapt-to-adwavatar-api-changes
This is *not* ideal, since it relies on Folks returning a GFileIcon
internally, and it's also blocking. However, better to use something
simple that compiles and works to begin with.
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/714 >
2024-04-06 08:15:24 -07:00
Anton Lazarev
52a0963e6c
treewide: Remove icon size from constructors
...
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/714 >
2024-04-06 08:15:24 -07:00
Anton Lazarev
4b0b20eb0a
treewide: GtkEntry -> GtkEditable
...
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/714 >
2024-04-06 08:15:24 -07:00
Anton Lazarev
10b0672f9e
treewide: Remove GtkEventBox
...
https://docs.gtk.org/gtk4/migrating-3to4.html#stop-using-gtkeventbox
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/714 >
2024-04-06 08:15:24 -07:00
Anton Lazarev
ee3abc009a
treewide: Replace libhandy with libadwaita
...
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/714 >
2024-04-06 08:15:24 -07:00
Anton Lazarev
4ed1bba0b8
treewide: Subclass custom classes from GtkWidget
...
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/714 >
2024-04-06 08:15:24 -07:00
Anton Lazarev
bc90d6e64f
gtklistmodels: remove gtklistmodels polyfills
...
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/714 >
2024-04-06 08:15:24 -07:00
Anton Lazarev
98231778ed
meson: Bump gtk dependency to 4.0
...
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/714 >
2024-04-01 18:37:57 -07:00
Anton Lazarev
b26faf1b13
calls-new-call-box: compose with GtkBin instead of subclassing GtkBox
...
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/714 >
2024-04-01 18:37:57 -07:00
Anton Lazarev
2141c1ffc2
in-app-notification: compose with GtkBin instead of subclassing GtkRevealer
...
Note that the GtkOverlay must pass-through interactions for this to
work, meaning it's no longer possible to interact with the
notifications. I'm leaving it like this since I'll need to replace it
with AdwToast later anyways.
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/714 >
2024-04-01 18:37:57 -07:00
Anton Lazarev
f1e63c4979
history-box: compose with GtkBin instead of subclassing GtkStack
...
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/714 >
2024-04-01 18:37:57 -07:00
Guido Günther
041921ca26
calls-manager: Connect listener past the list model filters
...
The list model filters connect signal handlers for item-changed to
refilter the list models.
In order to enable protocols based on what the origin supports
`on_origins_changed` needs these filtered results. Since it is a signal
handler by itself connect it late so it runs later in the filter chain.
Closes: https://gitlab.gnome.org/GNOME/calls/-/issues/601
2024-03-13 10:17:16 +00:00
Daniel Rusek
58d2474f28
emergency-call-types: Add Czech Republic
2024-02-28 09:11:45 +00:00
Guido Günther
3a467d85ad
emergency-call-types: Add EU countries
...
They all support 112.
2024-02-10 17:10:14 +01:00
Guido Günther
e49cd86035
emergency-calls-manager: Use network code to get emergency numbers
...
By far not all sims have emergency numbers and we want to respect the
users current location anyway.
We use a hash to avoid duplicates.
2024-02-10 17:10:10 +01:00
Guido Günther
678a41bade
emergency-calls-manager: Move contact adding to separate function
...
Improves readability and will be get another call site soon.
2024-02-10 17:09:59 +01:00
Guido Günther
9c0acdd560
emergency-calls-manager: Fix object name
2024-02-10 17:09:57 +01:00
Guido Günther
edb46acfa5
emergency-call-types: Add location source
...
We named it fallback but location is a better name as we get it
from the current country code.
2024-02-10 17:09:48 +01:00
Guido Günther
4951cf5b3b
emergency-call-types: Use hash for flag lookups too
2024-02-10 17:09:45 +01:00
Guido Günther
aaefc0443a
emergency-call-types: Allow to lookup emergency numbers by country code
...
We build a hash as cache to speed up lookups. As this is a one time
thing we just do it once and don't bother to free it up.
We currently assume that all numbers can be used for the location based
lookups. Should that change we want to add a flag indicating that.
2024-02-10 17:09:37 +01:00
Guido Günther
c4630a2647
origin: Add network country code
...
This is technically only useful for mobile networks.
2024-02-10 17:09:10 +01:00
Guido Günther
4695f81f5c
dbus: Fix typo
2024-02-10 17:09:01 +01:00
Evangelos Ribeiro Tzaras
6987d0f1e3
plugin-manager: Add debugging to init()
2023-06-13 18:56:03 +02:00
Evangelos Ribeiro Tzaras
7d3b5afad9
application: Reindent struct members
...
Split into separate commit to reduce diff noise.
2023-05-20 04:04:50 +02:00
Evangelos Ribeiro Tzaras
d3e42c93cd
refactor: Switch to CallsPluginManager
2023-05-20 04:04:50 +02:00
Evangelos Ribeiro Tzaras
1b3f8ca20c
Introduce CallsPluginManager
2023-05-20 04:04:48 +02:00
Evangelos Ribeiro Tzaras
3f5d570d4f
Introduce CallsPlugin
...
A convenience class to query information about plugins and to allow
loading and unloading.
2023-05-15 09:56:28 +02:00
Evangelos Ribeiro Tzaras
c6ea3adf64
manager: Respect object life cycle for signal handlers
2023-04-18 08:34:39 +00:00
Evangelos Ribeiro Tzaras
f7dd62c0bd
contacts-provider: Disconnect signals on finalize
2023-04-18 08:34:39 +00:00
Evangelos Ribeiro Tzaras
c7ba302b18
account-row: Guard calls_account_row_new() against invalid provider
2023-04-18 08:34:39 +00:00
Evangelos Ribeiro Tzaras
3076f913e7
manager: Clear providers after origins
...
Fixes a segmentation fault on shutdown in nua_unregister()
2023-04-18 08:34:39 +00:00
Evangelos Ribeiro Tzaras
23e9cca320
main-window: Use gtk_widget_destroy() for windows
...
Top level widgets should typically call gtk_widget_destroy()
2023-04-18 08:34:39 +00:00
Evangelos Ribeiro Tzaras
47bb3aaa62
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-18 08:34:39 +00:00
Evangelos Ribeiro Tzaras
34d4e854bc
manager: Respect object life cycle for signal handlers
...
Don't call signal handlers after the manager has been disposed.
2023-04-18 08:34:39 +00:00
Evangelos Ribeiro Tzaras
f485215a9f
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-18 08:34:39 +00:00
Evangelos Ribeiro Tzaras
d690fe5f68
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-18 08:34:39 +00:00
Evangelos Ribeiro Tzaras
813103e684
application: Don't leak CallsManager
2023-04-18 08:34:39 +00:00
Evangelos Ribeiro Tzaras
2f3f55c831
new-call-box: Don't leak CallsOrigin
...
get_selected_origin () does not need to take a reference on CallsOrigin
2023-04-18 08:34:39 +00:00
Evangelos Ribeiro Tzaras
ea5d7038e7
new-call-box: Use STR_IS_NULL_OR_EMPTY macro
2023-04-18 08:34:39 +00:00
Evangelos Ribeiro Tzaras
0452d8a2bf
manager: Use STR_IS_NULL_OR_EMPTY macro
2023-04-18 08:34:39 +00:00
Evangelos Ribeiro Tzaras
3e43ba2975
call-window: Remove dead code
2023-04-18 08:34:39 +00:00
Evangelos Ribeiro Tzaras
2550141585
application: Remove unused macro
2023-04-18 08:34:39 +00:00
Evangelos Ribeiro Tzaras
4e900e1ac5
main-window: Codestyle
2023-04-18 08:34:39 +00:00
Evangelos Ribeiro Tzaras
0261271560
main-window: Sort includes
2023-04-18 08:34:39 +00:00
Evangelos Ribeiro Tzaras
9ff06561e8
resources: Sort alphabetically
2023-04-18 08:34:39 +00:00
Evangelos Ribeiro Tzaras
0cb25d9e3c
build: Sort enum headers
2023-04-18 08:34:39 +00:00
Evangelos Ribeiro Tzaras
23ee0475dd
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-13 06:01:05 +00:00
Evangelos Ribeiro Tzaras
830906f57a
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-13 06:01:05 +00:00
Evangelos Ribeiro Tzaras
10d74634ba
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-13 06:01:05 +00:00
Evangelos Ribeiro Tzaras
ac2dc8573d
best-match: Add gtk-doc annotations to the public API
...
Notably this adds ownership and nullable annotations, where appropriate.
2023-04-13 06:01:05 +00:00
Evangelos Ribeiro Tzaras
3fb016f6b2
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-13 06:01:05 +00:00
Evangelos Ribeiro Tzaras
36fdbc28e6
emergency-calls-manager: Don't leak origin
...
g_list_model_get_item is transfer full
2023-04-09 16:08:22 +02:00
Evangelos Ribeiro Tzaras
0de7599567
emergency-calls-manager: Add missing argument for on_origins_changed handler
...
The "removed" argument of the models "items-changed" signal was
forgotten making it misbehave when origins do get removed:
GLib-GObject[1287799]: WARNING: invalid (NULL) pointer instance
GLib-GObject[1287799]:CRITICAL: g_signal_connect_object: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
2023-04-09 16:08:00 +02:00
Evangelos Ribeiro Tzaras
9a52c57ffe
emergency-calls-manager: Fix indentation
...
By running uncrustify
2023-04-09 12:18:55 +02:00
Guido Günther
e5a4d899f8
emergency-calls-manager: Add support for dialing emergency numbers
...
We just pick the first matching provider.
2023-04-09 09:48:36 +00:00
Guido Günther
b58be993a6
emergency-calls-manager: Don't leak origin
...
g_list_model_get_item is transfer full
2023-04-09 09:48:36 +00:00
Guido Günther
b087bea16b
Resolve emergency number types
...
We add a small hardcoded table for now. Future versions
will improve this to parse this out of ASOPs eccdata.
If we can't determine the type of a number we add it verbatim.
2023-04-06 16:37:59 +00:00
Guido Günther
a8cb3dd7c7
emergency-calls: Notify on DBus when emergency numbers change
...
This is needed if an origin changes it's emergency numbers on the fly
(e.g. when initializing them late).
2023-04-06 16:37:59 +00:00
Guido Günther
6cdae3fd40
origin: Allow to fetch country code
...
This is an optional method as not all origins might support this
(e.g. SIP).
2023-04-06 16:37:59 +00: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
Evangelos Ribeiro Tzaras
94e940d5ff
dbus-manager: Add explicit include
...
util.h is included transitively, but explicit is better than implicit.
2023-01-22 07:33:02 +00:00
Evangelos Ribeiro Tzaras
5890aae5f8
manager: Add explicit include
...
util.h is included transitively, but explicit is better than implicit.
2023-01-22 07:33:02 +00:00
Evangelos Ribeiro Tzaras
6bcc95c691
notifier: Add explicit include
...
util.h is included transitively, but explicit is better than implicit.
2023-01-22 07:33:02 +00:00
Evangelos Ribeiro Tzaras
c0cfaeaffe
contacts-row: Use g_autoptr
...
folks 0.14 (shipped in Debian Bullseye) has cleanup functions defined.
2023-01-22 07:33:02 +00:00
Evangelos Ribeiro Tzaras
9b49b0bc4f
contacts-provider: Use STR_IS_NULL_OR_EMPTY macro
2023-01-22 07:33:02 +00:00
Evangelos Ribeiro Tzaras
b799605d01
contacts-provider: Codestyle
2023-01-22 07:33:02 +00:00
Evangelos Ribeiro Tzaras
ac83323de6
ui-call-data: Always use calls_best_match_get_avatar() to retrieve avatars
...
self->best_match is never NULL:
The test suite used to wrap calls_contacts_provder_new() to always return
NULL which in turn caused the best match to be NULL.
This was done to avoid warnings raised by libfolks
about missing the primary store (eds).
This is no longer necessary as the environment now tells folks which
backend to use.
2023-01-20 17:12:02 +01:00
Evangelos Ribeiro Tzaras
28f0ee42ee
ui-call-data: Assert best_match is set
...
self->best_match is never NULL:
The test suite used to wrap calls_contacts_provder_new() to always return
NULL which in turn caused the best match to be NULL.
This was done to avoid warnings raised by libfolks
about missing the primary store (eds).
This is no longer necessary as the environment now tells folks which
backend to use.
2023-01-20 17:12:02 +01:00
Evangelos Ribeiro Tzaras
60ece1a656
ui-call-data: Use the name of the best match if individual was found
...
self->best_match is never NULL:
The test suite used to wrap calls_contacts_provder_new() to always return
NULL which in turn caused the best match to be NULL.
This was done to avoid warnings raised by libfolks
about missing the primary store (eds).
This is no longer necessary as the environment now tells folks which
backend to use.
2023-01-20 17:12:01 +01:00
Evangelos Ribeiro Tzaras
e878fabb27
application: Remove and destroy application windows on shutdown
...
The windows need to be removed from the GtkApplication because they are
holding references to the application which prevents proper cleanup.
Fixes : #508
2023-01-11 18:50:22 +01:00
Evangelos Ribeiro Tzaras
177199467f
application: Set unix signal handler source ID to 0
...
g_clear_signal_handle_id() will complain about unknown sources otherwise.
2023-01-11 18:47:43 +01:00
Evangelos Ribeiro Tzaras
56891363cb
history-box: Fix clearing signal handler
...
By the time g_clear_signal_handler() was invoked self->model had already
been NULL'ed, so clear the signal before clearing the model.
2023-01-11 18:14:36 +01:00
Abderrahim Kitouni
14c630ab2e
Only define EPhoneNumber autocleanup for old versions
...
This fixes build with latest evolution-data-server
2023-01-11 09:39:45 +00:00
Evangelos Ribeiro Tzaras
0d072e7335
ringer: Remove explicit DBus timeout handling
...
As libfeedback uses GDbusProxy under the hood which defaults to timing
out after 25 seconds there is no need to handle timeouts explicitly.
Furthermore 1 second seems to not always be enough time to get a
response which leads to endless ringing.
Fixes #543
2023-01-09 16:58:33 +00:00
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