diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-02-19 08:35:59 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:41:36 +0800 |
commit | 3b6c8972a51d635309b789b1aef9034ca23dc737 (patch) | |
tree | 3e2843b8f664df4c022b6cf755828a1296fd5718 /addressbook | |
parent | 333ccc8abf033453996e4a7e16712f2fc3b9e05a (diff) | |
download | gsoc2013-evolution-3b6c8972a51d635309b789b1aef9034ca23dc737.tar.gz gsoc2013-evolution-3b6c8972a51d635309b789b1aef9034ca23dc737.tar.zst gsoc2013-evolution-3b6c8972a51d635309b789b1aef9034ca23dc737.zip |
Coding style and whitespace cleanup.
Diffstat (limited to 'addressbook')
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-table-adapter.c | 19 | ||||
-rw-r--r-- | addressbook/gui/widgets/eab-contact-display.c | 3 | ||||
-rw-r--r-- | addressbook/gui/widgets/eab-contact-display.h | 8 |
3 files changed, 20 insertions, 10 deletions
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 |