mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-12-12 07:37:35 +00:00
provider: whitespace and indentation
This commit is contained in:
parent
2ac43f391a
commit
1543802c88
2 changed files with 36 additions and 43 deletions
|
@ -81,8 +81,7 @@ calls_provider_get_property (GObject *object,
|
||||||
{
|
{
|
||||||
CallsProvider *self = CALLS_PROVIDER (object);
|
CallsProvider *self = CALLS_PROVIDER (object);
|
||||||
|
|
||||||
switch (prop_id)
|
switch (prop_id) {
|
||||||
{
|
|
||||||
case PROP_STATUS:
|
case PROP_STATUS:
|
||||||
g_value_set_string (value, calls_provider_get_status (self));
|
g_value_set_string (value, calls_provider_get_status (self));
|
||||||
break;
|
break;
|
||||||
|
@ -179,19 +178,16 @@ calls_provider_load_plugin (const char *name)
|
||||||
|
|
||||||
// Find the plugin
|
// Find the plugin
|
||||||
info = peas_engine_get_plugin_info (plugins, name);
|
info = peas_engine_get_plugin_info (plugins, name);
|
||||||
if (!info)
|
if (!info) {
|
||||||
{
|
|
||||||
g_debug ("Could not find plugin `%s'", name);
|
g_debug ("Could not find plugin `%s'", name);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Possibly load the plugin
|
// Possibly load the plugin
|
||||||
if (!peas_plugin_info_is_loaded (info))
|
if (!peas_plugin_info_is_loaded (info)) {
|
||||||
{
|
|
||||||
peas_engine_load_plugin (plugins, info);
|
peas_engine_load_plugin (plugins, info);
|
||||||
|
|
||||||
if (!peas_plugin_info_is_available (info, &error))
|
if (!peas_plugin_info_is_available (info, &error)) {
|
||||||
{
|
|
||||||
g_debug ("Error loading plugin `%s': %s", name, error->message);
|
g_debug ("Error loading plugin `%s': %s", name, error->message);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -200,16 +196,14 @@ calls_provider_load_plugin (const char *name)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check the plugin provides CallsProvider
|
// Check the plugin provides CallsProvider
|
||||||
if (!peas_engine_provides_extension (plugins, info, CALLS_TYPE_PROVIDER))
|
if (!peas_engine_provides_extension (plugins, info, CALLS_TYPE_PROVIDER)) {
|
||||||
{
|
|
||||||
g_debug ("Plugin `%s' does not have a provider extension", name);
|
g_debug ("Plugin `%s' does not have a provider extension", name);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the extension
|
// Get the extension
|
||||||
extension = peas_engine_create_extensionv (plugins, info, CALLS_TYPE_PROVIDER, 0, NULL);
|
extension = peas_engine_create_extensionv (plugins, info, CALLS_TYPE_PROVIDER, 0, NULL);
|
||||||
if (!extension)
|
if (!extension) {
|
||||||
{
|
|
||||||
g_debug ("Could not create provider from plugin `%s'", name);
|
g_debug ("Could not create provider from plugin `%s'", name);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,6 @@ struct _CallsProviderClass
|
||||||
GListModel *(*get_origins) (CallsProvider *self);
|
GListModel *(*get_origins) (CallsProvider *self);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const char *calls_provider_get_name (CallsProvider *self);
|
const char *calls_provider_get_name (CallsProvider *self);
|
||||||
const char *calls_provider_get_status (CallsProvider *self);
|
const char *calls_provider_get_status (CallsProvider *self);
|
||||||
GListModel *calls_provider_get_origins (CallsProvider *self);
|
GListModel *calls_provider_get_origins (CallsProvider *self);
|
||||||
|
|
Loading…
Reference in a new issue