aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-08-16 23:25:56 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-09-14 20:09:00 +0800
commit777c1cbd40eb63365f2c28e38f6a93beb2d1c9d1 (patch)
treedfab9ca8f30c7b1539f86dfe19b8bf761d6a899c /addressbook
parent83675abbc2b3a3bc6421094a56651d021fc0cdcd (diff)
downloadgsoc2013-evolution-777c1cbd40eb63365f2c28e38f6a93beb2d1c9d1.tar.gz
gsoc2013-evolution-777c1cbd40eb63365f2c28e38f6a93beb2d1c9d1.tar.zst
gsoc2013-evolution-777c1cbd40eb63365f2c28e38f6a93beb2d1c9d1.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor-fullname.c2
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c89
-rw-r--r--addressbook/gui/contact-editor/e-contact-quick-add.c38
-rw-r--r--addressbook/gui/contact-editor/eab-editor.c12
-rw-r--r--addressbook/gui/contact-editor/eab-editor.h2
-rw-r--r--addressbook/gui/contact-editor/test-editor.c6
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-editor.c30
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-model.c10
-rw-r--r--addressbook/gui/merging/eab-contact-compare.c75
-rw-r--r--addressbook/gui/merging/eab-contact-compare.h6
-rw-r--r--addressbook/gui/merging/eab-contact-merging.c58
-rw-r--r--addressbook/gui/widgets/e-addressbook-model.c16
-rw-r--r--addressbook/gui/widgets/e-addressbook-reflow-adapter.c68
-rw-r--r--addressbook/gui/widgets/e-addressbook-table-adapter.c69
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c26
-rw-r--r--addressbook/gui/widgets/e-minicard-label.c31
-rw-r--r--addressbook/gui/widgets/e-minicard-view-widget.c66
-rw-r--r--addressbook/gui/widgets/e-minicard-view.c67
-rw-r--r--addressbook/gui/widgets/e-minicard.c75
-rw-r--r--addressbook/gui/widgets/ea-addressbook-view.c2
-rw-r--r--addressbook/gui/widgets/ea-addressbook-view.h2
-rw-r--r--addressbook/gui/widgets/ea-addressbook.c12
-rw-r--r--addressbook/gui/widgets/ea-minicard-view.c24
-rw-r--r--addressbook/gui/widgets/ea-minicard-view.h2
-rw-r--r--addressbook/gui/widgets/ea-minicard.c12
-rw-r--r--addressbook/gui/widgets/ea-minicard.h2
-rw-r--r--addressbook/gui/widgets/eab-config.c18
-rw-r--r--addressbook/gui/widgets/eab-config.h5
-rw-r--r--addressbook/gui/widgets/eab-contact-display.c81
-rw-r--r--addressbook/gui/widgets/eab-gui-util.c99
-rw-r--r--addressbook/gui/widgets/gal-view-minicard.c4
-rw-r--r--addressbook/importers/evolution-addressbook-importers.h4
-rw-r--r--addressbook/importers/evolution-csv-importer.c128
-rw-r--r--addressbook/importers/evolution-ldif-importer.c59
-rw-r--r--addressbook/importers/evolution-vcard-importer.c80
-rw-r--r--addressbook/printing/e-contact-print.c17
-rw-r--r--addressbook/printing/test-print.c3
-rw-r--r--addressbook/tools/evolution-addressbook-export-list-cards.c29
-rw-r--r--addressbook/tools/evolution-addressbook-export-list-folders.c2
-rw-r--r--addressbook/tools/evolution-addressbook-export.c5
40 files changed, 788 insertions, 548 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-editor-fullname.c b/addressbook/gui/contact-editor/e-contact-editor-fullname.c
index c2dc45304b..c23a05ba6f 100644
--- a/addressbook/gui/contact-editor/e-contact-editor-fullname.c
+++ b/addressbook/gui/contact-editor/e-contact-editor-fullname.c
@@ -249,7 +249,7 @@ e_contact_editor_fullname_init (EContactEditorFullname *e_contact_editor_fullnam
GTK_WINDOW (e_contact_editor_fullname), "contact-new");
}
-GtkWidget*
+GtkWidget *
e_contact_editor_fullname_new (const EContactName *name)
{
GtkWidget *widget = g_object_new (E_TYPE_CONTACT_EDITOR_FULLNAME, NULL);
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index 5dd02b48e6..6ce9524afc 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -76,11 +76,11 @@ enum {
static void e_contact_editor_init (EContactEditor *editor);
static void e_contact_editor_class_init (EContactEditorClass *klass);
static void e_contact_editor_set_property (GObject *object,
- guint prop_id,
+ guint property_id,
const GValue *value,
GParamSpec *pspec);
static void e_contact_editor_get_property (GObject *object,
- guint prop_id,
+ guint property_id,
GValue *value,
GParamSpec *pspec);
static void e_contact_editor_dispose (GObject *object);
@@ -488,7 +488,7 @@ name_to_style (const EContactName *name,
string = g_strjoinv(" ", strings);
break;
case 2:
- midstrptr=midstring;
+ midstrptr = midstring;
if (name) {
if (name->family && *name->family)
*(midstrptr++) = name->family;
@@ -567,7 +567,8 @@ file_as_get_style (EContactEditor *editor)
}
static void
-file_as_set_style (EContactEditor *editor, gint style)
+file_as_set_style (EContactEditor *editor,
+ gint style)
{
gchar *string;
gint i;
@@ -1008,7 +1009,8 @@ get_ui_slot (EVCardAttribute *attr)
}
static void
-set_ui_slot (EVCardAttribute *attr, gint slot)
+set_ui_slot (EVCardAttribute *attr,
+ gint slot)
{
EVCardAttributeParam *param;
gchar *slot_str;
@@ -1524,7 +1526,8 @@ extract_phone (EContactEditor *editor)
}
static void
-init_phone_record_type (EContactEditor *editor, gint record)
+init_phone_record_type (EContactEditor *editor,
+ gint record)
{
GtkWidget *phone_type_combo_box;
GtkWidget *phone_entry;
@@ -1945,7 +1948,8 @@ extract_im (EContactEditor *editor)
}
static void
-sensitize_im_types (EContactEditor *editor, GtkWidget *combo_box)
+sensitize_im_types (EContactEditor *editor,
+ GtkWidget *combo_box)
{
GtkTreeModel *model;
GtkTreeIter iter;
@@ -1971,7 +1975,9 @@ sensitize_im_types (EContactEditor *editor, GtkWidget *combo_box)
}
static void
-sensitize_im_record (EContactEditor *editor, gint record, gboolean enabled)
+sensitize_im_record (EContactEditor *editor,
+ gint record,
+ gboolean enabled)
{
GtkWidget *service_combo_box;
#ifdef ENABLE_IM_LOCATION
@@ -2038,7 +2044,8 @@ init_personal (EContactEditor *editor)
}
static void
-init_address_textview (EContactEditor *editor, gint record)
+init_address_textview (EContactEditor *editor,
+ gint record)
{
gchar *textview_name;
GtkWidget *textview;
@@ -2078,7 +2085,8 @@ init_address_field (EContactEditor *editor,
}
static void
-init_address_record (EContactEditor *editor, gint record)
+init_address_record (EContactEditor *editor,
+ gint record)
{
init_address_textview (editor, record);
init_address_field (editor, record, "city");
@@ -2325,7 +2333,8 @@ set_address_label (EContact *contact,
}
static void
-extract_address_record (EContactEditor *editor, gint record)
+extract_address_record (EContactEditor *editor,
+ gint record)
{
EContactAddress *address;
@@ -2411,7 +2420,9 @@ sensitize_address_field (EContactEditor *editor,
}
static void
-sensitize_address_record (EContactEditor *editor, gint record, gboolean enabled)
+sensitize_address_record (EContactEditor *editor,
+ gint record,
+ gboolean enabled)
{
sensitize_address_textview (editor, record, enabled);
sensitize_address_field (editor, record, "city", enabled);
@@ -2520,7 +2531,8 @@ static FieldMapping simple_field_map[] = {
};
static void
-init_simple_field (EContactEditor *editor, GtkWidget *widget)
+init_simple_field (EContactEditor *editor,
+ GtkWidget *widget)
{
GObject *changed_object = NULL;
@@ -2569,7 +2581,9 @@ init_simple_field (EContactEditor *editor, GtkWidget *widget)
}
static void
-fill_in_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id)
+fill_in_simple_field (EContactEditor *editor,
+ GtkWidget *widget,
+ gint field_id)
{
EContact *contact;
@@ -2707,9 +2721,9 @@ extract_simple_field (EContactEditor *editor,
EContactDate date;
if (e_date_edit_get_date (
E_DATE_EDIT (widget),
- (gint *)&date.year,
- (gint *)&date.month,
- (gint *)&date.day))
+ (gint *) &date.year,
+ (gint *) &date.month,
+ (gint *) &date.day))
e_contact_set (contact, field_id, &date);
else
e_contact_set (contact, field_id, NULL);
@@ -2809,7 +2823,8 @@ extract_simple_field (EContactEditor *editor,
}
static void
-sensitize_simple_field (GtkWidget *widget, gboolean enabled)
+sensitize_simple_field (GtkWidget *widget,
+ gboolean enabled)
{
if (GTK_IS_ENTRY (widget))
gtk_editable_set_editable (GTK_EDITABLE (widget), enabled);
@@ -3258,7 +3273,7 @@ categories_clicked (GtkWidget *button,
return;
}
- g_signal_connect(dialog, "response",
+ g_signal_connect (dialog, "response",
G_CALLBACK (categories_response), editor);
/* Close the category dialog if the editor is closed*/
@@ -3649,7 +3664,8 @@ save_contact (EContactEditor *ce,
}
static void
-e_contact_editor_save_contact (EABEditor *editor, gboolean should_close)
+e_contact_editor_save_contact (EABEditor *editor,
+ gboolean should_close)
{
save_contact (E_CONTACT_EDITOR (editor), should_close);
}
@@ -3782,7 +3798,7 @@ e_contact_editor_is_changed (EABEditor *editor)
return E_CONTACT_EDITOR (editor)->changed;
}
-static GtkWindow*
+static GtkWindow *
e_contact_editor_get_window (EABEditor *editor)
{
return GTK_WINDOW (E_CONTACT_EDITOR (editor)->app);
@@ -3837,14 +3853,17 @@ app_delete_event_cb (GtkWidget *widget,
}
static void
-show_help_cb (GtkWidget *widget, gpointer data)
+show_help_cb (GtkWidget *widget,
+ gpointer data)
{
/* FIXME Pass a proper parent window. */
e_display_help (NULL, "usage-contact-cards");
}
static GList *
-add_to_tab_order (GList *list, GtkBuilder *builder, const gchar *name)
+add_to_tab_order (GList *list,
+ GtkBuilder *builder,
+ const gchar *name)
{
GtkWidget *widget = e_builder_get_widget (builder, name);
return g_list_prepend (list, widget);
@@ -3857,7 +3876,7 @@ setup_tab_order (GtkBuilder *builder)
GList *list = NULL;
/*
container = e_builder_get_widget(builder, "table-contact-editor-general");
-
+ *
if (container) {
list = add_to_tab_order(list, builder, "entry-fullname");
list = add_to_tab_order(list, builder, "entry-jobtitle");
@@ -3867,7 +3886,7 @@ setup_tab_order (GtkBuilder *builder)
list = add_to_tab_order(list, builder, "entry-phone-2");
list = add_to_tab_order(list, builder, "entry-phone-3");
list = add_to_tab_order(list, builder, "entry-phone-4");
-
+ *
list = add_to_tab_order(list, builder, "entry-email1");
list = add_to_tab_order(list, builder, "alignment-htmlmail");
list = add_to_tab_order(list, builder, "entry-web");
@@ -4253,12 +4272,16 @@ e_contact_editor_new (EShell *shell,
}
static void
-notify_readonly_cb (EBookClient *book_client, GParamSpec *pspec, EContactEditor *ce)
+notify_readonly_cb (EBookClient *book_client,
+ GParamSpec *pspec,
+ EContactEditor *ce)
{
+ EClient *client;
gint new_target_editable;
gboolean changed = FALSE;
- new_target_editable = !e_client_is_readonly (E_CLIENT (ce->target_client));
+ client = E_CLIENT (ce->target_client);
+ new_target_editable = !e_client_is_readonly (client);
if (ce->target_editable != new_target_editable)
changed = TRUE;
@@ -4271,7 +4294,7 @@ notify_readonly_cb (EBookClient *book_client, GParamSpec *pspec, EContactEditor
static void
e_contact_editor_set_property (GObject *object,
- guint prop_id,
+ guint property_id,
const GValue *value,
GParamSpec *pspec)
{
@@ -4279,7 +4302,7 @@ e_contact_editor_set_property (GObject *object,
editor = E_CONTACT_EDITOR (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_SOURCE_CLIENT: {
gboolean writable;
gboolean changed = FALSE;
@@ -4429,14 +4452,14 @@ e_contact_editor_set_property (GObject *object,
NULL, g_value_get_pointer (value));
break;
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
static void
e_contact_editor_get_property (GObject *object,
- guint prop_id,
+ guint property_id,
GValue *value,
GParamSpec *pspec)
{
@@ -4444,7 +4467,7 @@ e_contact_editor_get_property (GObject *object,
e_contact_editor = E_CONTACT_EDITOR (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_SOURCE_CLIENT:
g_value_set_object (value, e_contact_editor->source_client);
break;
@@ -4480,7 +4503,7 @@ e_contact_editor_get_property (GObject *object,
g_value_set_pointer (value, e_contact_editor->required_fields);
break;
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
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)
diff --git a/addressbook/gui/contact-editor/eab-editor.c b/addressbook/gui/contact-editor/eab-editor.c
index bea34db512..241bc477a4 100644
--- a/addressbook/gui/contact-editor/eab-editor.c
+++ b/addressbook/gui/contact-editor/eab-editor.c
@@ -301,7 +301,8 @@ eab_editor_raise (EABEditor *editor)
}
void
-eab_editor_save_contact (EABEditor *editor, gboolean should_close)
+eab_editor_save_contact (EABEditor *editor,
+ gboolean should_close)
{
EABEditorClass *class;
@@ -339,7 +340,7 @@ eab_editor_is_valid (EABEditor *editor)
return class->is_valid (editor);
}
-GtkWindow*
+GtkWindow *
eab_editor_get_window (EABEditor *editor)
{
EABEditorClass *class;
@@ -353,11 +354,12 @@ eab_editor_get_window (EABEditor *editor)
}
/* This function prompts for saving if editor conents are in changed state and
- save or discards or cancels (just returns with out doing anything) according
- to user input. Editor gets destroyed in case of save and discard case. */
+ * save or discards or cancels (just returns with out doing anything) according
+ * to user input. Editor gets destroyed in case of save and discard case. */
gboolean
-eab_editor_prompt_to_save_changes (EABEditor *editor, GtkWindow *window)
+eab_editor_prompt_to_save_changes (EABEditor *editor,
+ GtkWindow *window)
{
if (!eab_editor_is_changed (editor)) {
eab_editor_close (EAB_EDITOR (editor));
diff --git a/addressbook/gui/contact-editor/eab-editor.h b/addressbook/gui/contact-editor/eab-editor.h
index 43e36e53a3..cf8a20aecb 100644
--- a/addressbook/gui/contact-editor/eab-editor.h
+++ b/addressbook/gui/contact-editor/eab-editor.h
@@ -68,7 +68,7 @@ struct _EABEditorClass {
void (* save_contact) (EABEditor *editor, gboolean should_close);
gboolean (* is_valid) (EABEditor *editor);
gboolean (* is_changed) (EABEditor *editor);
- GtkWindow* (* get_window) (EABEditor *editor);
+ GtkWindow * (* get_window) (EABEditor *editor);
/* signals */
void (* contact_added) (EABEditor *editor, const GError *error, EContact *contact);
diff --git a/addressbook/gui/contact-editor/test-editor.c b/addressbook/gui/contact-editor/test-editor.c
index 2f54bd57b1..1d9c24aed7 100644
--- a/addressbook/gui/contact-editor/test-editor.c
+++ b/addressbook/gui/contact-editor/test-editor.c
@@ -67,7 +67,8 @@ read_file (gchar *name)
/* Callback used when a contact editor is closed */
static void
-editor_closed_cb (EContactEditor *ce, gpointer data)
+editor_closed_cb (EContactEditor *ce,
+ gpointer data)
{
static gint count = 2;
@@ -79,7 +80,8 @@ editor_closed_cb (EContactEditor *ce, gpointer data)
}
gint
-main (gint argc, gchar *argv[])
+main (gint argc,
+ gchar *argv[])
{
gchar *cardstr;
EContactEditor *ce;
diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.c b/addressbook/gui/contact-list-editor/e-contact-list-editor.c
index 7ad6c124cc..1750f5a686 100644
--- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c
+++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c
@@ -258,7 +258,7 @@ contact_list_editor_add_destination (GtkWidget *widget,
static void
contact_list_editor_add_email (EContactListEditor *editor,
- const gchar *email)
+ const gchar *email)
{
CamelInternetAddress *addr;
EContactListEditorPrivate *priv = editor->priv;
@@ -424,7 +424,7 @@ contact_list_editor_render_destination (GtkTreeViewColumn *column,
static void
contact_list_editor_selection_changed_cb (GtkTreeSelection *selection,
- gpointer user_data)
+ gpointer user_data)
{
EContactListEditor *editor = user_data;
GtkTreeModel *model;
@@ -545,15 +545,17 @@ contact_list_editor_delete_event_cb (GtkWidget *widget,
void
contact_list_editor_drag_data_received_cb (GtkWidget *widget,
GdkDragContext *context,
- gint x, gint y,
- GtkSelectionData *selection_data,
- guint info,
- guint time);
+ gint x,
+ gint y,
+ GtkSelectionData *selection_data,
+ guint info,
+ guint time);
void
contact_list_editor_drag_data_received_cb (GtkWidget *widget,
GdkDragContext *context,
- gint x, gint y,
+ gint x,
+ gint y,
GtkSelectionData *selection_data,
guint info,
guint time)
@@ -695,7 +697,7 @@ contact_list_editor_email_entry_key_press_event_cb (GtkWidget *widget,
gint cpos = -1;
entry = GTK_ENTRY (WIDGET (EMAIL_ENTRY));
- g_object_get (G_OBJECT (entry), "cursor-position", &cpos, NULL);
+ g_object_get (entry, "cursor-position", &cpos, NULL);
/* not the first letter */
if (cpos > 0) {
@@ -817,7 +819,7 @@ contact_list_editor_remove_button_clicked_cb (GtkWidget *widget)
}
/* new_selection != NULL when there is at least one item below the
- removed selection */
+ * removed selection */
if (new_selection) {
path = gtk_tree_row_reference_get_path (new_selection);
gtk_tree_selection_select_path (selection, path);
@@ -825,7 +827,7 @@ contact_list_editor_remove_button_clicked_cb (GtkWidget *widget)
gtk_tree_row_reference_free (new_selection);
} else {
/* If selection was including the last item in the list, then
- find and select the new last item */
+ * find and select the new last item */
GtkTreeIter iter, iter2;
/* When FALSE is returned, there are no items in the list to be selected */
@@ -1157,7 +1159,7 @@ setup_custom_widgets (EContactListEditor *editor)
combo_box = WIDGET (SOURCE_MENU);
if (!e_book_client_get_sources (&source_list, &error))
source_list = NULL;
- g_object_set (G_OBJECT (combo_box), "source-list", source_list, NULL);
+ g_object_set (combo_box, "source-list", source_list, NULL);
if (source_list)
g_object_unref (source_list);
@@ -1242,7 +1244,7 @@ contact_list_editor_constructor (GType type,
static void
contact_list_editor_set_property (GObject *object,
guint property_id,
- const GValue *value,
+ const GValue *value,
GParamSpec *pspec)
{
switch (property_id) {
@@ -1772,8 +1774,8 @@ e_contact_list_editor_get_contact (EContactListEditor *editor)
save_contact_list (model, &iter, &attrs, &parent_id);
/* Put it in reverse order because e_vcard_add_attribute also uses prepend,
- but we want to keep order of mails there. Hopefully noone will change
- the behaviour of the e_vcard_add_attribute. */
+ * but we want to keep order of mails there. Hopefully noone will change
+ * the behaviour of the e_vcard_add_attribute. */
for (a = attrs; a; a = a->next) {
e_vcard_add_attribute (E_VCARD (contact), a->data);
}
diff --git a/addressbook/gui/contact-list-editor/e-contact-list-model.c b/addressbook/gui/contact-list-editor/e-contact-list-model.c
index e4eee15cb1..6774eee3b7 100644
--- a/addressbook/gui/contact-list-editor/e-contact-list-model.c
+++ b/addressbook/gui/contact-list-editor/e-contact-list-model.c
@@ -137,7 +137,7 @@ e_contact_list_model_has_uid (EContactListModel *model,
return (g_hash_table_lookup (model->priv->uids_table, uid) != NULL);
}
-GtkTreePath*
+GtkTreePath *
e_contact_list_model_add_destination (EContactListModel *model,
EDestination *destination,
GtkTreeIter *parent,
@@ -213,7 +213,7 @@ e_contact_list_model_add_contact (EContactListModel *model,
static void
contact_list_model_unref_row_dest (EContactListModel *model,
- GtkTreeIter *iter)
+ GtkTreeIter *iter)
{
EDestination *dest;
GtkTreeModel *tree_model;
@@ -227,7 +227,7 @@ contact_list_model_unref_row_dest (EContactListModel *model,
e_destination_get_contact_uid (dest)));
/* If the list is only once in the model, then remove it from the hash table,
- otherwise decrease the counter by one */
+ * otherwise decrease the counter by one */
if (list_refs <= 1) {
g_hash_table_remove (model->priv->uids_table,
e_destination_get_contact_uid (dest));
@@ -270,11 +270,11 @@ e_contact_list_model_remove_row (EContactListModel *model,
g_return_if_fail (iter);
/* Use helper function to update our reference counters in
- hash tables but don't remove any row. */
+ * hash tables but don't remove any row. */
contact_list_model_unref_row_dest (model, iter);
/* Get iter of parent of the row to be removed. After the row is removed, check if there are
- any more children left for the parent_iter, an eventually remove the parent_iter as well */
+ * any more children left for the parent_iter, an eventually remove the parent_iter as well */
if (gtk_tree_model_iter_parent (GTK_TREE_MODEL (model), &parent_iter, iter)) {
gtk_tree_store_remove (GTK_TREE_STORE (model), iter);
if (!gtk_tree_model_iter_has_child (GTK_TREE_MODEL (model), &parent_iter)) {
diff --git a/addressbook/gui/merging/eab-contact-compare.c b/addressbook/gui/merging/eab-contact-compare.c
index fd6ad8c012..a25ad4e403 100644
--- a/addressbook/gui/merging/eab-contact-compare.c
+++ b/addressbook/gui/merging/eab-contact-compare.c
@@ -33,10 +33,10 @@
#include "eab-contact-compare.h"
/* This is an "optimistic" combiner: the best of the two outcomes is
- selected. */
+ * selected. */
static EABContactMatchType
combine_comparisons (EABContactMatchType prev,
- EABContactMatchType new_info)
+ EABContactMatchType new_info)
{
if (new_info == EAB_CONTACT_MATCH_NOT_APPLICABLE)
return prev;
@@ -46,7 +46,7 @@ combine_comparisons (EABContactMatchType prev,
/*** Name comparisons ***/
/* This *so* doesn't belong here... at least not implemented in a
- sucky way like this. But it can be fixed later. */
+ * sucky way like this. But it can be fixed later. */
/* This is very Anglocentric. */
static const gchar *name_synonyms[][2] = {
@@ -83,7 +83,9 @@ static const gchar *name_synonyms[][2] = {
};
static gboolean
-name_fragment_match_with_synonyms (const gchar *a, const gchar *b, gboolean strict)
+name_fragment_match_with_synonyms (const gchar *a,
+ const gchar *b,
+ gboolean strict)
{
gint i;
@@ -94,7 +96,7 @@ name_fragment_match_with_synonyms (const gchar *a, const gchar *b, gboolean stri
return TRUE;
/* Check for nicknames. Yes, the linear search blows. */
- for (i=0; name_synonyms[i][0]; ++i) {
+ for (i = 0; name_synonyms[i][0]; ++i) {
if (!e_utf8_casefold_collate (name_synonyms[i][0], a)
&& !e_utf8_casefold_collate (name_synonyms[i][1], b))
@@ -109,14 +111,19 @@ name_fragment_match_with_synonyms (const gchar *a, const gchar *b, gboolean stri
}
EABContactMatchType
-eab_contact_compare_name_to_string (EContact *contact, const gchar *str)
+eab_contact_compare_name_to_string (EContact *contact,
+ const gchar *str)
{
return eab_contact_compare_name_to_string_full (contact, str, FALSE, NULL, NULL, NULL);
}
EABContactMatchType
-eab_contact_compare_name_to_string_full (EContact *contact, const gchar *str, gboolean allow_partial_matches,
- gint *matched_parts_out, EABContactMatchPart *first_matched_part_out, gint *matched_character_count_out)
+eab_contact_compare_name_to_string_full (EContact *contact,
+ const gchar *str,
+ gboolean allow_partial_matches,
+ gint *matched_parts_out,
+ EABContactMatchPart *first_matched_part_out,
+ gint *matched_character_count_out)
{
gchar **namev, **givenv = NULL, **addv = NULL, **familyv = NULL;
@@ -172,8 +179,8 @@ eab_contact_compare_name_to_string_full (EContact *contact, const gchar *str, gb
this_part_match = EAB_CONTACT_MATCH_PART_NONE;
/* When we are allowing partials, we are strict about the matches we allow.
- Does this make sense? Not really, but it does the right thing for the purposes
- of completion. */
+ * Does this make sense? Not really, but it does the right thing for the purposes
+ * of completion. */
if (givenv && this_part_match == EAB_CONTACT_MATCH_PART_NONE) {
for (j = 0; givenv[j]; ++j) {
@@ -182,7 +189,7 @@ eab_contact_compare_name_to_string_full (EContact *contact, const gchar *str, gb
this_part_match = EAB_CONTACT_MATCH_PART_GIVEN_NAME;
/* We remove a piece of a name once it has been matched against, so
- that "john john" won't match "john doe". */
+ * that "john john" won't match "john doe". */
g_free (givenv[j]);
givenv[j] = g_strdup ("");
break;
@@ -261,7 +268,8 @@ eab_contact_compare_name_to_string_full (EContact *contact, const gchar *str, gb
}
EABContactMatchType
-eab_contact_compare_file_as (EContact *contact1, EContact *contact2)
+eab_contact_compare_file_as (EContact *contact1,
+ EContact *contact2)
{
EABContactMatchType match_type;
gchar *a, *b;
@@ -292,10 +300,11 @@ eab_contact_compare_file_as (EContact *contact1, EContact *contact2)
}
EABContactMatchType
-eab_contact_compare_name (EContact *contact1, EContact *contact2)
+eab_contact_compare_name (EContact *contact1,
+ EContact *contact2)
{
EContactName *a, *b;
- gint matches=0, possible=0;
+ gint matches = 0, possible = 0;
gboolean family_match = FALSE;
g_return_val_if_fail (E_IS_CONTACT (contact1), EAB_CONTACT_MATCH_NOT_APPLICABLE);
@@ -337,8 +346,8 @@ eab_contact_compare_name (EContact *contact1, EContact *contact2)
e_contact_name_free (b);
/* Now look at the # of matches and try to intelligently map
- an EAB_CONTACT_MATCH_* type to it. Special consideration is given
- to family-name matches. */
+ * an EAB_CONTACT_MATCH_* type to it. Special consideration is given
+ * to family-name matches. */
if (possible == 0)
return EAB_CONTACT_MATCH_NOT_APPLICABLE;
@@ -349,7 +358,7 @@ eab_contact_compare_name (EContact *contact1, EContact *contact2)
if (possible == matches)
return family_match ? EAB_CONTACT_MATCH_EXACT : EAB_CONTACT_MATCH_PARTIAL;
- if (possible == matches+1)
+ if (possible == matches + 1)
return family_match ? EAB_CONTACT_MATCH_VAGUE : EAB_CONTACT_MATCH_NONE;
return EAB_CONTACT_MATCH_NONE;
@@ -358,7 +367,8 @@ eab_contact_compare_name (EContact *contact1, EContact *contact2)
/*** Nickname Comparisons ***/
EABContactMatchType
-eab_contact_compare_nickname (EContact *contact1, EContact *contact2)
+eab_contact_compare_nickname (EContact *contact1,
+ EContact *contact2)
{
g_return_val_if_fail (contact1 && E_IS_CONTACT (contact1), EAB_CONTACT_MATCH_NOT_APPLICABLE);
g_return_val_if_fail (contact2 && E_IS_CONTACT (contact2), EAB_CONTACT_MATCH_NOT_APPLICABLE);
@@ -369,7 +379,8 @@ eab_contact_compare_nickname (EContact *contact1, EContact *contact2)
/*** E-mail Comparisons ***/
static gboolean
-match_email_username (const gchar *addr1, const gchar *addr2)
+match_email_username (const gchar *addr1,
+ const gchar *addr2)
{
gint c1, c2;
if (addr1 == NULL || addr2 == NULL)
@@ -388,7 +399,8 @@ match_email_username (const gchar *addr1, const gchar *addr2)
}
static gboolean
-match_email_hostname (const gchar *addr1, const gchar *addr2)
+match_email_hostname (const gchar *addr1,
+ const gchar *addr2)
{
gint c1, c2;
gboolean seen_at1, seen_at2;
@@ -436,7 +448,8 @@ match_email_hostname (const gchar *addr1, const gchar *addr2)
}
static EABContactMatchType
-compare_email_addresses (const gchar *addr1, const gchar *addr2)
+compare_email_addresses (const gchar *addr1,
+ const gchar *addr2)
{
if (addr1 == NULL || *addr1 == 0 ||
addr2 == NULL || *addr2 == 0)
@@ -449,7 +462,8 @@ compare_email_addresses (const gchar *addr1, const gchar *addr2)
}
EABContactMatchType
-eab_contact_compare_email (EContact *contact1, EContact *contact2)
+eab_contact_compare_email (EContact *contact1,
+ EContact *contact2)
{
EABContactMatchType match = EAB_CONTACT_MATCH_NOT_APPLICABLE;
GList *contact1_email, *contact2_email;
@@ -473,8 +487,8 @@ eab_contact_compare_email (EContact *contact1, EContact *contact2)
i1 = contact1_email;
/* Do pairwise-comparisons on all of the e-mail addresses. If
- we find an exact match, there is no reason to keep
- checking. */
+ * we find an exact match, there is no reason to keep
+ * checking. */
while (i1 && match != EAB_CONTACT_MATCH_EXACT) {
gchar *addr1 = (gchar *) i1->data;
@@ -500,7 +514,8 @@ eab_contact_compare_email (EContact *contact1, EContact *contact2)
}
EABContactMatchType
-eab_contact_compare_address (EContact *contact1, EContact *contact2)
+eab_contact_compare_address (EContact *contact1,
+ EContact *contact2)
{
g_return_val_if_fail (contact1 && E_IS_CONTACT (contact1), EAB_CONTACT_MATCH_NOT_APPLICABLE);
g_return_val_if_fail (contact2 && E_IS_CONTACT (contact2), EAB_CONTACT_MATCH_NOT_APPLICABLE);
@@ -511,7 +526,8 @@ eab_contact_compare_address (EContact *contact1, EContact *contact2)
}
EABContactMatchType
-eab_contact_compare_telephone (EContact *contact1, EContact *contact2)
+eab_contact_compare_telephone (EContact *contact1,
+ EContact *contact2)
{
g_return_val_if_fail (contact1 && E_IS_CONTACT (contact1), EAB_CONTACT_MATCH_NOT_APPLICABLE);
g_return_val_if_fail (contact2 && E_IS_CONTACT (contact2), EAB_CONTACT_MATCH_NOT_APPLICABLE);
@@ -522,7 +538,8 @@ eab_contact_compare_telephone (EContact *contact1, EContact *contact2)
}
EABContactMatchType
-eab_contact_compare (EContact *contact1, EContact *contact2)
+eab_contact_compare (EContact *contact1,
+ EContact *contact2)
{
EABContactMatchType result;
@@ -660,13 +677,13 @@ query_cb (GObject *source_object,
#define MAX_QUERY_PARTS 10
static void
use_common_book_client (EBookClient *book_client,
- MatchSearchInfo *info)
+ MatchSearchInfo *info)
{
EContact *contact = info->contact;
EContactName *contact_name;
GList *contact_email;
gchar *query_parts[MAX_QUERY_PARTS];
- gint p=0;
+ gint p = 0;
gchar *contact_file_as, *qj;
EBookQuery *query = NULL;
gint i;
diff --git a/addressbook/gui/merging/eab-contact-compare.h b/addressbook/gui/merging/eab-contact-compare.h
index df67c5d752..7ce31eddb9 100644
--- a/addressbook/gui/merging/eab-contact-compare.h
+++ b/addressbook/gui/merging/eab-contact-compare.h
@@ -40,9 +40,9 @@ typedef enum {
typedef enum {
EAB_CONTACT_MATCH_PART_NOT_APPLICABLE = -1,
EAB_CONTACT_MATCH_PART_NONE = 0,
- EAB_CONTACT_MATCH_PART_GIVEN_NAME = 1<<0,
- EAB_CONTACT_MATCH_PART_ADDITIONAL_NAME = 1<<2,
- EAB_CONTACT_MATCH_PART_FAMILY_NAME = 1<<3
+ EAB_CONTACT_MATCH_PART_GIVEN_NAME = 1 << 0,
+ EAB_CONTACT_MATCH_PART_ADDITIONAL_NAME = 1 << 2,
+ EAB_CONTACT_MATCH_PART_FAMILY_NAME = 1 << 3
} EABContactMatchPart;
typedef void (*EABContactMatchQueryCallback) (EContact *contact, EContact *match, EABContactMatchType type, gpointer closure);
diff --git a/addressbook/gui/merging/eab-contact-merging.c b/addressbook/gui/merging/eab-contact-merging.c
index 557af481bb..70e43fa284 100644
--- a/addressbook/gui/merging/eab-contact-merging.c
+++ b/addressbook/gui/merging/eab-contact-merging.c
@@ -210,7 +210,8 @@ add_contact_ready_cb (GObject *source_object,
}
static void
-doit (EContactMergingLookup *lookup, gboolean force_modify)
+doit (EContactMergingLookup *lookup,
+ gboolean force_modify)
{
if (lookup->op == E_CONTACT_MERGING_ADD) {
if (force_modify)
@@ -236,7 +237,9 @@ cancelit (EContactMergingLookup *lookup)
}
static void
-dialog_map (GtkWidget *window, GdkEvent *event, GtkWidget *table)
+dialog_map (GtkWidget *window,
+ GdkEvent *event,
+ GtkWidget *table)
{
GtkAllocation allocation;
gint h, w;
@@ -256,7 +259,8 @@ dialog_map (GtkWidget *window, GdkEvent *event, GtkWidget *table)
}
static void
-dropdown_changed (GtkWidget *dropdown, dropdown_data *data)
+dropdown_changed (GtkWidget *dropdown,
+ dropdown_data *data)
{
gchar *str;
str = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (dropdown));
@@ -357,7 +361,7 @@ mergeit (EContactMergingLookup *lookup)
use_field = E_CONTACT_EMAIL_2;
break;
}
- else/*Either the new contact has no email OR the email already exist in the duplicate contact*/
+ else/*Either the new contact has no email OR the email already exist in the duplicate contact */
continue;
case 2:
/*New contact has email and it is equal to neither of the 2 emails in the duplicate contact*/
@@ -381,7 +385,7 @@ mergeit (EContactMergingLookup *lookup)
}
label = gtk_label_new (_("Email"));
hbox = gtk_hbox_new (FALSE, 0);
- gtk_box_pack_start (GTK_BOX (hbox), (GtkWidget*) label, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (hbox), (GtkWidget *) label, FALSE, FALSE, 0);
gtk_table_attach_defaults (table, (GtkWidget *) hbox, 0, 1, row, row + 1);
dropdown = gtk_combo_box_text_new ();
@@ -398,7 +402,7 @@ mergeit (EContactMergingLookup *lookup)
g_signal_connect (dropdown, "changed", G_CALLBACK(dropdown_changed), data);
hbox = gtk_hbox_new (FALSE, 0);
- gtk_box_pack_start (GTK_BOX (hbox), (GtkWidget*) dropdown, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (hbox), (GtkWidget *) dropdown, FALSE, FALSE, 0);
gtk_table_attach_defaults (table, (GtkWidget *) hbox, 1, 2, row, row + 1);
gtk_widget_show ((GtkWidget *) dropdown);
continue;
@@ -407,13 +411,13 @@ mergeit (EContactMergingLookup *lookup)
row++;
label = gtk_label_new (e_contact_pretty_name (field));
hbox = gtk_hbox_new (FALSE, 0);
- gtk_box_pack_start (GTK_BOX (hbox), (GtkWidget*) label, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (hbox), (GtkWidget *) label, FALSE, FALSE, 0);
gtk_table_attach_defaults (table, (GtkWidget *) hbox, 0, 1, row, row + 1);
label = gtk_label_new (string);
hbox = gtk_hbox_new (FALSE, 0);
- gtk_box_pack_start (GTK_BOX (hbox), (GtkWidget*) label, FALSE, FALSE, 0);
- gtk_table_attach_defaults (table, (GtkWidget*) hbox, 1, 2, row, row + 1);
+ gtk_box_pack_start (GTK_BOX (hbox), (GtkWidget *) label, FALSE, FALSE, 0);
+ gtk_table_attach_defaults (table, (GtkWidget *) hbox, 1, 2, row, row + 1);
continue;
}
@@ -422,7 +426,7 @@ mergeit (EContactMergingLookup *lookup)
row++;
label = gtk_label_new (e_contact_pretty_name (field));
hbox = gtk_hbox_new (FALSE, 0);
- gtk_box_pack_start (GTK_BOX (hbox), (GtkWidget*) label, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (hbox), (GtkWidget *) label, FALSE, FALSE, 0);
gtk_table_attach_defaults (table, (GtkWidget *) hbox, 0, 1, row, row + 1);
data = g_new0 (dropdown_data, 1);
dropdown = gtk_combo_box_text_new ();
@@ -443,7 +447,7 @@ mergeit (EContactMergingLookup *lookup)
g_signal_connect (dropdown, "changed", G_CALLBACK(dropdown_changed), data);
hbox = gtk_hbox_new (FALSE, 0);
- gtk_box_pack_start (GTK_BOX (hbox), (GtkWidget*) dropdown, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (hbox), (GtkWidget *) dropdown, FALSE, FALSE, 0);
gtk_table_attach_defaults (table, (GtkWidget *) hbox, 1, 2, row, row + 1);
gtk_widget_show_all ((GtkWidget *) dropdown);
}
@@ -475,7 +479,8 @@ mergeit (EContactMergingLookup *lookup)
}
static gboolean
-check_if_same (EContact *contact, EContact *match)
+check_if_same (EContact *contact,
+ EContact *match)
{
EContactField field;
GList *email_attr_list;
@@ -487,7 +492,7 @@ check_if_same (EContact *contact, EContact *match)
num_of_email = g_list_length (email_attr_list);
if ((field == E_CONTACT_EMAIL_1 || field == E_CONTACT_EMAIL_2
- || field == E_CONTACT_EMAIL_3 || field == E_CONTACT_EMAIL_4) && (num_of_email<4)) {
+ || field == E_CONTACT_EMAIL_3 || field == E_CONTACT_EMAIL_4) && (num_of_email < 4)) {
str = (gchar *) e_contact_get_const (contact, field);
switch (num_of_email)
{
@@ -522,7 +527,9 @@ check_if_same (EContact *contact, EContact *match)
}
static void
-response (GtkWidget *dialog, gint response, EContactMergingLookup *lookup)
+response (GtkWidget *dialog,
+ gint response,
+ EContactMergingLookup *lookup)
{
static gint merge_response;
@@ -547,7 +554,10 @@ response (GtkWidget *dialog, gint response, EContactMergingLookup *lookup)
}
static void
-match_query_callback (EContact *contact, EContact *match, EABContactMatchType type, gpointer closure)
+match_query_callback (EContact *contact,
+ EContact *match,
+ EABContactMatchType type,
+ gpointer closure)
{
EContactMergingLookup *lookup = closure;
gint flag;
@@ -631,9 +641,9 @@ match_query_callback (EContact *contact, EContact *match, EABContactMatchType ty
gboolean
eab_merging_book_add_contact (EBookClient *book_client,
- EContact *contact,
- EABMergingIdAsyncCallback cb,
- gpointer closure)
+ EContact *contact,
+ EABMergingIdAsyncCallback cb,
+ gpointer closure)
{
EContactMergingLookup *lookup;
@@ -654,9 +664,9 @@ eab_merging_book_add_contact (EBookClient *book_client,
gboolean
eab_merging_book_modify_contact (EBookClient *book_client,
- EContact *contact,
- EABMergingAsyncCallback cb,
- gpointer closure)
+ EContact *contact,
+ EABMergingAsyncCallback cb,
+ gpointer closure)
{
EContactMergingLookup *lookup;
@@ -677,9 +687,9 @@ eab_merging_book_modify_contact (EBookClient *book_client,
gboolean
eab_merging_book_find_contact (EBookClient *book_client,
- EContact *contact,
- EABMergingContactAsyncCallback cb,
- gpointer closure)
+ EContact *contact,
+ EABMergingContactAsyncCallback cb,
+ gpointer closure)
{
EContactMergingLookup *lookup;
diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c
index dc1068dea3..74e794bd6e 100644
--- a/addressbook/gui/widgets/e-addressbook-model.c
+++ b/addressbook/gui/widgets/e-addressbook-model.c
@@ -324,10 +324,13 @@ view_complete_cb (EBookClientView *client_view,
static void
readonly_cb (EBookClient *book_client,
- GParamSpec *pspec,
+ GParamSpec *pspec,
EAddressbookModel *model)
{
- e_addressbook_model_set_editable (model, !e_client_is_readonly (E_CLIENT (book_client)));
+ gboolean editable;
+
+ editable = !e_client_is_readonly (E_CLIENT (book_client));
+ e_addressbook_model_set_editable (model, editable);
}
static void
@@ -734,7 +737,7 @@ e_addressbook_model_get_type (void)
return type;
}
-EAddressbookModel*
+EAddressbookModel *
e_addressbook_model_new (void)
{
return g_object_new (E_TYPE_ADDRESSBOOK_MODEL, NULL);
@@ -742,7 +745,7 @@ e_addressbook_model_new (void)
EContact *
e_addressbook_model_get_contact (EAddressbookModel *model,
- gint row)
+ gint row)
{
GPtrArray *array;
@@ -845,6 +848,8 @@ void
e_addressbook_model_set_client (EAddressbookModel *model,
EBookClient *book_client)
{
+ gboolean editable;
+
g_return_if_fail (E_IS_ADDRESSBOOK_MODEL (model));
g_return_if_fail (E_IS_BOOK_CLIENT (book_client));
@@ -878,7 +883,8 @@ e_addressbook_model_set_client (EAddressbookModel *model,
book_client, "backend-died",
G_CALLBACK (backend_died_cb), model);
- e_addressbook_model_set_editable (model, !e_client_is_readonly (E_CLIENT (book_client)));
+ editable = !e_client_is_readonly (E_CLIENT (book_client));
+ e_addressbook_model_set_editable (model, editable);
if (model->priv->client_view_idle_id == 0)
model->priv->client_view_idle_id = g_idle_add (
diff --git a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
index 680a511d05..0d2fc85478 100644
--- a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
+++ b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
@@ -99,7 +99,8 @@ unlink_model (EAddressbookReflowAdapter *adapter)
}
static gint
-text_height (PangoLayout *layout, const gchar *text)
+text_height (PangoLayout *layout,
+ const gchar *text)
{
gint height;
@@ -119,7 +120,8 @@ addressbook_dispose (GObject *object)
}
static void
-addressbook_set_width (EReflowModel *erm, gint width)
+addressbook_set_width (EReflowModel *erm,
+ gint width)
{
}
@@ -135,14 +137,16 @@ addressbook_count (EReflowModel *erm)
/* This function returns the height of the minicontact in question */
static gint
-addressbook_height (EReflowModel *erm, gint i, GnomeCanvasGroup *parent)
+addressbook_height (EReflowModel *erm,
+ gint i,
+ GnomeCanvasGroup *parent)
{
EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER (erm);
EAddressbookReflowAdapterPrivate *priv = adapter->priv;
EContactField field;
gint count = 0;
gchar *string;
- EContact *contact = (EContact*) e_addressbook_model_contact_at (priv->model, i);
+ EContact *contact = (EContact *) e_addressbook_model_contact_at (priv->model, i);
PangoLayout *layout;
gint height;
@@ -220,18 +224,21 @@ addressbook_create_cmp_cache (EReflowModel *erm)
}
static gint
-addressbook_compare (EReflowModel *erm, gint n1, gint n2, GHashTable *cmp_cache)
+addressbook_compare (EReflowModel *erm,
+ gint n1,
+ gint n2,
+ GHashTable *cmp_cache)
{
EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER (erm);
EAddressbookReflowAdapterPrivate *priv = adapter->priv;
EContact *contact1, *contact2;
if (priv->loading) {
- return n1-n2;
+ return n1 - n2;
}
else {
- contact1 = (EContact*) e_addressbook_model_contact_at (priv->model, n1);
- contact2 = (EContact*) e_addressbook_model_contact_at (priv->model, n2);
+ contact1 = (EContact *) e_addressbook_model_contact_at (priv->model, n1);
+ contact2 = (EContact *) e_addressbook_model_contact_at (priv->model, n2);
if (contact1 && contact2) {
const gchar *file_as1, *file_as2;
@@ -292,7 +299,9 @@ adapter_open_contact (EMinicard *card,
}
static GnomeCanvasItem *
-addressbook_incarnate (EReflowModel *erm, gint i, GnomeCanvasGroup *parent)
+addressbook_incarnate (EReflowModel *erm,
+ gint i,
+ GnomeCanvasGroup *parent)
{
EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER (erm);
EAddressbookReflowAdapterPrivate *priv = adapter->priv;
@@ -319,7 +328,9 @@ addressbook_incarnate (EReflowModel *erm, gint i, GnomeCanvasGroup *parent)
}
static void
-addressbook_reincarnate (EReflowModel *erm, gint i, GnomeCanvasItem *item)
+addressbook_reincarnate (EReflowModel *erm,
+ gint i,
+ GnomeCanvasItem *item)
{
EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER (erm);
EAddressbookReflowAdapterPrivate *priv = adapter->priv;
@@ -331,8 +342,9 @@ addressbook_reincarnate (EReflowModel *erm, gint i, GnomeCanvasItem *item)
static void
create_contact (EAddressbookModel *model,
- gint index, gint count,
- EAddressbookReflowAdapter *adapter)
+ gint index,
+ gint count,
+ EAddressbookReflowAdapter *adapter)
{
e_reflow_model_items_inserted (E_REFLOW_MODEL (adapter),
index,
@@ -341,8 +353,8 @@ create_contact (EAddressbookModel *model,
static void
remove_contacts (EAddressbookModel *model,
- gpointer data,
- EAddressbookReflowAdapter *adapter)
+ gpointer data,
+ EAddressbookReflowAdapter *adapter)
{
GArray *indices = (GArray *) data;
gint count = indices->len;
@@ -358,22 +370,22 @@ remove_contacts (EAddressbookModel *model,
static void
modify_contact (EAddressbookModel *model,
- gint index,
- EAddressbookReflowAdapter *adapter)
+ gint index,
+ EAddressbookReflowAdapter *adapter)
{
e_reflow_model_item_changed (E_REFLOW_MODEL (adapter), index);
}
static void
model_changed (EAddressbookModel *model,
- EAddressbookReflowAdapter *adapter)
+ EAddressbookReflowAdapter *adapter)
{
e_reflow_model_changed (E_REFLOW_MODEL (adapter));
}
static void
search_started (EAddressbookModel *model,
- EAddressbookReflowAdapter *adapter)
+ EAddressbookReflowAdapter *adapter)
{
EAddressbookReflowAdapterPrivate *priv = adapter->priv;
@@ -382,8 +394,8 @@ search_started (EAddressbookModel *model,
static void
search_result (EAddressbookModel *model,
- const GError *error,
- EAddressbookReflowAdapter *adapter)
+ const GError *error,
+ EAddressbookReflowAdapter *adapter)
{
EAddressbookReflowAdapterPrivate *priv = adapter->priv;
@@ -394,14 +406,14 @@ search_result (EAddressbookModel *model,
static void
addressbook_set_property (GObject *object,
- guint prop_id,
+ guint property_id,
const GValue *value,
GParamSpec *pspec)
{
EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER (object);
EAddressbookReflowAdapterPrivate *priv = adapter->priv;
- switch (prop_id) {
+ switch (property_id) {
case PROP_CLIENT:
g_object_set (priv->model,
"client", g_value_get_object (value),
@@ -418,21 +430,21 @@ addressbook_set_property (GObject *object,
NULL);
break;
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
static void
addressbook_get_property (GObject *object,
- guint prop_id,
+ guint property_id,
GValue *value,
GParamSpec *pspec)
{
EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER (object);
EAddressbookReflowAdapterPrivate *priv = adapter->priv;
- switch (prop_id) {
+ switch (property_id) {
case PROP_CLIENT: {
g_object_get_property (G_OBJECT (priv->model),
"client", value);
@@ -452,7 +464,7 @@ addressbook_get_property (GObject *object,
g_value_set_object (value, priv->model);
break;
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
@@ -568,7 +580,7 @@ e_addressbook_reflow_adapter_get_type (void)
void
e_addressbook_reflow_adapter_construct (EAddressbookReflowAdapter *adapter,
- EAddressbookModel *model)
+ EAddressbookModel *model)
{
EAddressbookReflowAdapterPrivate *priv = adapter->priv;
@@ -616,7 +628,7 @@ e_addressbook_reflow_adapter_new (EAddressbookModel *model)
EContact *
e_addressbook_reflow_adapter_get_contact (EAddressbookReflowAdapter *adapter,
- gint index)
+ gint index)
{
EAddressbookReflowAdapterPrivate *priv = adapter->priv;
diff --git a/addressbook/gui/widgets/e-addressbook-table-adapter.c b/addressbook/gui/widgets/e-addressbook-table-adapter.c
index e47b5bb186..f102b684d7 100644
--- a/addressbook/gui/widgets/e-addressbook-table-adapter.c
+++ b/addressbook/gui/widgets/e-addressbook-table-adapter.c
@@ -107,7 +107,9 @@ addressbook_row_count (ETableModel *etc)
/* This function returns the value at a particular point in our ETableModel. */
static gpointer
-addressbook_value_at (ETableModel *etc, gint col, gint row)
+addressbook_value_at (ETableModel *etc,
+ gint col,
+ gint row)
{
EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER (etc);
EAddressbookTableAdapterPrivate *priv = adapter->priv;
@@ -157,7 +159,10 @@ contact_modified_cb (EBookClient *book_client,
}
static void
-addressbook_set_value_at (ETableModel *etc, gint col, gint row, gconstpointer val)
+addressbook_set_value_at (ETableModel *etc,
+ gint col,
+ gint row,
+ gconstpointer val)
{
EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER (etc);
EAddressbookTableAdapterPrivate *priv = adapter->priv;
@@ -199,33 +204,17 @@ addressbook_set_value_at (ETableModel *etc, gint col, gint row, gconstpointer va
/* This function returns whether a particular cell is editable. */
static gboolean
-addressbook_is_cell_editable (ETableModel *etc, gint col, gint row)
+addressbook_is_cell_editable (ETableModel *etc,
+ gint col,
+ gint row)
{
-#if 0
- EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER (etc);
- EAddressbookTableAdapterPrivate *priv = adapter->priv;
- const EContact *contact;
-
- if (row >= 0 && row < e_addressbook_model_contact_count (priv->model))
- contact = e_addressbook_model_contact_at (priv->model, row);
- else
- contact = NULL;
-
- if (!e_addressbook_model_editable (priv->model))
- return FALSE;
- else if (contact && e_contact_get ((EContact *) contact, E_CONTACT_IS_LIST))
- /* we only allow editing of the name and file as for
- * lists */
- return col == E_CONTACT_FULL_NAME || col == E_CONTACT_FILE_AS;
- else
- return col < E_CONTACT_LAST_SIMPLE_STRING;
-#endif
-
return FALSE;
}
static void
-addressbook_append_row (ETableModel *etm, ETableModel *source, gint row)
+addressbook_append_row (ETableModel *etm,
+ ETableModel *source,
+ gint row)
{
EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER (etm);
EAddressbookTableAdapterPrivate *priv = adapter->priv;
@@ -248,32 +237,41 @@ addressbook_append_row (ETableModel *etm, ETableModel *source, gint row)
/* This function duplicates the value passed to it. */
static gpointer
-addressbook_duplicate_value (ETableModel *etc, gint col, gconstpointer value)
+addressbook_duplicate_value (ETableModel *etc,
+ gint col,
+ gconstpointer value)
{
return g_strdup (value);
}
/* This function frees the value passed to it. */
static void
-addressbook_free_value (ETableModel *etc, gint col, gpointer value)
+addressbook_free_value (ETableModel *etc,
+ gint col,
+ gpointer value)
{
g_free (value);
}
static gpointer
-addressbook_initialize_value (ETableModel *etc, gint col)
+addressbook_initialize_value (ETableModel *etc,
+ gint col)
{
return g_strdup("");
}
static gboolean
-addressbook_value_is_empty (ETableModel *etc, gint col, gconstpointer value)
+addressbook_value_is_empty (ETableModel *etc,
+ gint col,
+ gconstpointer value)
{
return !(value && *(gchar *) value);
}
static gchar *
-addressbook_value_to_string (ETableModel *etc, gint col, gconstpointer value)
+addressbook_value_to_string (ETableModel *etc,
+ gint col,
+ gconstpointer value)
{
return g_strdup (value);
}
@@ -316,8 +314,9 @@ eab_table_adapter_init (GObject *object)
static void
create_contact (EAddressbookModel *model,
- gint index, gint count,
- EAddressbookTableAdapter *adapter)
+ gint index,
+ gint count,
+ EAddressbookTableAdapter *adapter)
{
e_table_model_pre_change (E_TABLE_MODEL (adapter));
e_table_model_rows_inserted (E_TABLE_MODEL (adapter), index, count);
@@ -325,8 +324,8 @@ create_contact (EAddressbookModel *model,
static void
remove_contacts (EAddressbookModel *model,
- gpointer data,
- EAddressbookTableAdapter *adapter)
+ gpointer data,
+ EAddressbookTableAdapter *adapter)
{
GArray *indices = (GArray *) data;
gint count = indices->len;
@@ -345,8 +344,8 @@ remove_contacts (EAddressbookModel *model,
static void
modify_contact (EAddressbookModel *model,
- gint index,
- EAddressbookTableAdapter *adapter)
+ gint index,
+ EAddressbookTableAdapter *adapter)
{
/* clear whole cache */
g_hash_table_remove_all (adapter->priv->emails);
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
index 55310949b0..7f3a7a85b8 100644
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ b/addressbook/gui/widgets/e-addressbook-view.c
@@ -298,8 +298,8 @@ addressbook_view_create_table_view (EAddressbookView *view,
e_cell_date_set_format_component (E_CELL_DATE (cell), "addressbook");
/* Here we create the table. We give it the three pieces of
- the table we've created, the header, the model, and the
- initial layout. It does the rest. */
+ * the table we've created, the header, the model, and the
+ * initial layout. It does the rest. */
etspecfile = g_build_filename (
EVOLUTION_ETSPECDIR, "e-addressbook-view.etspec", NULL);
widget = e_table_new_from_spec_file (
@@ -973,7 +973,8 @@ e_addressbook_view_get_view_object (EAddressbookView *view)
/* Helper for e_addressbook_view_get_selected() */
static void
-add_to_list (gint model_row, gpointer closure)
+add_to_list (gint model_row,
+ gpointer closure)
{
GSList **list = closure;
*list = g_slist_prepend (*list, GINT_TO_POINTER (model_row));
@@ -1058,7 +1059,9 @@ e_addressbook_view_get_paste_target_list (EAddressbookView *view)
}
static void
-status_message (EAddressbookView *view, const gchar *status, gint percent)
+status_message (EAddressbookView *view,
+ const gchar *status,
+ gint percent)
{
EActivity *activity;
EShellView *shell_view;
@@ -1122,7 +1125,8 @@ folder_bar_message (EAddressbookView *view,
}
static void
-stop_state_changed (GObject *object, EAddressbookView *view)
+stop_state_changed (GObject *object,
+ EAddressbookView *view)
{
command_state_change (view);
}
@@ -1180,7 +1184,8 @@ contact_print_button_draw_page (GtkPrintOperation *operation,
}
static void
-e_contact_print_button (EPrintable *printable, GtkPrintOperationAction action)
+e_contact_print_button (EPrintable *printable,
+ GtkPrintOperationAction action)
{
GtkPrintOperation *operation;
@@ -1362,7 +1367,8 @@ addressbook_view_confirm_delete (GtkWindow *parent,
}
void
-e_addressbook_view_delete_selection (EAddressbookView *view, gboolean is_delete)
+e_addressbook_view_delete_selection (EAddressbookView *view,
+ gboolean is_delete)
{
GSList *list, *l;
gboolean plural = FALSE, is_list = FALSE;
@@ -1621,13 +1627,15 @@ view_transfer_contacts (EAddressbookView *view,
}
void
-e_addressbook_view_copy_to_folder (EAddressbookView *view, gboolean all)
+e_addressbook_view_copy_to_folder (EAddressbookView *view,
+ gboolean all)
{
view_transfer_contacts (view, FALSE, all);
}
void
-e_addressbook_view_move_to_folder (EAddressbookView *view, gboolean all)
+e_addressbook_view_move_to_folder (EAddressbookView *view,
+ gboolean all)
{
view_transfer_contacts (view, TRUE, all);
}
diff --git a/addressbook/gui/widgets/e-minicard-label.c b/addressbook/gui/widgets/e-minicard-label.c
index 967853d7b6..c22ffe58a5 100644
--- a/addressbook/gui/widgets/e-minicard-label.c
+++ b/addressbook/gui/widgets/e-minicard-label.c
@@ -37,8 +37,8 @@
static void e_minicard_label_init (EMinicardLabel *card);
static void e_minicard_label_class_init (EMinicardLabelClass *klass);
-static void e_minicard_label_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
-static void e_minicard_label_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
+static void e_minicard_label_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static void e_minicard_label_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
static gboolean e_minicard_label_event (GnomeCanvasItem *item, GdkEvent *event);
static void e_minicard_label_realize (GnomeCanvasItem *item);
static void e_minicard_label_unrealize (GnomeCanvasItem *item);
@@ -199,7 +199,10 @@ e_minicard_label_init (EMinicardLabel *minicard_label)
}
static void
-e_minicard_label_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+e_minicard_label_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
EMinicardLabel *e_minicard_label;
GnomeCanvasItem *item;
@@ -207,7 +210,7 @@ e_minicard_label_set_property (GObject *object, guint prop_id, const GValue *va
e_minicard_label = E_MINICARD_LABEL (object);
item = GNOME_CANVAS_ITEM (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_WIDTH:
e_minicard_label->width = g_value_get_double (value);
e_minicard_label_resize_children (e_minicard_label);
@@ -234,19 +237,22 @@ e_minicard_label_set_property (GObject *object, guint prop_id, const GValue *va
g_object_set (e_minicard_label->field, "editable", FALSE /* e_minicard_label->editable */, NULL);
break;
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
static void
-e_minicard_label_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+e_minicard_label_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
{
EMinicardLabel *e_minicard_label;
e_minicard_label = E_MINICARD_LABEL (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_WIDTH:
g_value_set_double (value, e_minicard_label->width);
break;
@@ -275,7 +281,7 @@ e_minicard_label_get_property (GObject *object, guint prop_id, GValue *value, G
g_value_set_boolean (value, e_minicard_label->editable);
break;
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
@@ -341,7 +347,8 @@ e_minicard_label_unrealize (GnomeCanvasItem *item)
}
static gboolean
-e_minicard_label_event (GnomeCanvasItem *item, GdkEvent *event)
+e_minicard_label_event (GnomeCanvasItem *item,
+ GdkEvent *event)
{
EMinicardLabel *e_minicard_label;
@@ -455,13 +462,15 @@ set_colors (EMinicardLabel *label)
}
static void
-e_minicard_label_style_set (EMinicardLabel *label, GtkStyle *previous_style)
+e_minicard_label_style_set (EMinicardLabel *label,
+ GtkStyle *previous_style)
{
set_colors (label);
}
static void
-e_minicard_label_reflow (GnomeCanvasItem *item, gint flags)
+e_minicard_label_reflow (GnomeCanvasItem *item,
+ gint flags)
{
EMinicardLabel *e_minicard_label = E_MINICARD_LABEL (item);
diff --git a/addressbook/gui/widgets/e-minicard-view-widget.c b/addressbook/gui/widgets/e-minicard-view-widget.c
index 65fa12d9f1..0a0b19df94 100644
--- a/addressbook/gui/widgets/e-minicard-view-widget.c
+++ b/addressbook/gui/widgets/e-minicard-view-widget.c
@@ -37,12 +37,12 @@ static void e_minicard_view_widget_class_init
(EMinicardViewWidgetClass *class);
static void e_minicard_view_widget_set_property
(GObject *object,
- guint prop_id,
+ guint property_id,
const GValue *value,
GParamSpec *pspec);
static void e_minicard_view_widget_get_property
(GObject *object,
- guint prop_id,
+ guint property_id,
GValue *value,
GParamSpec *pspec);
static void e_minicard_view_widget_dispose (GObject *object);
@@ -231,15 +231,15 @@ e_minicard_view_widget_new (EAddressbookReflowAdapter *adapter)
static void
e_minicard_view_widget_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
EMinicardViewWidget *emvw;
emvw = E_MINICARD_VIEW_WIDGET (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_CLIENT:
if (emvw->book_client)
g_object_unref (emvw->book_client);
@@ -277,22 +277,22 @@ e_minicard_view_widget_set_property (GObject *object,
}
break;
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
static void
e_minicard_view_widget_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
{
EMinicardViewWidget *emvw;
emvw = E_MINICARD_VIEW_WIDGET (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_CLIENT:
g_value_set_object (value, emvw->book_client);
break;
@@ -306,7 +306,7 @@ e_minicard_view_widget_get_property (GObject *object,
g_value_set_double (value, emvw->column_width);
break;
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
@@ -335,49 +335,57 @@ e_minicard_view_widget_dispose (GObject *object)
}
static void
-selection_change (ESelectionModel *esm, EMinicardViewWidget *widget)
+selection_change (ESelectionModel *esm,
+ EMinicardViewWidget *widget)
{
- g_signal_emit (widget,
- signals[SELECTION_CHANGE], 0);
+ g_signal_emit (widget, signals[SELECTION_CHANGE], 0);
}
static void
-selection_row_change (ESelectionModel *esm, gint row, EMinicardViewWidget *widget)
+selection_row_change (ESelectionModel *esm,
+ gint row,
+ EMinicardViewWidget *widget)
{
selection_change (esm, widget);
}
static void
-column_width_changed (ESelectionModel *esm, double width, EMinicardViewWidget *widget)
+column_width_changed (ESelectionModel *esm,
+ gdouble width,
+ EMinicardViewWidget *widget)
{
- g_signal_emit (widget,
- signals[COLUMN_WIDTH_CHANGED], 0, width);
+ g_signal_emit (widget, signals[COLUMN_WIDTH_CHANGED], 0, width);
}
static void
-create_contact (EMinicardView *view, EMinicardViewWidget *widget)
+create_contact (EMinicardView *view,
+ EMinicardViewWidget *widget)
{
g_signal_emit (widget, signals[CREATE_CONTACT], 0);
}
static void
-create_contact_list (EMinicardView *view, EMinicardViewWidget *widget)
+create_contact_list (EMinicardView *view,
+ EMinicardViewWidget *widget)
{
g_signal_emit (widget, signals[CREATE_CONTACT_LIST], 0);
}
static guint
-right_click (EMinicardView *view, GdkEvent *event, EMinicardViewWidget *widget)
+right_click (EMinicardView *view,
+ GdkEvent *event,
+ EMinicardViewWidget *widget)
{
guint ret_val;
- g_signal_emit (widget,
- signals[RIGHT_CLICK], 0,
- event, &ret_val);
+
+ g_signal_emit (widget, signals[RIGHT_CLICK], 0, event, &ret_val);
+
return ret_val;
}
static void
-e_minicard_view_widget_style_set (GtkWidget *widget, GtkStyle *previous_style)
+e_minicard_view_widget_style_set (GtkWidget *widget,
+ GtkStyle *previous_style)
{
EMinicardViewWidget *view = E_MINICARD_VIEW_WIDGET (widget);
GtkStyle *style;
@@ -493,7 +501,7 @@ e_minicard_view_widget_get_selection_model (EMinicardViewWidget *view)
}
EMinicardView *
-e_minicard_view_widget_get_view (EMinicardViewWidget *view)
+e_minicard_view_widget_get_view (EMinicardViewWidget *view)
{
if (view->emv)
return E_MINICARD_VIEW (view->emv);
@@ -502,7 +510,8 @@ e_minicard_view_widget_get_view (EMinicardViewWidget *view)
}
static gboolean
-e_minicard_view_widget_real_focus_in_event (GtkWidget *widget, GdkEventFocus *event)
+e_minicard_view_widget_real_focus_in_event (GtkWidget *widget,
+ GdkEventFocus *event)
{
GnomeCanvas *canvas;
EMinicardViewWidget *view;
@@ -524,6 +533,5 @@ e_minicard_view_widget_real_focus_in_event (GtkWidget *widget, GdkEventFocus *ev
return GTK_WIDGET_CLASS (parent_class)->focus_in_event (widget, event);
return FALSE;
-
}
diff --git a/addressbook/gui/widgets/e-minicard-view.c b/addressbook/gui/widgets/e-minicard-view.c
index 91a4a12991..ba52e7a0a8 100644
--- a/addressbook/gui/widgets/e-minicard-view.c
+++ b/addressbook/gui/widgets/e-minicard-view.c
@@ -81,11 +81,11 @@ static GtkTargetEntry drag_types[] = {
static void
e_minicard_view_drag_data_get (GtkWidget *widget,
- GdkDragContext *context,
- GtkSelectionData *selection_data,
- guint info,
- guint time,
- EMinicardView *view)
+ GdkDragContext *context,
+ GtkSelectionData *selection_data,
+ guint info,
+ guint time,
+ EMinicardView *view)
{
GdkAtom target;
@@ -149,7 +149,7 @@ e_minicard_view_drag_begin (EAddressbookReflowAdapter *adapter,
target_list = gtk_target_list_new (drag_types, G_N_ELEMENTS (drag_types));
context = gtk_drag_begin (GTK_WIDGET (GNOME_CANVAS_ITEM (view)->canvas),
- target_list, actions, 1/*XXX*/, event);
+ target_list, actions, 1/*XXX */, event);
if (!view->canvas_drag_data_get_id)
view->canvas_drag_data_get_id = g_signal_connect (
@@ -235,15 +235,15 @@ adapter_changed (EMinicardView *view)
static void
e_minicard_view_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
EMinicardView *view;
view = E_MINICARD_VIEW (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_ADAPTER:
if (view->adapter) {
if (view->writable_status_id || view->stop_state_id) {
@@ -303,22 +303,22 @@ e_minicard_view_set_property (GObject *object,
set_empty_message (view);
break;
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
static void
e_minicard_view_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
{
EMinicardView *view;
view = E_MINICARD_VIEW (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_ADAPTER:
g_value_set_object (value, view->adapter);
break;
@@ -335,7 +335,7 @@ e_minicard_view_get_property (GObject *object,
"editable", value);
break;
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
@@ -378,7 +378,8 @@ e_minicard_view_dispose (GObject *object)
}
static guint
-e_minicard_view_right_click (EMinicardView *view, GdkEvent *event)
+e_minicard_view_right_click (EMinicardView *view,
+ GdkEvent *event)
{
guint ret_val = 0;
g_signal_emit (view, signals[RIGHT_CLICK], 0,
@@ -387,7 +388,8 @@ e_minicard_view_right_click (EMinicardView *view, GdkEvent *event)
}
static gboolean
-e_minicard_view_event (GnomeCanvasItem *item, GdkEvent *event)
+e_minicard_view_event (GnomeCanvasItem *item,
+ GdkEvent *event)
{
EMinicardView *view;
@@ -463,32 +465,6 @@ e_minicard_view_selection_event (EReflow *reflow,
return return_val;
}
-#if 0
-static gint
-compare_to_utf_str (EMinicard *card, const gchar *utf_str)
-{
- g_return_val_if_fail (card != NULL, 0);
- g_return_val_if_fail (E_IS_MINICARD (card), 0);
-
- if (g_unichar_isdigit (g_utf8_get_char (utf_str))) {
- return 1;
- }
-
- if (card->card) {
- gchar *file_as;
- g_object_get (card->card,
- "file_as", &file_as,
- NULL);
- if (file_as)
- return g_utf8_strcasecmp (file_as, utf_str);
- else
- return 0;
- } else {
- return 0;
- }
-}
-#endif
-
static void
e_minicard_view_class_init (EMinicardViewClass *klass)
{
@@ -625,7 +601,8 @@ typedef struct {
} ModelAndList;
static void
-add_to_list (gint index, gpointer closure)
+add_to_list (gint index,
+ gpointer closure)
{
ModelAndList *mal = closure;
mal->list = g_slist_prepend (
diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c
index 352604984c..78d98e2cb2 100644
--- a/addressbook/gui/widgets/e-minicard.c
+++ b/addressbook/gui/widgets/e-minicard.c
@@ -43,8 +43,8 @@
static void e_minicard_init (EMinicard *card);
static void e_minicard_class_init (EMinicardClass *class);
-static void e_minicard_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
-static void e_minicard_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
+static void e_minicard_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static void e_minicard_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
static void e_minicard_dispose (GObject *object);
static void e_minicard_finalize (GObject *object);
static gboolean e_minicard_event (GnomeCanvasItem *item, GdkEvent *event);
@@ -266,7 +266,8 @@ e_minicard_init (EMinicard *minicard)
}
static void
-set_selected (EMinicard *minicard, gboolean selected)
+set_selected (EMinicard *minicard,
+ gboolean selected)
{
GnomeCanvas *canvas;
GtkStyle *style;
@@ -299,7 +300,8 @@ set_selected (EMinicard *minicard, gboolean selected)
}
static void
-set_has_cursor (EMinicard *minicard, gboolean has_cursor)
+set_has_cursor (EMinicard *minicard,
+ gboolean has_cursor)
{
if (!minicard->has_focus && has_cursor)
e_canvas_item_grab_focus (GNOME_CANVAS_ITEM (minicard), FALSE);
@@ -307,7 +309,10 @@ set_has_cursor (EMinicard *minicard, gboolean has_cursor)
}
static void
-e_minicard_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+e_minicard_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
GnomeCanvasItem *item;
EMinicard *e_minicard;
@@ -317,7 +322,7 @@ e_minicard_set_property (GObject *object, guint prop_id, const GValue *value, G
item = GNOME_CANVAS_ITEM (object);
e_minicard = E_MINICARD (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_WIDTH:
if (e_minicard->width != g_value_get_double (value)) {
e_minicard->width = g_value_get_double (value);
@@ -376,19 +381,22 @@ e_minicard_set_property (GObject *object, guint prop_id, const GValue *value, G
e_minicard->changed = FALSE;
break;
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
static void
-e_minicard_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+e_minicard_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
{
EMinicard *e_minicard;
e_minicard = E_MINICARD (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_WIDTH:
g_value_set_double (value, e_minicard->width);
break;
@@ -411,7 +419,7 @@ e_minicard_get_property (GObject *object, guint prop_id, GValue *value, GParamS
g_value_set_object (value, e_minicard->contact);
break;
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
@@ -466,7 +474,8 @@ e_minicard_finalize (GObject *object)
}
static void
-e_minicard_style_set (EMinicard *minicard, GtkStyle *previous_style)
+e_minicard_style_set (EMinicard *minicard,
+ GtkStyle *previous_style)
{
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (minicard);
@@ -552,7 +561,8 @@ e_minicard_activate_editor (EMinicard *minicard)
}
static gboolean
-e_minicard_event (GnomeCanvasItem *item, GdkEvent *event)
+e_minicard_event (GnomeCanvasItem *item,
+ GdkEvent *event)
{
EMinicard *e_minicard;
@@ -658,7 +668,7 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event)
gint view_index = e_sorter_model_to_sorted (reflow->selection->sorter, model_index);
if (view_index == 0)
- view_index = row_count-1;
+ view_index = row_count - 1;
else
view_index--;
@@ -683,7 +693,7 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event)
gint model_index = e_selection_model_cursor_row (reflow->selection);
gint view_index = e_sorter_model_to_sorted (reflow->selection->sorter, model_index);
- if (view_index == row_count-1)
+ if (view_index == row_count - 1)
view_index = 0;
else
view_index++;
@@ -718,7 +728,7 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event)
}
static void
-e_minicard_resize_children ( EMinicard *e_minicard )
+e_minicard_resize_children (EMinicard *e_minicard)
{
GList *list;
gboolean is_list = GPOINTER_TO_INT (e_contact_get (e_minicard->contact, E_CONTACT_IS_LIST));
@@ -742,7 +752,9 @@ e_minicard_resize_children ( EMinicard *e_minicard )
}
static void
-add_field (EMinicard *e_minicard, EContactField field, gdouble left_width)
+add_field (EMinicard *e_minicard,
+ EContactField field,
+ gdouble left_width)
{
GnomeCanvasItem *new_item;
GnomeCanvasGroup *group;
@@ -808,7 +820,11 @@ get_email_location (EVCardAttribute *attr)
}
static void
-add_email_field (EMinicard *e_minicard, GList *email_list, gdouble left_width, gint limit, gboolean is_list)
+add_email_field (EMinicard *e_minicard,
+ GList *email_list,
+ gdouble left_width,
+ gint limit,
+ gboolean is_list)
{
GnomeCanvasItem *new_item;
GnomeCanvasGroup *group;
@@ -820,7 +836,7 @@ add_email_field (EMinicard *e_minicard, GList *email_list, gdouble left_width, g
GList *emails = e_contact_get (e_minicard->contact, E_CONTACT_EMAIL);
group = GNOME_CANVAS_GROUP ( e_minicard );
- for (l=email_list, le=emails; l!=NULL && count < limit && le!=NULL; l = l->next, le=le->next) {
+ for (l = email_list, le = emails; l != NULL && count < limit && le != NULL; l = l->next, le = le->next) {
const gchar *tmp;
gchar *email = NULL;
gchar *string = NULL;
@@ -881,7 +897,8 @@ add_email_field (EMinicard *e_minicard, GList *email_list, gdouble left_width, g
}
static gint
-get_left_width (EMinicard *e_minicard, gboolean is_list)
+get_left_width (EMinicard *e_minicard,
+ gboolean is_list)
{
gchar *name;
EContactField field;
@@ -910,7 +927,7 @@ get_left_width (EMinicard *e_minicard, gboolean is_list)
}
static void
-remodel ( EMinicard *e_minicard )
+remodel (EMinicard *e_minicard)
{
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (e_minicard);
gint count = 0;
@@ -947,7 +964,7 @@ remodel ( EMinicard *e_minicard )
for (field = E_CONTACT_FULL_NAME; field != (E_CONTACT_LAST_SIMPLE_STRING -1) && count < 5; field++) {
EMinicardField *minicard_field = NULL;
- gboolean is_email=FALSE;
+ gboolean is_email = FALSE;
if (field == E_CONTACT_FAMILY_NAME || field == E_CONTACT_GIVEN_NAME)
continue;
@@ -958,7 +975,7 @@ remodel ( EMinicard *e_minicard )
if (email_rendered)
continue;
email_rendered = TRUE;
- is_email=TRUE;
+ is_email = TRUE;
}
if (list)
@@ -992,7 +1009,7 @@ remodel ( EMinicard *e_minicard )
limit = 5 - count;
email = e_contact_get_attributes (e_minicard->contact, E_CONTACT_EMAIL);
add_email_field (e_minicard, email, left_width, limit, is_list);
- if (count+limit >5)
+ if (count + limit >5)
count = 5;
else
count = count + g_list_length (email);
@@ -1014,7 +1031,8 @@ remodel ( EMinicard *e_minicard )
}
static void
-e_minicard_reflow (GnomeCanvasItem *item, gint flags)
+e_minicard_reflow (GnomeCanvasItem *item,
+ gint flags)
{
EMinicard *e_minicard = E_MINICARD (item);
@@ -1074,7 +1092,8 @@ e_minicard_get_card_id (EMinicard *minicard)
}
gint
-e_minicard_compare (EMinicard *minicard1, EMinicard *minicard2)
+e_minicard_compare (EMinicard *minicard1,
+ EMinicard *minicard2)
{
gint cmp = 0;
@@ -1109,7 +1128,8 @@ e_minicard_compare (EMinicard *minicard1, EMinicard *minicard2)
}
gint
-e_minicard_selected (EMinicard *minicard, GdkEvent *event)
+e_minicard_selected (EMinicard *minicard,
+ GdkEvent *event)
{
gint ret_val = 0;
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (minicard);
@@ -1129,7 +1149,8 @@ e_minicard_selected (EMinicard *minicard, GdkEvent *event)
}
static gint
-e_minicard_drag_begin (EMinicard *minicard, GdkEvent *event)
+e_minicard_drag_begin (EMinicard *minicard,
+ GdkEvent *event)
{
gint ret_val = 0;
GnomeCanvasItem *parent;
diff --git a/addressbook/gui/widgets/ea-addressbook-view.c b/addressbook/gui/widgets/ea-addressbook-view.c
index 2d432b6a76..c5bb9fc018 100644
--- a/addressbook/gui/widgets/ea-addressbook-view.c
+++ b/addressbook/gui/widgets/ea-addressbook-view.c
@@ -106,7 +106,7 @@ ea_ab_view_get_description (AtkObject *accessible)
return _("evolution address book");
}
-AtkObject*
+AtkObject *
ea_ab_view_new (GObject *obj)
{
GObject *object;
diff --git a/addressbook/gui/widgets/ea-addressbook-view.h b/addressbook/gui/widgets/ea-addressbook-view.h
index db9e008ab1..55da1d5e37 100644
--- a/addressbook/gui/widgets/ea-addressbook-view.h
+++ b/addressbook/gui/widgets/ea-addressbook-view.h
@@ -48,7 +48,7 @@ struct _EaABViewClass
};
GType ea_ab_view_get_type (void);
-AtkObject* ea_ab_view_new (GObject *obj);
+AtkObject * ea_ab_view_new (GObject *obj);
G_END_DECLS
diff --git a/addressbook/gui/widgets/ea-addressbook.c b/addressbook/gui/widgets/ea-addressbook.c
index b67d876139..b57720be39 100644
--- a/addressbook/gui/widgets/ea-addressbook.c
+++ b/addressbook/gui/widgets/ea-addressbook.c
@@ -36,9 +36,9 @@ EA_FACTORY_GOBJECT (EA_TYPE_MINICARD_VIEW, ea_minicard_view, ea_minicard_view_ne
EA_FACTORY_GOBJECT (EA_TYPE_AB_VIEW, ea_ab_view, ea_ab_view_new)
static gboolean ea_addressbook_focus_watcher (GSignalInvocationHint *ihint,
- guint n_param_values,
- const GValue *param_values,
- gpointer data);
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer data);
void e_minicard_a11y_init (void)
{
@@ -64,9 +64,9 @@ void eab_view_a11y_init (void)
static gboolean
ea_addressbook_focus_watcher (GSignalInvocationHint *ihint,
- guint n_param_values,
- const GValue *param_values,
- gpointer data)
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer data)
{
GObject *object;
GdkEvent *event;
diff --git a/addressbook/gui/widgets/ea-minicard-view.c b/addressbook/gui/widgets/ea-minicard-view.c
index a61c6074a0..58d3a5fd2b 100644
--- a/addressbook/gui/widgets/ea-minicard-view.c
+++ b/addressbook/gui/widgets/ea-minicard-view.c
@@ -51,7 +51,7 @@ static void atk_selection_interface_init (AtkSelectionIface *iface);
static gboolean selection_interface_add_selection (AtkSelection *selection,
gint i);
static gboolean selection_interface_clear_selection (AtkSelection *selection);
-static AtkObject* selection_interface_ref_selection (AtkSelection *selection,
+static AtkObject * selection_interface_ref_selection (AtkSelection *selection,
gint i);
static gint selection_interface_get_selection_count (AtkSelection *selection);
static gboolean selection_interface_is_child_selected (AtkSelection *selection,
@@ -187,7 +187,7 @@ ea_minicard_view_get_description (AtkObject *accessible)
return _("evolution address book");
}
-AtkObject*
+AtkObject *
ea_minicard_view_new (GObject *obj)
{
GObject *object;
@@ -242,7 +242,8 @@ static AtkStateSet *ea_minicard_view_ref_state_set (AtkObject *obj)
}
static AtkObject *
-ea_minicard_view_ref_child (AtkObject *accessible, gint index)
+ea_minicard_view_ref_child (AtkObject *accessible,
+ gint index)
{
EReflow *reflow;
gint child_num;
@@ -288,7 +289,8 @@ atk_selection_interface_init (AtkSelectionIface *iface)
}
static gboolean
-selection_interface_add_selection (AtkSelection *selection, gint i)
+selection_interface_add_selection (AtkSelection *selection,
+ gint i)
{
AtkGObjectAccessible *atk_gobj= NULL;
EReflow *reflow = NULL;
@@ -322,8 +324,9 @@ selection_interface_clear_selection (AtkSelection *selection)
return TRUE;
}
-static AtkObject*
-selection_interface_ref_selection (AtkSelection *selection, gint i)
+static AtkObject *
+selection_interface_ref_selection (AtkSelection *selection,
+ gint i)
{
return ea_minicard_view_ref_child (ATK_OBJECT (selection), i);
}
@@ -344,7 +347,8 @@ selection_interface_get_selection_count (AtkSelection *selection)
}
static gboolean
-selection_interface_is_child_selected (AtkSelection *selection, gint i)
+selection_interface_is_child_selected (AtkSelection *selection,
+ gint i)
{
AtkGObjectAccessible *atk_gobj = NULL;
EReflow *reflow = NULL;
@@ -407,13 +411,15 @@ static gint atk_action_interface_get_n_action (AtkAction *iface)
}
static const gchar *
-atk_action_interface_get_description (AtkAction *iface, gint i)
+atk_action_interface_get_description (AtkAction *iface,
+ gint i)
{
return atk_action_interface_get_name (iface, i);
}
static const gchar *
-atk_action_interface_get_name (AtkAction *iface, gint i)
+atk_action_interface_get_name (AtkAction *iface,
+ gint i)
{
if ( i >= G_N_ELEMENTS (action_name) || i < 0)
return NULL;
diff --git a/addressbook/gui/widgets/ea-minicard-view.h b/addressbook/gui/widgets/ea-minicard-view.h
index 320c74d15e..889674bb92 100644
--- a/addressbook/gui/widgets/ea-minicard-view.h
+++ b/addressbook/gui/widgets/ea-minicard-view.h
@@ -49,7 +49,7 @@ struct _EaMinicardViewClass
GType ea_minicard_view_get_type (void);
-AtkObject* ea_minicard_view_new (GObject *obj);
+AtkObject * ea_minicard_view_new (GObject *obj);
G_END_DECLS
diff --git a/addressbook/gui/widgets/ea-minicard.c b/addressbook/gui/widgets/ea-minicard.c
index 2e8d4281ef..45d496ffa0 100644
--- a/addressbook/gui/widgets/ea-minicard.c
+++ b/addressbook/gui/widgets/ea-minicard.c
@@ -229,7 +229,8 @@ ea_minicard_get_n_children (AtkObject *accessible)
}
static AtkObject *
-ea_minicard_ref_child (AtkObject *accessible, gint index)
+ea_minicard_ref_child (AtkObject *accessible,
+ gint index)
{
return NULL;
}
@@ -246,7 +247,8 @@ atk_action_interface_init (AtkActionIface *iface)
}
static gboolean
-atk_action_interface_do_action (AtkAction *iface, gint i)
+atk_action_interface_do_action (AtkAction *iface,
+ gint i)
{
EMinicard *minicard = NULL;
@@ -278,13 +280,15 @@ atk_action_interface_get_n_action (AtkAction *iface)
}
static const gchar *
-atk_action_interface_get_description (AtkAction *iface, gint i)
+atk_action_interface_get_description (AtkAction *iface,
+ gint i)
{
return atk_action_interface_get_name (iface, i);
}
static const gchar *
-atk_action_interface_get_name (AtkAction *iface, gint i)
+atk_action_interface_get_name (AtkAction *iface,
+ gint i)
{
if ( i >= G_N_ELEMENTS (action_name) || i < 0)
return NULL;
diff --git a/addressbook/gui/widgets/ea-minicard.h b/addressbook/gui/widgets/ea-minicard.h
index d4c96fa787..ea27158011 100644
--- a/addressbook/gui/widgets/ea-minicard.h
+++ b/addressbook/gui/widgets/ea-minicard.h
@@ -49,7 +49,7 @@ struct _EaMinicardClass
};
GType ea_minicard_get_type (void);
-AtkObject* ea_minicard_new (GObject *obj);
+AtkObject * ea_minicard_new (GObject *obj);
G_END_DECLS
diff --git a/addressbook/gui/widgets/eab-config.c b/addressbook/gui/widgets/eab-config.c
index 5cb8d25e81..e1a0501203 100644
--- a/addressbook/gui/widgets/eab-config.c
+++ b/addressbook/gui/widgets/eab-config.c
@@ -40,7 +40,8 @@ ecp_init (EABConfig *cfg)
}
static void
-ecp_target_free (EConfig *ec, EConfigTarget *t)
+ecp_target_free (EConfig *ec,
+ EConfigTarget *t)
{
struct _EABConfigPrivate *p = EAB_CONFIG (ec)->priv;
@@ -78,13 +79,15 @@ ecp_target_free (EConfig *ec, EConfigTarget *t)
}
static void
-ecp_source_changed (struct _ESource *source, EConfig *ec)
+ecp_source_changed (ESource *source,
+ EConfig *ec)
{
e_config_target_changed (ec, E_CONFIG_TARGET_CHANGED_STATE);
}
static void
-ecp_set_target (EConfig *ec, EConfigTarget *t)
+ecp_set_target (EConfig *ec,
+ EConfigTarget *t)
{
struct _EABConfigPrivate *p = EAB_CONFIG (ec)->priv;
@@ -137,7 +140,8 @@ eab_config_get_type (void)
}
EABConfig *
-eab_config_new (gint type, const gchar *menuid)
+eab_config_new (gint type,
+ const gchar *menuid)
{
EABConfig *ecp = g_object_new (eab_config_get_type (), NULL);
e_config_construct (&ecp->config, type, menuid);
@@ -145,7 +149,8 @@ eab_config_new (gint type, const gchar *menuid)
}
EABConfigTargetSource *
-eab_config_target_new_source (EABConfig *ecp, struct _ESource *source)
+eab_config_target_new_source (EABConfig *ecp,
+ ESource *source)
{
EABConfigTargetSource *t = e_config_target_new (
&ecp->config, EAB_CONFIG_TARGET_SOURCE, sizeof (*t));
@@ -157,7 +162,8 @@ eab_config_target_new_source (EABConfig *ecp, struct _ESource *source)
}
EABConfigTargetPrefs *
-eab_config_target_new_prefs (EABConfig *ecp, GConfClient *gconf)
+eab_config_target_new_prefs (EABConfig *ecp,
+ GConfClient *gconf)
{
EABConfigTargetPrefs *t = e_config_target_new (
&ecp->config, EAB_CONFIG_TARGET_PREFS, sizeof (*t));
diff --git a/addressbook/gui/widgets/eab-config.h b/addressbook/gui/widgets/eab-config.h
index 7cf79244e2..70023360e0 100644
--- a/addressbook/gui/widgets/eab-config.h
+++ b/addressbook/gui/widgets/eab-config.h
@@ -25,6 +25,7 @@
#define __EAB_CONFIG_H__
#include <gconf/gconf-client.h>
+#include <libedataserver/e-source.h>
#include "e-util/e-config.h"
#define EAB_TYPE_CONFIG (eab_config_get_type ())
@@ -56,7 +57,7 @@ typedef struct _EABConfigTargetSource EABConfigTargetSource;
struct _EABConfigTargetSource {
EConfigTarget target;
- struct _ESource *source;
+ ESource *source;
};
typedef struct _EABConfigTargetPrefs EABConfigTargetPrefs;
@@ -73,7 +74,7 @@ typedef struct _EConfigItem EABConfigItem;
GType eab_config_get_type (void);
EABConfig *eab_config_new (gint type, const gchar *menuid);
-EABConfigTargetSource *eab_config_target_new_source (EABConfig *ecp, struct _ESource *source);
+EABConfigTargetSource *eab_config_target_new_source (EABConfig *ecp, ESource *source);
EABConfigTargetPrefs *eab_config_target_new_prefs (EABConfig *ecp, GConfClient *gconf);
G_END_DECLS
diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c
index 56a2511d64..da558352bb 100644
--- a/addressbook/gui/widgets/eab-contact-display.c
+++ b/addressbook/gui/widgets/eab-contact-display.c
@@ -52,7 +52,7 @@ struct _EABContactDisplayPrivate {
GtkOrientation orientation;
gboolean show_maps;
- GHashTable *closed_lists; /* see render_contact_list_* */
+ GHashTable *closed_lists; /* see render_contact_list_ * */
};
enum {
@@ -193,7 +193,9 @@ static GtkActionEntry internal_mailto_entries[] = {
};
static void
-render_address_link (GString *buffer, EContact *contact, gint map_type)
+render_address_link (GString *buffer,
+ EContact *contact,
+ gint map_type)
{
EContactAddress *adr;
GString *link = g_string_new ("");
@@ -366,8 +368,7 @@ accum_multival_attribute (GString *buffer,
GList *val_list, *l;
/* Workaround till bug [1] is fixed.
- [1] https://bugzilla.gnome.org/show_bug.cgi?id=473862
- */
+ * [1] https://bugzilla.gnome.org/show_bug.cgi?id=473862 */
icon = NULL;
val_list = e_contact_get (contact, field);
@@ -409,7 +410,8 @@ get_email_location (EVCardAttribute *attr)
}
static void
-render_title_block (GString *buffer, EContact *contact)
+render_title_block (GString *buffer,
+ EContact *contact)
{
const gchar *str;
gchar *html;
@@ -455,9 +457,9 @@ render_title_block (GString *buffer, EContact *contact)
static void
render_contact_list_row (GString *buffer,
- EDestination *destination,
- EABContactDisplay *display)
- {
+ EDestination *destination,
+ EABContactDisplay *display)
+{
gchar *evolution_imagesdir = g_filename_to_uri (EVOLUTION_IMAGESDIR, NULL, NULL);
gboolean list_collapsed = FALSE;
const gchar *listId = e_destination_get_contact_uid (destination), *textrep;
@@ -576,13 +578,14 @@ render_contact_list (GString *buffer,
}
static void
-render_contact_block (GString *buffer, EContact *contact)
+render_contact_block (GString *buffer,
+ EContact *contact)
{
GString *accum;
GList *email_list, *l, *email_attr_list, *al;
gint email_num = 0;
const gchar *nl;
- gchar *nick=NULL;
+ gchar *nick = NULL;
accum = g_string_new ("");
nl = "";
@@ -592,7 +595,7 @@ render_contact_block (GString *buffer, EContact *contact)
email_list = e_contact_get (contact, E_CONTACT_EMAIL);
email_attr_list = e_contact_get_attributes (contact, E_CONTACT_EMAIL);
- for (l = email_list, al=email_attr_list; l && al; l = l->next, al = al->next) {
+ for (l = email_list, al = email_attr_list; l && al; l = l->next, al = al->next) {
gchar *name = NULL, *mail = NULL;
gchar *attr_str = (gchar *) get_email_location ((EVCardAttribute *) al->data);
@@ -669,7 +672,8 @@ render_contact_block (GString *buffer, EContact *contact)
}
static void
-render_work_block (GString *buffer, EContact *contact)
+render_work_block (GString *buffer,
+ EContact *contact)
{
GString *accum = g_string_new ("");
@@ -696,7 +700,8 @@ render_work_block (GString *buffer, EContact *contact)
}
static void
-render_personal_block (GString *buffer, EContact *contact)
+render_personal_block (GString *buffer,
+ EContact *contact)
{
GString *accum = g_string_new ("");
@@ -719,7 +724,8 @@ render_personal_block (GString *buffer, EContact *contact)
}
static void
-render_note_block (GString *buffer, EContact *contact)
+render_note_block (GString *buffer,
+ EContact *contact)
{
const gchar *str;
gchar *html;
@@ -738,7 +744,9 @@ render_note_block (GString *buffer, EContact *contact)
}
static void
-render_address_map (GString *buffer, EContact *contact, gint map_type)
+render_address_map (GString *buffer,
+ EContact *contact,
+ gint map_type)
{
#ifdef WITH_CONTACT_MAPS
if (map_type == E_CONTACT_ADDRESS_WORK) {
@@ -750,7 +758,9 @@ render_address_map (GString *buffer, EContact *contact, gint map_type)
}
static void
-render_contact_horizontal (GString *buffer, EContact *contact, gboolean show_maps)
+render_contact_horizontal (GString *buffer,
+ EContact *contact,
+ gboolean show_maps)
{
g_string_append (buffer, "<table border=\"0\">");
render_title_block (buffer, contact);
@@ -776,7 +786,9 @@ render_contact_horizontal (GString *buffer, EContact *contact, gboolean show_map
}
static void
-render_contact_vertical (GString *buffer, EContact *contact, gboolean show_maps)
+render_contact_vertical (GString *buffer,
+ EContact *contact,
+ gboolean show_maps)
{
/* First row: photo & name */
g_string_append (buffer, "<tr><td colspan=\"3\">");
@@ -817,7 +829,10 @@ render_contact_vertical (GString *buffer, EContact *contact, gboolean show_maps)
}
static void
-render_contact (GString *buffer, EContact *contact, GtkOrientation orientation, gboolean show_maps)
+render_contact (GString *buffer,
+ EContact *contact,
+ GtkOrientation orientation,
+ gboolean show_maps)
{
if (orientation == GTK_ORIENTATION_VERTICAL)
render_contact_vertical (buffer, contact, show_maps);
@@ -911,9 +926,9 @@ eab_contact_display_render_compact (EABContactDisplay *display,
GdkPixbuf *pixbuf;
/* figure out if we need to downscale the
- image here. we don't scale the pixbuf
- itself, just insert width/height tags in
- the html */
+ * image here. we don't scale the pixbuf
+ * itself, just insert width/height tags in
+ * the html */
gdk_pixbuf_loader_write (loader, photo->data.inlined.data, photo->data.inlined.length, NULL);
gdk_pixbuf_loader_close (loader, NULL);
pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
@@ -1259,7 +1274,7 @@ contact_display_link_clicked (EWebView *web_view,
contact_display_emit_send_message (display, index);
return;
} else if (g_str_has_prefix (uri, "##") && g_str_has_suffix (uri, "##")) {
- gchar *list_id = g_strndup (uri+2, strlen (uri) - 4);
+ gchar *list_id = g_strndup (uri + 2, strlen (uri) - 4);
if (g_hash_table_lookup (display->priv->closed_lists, list_id)) {
g_hash_table_remove (display->priv->closed_lists, list_id);
@@ -1278,19 +1293,21 @@ contact_display_link_clicked (EWebView *web_view,
}
#ifdef WITH_CONTACT_MAPS
-/**
- * Clutter event handling workaround. Clutter-gtk propagates events down to parent widgets.
- * In this case it leads to GtkHTML scrolling up and down while user's trying to zoom in the
- * champlain widget. This workaround stops the propagation from map widget down to GtkHTML
- */
+/* XXX Clutter event handling workaround. Clutter-gtk propagates events down
+ * to parent widgets. In this case it leads to GtkHTML scrolling up and
+ * down while user's trying to zoom in the champlain widget. This
+ * workaround stops the propagation from map widget down to GtkHTML. */
static gboolean
-handle_map_scroll_event (GtkWidget *widget, GdkEvent *event)
+handle_map_scroll_event (GtkWidget *widget,
+ GdkEvent *event)
{
return TRUE;
}
static void
-contact_display_object_requested (GtkHTML *html, GtkHTMLEmbedded *eb, EABContactDisplay *display)
+contact_display_object_requested (GtkHTML *html,
+ GtkHTMLEmbedded *eb,
+ EABContactDisplay *display)
{
EContact *contact = display->priv->contact;
const gchar *name = e_contact_get_const (contact, E_CONTACT_FILE_AS);
@@ -1587,7 +1604,8 @@ eab_contact_display_get_orientation (EABContactDisplay *display)
}
void
-eab_contact_display_set_orientation (EABContactDisplay *display, GtkOrientation orientation)
+eab_contact_display_set_orientation (EABContactDisplay *display,
+ GtkOrientation orientation)
{
EABContactDisplayMode mode;
EContact *contact;
@@ -1620,7 +1638,8 @@ eab_contact_display_get_show_maps (EABContactDisplay *display)
}
void
-eab_contact_display_set_show_maps (EABContactDisplay *display, gboolean show_maps)
+eab_contact_display_set_show_maps (EABContactDisplay *display,
+ gboolean show_maps)
{
EABContactDisplayMode mode;
EContact *contact;
diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c
index d910b339b4..c951b290c7 100644
--- a/addressbook/gui/widgets/eab-gui-util.c
+++ b/addressbook/gui/widgets/eab-gui-util.c
@@ -83,23 +83,29 @@ typedef enum {
} AddressFormat;
void
-eab_error_dialog (EAlertSink *alert_sink, const gchar *msg, const GError *error)
+eab_error_dialog (EAlertSink *alert_sink,
+ const gchar *msg,
+ const GError *error)
{
if (error && error->message) {
if (alert_sink)
- e_alert_submit (alert_sink,
- "addressbook:generic-error",
- msg, error->message, NULL);
+ e_alert_submit (
+ alert_sink,
+ "addressbook:generic-error",
+ msg, error->message, NULL);
else
e_alert_run_dialog_for_args (
- e_shell_get_active_window (NULL),
- "addressbook:generic-error",
- msg, error->message, NULL);
+ e_shell_get_active_window (NULL),
+ "addressbook:generic-error",
+ msg, error->message, NULL);
}
}
void
-eab_load_error_dialog (GtkWidget *parent, EAlertSink *alert_sink, ESource *source, const GError *error)
+eab_load_error_dialog (GtkWidget *parent,
+ EAlertSink *alert_sink,
+ ESource *source,
+ const GError *error)
{
gchar *label_string, *label = NULL, *uri;
gboolean can_detail_error = TRUE;
@@ -110,10 +116,12 @@ eab_load_error_dialog (GtkWidget *parent, EAlertSink *alert_sink, ESource *sourc
if (g_error_matches (error, E_CLIENT_ERROR, E_CLIENT_ERROR_OFFLINE_UNAVAILABLE)) {
can_detail_error = FALSE;
- label_string = _("This address book cannot be opened. This either means this "
- "book is not marked for offline usage or not yet downloaded "
- "for offline usage. Please load the address book once in online mode "
- "to download its contents.");
+ label_string =
+ _("This address book cannot be opened. This either "
+ "means this book is not marked for offline usage "
+ "or not yet downloaded for offline usage. Please "
+ "load the address book once in online mode to "
+ "download its contents.");
}
else if (uri && g_str_has_prefix (uri, "local:")) {
@@ -187,7 +195,8 @@ eab_load_error_dialog (GtkWidget *parent, EAlertSink *alert_sink, ESource *sourc
}
void
-eab_search_result_dialog (EAlertSink *alert_sink, const GError *error)
+eab_search_result_dialog (EAlertSink *alert_sink,
+ const GError *error)
{
gchar *str = NULL;
@@ -265,7 +274,8 @@ make_safe_filename (gchar *name)
}
static void
-source_selection_changed_cb (ESourceSelector *selector, GtkWidget *ok_button)
+source_selection_changed_cb (ESourceSelector *selector,
+ GtkWidget *ok_button)
{
ESource *except_source = NULL, *selected;
@@ -276,7 +286,11 @@ source_selection_changed_cb (ESourceSelector *selector, GtkWidget *ok_button)
}
ESource *
-eab_select_source (ESource *except_source, const gchar *title, const gchar *message, const gchar *select_uid, GtkWindow *parent)
+eab_select_source (ESource *except_source,
+ const gchar *title,
+ const gchar *message,
+ const gchar *select_uid,
+ GtkWindow *parent)
{
ESource *source;
ESourceList *source_list;
@@ -395,7 +409,8 @@ remove_contact_ready_cb (GObject *source_object,
}
static void
-do_delete_from_source (gpointer data, gpointer user_data)
+do_delete_from_source (gpointer data,
+ gpointer user_data)
{
ContactCopyProcess *process = user_data;
EContact *contact = data;
@@ -441,7 +456,10 @@ process_unref (ContactCopyProcess *process)
}
static void
-contact_added_cb (EBookClient *book_client, const GError *error, const gchar *id, gpointer user_data)
+contact_added_cb (EBookClient *book_client,
+ const GError *error,
+ const gchar *id,
+ gpointer user_data)
{
ContactCopyProcess *process = user_data;
@@ -462,7 +480,8 @@ contact_added_cb (EBookClient *book_client, const GError *error, const gchar *id
}
static void
-do_copy (gpointer data, gpointer user_data)
+do_copy (gpointer data,
+ gpointer user_data)
{
EBookClient *book_client;
EContact *contact;
@@ -568,11 +587,12 @@ eab_transfer_contacts (EBookClient *source_client,
}
/* To parse something like...
-=?UTF-8?Q?=E0=A4=95=E0=A4=95=E0=A4=AC=E0=A5=82=E0=A5=8B=E0=A5=87?=\t\n=?UTF-8?Q?=E0=A4=B0?=\t\n<aa@aa.ccom>
-and return the decoded representation of name & email parts.
-*/
+ * =?UTF-8?Q?=E0=A4=95=E0=A4=95=E0=A4=AC=E0=A5=82=E0=A5=8B=E0=A5=87?=\t\n=?UTF-8?Q?=E0=A4=B0?=\t\n<aa@aa.ccom>
+ * and return the decoded representation of name & email parts. */
gboolean
-eab_parse_qp_email (const gchar *string, gchar **name, gchar **email)
+eab_parse_qp_email (const gchar *string,
+ gchar **name,
+ gchar **email)
{
struct _camel_header_address *address;
gboolean res = FALSE;
@@ -595,9 +615,9 @@ eab_parse_qp_email (const gchar *string, gchar **name, gchar **email)
}
/* This is only wrapper to parse_qp_mail, it decodes string and if returned TRUE,
- then makes one string and returns it, otherwise returns NULL.
- Returned string is usable to place directly into GtkHtml stream.
- Returned value should be freed with g_free. */
+ * then makes one string and returns it, otherwise returns NULL.
+ * Returned string is usable to place directly into GtkHtml stream.
+ * Returned value should be freed with g_free. */
gchar *
eab_parse_qp_email_to_html (const gchar *string)
{
@@ -731,7 +751,7 @@ country_to_ISO (const gchar *country)
}
/* If we get here, then no match was found in the map file and we
- fallback to local system locales */
+ * fallback to local system locales */
fclose (file);
pair = get_locales ();
@@ -748,8 +768,8 @@ country_to_ISO (const gchar *country)
*/
static gchar *
get_key_file_locale_string (GKeyFile *key_file,
- const gchar *key,
- const gchar *locale)
+ const gchar *key,
+ const gchar *locale)
{
gchar *result;
gchar *group;
@@ -773,9 +793,9 @@ get_key_file_locale_string (GKeyFile *key_file,
static void
get_address_format (AddressFormat address_format,
- const gchar *locale,
- gchar **format,
- gchar **country_position)
+ const gchar *locale,
+ gchar **format,
+ gchar **country_position)
{
GKeyFile *key_file;
GError *error;
@@ -858,7 +878,8 @@ find_balanced_bracket (const gchar *str)
}
static GString *
-string_append_upper (GString *str, const gchar *c)
+string_append_upper (GString *str,
+ const gchar *c)
{
gchar *up_c;
@@ -876,10 +897,10 @@ string_append_upper (GString *str, const gchar *c)
static gboolean
parse_address_template_section (const gchar *format,
- const gchar *realname,
- const gchar *org_name,
- EContactAddress *address,
- gchar **result)
+ const gchar *realname,
+ const gchar *org_name,
+ EContactAddress *address,
+ gchar **result)
{
const gchar *pos, *old_pos;
@@ -1026,7 +1047,7 @@ parse_address_template_section (const gchar *format,
gchar *
eab_format_address (EContact *contact,
- EContactField address_type)
+ EContactField address_type)
{
gchar *result;
gchar *format = NULL;
@@ -1063,7 +1084,7 @@ eab_format_address (EContact *contact,
}
/* Expand all the variables in format.
- Don't display organization in home address */
+ * Don't display organization in home address */
parse_address_template_section (format,
e_contact_get_const (contact, E_CONTACT_FULL_NAME),
(address_type == E_CONTACT_ADDRESS_WORK) ? e_contact_get_const (contact, E_CONTACT_ORG): NULL,
@@ -1071,7 +1092,7 @@ eab_format_address (EContact *contact,
&result);
/* Add the country line. In some countries, the address can be located above the
- rest of the address */
+ * rest of the address */
if (addr->country && country_position) {
gchar *country_upper = g_utf8_strup (addr->country, -1);
gchar *p = result;
diff --git a/addressbook/gui/widgets/gal-view-minicard.c b/addressbook/gui/widgets/gal-view-minicard.c
index 6033b34758..280ae7583f 100644
--- a/addressbook/gui/widgets/gal-view-minicard.c
+++ b/addressbook/gui/widgets/gal-view-minicard.c
@@ -236,8 +236,8 @@ gal_view_minicard_new (const gchar *title)
* Returns: The GalViewMinicard.
*/
GalView *
-gal_view_minicard_construct (GalViewMinicard *view,
- const gchar *title)
+gal_view_minicard_construct (GalViewMinicard *view,
+ const gchar *title)
{
view->title = g_strdup (title);
diff --git a/addressbook/importers/evolution-addressbook-importers.h b/addressbook/importers/evolution-addressbook-importers.h
index e4579cbc4e..0ba2c9b6f4 100644
--- a/addressbook/importers/evolution-addressbook-importers.h
+++ b/addressbook/importers/evolution-addressbook-importers.h
@@ -18,6 +18,8 @@
*
*/
+#include <gtk/gtk.h>
+
struct _EImportImporter *evolution_ldif_importer_peek (void);
struct _EImportImporter *evolution_vcard_importer_peek (void);
struct _EImportImporter *evolution_csv_outlook_importer_peek (void);
@@ -25,4 +27,4 @@ struct _EImportImporter *evolution_csv_mozilla_importer_peek (void);
struct _EImportImporter *evolution_csv_evolution_importer_peek (void);
/* private utility function for importers only */
-struct _GtkWidget *evolution_contact_importer_get_preview_widget (const GSList *contacts);
+GtkWidget *evolution_contact_importer_get_preview_widget (const GSList *contacts);
diff --git a/addressbook/importers/evolution-csv-importer.c b/addressbook/importers/evolution-csv-importer.c
index 43e9339a81..f41a806940 100644
--- a/addressbook/importers/evolution-csv-importer.c
+++ b/addressbook/importers/evolution-csv-importer.c
@@ -270,7 +270,9 @@ static import_fields csv_fields_evolution[] = {
};
static void
-add_to_notes (EContact *contact, const gchar *field_text, gchar *val)
+add_to_notes (EContact *contact,
+ const gchar *field_text,
+ gchar *val)
{
GString *new_text;
@@ -289,32 +291,32 @@ add_to_notes (EContact *contact, const gchar *field_text, gchar *val)
}
/* @str: a date string in the format MM-DD-YYYY or MMDDYYYY */
-static EContactDate*
+static EContactDate *
date_from_string (const gchar *str)
{
- EContactDate* date;
+ EContactDate * date;
gint i = 0;
g_return_val_if_fail (str != NULL, NULL);
date = e_contact_date_new ();
- if (g_ascii_isdigit (str[i]) && g_ascii_isdigit (str[i+1])) {
- date->month = str[i] * 10 + str[i+1] - '0' * 11;
- i = i+3;
+ if (g_ascii_isdigit (str[i]) && g_ascii_isdigit (str[i + 1])) {
+ date->month = str[i] * 10 + str[i + 1] - '0' * 11;
+ i = i + 3;
}
else {
date->month = str[i] - '0' * 1;
- i = i+2;
+ i = i + 2;
}
- if (g_ascii_isdigit (str[i]) && g_ascii_isdigit (str[i+1])) {
- date->day = str[i] * 10 + str[i+1] - '0' * 11;
- i = i+3;
+ if (g_ascii_isdigit (str[i]) && g_ascii_isdigit (str[i + 1])) {
+ date->day = str[i] * 10 + str[i + 1] - '0' * 11;
+ i = i + 3;
}
else {
date->day = str[i] - '0' * 1;
- i = i+2;
+ i = i + 2;
}
date->year = str[i] * 1000 + str[i + 1] * 100 +
str[i + 2] * 10 + str[i + 3] - '0' * 1111;
@@ -364,7 +366,8 @@ parseNextValue (const gchar **pptr)
}
static GHashTable *
-map_fields (const gchar *header_line, gint pimporter)
+map_fields (const gchar *header_line,
+ gint pimporter)
{
import_fields *fields_array = NULL;
gint n_fields = -1, idx, j;
@@ -417,8 +420,10 @@ map_fields (const gchar *header_line, gint pimporter)
}
static gboolean
-parseLine (CSVImporter *gci, EContact *contact, gchar *buf) {
-
+parseLine (CSVImporter *gci,
+ EContact *contact,
+ gchar *buf)
+{
const gchar *pptr = buf, *field_text;
gchar *do_free = NULL;
GString *value;
@@ -501,69 +506,69 @@ parseLine (CSVImporter *gci, EContact *contact, gchar *buf) {
else {
switch (flags) {
- case FLAG_HOME_ADDRESS|FLAG_STREET:
+ case FLAG_HOME_ADDRESS | FLAG_STREET:
if (strlen (home_street->str) != 0) {
home_street = g_string_append(home_street, ",\n");
}
home_street = g_string_append (home_street, value->str);
break;
- case FLAG_HOME_ADDRESS|FLAG_CITY:
+ case FLAG_HOME_ADDRESS | FLAG_CITY:
home_address->locality = g_strdup (value->str);
break;
- case FLAG_HOME_ADDRESS|FLAG_STATE:
+ case FLAG_HOME_ADDRESS | FLAG_STATE:
home_address->region = g_strdup (value->str);
break;
- case FLAG_HOME_ADDRESS|FLAG_POSTAL_CODE:
+ case FLAG_HOME_ADDRESS | FLAG_POSTAL_CODE:
home_address->code = g_strdup (value->str);
break;
- case FLAG_HOME_ADDRESS|FLAG_POBOX:
+ case FLAG_HOME_ADDRESS | FLAG_POBOX:
home_address->po = g_strdup (value->str);
break;
- case FLAG_HOME_ADDRESS|FLAG_COUNTRY:
+ case FLAG_HOME_ADDRESS | FLAG_COUNTRY:
home_address->country = g_strdup (value->str);
break;
- case FLAG_WORK_ADDRESS|FLAG_STREET:
+ case FLAG_WORK_ADDRESS | FLAG_STREET:
if (strlen (work_street->str) != 0) {
work_street = g_string_append(work_street, ",\n");
}
work_street = g_string_append (work_street, value->str);
break;
- case FLAG_WORK_ADDRESS|FLAG_CITY:
+ case FLAG_WORK_ADDRESS | FLAG_CITY:
work_address->locality = g_strdup (value->str);
break;
- case FLAG_WORK_ADDRESS|FLAG_STATE:
+ case FLAG_WORK_ADDRESS | FLAG_STATE:
work_address->region = g_strdup (value->str);
break;
- case FLAG_WORK_ADDRESS|FLAG_POSTAL_CODE:
+ case FLAG_WORK_ADDRESS | FLAG_POSTAL_CODE:
work_address->code = g_strdup (value->str);
break;
- case FLAG_WORK_ADDRESS|FLAG_POBOX:
+ case FLAG_WORK_ADDRESS | FLAG_POBOX:
work_address->po = g_strdup (value->str);
break;
- case FLAG_WORK_ADDRESS|FLAG_COUNTRY:
+ case FLAG_WORK_ADDRESS | FLAG_COUNTRY:
work_address->country = g_strdup (value->str);
break;
- case FLAG_OTHER_ADDRESS|FLAG_STREET:
+ case FLAG_OTHER_ADDRESS | FLAG_STREET:
if (strlen (other_street->str) != 0) {
other_street = g_string_append(other_street, ",\n");
}
other_street = g_string_append (other_street, value->str);
break;
- case FLAG_OTHER_ADDRESS|FLAG_CITY:
+ case FLAG_OTHER_ADDRESS | FLAG_CITY:
other_address->locality = g_strdup (value->str);
break;
- case FLAG_OTHER_ADDRESS|FLAG_STATE:
+ case FLAG_OTHER_ADDRESS | FLAG_STATE:
other_address->region = g_strdup (value->str);
break;
- case FLAG_OTHER_ADDRESS|FLAG_POSTAL_CODE:
+ case FLAG_OTHER_ADDRESS | FLAG_POSTAL_CODE:
other_address->code = g_strdup (value->str);
break;
- case FLAG_OTHER_ADDRESS|FLAG_POBOX:
+ case FLAG_OTHER_ADDRESS | FLAG_POBOX:
other_address->po = g_strdup (value->str);
break;
- case FLAG_OTHER_ADDRESS|FLAG_COUNTRY:
+ case FLAG_OTHER_ADDRESS | FLAG_COUNTRY:
other_address->country = g_strdup (value->str);
break;
@@ -634,7 +639,9 @@ parseLine (CSVImporter *gci, EContact *contact, gchar *buf) {
}
static EContact *
-getNextCSVEntry (CSVImporter *gci, FILE *f) {
+getNextCSVEntry (CSVImporter *gci,
+ FILE *f)
+{
EContact *contact = NULL;
GString *line;
GString *str;
@@ -745,15 +752,19 @@ csv_import_contacts (gpointer d)
}
static void
-primary_selection_changed_cb (ESourceSelector *selector, EImportTarget *target)
+primary_selection_changed_cb (ESourceSelector *selector,
+ EImportTarget *target)
{
- g_datalist_set_data_full(&target->data, "csv-source",
- g_object_ref (e_source_selector_get_primary_selection (selector)),
- g_object_unref);
+ g_datalist_set_data_full (
+ &target->data, "csv-source",
+ g_object_ref (e_source_selector_get_primary_selection (selector)),
+ g_object_unref);
}
static GtkWidget *
-csv_getwidget (EImport *ei, EImportTarget *target, EImportImporter *im)
+csv_getwidget (EImport *ei,
+ EImportTarget *target,
+ EImportImporter *im)
{
GtkWidget *vbox, *selector;
ESource *primary;
@@ -792,7 +803,9 @@ static const gchar *supported_extensions[4] = {
};
static gboolean
-csv_supported (EImport *ei, EImportTarget *target, EImportImporter *im)
+csv_supported (EImport *ei,
+ EImportTarget *target,
+ EImportImporter *im)
{
gchar *ext;
gint i;
@@ -868,7 +881,9 @@ book_loaded_cb (GObject *source_object,
}
static void
-csv_import (EImport *ei, EImportTarget *target, EImportImporter *im)
+csv_import (EImport *ei,
+ EImportTarget *target,
+ EImportImporter *im)
{
CSVImporter *gci;
ESource *source;
@@ -909,28 +924,37 @@ csv_import (EImport *ei, EImportTarget *target, EImportImporter *im)
}
static void
-outlook_csv_import (EImport *ei, EImportTarget *target, EImportImporter *im)
+outlook_csv_import (EImport *ei,
+ EImportTarget *target,
+ EImportImporter *im)
{
importer = OUTLOOK_IMPORTER;
csv_import (ei, target, im);
}
static void
-mozilla_csv_import (EImport *ei, EImportTarget *target, EImportImporter *im)
+mozilla_csv_import (EImport *ei,
+ EImportTarget *target,
+ EImportImporter *im)
{
importer = MOZILLA_IMPORTER;
csv_import (ei, target, im);
}
static void
-evolution_csv_import (EImport *ei, EImportTarget *target, EImportImporter *im)
+evolution_csv_import (EImport *ei,
+ EImportTarget *target,
+ EImportImporter *im)
{
importer = EVOLUTION_IMPORTER;
csv_import (ei, target, im);
}
static void
-csv_cancel (EImport *ei, EImportTarget *target, EImportImporter *im) {
+csv_cancel (EImport *ei,
+ EImportTarget *target,
+ EImportImporter *im)
+{
CSVImporter *gci = g_datalist_get_data(&target->data, "csv-data");
if (gci)
@@ -938,7 +962,9 @@ csv_cancel (EImport *ei, EImportTarget *target, EImportImporter *im) {
}
static GtkWidget *
-csv_get_preview (EImport *ei, EImportTarget *target, EImportImporter *im)
+csv_get_preview (EImport *ei,
+ EImportTarget *target,
+ EImportImporter *im)
{
GtkWidget *preview;
GSList *contacts = NULL;
@@ -984,21 +1010,27 @@ csv_get_preview (EImport *ei, EImportTarget *target, EImportImporter *im)
}
static GtkWidget *
-outlook_csv_get_preview (EImport *ei, EImportTarget *target, EImportImporter *im)
+outlook_csv_get_preview (EImport *ei,
+ EImportTarget *target,
+ EImportImporter *im)
{
importer = OUTLOOK_IMPORTER;
return csv_get_preview (ei, target, im);
}
static GtkWidget *
-mozilla_csv_get_preview (EImport *ei, EImportTarget *target, EImportImporter *im)
+mozilla_csv_get_preview (EImport *ei,
+ EImportTarget *target,
+ EImportImporter *im)
{
importer = MOZILLA_IMPORTER;
return csv_get_preview (ei, target, im);
}
static GtkWidget *
-evolution_csv_get_preview (EImport *ei, EImportTarget *target, EImportImporter *im)
+evolution_csv_get_preview (EImport *ei,
+ EImportTarget *target,
+ EImportImporter *im)
{
importer = EVOLUTION_IMPORTER;
return csv_get_preview (ei, target, im);
diff --git a/addressbook/importers/evolution-ldif-importer.c b/addressbook/importers/evolution-ldif-importer.c
index 72776bf2a5..8eb0c57192 100644
--- a/addressbook/importers/evolution-ldif-importer.c
+++ b/addressbook/importers/evolution-ldif-importer.c
@@ -130,7 +130,7 @@ ldif_fields[] = {
};
static GString *
-getValue ( gchar **src )
+getValue (gchar **src)
{
GString *dest = g_string_new("");
gchar *s = *src;
@@ -166,7 +166,9 @@ getValue ( gchar **src )
}
static void
-populate_contact_address (EContactAddress *address, gchar *attr, gchar *value)
+populate_contact_address (EContactAddress *address,
+ gchar *attr,
+ gchar *value)
{
if (!g_ascii_strcasecmp (attr, "locality") ||
!g_ascii_strcasecmp (attr, "l") ||
@@ -222,9 +224,11 @@ populate_contact_address (EContactAddress *address, gchar *attr, gchar *value)
}
static gboolean
-parseLine (GHashTable *dn_contact_hash, EContact *contact,
- EContactAddress *work_address, EContactAddress *home_address,
- gchar **buf)
+parseLine (GHashTable *dn_contact_hash,
+ EContact *contact,
+ EContactAddress *work_address,
+ EContactAddress *home_address,
+ gchar **buf)
{
gchar *ptr;
gchar *colon, *value;
@@ -352,7 +356,8 @@ parseLine (GHashTable *dn_contact_hash, EContact *contact,
}
static EContact *
-getNextLDIFEntry (GHashTable *dn_contact_hash, FILE *f )
+getNextLDIFEntry (GHashTable *dn_contact_hash,
+ FILE *f)
{
EContact *contact;
EContactAddress *work_address, *home_address;
@@ -410,14 +415,15 @@ getNextLDIFEntry (GHashTable *dn_contact_hash, FILE *f )
}
static void
-resolve_list_card (LDIFImporter *gci, EContact *contact)
+resolve_list_card (LDIFImporter *gci,
+ EContact *contact)
{
GList *email, *l;
GList *email_attrs = NULL;
gchar *full_name;
/* set file_as to full_name so we don't later try and figure
- out a first/last name for the list. */
+ * out a first/last name for the list. */
full_name = e_contact_get (contact, E_CONTACT_FULL_NAME);
if (full_name)
e_contact_set (contact, E_CONTACT_FILE_AS, full_name);
@@ -456,7 +462,8 @@ resolve_list_card (LDIFImporter *gci, EContact *contact)
}
static void
-add_to_notes (EContact *contact, EContactField field)
+add_to_notes (EContact *contact,
+ EContactField field)
{
const gchar *old_text;
const gchar *field_text;
@@ -488,7 +495,7 @@ ldif_import_contacts (gpointer d)
gint count = 0;
/* We process all normal cards immediately and keep the list
- ones till the end */
+ * ones till the end */
if (gci->state == 0) {
while (count < 50 && (contact = getNextLDIFEntry (
@@ -516,7 +523,7 @@ ldif_import_contacts (gpointer d)
}
}
if (gci->state == 1) {
- for (iter = gci->list_iterator;count < 50 && iter;iter=iter->next) {
+ for (iter = gci->list_iterator; count < 50 && iter; iter = iter->next) {
gchar *uid = NULL;
contact = iter->data;
@@ -543,15 +550,19 @@ ldif_import_contacts (gpointer d)
}
static void
-primary_selection_changed_cb (ESourceSelector *selector, EImportTarget *target)
+primary_selection_changed_cb (ESourceSelector *selector,
+ EImportTarget *target)
{
- g_datalist_set_data_full(&target->data, "ldif-source",
- g_object_ref (e_source_selector_get_primary_selection (selector)),
- g_object_unref);
+ g_datalist_set_data_full (
+ &target->data, "ldif-source",
+ g_object_ref (e_source_selector_get_primary_selection (selector)),
+ g_object_unref);
}
static GtkWidget *
-ldif_getwidget (EImport *ei, EImportTarget *target, EImportImporter *im)
+ldif_getwidget (EImport *ei,
+ EImportTarget *target,
+ EImportImporter *im)
{
GtkWidget *vbox, *selector;
ESource *primary;
@@ -593,7 +604,9 @@ static const gchar *supported_extensions[3] = {
};
static gboolean
-ldif_supported (EImport *ei, EImportTarget *target, EImportImporter *im)
+ldif_supported (EImport *ei,
+ EImportTarget *target,
+ EImportImporter *im)
{
gchar *ext;
gint i;
@@ -662,7 +675,9 @@ book_loaded_cb (GObject *source_object,
}
static void
-ldif_import (EImport *ei, EImportTarget *target, EImportImporter *im)
+ldif_import (EImport *ei,
+ EImportTarget *target,
+ EImportImporter *im)
{
LDIFImporter *gci;
ESource *source;
@@ -702,7 +717,9 @@ ldif_import (EImport *ei, EImportTarget *target, EImportImporter *im)
}
static void
-ldif_cancel (EImport *ei, EImportTarget *target, EImportImporter *im)
+ldif_cancel (EImport *ei,
+ EImportTarget *target,
+ EImportImporter *im)
{
LDIFImporter *gci = g_datalist_get_data(&target->data, "ldif-data");
@@ -711,7 +728,9 @@ ldif_cancel (EImport *ei, EImportTarget *target, EImportImporter *im)
}
static GtkWidget *
-ldif_get_preview (EImport *ei, EImportTarget *target, EImportImporter *im)
+ldif_get_preview (EImport *ei,
+ EImportTarget *target,
+ EImportImporter *im)
{
GtkWidget *preview;
GSList *contacts = NULL;
diff --git a/addressbook/importers/evolution-vcard-importer.c b/addressbook/importers/evolution-vcard-importer.c
index 59168d883b..cf3a429337 100644
--- a/addressbook/importers/evolution-vcard-importer.c
+++ b/addressbook/importers/evolution-vcard-importer.c
@@ -81,7 +81,8 @@ typedef struct {
static void vcard_import_done (VCardImporter *gci);
static void
-add_to_notes (EContact *contact, EContactField field)
+add_to_notes (EContact *contact,
+ EContactField field)
{
const gchar *old_text;
const gchar *field_text;
@@ -105,19 +106,20 @@ add_to_notes (EContact *contact, EContactField field)
}
static void
-vcard_import_contact (VCardImporter *gci, EContact *contact)
+vcard_import_contact (VCardImporter *gci,
+ EContact *contact)
{
EContactPhoto *photo;
GList *attrs, *attr;
gchar *uid = NULL;
/* Apple's addressbook.app exports PHOTO's without a TYPE
- param, so let's figure out the format here if there's a
- PHOTO attribute missing a TYPE param.
-
- this is sort of a hack, as EContact sets the type for us if
- we use the setter. so let's e_contact_get + e_contact_set
- on E_CONTACT_PHOTO.
+ * param, so let's figure out the format here if there's a
+ * PHOTO attribute missing a TYPE param.
+ *
+ * this is sort of a hack, as EContact sets the type for us if
+ * we use the setter. so let's e_contact_get + e_contact_set
+ * on E_CONTACT_PHOTO.
*/
photo = e_contact_get (contact, E_CONTACT_PHOTO);
if (photo) {
@@ -144,12 +146,11 @@ vcard_import_contact (VCardImporter *gci, EContact *contact)
}
e_contact_set_attributes (contact, E_CONTACT_EMAIL, attrs);
- /*
- Deal with TEL attributes that don't conform to what we need.
-
- 1. if there's no location (HOME/WORK/OTHER), default to OTHER.
- 2. if there's *only* a location specified, default to VOICE.
- */
+ /* Deal with TEL attributes that don't conform to what we need.
+ *
+ * 1. if there's no location (HOME/WORK/OTHER), default to OTHER.
+ * 2. if there's *only* a location specified, default to VOICE.
+ */
attrs = e_vcard_get_attributes (E_VCARD (contact));
for (attr = attrs; attr; attr = attr->next) {
EVCardAttribute *a = attr->data;
@@ -188,7 +189,7 @@ vcard_import_contact (VCardImporter *gci, EContact *contact)
if (is_work_home) {
/* only WORK and HOME phone numbers require locations,
- the rest should be kept as is */
+ * the rest should be kept as is */
if (location_only) {
/* add VOICE */
e_vcard_attribute_add_param_with_value (a,
@@ -204,11 +205,8 @@ vcard_import_contact (VCardImporter *gci, EContact *contact)
}
}
- /*
- Deal with ADR and EMAIL attributes that don't conform to what we need.
-
- if HOME or WORK isn't specified, add TYPE=OTHER.
- */
+ /* Deal with ADR and EMAIL attributes that don't conform to what
+ * we need. If HOME or WORK isn't specified, add TYPE=OTHER. */
attrs = e_vcard_get_attributes (E_VCARD (contact));
for (attr = attrs; attr; attr = attr->next) {
EVCardAttribute *a = attr->data;
@@ -361,8 +359,8 @@ guess_vcard_encoding (const gchar *filename)
}
fclose (handle);
- if (has_bom ((gunichar2*) line)) {
- gunichar2 *utf16 = (gunichar2*) line;
+ if (has_bom ((gunichar2 *) line)) {
+ gunichar2 *utf16 = (gunichar2 *) line;
/* Check for a BOM to try to detect UTF-16 encoded vcards
* (MacOSX address book creates such vcards for example)
*/
@@ -391,15 +389,19 @@ guess_vcard_encoding (const gchar *filename)
}
static void
-primary_selection_changed_cb (ESourceSelector *selector, EImportTarget *target)
+primary_selection_changed_cb (ESourceSelector *selector,
+ EImportTarget *target)
{
- g_datalist_set_data_full(&target->data, "vcard-source",
- g_object_ref (e_source_selector_get_primary_selection (selector)),
- g_object_unref);
+ g_datalist_set_data_full (
+ &target->data, "vcard-source",
+ g_object_ref (e_source_selector_get_primary_selection (selector)),
+ g_object_unref);
}
static GtkWidget *
-vcard_getwidget (EImport *ei, EImportTarget *target, EImportImporter *im)
+vcard_getwidget (EImport *ei,
+ EImportTarget *target,
+ EImportImporter *im)
{
GtkWidget *vbox, *selector;
ESource *primary;
@@ -437,7 +439,9 @@ vcard_getwidget (EImport *ei, EImportTarget *target, EImportImporter *im)
}
static gboolean
-vcard_supported (EImport *ei, EImportTarget *target, EImportImporter *im)
+vcard_supported (EImport *ei,
+ EImportTarget *target,
+ EImportImporter *im)
{
EImportTargetURI *s;
gchar *filename;
@@ -498,7 +502,7 @@ book_loaded_cb (GObject *source_object,
if (gci->encoding == VCARD_ENCODING_UTF16) {
gchar *tmp;
- gunichar2 *contents_utf16 = (gunichar2*) gci->contents;
+ gunichar2 *contents_utf16 = (gunichar2 *) gci->contents;
tmp = utf16_to_utf8 (contents_utf16);
g_free (gci->contents);
gci->contents = tmp;
@@ -523,7 +527,9 @@ book_loaded_cb (GObject *source_object,
}
static void
-vcard_import (EImport *ei, EImportTarget *target, EImportImporter *im)
+vcard_import (EImport *ei,
+ EImportTarget *target,
+ EImportImporter *im)
{
VCardImporter *gci;
ESource *source;
@@ -570,7 +576,9 @@ vcard_import (EImport *ei, EImportTarget *target, EImportImporter *im)
}
static void
-vcard_cancel (EImport *ei, EImportTarget *target, EImportImporter *im)
+vcard_cancel (EImport *ei,
+ EImportTarget *target,
+ EImportImporter *im)
{
VCardImporter *gci = g_datalist_get_data(&target->data, "vcard-data");
@@ -579,7 +587,9 @@ vcard_cancel (EImport *ei, EImportTarget *target, EImportImporter *im)
}
static GtkWidget *
-vcard_get_preview (EImport *ei, EImportTarget *target, EImportImporter *im)
+vcard_get_preview (EImport *ei,
+ EImportTarget *target,
+ EImportImporter *im)
{
GtkWidget *preview;
GSList *contacts;
@@ -653,7 +663,8 @@ evolution_vcard_importer_peek (void)
/* utility functions shared between all contact importers */
static void
-preview_contact (EWebViewPreview *preview, EContact *contact)
+preview_contact (EWebViewPreview *preview,
+ EContact *contact)
{
gint idx;
gboolean had_value = FALSE;
@@ -888,7 +899,8 @@ preview_contact (EWebViewPreview *preview, EContact *contact)
}
static void
-preview_selection_changed_cb (GtkTreeSelection *selection, EWebViewPreview *preview)
+preview_selection_changed_cb (GtkTreeSelection *selection,
+ EWebViewPreview *preview)
{
GtkTreeIter iter;
GtkTreeModel *model = NULL;
diff --git a/addressbook/printing/e-contact-print.c b/addressbook/printing/e-contact-print.c
index 7719533fdd..0aac4a7530 100644
--- a/addressbook/printing/e-contact-print.c
+++ b/addressbook/printing/e-contact-print.c
@@ -104,7 +104,9 @@ get_font_width (GtkPrintContext *context,
static void
e_contact_output (GtkPrintContext *context,
PangoFontDescription *font,
- gdouble x, gdouble y, gdouble width,
+ gdouble x,
+ gdouble y,
+ gdouble width,
const gchar *text)
{
PangoLayout *layout;
@@ -184,7 +186,7 @@ e_contact_print_letter_heading (EContactPrintContext *ctxt,
if (ctxt->page_nr == -1 || ctxt->pages != ctxt->page_nr) {
/* only calculating number of pages
- or on page we do not want to print */
+ * or on page we do not want to print */
ctxt->y += pango_units_to_double (height);
return;
@@ -319,7 +321,7 @@ e_contact_print_contact (EContact *contact,
{
const gchar *value;
gchar *text;
- gint wrapped_lines=0;
+ gint wrapped_lines = 0;
if (ctxt->y > page_height)
e_contact_start_new_column (ctxt);
@@ -341,7 +343,7 @@ e_contact_print_contact (EContact *contact,
wrapped_lines =
(get_font_width (ctxt->context,
ctxt->style->body_font, text) /
- (ctxt->column_width+4)) + 1;
+ (ctxt->column_width + 4)) + 1;
ctxt->y =
ctxt->y + ((wrapped_lines + 1) *
e_contact_text_height (ctxt->context,
@@ -431,7 +433,8 @@ get_bool (gchar *data)
}
static void
-get_string (gchar *data, gchar **variable)
+get_string (gchar *data,
+ gchar **variable)
{
g_free (*variable);
*variable = g_strdup ((data != NULL) ? data : "");
@@ -727,8 +730,8 @@ contact_page_draw_footer (GtkPrintOperation *operation,
pango_layout_set_text (layout, text, -1);
pango_layout_set_width (layout, -1);
- x = page_width/2.0 - page_margin;
- y = page_height - page_margin/2.0;
+ x = page_width / 2.0 - page_margin;
+ y = page_height - page_margin / 2.0;
cr = gtk_print_context_get_cairo_context (context);
diff --git a/addressbook/printing/test-print.c b/addressbook/printing/test-print.c
index 7747318175..6f461959c3 100644
--- a/addressbook/printing/test-print.c
+++ b/addressbook/printing/test-print.c
@@ -29,7 +29,8 @@
#include "e-contact-print.h"
gint
-main (gint argc, gchar *argv[])
+main (gint argc,
+ gchar *argv[])
{
GList *shown_fields = NULL;
diff --git a/addressbook/tools/evolution-addressbook-export-list-cards.c b/addressbook/tools/evolution-addressbook-export-list-cards.c
index b886b2cc32..41d2217ee1 100644
--- a/addressbook/tools/evolution-addressbook-export-list-cards.c
+++ b/addressbook/tools/evolution-addressbook-export-list-cards.c
@@ -281,7 +281,8 @@ e_contact_csv_get_name (EContactFieldCSV csv_field)
}
gchar *
-e_contact_csv_get (EContact * contact, EContactFieldCSV csv_field)
+e_contact_csv_get (EContact *contact,
+ EContactFieldCSV csv_field)
{
gint contact_field;
gchar *field_value;
@@ -399,7 +400,7 @@ e_contact_csv_get (EContact * contact, EContactFieldCSV csv_field)
}
gchar *
-e_contact_csv_get_header_line (GSList * csv_all_fields)
+e_contact_csv_get_header_line (GSList *csv_all_fields)
{
guint field_number;
@@ -429,7 +430,8 @@ e_contact_csv_get_header_line (GSList * csv_all_fields)
}
gchar *
-e_contact_to_csv (EContact * contact, GSList * csv_all_fields)
+e_contact_to_csv (EContact *contact,
+ GSList *csv_all_fields)
{
guint field_number;
gint csv_field;
@@ -458,7 +460,8 @@ e_contact_to_csv (EContact * contact, GSList * csv_all_fields)
}
gchar *
-e_contact_get_csv (EContact * contact, GSList * csv_all_fields)
+e_contact_get_csv (EContact *contact,
+ GSList *csv_all_fields)
{
gchar *aline;
@@ -467,7 +470,7 @@ e_contact_get_csv (EContact * contact, GSList * csv_all_fields)
}
gchar *
-check_null_pointer (gchar * orig)
+check_null_pointer (gchar *orig)
{
gchar *result;
if (orig == NULL)
@@ -478,7 +481,8 @@ check_null_pointer (gchar * orig)
}
gchar *
-delivery_address_get_sub_field (const EContactAddress * address, DeliveryAddressField sub_field)
+delivery_address_get_sub_field (const EContactAddress *address,
+ DeliveryAddressField sub_field)
{
gchar *sub_field_value;
gchar *str_temp, *str_temp_a;
@@ -563,7 +567,11 @@ escape_string (gchar *orig)
}
gint
-output_n_cards_file (FILE * outputfile, GSList *contacts, gint size, gint begin_no, CARD_FORMAT format)
+output_n_cards_file (FILE *outputfile,
+ GSList *contacts,
+ gint size,
+ gint begin_no,
+ CARD_FORMAT format)
{
gint i;
if (format == CARD_FORMAT_VCARD) {
@@ -617,7 +625,8 @@ fork_to_background (void)
}
static void
-action_list_cards (GSList *contacts, ActionContext * p_actctx)
+action_list_cards (GSList *contacts,
+ ActionContext *p_actctx)
{
FILE *outputfile;
long length;
@@ -711,7 +720,7 @@ action_list_cards (GSList *contacts, ActionContext * p_actctx)
}
void
-set_pre_defined_field (GSList ** pre_defined_fields)
+set_pre_defined_field (GSList **pre_defined_fields)
{
*pre_defined_fields = NULL;
*pre_defined_fields = g_slist_append (*pre_defined_fields, GINT_TO_POINTER (E_CONTACT_CSV_GIVEN_NAME));
@@ -760,7 +769,7 @@ set_pre_defined_field (GSList ** pre_defined_fields)
}
guint
-action_list_cards_init (ActionContext * p_actctx)
+action_list_cards_init (ActionContext *p_actctx)
{
EBookClient *book_client;
EBookQuery *query;
diff --git a/addressbook/tools/evolution-addressbook-export-list-folders.c b/addressbook/tools/evolution-addressbook-export-list-folders.c
index 82241f8f67..2628c9c499 100644
--- a/addressbook/tools/evolution-addressbook-export-list-folders.c
+++ b/addressbook/tools/evolution-addressbook-export-list-folders.c
@@ -32,7 +32,7 @@
#include "evolution-addressbook-export.h"
guint
-action_list_folders_init (ActionContext * p_actctx)
+action_list_folders_init (ActionContext *p_actctx)
{
ESourceList *addressbooks = NULL;
GSList *groups, *group;
diff --git a/addressbook/tools/evolution-addressbook-export.c b/addressbook/tools/evolution-addressbook-export.c
index 56a2b14a54..5460c5a8bd 100644
--- a/addressbook/tools/evolution-addressbook-export.c
+++ b/addressbook/tools/evolution-addressbook-export.c
@@ -80,7 +80,8 @@ static GOptionEntry entries[] = {
};
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
ActionContext actctx;
GOptionContext *context;
@@ -107,7 +108,7 @@ main (gint argc, gchar **argv)
p_SetProcessDEPPolicy = GetProcAddress (GetModuleHandle ("kernel32.dll"), "SetProcessDEPPolicy");
if (p_SetProcessDEPPolicy)
- (*p_SetProcessDEPPolicy) (PROCESS_DEP_ENABLE|PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION);
+ (*p_SetProcessDEPPolicy) (PROCESS_DEP_ENABLE | PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION);
}
#endif
#endif