1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-06-07 20:39:37 +00:00
Commit graph

95 commits

Author SHA1 Message Date
Evangelos Ribeiro Tzaras d3e42c93cd refactor: Switch to CallsPluginManager 2023-05-20 04:04:50 +02: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 2550141585 application: Remove unused macro 2023-04-18 08:34:39 +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 ffc3c984b0 application: Respect object lifecycle for signals 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 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 f997048a38 build: Rename config.h to calls-config.h
This guards against accidentally including configuration from elsewhere.
2022-12-22 15:08:18 +00:00
Evangelos Ribeiro Tzaras 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 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 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 a278cb660c application: Fix indentation 2022-11-01 10:19:08 +00: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 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
Andrey Skvortsov e8895e9387 application: fix 'tel:' URL handling with escaped symbols
It's common to have spaces or other separator characters in telephone
numbers. If tel: link (example: tel:+1 855-698-1150) is clicked in browser all
unsupported characters are escaped (example: tel:+1%20(855)%20698-11-50).
2022-06-15 07:39:37 +00:00
Evangelos Ribeiro Tzaras 7ac862155b Uncrustify sources
Ran `find src plugins -iname '*.[c|h]' -print0 | xargs -0 uncrustify --no-backup`
with some minimal manual intervention.
2022-04-24 12:59:42 +02:00
Evangelos Ribeiro Tzaras 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 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 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 e148930cc4 application: Sort includes alphabetically 2022-01-11 12:00:10 +00:00
Evangelos Ribeiro Tzaras edfb4455f8 application: Chain up shutdown 2021-12-02 05:52:44 +01:00
Evangelos Ribeiro Tzaras aad6b85a2b application: Codestyle 2021-12-02 05:52:44 +01: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
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
Evangelos Ribeiro Tzaras bf72169f68 application: Initialize libcall-ui 2021-11-16 09:39:34 +01: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 33ad4dbe86 Simplify country code handling 2021-09-27 08:46:09 +00: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
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
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 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 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 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 dbb829be06 debug: Add G_LOG_DOMAIN to every file using g_debug() 2021-06-18 11:12:13 +02: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 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 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 fef1531749 application: Add CallsSettings class
This makes it easy to access application wide settings.
2021-06-01 14:52:23 +02:00