diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-08-16 23:25:56 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-09-04 19:34:32 +0800 |
commit | fcbbdfbd18e15b4ee8322a0217cf03a689a5e033 (patch) | |
tree | e16cd2a2279558c6a2bfb6ca39fcbaac4c85ba59 /addressbook/gui/contact-editor/e-contact-quick-add.c | |
parent | f78417c48861759d7b0c4535ecd3febe4638a7d3 (diff) | |
download | gsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.tar.gz gsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.tar.zst gsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.zip |
Coding style and whitespace cleanup.
Diffstat (limited to 'addressbook/gui/contact-editor/e-contact-quick-add.c')
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-quick-add.c | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-quick-add.c b/addressbook/gui/contact-editor/e-contact-quick-add.c index 0b33f8aa79..96af36fed2 100644 --- a/addressbook/gui/contact-editor/e-contact-quick-add.c +++ b/addressbook/gui/contact-editor/e-contact-quick-add.c @@ -91,7 +91,8 @@ quick_add_unref (QuickAdd *qa) } static void -quick_add_set_name (QuickAdd *qa, const gchar *name) +quick_add_set_name (QuickAdd *qa, + const gchar *name) { if (name == qa->name) return; @@ -101,7 +102,8 @@ quick_add_set_name (QuickAdd *qa, const gchar *name) } static void -quick_add_set_email (QuickAdd *qa, const gchar *email) +quick_add_set_email (QuickAdd *qa, + const gchar *email) { if (email == qa->email) return; @@ -111,7 +113,8 @@ quick_add_set_email (QuickAdd *qa, const gchar *email) } static void -quick_add_set_vcard (QuickAdd *qa, const gchar *vcard) +quick_add_set_vcard (QuickAdd *qa, + const gchar *vcard) { if (vcard == qa->vcard) return; @@ -332,7 +335,9 @@ edit_contact (QuickAdd *qa) #define QUICK_ADD_RESPONSE_EDIT_FULL 2 static void -clicked_cb (GtkWidget *w, gint button, gpointer closure) +clicked_cb (GtkWidget *w, + gint button, + gpointer closure) { QuickAdd *qa = (QuickAdd *) closure; @@ -400,7 +405,8 @@ sanitize_widgets (QuickAdd *qa) } static void -source_changed (ESourceComboBox *source_combo_box, QuickAdd *qa) +source_changed (ESourceComboBox *source_combo_box, + QuickAdd *qa) { ESource *source; @@ -423,7 +429,7 @@ build_quick_add_dialog (QuickAdd *qa) GtkWidget *label; GtkTable *table; ESource *source; - const gint xpad=0, ypad=0; + const gint xpad = 0, ypad = 0; g_return_val_if_fail (qa != NULL, NULL); @@ -480,7 +486,7 @@ build_quick_add_dialog (QuickAdd *qa) gtk_table_set_col_spacings (table, 12); label = gtk_label_new_with_mnemonic (_("_Full name")); - gtk_label_set_mnemonic_widget ((GtkLabel*) label, qa->name_entry); + gtk_label_set_mnemonic_widget ((GtkLabel *) label, qa->name_entry); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (table, label, @@ -522,8 +528,10 @@ build_quick_add_dialog (QuickAdd *qa) } void -e_contact_quick_add (const gchar *in_name, const gchar *email, - EContactQuickAddCallback cb, gpointer closure) +e_contact_quick_add (const gchar *in_name, + const gchar *email, + EContactQuickAddCallback cb, + gpointer closure) { QuickAdd *qa; GtkWidget *dialog; @@ -543,10 +551,10 @@ e_contact_quick_add (const gchar *in_name, const gchar *email, /* Remove extra whitespace and the quotes some mailers put around names. */ g_strstrip (name); len = strlen (name); - if ((name[0] == '\'' && name[len-1] == '\'') || + if ((name[0] == '\'' && name[len - 1] == '\'') || (name[0] == '"' && name[len-1] == '"')) { name[0] = ' '; - name[len-1] = ' '; + name[len - 1] = ' '; } g_strstrip (name); } @@ -570,7 +578,7 @@ e_contact_quick_add_free_form (const gchar *text, EContactQuickAddCallback cb, gpointer closure) { - gchar *name=NULL, *email=NULL; + gchar *name = NULL, *email = NULL; const gchar *last_at, *s; gboolean in_quote; @@ -612,7 +620,7 @@ e_contact_quick_add_free_form (const gchar *text, /* ...and then split the text there */ if (!bad_char) { if (text < last_at) - name = g_strndup (text, last_at-text); + name = g_strndup (text, last_at - text); email = g_strdup (last_at); } } @@ -629,8 +637,8 @@ e_contact_quick_add_free_form (const gchar *text, *email = ' '; changed = TRUE; } - if (email[strlen (email)-1] == '>') { - email[strlen (email)-1] = ' '; + if (email[strlen (email) - 1] == '>') { + email[strlen (email) - 1] = ' '; changed = TRUE; } if (changed) |