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.
This commit is contained in:
Evangelos Ribeiro Tzaras
2021-04-16 19:12:27 +02:00
parent 3f3b108cea
commit 98d66743a1
3 changed files with 19 additions and 3 deletions

View File

@@ -104,9 +104,10 @@ handle_local_options (GApplication *application,
"set-provider-name",
g_variant_new_string (arg));
} else {
g_action_group_activate_action (G_ACTION_GROUP (application),
"set-provider-name",
g_variant_new_string (DEFAULT_PROVIDER_PLUGIN));
if (!calls_manager_has_any_provider (calls_manager_get_default ()))
g_action_group_activate_action (G_ACTION_GROUP (application),
"set-provider-name",
g_variant_new_string (DEFAULT_PROVIDER_PLUGIN));
}
ok = g_variant_dict_contains (options, "daemon");