Commit 57821458 authored by Matthew Barnes's avatar Matthew Barnes Committed by Rodrigo Moya
Browse files

Whitespace and coding style cleanups.

parent 30fe010c
......@@ -58,7 +58,9 @@ e_contact_editor_fullname_set_property (GObject *object,
e_contact_name_free (e_contact_editor_fullname->name);
if (g_value_get_pointer (value) != NULL) {
e_contact_editor_fullname->name = e_contact_name_copy (g_value_get_pointer (value));
e_contact_editor_fullname->name =
e_contact_name_copy (
g_value_get_pointer (value));
fill_in_info (e_contact_editor_fullname);
}
else {
......
......@@ -225,10 +225,10 @@ ce_have_contact (EBook *book, const GError *error, EContact *contact, gpointer c
contact_editor = e_contact_editor_new (
shell, book, qa->contact, TRUE, TRUE /* XXX */);
/* mark it as changed so the Save buttons are enabled when we bring up the dialog. */
g_object_set (contact_editor,
"changed", contact != NULL,
NULL);
/* Mark it as changed so the Save buttons are
* enabled when we bring up the dialog. */
g_object_set (
contact_editor, "changed", contact != NULL, NULL);
/* We pass this via object data, so that we don't get a
* dangling pointer referenced if both the "contact_added"
......
......@@ -1396,7 +1396,9 @@ e_addressbook_view_delete_selection (EAddressbookView *view, gboolean is_delete)
for (l=list;l;l=g_list_next (l)) {
contact = l->data;
ids = g_list_prepend (ids, (gchar *)e_contact_get_const (contact, E_CONTACT_UID));
ids = g_list_prepend (
ids, (gchar *) e_contact_get_const (
contact, E_CONTACT_UID));
}
/* Remove the cards all at once. */
......
......@@ -616,7 +616,8 @@ e_minicard_view_get_type (void)
(GInstanceInitFunc) e_minicard_view_init,
};
reflow_type = g_type_register_static (PARENT_TYPE, "EMinicardView", &reflow_info, 0);
reflow_type = g_type_register_static (
PARENT_TYPE, "EMinicardView", &reflow_info, 0);
}
return reflow_type;
......
......@@ -559,11 +559,17 @@ parseLine (CSVImporter *gci, EContact *contact, gchar *buf) {
break;
case FLAG_DATE_BDAY:
e_contact_set (contact, E_CONTACT_BIRTH_DATE, date_from_string (value->str));
e_contact_set (
contact,
E_CONTACT_BIRTH_DATE,
date_from_string (value->str));
break;
case FLAG_DATE_ANNIVERSARY:
e_contact_set (contact, E_CONTACT_ANNIVERSARY, date_from_string (value->str));
e_contact_set (
contact,
E_CONTACT_ANNIVERSARY,
date_from_string (value->str));
break;
case FLAG_BIRTH_DAY:
......
......@@ -287,10 +287,16 @@ parseLine (GHashTable *dn_contact_hash, EContact *contact,
}
else if (ldif_fields[i].flags & FLAG_BOOLEAN) {
if (!g_ascii_strcasecmp (ldif_value->str, "true")) {
e_contact_set (contact, ldif_fields[i].contact_field, GINT_TO_POINTER (TRUE));
e_contact_set (
contact,
ldif_fields[i].contact_field,
GINT_TO_POINTER (TRUE));
}
else {
e_contact_set (contact, ldif_fields[i].contact_field, GINT_TO_POINTER (FALSE));
e_contact_set (
contact,
ldif_fields[i].contact_field,
GINT_TO_POINTER (FALSE));
}
g_message ("set %s to %s", ptr, ldif_value->str);
}
......
......@@ -79,7 +79,9 @@ action_list_folders_init (ActionContext * p_actctx)
name = e_source_peek_name (s);
if (outputfile)
fprintf (outputfile, "\"%s\",\"%s\",%d\n", uri, name, g_list_length (contacts));
fprintf (
outputfile, "\"%s\",\"%s\",%d\n",
uri, name, g_list_length (contacts));
else
printf ("\"%s\",\"%s\",%d\n", uri, name, g_list_length (contacts));
......
......@@ -749,8 +749,6 @@ query_objects_changed_async (struct _query_msg *msg)
day_end = time_day_end_with_zone (time (NULL), zone);
debug (("Querying for object between %s to %s", e_ctime (&from), e_ctime (&day_end)));
for (l = objects; l != NULL; l = l->next) {
ECalComponentId *id;
GSList *sl;
......
......@@ -458,7 +458,8 @@ save_comp (CompEditor *editor)
priv->comp = clone;
e_cal_component_get_uid (priv->comp, &orig_uid);
/* make a copy of it, because call of e_cal_create_object rewrites the internal uid */
/* Make a copy of it, because call of e_cal_create_object()
* rewrites the internal uid. */
orig_uid_copy = g_strdup (orig_uid);
/* send timezones */
......@@ -467,8 +468,8 @@ save_comp (CompEditor *editor)
/* Attachments*/
e_cal_component_set_attachment_list (priv->comp,
get_attachment_list (editor));
e_cal_component_set_attachment_list (
priv->comp, get_attachment_list (editor));
icalcomp = e_cal_component_get_icalcomponent (priv->comp);
/* send the component to the server */
if (!cal_comp_is_on_server (priv->comp, priv->client)) {
......@@ -627,11 +628,15 @@ save_comp_with_send (CompEditor *editor)
editor, E_CAL_COMPONENT_METHOD_REQUEST,
strip_alarms);
} else {
if (!comp_editor_send_comp (editor, E_CAL_COMPONENT_METHOD_REQUEST, strip_alarms))
if (!comp_editor_send_comp (
editor, E_CAL_COMPONENT_METHOD_REQUEST,
strip_alarms))
return FALSE;
if (delegate)
return comp_editor_send_comp (editor, E_CAL_COMPONENT_METHOD_REPLY, strip_alarms);
return comp_editor_send_comp (
editor, E_CAL_COMPONENT_METHOD_REPLY,
strip_alarms);
}
}
......@@ -877,7 +882,8 @@ action_save_cb (GtkAction *action,
return;
if (!text.value)
if (!send_component_prompt_subject ((GtkWindow *) editor, priv->client, priv->comp))
if (!send_component_prompt_subject (
(GtkWindow *) editor, priv->client, priv->comp))
return;
if (save_comp_with_send (editor)) {
......@@ -2091,7 +2097,8 @@ prompt_and_save_changes (CompEditor *editor, gboolean send)
return FALSE;
if (!text.value)
if (!send_component_prompt_subject ((GtkWindow *) editor, priv->client, priv->comp))
if (!send_component_prompt_subject (
(GtkWindow *) editor, priv->client, priv->comp))
return FALSE;
if (e_cal_component_is_instance (priv->comp))
......
......@@ -406,7 +406,8 @@ task_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
ECalComponentAttendee *ca = l->data;
EMeetingAttendee *ia;
ia = E_MEETING_ATTENDEE (e_meeting_attendee_new_from_e_cal_component_attendee (ca));
ia = E_MEETING_ATTENDEE (
e_meeting_attendee_new_from_e_cal_component_attendee (ca));
/* If we aren't the organizer or the attendee is just
* delegating, don't allow editing. */
if (!comp_editor_get_user_org (editor) ||
......
......@@ -1592,7 +1592,8 @@ refresh_busy_periods (gpointer data)
fbd->qdata = qdata;
fbd->fb_uri = priv->fb_uri;
fbd->store = store;
fbd->email = g_strdup (itip_strip_mailto (e_meeting_attendee_get_address (attendee)));
fbd->email = g_strdup (itip_strip_mailto (
e_meeting_attendee_get_address (attendee)));
/* Check the server for free busy data */
if (priv->client) {
......@@ -1816,7 +1817,9 @@ soup_authenticate (SoupSession *session,
if (retrying && msg->reason_phrase && *msg->reason_phrase) {
g_string_append (description, "\n");
g_string_append_printf (description, _("Failure reason: %s"), msg->reason_phrase);
g_string_append_printf (
description, _("Failure reason: %s"),
msg->reason_phrase);
}
password = e_passwords_ask_password (
......
......@@ -755,10 +755,12 @@ task_table_query_tooltip (GtkWidget *widget,
if (ptr) {
ptr++;
/* To Translators: It will display "Organizer: NameOfTheUser <email@ofuser.com>" */
/* To Translators: It will display
* "Organizer: NameOfTheUser <email@ofuser.com>" */
tmp = g_strdup_printf (_("Organizer: %s <%s>"), organizer.cn, ptr);
} else {
/* With SunOne accounts, there may be no ':' in organiser.value */
/* With SunOne accounts, there may be no ':' in
* organizer.value. */
tmp = g_strdup_printf (_("Organizer: %s"), organizer.cn);
}
......
......@@ -775,7 +775,8 @@ week_view_event_item_draw (GnomeCanvasItem *canvas_item,
time_width = e_week_view_get_time_string_width (week_view);
one_day_event = e_week_view_is_one_day_event (week_view, event_item->priv->event_num);
one_day_event = e_week_view_is_one_day_event (
week_view, event_item->priv->event_num);
model = e_calendar_view_get_model (E_CALENDAR_VIEW (week_view));
......
......@@ -328,7 +328,9 @@ e_week_view_layout_get_day_position (gint day,
*day_x = col;
}
} else {
#define wk(x) ( ( working_days & (days [ ((x) + display_start_day) % 7 ]) ) ? 1 : 0)
#define wk(x) \
((working_days & \
(days[((x) + display_start_day) % 7])) ? 1 : 0)
CalWeekdays days[] = {
CAL_MONDAY,
CAL_TUESDAY,
......
......@@ -216,7 +216,9 @@ week_view_titles_item_draw (GnomeCanvasItem *canvas_item,
/* Draw the lines between each column. */
if (col != 0) {
cairo_set_source_rgb (cr, 0, 0, 0);
cairo_rectangle (cr, week_view->col_offsets[col] - x, allocation.height - y, 1, 1);
cairo_rectangle (
cr, week_view->col_offsets[col] - x,
allocation.height - y, 1, 1);
cairo_fill (cr);
}
......
......@@ -128,7 +128,8 @@ struct _GnomeCalendarPrivate {
* else it uses the date range set in search bar. */
gboolean lview_select_daten_range;
/* used in update_todo_view, to prevent interleaving when called in separate thread */
/* Used in update_todo_view, to prevent interleaving when
* called in separate thread. */
GMutex *todo_update_lock;
};
......@@ -1633,7 +1634,8 @@ gnome_calendar_update_view_times (GnomeCalendar *gcal,
gcal, priv->current_view_type,
&real_start_time, &end_time, &select_time);
if (priv->current_view_type == GNOME_CAL_LIST_VIEW && !priv->lview_select_daten_range)
if (priv->current_view_type == GNOME_CAL_LIST_VIEW &&
!priv->lview_select_daten_range)
return;
e_cal_model_set_time_range (model, real_start_time, end_time);
......@@ -2082,7 +2084,8 @@ gnome_calendar_update_date_navigator (GnomeCalendar *gcal)
if (!gtk_widget_get_visible (GTK_WIDGET (priv->date_navigator)))
return;
if (priv->current_view_type == GNOME_CAL_LIST_VIEW && !priv->lview_select_daten_range)
if (priv->current_view_type == GNOME_CAL_LIST_VIEW &&
!priv->lview_select_daten_range)
return;
model = gnome_calendar_get_model (gcal);
......
......@@ -215,7 +215,9 @@ parse_message (const gchar *msg, gint length, EmailProvider *provider)
static gboolean
parse_soup_message (SoupMessage *msg, EmailProvider *provider)
{
return parse_message (msg->response_body->data, msg->response_body->length, provider);
return parse_message (
msg->response_body->data,
msg->response_body->length, provider);
}
static gboolean
......
......@@ -1591,9 +1591,12 @@ get_signature_html (EMsgComposer *composer)
* http://www.chemie.fu-berlin.de/outerspace/netnews/son-of-1036.html
*/
html = g_strdup_printf (
"<!--+GtkHTML:<DATA class=\"ClueFlow\" key=\"signature\" value=\"1\">-->"
"<!--+GtkHTML:<DATA class=\"ClueFlow\" key=\"signature_name\" value=\"uid:%s\">-->"
"<TABLE WIDTH=\"100%%\" CELLSPACING=\"0\" CELLPADDING=\"0\"><TR><TD>"
"<!--+GtkHTML:<DATA class=\"ClueFlow\" "
" key=\"signature\" value=\"1\">-->"
"<!--+GtkHTML:<DATA class=\"ClueFlow\" "
" key=\"signature_name\" value=\"uid:%s\">-->"
"<TABLE WIDTH=\"100%%\" CELLSPACING=\"0\""
" CELLPADDING=\"0\"><TR><TD>"
"%s%s%s%s"
"%s</TD></TR></TABLE>",
encoded_uid ? encoded_uid : "",
......@@ -3335,7 +3338,8 @@ e_msg_composer_new_with_message (EShell *shell,
camel_header_raw_clear (&xev);
/* Check for receipt request */
if (camel_medium_get_header (CAMEL_MEDIUM (message), "Disposition-Notification-To")) {
if (camel_medium_get_header (
CAMEL_MEDIUM (message), "Disposition-Notification-To")) {
action = GTK_TOGGLE_ACTION (ACTION (REQUEST_READ_RECEIPT));
gtk_toggle_action_set_active (action, TRUE);
}
......
......@@ -73,7 +73,8 @@ emfq_format_clone (EMFormat *emf,
gconf = gconf_client_get_default ();
camel_stream_reset (emfq->stream, NULL);
if (gconf_client_get_bool(gconf, "/apps/evolution/mail/composer/top_signature", NULL))
if (gconf_client_get_bool (
gconf, "/apps/evolution/mail/composer/top_signature", NULL))
camel_stream_printf (emfq->stream, "<br>\n");
g_object_unref (gconf);
handle = em_format_find_handler(emf, "x-evolution/message/prefix");
......@@ -696,14 +697,19 @@ emfq_text_html (EMFormat *emf,
filtered_stream = camel_stream_filter_new (stream);
sig_strip = em_stripsig_filter_new (FALSE);
camel_stream_filter_add (CAMEL_STREAM_FILTER (filtered_stream), sig_strip);
camel_stream_filter_add (
CAMEL_STREAM_FILTER (filtered_stream), sig_strip);
g_object_unref (sig_strip);
em_format_format_text (emf, filtered_stream, (CamelDataWrapper *) part, cancellable);
em_format_format_text (
emf, filtered_stream,
(CamelDataWrapper *) part, cancellable);
camel_stream_flush (filtered_stream, cancellable, NULL);
g_object_unref (filtered_stream);
} else {
em_format_format_text (emf, stream, (CamelDataWrapper *)part, cancellable);
em_format_format_text (
emf, stream,
(CamelDataWrapper *) part, cancellable);
}
}
......
......@@ -484,9 +484,12 @@ em_format_class_remove_handler (EMFormatClass *emfc,
if (current == info) {
current = info->old;
if (current)
g_hash_table_insert (emfc->type_handlers, (gpointer) current->mime_type, current);
g_hash_table_insert (
emfc->type_handlers,
(gpointer) current->mime_type, current);
else
g_hash_table_remove (emfc->type_handlers, info->mime_type);
g_hash_table_remove (
emfc->type_handlers, info->mime_type);
} else {
while (current && current->old != info)
current = current->old;
......@@ -1417,8 +1420,9 @@ em_format_format_text (EMFormat *emf,
camel_stream_reset (mem_stream, NULL);
if (max == -1 || size == -1 || size < (max * 1024) || emf->composer) {
camel_stream_write_to_stream (mem_stream, (CamelStream *)stream, cancellable, NULL);
camel_stream_flush ((CamelStream *)stream, cancellable, NULL);
camel_stream_write_to_stream (
mem_stream, (CamelStream *) stream, cancellable, NULL);
camel_stream_flush ((CamelStream *) stream, cancellable, NULL);
} else {
EM_FORMAT_GET_CLASS (emf)->format_optional (
emf, stream, (CamelMimePart *)dw,
......@@ -1594,10 +1598,12 @@ emf_multipart_appledouble (EMFormat *emf,
GCancellable *cancellable,
gboolean is_fallback)
{
CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part);
CamelMultipart *mp;
CamelMimePart *mime_part;
gint len;
mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part);
if (!CAMEL_IS_MULTIPART (mp)) {
em_format_format_source (emf, stream, part, cancellable);
return;
......@@ -1624,9 +1630,11 @@ emf_multipart_mixed (EMFormat *emf,
GCancellable *cancellable,
gboolean is_fallback)
{
CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part);
CamelMultipart *mp;
gint i, nparts, len;
mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part);
if (!CAMEL_IS_MULTIPART (mp)) {
em_format_format_source (emf, stream, part, cancellable);
return;
......@@ -1651,10 +1659,12 @@ emf_multipart_alternative (EMFormat *emf,
GCancellable *cancellable,
gboolean is_fallback)
{
CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part);
CamelMultipart *mp;
gint i, nparts, bestid = 0;
CamelMimePart *best = NULL;
mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part);
if (!CAMEL_IS_MULTIPART (mp)) {
em_format_format_source (emf, stream, part, cancellable);
return;
......@@ -1753,7 +1763,8 @@ emf_multipart_encrypted (EMFormat *emf,
}
/* Currently we only handle RFC2015-style PGP encryption. */
protocol = camel_content_type_param(((CamelDataWrapper *)mpe)->mime_type, "protocol");
protocol = camel_content_type_param (
((CamelDataWrapper *)mpe)->mime_type, "protocol");
if (!protocol || g_ascii_strcasecmp (protocol, "application/pgp-encrypted") != 0) {
em_format_format_error (
emf, stream, _("Unsupported encryption "
......@@ -1822,7 +1833,7 @@ emf_multipart_related (EMFormat *emf,
GCancellable *cancellable,
gboolean is_fallback)
{
CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part);
CamelMultipart *mp;
CamelMimePart *body_part, *display_part = NULL;
CamelContentType *content_type;
const gchar *start;
......@@ -1830,6 +1841,8 @@ emf_multipart_related (EMFormat *emf,
gchar *oldpartid;
GList *link;
mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part);
if (!CAMEL_IS_MULTIPART (mp)) {
em_format_format_source (emf, stream, part, cancellable);
return;
......@@ -2148,7 +2161,9 @@ emf_inlinepgp_signed (EMFormat *emf,
return;
}
emf->validity_found |= EM_FORMAT_VALIDITY_FOUND_SIGNED | EM_FORMAT_VALIDITY_FOUND_PGP;
emf->validity_found |=
EM_FORMAT_VALIDITY_FOUND_SIGNED |
EM_FORMAT_VALIDITY_FOUND_PGP;
cipher = camel_gpg_context_new (emf->session);
/* Verify the signature of the message */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment