diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-01-29 23:50:53 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:41:29 +0800 |
commit | 6af0c53b697c6981c1470c177b2c37e081635258 (patch) | |
tree | 35acd2868077859124e55626ba95f2599f1fdc5c /widgets/misc/e-alert-bar.c | |
parent | 5c0b316904b9463623e7d8976e7ef43662b55765 (diff) | |
download | gsoc2013-evolution-6af0c53b697c6981c1470c177b2c37e081635258.tar.gz gsoc2013-evolution-6af0c53b697c6981c1470c177b2c37e081635258.tar.zst gsoc2013-evolution-6af0c53b697c6981c1470c177b2c37e081635258.zip |
Coding style and whitespace cleanup.
Diffstat (limited to 'widgets/misc/e-alert-bar.c')
-rw-r--r-- | widgets/misc/e-alert-bar.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/widgets/misc/e-alert-bar.c b/widgets/misc/e-alert-bar.c index c20a74e4d0..d5c1f953d4 100644 --- a/widgets/misc/e-alert-bar.c +++ b/widgets/misc/e-alert-bar.c @@ -243,33 +243,31 @@ e_alert_bar_new (void) return g_object_new (E_TYPE_ALERT_BAR, NULL); } -struct DuplicateData -{ +typedef struct { gboolean found; EAlert *looking_for; -}; +} DuplicateData; static void -find_duplicate_cb (gpointer data, gpointer user_data) +alert_bar_find_duplicate_cb (EAlert *alert, + DuplicateData *dd) { - EAlert *alert = data; - struct DuplicateData *dd = user_data; - - g_return_if_fail (alert != NULL); - g_return_if_fail (dd != NULL); g_return_if_fail (dd->looking_for != NULL); - dd->found = dd->found || ( - e_alert_get_message_type (alert) == e_alert_get_message_type (dd->looking_for) && - g_strcmp0 (e_alert_get_primary_text (alert), e_alert_get_primary_text (dd->looking_for)) == 0 && - g_strcmp0 (e_alert_get_secondary_text (alert), e_alert_get_secondary_text (dd->looking_for)) == 0); + dd->found |= ( + e_alert_get_message_type (alert) == + e_alert_get_message_type (dd->looking_for) && + g_strcmp0 (e_alert_get_primary_text (alert), + e_alert_get_primary_text (dd->looking_for)) == 0 && + g_strcmp0 (e_alert_get_secondary_text (alert), + e_alert_get_secondary_text (dd->looking_for)) == 0); } void e_alert_bar_add_alert (EAlertBar *alert_bar, EAlert *alert) { - struct DuplicateData dd; + DuplicateData dd; g_return_if_fail (E_IS_ALERT_BAR (alert_bar)); g_return_if_fail (E_IS_ALERT (alert)); @@ -277,7 +275,9 @@ e_alert_bar_add_alert (EAlertBar *alert_bar, dd.found = FALSE; dd.looking_for = alert; - g_queue_foreach (&alert_bar->priv->alerts, find_duplicate_cb, &dd); + g_queue_foreach ( + &alert_bar->priv->alerts, + (GFunc) alert_bar_find_duplicate_cb, &dd); if (dd.found) return; |