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

@@ -853,3 +853,17 @@ calls_manager_get_suitable_origins (CallsManager *self,
return NULL;
}
/**
* calls_manager_has_any_provider:
* @self: The #CallsManager
*
* Returns: %TRUE if any provider is loaded, %FALSE otherwise
*/
gboolean
calls_manager_has_any_provider (CallsManager *self)
{
g_return_val_if_fail (CALLS_IS_MANAGER (self), FALSE);
return !!g_hash_table_size (self->providers);
}