aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-02-19 08:35:59 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-02-19 09:44:24 +0800
commitfcb29478f605deb787c62fc7567c5c7f897585bb (patch)
treeec765625b528f38d34c0b1795abb588227b1d95b /addressbook
parent1b25ab52f7709a0eae7493fb933fa62376ead288 (diff)
downloadgsoc2013-evolution-fcb29478f605deb787c62fc7567c5c7f897585bb.tar
gsoc2013-evolution-fcb29478f605deb787c62fc7567c5c7f897585bb.tar.gz
gsoc2013-evolution-fcb29478f605deb787c62fc7567c5c7f897585bb.tar.bz2
gsoc2013-evolution-fcb29478f605deb787c62fc7567c5c7f897585bb.tar.lz
gsoc2013-evolution-fcb29478f605deb787c62fc7567c5c7f897585bb.tar.xz
gsoc2013-evolution-fcb29478f605deb787c62fc7567c5c7f897585bb.tar.zst
gsoc2013-evolution-fcb29478f605deb787c62fc7567c5c7f897585bb.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/gui/widgets/e-addressbook-table-adapter.c19
-rw-r--r--addressbook/gui/widgets/eab-contact-display.c3
-rw-r--r--addressbook/gui/widgets/eab-contact-display.h8
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