From 3b6c8972a51d635309b789b1aef9034ca23dc737 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 18 Feb 2011 19:35:59 -0500 Subject: Coding style and whitespace cleanup. --- addressbook/gui/widgets/e-addressbook-table-adapter.c | 19 ++++++++++++++----- addressbook/gui/widgets/eab-contact-display.c | 3 +-- addressbook/gui/widgets/eab-contact-display.h | 8 +++++--- 3 files changed, 20 insertions(+), 10 deletions(-) (limited to 'addressbook/gui') diff --git a/addressbook/gui/widgets/e-addressbook-table-adapter.c b/addressbook/gui/widgets/e-addressbook-table-adapter.c index 6dfa981463..84224178b5 100644 --- a/addressbook/gui/widgets/e-addressbook-table-adapter.c +++ b/addressbook/gui/widgets/e-addressbook-table-adapter.c @@ -105,14 +105,17 @@ addressbook_value_at (ETableModel *etc, gint col, gint row) { EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER (etc); EAddressbookTableAdapterPrivate *priv = adapter->priv; + EContact *contact; const gchar *value; if (col >= COLS || row >= e_addressbook_model_contact_count (priv->model)) return NULL; - value = e_contact_get_const ((EContact*)e_addressbook_model_contact_at (priv->model, row), col); + contact = e_addressbook_model_contact_at (priv->model, row); + value = e_contact_get_const (contact, col); - if (value && *value && (col == E_CONTACT_EMAIL_1 || col == E_CONTACT_EMAIL_2 || col == E_CONTACT_EMAIL_3)) { + if (value && *value && (col == E_CONTACT_EMAIL_1 || + col == E_CONTACT_EMAIL_2 || col == E_CONTACT_EMAIL_3)) { gchar *val = g_hash_table_lookup (priv->emails, value); if (val) { @@ -165,7 +168,9 @@ addressbook_set_value_at (ETableModel *etc, gint col, gint row, gconstpointer va e_table_model_pre_change (etc); - if (col == E_CONTACT_EMAIL_1 || col == E_CONTACT_EMAIL_2 || col == E_CONTACT_EMAIL_3) { + if (col == E_CONTACT_EMAIL_1 || + col == E_CONTACT_EMAIL_2 || + col == E_CONTACT_EMAIL_3) { const gchar *old_value = e_contact_get_const (contact, col); /* remove old value from cache and use new one */ @@ -218,6 +223,7 @@ addressbook_append_row (ETableModel *etm, ETableModel *source, gint row) EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER (etm); EAddressbookTableAdapterPrivate *priv = adapter->priv; EContact *contact; + EBook *book; gint col; contact = e_contact_new (); @@ -227,7 +233,8 @@ addressbook_append_row (ETableModel *etm, ETableModel *source, gint row) e_contact_set (contact, col, (gpointer) val); } - eab_merging_book_add_contact (e_addressbook_model_get_book (priv->model), contact, NULL, NULL); + book = e_addressbook_model_get_book (priv->model); + eab_merging_book_add_contact (book, contact, NULL, NULL); g_object_unref (contact); } @@ -322,7 +329,9 @@ remove_contacts (EAddressbookModel *model, e_table_model_pre_change (E_TABLE_MODEL (adapter)); if (count == 1) - e_table_model_rows_deleted (E_TABLE_MODEL (adapter), g_array_index (indices, gint, 0), 1); + e_table_model_rows_deleted ( + E_TABLE_MODEL (adapter), + g_array_index (indices, gint, 0), 1); else e_table_model_changed (E_TABLE_MODEL (adapter)); } diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c index 0012f8ae56..47052f443a 100644 --- a/addressbook/gui/widgets/eab-contact-display.c +++ b/addressbook/gui/widgets/eab-contact-display.c @@ -454,7 +454,6 @@ render_contact_block (GString *buffer, EContact *contact) const gchar *nl; gchar *nick=NULL; - accum = g_string_new (""); nl = ""; @@ -1170,7 +1169,7 @@ eab_contact_display_class_init (EABContactDisplayClass *class) g_object_class_install_property ( object_class, PROP_ORIENTATION, - g_param_spec_int( + g_param_spec_int ( "orientation", NULL, NULL, diff --git a/addressbook/gui/widgets/eab-contact-display.h b/addressbook/gui/widgets/eab-contact-display.h index 4c8c8ef177..e74a65cb38 100644 --- a/addressbook/gui/widgets/eab-contact-display.h +++ b/addressbook/gui/widgets/eab-contact-display.h @@ -87,9 +87,11 @@ EABContactDisplayMode eab_contact_display_get_mode (EABContactDisplay *display); void eab_contact_display_set_mode (EABContactDisplay *display, EABContactDisplayMode mode); - -GtkOrientation eab_contact_display_get_orientation (EABContactDisplay *display); -void eab_contact_display_set_orientation (EABContactDisplay *display, GtkOrientation orientation); +GtkOrientation eab_contact_display_get_orientation + (EABContactDisplay *display); +void eab_contact_display_set_orientation + (EABContactDisplay *display, + GtkOrientation orientation); G_END_DECLS -- cgit v1.2.3