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-06-01 14:52:23 +02:00
parent 3f3b108cea
commit 98d66743a1
3 changed files with 19 additions and 3 deletions
+4 -3
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");