Uncrustify sources
Ran `find src plugins -iname '*.[c|h]' -print0 | xargs -0 uncrustify --no-backup` with some minimal manual intervention.
This commit is contained in:
@@ -97,10 +97,10 @@ is_form_filled (CallsSipAccountWidget *self)
|
||||
g_assert (CALLS_IS_SIP_ACCOUNT_WIDGET (self));
|
||||
|
||||
return
|
||||
g_strcmp0 (gtk_entry_get_text (GTK_ENTRY (self->host)), "") != 0 &&
|
||||
g_strcmp0 (gtk_entry_get_text (GTK_ENTRY (self->user)), "") != 0 &&
|
||||
g_strcmp0 (gtk_entry_get_text (GTK_ENTRY (self->password)), "") != 0 &&
|
||||
g_strcmp0 (gtk_entry_get_text (GTK_ENTRY (self->port)), "") != 0;
|
||||
g_strcmp0 (gtk_entry_get_text (self->host), "") != 0 &&
|
||||
g_strcmp0 (gtk_entry_get_text (self->user), "") != 0 &&
|
||||
g_strcmp0 (gtk_entry_get_text (self->password), "") != 0 &&
|
||||
g_strcmp0 (gtk_entry_get_text (self->port), "") != 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -122,35 +122,35 @@ on_user_changed (CallsSipAccountWidget *self)
|
||||
static void
|
||||
set_password_visibility (CallsSipAccountWidget *self, gboolean visible)
|
||||
{
|
||||
const char* icon_name;
|
||||
const char *icon_name;
|
||||
|
||||
g_assert (CALLS_IS_SIP_ACCOUNT_WIDGET (self));
|
||||
g_assert (GTK_IS_ENTRY (self->password));
|
||||
g_assert (CALLS_IS_SIP_ACCOUNT_WIDGET (self));
|
||||
g_assert (GTK_IS_ENTRY (self->password));
|
||||
|
||||
icon_name = visible ?
|
||||
"view-conceal-symbolic" :
|
||||
"view-reveal-symbolic";
|
||||
icon_name = visible ?
|
||||
"view-conceal-symbolic" :
|
||||
"view-reveal-symbolic";
|
||||
|
||||
gtk_entry_set_visibility (self->password, visible);
|
||||
gtk_entry_set_icon_from_icon_name (self->password, GTK_ENTRY_ICON_SECONDARY,
|
||||
icon_name);
|
||||
gtk_entry_set_visibility (self->password, visible);
|
||||
gtk_entry_set_icon_from_icon_name (self->password, GTK_ENTRY_ICON_SECONDARY,
|
||||
icon_name);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
on_password_visibility_changed(CallsSipAccountWidget *self,
|
||||
GtkEntryIconPosition icon_pos,
|
||||
GdkEvent *event,
|
||||
GtkEntry *entry)
|
||||
on_password_visibility_changed (CallsSipAccountWidget *self,
|
||||
GtkEntryIconPosition icon_pos,
|
||||
GdkEvent *event,
|
||||
GtkEntry *entry)
|
||||
{
|
||||
gboolean visible;
|
||||
gboolean visible;
|
||||
|
||||
g_assert (CALLS_IS_SIP_ACCOUNT_WIDGET (self));
|
||||
g_assert (GTK_IS_ENTRY (entry));
|
||||
g_assert (icon_pos == GTK_ENTRY_ICON_SECONDARY);
|
||||
g_assert (CALLS_IS_SIP_ACCOUNT_WIDGET (self));
|
||||
g_assert (GTK_IS_ENTRY (entry));
|
||||
g_assert (icon_pos == GTK_ENTRY_ICON_SECONDARY);
|
||||
|
||||
visible = !gtk_entry_get_visibility (entry);
|
||||
set_password_visibility (self, visible);
|
||||
visible = !gtk_entry_get_visibility (entry);
|
||||
set_password_visibility (self, visible);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -173,7 +173,7 @@ on_port_entry_insert_text (CallsSipAccountWidget *self,
|
||||
if (!new_text || !*new_text || self->port_self_change)
|
||||
return;
|
||||
|
||||
pos = (int *)position;
|
||||
pos = (int *) position;
|
||||
g_object_set_data (G_OBJECT (entry), "old-pos", GINT_TO_POINTER (*pos));
|
||||
|
||||
if (new_text_length == -1)
|
||||
@@ -215,7 +215,7 @@ get_port (CallsSipAccountWidget *self)
|
||||
int port = 0;
|
||||
|
||||
text = gtk_entry_get_text (self->port);
|
||||
port = (int)g_ascii_strtod (text, NULL);
|
||||
port = (int) g_ascii_strtod (text, NULL);
|
||||
|
||||
return port;
|
||||
}
|
||||
@@ -270,6 +270,7 @@ find_protocol (CallsSipAccountWidget *self,
|
||||
guint *index)
|
||||
{
|
||||
guint len;
|
||||
|
||||
g_assert (CALLS_IS_SIP_ACCOUNT_WIDGET (self));
|
||||
|
||||
len = g_list_model_get_n_items (G_LIST_MODEL (self->protocols_store));
|
||||
@@ -352,7 +353,7 @@ edit_form (CallsSipAccountWidget *self,
|
||||
/* The following should always succeed,
|
||||
TODO inform user in the error case
|
||||
related issue #275 https://source.puri.sm/Librem5/calls/-/issues/275
|
||||
*/
|
||||
*/
|
||||
if (!find_protocol (self, protocol, &protocol_index))
|
||||
protocol_index = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user