diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-07-11 23:31:15 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-07-12 10:25:06 +0800 |
commit | eb29179da623f9cf4abd663577395a085452ca18 (patch) | |
tree | a7eec4690f254d4cb9048ca87a5e7f401a2e74ae /calendar/gui/e-meeting-store.c | |
parent | beb8e74577f695d0d3c2efea52dc10c2136f0135 (diff) | |
download | gsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.tar.gz gsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.tar.zst gsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.zip |
Coding style and whitespace cleanup.
Diffstat (limited to 'calendar/gui/e-meeting-store.c')
-rw-r--r-- | calendar/gui/e-meeting-store.c | 96 |
1 files changed, 71 insertions, 25 deletions
diff --git a/calendar/gui/e-meeting-store.c b/calendar/gui/e-meeting-store.c index 6cfaecabfa..51bf75f750 100644 --- a/calendar/gui/e-meeting-store.c +++ b/calendar/gui/e-meeting-store.c @@ -326,43 +326,60 @@ get_value (GtkTreeModel *model, GtkTreeIter *iter, gint col, GValue *value) switch (col) { case E_MEETING_STORE_ADDRESS_COL: g_value_init (value, G_TYPE_STRING); - g_value_set_string (value, itip_strip_mailto (e_meeting_attendee_get_address (attendee))); + g_value_set_string ( + value, itip_strip_mailto ( + e_meeting_attendee_get_address (attendee))); break; case E_MEETING_STORE_MEMBER_COL: g_value_init (value, G_TYPE_STRING); - g_value_set_string (value, e_meeting_attendee_get_member (attendee)); + g_value_set_string ( + value, e_meeting_attendee_get_member (attendee)); break; case E_MEETING_STORE_TYPE_COL: g_value_init (value, G_TYPE_STRING); - g_value_set_string (value, type_to_text (e_meeting_attendee_get_cutype (attendee))); + g_value_set_string ( + value, type_to_text ( + e_meeting_attendee_get_cutype (attendee))); break; case E_MEETING_STORE_ROLE_COL: g_value_init (value, G_TYPE_STRING); - g_value_set_string (value, role_to_text (e_meeting_attendee_get_role (attendee))); + g_value_set_string ( + value, role_to_text ( + e_meeting_attendee_get_role (attendee))); break; case E_MEETING_STORE_RSVP_COL: g_value_init (value, G_TYPE_STRING); - g_value_set_string (value, boolean_to_text (e_meeting_attendee_get_rsvp (attendee))); + g_value_set_string ( + value, boolean_to_text ( + e_meeting_attendee_get_rsvp (attendee))); break; case E_MEETING_STORE_DELTO_COL: g_value_init (value, G_TYPE_STRING); - g_value_set_string (value, itip_strip_mailto (e_meeting_attendee_get_delto (attendee))); + g_value_set_string ( + value, itip_strip_mailto ( + e_meeting_attendee_get_delto (attendee))); break; case E_MEETING_STORE_DELFROM_COL: g_value_init (value, G_TYPE_STRING); - g_value_set_string (value, itip_strip_mailto (e_meeting_attendee_get_delfrom (attendee))); + g_value_set_string ( + value, itip_strip_mailto ( + e_meeting_attendee_get_delfrom (attendee))); break; case E_MEETING_STORE_STATUS_COL: g_value_init (value, G_TYPE_STRING); - g_value_set_string (value, partstat_to_text (e_meeting_attendee_get_status (attendee))); + g_value_set_string ( + value, partstat_to_text ( + e_meeting_attendee_get_status (attendee))); break; case E_MEETING_STORE_CN_COL: g_value_init (value, G_TYPE_STRING); - g_value_set_string (value, e_meeting_attendee_get_cn (attendee)); + g_value_set_string ( + value, e_meeting_attendee_get_cn (attendee)); break; case E_MEETING_STORE_LANGUAGE_COL: g_value_init (value, G_TYPE_STRING); - g_value_set_string (value, e_meeting_attendee_get_language (attendee)); + g_value_set_string ( + value, e_meeting_attendee_get_language (attendee)); break; case E_MEETING_STORE_ATTENDEE_COL: g_value_init (value, G_TYPE_STRING); @@ -370,12 +387,16 @@ get_value (GtkTreeModel *model, GtkTreeIter *iter, gint col, GValue *value) if (strcmp (cn, "")) g_value_set_string (value, cn); else - g_value_set_string (value, itip_strip_mailto (e_meeting_attendee_get_address (attendee))); + g_value_set_string ( + value, itip_strip_mailto ( + e_meeting_attendee_get_address (attendee))); break; case E_MEETING_STORE_ATTENDEE_UNDERLINE_COL: cn = e_meeting_attendee_get_cn (attendee); g_value_init (value, PANGO_TYPE_UNDERLINE); - g_value_set_enum (value, strcmp ("", cn) == 0 ? PANGO_UNDERLINE_NONE : PANGO_UNDERLINE_SINGLE); + g_value_set_enum ( + value, strcmp ("", cn) == 0 ? + PANGO_UNDERLINE_NONE : PANGO_UNDERLINE_SINGLE); } } @@ -480,7 +501,9 @@ e_meeting_store_set_value (EMeetingStore *store, gint row, gint col, const gchar switch (col) { case E_MEETING_STORE_ADDRESS_COL: if (val != NULL && *((gchar *)val)) - e_meeting_attendee_set_address (attendee, g_strdup_printf ("MAILTO:%s", (gchar *) val)); + e_meeting_attendee_set_address ( + attendee, g_strdup_printf ( + "MAILTO:%s", (gchar *) val)); break; case E_MEETING_STORE_MEMBER_COL: e_meeting_attendee_set_member (attendee, g_strdup (val)); @@ -525,10 +548,14 @@ refresh_queue_remove (EMeetingStore *store, EMeetingAttendee *attendee) priv = store->priv; /* Free the queue data */ - qdata = g_hash_table_lookup (priv->refresh_data, itip_strip_mailto (e_meeting_attendee_get_address (attendee))); + qdata = g_hash_table_lookup ( + priv->refresh_data, itip_strip_mailto ( + e_meeting_attendee_get_address (attendee))); if (qdata) { g_mutex_lock (priv->mutex); - g_hash_table_remove (priv->refresh_data, itip_strip_mailto (e_meeting_attendee_get_address (attendee))); + g_hash_table_remove ( + priv->refresh_data, itip_strip_mailto ( + e_meeting_attendee_get_address (attendee))); g_mutex_unlock (priv->mutex); g_ptr_array_free (qdata->call_backs, TRUE); g_ptr_array_free (qdata->data, TRUE); @@ -889,7 +916,9 @@ e_meeting_store_remove_all_attendees (EMeetingStore *store) } EMeetingAttendee * -e_meeting_store_find_attendee (EMeetingStore *store, const gchar *address, gint *row) +e_meeting_store_find_attendee (EMeetingStore *store, + const gchar *address, + gint *row) { EMeetingAttendee *attendee; gint i; @@ -903,7 +932,9 @@ e_meeting_store_find_attendee (EMeetingStore *store, const gchar *address, gint attendee = g_ptr_array_index (store->priv->attendees, i); attendee_address = e_meeting_attendee_get_address (attendee); - if (attendee_address && !g_ascii_strcasecmp (itip_strip_mailto (attendee_address), itip_strip_mailto (address))) { + if (attendee_address && !g_ascii_strcasecmp ( + itip_strip_mailto (attendee_address), + itip_strip_mailto (address))) { if (row != NULL) *row = i; @@ -1229,7 +1260,9 @@ freebusy_async (gpointer data) we should be able to get free busy asynchronously */ g_static_mutex_lock (&mutex); priv->num_queries++; - e_cal_get_free_busy (fbd->client, fbd->users, fbd->startt, fbd->endt, &(fbd->fb_data), NULL); + e_cal_get_free_busy ( + fbd->client, fbd->users, fbd->startt, + fbd->endt, &(fbd->fb_data), NULL); priv->num_queries--; g_static_mutex_unlock (&mutex); @@ -1311,7 +1344,9 @@ refresh_busy_periods (gpointer data) attendee = g_ptr_array_index (priv->refresh_queue, i); g_return_val_if_fail (attendee != NULL, FALSE); - qdata = g_hash_table_lookup (priv->refresh_data, itip_strip_mailto (e_meeting_attendee_get_address (attendee))); + qdata = g_hash_table_lookup ( + priv->refresh_data, itip_strip_mailto ( + e_meeting_attendee_get_address (attendee))); if (!qdata) continue; @@ -1403,7 +1438,8 @@ refresh_queue_add (EMeetingStore *store, gint row, priv = store->priv; attendee = g_ptr_array_index (priv->attendees, row); - if ((attendee == NULL) || !strcmp (itip_strip_mailto (e_meeting_attendee_get_address (attendee)), "")) + if ((attendee == NULL) || !strcmp (itip_strip_mailto ( + e_meeting_attendee_get_address (attendee)), "")) return; /* check the queue if the attendee is already in there*/ @@ -1411,12 +1447,16 @@ refresh_queue_add (EMeetingStore *store, gint row, if (attendee == g_ptr_array_index (priv->refresh_queue, i)) return; - if (!strcmp (e_meeting_attendee_get_address (attendee), e_meeting_attendee_get_address (g_ptr_array_index (priv->refresh_queue, i)))) + if (!strcmp (e_meeting_attendee_get_address (attendee), + e_meeting_attendee_get_address ( + g_ptr_array_index (priv->refresh_queue, i)))) return; } g_mutex_lock (priv->mutex); - qdata = g_hash_table_lookup (priv->refresh_data, itip_strip_mailto (e_meeting_attendee_get_address (attendee))); + qdata = g_hash_table_lookup ( + priv->refresh_data, itip_strip_mailto ( + e_meeting_attendee_get_address (attendee))); if (qdata == NULL) { qdata = g_new0 (EMeetingStoreQueueData, 1); @@ -1434,7 +1474,9 @@ refresh_queue_add (EMeetingStore *store, gint row, g_ptr_array_add (qdata->call_backs, call_back); g_ptr_array_add (qdata->data, data); - g_hash_table_insert (priv->refresh_data, (gpointer)itip_strip_mailto (e_meeting_attendee_get_address (attendee)), qdata); + g_hash_table_insert ( + priv->refresh_data, (gpointer) itip_strip_mailto ( + e_meeting_attendee_get_address (attendee)), qdata); } else { if (e_meeting_time_compare_times (start, &qdata->start) == -1) qdata->start = *start; @@ -1486,7 +1528,9 @@ async_read (GObject *source_object, GAsyncResult *res, gpointer data) qdata->buffer[read] = '\0'; qdata->string = g_string_append (qdata->string, qdata->buffer); - g_input_stream_read_async (istream, qdata->buffer, BUF_SIZE - 1, G_PRIORITY_DEFAULT, NULL, async_read, qdata); + g_input_stream_read_async ( + istream, qdata->buffer, BUF_SIZE - 1, + G_PRIORITY_DEFAULT, NULL, async_read, qdata); } } @@ -1518,7 +1562,9 @@ start_async_read (const gchar *uri, gpointer data) if (!istream) process_callbacks (qdata); else - g_input_stream_read_async (istream, qdata->buffer, BUF_SIZE - 1, G_PRIORITY_DEFAULT, NULL, async_read, qdata); + g_input_stream_read_async ( + istream, qdata->buffer, BUF_SIZE - 1, + G_PRIORITY_DEFAULT, NULL, async_read, qdata); } void |