mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-12-12 07:37:35 +00:00
codestyle: new-call-box
This commit is contained in:
parent
d65284acaa
commit
c2c3f64102
1 changed files with 25 additions and 31 deletions
|
@ -147,9 +147,7 @@ dial_queued (CallsNewCallBox *self)
|
|||
CallsOrigin *origin;
|
||||
|
||||
if (!self->dial_queue)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
g_debug ("Dialing %u queued targets",
|
||||
g_list_length (self->dial_queue));
|
||||
|
@ -209,8 +207,7 @@ provider_changed_cb (CallsNewCallBox *self)
|
|||
g_assert (CALLS_IS_NEW_CALL_BOX (self));
|
||||
|
||||
origins = calls_manager_get_origins (calls_manager_get_default ());
|
||||
if (origins)
|
||||
{
|
||||
if (origins) {
|
||||
g_signal_connect_object (origins, "items-changed",
|
||||
G_CALLBACK (origin_count_changed_cb), self,
|
||||
G_CONNECT_SWAPPED);
|
||||
|
@ -284,8 +281,7 @@ calls_new_call_box_dial (CallsNewCallBox *self,
|
|||
g_return_if_fail (target != NULL);
|
||||
|
||||
origin = get_origin (self);
|
||||
if (!origin)
|
||||
{
|
||||
if (!origin) {
|
||||
// Queue for dialing when an origin appears
|
||||
g_debug ("Can't submit call with no origin, queuing for later");
|
||||
self->dial_queue = g_list_append (self->dial_queue,
|
||||
|
@ -315,15 +311,13 @@ calls_new_call_box_send_ussd_async (CallsNewCallBox *self,
|
|||
|
||||
task = g_task_new (self, cancellable, callback, user_data);
|
||||
|
||||
if (!CALLS_IS_USSD (origin))
|
||||
{
|
||||
if (!CALLS_IS_USSD (origin)) {
|
||||
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||
"No origin with USSD available");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!calls_number_is_ussd (target))
|
||||
{
|
||||
if (!calls_number_is_ussd (target)) {
|
||||
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||
"%s is not a valid USSD code", target);
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue