aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-09-12 02:56:28 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-09-13 20:28:58 +0800
commitcd53ba990035bdb4861d9660917d457533d4ecb2 (patch)
treed9c9da2208f4a921c514497ea92d27e3d88481d1 /addressbook
parentb2b27cfa1bfcd6efdac30d2745a6e8cd4e6de134 (diff)
downloadgsoc2013-evolution-cd53ba990035bdb4861d9660917d457533d4ecb2.tar
gsoc2013-evolution-cd53ba990035bdb4861d9660917d457533d4ecb2.tar.gz
gsoc2013-evolution-cd53ba990035bdb4861d9660917d457533d4ecb2.tar.bz2
gsoc2013-evolution-cd53ba990035bdb4861d9660917d457533d4ecb2.tar.lz
gsoc2013-evolution-cd53ba990035bdb4861d9660917d457533d4ecb2.tar.xz
gsoc2013-evolution-cd53ba990035bdb4861d9660917d457533d4ecb2.tar.zst
gsoc2013-evolution-cd53ba990035bdb4861d9660917d457533d4ecb2.zip
Coding style cleanups.
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor-fullname.c32
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor-fullname.h2
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c92
-rw-r--r--addressbook/gui/contact-editor/eab-editor.c2
-rw-r--r--addressbook/gui/contact-editor/test-editor.c4
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-model.h2
-rw-r--r--addressbook/gui/merging/eab-contact-compare.c2
-rw-r--r--addressbook/gui/merging/eab-contact-merging.c52
-rw-r--r--addressbook/gui/widgets/e-addressbook-model.c10
-rw-r--r--addressbook/gui/widgets/e-addressbook-model.h4
-rw-r--r--addressbook/gui/widgets/e-addressbook-reflow-adapter.c70
-rw-r--r--addressbook/gui/widgets/e-addressbook-table-adapter.c56
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c24
-rw-r--r--addressbook/gui/widgets/e-minicard-label.c72
-rw-r--r--addressbook/gui/widgets/e-minicard-label.h2
-rw-r--r--addressbook/gui/widgets/e-minicard-view-widget.c78
-rw-r--r--addressbook/gui/widgets/e-minicard-view.c30
-rw-r--r--addressbook/gui/widgets/e-minicard.c204
-rw-r--r--addressbook/gui/widgets/ea-addressbook-view.c6
-rw-r--r--addressbook/gui/widgets/ea-addressbook-view.h2
-rw-r--r--addressbook/gui/widgets/ea-addressbook.c2
-rw-r--r--addressbook/gui/widgets/ea-minicard-view.c14
-rw-r--r--addressbook/gui/widgets/ea-minicard-view.h2
-rw-r--r--addressbook/gui/widgets/ea-minicard.c10
-rw-r--r--addressbook/gui/widgets/ea-minicard.h2
-rw-r--r--addressbook/gui/widgets/eab-config.c16
-rw-r--r--addressbook/gui/widgets/eab-gui-util.c4
-rw-r--r--addressbook/gui/widgets/gal-view-minicard.c2
-rw-r--r--addressbook/importers/evolution-addressbook-importers.h10
-rw-r--r--addressbook/importers/evolution-csv-importer.c192
-rw-r--r--addressbook/importers/evolution-ldif-importer.c102
-rw-r--r--addressbook/importers/evolution-vcard-importer.c58
-rw-r--r--addressbook/printing/e-contact-print.c58
-rw-r--r--addressbook/util/addressbook.c6
-rw-r--r--addressbook/util/eab-book-util.c4
35 files changed, 614 insertions, 614 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-editor-fullname.c b/addressbook/gui/contact-editor/e-contact-editor-fullname.c
index 74cf45eee3..47d7e3a3d6 100644
--- a/addressbook/gui/contact-editor/e-contact-editor-fullname.c
+++ b/addressbook/gui/contact-editor/e-contact-editor-fullname.c
@@ -28,8 +28,8 @@
#include "e-contact-editor-fullname.h"
-static void fill_in_info(EContactEditorFullname *editor);
-static void extract_info(EContactEditorFullname *editor);
+static void fill_in_info (EContactEditorFullname *editor);
+static void extract_info (EContactEditorFullname *editor);
/* The arguments we take */
enum {
@@ -55,11 +55,11 @@ e_contact_editor_fullname_set_property (GObject *object,
switch (property_id) {
case PROP_NAME:
- e_contact_name_free(e_contact_editor_fullname->name);
+ e_contact_name_free (e_contact_editor_fullname->name);
if (g_value_get_pointer (value) != NULL) {
- e_contact_editor_fullname->name = e_contact_name_copy(g_value_get_pointer (value));
- fill_in_info(e_contact_editor_fullname);
+ e_contact_editor_fullname->name = e_contact_name_copy (g_value_get_pointer (value));
+ fill_in_info (e_contact_editor_fullname);
}
else {
e_contact_editor_fullname->name = NULL;
@@ -118,8 +118,8 @@ e_contact_editor_fullname_get_property (GObject *object,
switch (property_id) {
case PROP_NAME:
- extract_info(e_contact_editor_fullname);
- g_value_set_pointer (value, e_contact_name_copy(e_contact_editor_fullname->name));
+ extract_info (e_contact_editor_fullname);
+ g_value_set_pointer (value, e_contact_name_copy (e_contact_editor_fullname->name));
break;
case PROP_EDITABLE:
g_value_set_boolean (value, e_contact_editor_fullname->editable ? TRUE : FALSE);
@@ -133,15 +133,15 @@ e_contact_editor_fullname_get_property (GObject *object,
static void
e_contact_editor_fullname_dispose (GObject *object)
{
- EContactEditorFullname *e_contact_editor_fullname = E_CONTACT_EDITOR_FULLNAME(object);
+ EContactEditorFullname *e_contact_editor_fullname = E_CONTACT_EDITOR_FULLNAME (object);
if (e_contact_editor_fullname->builder) {
- g_object_unref(e_contact_editor_fullname->builder);
+ g_object_unref (e_contact_editor_fullname->builder);
e_contact_editor_fullname->builder = NULL;
}
if (e_contact_editor_fullname->name) {
- e_contact_name_free(e_contact_editor_fullname->name);
+ e_contact_name_free (e_contact_editor_fullname->name);
e_contact_editor_fullname->name = NULL;
}
@@ -261,14 +261,14 @@ fill_in_field (EContactEditorFullname *editor,
if (entry) {
if (string)
- gtk_entry_set_text(entry, string);
+ gtk_entry_set_text (entry, string);
else
gtk_entry_set_text(entry, "");
}
}
static void
-fill_in_info(EContactEditorFullname *editor)
+fill_in_info (EContactEditorFullname *editor)
{
EContactName *name = editor->name;
if (name) {
@@ -284,7 +284,7 @@ static gchar *
extract_field (EContactEditorFullname *editor,
const gchar *field)
{
- GtkWidget *widget = e_builder_get_widget(editor->builder, field);
+ GtkWidget *widget = e_builder_get_widget (editor->builder, field);
GtkEntry *entry = NULL;
if (GTK_IS_ENTRY (widget))
@@ -293,17 +293,17 @@ extract_field (EContactEditorFullname *editor,
entry = GTK_ENTRY (gtk_bin_get_child (GTK_BIN (widget)));
if (entry)
- return g_strdup (gtk_entry_get_text(entry));
+ return g_strdup (gtk_entry_get_text (entry));
else
return NULL;
}
static void
-extract_info(EContactEditorFullname *editor)
+extract_info (EContactEditorFullname *editor)
{
EContactName *name = editor->name;
if (!name) {
- name = e_contact_name_new();
+ name = e_contact_name_new ();
editor->name = name;
}
diff --git a/addressbook/gui/contact-editor/e-contact-editor-fullname.h b/addressbook/gui/contact-editor/e-contact-editor-fullname.h
index db45b08857..8fb7acfa1e 100644
--- a/addressbook/gui/contact-editor/e-contact-editor-fullname.h
+++ b/addressbook/gui/contact-editor/e-contact-editor-fullname.h
@@ -63,7 +63,7 @@ struct _EContactEditorFullnameClass
GtkDialogClass parent_class;
};
-GtkWidget *e_contact_editor_fullname_new(const EContactName *name);
+GtkWidget *e_contact_editor_fullname_new (const EContactName *name);
GType e_contact_editor_fullname_get_type (void);
G_END_DECLS
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index 85558a2530..be5ff41fdd 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -88,7 +88,7 @@ static GtkWindow* e_contact_editor_get_window (EABEditor *editor);
static void save_contact (EContactEditor *ce, gboolean should_close);
static void entry_activated (EContactEditor *editor);
-static void set_entry_text(EContactEditor *editor, GtkEntry *entry, const gchar *string);
+static void set_entry_text (EContactEditor *editor, GtkEntry *entry, const gchar *string);
static void sensitize_ok (EContactEditor *ce);
static EABEditorClass *parent_class = NULL;
@@ -464,7 +464,7 @@ name_to_style (const EContactName *name, const gchar *company, gint style)
string = g_strjoinv(" ", strings);
break;
case 3:
- string = g_strdup(company);
+ string = g_strdup (company);
break;
case 4: /* Fall Through */
case 5:
@@ -483,7 +483,7 @@ name_to_style (const EContactName *name, const gchar *company, gint style)
string = g_strdup_printf("%s (%s)", substring, company);
else
string = g_strdup_printf("%s (%s)", company, substring);
- g_free(substring);
+ g_free (substring);
break;
default:
string = g_strdup("");
@@ -502,7 +502,7 @@ file_as_get_style (EContactEditor *editor)
const gchar *company;
gint i;
- if (!(file_as && GTK_IS_ENTRY(file_as)))
+ if (!(file_as && GTK_IS_ENTRY (file_as)))
return -1;
company = gtk_entry_get_text (GTK_ENTRY (company_w));
@@ -510,12 +510,12 @@ file_as_get_style (EContactEditor *editor)
for (i = 0; i < 6; i++) {
trystring = name_to_style (name, company, i);
- if (!strcmp(trystring, filestring)) {
- g_free(trystring);
- g_free(filestring);
+ if (!strcmp (trystring, filestring)) {
+ g_free (trystring);
+ g_free (filestring);
return i;
}
- g_free(trystring);
+ g_free (trystring);
}
g_free (filestring);
return -1;
@@ -2413,7 +2413,7 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id)
e_image_chooser_get_image_data (E_IMAGE_CHOOSER (widget),
&img_buff, &photo.data.inlined.length)) {
GdkPixbuf *pixbuf, *new;
- GdkPixbufLoader *loader = gdk_pixbuf_loader_new();
+ GdkPixbufLoader *loader = gdk_pixbuf_loader_new ();
photo.data.inlined.data = (guchar *)img_buff;
img_buff = NULL;
@@ -2449,7 +2449,7 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id)
if (new) {
GdkPixbufFormat *format = gdk_pixbuf_loader_get_format (loader);
gchar *format_name = gdk_pixbuf_format_get_name (format);
- g_free(photo.data.inlined.data);
+ g_free (photo.data.inlined.data);
gdk_pixbuf_save_to_buffer (new, &img_buff,
&photo.data.inlined.length,
format_name, NULL, NULL);
@@ -2781,22 +2781,22 @@ full_name_response (GtkDialog *dialog, gint response, EContactEditor *editor)
"name", &name,
NULL);
- style = file_as_get_style(editor);
+ style = file_as_get_style (editor);
fname_widget = e_builder_get_widget(editor->builder, "entry-fullname");
if (fname_widget && GTK_IS_ENTRY (fname_widget)) {
- gchar *full_name = e_contact_name_to_string(name);
- const gchar *old_full_name = gtk_entry_get_text (GTK_ENTRY(fname_widget));
+ gchar *full_name = e_contact_name_to_string (name);
+ const gchar *old_full_name = gtk_entry_get_text (GTK_ENTRY (fname_widget));
if (strcmp (full_name, old_full_name))
gtk_entry_set_text (GTK_ENTRY (fname_widget), full_name);
- g_free(full_name);
+ g_free (full_name);
}
- e_contact_name_free(editor->name);
+ e_contact_name_free (editor->name);
editor->name = name;
- file_as_set_style(editor, style);
+ file_as_set_style (editor, style);
}
gtk_widget_destroy (GTK_WIDGET (dialog));
editor->fullname_dialog = NULL;
@@ -2849,12 +2849,12 @@ categories_response (GtkDialog *dialog, gint response, EContactEditor *editor)
if (response == GTK_RESPONSE_OK) {
categories = e_categories_dialog_get_categories (E_CATEGORIES_DIALOG (dialog));
- if (entry && GTK_IS_ENTRY(entry))
+ if (entry && GTK_IS_ENTRY (entry))
gtk_entry_set_text (GTK_ENTRY (entry), categories);
else
e_contact_set (editor->contact, E_CONTACT_CATEGORIES, (gchar *)categories);
}
- gtk_widget_destroy(GTK_WIDGET(dialog));
+ gtk_widget_destroy (GTK_WIDGET (dialog));
editor->categories_dialog = NULL;
}
@@ -2863,7 +2863,7 @@ categories_editor_delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer
{
if (widget) {
if (GTK_IS_WIDGET (widget))
- gtk_widget_destroy(widget);
+ gtk_widget_destroy (widget);
}
return TRUE;
}
@@ -2875,13 +2875,13 @@ categories_clicked (GtkWidget *button, EContactEditor *editor)
GtkDialog *dialog;
GtkWidget *entry = e_builder_get_widget(editor->builder, "entry-categories");
- if (entry && GTK_IS_ENTRY(entry))
- categories = g_strdup (gtk_entry_get_text(GTK_ENTRY(entry)));
+ if (entry && GTK_IS_ENTRY (entry))
+ categories = g_strdup (gtk_entry_get_text (GTK_ENTRY (entry)));
else if (editor->contact)
categories = e_contact_get (editor->contact, E_CONTACT_CATEGORIES);
if (editor->categories_dialog != NULL) {
- gtk_window_present (GTK_WINDOW(editor->categories_dialog));
+ gtk_window_present (GTK_WINDOW (editor->categories_dialog));
g_free (categories);
return;
}else if (!(dialog = GTK_DIALOG (e_categories_dialog_new (categories)))) {
@@ -2899,7 +2899,7 @@ categories_clicked (GtkWidget *button, EContactEditor *editor)
g_signal_connect_swapped (EAB_EDITOR (editor), "editor_closed",
G_CALLBACK (categories_editor_delete_event_cb), GTK_WIDGET (dialog));
- gtk_widget_show(GTK_WIDGET(dialog));
+ gtk_widget_show (GTK_WIDGET (dialog));
g_free (categories);
editor->categories_dialog = GTK_WIDGET (dialog);
@@ -3010,7 +3010,7 @@ image_clicked (GtkWidget *button, EContactEditor *editor)
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
no_image, GTK_RESPONSE_NO,
NULL);
- preview = GTK_IMAGE (gtk_image_new());
+ preview = GTK_IMAGE (gtk_image_new ());
gtk_file_chooser_set_preview_widget ((GtkFileChooser *)editor->file_selector, GTK_WIDGET (preview));
g_signal_connect (editor->file_selector, "update-preview",
G_CALLBACK (update_preview_cb), preview);
@@ -3403,14 +3403,14 @@ show_help_cb (GtkWidget *widget, gpointer data)
}
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);
+ GtkWidget *widget = e_builder_get_widget (builder, name);
+ return g_list_prepend (list, widget);
}
static void
-setup_tab_order(GtkBuilder *builder)
+setup_tab_order (GtkBuilder *builder)
{
GtkWidget *container;
GList *list = NULL;
@@ -3433,9 +3433,9 @@ setup_tab_order(GtkBuilder *builder)
list = add_to_tab_order(list, builder, "entry-homepage");
list = add_to_tab_order(list, builder, "button-fulladdr");
list = add_to_tab_order(list, builder, "text-address");
- list = g_list_reverse(list);
- e_container_change_tab_order(GTK_CONTAINER(container), list);
- g_list_free(list);
+ list = g_list_reverse (list);
+ e_container_change_tab_order (GTK_CONTAINER (container), list);
+ g_list_free (list);
}
*/
@@ -3522,7 +3522,7 @@ e_contact_editor_init (EContactEditor *e_contact_editor)
* through a constructor property. */
shell = e_shell_get_default ();
- e_contact_editor->name = e_contact_name_new();
+ e_contact_editor->name = e_contact_name_new ();
e_contact_editor->contact = NULL;
e_contact_editor->changed = FALSE;
@@ -3539,7 +3539,7 @@ e_contact_editor_init (EContactEditor *e_contact_editor)
e_contact_editor->builder = builder;
- setup_tab_order(builder);
+ setup_tab_order (builder);
e_contact_editor->app = e_builder_get_widget (builder, "contact editor");
widget = e_contact_editor->app;
@@ -3604,7 +3604,7 @@ e_contact_editor_init (EContactEditor *e_contact_editor)
static void
e_contact_editor_dispose (GObject *object)
{
- EContactEditor *e_contact_editor = E_CONTACT_EDITOR(object);
+ EContactEditor *e_contact_editor = E_CONTACT_EDITOR (object);
if (e_contact_editor->file_selector != NULL) {
gtk_widget_destroy (e_contact_editor->file_selector);
@@ -3612,7 +3612,7 @@ e_contact_editor_dispose (GObject *object)
}
if (e_contact_editor->writable_fields) {
- g_object_unref(e_contact_editor->writable_fields);
+ g_object_unref (e_contact_editor->writable_fields);
e_contact_editor->writable_fields = NULL;
}
if (e_contact_editor->required_fields) {
@@ -3620,28 +3620,28 @@ e_contact_editor_dispose (GObject *object)
e_contact_editor->required_fields = NULL;
}
if (e_contact_editor->contact) {
- g_object_unref(e_contact_editor->contact);
+ g_object_unref (e_contact_editor->contact);
e_contact_editor->contact = NULL;
}
if (e_contact_editor->source_book) {
- g_object_unref(e_contact_editor->source_book);
+ g_object_unref (e_contact_editor->source_book);
e_contact_editor->source_book = NULL;
}
if (e_contact_editor->target_book) {
g_signal_handler_disconnect (e_contact_editor->target_book, e_contact_editor->target_editable_id);
- g_object_unref(e_contact_editor->target_book);
+ g_object_unref (e_contact_editor->target_book);
e_contact_editor->target_book = NULL;
}
if (e_contact_editor->name) {
- e_contact_name_free(e_contact_editor->name);
+ e_contact_name_free (e_contact_editor->name);
e_contact_editor->name = NULL;
}
if (e_contact_editor->builder) {
- g_object_unref(e_contact_editor->builder);
+ g_object_unref (e_contact_editor->builder);
e_contact_editor->builder = NULL;
}
@@ -3753,7 +3753,7 @@ e_contact_editor_set_property (GObject *object, guint prop_id, const GValue *val
break;
if (editor->source_book)
- g_object_unref(editor->source_book);
+ g_object_unref (editor->source_book);
editor->source_book = source_book;
g_object_ref (editor->source_book);
@@ -3795,7 +3795,7 @@ e_contact_editor_set_property (GObject *object, guint prop_id, const GValue *val
if (editor->target_book) {
g_signal_handler_disconnect (editor->target_book, editor->target_editable_id);
- g_object_unref(editor->target_book);
+ g_object_unref (editor->target_book);
}
editor->target_book = target_book;
@@ -3827,8 +3827,8 @@ e_contact_editor_set_property (GObject *object, guint prop_id, const GValue *val
case PROP_CONTACT:
if (editor->contact)
- g_object_unref(editor->contact);
- editor->contact = e_contact_duplicate(E_CONTACT(g_value_get_object (value)));
+ g_object_unref (editor->contact);
+ editor->contact = e_contact_duplicate (E_CONTACT (g_value_get_object (value)));
fill_in_all (editor);
editor->changed = FALSE;
break;
@@ -3860,13 +3860,13 @@ e_contact_editor_set_property (GObject *object, guint prop_id, const GValue *val
}
case PROP_WRITABLE_FIELDS:
if (editor->writable_fields)
- g_object_unref(editor->writable_fields);
+ g_object_unref (editor->writable_fields);
editor->writable_fields = g_value_get_object (value);
if (editor->writable_fields)
g_object_ref (editor->writable_fields);
else
- editor->writable_fields = e_list_new(NULL, NULL, NULL);
+ editor->writable_fields = e_list_new (NULL, NULL, NULL);
sensitize_all (editor);
break;
diff --git a/addressbook/gui/contact-editor/eab-editor.c b/addressbook/gui/contact-editor/eab-editor.c
index f2765f40a6..b5e5232e00 100644
--- a/addressbook/gui/contact-editor/eab-editor.c
+++ b/addressbook/gui/contact-editor/eab-editor.c
@@ -356,7 +356,7 @@ 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
+ 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
diff --git a/addressbook/gui/contact-editor/test-editor.c b/addressbook/gui/contact-editor/test-editor.c
index 7a438a85bc..3078aaaaec 100644
--- a/addressbook/gui/contact-editor/test-editor.c
+++ b/addressbook/gui/contact-editor/test-editor.c
@@ -76,7 +76,7 @@ editor_closed_cb (EContactEditor *ce, gpointer data)
exit (0);
}
-gint main( gint argc, gchar *argv[] )
+gint main ( gint argc, gchar *argv[] )
{
gchar *cardstr;
EContactEditor *ce;
@@ -98,7 +98,7 @@ gint main( gint argc, gchar *argv[] )
g_signal_connect (ce, "editor_closed",
G_CALLBACK (editor_closed_cb), NULL);
- gtk_main();
+ gtk_main ();
/* Not reached. */
return 0;
diff --git a/addressbook/gui/contact-list-editor/e-contact-list-model.h b/addressbook/gui/contact-list-editor/e-contact-list-model.h
index 1f7c35a7be..43d3288756 100644
--- a/addressbook/gui/contact-list-editor/e-contact-list-model.h
+++ b/addressbook/gui/contact-list-editor/e-contact-list-model.h
@@ -65,7 +65,7 @@ void e_contact_list_model_add_destination
EDestination *dest);
void e_contact_list_model_add_email (EContactListModel *model,
const gchar *email);
-void e_contact_list_model_add_contact(EContactListModel *model,
+void e_contact_list_model_add_contact (EContactListModel *model,
EContact *contact,
gint email_num);
void e_contact_list_model_remove_row (EContactListModel *model,
diff --git a/addressbook/gui/merging/eab-contact-compare.c b/addressbook/gui/merging/eab-contact-compare.c
index bc686986e2..d5ba1a5f84 100644
--- a/addressbook/gui/merging/eab-contact-compare.c
+++ b/addressbook/gui/merging/eab-contact-compare.c
@@ -692,7 +692,7 @@ use_common_book_cb (EBook *book, const GError *error, gpointer closure)
query_parts[p] = NULL;
qj = g_strjoinv (" ", query_parts);
for (i = 0; query_parts[i] != NULL; i++)
- g_free(query_parts[i]);
+ g_free (query_parts[i]);
if (p > 1) {
gchar *s;
s = g_strdup_printf ("(or %s)", qj);
diff --git a/addressbook/gui/merging/eab-contact-merging.c b/addressbook/gui/merging/eab-contact-merging.c
index ca21dee30b..9932134469 100644
--- a/addressbook/gui/merging/eab-contact-merging.c
+++ b/addressbook/gui/merging/eab-contact-merging.c
@@ -222,7 +222,7 @@ mergeit (EContactMergingLookup *lookup)
gint value = 0, result;
dialog = (GtkDialog *)(gtk_dialog_new_with_buttons (_("Merge Contact"), NULL, GTK_DIALOG_NO_SEPARATOR, NULL));
- gtk_container_set_border_width (GTK_CONTAINER(dialog), 5);
+ gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
content_area = gtk_dialog_get_content_area (dialog);
@@ -266,7 +266,7 @@ mergeit (EContactMergingLookup *lookup)
break;
case 1:
/*New contact has email that is NOT equal to email in duplicate contact*/
- if ((str && *str) && (g_ascii_strcasecmp(e_contact_get_const (lookup->match, E_CONTACT_EMAIL_1),str))) {
+ if ((str && *str) && (g_ascii_strcasecmp (e_contact_get_const (lookup->match, E_CONTACT_EMAIL_1),str))) {
use_field = E_CONTACT_EMAIL_2;
break;
}
@@ -275,8 +275,8 @@ mergeit (EContactMergingLookup *lookup)
case 2:
/*New contact has email and it is equal to neither of the 2 emails in the duplicate contact*/
if ((str && *str) &&
- (g_ascii_strcasecmp(str,e_contact_get_const (lookup->match, E_CONTACT_EMAIL_1))) &&
- (g_ascii_strcasecmp(e_contact_get_const (lookup->match, E_CONTACT_EMAIL_2),str))) {
+ (g_ascii_strcasecmp (str,e_contact_get_const (lookup->match, E_CONTACT_EMAIL_1))) &&
+ (g_ascii_strcasecmp (e_contact_get_const (lookup->match, E_CONTACT_EMAIL_2),str))) {
use_field = E_CONTACT_EMAIL_3;
break;
}
@@ -285,19 +285,19 @@ mergeit (EContactMergingLookup *lookup)
case 3:
/*New contact has email and it is equal to none of the 3 emails in the duplicate contact*/
if ((str && *str) &&
- (g_ascii_strcasecmp(e_contact_get_const (lookup->match, E_CONTACT_EMAIL_1),str)) &&
- (g_ascii_strcasecmp(e_contact_get_const (lookup->match, E_CONTACT_EMAIL_2),str)) &&
- (g_ascii_strcasecmp(e_contact_get_const (lookup->match, E_CONTACT_EMAIL_3),str)))
+ (g_ascii_strcasecmp (e_contact_get_const (lookup->match, E_CONTACT_EMAIL_1),str)) &&
+ (g_ascii_strcasecmp (e_contact_get_const (lookup->match, E_CONTACT_EMAIL_2),str)) &&
+ (g_ascii_strcasecmp (e_contact_get_const (lookup->match, E_CONTACT_EMAIL_3),str)))
use_field = E_CONTACT_EMAIL_4;
else
continue;
}
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_new_text();
+ dropdown = gtk_combo_box_new_text ();
gtk_combo_box_append_text (GTK_COMBO_BOX (dropdown), string);
data = g_new0 (dropdown_data, 1);
@@ -311,34 +311,34 @@ 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;
}
- if (((field == E_CONTACT_FULL_NAME) && (!g_ascii_strcasecmp(string, string1)))) {
+ if (((field == E_CONTACT_FULL_NAME) && (!g_ascii_strcasecmp (string, string1)))) {
row++;
- label = gtk_label_new (e_contact_pretty_name(field));
+ 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_box_pack_start (GTK_BOX (hbox), (GtkWidget*)label, FALSE, FALSE, 0);
gtk_table_attach_defaults (table, (GtkWidget*)hbox, 1, 2, row, row + 1);
continue;
}
/*for all string fields except name and email*/
- if (!(string1 && *string1) || (g_ascii_strcasecmp(string, string1))) {
+ if (!(string1 && *string1) || (g_ascii_strcasecmp (string, string1))) {
row++;
- label = gtk_label_new (e_contact_pretty_name(field));
+ 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_new_text();
+ dropdown = gtk_combo_box_new_text ();
gtk_combo_box_append_text (GTK_COMBO_BOX (dropdown), string);
e_contact_set (lookup->match, field, string);
@@ -356,7 +356,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);
}
@@ -409,23 +409,23 @@ check_if_same (EContact *contact, EContact *match)
case 0:
return FALSE;
case 1:
- if ((str && *str) && (g_ascii_strcasecmp(e_contact_get_const (match, E_CONTACT_EMAIL_1),str)))
+ if ((str && *str) && (g_ascii_strcasecmp (e_contact_get_const (match, E_CONTACT_EMAIL_1),str)))
return FALSE;
case 2:
- if ((str && *str) && (g_ascii_strcasecmp(str,e_contact_get_const (match, E_CONTACT_EMAIL_1))) &&
- (g_ascii_strcasecmp(e_contact_get_const (match, E_CONTACT_EMAIL_2),str)))
+ if ((str && *str) && (g_ascii_strcasecmp (str,e_contact_get_const (match, E_CONTACT_EMAIL_1))) &&
+ (g_ascii_strcasecmp (e_contact_get_const (match, E_CONTACT_EMAIL_2),str)))
return FALSE;
case 3:
- if ((str && *str) && (g_ascii_strcasecmp(e_contact_get_const (match, E_CONTACT_EMAIL_1),str)) &&
- (g_ascii_strcasecmp(e_contact_get_const (match, E_CONTACT_EMAIL_2),str)) &&
- (g_ascii_strcasecmp(e_contact_get_const (match, E_CONTACT_EMAIL_3),str)))
+ if ((str && *str) && (g_ascii_strcasecmp (e_contact_get_const (match, E_CONTACT_EMAIL_1),str)) &&
+ (g_ascii_strcasecmp (e_contact_get_const (match, E_CONTACT_EMAIL_2),str)) &&
+ (g_ascii_strcasecmp (e_contact_get_const (match, E_CONTACT_EMAIL_3),str)))
return FALSE;
}
}
else {
string = (gchar *)e_contact_get_const (contact, field);
string1 = (gchar *)e_contact_get_const (match, field);
- if ((string && *string) && (string1 && *string1) && (g_ascii_strcasecmp(string1,string)))
+ if ((string && *string) && (string1 && *string1) && (g_ascii_strcasecmp (string1,string)))
return FALSE;
/*if the field entry exist in either of the contacts,we'll have to give the choice and thus merge button should be sensitive*/
else if ((string && *string) && !(string1 && *string1))
diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c
index 7cb962827b..7fa827aa39 100644
--- a/addressbook/gui/widgets/e-addressbook-model.c
+++ b/addressbook/gui/widgets/e-addressbook-model.c
@@ -92,7 +92,7 @@ free_data (EAddressbookModel *model)
}
static void
-remove_book_view(EAddressbookModel *model)
+remove_book_view (EAddressbookModel *model)
{
if (model->priv->book_view && model->priv->create_contact_id)
g_signal_handler_disconnect (
@@ -178,7 +178,7 @@ create_contact (EBookView *book_view,
}
static void
-remove_contact(EBookView *book_view,
+remove_contact (EBookView *book_view,
GList *ids,
EAddressbookModel *model)
{
@@ -229,7 +229,7 @@ remove_contact(EBookView *book_view,
}
static void
-modify_contact(EBookView *book_view,
+modify_contact (EBookView *book_view,
const GList *contact_list,
EAddressbookModel *model)
{
@@ -365,7 +365,7 @@ addressbook_model_idle_cb (EAddressbookModel *model)
if (limit_str && *limit_str)
limit = atoi (limit_str);
- remove_book_view(model);
+ remove_book_view (model);
if (model->priv->first_get_view) {
model->priv->first_get_view = FALSE;
@@ -456,7 +456,7 @@ addressbook_model_get_property (GObject *object,
static void
addressbook_model_dispose (GObject *object)
{
- EAddressbookModel *model = E_ADDRESSBOOK_MODEL(object);
+ EAddressbookModel *model = E_ADDRESSBOOK_MODEL (object);
remove_book_view (model);
free_data (model);
diff --git a/addressbook/gui/widgets/e-addressbook-model.h b/addressbook/gui/widgets/e-addressbook-model.h
index 8dcc4060e0..44b22df4cd 100644
--- a/addressbook/gui/widgets/e-addressbook-model.h
+++ b/addressbook/gui/widgets/e-addressbook-model.h
@@ -104,8 +104,8 @@ gint e_addressbook_model_find (EAddressbookModel *model,
EBook * e_addressbook_model_get_book (EAddressbookModel *model);
void e_addressbook_model_set_book (EAddressbookModel *model,
EBook *book);
-gboolean e_addressbook_model_get_editable(EAddressbookModel *model);
-void e_addressbook_model_set_editable(EAddressbookModel *model,
+gboolean e_addressbook_model_get_editable (EAddressbookModel *model);
+void e_addressbook_model_set_editable (EAddressbookModel *model,
gboolean editable);
gchar * e_addressbook_model_get_query (EAddressbookModel *model);
void e_addressbook_model_set_query (EAddressbookModel *model,
diff --git a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
index 60ef7d0026..928d9aa023 100644
--- a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
+++ b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
@@ -59,7 +59,7 @@ enum {
static guint signals[LAST_SIGNAL] = {0, };
static void
-unlink_model(EAddressbookReflowAdapter *adapter)
+unlink_model (EAddressbookReflowAdapter *adapter)
{
EAddressbookReflowAdapterPrivate *priv = adapter->priv;
@@ -108,9 +108,9 @@ text_height (PangoLayout *layout, const gchar *text)
}
static void
-addressbook_dispose(GObject *object)
+addressbook_dispose (GObject *object)
{
- EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(object);
+ EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER (object);
unlink_model (adapter);
}
@@ -124,7 +124,7 @@ addressbook_set_width (EReflowModel *erm, gint width)
static gint
addressbook_count (EReflowModel *erm)
{
- EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(erm);
+ EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER (erm);
EAddressbookReflowAdapterPrivate *priv = adapter->priv;
return e_addressbook_model_contact_count (priv->model);
@@ -134,7 +134,7 @@ addressbook_count (EReflowModel *erm)
static gint
addressbook_height (EReflowModel *erm, gint i, GnomeCanvasGroup *parent)
{
- EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(erm);
+ EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER (erm);
EAddressbookReflowAdapterPrivate *priv = adapter->priv;
EContactField field;
gint count = 0;
@@ -146,9 +146,9 @@ addressbook_height (EReflowModel *erm, gint i, GnomeCanvasGroup *parent)
layout = gtk_widget_create_pango_layout (
GTK_WIDGET (GNOME_CANVAS_ITEM (parent)->canvas), "");
- string = e_contact_get(contact, E_CONTACT_FILE_AS);
+ string = e_contact_get (contact, E_CONTACT_FILE_AS);
height = text_height (layout, string ? string : "") + 10.0;
- g_free(string);
+ g_free (string);
for (field = E_CONTACT_FULL_NAME;
field != E_CONTACT_LAST_SIMPLE_STRING && count < 5; field++) {
@@ -156,12 +156,12 @@ addressbook_height (EReflowModel *erm, gint i, GnomeCanvasGroup *parent)
if (field == E_CONTACT_FAMILY_NAME || field == E_CONTACT_GIVEN_NAME)
continue;
- string = e_contact_get(contact, field);
+ string = e_contact_get (contact, field);
if (string && *string) {
gint this_height;
gint field_text_height;
- this_height = text_height (layout, e_contact_pretty_name(field));
+ this_height = text_height (layout, e_contact_pretty_name (field));
field_text_height = text_height (layout, string);
if (this_height < field_text_height)
@@ -184,7 +184,7 @@ addressbook_height (EReflowModel *erm, gint i, GnomeCanvasGroup *parent)
static gint
addressbook_compare (EReflowModel *erm, gint n1, gint n2)
{
- EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(erm);
+ EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER (erm);
EAddressbookReflowAdapterPrivate *priv = adapter->priv;
EContact *contact1, *contact2;
@@ -201,7 +201,7 @@ addressbook_compare (EReflowModel *erm, gint n1, gint n2)
file_as1 = e_contact_get_const (contact1, E_CONTACT_FILE_AS);
file_as2 = e_contact_get_const (contact2, E_CONTACT_FILE_AS);
if (file_as1 && file_as2)
- return g_utf8_collate(file_as1, file_as2);
+ return g_utf8_collate (file_as1, file_as2);
if (file_as1)
return -1;
if (file_as2)
@@ -209,7 +209,7 @@ addressbook_compare (EReflowModel *erm, gint n1, gint n2)
uid1 = e_contact_get_const (contact1, E_CONTACT_UID);
uid2 = e_contact_get_const (contact2, E_CONTACT_UID);
if (uid1 && uid2)
- return strcmp(uid1, uid2);
+ return strcmp (uid1, uid2);
if (uid1)
return -1;
if (uid2)
@@ -248,19 +248,19 @@ adapter_open_contact (EMinicard *card,
static GnomeCanvasItem *
addressbook_incarnate (EReflowModel *erm, gint i, GnomeCanvasGroup *parent)
{
- EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(erm);
+ EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER (erm);
EAddressbookReflowAdapterPrivate *priv = adapter->priv;
GnomeCanvasItem *item;
- item = gnome_canvas_item_new(parent,
- e_minicard_get_type(),
+ item = gnome_canvas_item_new (parent,
+ e_minicard_get_type (),
"contact", e_addressbook_model_contact_at (priv->model, i),
"editable", e_addressbook_model_get_editable (priv->model),
NULL);
#if 0
g_signal_connect (item, "selected",
- G_CALLBACK(card_selected), 0, emvm);
+ G_CALLBACK (card_selected), 0, emvm);
#endif
g_signal_connect (item, "drag_begin",
@@ -275,10 +275,10 @@ addressbook_incarnate (EReflowModel *erm, gint i, GnomeCanvasGroup *parent)
static void
addressbook_reincarnate (EReflowModel *erm, gint i, GnomeCanvasItem *item)
{
- EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(erm);
+ EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER (erm);
EAddressbookReflowAdapterPrivate *priv = adapter->priv;
- gnome_canvas_item_set(item,
+ gnome_canvas_item_set (item,
"contact", e_addressbook_model_contact_at (priv->model, i),
NULL);
}
@@ -353,7 +353,7 @@ addressbook_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
- EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(object);
+ EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER (object);
EAddressbookReflowAdapterPrivate *priv = adapter->priv;
switch (prop_id) {
@@ -384,7 +384,7 @@ addressbook_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
- EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(object);
+ EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER (object);
EAddressbookReflowAdapterPrivate *priv = adapter->priv;
switch (prop_id) {
@@ -453,7 +453,7 @@ e_addressbook_reflow_adapter_class_init (GObjectClass *object_class)
signals[DRAG_BEGIN] =
g_signal_new ("drag_begin",
- G_OBJECT_CLASS_TYPE(object_class),
+ G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (EAddressbookReflowAdapterClass, drag_begin),
NULL, NULL,
@@ -481,7 +481,7 @@ e_addressbook_reflow_adapter_class_init (GObjectClass *object_class)
static void
e_addressbook_reflow_adapter_init (GtkObject *object)
{
- EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(object);
+ EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER (object);
EAddressbookReflowAdapterPrivate *priv;
priv = adapter->priv = g_new0 (EAddressbookReflowAdapterPrivate, 1);
@@ -528,29 +528,29 @@ e_addressbook_reflow_adapter_construct (EAddressbookReflowAdapter *adapter,
priv->model = model;
g_object_ref (priv->model);
- priv->create_contact_id = g_signal_connect(priv->model,
+ priv->create_contact_id = g_signal_connect (priv->model,
"contact_added",
- G_CALLBACK(create_contact),
+ G_CALLBACK (create_contact),
adapter);
- priv->remove_contact_id = g_signal_connect(priv->model,
+ priv->remove_contact_id = g_signal_connect (priv->model,
"contacts_removed",
- G_CALLBACK(remove_contacts),
+ G_CALLBACK (remove_contacts),
adapter);
- priv->modify_contact_id = g_signal_connect(priv->model,
+ priv->modify_contact_id = g_signal_connect (priv->model,
"contact_changed",
- G_CALLBACK(modify_contact),
+ G_CALLBACK (modify_contact),
adapter);
- priv->model_changed_id = g_signal_connect(priv->model,
+ priv->model_changed_id = g_signal_connect (priv->model,
"model_changed",
- G_CALLBACK(model_changed),
+ G_CALLBACK (model_changed),
adapter);
- priv->search_started_id = g_signal_connect(priv->model,
+ priv->search_started_id = g_signal_connect (priv->model,
"search_started",
- G_CALLBACK(search_started),
+ G_CALLBACK (search_started),
adapter);
- priv->search_result_id = g_signal_connect(priv->model,
+ priv->search_result_id = g_signal_connect (priv->model,
"search_result",
- G_CALLBACK(search_result),
+ G_CALLBACK (search_result),
adapter);
}
@@ -563,7 +563,7 @@ e_addressbook_reflow_adapter_new (EAddressbookModel *model)
e_addressbook_reflow_adapter_construct (et, model);
- return E_REFLOW_MODEL(et);
+ return E_REFLOW_MODEL (et);
}
diff --git a/addressbook/gui/widgets/e-addressbook-table-adapter.c b/addressbook/gui/widgets/e-addressbook-table-adapter.c
index 88e6554299..156f30753e 100644
--- a/addressbook/gui/widgets/e-addressbook-table-adapter.c
+++ b/addressbook/gui/widgets/e-addressbook-table-adapter.c
@@ -44,7 +44,7 @@ static ETableModelClass *parent_class;
#define COLS (E_CONTACT_FIELD_LAST)
static void
-unlink_model(EAddressbookTableAdapter *adapter)
+unlink_model (EAddressbookTableAdapter *adapter)
{
EAddressbookTableAdapterPrivate *priv = adapter->priv;
@@ -68,12 +68,12 @@ unlink_model(EAddressbookTableAdapter *adapter)
}
static void
-addressbook_dispose(GObject *object)
+addressbook_dispose (GObject *object)
{
- EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER(object);
+ EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER (object);
if (adapter->priv) {
- unlink_model(adapter);
+ unlink_model (adapter);
g_hash_table_remove_all (adapter->priv->emails);
g_hash_table_destroy (adapter->priv->emails);
@@ -97,7 +97,7 @@ addressbook_col_count (ETableModel *etc)
static gint
addressbook_row_count (ETableModel *etc)
{
- EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER(etc);
+ EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER (etc);
EAddressbookTableAdapterPrivate *priv = adapter->priv;
return e_addressbook_model_contact_count (priv->model);
@@ -107,14 +107,14 @@ addressbook_row_count (ETableModel *etc)
static gpointer
addressbook_value_at (ETableModel *etc, gint col, gint row)
{
- EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER(etc);
+ EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER (etc);
EAddressbookTableAdapterPrivate *priv = adapter->priv;
const gchar *value;
if (col >= COLS || row >= e_addressbook_model_contact_count (priv->model))
return NULL;
- value = e_contact_get_const((EContact*)e_addressbook_model_contact_at (priv->model, row), col);
+ value = e_contact_get_const ((EContact*)e_addressbook_model_contact_at (priv->model, row), col);
if (value && *value && (col == E_CONTACT_EMAIL_1 || col == E_CONTACT_EMAIL_2 || col == E_CONTACT_EMAIL_3)) {
gchar *val = g_hash_table_lookup (priv->emails, value);
@@ -153,7 +153,7 @@ contact_modified_cb (EBook* book, const GError *error,
static void
addressbook_set_value_at (ETableModel *etc, gint col, gint row, gconstpointer val)
{
- EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER(etc);
+ EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER (etc);
EAddressbookTableAdapterPrivate *priv = adapter->priv;
if (e_addressbook_model_get_editable (priv->model)) {
@@ -166,7 +166,7 @@ addressbook_set_value_at (ETableModel *etc, gint col, gint row, gconstpointer va
if (!contact)
return;
- e_table_model_pre_change(etc);
+ e_table_model_pre_change (etc);
if (col == E_CONTACT_EMAIL_1 || col == E_CONTACT_EMAIL_2 || col == E_CONTACT_EMAIL_3) {
const gchar *old_value = e_contact_get_const (contact, col);
@@ -176,14 +176,14 @@ addressbook_set_value_at (ETableModel *etc, gint col, gint row, gconstpointer va
g_hash_table_remove (priv->emails, old_value);
}
- e_contact_set(contact, col, (gpointer) val);
+ e_contact_set (contact, col, (gpointer) val);
eab_merging_book_commit_contact (e_addressbook_model_get_book (priv->model),
contact, contact_modified_cb, etc);
g_object_unref (contact);
/* XXX do we need this? shouldn't the commit_contact generate a changed signal? */
- e_table_model_cell_changed(etc, col, row);
+ e_table_model_cell_changed (etc, col, row);
}
}
@@ -192,7 +192,7 @@ static gboolean
addressbook_is_cell_editable (ETableModel *etc, gint col, gint row)
{
#if 0
- EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER(etc);
+ EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER (etc);
EAddressbookTableAdapterPrivate *priv = adapter->priv;
const EContact *contact;
@@ -201,7 +201,7 @@ addressbook_is_cell_editable (ETableModel *etc, gint col, gint row)
else
contact = NULL;
- if (!e_addressbook_model_editable(priv->model))
+ 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
@@ -217,7 +217,7 @@ addressbook_is_cell_editable (ETableModel *etc, gint col, gint row)
static void
addressbook_append_row (ETableModel *etm, ETableModel *source, gint row)
{
- EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER(etm);
+ EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER (etm);
EAddressbookTableAdapterPrivate *priv = adapter->priv;
EContact *contact;
gint col;
@@ -238,14 +238,14 @@ addressbook_append_row (ETableModel *etm, ETableModel *source, gint row)
static gpointer
addressbook_duplicate_value (ETableModel *etc, gint col, gconstpointer value)
{
- return g_strdup(value);
+ return g_strdup (value);
}
/* This function frees the value passed to it. */
static void
addressbook_free_value (ETableModel *etc, gint col, gpointer value)
{
- g_free(value);
+ g_free (value);
}
static gpointer
@@ -263,7 +263,7 @@ addressbook_value_is_empty (ETableModel *etc, gint col, gconstpointer value)
static gchar *
addressbook_value_to_string (ETableModel *etc, gint col, gconstpointer value)
{
- return g_strdup(value);
+ return g_strdup (value);
}
static void
@@ -291,7 +291,7 @@ eab_table_adapter_class_init (GObjectClass *object_class)
static void
eab_table_adapter_init (GObject *object)
{
- EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER(object);
+ EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER (object);
EAddressbookTableAdapterPrivate *priv;
priv = adapter->priv = g_new0 (EAddressbookTableAdapterPrivate, 1);
@@ -385,21 +385,21 @@ eab_table_adapter_construct (EAddressbookTableAdapter *adapter,
priv->model = model;
g_object_ref (priv->model);
- priv->create_contact_id = g_signal_connect(priv->model,
+ priv->create_contact_id = g_signal_connect (priv->model,
"contact_added",
- G_CALLBACK(create_contact),
+ G_CALLBACK (create_contact),
adapter);
- priv->remove_contact_id = g_signal_connect(priv->model,
+ priv->remove_contact_id = g_signal_connect (priv->model,
"contacts_removed",
- G_CALLBACK(remove_contacts),
+ G_CALLBACK (remove_contacts),
adapter);
- priv->modify_contact_id = g_signal_connect(priv->model,
+ priv->modify_contact_id = g_signal_connect (priv->model,
"contact_changed",
- G_CALLBACK(modify_contact),
+ G_CALLBACK (modify_contact),
adapter);
- priv->model_changed_id = g_signal_connect(priv->model,
+ priv->model_changed_id = g_signal_connect (priv->model,
"model_changed",
- G_CALLBACK(model_changed),
+ G_CALLBACK (model_changed),
adapter);
priv->emails = g_hash_table_new_full (g_str_hash, g_str_equal, (GDestroyNotify) g_free, (GDestroyNotify) g_free);
@@ -410,9 +410,9 @@ eab_table_adapter_new (EAddressbookModel *model)
{
EAddressbookTableAdapter *et;
- et = g_object_new(E_TYPE_AB_TABLE_ADAPTER, NULL);
+ et = g_object_new (E_TYPE_AB_TABLE_ADAPTER, NULL);
eab_table_adapter_construct (et, model);
- return E_TABLE_MODEL(et);
+ return E_TABLE_MODEL (et);
}
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
index 810e56f7b5..bb6e58f7b6 100644
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ b/addressbook/gui/widgets/e-addressbook-view.c
@@ -316,13 +316,13 @@ addressbook_view_create_table_view (EAddressbookView *view,
g_signal_connect (
widget, "double_click",
- G_CALLBACK(table_double_click), view);
+ G_CALLBACK (table_double_click), view);
g_signal_connect (
widget, "right_click",
- G_CALLBACK(table_right_click), view);
+ G_CALLBACK (table_right_click), view);
g_signal_connect (
widget, "white_space_event",
- G_CALLBACK(table_white_space_event), view);
+ G_CALLBACK (table_white_space_event), view);
g_signal_connect_swapped (
widget, "selection_change",
G_CALLBACK (addressbook_view_emit_selection_change), view);
@@ -748,7 +748,7 @@ addressbook_view_class_init (EAddressbookViewClass *class)
parent_class = g_type_class_peek_parent (class);
g_type_class_add_private (class, sizeof (EAddressbookViewPrivate));
- object_class = G_OBJECT_CLASS(class);
+ object_class = G_OBJECT_CLASS (class);
object_class->set_property = addressbook_view_set_property;
object_class->get_property = addressbook_view_get_property;
object_class->dispose = addressbook_view_dispose;
@@ -1174,7 +1174,7 @@ contact_print_button_draw_page (GtkPrintOperation *operation,
while (e_printable_data_left (printable)) {
cairo_save (cr);
- contact_page_draw_footer(operation,context,page_nr++);
+ contact_page_draw_footer (operation,context,page_nr++);
e_printable_print_page (
printable, context, page_width - 16, top_margin + 10, TRUE);
cairo_restore (cr);
@@ -1336,7 +1336,7 @@ 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)
{
GList *list, *l;
gboolean plural = FALSE, is_list = FALSE;
@@ -1360,7 +1360,7 @@ e_addressbook_view_delete_selection(EAddressbookView *view, gboolean is_delete)
list = e_addressbook_view_get_selected (view);
contact = list->data;
- if (g_list_next(list))
+ if (g_list_next (list))
plural = TRUE;
else
name = e_contact_get (contact, E_CONTACT_FILE_AS);
@@ -1382,7 +1382,7 @@ e_addressbook_view_delete_selection(EAddressbookView *view, gboolean is_delete)
/* confirm delete */
if (is_delete && !addressbook_view_confirm_delete (
- GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET(view))),
+ GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (view))),
plural, is_list, name)) {
g_free (name);
g_list_foreach (list, (GFunc) g_object_unref, NULL);
@@ -1393,7 +1393,7 @@ e_addressbook_view_delete_selection(EAddressbookView *view, gboolean is_delete)
if (e_book_check_static_capability (book, "bulk-remove")) {
GList *ids = NULL;
- for (l=list;l;l=g_list_next(l)) {
+ for (l=list;l;l=g_list_next (l)) {
contact = l->data;
ids = g_list_prepend (ids, (gchar *)e_contact_get_const (contact, E_CONTACT_UID));
@@ -1408,7 +1408,7 @@ e_addressbook_view_delete_selection(EAddressbookView *view, gboolean is_delete)
g_list_free (ids);
}
else {
- for (l=list;l;l=g_list_next(l)) {
+ for (l=list;l;l=g_list_next (l)) {
contact = l->data;
/* Remove the card. */
e_book_remove_contact_async (book,
@@ -1437,7 +1437,7 @@ e_addressbook_view_delete_selection(EAddressbookView *view, gboolean is_delete)
select = e_table_model_to_view_row (E_TABLE (etable), row);
/* Sets the cursor, before the deleted row if its the last row */
- if (select == e_table_model_row_count (E_TABLE(etable)->model) - 1)
+ if (select == e_table_model_row_count (E_TABLE (etable)->model) - 1)
select = select - 1;
else
select = select + 1;
@@ -1539,7 +1539,7 @@ view_transfer_contacts (EAddressbookView *view,
eab_transfer_contacts (book, contacts, delete_from_source, parent);
- g_object_unref(book);
+ g_object_unref (book);
}
void
diff --git a/addressbook/gui/widgets/e-minicard-label.c b/addressbook/gui/widgets/e-minicard-label.c
index 3f562a3c47..35b0525e51 100644
--- a/addressbook/gui/widgets/e-minicard-label.c
+++ b/addressbook/gui/widgets/e-minicard-label.c
@@ -40,10 +40,10 @@ static void e_minicard_label_get_property (GObject *object, guint prop_id, GVal
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);
-static void e_minicard_label_reflow(GnomeCanvasItem *item, gint flags);
+static void e_minicard_label_reflow (GnomeCanvasItem *item, gint flags);
static void e_minicard_label_style_set (EMinicardLabel *label, GtkStyle *previous_style);
-static void e_minicard_label_resize_children( EMinicardLabel *e_minicard_label );
+static void e_minicard_label_resize_children ( EMinicardLabel *e_minicard_label );
static void set_colors (EMinicardLabel *label);
@@ -193,7 +193,7 @@ e_minicard_label_init (EMinicardLabel *minicard_label)
minicard_label->max_field_name_length = -1;
- e_canvas_item_set_reflow_callback(GNOME_CANVAS_ITEM(minicard_label), e_minicard_label_reflow);
+ e_canvas_item_set_reflow_callback (GNOME_CANVAS_ITEM (minicard_label), e_minicard_label_reflow);
}
static void
@@ -208,12 +208,12 @@ e_minicard_label_set_property (GObject *object, guint prop_id, const GValue *va
switch (prop_id) {
case PROP_WIDTH:
e_minicard_label->width = g_value_get_double (value);
- e_minicard_label_resize_children(e_minicard_label);
+ e_minicard_label_resize_children (e_minicard_label);
e_canvas_item_request_reflow (item);
break;
case PROP_HAS_FOCUS:
if (e_minicard_label->field && (g_value_get_boolean (value) != E_FOCUS_NONE))
- e_canvas_item_grab_focus(e_minicard_label->field, FALSE);
+ e_canvas_item_grab_focus (e_minicard_label->field, FALSE);
break;
case PROP_FIELD:
gnome_canvas_item_set( e_minicard_label->field, "text", g_value_get_string (value), NULL );
@@ -285,16 +285,16 @@ e_minicard_label_realize (GnomeCanvasItem *item)
GnomeCanvasGroup *group;
e_minicard_label = E_MINICARD_LABEL (item);
- group = GNOME_CANVAS_GROUP( item );
+ group = GNOME_CANVAS_GROUP ( item );
- if (GNOME_CANVAS_ITEM_CLASS( parent_class )->realize)
- (* GNOME_CANVAS_ITEM_CLASS( parent_class )->realize) (item);
+ if (GNOME_CANVAS_ITEM_CLASS ( parent_class )->realize)
+ (* GNOME_CANVAS_ITEM_CLASS ( parent_class )->realize) (item);
- e_canvas_item_request_reflow(item);
+ e_canvas_item_request_reflow (item);
e_minicard_label->rect =
- gnome_canvas_item_new( group,
- gnome_canvas_rect_get_type(),
+ gnome_canvas_item_new ( group,
+ gnome_canvas_rect_get_type (),
"x1", (double) 0,
"y1", (double) 0,
"x2", (double) e_minicard_label->width - 1,
@@ -302,8 +302,8 @@ e_minicard_label_realize (GnomeCanvasItem *item)
"outline_color", NULL,
NULL );
e_minicard_label->fieldname =
- gnome_canvas_item_new( group,
- e_text_get_type(),
+ gnome_canvas_item_new ( group,
+ e_text_get_type (),
"anchor", GTK_ANCHOR_NW,
"clip_width", (double) ( e_minicard_label->width / 2 - 4 ),
"clip", TRUE,
@@ -312,11 +312,11 @@ e_minicard_label_realize (GnomeCanvasItem *item)
"draw_background", FALSE,
"im_context", E_CANVAS (item->canvas)->im_context,
NULL );
- e_canvas_item_move_absolute(e_minicard_label->fieldname, 2, 1);
+ e_canvas_item_move_absolute (e_minicard_label->fieldname, 2, 1);
e_minicard_label->field =
- gnome_canvas_item_new( group,
- e_text_get_type(),
+ gnome_canvas_item_new ( group,
+ e_text_get_type (),
"anchor", GTK_ANCHOR_NW,
"clip_width", (double) ( ( e_minicard_label->width + 1 ) / 2 - 4 ),
"clip", TRUE,
@@ -326,18 +326,18 @@ e_minicard_label_realize (GnomeCanvasItem *item)
"draw_background", FALSE,
"im_context", E_CANVAS (item->canvas)->im_context,
NULL );
- e_canvas_item_move_absolute(e_minicard_label->field, ( e_minicard_label->width / 2 + 2), 1);
+ e_canvas_item_move_absolute (e_minicard_label->field, ( e_minicard_label->width / 2 + 2), 1);
set_colors (e_minicard_label);
- e_canvas_item_request_reflow(item);
+ e_canvas_item_request_reflow (item);
}
static void
e_minicard_label_unrealize (GnomeCanvasItem *item)
{
- if (GNOME_CANVAS_ITEM_CLASS( parent_class )->unrealize)
- (* GNOME_CANVAS_ITEM_CLASS( parent_class )->unrealize) (item);
+ if (GNOME_CANVAS_ITEM_CLASS ( parent_class )->unrealize)
+ (* GNOME_CANVAS_ITEM_CLASS ( parent_class )->unrealize) (item);
}
static gboolean
@@ -356,7 +356,7 @@ e_minicard_label_event (GnomeCanvasItem *item, GdkEvent *event)
parent = GNOME_CANVAS_ITEM (e_minicard_label)->parent;
if (parent)
- e_canvas_item_grab_focus(parent, FALSE);
+ e_canvas_item_grab_focus (parent, FALSE);
}
break;
case GDK_FOCUS_CHANGE: {
@@ -383,14 +383,14 @@ e_minicard_label_event (GnomeCanvasItem *item, GdkEvent *event)
break;
}
- if (GNOME_CANVAS_ITEM_CLASS( parent_class )->event)
- return (* GNOME_CANVAS_ITEM_CLASS( parent_class )->event) (item, event);
+ if (GNOME_CANVAS_ITEM_CLASS ( parent_class )->event)
+ return (* GNOME_CANVAS_ITEM_CLASS ( parent_class )->event) (item, event);
else
return 0;
}
static void
-e_minicard_label_resize_children(EMinicardLabel *e_minicard_label)
+e_minicard_label_resize_children (EMinicardLabel *e_minicard_label)
{
gdouble left_width;
gdouble fieldnamewidth;
@@ -403,10 +403,10 @@ e_minicard_label_resize_children(EMinicardLabel *e_minicard_label)
fieldnamewidth = (double) MAX ( left_width, 0 );
fieldwidth = (double) MAX ( e_minicard_label->width - 8 - left_width, 0 );
- gnome_canvas_item_set( e_minicard_label->fieldname,
+ gnome_canvas_item_set ( e_minicard_label->fieldname,
"clip_width", is_rtl ? fieldwidth : fieldnamewidth,
NULL );
- gnome_canvas_item_set( e_minicard_label->field,
+ gnome_canvas_item_set ( e_minicard_label->field,
"clip_width", is_rtl ? fieldnamewidth : fieldwidth,
NULL );
}
@@ -461,9 +461,9 @@ e_minicard_label_style_set (EMinicardLabel *label, GtkStyle *previous_style)
}
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);
+ EMinicardLabel *e_minicard_label = E_MINICARD_LABEL (item);
gint old_height;
gdouble text_height;
@@ -471,13 +471,13 @@ e_minicard_label_reflow(GnomeCanvasItem *item, gint flags)
old_height = e_minicard_label->height;
- g_object_get(e_minicard_label->fieldname,
+ g_object_get (e_minicard_label->fieldname,
"text_height", &text_height,
NULL);
e_minicard_label->height = text_height;
- g_object_get(e_minicard_label->field,
+ g_object_get (e_minicard_label->field,
"text_height", &text_height,
NULL);
@@ -485,12 +485,12 @@ e_minicard_label_reflow(GnomeCanvasItem *item, gint flags)
e_minicard_label->height = text_height;
e_minicard_label->height += 3;
- gnome_canvas_item_set( e_minicard_label->rect,
+ gnome_canvas_item_set ( e_minicard_label->rect,
"x2", (double) e_minicard_label->width - 1,
"y2", (double) e_minicard_label->height - 1,
NULL );
- gnome_canvas_item_set( e_minicard_label->fieldname,
+ gnome_canvas_item_set ( e_minicard_label->fieldname,
"clip_height", (double) e_minicard_label->height - 3,
NULL );
@@ -499,16 +499,16 @@ e_minicard_label_reflow(GnomeCanvasItem *item, gint flags)
else
left_width = e_minicard_label->width / 2 - 4;
- e_canvas_item_move_absolute(e_minicard_label->field, left_width + 6, 1);
+ e_canvas_item_move_absolute (e_minicard_label->field, left_width + 6, 1);
if (old_height != e_minicard_label->height)
- e_canvas_item_request_parent_reflow(item);
+ e_canvas_item_request_parent_reflow (item);
}
GnomeCanvasItem *
-e_minicard_label_new(GnomeCanvasGroup *parent)
+e_minicard_label_new (GnomeCanvasGroup *parent)
{
- GnomeCanvasItem *item = gnome_canvas_item_new(parent, e_minicard_label_get_type(), NULL);
+ GnomeCanvasItem *item = gnome_canvas_item_new (parent, e_minicard_label_get_type (), NULL);
return item;
}
diff --git a/addressbook/gui/widgets/e-minicard-label.h b/addressbook/gui/widgets/e-minicard-label.h
index b6101a48ee..a845419833 100644
--- a/addressbook/gui/widgets/e-minicard-label.h
+++ b/addressbook/gui/widgets/e-minicard-label.h
@@ -73,7 +73,7 @@ struct _EMinicardLabelClass
};
GType e_minicard_label_get_type (void);
-GnomeCanvasItem *e_minicard_label_new(GnomeCanvasGroup *parent);
+GnomeCanvasItem *e_minicard_label_new (GnomeCanvasGroup *parent);
void e_minicard_label_construct (GnomeCanvasItem *item);
G_END_DECLS
diff --git a/addressbook/gui/widgets/e-minicard-view-widget.c b/addressbook/gui/widgets/e-minicard-view-widget.c
index c2741d48d6..6751fc99fd 100644
--- a/addressbook/gui/widgets/e-minicard-view-widget.c
+++ b/addressbook/gui/widgets/e-minicard-view-widget.c
@@ -225,20 +225,20 @@ e_minicard_view_widget_set_property (GObject *object,
if (emvw->book)
g_object_unref (emvw->book);
if (g_value_get_object (value)) {
- emvw->book = E_BOOK(g_value_get_object (value));
+ emvw->book = E_BOOK (g_value_get_object (value));
if (emvw->book)
- g_object_ref(emvw->book);
+ g_object_ref (emvw->book);
} else
emvw->book = NULL;
if (emvw->emv)
- g_object_set(emvw->emv,
+ g_object_set (emvw->emv,
"book", emvw->book,
NULL);
break;
case PROP_QUERY:
- emvw->query = g_strdup(g_value_get_string (value));
+ emvw->query = g_strdup (g_value_get_string (value));
if (emvw->emv)
- g_object_set(emvw->emv,
+ g_object_set (emvw->emv,
"query", emvw->query,
NULL);
break;
@@ -295,14 +295,14 @@ e_minicard_view_widget_get_property (GObject *object,
static void
e_minicard_view_widget_dispose (GObject *object)
{
- EMinicardViewWidget *view = E_MINICARD_VIEW_WIDGET(object);
+ EMinicardViewWidget *view = E_MINICARD_VIEW_WIDGET (object);
if (view->book) {
g_object_unref (view->book);
view->book = NULL;
}
if (view->query) {
- g_free(view->query);
+ g_free (view->query);
view->query = NULL;
}
@@ -311,8 +311,8 @@ e_minicard_view_widget_dispose (GObject *object)
view->adapter = NULL;
}
- if (G_OBJECT_CLASS(parent_class)->dispose)
- G_OBJECT_CLASS(parent_class)->dispose (object);
+ if (G_OBJECT_CLASS (parent_class)->dispose)
+ G_OBJECT_CLASS (parent_class)->dispose (object);
}
static void
@@ -360,7 +360,7 @@ right_click (EMinicardView *view, GdkEvent *event, EMinicardViewWidget *widget)
static void
e_minicard_view_widget_style_set (GtkWidget *widget, GtkStyle *previous_style)
{
- EMinicardViewWidget *view = E_MINICARD_VIEW_WIDGET(widget);
+ EMinicardViewWidget *view = E_MINICARD_VIEW_WIDGET (widget);
GtkStyle *style;
style = gtk_widget_get_style (widget);
@@ -370,34 +370,34 @@ e_minicard_view_widget_style_set (GtkWidget *widget, GtkStyle *previous_style)
view->background, "fill_color_gdk",
&style->base[GTK_STATE_NORMAL], NULL);
- if (GTK_WIDGET_CLASS(parent_class)->style_set)
- GTK_WIDGET_CLASS(parent_class)->style_set (widget, previous_style);
+ if (GTK_WIDGET_CLASS (parent_class)->style_set)
+ GTK_WIDGET_CLASS (parent_class)->style_set (widget, previous_style);
}
static void
e_minicard_view_widget_realize (GtkWidget *widget)
{
- EMinicardViewWidget *view = E_MINICARD_VIEW_WIDGET(widget);
+ EMinicardViewWidget *view = E_MINICARD_VIEW_WIDGET (widget);
GtkStyle *style = gtk_widget_get_style (widget);
- view->background = gnome_canvas_item_new(gnome_canvas_root( GNOME_CANVAS(view) ),
- e_canvas_background_get_type(),
+ view->background = gnome_canvas_item_new (gnome_canvas_root ( GNOME_CANVAS (view) ),
+ e_canvas_background_get_type (),
"fill_color_gdk", &style->base[GTK_STATE_NORMAL],
NULL );
- view->emv = gnome_canvas_item_new(
- gnome_canvas_root( GNOME_CANVAS(view) ),
- e_minicard_view_get_type(),
+ view->emv = gnome_canvas_item_new (
+ gnome_canvas_root ( GNOME_CANVAS (view) ),
+ e_minicard_view_get_type (),
"height", (double) 100,
"minimum_width", (double) 100,
"adapter", view->adapter,
"column_width", view->column_width,
NULL );
- g_signal_connect (E_REFLOW(view->emv)->selection,
+ g_signal_connect (E_REFLOW (view->emv)->selection,
"selection_changed",
G_CALLBACK (selection_change), view);
- g_signal_connect (E_REFLOW(view->emv)->selection,
+ g_signal_connect (E_REFLOW (view->emv)->selection,
"selection_row_changed",
G_CALLBACK (selection_row_change), view);
g_signal_connect (view->emv,
@@ -413,49 +413,49 @@ e_minicard_view_widget_realize (GtkWidget *widget)
"right_click",
G_CALLBACK (right_click), view);
- if (GTK_WIDGET_CLASS(parent_class)->realize)
- GTK_WIDGET_CLASS(parent_class)->realize (widget);
+ if (GTK_WIDGET_CLASS (parent_class)->realize)
+ GTK_WIDGET_CLASS (parent_class)->realize (widget);
}
static void
-e_minicard_view_widget_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
+e_minicard_view_widget_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
{
- if (GTK_WIDGET_CLASS(parent_class)->size_allocate)
- GTK_WIDGET_CLASS(parent_class)->size_allocate (widget, allocation);
+ if (GTK_WIDGET_CLASS (parent_class)->size_allocate)
+ GTK_WIDGET_CLASS (parent_class)->size_allocate (widget, allocation);
if (gtk_widget_get_realized (widget)) {
gdouble width;
- EMinicardViewWidget *view = E_MINICARD_VIEW_WIDGET(widget);
+ EMinicardViewWidget *view = E_MINICARD_VIEW_WIDGET (widget);
- gnome_canvas_item_set( view->emv,
+ gnome_canvas_item_set ( view->emv,
"height", (double) allocation->height,
NULL );
- gnome_canvas_item_set( view->emv,
+ gnome_canvas_item_set ( view->emv,
"minimum_width", (double) allocation->width,
NULL );
- g_object_get(view->emv,
+ g_object_get (view->emv,
"width", &width,
NULL);
- width = MAX(width, allocation->width);
+ width = MAX (width, allocation->width);
gnome_canvas_set_scroll_region (GNOME_CANVAS (view), 0, 0, width - 1, allocation->height - 1);
}
}
static void
-e_minicard_view_widget_reflow(ECanvas *canvas)
+e_minicard_view_widget_reflow (ECanvas *canvas)
{
gdouble width;
- EMinicardViewWidget *view = E_MINICARD_VIEW_WIDGET(canvas);
+ EMinicardViewWidget *view = E_MINICARD_VIEW_WIDGET (canvas);
GtkAllocation allocation;
- if (E_CANVAS_CLASS(parent_class)->reflow)
- E_CANVAS_CLASS(parent_class)->reflow (canvas);
+ if (E_CANVAS_CLASS (parent_class)->reflow)
+ E_CANVAS_CLASS (parent_class)->reflow (canvas);
g_object_get (view->emv, "width", &width, NULL);
gtk_widget_get_allocation (GTK_WIDGET (canvas), &allocation);
gnome_canvas_set_scroll_region (
- GNOME_CANVAS(canvas), 0, 0,
+ GNOME_CANVAS (canvas), 0, 0,
MAX (width, allocation.width) - 1,
allocation.height - 1);
}
@@ -479,13 +479,13 @@ 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;
canvas = GNOME_CANVAS (widget);
- view = E_MINICARD_VIEW_WIDGET(widget);
+ view = E_MINICARD_VIEW_WIDGET (widget);
if (!canvas->focused_item) {
EReflow *reflow = E_REFLOW (view->emv);
@@ -497,8 +497,8 @@ e_minicard_view_widget_real_focus_in_event(GtkWidget *widget, GdkEventFocus *eve
}
}
- if (GTK_WIDGET_CLASS(parent_class)->focus_in_event)
- return GTK_WIDGET_CLASS(parent_class)->focus_in_event (widget, event);
+ if (GTK_WIDGET_CLASS (parent_class)->focus_in_event)
+ 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 18dbc20523..5f542ae66e 100644
--- a/addressbook/gui/widgets/e-minicard-view.c
+++ b/addressbook/gui/widgets/e-minicard-view.c
@@ -36,7 +36,7 @@
#include "e-util/e-util.h"
#include "ea-addressbook.h"
-static void e_minicard_view_drag_data_get(GtkWidget *widget,
+static void e_minicard_view_drag_data_get (GtkWidget *widget,
GdkDragContext *context,
GtkSelectionData *selection_data,
guint info,
@@ -76,7 +76,7 @@ static GtkTargetEntry drag_types[] = {
};
static void
-e_minicard_view_drag_data_get(GtkWidget *widget,
+e_minicard_view_drag_data_get (GtkWidget *widget,
GdkDragContext *context,
GtkSelectionData *selection_data,
guint info,
@@ -85,7 +85,7 @@ e_minicard_view_drag_data_get(GtkWidget *widget,
{
GdkAtom target;
- if (!E_IS_MINICARD_VIEW(view))
+ if (!E_IS_MINICARD_VIEW (view))
return;
target = gtk_selection_data_get_target (selection_data);
@@ -334,7 +334,7 @@ e_minicard_view_get_property (GObject *object,
static void
e_minicard_view_dispose (GObject *object)
{
- EMinicardView *view = E_MINICARD_VIEW(object);
+ EMinicardView *view = E_MINICARD_VIEW (object);
clear_drag_data (view);
@@ -364,8 +364,8 @@ e_minicard_view_dispose (GObject *object)
view->stop_state_id = 0;
view->adapter = NULL;
- if (G_OBJECT_CLASS(parent_class)->dispose)
- G_OBJECT_CLASS(parent_class)->dispose (object);
+ if (G_OBJECT_CLASS (parent_class)->dispose)
+ G_OBJECT_CLASS (parent_class)->dispose (object);
}
static guint
@@ -410,8 +410,8 @@ e_minicard_view_event (GnomeCanvasItem *item, GdkEvent *event)
break;
}
- if (GNOME_CANVAS_ITEM_CLASS(parent_class)->event)
- return GNOME_CANVAS_ITEM_CLASS(parent_class)->event(item, event);
+ if (GNOME_CANVAS_ITEM_CLASS (parent_class)->event)
+ return GNOME_CANVAS_ITEM_CLASS (parent_class)->event (item, event);
else
return FALSE;
}
@@ -435,7 +435,7 @@ e_minicard_view_selection_event (EReflow *reflow,
gint i;
for (i = 0; i < reflow->count; i++) {
if (reflow->items[i] == item) {
- e_selection_model_maybe_do_something(reflow->selection, i, 0, 0);
+ e_selection_model_maybe_do_something (reflow->selection, i, 0, 0);
break;
}
}
@@ -445,7 +445,7 @@ e_minicard_view_selection_event (EReflow *reflow,
if (event->button.button == 3) {
return_val = e_minicard_view_right_click (view, event);
if (!return_val)
- e_selection_model_right_click_up(reflow->selection);
+ e_selection_model_right_click_up (reflow->selection);
}
break;
default:
@@ -485,8 +485,8 @@ do_remove (gint i, gpointer user_data)
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);
+ 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;
@@ -494,7 +494,7 @@ compare_to_utf_str (EMinicard *card, const gchar *utf_str)
if (card->card) {
gchar *file_as;
- g_object_get(card->card,
+ g_object_get (card->card,
"file_as", &file_as,
NULL);
if (file_as)
@@ -583,7 +583,7 @@ e_minicard_view_class_init (EMinicardViewClass *klass)
/* GnomeCanvasItem method overrides */
/* init the accessibility support for e_minicard_view */
- e_minicard_view_a11y_init();
+ e_minicard_view_a11y_init ();
}
static void
@@ -623,7 +623,7 @@ e_minicard_view_get_type (void)
}
void
-e_minicard_view_remove_selection(EMinicardView *view,
+e_minicard_view_remove_selection (EMinicardView *view,
EBookAsyncCallback cb,
gpointer closure)
{
diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c
index 0f3a27b798..e5b5fa8310 100644
--- a/addressbook/gui/widgets/e-minicard.c
+++ b/addressbook/gui/widgets/e-minicard.c
@@ -52,8 +52,8 @@ static void e_minicard_unrealize (GnomeCanvasItem *item);
static void e_minicard_reflow ( GnomeCanvasItem *item, gint flags );
static void e_minicard_style_set (EMinicard *minicard, GtkStyle *previous_style);
-static void e_minicard_resize_children( EMinicard *e_minicard );
-static void remodel( EMinicard *e_minicard );
+static void e_minicard_resize_children ( EMinicard *e_minicard );
+static void remodel ( EMinicard *e_minicard );
static gint e_minicard_drag_begin (EMinicard *minicard, GdkEvent *event);
@@ -64,10 +64,10 @@ static gpointer parent_class;
#define LIST_ICON_NAME "stock_contact-list"
static void
-e_minicard_field_destroy(EMinicardField *field)
+e_minicard_field_destroy (EMinicardField *field)
{
- gtk_object_destroy(GTK_OBJECT(field->label));
- g_free(field);
+ gtk_object_destroy (GTK_OBJECT (field->label));
+ g_free (field);
}
/* The arguments we take */
@@ -239,7 +239,7 @@ e_minicard_class_init (EMinicardClass *class)
GTK_TYPE_STYLE);
/* init the accessibility support for e_minicard */
- e_minicard_a11y_init();
+ e_minicard_a11y_init ();
}
static void
@@ -261,7 +261,7 @@ e_minicard_init (EMinicard *minicard)
minicard->changed = FALSE;
- e_canvas_item_set_reflow_callback(GNOME_CANVAS_ITEM(minicard), e_minicard_reflow);
+ e_canvas_item_set_reflow_callback (GNOME_CANVAS_ITEM (minicard), e_minicard_reflow);
}
static void
@@ -301,7 +301,7 @@ static void
set_has_cursor (EMinicard *minicard, gboolean has_cursor)
{
if (!minicard->has_focus && has_cursor)
- e_canvas_item_grab_focus(GNOME_CANVAS_ITEM (minicard), FALSE);
+ e_canvas_item_grab_focus (GNOME_CANVAS_ITEM (minicard), FALSE);
minicard->has_cursor = has_cursor;
}
@@ -320,27 +320,27 @@ e_minicard_set_property (GObject *object, guint prop_id, const GValue *value, G
case PROP_WIDTH:
if (e_minicard->width != g_value_get_double (value)) {
e_minicard->width = g_value_get_double (value);
- e_minicard_resize_children(e_minicard);
+ e_minicard_resize_children (e_minicard);
if (item->flags & GNOME_CANVAS_ITEM_REALIZED)
- e_canvas_item_request_reflow(item);
+ e_canvas_item_request_reflow (item);
}
break;
case PROP_HAS_FOCUS:
if (e_minicard->fields) {
- if ( g_value_get_int(value) == E_FOCUS_START ||
- g_value_get_int(value) == E_FOCUS_CURRENT) {
- gnome_canvas_item_set(E_MINICARD_FIELD(e_minicard->fields->data)->label,
+ if ( g_value_get_int (value) == E_FOCUS_START ||
+ g_value_get_int (value) == E_FOCUS_CURRENT) {
+ gnome_canvas_item_set (E_MINICARD_FIELD (e_minicard->fields->data)->label,
"has_focus", g_value_get_int (value),
NULL);
} else if (g_value_get_int (value) == E_FOCUS_END) {
- gnome_canvas_item_set(E_MINICARD_FIELD(g_list_last(e_minicard->fields)->data)->label,
+ gnome_canvas_item_set (E_MINICARD_FIELD (g_list_last (e_minicard->fields)->data)->label,
"has_focus", g_value_get_int (value),
NULL);
}
}
else {
if (!e_minicard->has_focus)
- e_canvas_item_grab_focus(item, FALSE);
+ e_canvas_item_grab_focus (item, FALSE);
}
break;
case PROP_SELECTED:
@@ -370,8 +370,8 @@ e_minicard_set_property (GObject *object, guint prop_id, const GValue *value, G
e_minicard->contact = contact;
- remodel(e_minicard);
- e_canvas_item_request_reflow(item);
+ remodel (e_minicard);
+ e_canvas_item_request_reflow (item);
e_minicard->changed = FALSE;
break;
default:
@@ -426,8 +426,8 @@ e_minicard_dispose (GObject *object)
e_minicard = E_MINICARD (object);
if (e_minicard->fields) {
- g_list_foreach(e_minicard->fields, (GFunc) e_minicard_field_destroy, NULL);
- g_list_free(e_minicard->fields);
+ g_list_foreach (e_minicard->fields, (GFunc) e_minicard_field_destroy, NULL);
+ g_list_free (e_minicard->fields);
e_minicard->fields = NULL;
}
@@ -487,12 +487,12 @@ e_minicard_realize (GnomeCanvasItem *item)
canvas = GNOME_CANVAS_ITEM (item)->canvas;
style = gtk_widget_get_style (GTK_WIDGET (canvas));
- if (GNOME_CANVAS_ITEM_CLASS(parent_class)->realize)
- (* GNOME_CANVAS_ITEM_CLASS(parent_class)->realize) (item);
+ if (GNOME_CANVAS_ITEM_CLASS (parent_class)->realize)
+ (* GNOME_CANVAS_ITEM_CLASS (parent_class)->realize) (item);
e_minicard->rect =
- gnome_canvas_item_new( group,
- gnome_canvas_rect_get_type(),
+ gnome_canvas_item_new ( group,
+ gnome_canvas_rect_get_type (),
"x1", (double) 0,
"y1", (double) 0,
"x2", (double) MAX (e_minicard->width - 1, 0),
@@ -501,8 +501,8 @@ e_minicard_realize (GnomeCanvasItem *item)
NULL );
e_minicard->header_rect =
- gnome_canvas_item_new( group,
- gnome_canvas_rect_get_type(),
+ gnome_canvas_item_new ( group,
+ gnome_canvas_rect_get_type (),
"x1", (double) 2,
"y1", (double) 2,
"x2", (double) MAX (e_minicard->width - 3, 0),
@@ -511,8 +511,8 @@ e_minicard_realize (GnomeCanvasItem *item)
NULL );
e_minicard->header_text =
- gnome_canvas_item_new( group,
- e_text_get_type(),
+ gnome_canvas_item_new ( group,
+ e_text_get_type (),
"anchor", GTK_ANCHOR_NW,
"width", (double) MAX( e_minicard->width - 12, 0 ),
"clip", TRUE,
@@ -522,25 +522,25 @@ e_minicard_realize (GnomeCanvasItem *item)
"draw_background", FALSE,
NULL );
- e_canvas_item_move_absolute(e_minicard->header_text, 6, 6);
+ e_canvas_item_move_absolute (e_minicard->header_text, 6, 6);
e_minicard->list_icon =
gnome_canvas_item_new ( group,
- gnome_canvas_pixbuf_get_type(),
+ gnome_canvas_pixbuf_get_type (),
"pixbuf", e_minicard->list_icon_pixbuf,
NULL);
set_selected (e_minicard, e_minicard->selected);
- remodel(e_minicard);
- e_canvas_item_request_reflow(item);
+ remodel (e_minicard);
+ e_canvas_item_request_reflow (item);
}
static void
e_minicard_unrealize (GnomeCanvasItem *item)
{
- if (GNOME_CANVAS_ITEM_CLASS(parent_class)->unrealize)
- (* GNOME_CANVAS_ITEM_CLASS(parent_class)->unrealize) (item);
+ if (GNOME_CANVAS_ITEM_CLASS (parent_class)->unrealize)
+ (* GNOME_CANVAS_ITEM_CLASS (parent_class)->unrealize) (item);
}
void
@@ -567,7 +567,7 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event)
/* Chris: When EMinicard gets the cursor, if it doesn't have the focus, it should take it. */
e_minicard->has_focus = TRUE;
if (!e_minicard->selected) {
- e_minicard_selected(e_minicard, event);
+ e_minicard_selected (e_minicard, event);
}
}
else {
@@ -577,13 +577,13 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event)
break;
case GDK_BUTTON_PRESS: {
if (1 <= event->button.button && event->button.button <= 2) {
- gint ret_val = e_minicard_selected(e_minicard, event);
+ gint ret_val = e_minicard_selected (e_minicard, event);
GdkEventMask mask = ((1 << (4 + event->button.button)) |
GDK_POINTER_MOTION_MASK |
GDK_BUTTON_PRESS_MASK |
GDK_BUTTON_RELEASE_MASK);
- e_canvas_item_grab_focus(item, TRUE);
+ e_canvas_item_grab_focus (item, TRUE);
if (gnome_canvas_item_grab (GNOME_CANVAS_ITEM (e_minicard),
mask, NULL, event->button.time)) {
@@ -596,14 +596,14 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event)
e_minicard->drag_button_down = TRUE;
return ret_val;
} else if (event->button.button == 3) {
- gint ret_val = e_minicard_selected(e_minicard, event);
+ gint ret_val = e_minicard_selected (e_minicard, event);
if (ret_val != 0)
return ret_val;
}
break;
}
case GDK_BUTTON_RELEASE:
- e_minicard_selected(e_minicard, event);
+ e_minicard_selected (e_minicard, event);
if (e_minicard->drag_button == event->button.button) {
e_minicard->drag_button = 0;
e_minicard->drag_button_down = FALSE;
@@ -622,7 +622,7 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event)
abs (e_minicard->button_y - event->motion.y)) > 3) {
gint ret_val;
- ret_val = e_minicard_drag_begin(e_minicard, event);
+ ret_val = e_minicard_drag_begin (e_minicard, event);
e_minicard->drag_button_down = FALSE;
@@ -642,7 +642,7 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event)
event->key.keyval == GDK_ISO_Left_Tab) {
EMinicardView *view = E_MINICARD_VIEW (item->parent);
- EReflow *reflow = E_REFLOW(view);
+ EReflow *reflow = E_REFLOW (view);
if (reflow == NULL) {
return FALSE;
@@ -679,7 +679,7 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event)
return FALSE;
}
else {
- gint row_count = e_selection_model_row_count(reflow->selection);
+ gint row_count = e_selection_model_row_count (reflow->selection);
gint model_index = e_selection_model_cursor_row (reflow->selection);
gint view_index = e_sorter_model_to_sorted (reflow->selection->sorter, model_index);
@@ -696,7 +696,7 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event)
NULL);
}
- e_canvas_item_grab_focus(reflow->items[model_index], FALSE);
+ e_canvas_item_grab_focus (reflow->items[model_index], FALSE);
return TRUE;
}
}
@@ -711,31 +711,31 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event)
break;
}
- if (GNOME_CANVAS_ITEM_CLASS( parent_class )->event)
- return (* GNOME_CANVAS_ITEM_CLASS( parent_class )->event) (item, event);
+ if (GNOME_CANVAS_ITEM_CLASS ( parent_class )->event)
+ return (* GNOME_CANVAS_ITEM_CLASS ( parent_class )->event) (item, event);
else
return FALSE;
}
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));
if (e_minicard->header_text) {
- gnome_canvas_item_set( e_minicard->header_text,
+ gnome_canvas_item_set ( e_minicard->header_text,
"width", ((double) e_minicard->width - 12
- (is_list ? e_minicard->list_icon_size : 0.0)),
NULL );
}
if (e_minicard->list_icon) {
- e_canvas_item_move_absolute(e_minicard->list_icon,
+ e_canvas_item_move_absolute (e_minicard->list_icon,
e_minicard->width - e_minicard->list_icon_size - 3,
3);
}
- for (list = e_minicard->fields; list; list = g_list_next( list )) {
- gnome_canvas_item_set( E_MINICARD_FIELD( list->data )->label,
+ for (list = e_minicard->fields; list; list = g_list_next ( list )) {
+ gnome_canvas_item_set ( E_MINICARD_FIELD ( list->data )->label,
"width", (double) e_minicard->width - 4.0,
NULL );
}
@@ -751,12 +751,12 @@ add_field (EMinicard *e_minicard, EContactField field, gdouble left_width)
gchar *string;
gboolean is_rtl = (gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL);
- group = GNOME_CANVAS_GROUP( e_minicard );
+ group = GNOME_CANVAS_GROUP ( e_minicard );
name = g_strdup_printf("%s:", e_contact_pretty_name (field));
string = e_contact_get (e_minicard->contact, field);
- new_item = e_minicard_label_new(group);
+ new_item = e_minicard_label_new (group);
if (e_minicard->contact && e_contact_get (e_minicard->contact, E_CONTACT_IS_LIST))
gnome_canvas_item_set (new_item,
@@ -776,22 +776,22 @@ add_field (EMinicard *e_minicard, EContactField field, gdouble left_width)
NULL );
#ifdef notyet
- g_object_set(E_MINICARD_LABEL(new_item)->field,
+ g_object_set (E_MINICARD_LABEL (new_item)->field,
"allow_newlines", e_card_simple_get_allow_newlines (e_minicard->contact, field),
NULL);
#endif
- g_object_set_data(G_OBJECT (E_MINICARD_LABEL(new_item)->field),
+ g_object_set_data (G_OBJECT (E_MINICARD_LABEL (new_item)->field),
"EMinicard:field",
- GINT_TO_POINTER(field));
+ GINT_TO_POINTER (field));
- minicard_field = g_new(EMinicardField, 1);
+ minicard_field = g_new (EMinicardField, 1);
minicard_field->field = field;
minicard_field->label = new_item;
- e_minicard->fields = g_list_append( e_minicard->fields, minicard_field);
- e_canvas_item_move_absolute(new_item, 2, e_minicard->height);
- g_free(name);
- g_free(string);
+ e_minicard->fields = g_list_append ( e_minicard->fields, minicard_field);
+ e_canvas_item_move_absolute (new_item, 2, e_minicard->height);
+ g_free (name);
+ g_free (string);
}
static const gchar *
@@ -818,7 +818,7 @@ add_email_field (EMinicard *e_minicard, GList *email_list, gdouble left_width, g
gint count =0;
gboolean is_rtl = (gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL);
GList *emails = e_contact_get (e_minicard->contact, E_CONTACT_EMAIL);
- group = GNOME_CANVAS_GROUP( e_minicard );
+ group = GNOME_CANVAS_GROUP ( e_minicard );
for (l=email_list, le=emails; l!=NULL && count < limit && le!=NULL; l = l->next, le=le->next) {
const gchar *tmp;
@@ -844,7 +844,7 @@ add_email_field (EMinicard *e_minicard, GList *email_list, gdouble left_width, g
string = g_strdup (le->data);
}
- new_item = e_minicard_label_new(group);
+ new_item = e_minicard_label_new (group);
gnome_canvas_item_set (new_item,
"fieldname", is_rtl ? string : name,
@@ -855,20 +855,20 @@ add_email_field (EMinicard *e_minicard, GList *email_list, gdouble left_width, g
NULL );
#ifdef notyet
- g_object_set(E_MINICARD_LABEL(new_item)->field,
+ g_object_set (E_MINICARD_LABEL (new_item)->field,
"allow_newlines", e_card_simple_get_allow_newlines (e_minicard->contact, field),
NULL);
#endif
- g_object_set_data(G_OBJECT (E_MINICARD_LABEL(new_item)->field),
+ g_object_set_data (G_OBJECT (E_MINICARD_LABEL (new_item)->field),
"EMinicard:field",
- GINT_TO_POINTER(E_CONTACT_EMAIL));
+ GINT_TO_POINTER (E_CONTACT_EMAIL));
- minicard_field = g_new(EMinicardField, 1);
+ minicard_field = g_new (EMinicardField, 1);
minicard_field->field = E_CONTACT_EMAIL;
minicard_field->label = new_item;
- e_minicard->fields = g_list_append( e_minicard->fields, minicard_field);
- e_canvas_item_move_absolute(new_item, 2, e_minicard->height);
+ e_minicard->fields = g_list_append ( e_minicard->fields, minicard_field);
+ e_canvas_item_move_absolute (new_item, 2, e_minicard->height);
count++;
if (!is_list)
g_free (name);
@@ -903,14 +903,14 @@ get_left_width (EMinicard *e_minicard, gboolean is_list)
pango_layout_get_pixel_size (layout, &this_width, NULL);
if (width < this_width)
width = this_width;
- g_free(name);
+ g_free (name);
}
g_object_unref (layout);
return width;
}
static void
-remodel( EMinicard *e_minicard )
+remodel ( EMinicard *e_minicard )
{
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (e_minicard);
gint count = 0;
@@ -931,7 +931,7 @@ remodel( EMinicard *e_minicard )
gnome_canvas_item_set (e_minicard->header_text,
"text", file_as ? file_as : "",
NULL );
- g_free(file_as);
+ g_free (file_as);
}
if (e_minicard->contact && e_contact_get (e_minicard->contact, E_CONTACT_IS_LIST))
@@ -967,18 +967,18 @@ remodel( EMinicard *e_minicard )
GList *this_list = list;
gchar *string;
- string = e_contact_get(e_minicard->contact, field);
+ string = e_contact_get (e_minicard->contact, field);
if (string && *string) {
- e_minicard->fields = g_list_append(e_minicard->fields, minicard_field);
- g_object_set(minicard_field->label,
+ e_minicard->fields = g_list_append (e_minicard->fields, minicard_field);
+ g_object_set (minicard_field->label,
"field", string,
NULL);
count++;
} else {
- e_minicard_field_destroy(minicard_field);
+ e_minicard_field_destroy (minicard_field);
}
- list = g_list_delete_link(list, this_list);
- g_free(string);
+ list = g_list_delete_link (list, this_list);
+ g_free (string);
} else {
gchar *string;
if (left_width == -1) {
@@ -998,25 +998,25 @@ remodel( EMinicard *e_minicard )
count = count + g_list_length (email);
g_list_free (email);
} else {
- string = e_contact_get(e_minicard->contact, field);
+ string = e_contact_get (e_minicard->contact, field);
if (string && *string) {
- add_field(e_minicard, field, left_width);
+ add_field (e_minicard, field, left_width);
count++;
}
- g_free(string);
+ g_free (string);
}
}
}
- g_list_foreach(list, (GFunc) e_minicard_field_destroy, NULL);
- g_list_free(list);
+ g_list_foreach (list, (GFunc) e_minicard_field_destroy, NULL);
+ g_list_free (list);
}
}
static void
-e_minicard_reflow(GnomeCanvasItem *item, gint flags)
+e_minicard_reflow (GnomeCanvasItem *item, gint flags)
{
- EMinicard *e_minicard = E_MINICARD(item);
+ EMinicard *e_minicard = E_MINICARD (item);
if (item->flags & GNOME_CANVAS_ITEM_REALIZED) {
GList *list;
@@ -1025,46 +1025,46 @@ e_minicard_reflow(GnomeCanvasItem *item, gint flags)
old_height = e_minicard->height;
- g_object_get(e_minicard->header_text,
+ g_object_get (e_minicard->header_text,
"text_height", &text_height,
NULL);
e_minicard->height = text_height + 10.0;
- gnome_canvas_item_set(e_minicard->header_rect,
+ gnome_canvas_item_set (e_minicard->header_rect,
"y2", text_height + 9.0,
NULL);
- for (list = e_minicard->fields; list; list = g_list_next(list)) {
- EMinicardField *field = E_MINICARD_FIELD(list->data);
+ for (list = e_minicard->fields; list; list = g_list_next (list)) {
+ EMinicardField *field = E_MINICARD_FIELD (list->data);
/* Why not use the item that is passed in? */
GnomeCanvasItem *item = field->label;
g_object_get (item,
"height", &text_height,
NULL);
- e_canvas_item_move_absolute(item, 2, e_minicard->height);
+ e_canvas_item_move_absolute (item, 2, e_minicard->height);
e_minicard->height += text_height;
}
e_minicard->height += 2;
- gnome_canvas_item_set(e_minicard->rect,
+ gnome_canvas_item_set (e_minicard->rect,
"x2", (double) e_minicard->width - 1.0,
"y2", (double) e_minicard->height - 1.0,
NULL);
- gnome_canvas_item_set(e_minicard->header_rect,
+ gnome_canvas_item_set (e_minicard->header_rect,
"x2", (double) e_minicard->width - 3.0,
NULL);
if (old_height != e_minicard->height)
- e_canvas_item_request_parent_reflow(item);
+ e_canvas_item_request_parent_reflow (item);
}
}
const gchar *
e_minicard_get_card_id (EMinicard *minicard)
{
- g_return_val_if_fail(minicard != NULL, NULL);
- g_return_val_if_fail(E_IS_MINICARD(minicard), NULL);
+ g_return_val_if_fail (minicard != NULL, NULL);
+ g_return_val_if_fail (E_IS_MINICARD (minicard), NULL);
if (minicard->contact) {
return e_contact_get_const (minicard->contact, E_CONTACT_UID);
@@ -1078,28 +1078,28 @@ e_minicard_compare (EMinicard *minicard1, EMinicard *minicard2)
{
gint cmp = 0;
- g_return_val_if_fail(minicard1 != NULL, 0);
- g_return_val_if_fail(E_IS_MINICARD(minicard1), 0);
- g_return_val_if_fail(minicard2 != NULL, 0);
- g_return_val_if_fail(E_IS_MINICARD(minicard2), 0);
+ g_return_val_if_fail (minicard1 != NULL, 0);
+ g_return_val_if_fail (E_IS_MINICARD (minicard1), 0);
+ g_return_val_if_fail (minicard2 != NULL, 0);
+ g_return_val_if_fail (E_IS_MINICARD (minicard2), 0);
if (minicard1->contact && minicard2->contact) {
gchar *file_as1, *file_as2;
- g_object_get(minicard1->contact,
+ g_object_get (minicard1->contact,
"file_as", &file_as1,
NULL);
- g_object_get(minicard2->contact,
+ g_object_get (minicard2->contact,
"file_as", &file_as2,
NULL);
if (file_as1 && file_as2)
- cmp = g_utf8_collate(file_as1, file_as2);
+ cmp = g_utf8_collate (file_as1, file_as2);
else if (file_as1)
cmp = -1;
else if (file_as2)
cmp = 1;
else
- cmp = strcmp(e_minicard_get_card_id(minicard1), e_minicard_get_card_id(minicard2));
+ cmp = strcmp (e_minicard_get_card_id (minicard1), e_minicard_get_card_id (minicard2));
g_free (file_as1);
g_free (file_as2);
@@ -1120,7 +1120,7 @@ e_minicard_selected (EMinicard *minicard, GdkEvent *event)
* it.
*/
if (signal_id != 0) {
- g_signal_emit(item->parent,
+ g_signal_emit (item->parent,
signal_id, 0,
item, event, &ret_val);
}
diff --git a/addressbook/gui/widgets/ea-addressbook-view.c b/addressbook/gui/widgets/ea-addressbook-view.c
index b2d7ebb171..f0096e6489 100644
--- a/addressbook/gui/widgets/ea-addressbook-view.c
+++ b/addressbook/gui/widgets/ea-addressbook-view.c
@@ -88,7 +88,7 @@ ea_ab_view_class_init (EAddressbookViewClass *class)
static G_CONST_RETURN gchar *
ea_ab_view_get_name (AtkObject *accessible)
{
- g_return_val_if_fail (EA_IS_AB_VIEW(accessible), NULL);
+ g_return_val_if_fail (EA_IS_AB_VIEW (accessible), NULL);
if (accessible->name)
return accessible->name;
@@ -110,8 +110,8 @@ ea_ab_view_new (GObject *obj)
GObject *object;
AtkObject *accessible;
- g_return_val_if_fail(obj != NULL, NULL);
- g_return_val_if_fail (E_IS_ADDRESSBOOK_VIEW(obj), NULL);
+ g_return_val_if_fail (obj != NULL, NULL);
+ g_return_val_if_fail (E_IS_ADDRESSBOOK_VIEW (obj), NULL);
object = g_object_new (EA_TYPE_AB_VIEW, NULL);
diff --git a/addressbook/gui/widgets/ea-addressbook-view.h b/addressbook/gui/widgets/ea-addressbook-view.h
index 6179b6758e..db9e008ab1 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 14fc4c1ca3..797d76d956 100644
--- a/addressbook/gui/widgets/ea-addressbook.c
+++ b/addressbook/gui/widgets/ea-addressbook.c
@@ -47,7 +47,7 @@ void e_minicard_view_a11y_init (void)
if (atk_get_root ()) {
g_signal_add_emission_hook (g_signal_lookup ("event",
- e_minicard_get_type()),
+ e_minicard_get_type ()),
0, ea_addressbook_focus_watcher,
NULL, (GDestroyNotify) NULL);
}
diff --git a/addressbook/gui/widgets/ea-minicard-view.c b/addressbook/gui/widgets/ea-minicard-view.c
index 52624296a3..bb38b64ecc 100644
--- a/addressbook/gui/widgets/ea-minicard-view.c
+++ b/addressbook/gui/widgets/ea-minicard-view.c
@@ -42,7 +42,7 @@ static void ea_minicard_view_class_init (EaMinicardViewClass *klass);
static gint ea_minicard_view_get_n_children (AtkObject *obj);
static AtkObject *ea_minicard_view_ref_child (AtkObject *obj, gint i);
-static AtkStateSet *ea_minicard_view_ref_state_set(AtkObject *obj);
+static AtkStateSet *ea_minicard_view_ref_state_set (AtkObject *obj);
static void atk_selection_interface_init (AtkSelectionIface *iface);
static gboolean selection_interface_add_selection (AtkSelection *selection,
@@ -170,14 +170,14 @@ ea_minicard_view_get_name (AtkObject *accessible)
ATK_OBJECT_CLASS (parent_class)->set_name (accessible, string);
g_free (string);
- g_object_unref(book);
+ g_object_unref (book);
return accessible->name;
}
static G_CONST_RETURN gchar *
ea_minicard_view_get_description (AtkObject *accessible)
{
- g_return_val_if_fail (EA_IS_MINICARD_VIEW(accessible), NULL);
+ g_return_val_if_fail (EA_IS_MINICARD_VIEW (accessible), NULL);
if (accessible->description)
return accessible->description;
@@ -190,7 +190,7 @@ ea_minicard_view_new (GObject *obj)
GObject *object;
AtkObject *accessible;
- g_return_val_if_fail (E_IS_MINICARD_VIEW(obj), NULL);
+ g_return_val_if_fail (E_IS_MINICARD_VIEW (obj), NULL);
object = g_object_new (EA_TYPE_MINICARD_VIEW, NULL);
accessible = ATK_OBJECT (object);
atk_object_initialize (accessible, obj);
@@ -208,7 +208,7 @@ ea_minicard_view_get_n_children (AtkObject *accessible)
g_return_val_if_fail (EA_IS_MINICARD_VIEW (accessible), -1);
reflow = E_REFLOW (atk_gobject_accessible_get_object (
- ATK_GOBJECT_ACCESSIBLE(accessible)));
+ ATK_GOBJECT_ACCESSIBLE (accessible)));
if (!reflow)
return -1;
@@ -309,7 +309,7 @@ selection_interface_clear_selection (AtkSelection *selection)
EReflow *reflow = NULL;
atk_gobj = ATK_GOBJECT_ACCESSIBLE (selection);
- reflow = E_REFLOW(atk_gobject_accessible_get_object (atk_gobj));
+ reflow = E_REFLOW (atk_gobject_accessible_get_object (atk_gobj));
if (!reflow)
return FALSE;
@@ -347,7 +347,7 @@ selection_interface_is_child_selected (AtkSelection *selection, gint i)
EReflow *reflow = NULL;
atk_gobj = ATK_GOBJECT_ACCESSIBLE (selection);
- reflow = E_REFLOW(atk_gobject_accessible_get_object (atk_gobj));
+ reflow = E_REFLOW (atk_gobject_accessible_get_object (atk_gobj));
if (!reflow)
return FALSE;
diff --git a/addressbook/gui/widgets/ea-minicard-view.h b/addressbook/gui/widgets/ea-minicard-view.h
index cc8eaecae7..320c74d15e 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 19ee25b9e5..9bf6742247 100644
--- a/addressbook/gui/widgets/ea-minicard.c
+++ b/addressbook/gui/widgets/ea-minicard.c
@@ -139,11 +139,11 @@ ea_minicard_get_name (AtkObject *accessible)
gchar *string;
EMinicard *card;
- g_return_val_if_fail (EA_IS_MINICARD(accessible), NULL);
+ g_return_val_if_fail (EA_IS_MINICARD (accessible), NULL);
memset (name, '\0', BUFFERSIZE);
- card = E_MINICARD(atk_gobject_accessible_get_object
- (ATK_GOBJECT_ACCESSIBLE(accessible)));
+ card = E_MINICARD (atk_gobject_accessible_get_object
+ (ATK_GOBJECT_ACCESSIBLE (accessible)));
if (!card)
return NULL;
@@ -186,8 +186,8 @@ ea_minicard_new (GObject *obj)
GObject *object;
AtkObject *accessible;
- g_return_val_if_fail(obj != NULL, NULL);
- g_return_val_if_fail (E_IS_MINICARD(obj), NULL);
+ g_return_val_if_fail (obj != NULL, NULL);
+ g_return_val_if_fail (E_IS_MINICARD (obj), NULL);
object = g_object_new (EA_TYPE_MINICARD, NULL);
accessible = ATK_OBJECT (object);
diff --git a/addressbook/gui/widgets/ea-minicard.h b/addressbook/gui/widgets/ea-minicard.h
index 8b49ab6284..d4c96fa787 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 f47a696195..79ba6c8445 100644
--- a/addressbook/gui/widgets/eab-config.c
+++ b/addressbook/gui/widgets/eab-config.c
@@ -42,7 +42,7 @@ ecp_init (GObject *o)
static void
ecp_target_free (EConfig *ec, EConfigTarget *t)
{
- struct _EABConfigPrivate *p = _PRIVATE(ec);
+ struct _EABConfigPrivate *p = _PRIVATE (ec);
if (ec->target == t) {
switch (t->type) {
@@ -50,7 +50,7 @@ ecp_target_free (EConfig *ec, EConfigTarget *t)
EABConfigTargetSource *s = (EABConfigTargetSource *)t;
if (p->source_changed_id) {
- g_signal_handler_disconnect(s->source, p->source_changed_id);
+ g_signal_handler_disconnect (s->source, p->source_changed_id);
p->source_changed_id = 0;
}
break; }
@@ -70,17 +70,17 @@ ecp_target_free (EConfig *ec, EConfigTarget *t)
}
static void
-ecp_source_changed(struct _ESource *source, EConfig *ec)
+ecp_source_changed (struct _ESource *source, EConfig *ec)
{
- e_config_target_changed(ec, E_CONFIG_TARGET_CHANGED_STATE);
+ e_config_target_changed (ec, E_CONFIG_TARGET_CHANGED_STATE);
}
static void
ecp_set_target (EConfig *ec, EConfigTarget *t)
{
- struct _EABConfigPrivate *p = _PRIVATE(ec);
+ struct _EABConfigPrivate *p = _PRIVATE (ec);
- ((EConfigClass *)ecp_parent_class)->set_target(ec, t);
+ ((EConfigClass *)ecp_parent_class)->set_target (ec, t);
if (t) {
switch (t->type) {
@@ -99,7 +99,7 @@ ecp_class_init (GObjectClass *klass)
((EConfigClass *)klass)->set_target = ecp_set_target;
((EConfigClass *)klass)->target_free = ecp_target_free;
- g_type_class_add_private(klass, sizeof(struct _EABConfigPrivate));
+ g_type_class_add_private (klass, sizeof (struct _EABConfigPrivate));
}
GType
@@ -127,7 +127,7 @@ eab_config_get_type (void)
EABConfig *
eab_config_new (gint type, const gchar *menuid)
{
- EABConfig *ecp = g_object_new (eab_config_get_type(), NULL);
+ EABConfig *ecp = g_object_new (eab_config_get_type (), NULL);
e_config_construct (&ecp->config, type, menuid);
return ecp;
}
diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c
index 9ca8033291..4cf5219e71 100644
--- a/addressbook/gui/widgets/eab-gui-util.c
+++ b/addressbook/gui/widgets/eab-gui-util.c
@@ -312,7 +312,7 @@ do_delete (gpointer data, gpointer user_data)
const gchar *id;
id = e_contact_get_const (contact, E_CONTACT_UID);
- e_book_remove_contact(book, id, NULL);
+ e_book_remove_contact (book, id, NULL);
}
static void
@@ -374,7 +374,7 @@ do_copy (gpointer data, gpointer user_data)
book = process->destination;
process->count++;
- eab_merging_book_add_contact(book, contact, contact_added_cb, process);
+ eab_merging_book_add_contact (book, contact, contact_added_cb, process);
}
static void
diff --git a/addressbook/gui/widgets/gal-view-minicard.c b/addressbook/gui/widgets/gal-view-minicard.c
index e5fe93d380..baf62eca4e 100644
--- a/addressbook/gui/widgets/gal-view-minicard.c
+++ b/addressbook/gui/widgets/gal-view-minicard.c
@@ -140,7 +140,7 @@ view_minicard_clone (GalView *view)
GalViewMinicard *view_minicard;
GalViewMinicard *clone;
- view_minicard = GAL_VIEW_MINICARD(view);
+ view_minicard = GAL_VIEW_MINICARD (view);
clone = g_object_new (GAL_TYPE_VIEW_MINICARD, NULL);
clone->column_width = view_minicard->column_width;
diff --git a/addressbook/importers/evolution-addressbook-importers.h b/addressbook/importers/evolution-addressbook-importers.h
index adaa62931a..8278e67b12 100644
--- a/addressbook/importers/evolution-addressbook-importers.h
+++ b/addressbook/importers/evolution-addressbook-importers.h
@@ -18,11 +18,11 @@
*
*/
-struct _EImportImporter *evolution_ldif_importer_peek(void);
-struct _EImportImporter *evolution_vcard_importer_peek(void);
-struct _EImportImporter *evolution_csv_outlook_importer_peek(void);
-struct _EImportImporter *evolution_csv_mozilla_importer_peek(void);
-struct _EImportImporter *evolution_csv_evolution_importer_peek(void);
+struct _EImportImporter *evolution_ldif_importer_peek (void);
+struct _EImportImporter *evolution_vcard_importer_peek (void);
+struct _EImportImporter *evolution_csv_outlook_importer_peek (void);
+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 GList *contacts);
diff --git a/addressbook/importers/evolution-csv-importer.c b/addressbook/importers/evolution-csv-importer.c
index 20025c81ec..3e86679c96 100644
--- a/addressbook/importers/evolution-csv-importer.c
+++ b/addressbook/importers/evolution-csv-importer.c
@@ -69,7 +69,7 @@ typedef struct {
static gint importer;
static gchar delimiter;
-static void csv_import_done(CSVImporter *gci);
+static void csv_import_done (CSVImporter *gci);
typedef struct {
const gchar *csv_attribute;
@@ -266,7 +266,7 @@ 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;
@@ -274,14 +274,14 @@ add_to_notes(EContact *contact, const gchar *field_text, gchar *val)
return;
new_text = g_string_new (e_contact_get_const (contact, E_CONTACT_NOTE));
- if (strlen(new_text->str) != 0)
- new_text = g_string_append_c(new_text, '\n');
- new_text = g_string_append(new_text, field_text);
- new_text = g_string_append_c(new_text, ':');
- new_text = g_string_append(new_text, val);
-
- e_contact_set(contact, E_CONTACT_NOTE, new_text->str);
- g_string_free(new_text, TRUE);
+ if (strlen (new_text->str) != 0)
+ new_text = g_string_append_c (new_text, '\n');
+ new_text = g_string_append (new_text, field_text);
+ new_text = g_string_append_c (new_text, ':');
+ new_text = g_string_append (new_text, val);
+
+ e_contact_set (contact, E_CONTACT_NOTE, new_text->str);
+ g_string_free (new_text, TRUE);
}
/* @str: a date string in the format MM-DD-YYYY or MMDDYYYY */
@@ -293,7 +293,7 @@ date_from_string (const gchar *str)
g_return_val_if_fail (str != NULL, NULL);
- date = e_contact_date_new();
+ 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;
@@ -424,10 +424,10 @@ parseLine (CSVImporter *gci, EContact *contact, gchar *buf) {
home_street = g_string_new("");
work_street = g_string_new("");
other_street = g_string_new("");
- home_address = g_new0(EContactAddress, 1);
- work_address = g_new0(EContactAddress, 1);
- other_address = g_new0(EContactAddress, 1);
- bday = g_new0(EContactDate, 1);
+ home_address = g_new0 (EContactAddress, 1);
+ work_address = g_new0 (EContactAddress, 1);
+ other_address = g_new0 (EContactAddress, 1);
+ bday = g_new0 (EContactDate, 1);
if (!g_utf8_validate (pptr, -1, NULL)) {
do_free = g_convert (pptr, -1, "UTF-8", "ISO-8859-1", NULL, NULL, NULL);
@@ -492,87 +492,87 @@ parseLine (CSVImporter *gci, EContact *contact, gchar *buf) {
switch (flags) {
case FLAG_HOME_ADDRESS|FLAG_STREET:
- if (strlen(home_street->str) != 0) {
+ if (strlen (home_street->str) != 0) {
home_street = g_string_append(home_street, ",\n");
}
- home_street = g_string_append(home_street, value->str);
+ home_street = g_string_append (home_street, value->str);
break;
case FLAG_HOME_ADDRESS|FLAG_CITY:
- home_address->locality = g_strdup(value->str);
+ home_address->locality = g_strdup (value->str);
break;
case FLAG_HOME_ADDRESS|FLAG_STATE:
- home_address->region = g_strdup(value->str);
+ home_address->region = g_strdup (value->str);
break;
case FLAG_HOME_ADDRESS|FLAG_POSTAL_CODE:
- home_address->code = g_strdup(value->str);
+ home_address->code = g_strdup (value->str);
break;
case FLAG_HOME_ADDRESS|FLAG_POBOX:
- home_address->po = g_strdup(value->str);
+ home_address->po = g_strdup (value->str);
break;
case FLAG_HOME_ADDRESS|FLAG_COUNTRY:
- home_address->country = g_strdup(value->str);
+ home_address->country = g_strdup (value->str);
break;
case FLAG_WORK_ADDRESS|FLAG_STREET:
- if (strlen(work_street->str) != 0) {
+ if (strlen (work_street->str) != 0) {
work_street = g_string_append(work_street, ",\n");
}
- work_street = g_string_append(work_street, value->str);
+ work_street = g_string_append (work_street, value->str);
break;
case FLAG_WORK_ADDRESS|FLAG_CITY:
- work_address->locality = g_strdup(value->str);
+ work_address->locality = g_strdup (value->str);
break;
case FLAG_WORK_ADDRESS|FLAG_STATE:
- work_address->region = g_strdup(value->str);
+ work_address->region = g_strdup (value->str);
break;
case FLAG_WORK_ADDRESS|FLAG_POSTAL_CODE:
- work_address->code = g_strdup(value->str);
+ work_address->code = g_strdup (value->str);
break;
case FLAG_WORK_ADDRESS|FLAG_POBOX:
- work_address->po = g_strdup(value->str);
+ work_address->po = g_strdup (value->str);
break;
case FLAG_WORK_ADDRESS|FLAG_COUNTRY:
- work_address->country = g_strdup(value->str);
+ work_address->country = g_strdup (value->str);
break;
case FLAG_OTHER_ADDRESS|FLAG_STREET:
- if (strlen(other_street->str) != 0) {
+ if (strlen (other_street->str) != 0) {
other_street = g_string_append(other_street, ",\n");
}
- other_street = g_string_append(other_street, value->str);
+ other_street = g_string_append (other_street, value->str);
break;
case FLAG_OTHER_ADDRESS|FLAG_CITY:
- other_address->locality = g_strdup(value->str);
+ other_address->locality = g_strdup (value->str);
break;
case FLAG_OTHER_ADDRESS|FLAG_STATE:
- other_address->region = g_strdup(value->str);
+ other_address->region = g_strdup (value->str);
break;
case FLAG_OTHER_ADDRESS|FLAG_POSTAL_CODE:
- other_address->code = g_strdup(value->str);
+ other_address->code = g_strdup (value->str);
break;
case FLAG_OTHER_ADDRESS|FLAG_POBOX:
- other_address->po = g_strdup(value->str);
+ other_address->po = g_strdup (value->str);
break;
case FLAG_OTHER_ADDRESS|FLAG_COUNTRY:
- other_address->country = g_strdup(value->str);
+ other_address->country = g_strdup (value->str);
break;
case FLAG_DATE_BDAY:
- e_contact_set(contact, E_CONTACT_BIRTH_DATE, date_from_string(value->str));
+ e_contact_set (contact, E_CONTACT_BIRTH_DATE, date_from_string (value->str));
break;
case FLAG_DATE_ANNIVERSARY:
- e_contact_set(contact, E_CONTACT_ANNIVERSARY, date_from_string(value->str));
+ e_contact_set (contact, E_CONTACT_ANNIVERSARY, date_from_string (value->str));
break;
case FLAG_BIRTH_DAY:
- bday->day = atoi(value->str);
+ bday->day = atoi (value->str);
break;
case FLAG_BIRTH_YEAR:
- bday->year = atoi(value->str);
+ bday->year = atoi (value->str);
break;
case FLAG_BIRTH_MONTH:
- bday->month = atoi(value->str);
+ bday->month = atoi (value->str);
break;
case FLAG_INVALID:
@@ -585,17 +585,17 @@ parseLine (CSVImporter *gci, EContact *contact, gchar *buf) {
}
}
ii++;
- g_string_free(value, TRUE);
+ g_string_free (value, TRUE);
}
- if (strlen(home_street->str) != 0)
- home_address->street = g_strdup(home_street->str);
- if (strlen(work_street->str) != 0)
- work_address->street = g_strdup(work_street->str);
- if (strlen(other_street->str) != 0)
- other_address->street = g_strdup(other_street->str);
- g_string_free(home_street, TRUE);
- g_string_free(work_street, TRUE);
- g_string_free(other_street, TRUE);
+ if (strlen (home_street->str) != 0)
+ home_address->street = g_strdup (home_street->str);
+ if (strlen (work_street->str) != 0)
+ work_address->street = g_strdup (work_street->str);
+ if (strlen (other_street->str) != 0)
+ other_address->street = g_strdup (other_street->str);
+ g_string_free (home_street, TRUE);
+ g_string_free (work_street, TRUE);
+ g_string_free (other_street, TRUE);
if (home_address->locality || home_address->country ||
home_address->code || home_address->region || home_address->street)
@@ -609,7 +609,7 @@ parseLine (CSVImporter *gci, EContact *contact, gchar *buf) {
if (importer != OUTLOOK_IMPORTER) {
if (bday->day || bday->year || bday->month)
- e_contact_set(contact, E_CONTACT_BIRTH_DATE, bday);
+ e_contact_set (contact, E_CONTACT_BIRTH_DATE, bday);
}
g_free (do_free);
@@ -618,7 +618,7 @@ 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;
@@ -679,40 +679,40 @@ getNextCSVEntry(CSVImporter *gci, FILE *f) {
g_string_free (line, TRUE);
- if (strlen(str->str) == 0) {
- g_string_free(str, TRUE);
+ if (strlen (str->str) == 0) {
+ g_string_free (str, TRUE);
return NULL;
}
- contact = e_contact_new();
+ contact = e_contact_new ();
buf = str->str;
if (!parseLine (gci, contact, buf)) {
- g_object_unref(contact);
+ g_object_unref (contact);
return NULL;
}
gci->count++;
- g_string_free(str, TRUE);
+ g_string_free (str, TRUE);
return contact;
}
static gboolean
-csv_import_contacts(gpointer d) {
+csv_import_contacts (gpointer d) {
CSVImporter *gci = d;
EContact *contact = NULL;
- while ((contact = getNextCSVEntry(gci, gci->file))) {
- e_book_add_contact(gci->book, contact, NULL);
- gci->contacts = g_slist_prepend(gci->contacts, contact);
+ while ((contact = getNextCSVEntry (gci, gci->file))) {
+ e_book_add_contact (gci->book, contact, NULL);
+ gci->contacts = g_slist_prepend (gci->contacts, contact);
}
if (contact == NULL) {
gci->state = 1;
}
if (gci->state == 1) {
- csv_import_done(gci);
+ csv_import_done (gci);
return FALSE;
}
else {
@@ -727,12 +727,12 @@ static void
primary_selection_changed_cb (ESourceSelector *selector, EImportTarget *target)
{
g_datalist_set_data_full(&target->data, "csv-source",
- g_object_ref(e_source_selector_peek_primary_selection(selector)),
+ g_object_ref (e_source_selector_peek_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;
@@ -751,7 +751,7 @@ csv_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im)
primary = g_datalist_get_data(&target->data, "csv-source");
if (primary == NULL) {
primary = e_source_list_peek_source_any (source_list);
- g_object_ref(primary);
+ g_object_ref (primary);
g_datalist_set_data_full(&target->data, "csv-source", primary, g_object_unref);
}
e_source_selector_set_primary_selection (E_SOURCE_SELECTOR (selector), primary);
@@ -771,7 +771,7 @@ 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;
@@ -787,12 +787,12 @@ csv_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
if (strncmp(s->uri_src, "file:///", 8) != 0)
return FALSE;
- ext = strrchr(s->uri_src, '.');
+ ext = strrchr (s->uri_src, '.');
if (ext == NULL)
return FALSE;
for (i = 0; supported_extensions[i] != NULL; i++) {
- if (g_ascii_strcasecmp(supported_extensions[i], ext) == 0) {
+ if (g_ascii_strcasecmp (supported_extensions[i], ext) == 0) {
if (i == 0) {
delimiter = CSV_FILE_DELIMITER;
}
@@ -807,21 +807,21 @@ csv_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
}
static void
-csv_import_done(CSVImporter *gci)
+csv_import_done (CSVImporter *gci)
{
if (gci->idle_id)
- g_source_remove(gci->idle_id);
+ g_source_remove (gci->idle_id);
fclose (gci->file);
- g_object_unref(gci->book);
- g_slist_foreach(gci->contacts, (GFunc) g_object_unref, NULL);
- g_slist_free(gci->contacts);
+ g_object_unref (gci->book);
+ g_slist_foreach (gci->contacts, (GFunc) g_object_unref, NULL);
+ g_slist_free (gci->contacts);
if (gci->fields_map)
g_hash_table_destroy (gci->fields_map);
- e_import_complete(gci->import, gci->target);
- g_object_unref(gci->import);
+ e_import_complete (gci->import, gci->target);
+ g_object_unref (gci->import);
g_free (gci);
}
@@ -844,7 +844,7 @@ csv_import (EImport *ei, EImportTarget *target, EImportImporter *im)
book = e_book_new(g_datalist_get_data(&target->data, "csv-source"), NULL);
if (book == NULL) {
g_message("Couldn't Create EBook");
- e_import_complete(ei, target);
+ e_import_complete (ei, target);
g_free (filename);
return;
}
@@ -853,51 +853,51 @@ csv_import (EImport *ei, EImportTarget *target, EImportImporter *im)
g_free (filename);
if (file == NULL) {
g_message("Can't open .csv file");
- e_import_complete(ei, target);
- g_object_unref(book);
+ e_import_complete (ei, target);
+ g_object_unref (book);
return;
}
- gci = g_malloc0(sizeof(*gci));
+ gci = g_malloc0 (sizeof (*gci));
g_datalist_set_data(&target->data, "csv-data", gci);
- gci->import = g_object_ref(ei);
+ gci->import = g_object_ref (ei);
gci->target = target;
gci->book = book;
gci->file = file;
gci->fields_map = NULL;
gci->count = 0;
- fseek(file, 0, SEEK_END);
- gci->size = ftell(file);
- fseek(file, 0, SEEK_SET);
+ fseek (file, 0, SEEK_END);
+ gci->size = ftell (file);
+ fseek (file, 0, SEEK_SET);
- e_book_open(gci->book, FALSE, NULL);
+ e_book_open (gci->book, FALSE, NULL);
gci->idle_id = g_idle_add (csv_import_contacts, gci);
}
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);
+ 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);
+ 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);
+ 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)
@@ -932,7 +932,7 @@ csv_get_preview (EImport *ei, EImportTarget *target, EImportImporter *im)
gci->file = file;
gci->fields_map = NULL;
gci->count = 0;
- fseek(file, 0, SEEK_END);
+ fseek (file, 0, SEEK_END);
gci->size = ftell (file);
fseek (file, 0, SEEK_SET);
@@ -1003,7 +1003,7 @@ static EImportImporter csv_evolution_importer = {
};
EImportImporter *
-evolution_csv_outlook_importer_peek(void)
+evolution_csv_outlook_importer_peek (void)
{
csv_outlook_importer.name = _("Outlook CSV or Tab (.csv, .tab)");
csv_outlook_importer.description = _("Outlook CSV and Tab Importer");
@@ -1012,7 +1012,7 @@ evolution_csv_outlook_importer_peek(void)
}
EImportImporter *
-evolution_csv_mozilla_importer_peek(void)
+evolution_csv_mozilla_importer_peek (void)
{
csv_mozilla_importer.name = _("Mozilla CSV or Tab (.csv, .tab)");
csv_mozilla_importer.description = _("Mozilla CSV and Tab Importer");
@@ -1021,7 +1021,7 @@ evolution_csv_mozilla_importer_peek(void)
}
EImportImporter *
-evolution_csv_evolution_importer_peek(void)
+evolution_csv_evolution_importer_peek (void)
{
csv_evolution_importer.name = _("Evolution CSV or Tab (.csv, .tab)");
csv_evolution_importer.description = _("Evolution CSV and Tab Importer");
diff --git a/addressbook/importers/evolution-ldif-importer.c b/addressbook/importers/evolution-ldif-importer.c
index 9eb9ca5bb6..5d42ff7a00 100644
--- a/addressbook/importers/evolution-ldif-importer.c
+++ b/addressbook/importers/evolution-ldif-importer.c
@@ -69,7 +69,7 @@ typedef struct {
GSList *list_iterator;
} LDIFImporter;
-static void ldif_import_done(LDIFImporter *gci);
+static void ldif_import_done (LDIFImporter *gci);
static struct {
const gchar *ldif_attribute;
@@ -129,7 +129,7 @@ ldif_fields[] = {
};
static GString *
-getValue( gchar **src )
+getValue ( gchar **src )
{
GString *dest = g_string_new("");
gchar *s = *src;
@@ -254,16 +254,16 @@ parseLine (GHashTable *dn_contact_hash, EContact *contact,
return FALSE;
}
- colon = (gchar *)strchr( ptr, ':' );
+ colon = (gchar *)strchr ( ptr, ':' );
if (colon) {
gint i;
*colon = 0;
value = colon + 1;
- while (isspace(*value))
+ while (isspace (*value))
value++;
- ldif_value = getValue(&value );
+ ldif_value = getValue (&value );
field_handled = FALSE;
for (i = 0; i < G_N_ELEMENTS (ldif_fields); i++) {
@@ -342,7 +342,7 @@ 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;
@@ -353,7 +353,7 @@ getNextLDIFEntry(GHashTable *dn_contact_hash, FILE *f )
str = g_string_new ("");
/* read from the file until we get to a blank line (or eof) */
while (!feof (f)) {
- if (!fgets (line, sizeof(line), f))
+ if (!fgets (line, sizeof (line), f))
break;
if (line[0] == '\n' || (line[0] == '\r' && line[1] == '\n'))
break;
@@ -469,7 +469,7 @@ add_to_notes (EContact *contact, EContactField field)
}
static gboolean
-ldif_import_contacts(gpointer d)
+ldif_import_contacts (gpointer d)
{
LDIFImporter *gci = d;
EContact *contact;
@@ -480,15 +480,15 @@ ldif_import_contacts(gpointer d)
ones till the end */
if (gci->state == 0) {
- while (count < 50 && (contact = getNextLDIFEntry(gci->dn_contact_hash, gci->file))) {
+ while (count < 50 && (contact = getNextLDIFEntry (gci->dn_contact_hash, gci->file))) {
if (e_contact_get (contact, E_CONTACT_IS_LIST)) {
- gci->list_contacts = g_slist_prepend(gci->list_contacts, contact);
+ gci->list_contacts = g_slist_prepend (gci->list_contacts, contact);
} else {
- add_to_notes(contact, E_CONTACT_OFFICE);
- add_to_notes(contact, E_CONTACT_SPOUSE);
- add_to_notes(contact, E_CONTACT_BLOG_URL);
- e_book_add_contact(gci->book, contact, NULL);
- gci->contacts = g_slist_prepend(gci->contacts, contact);
+ add_to_notes (contact, E_CONTACT_OFFICE);
+ add_to_notes (contact, E_CONTACT_SPOUSE);
+ add_to_notes (contact, E_CONTACT_BLOG_URL);
+ e_book_add_contact (gci->book, contact, NULL);
+ gci->contacts = g_slist_prepend (gci->contacts, contact);
}
count++;
}
@@ -500,8 +500,8 @@ ldif_import_contacts(gpointer d)
if (gci->state == 1) {
for (iter = gci->list_iterator;count < 50 && iter;iter=iter->next) {
contact = iter->data;
- resolve_list_card(gci, contact);
- e_book_add_contact(gci->book, contact, NULL);
+ resolve_list_card (gci, contact);
+ e_book_add_contact (gci->book, contact, NULL);
count++;
}
gci->list_iterator = iter;
@@ -509,7 +509,7 @@ ldif_import_contacts(gpointer d)
gci->state = 2;
}
if (gci->state == 2) {
- ldif_import_done(gci);
+ ldif_import_done (gci);
return FALSE;
} else {
e_import_status (
@@ -523,12 +523,12 @@ static void
primary_selection_changed_cb (ESourceSelector *selector, EImportTarget *target)
{
g_datalist_set_data_full(&target->data, "ldif-source",
- g_object_ref(e_source_selector_peek_primary_selection(selector)),
+ g_object_ref (e_source_selector_peek_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;
@@ -547,7 +547,7 @@ ldif_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im)
primary = g_datalist_get_data(&target->data, "ldif-source");
if (primary == NULL) {
primary = e_source_list_peek_source_any (source_list);
- g_object_ref(primary);
+ g_object_ref (primary);
g_datalist_set_data_full (
&target->data, "ldif-source", primary,
(GDestroyNotify) g_object_unref);
@@ -570,7 +570,7 @@ 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;
@@ -586,12 +586,12 @@ ldif_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
if (strncmp(s->uri_src, "file:///", 8) != 0)
return FALSE;
- ext = strrchr(s->uri_src, '.');
+ ext = strrchr (s->uri_src, '.');
if (ext == NULL)
return FALSE;
for (i = 0; supported_extensions[i] != NULL; i++) {
- if (g_ascii_strcasecmp(supported_extensions[i], ext) == 0)
+ if (g_ascii_strcasecmp (supported_extensions[i], ext) == 0)
return TRUE;
}
@@ -599,27 +599,27 @@ ldif_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
}
static void
-ldif_import_done(LDIFImporter *gci)
+ldif_import_done (LDIFImporter *gci)
{
if (gci->idle_id)
- g_source_remove(gci->idle_id);
+ g_source_remove (gci->idle_id);
fclose (gci->file);
- g_object_unref(gci->book);
- g_slist_foreach(gci->contacts, (GFunc) g_object_unref, NULL);
- g_slist_foreach(gci->list_contacts, (GFunc) g_object_unref, NULL);
- g_slist_free(gci->contacts);
- g_slist_free(gci->list_contacts);
- g_hash_table_destroy(gci->dn_contact_hash);
+ g_object_unref (gci->book);
+ g_slist_foreach (gci->contacts, (GFunc) g_object_unref, NULL);
+ g_slist_foreach (gci->list_contacts, (GFunc) g_object_unref, NULL);
+ g_slist_free (gci->contacts);
+ g_slist_free (gci->list_contacts);
+ g_hash_table_destroy (gci->dn_contact_hash);
- e_import_complete(gci->import, gci->target);
- g_object_unref(gci->import);
+ e_import_complete (gci->import, gci->target);
+ g_object_unref (gci->import);
g_free (gci);
}
static void
-ldif_import(EImport *ei, EImportTarget *target, EImportImporter *im)
+ldif_import (EImport *ei, EImportTarget *target, EImportImporter *im)
{
LDIFImporter *gci;
EBook *book;
@@ -630,43 +630,43 @@ ldif_import(EImport *ei, EImportTarget *target, EImportImporter *im)
book = e_book_new(g_datalist_get_data(&target->data, "ldif-source"), NULL);
if (book == NULL) {
g_message(G_STRLOC ":Couldn't create EBook.");
- e_import_complete(ei, target);
+ e_import_complete (ei, target);
return;
}
- filename = g_filename_from_uri(s->uri_src, NULL, NULL);
+ filename = g_filename_from_uri (s->uri_src, NULL, NULL);
if (filename != NULL) {
file = g_fopen(filename, "r");
g_free (filename);
}
if (file == NULL) {
g_message(G_STRLOC ":Can't open .ldif file");
- e_import_complete(ei, target);
- g_object_unref(book);
+ e_import_complete (ei, target);
+ g_object_unref (book);
return;
}
- gci = g_malloc0(sizeof(*gci));
+ gci = g_malloc0 (sizeof (*gci));
g_datalist_set_data(&target->data, "ldif-data", gci);
- gci->import = g_object_ref(ei);
+ gci->import = g_object_ref (ei);
gci->target = target;
gci->book = book;
gci->file = file;
- fseek(file, 0, SEEK_END);
- gci->size = ftell(file);
- fseek(file, 0, SEEK_SET);
+ fseek (file, 0, SEEK_END);
+ gci->size = ftell (file);
+ fseek (file, 0, SEEK_SET);
gci->dn_contact_hash = g_hash_table_new_full (
g_str_hash, g_str_equal,
(GDestroyNotify) g_free,
(GDestroyNotify) NULL);
- e_book_open(gci->book, FALSE, NULL);
+ e_book_open (gci->book, FALSE, NULL);
- gci->idle_id = g_idle_add(ldif_import_contacts, gci);
+ gci->idle_id = g_idle_add (ldif_import_contacts, gci);
}
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");
@@ -706,9 +706,9 @@ ldif_get_preview (EImport *ei, EImportTarget *target, EImportImporter *im)
while (contact = getNextLDIFEntry (dn_contact_hash, file), contact != NULL) {
if (!e_contact_get (contact, E_CONTACT_IS_LIST)) {
- add_to_notes(contact, E_CONTACT_OFFICE);
- add_to_notes(contact, E_CONTACT_SPOUSE);
- add_to_notes(contact, E_CONTACT_BLOG_URL);
+ add_to_notes (contact, E_CONTACT_OFFICE);
+ add_to_notes (contact, E_CONTACT_SPOUSE);
+ add_to_notes (contact, E_CONTACT_BLOG_URL);
}
contacts = g_list_prepend (contacts, contact);
@@ -737,7 +737,7 @@ static EImportImporter ldif_importer = {
};
EImportImporter *
-evolution_ldif_importer_peek(void)
+evolution_ldif_importer_peek (void)
{
ldif_importer.name = _("LDAP Data Interchange Format (.ldif)");
ldif_importer.description = _("Evolution LDIF importer");
diff --git a/addressbook/importers/evolution-vcard-importer.c b/addressbook/importers/evolution-vcard-importer.c
index 1bcd6d6540..efdf3b362c 100644
--- a/addressbook/importers/evolution-vcard-importer.c
+++ b/addressbook/importers/evolution-vcard-importer.c
@@ -64,7 +64,7 @@ typedef struct {
EBook *book;
} VCardImporter;
-static void vcard_import_done(VCardImporter *gci);
+static void vcard_import_done (VCardImporter *gci);
static void
add_to_notes (EContact *contact, EContactField field)
@@ -91,7 +91,7 @@ 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;
@@ -239,7 +239,7 @@ vcard_import_contact(VCardImporter *gci, EContact *contact)
}
static gboolean
-vcard_import_contacts(gpointer data)
+vcard_import_contacts (gpointer data)
{
VCardImporter *gci = data;
gint count = 0;
@@ -247,7 +247,7 @@ vcard_import_contacts(gpointer data)
if (gci->state == 0) {
while (count < 50 && iterator) {
- vcard_import_contact(gci, iterator->data);
+ vcard_import_contact (gci, iterator->data);
count++;
iterator = iterator->next;
}
@@ -257,7 +257,7 @@ vcard_import_contacts(gpointer data)
gci->state = 1;
}
if (gci->state == 1) {
- vcard_import_done(gci);
+ vcard_import_done (gci);
return FALSE;
} else {
e_import_status (
@@ -385,12 +385,12 @@ static void
primary_selection_changed_cb (ESourceSelector *selector, EImportTarget *target)
{
g_datalist_set_data_full(&target->data, "vcard-source",
- g_object_ref(e_source_selector_peek_primary_selection(selector)),
+ g_object_ref (e_source_selector_peek_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;
@@ -409,7 +409,7 @@ vcard_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im)
primary = g_datalist_get_data(&target->data, "vcard-source");
if (primary == NULL) {
primary = e_source_list_peek_source_any (source_list);
- g_object_ref(primary);
+ g_object_ref (primary);
g_datalist_set_data_full (
&target->data, "vcard-source", primary,
(GDestroyNotify) g_object_unref);
@@ -428,7 +428,7 @@ 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;
@@ -447,29 +447,29 @@ vcard_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
filename = g_filename_from_uri (s->uri_src, NULL, NULL);
if (filename == NULL)
return FALSE;
- retval = (guess_vcard_encoding(filename) != VCARD_ENCODING_NONE);
+ retval = (guess_vcard_encoding (filename) != VCARD_ENCODING_NONE);
g_free (filename);
return retval;
}
static void
-vcard_import_done(VCardImporter *gci)
+vcard_import_done (VCardImporter *gci)
{
if (gci->idle_id)
- g_source_remove(gci->idle_id);
+ g_source_remove (gci->idle_id);
g_object_unref (gci->book);
g_list_foreach (gci->contactlist, (GFunc) g_object_unref, NULL);
g_list_free (gci->contactlist);
- e_import_complete(gci->import, gci->target);
- g_object_unref(gci->import);
+ e_import_complete (gci->import, gci->target);
+ g_object_unref (gci->import);
g_free (gci);
}
static void
-vcard_import(EImport *ei, EImportTarget *target, EImportImporter *im)
+vcard_import (EImport *ei, EImportTarget *target, EImportImporter *im)
{
VCardImporter *gci;
gchar *contents;
@@ -478,18 +478,18 @@ vcard_import(EImport *ei, EImportTarget *target, EImportImporter *im)
EImportTargetURI *s = (EImportTargetURI *)target;
gchar *filename;
- filename = g_filename_from_uri(s->uri_src, NULL, NULL);
+ filename = g_filename_from_uri (s->uri_src, NULL, NULL);
if (filename == NULL) {
g_message(G_STRLOC ": Couldn't get filename from URI '%s'", s->uri_src);
- e_import_complete(ei, target);
+ e_import_complete (ei, target);
return;
}
- encoding = guess_vcard_encoding(filename);
+ encoding = guess_vcard_encoding (filename);
if (encoding == VCARD_ENCODING_NONE) {
g_free (filename);
/* This check is superfluous, we've already
* checked otherwise we can't get here ... */
- e_import_complete(ei, target);
+ e_import_complete (ei, target);
return;
}
@@ -497,22 +497,22 @@ vcard_import(EImport *ei, EImportTarget *target, EImportImporter *im)
if (book == NULL) {
g_message(G_STRLOC ":Couldn't create EBook.");
g_free (filename);
- e_import_complete(ei, target);
+ e_import_complete (ei, target);
return;
}
if (!g_file_get_contents (filename, &contents, NULL, NULL)) {
g_message (G_STRLOC ":Couldn't read file.");
g_free (filename);
- e_import_complete(ei, target);
- g_object_unref(book);
+ e_import_complete (ei, target);
+ g_object_unref (book);
return;
}
g_free (filename);
- gci = g_malloc0(sizeof(*gci));
+ gci = g_malloc0 (sizeof (*gci));
g_datalist_set_data(&target->data, "vcard-data", gci);
- gci->import = g_object_ref(ei);
+ gci->import = g_object_ref (ei);
gci->target = target;
gci->book = book;
@@ -535,16 +535,16 @@ vcard_import(EImport *ei, EImportTarget *target, EImportImporter *im)
gci->contactlist = eab_contact_list_from_string (contents);
g_free (contents);
gci->iterator = gci->contactlist;
- gci->total = g_list_length(gci->contactlist);
+ gci->total = g_list_length (gci->contactlist);
if (gci->iterator)
- gci->idle_id = g_idle_add(vcard_import_contacts, gci);
+ gci->idle_id = g_idle_add (vcard_import_contacts, gci);
else
- vcard_import_done(gci);
+ vcard_import_done (gci);
}
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");
@@ -618,7 +618,7 @@ static EImportImporter vcard_importer = {
};
EImportImporter *
-evolution_vcard_importer_peek(void)
+evolution_vcard_importer_peek (void)
{
vcard_importer.name = _("vCard (.vcf, .gcrd)");
vcard_importer.description = _("Evolution vCard Importer");
diff --git a/addressbook/printing/e-contact-print.c b/addressbook/printing/e-contact-print.c
index b1e38c7e52..672db9ab41 100644
--- a/addressbook/printing/e-contact-print.c
+++ b/addressbook/printing/e-contact-print.c
@@ -293,7 +293,7 @@ e_contact_print_contact (EContact *contact,
page_height = gtk_page_setup_get_page_height (setup, GTK_UNIT_POINTS);
cr = gtk_print_context_get_cairo_context (ctxt->context);
- cairo_save(cr);
+ cairo_save (cr);
ctxt->y += get_font_height (ctxt->style->headings_font) * .2;
file_as = e_contact_get (contact, E_CONTACT_FILE_AS);
@@ -393,7 +393,7 @@ contacts_added (EBookView *book_view,
EContactPrintContext *ctxt)
{
while (contact_list != NULL) {
- ctxt->contact_list = g_list_insert_sorted(
+ ctxt->contact_list = g_list_insert_sorted (
ctxt->contact_list,
g_object_ref (contact_list->data),
(GCompareFunc) contact_compare);
@@ -509,12 +509,12 @@ e_contact_build_style (EContactPrintStyle *style)
g_free (filename);
if (styledoc) {
- xmlNodePtr stylenode = xmlDocGetRootElement(styledoc);
+ xmlNodePtr stylenode = xmlDocGetRootElement (styledoc);
xmlNodePtr node;
for (node = stylenode->children; node; node = node->next) {
gchar *data = (gchar *)xmlNodeGetContent ( node );
if (!strcmp( (gchar *)node->name, "title" )) {
- get_string(data, &(style->title));
+ get_string (data, &(style->title));
} else if (!strcmp( (gchar *)node->name, "type" )) {
if (g_ascii_strcasecmp (data, "cards") == 0)
style->type = E_CONTACT_PRINT_TYPE_CARDS;
@@ -523,35 +523,35 @@ e_contact_build_style (EContactPrintStyle *style)
else if (g_ascii_strcasecmp (data, "phone_list") == 0)
style->type = E_CONTACT_PRINT_TYPE_PHONE_LIST;
} else if (!strcmp( (gchar *)node->name, "sections_start_new_page" )) {
- style->sections_start_new_page = get_bool(data);
+ style->sections_start_new_page = get_bool (data);
} else if (!strcmp( (gchar *)node->name, "num_columns" )) {
- style->num_columns = get_integer(data);
+ style->num_columns = get_integer (data);
} else if (!strcmp( (gchar *)node->name, "blank_forms" )) {
- style->blank_forms = get_integer(data);
+ style->blank_forms = get_integer (data);
} else if (!strcmp( (gchar *)node->name, "letter_headings" )) {
- style->letter_headings = get_bool(data);
+ style->letter_headings = get_bool (data);
} else if (!strcmp( (gchar *)node->name, "headings_font" )) {
- get_font( data, &(style->headings_font) );
+ get_font ( data, &(style->headings_font) );
} else if (!strcmp( (gchar *)node->name, "body_font" )) {
- get_font( data, &(style->body_font) );
+ get_font ( data, &(style->body_font) );
} else if (!strcmp( (gchar *)node->name, "print_using_grey" )) {
- style->print_using_grey = get_bool(data);
+ style->print_using_grey = get_bool (data);
} else if (!strcmp( (gchar *)node->name, "paper_width" )) {
- style->paper_width = get_float(data);
+ style->paper_width = get_float (data);
} else if (!strcmp( (gchar *)node->name, "paper_height" )) {
- style->paper_height = get_float(data);
+ style->paper_height = get_float (data);
} else if (!strcmp( (gchar *)node->name, "top_margin" )) {
- style->top_margin = get_float(data);
+ style->top_margin = get_float (data);
} else if (!strcmp( (gchar *)node->name, "left_margin" )) {
- style->left_margin = get_float(data);
+ style->left_margin = get_float (data);
} else if (!strcmp( (gchar *)node->name, "bottom_margin" )) {
- style->bottom_margin = get_float(data);
+ style->bottom_margin = get_float (data);
} else if (!strcmp( (gchar *)node->name, "right_margin" )) {
- style->right_margin = get_float(data);
+ style->right_margin = get_float (data);
} else if (!strcmp( (gchar *)node->name, "page_width" )) {
- style->page_width = get_float(data);
+ style->page_width = get_float (data);
} else if (!strcmp( (gchar *)node->name, "page_height" )) {
- style->page_height = get_float(data);
+ style->page_height = get_float (data);
} else if (!strcmp( (gchar *)node->name, "orientation" )) {
if (data) {
style->orientation_portrait =
@@ -560,28 +560,28 @@ e_contact_build_style (EContactPrintStyle *style)
style->orientation_portrait = TRUE;
}
} else if (!strcmp( (gchar *)node->name, "header_font" )) {
- get_font( data, &(style->header_font) );
+ get_font ( data, &(style->header_font) );
} else if (!strcmp( (gchar *)node->name, "left_header" )) {
- get_string(data, &(style->left_header));
+ get_string (data, &(style->left_header));
} else if (!strcmp( (gchar *)node->name, "center_header" )) {
- get_string(data, &(style->center_header));
+ get_string (data, &(style->center_header));
} else if (!strcmp( (gchar *)node->name, "right_header" )) {
- get_string(data, &(style->right_header));
+ get_string (data, &(style->right_header));
} else if (!strcmp( (gchar *)node->name, "footer_font" )) {
- get_font( data, &(style->footer_font) );
+ get_font ( data, &(style->footer_font) );
} else if (!strcmp( (gchar *)node->name, "left_footer" )) {
- get_string(data, &(style->left_footer));
+ get_string (data, &(style->left_footer));
} else if (!strcmp( (gchar *)node->name, "center_footer" )) {
- get_string(data, &(style->center_footer));
+ get_string (data, &(style->center_footer));
} else if (!strcmp( (gchar *)node->name, "right_footer" )) {
- get_string(data, &(style->right_footer));
+ get_string (data, &(style->right_footer));
} else if (!strcmp( (gchar *)node->name, "reverse_on_even_pages" )) {
- style->reverse_on_even_pages = get_bool(data);
+ style->reverse_on_even_pages = get_bool (data);
}
if (data)
xmlFree (data);
}
- xmlFreeDoc(styledoc);
+ xmlFreeDoc (styledoc);
}
}
diff --git a/addressbook/util/addressbook.c b/addressbook/util/addressbook.c
index 077e629f6e..a6673fcda0 100644
--- a/addressbook/util/addressbook.c
+++ b/addressbook/util/addressbook.c
@@ -103,7 +103,7 @@ load_source_auth_cb (EBook *book, const GError *error, gpointer closure)
"%s", _("Accessing LDAP Server anonymously"));
g_signal_connect (
dialog, "response",
- G_CALLBACK(gtk_widget_destroy), NULL);
+ G_CALLBACK (gtk_widget_destroy), NULL);
gtk_widget_show (dialog);
error = NULL;
@@ -179,7 +179,7 @@ addressbook_authenticate (EBook *book, gboolean previous_failure, ESource *sourc
gchar *pass_dup = NULL;
const gchar *auth;
const gchar *user;
- gchar *uri = remove_parameters_from_uri(e_book_get_uri (book));
+ gchar *uri = remove_parameters_from_uri (e_book_get_uri (book));
const gchar *auth_domain = e_source_get_property (source, "auth-domain");
const gchar *component_name;
@@ -256,7 +256,7 @@ addressbook_authenticate (EBook *book, gboolean previous_failure, ESource *sourc
static void
auth_required_cb (EBook *book, gpointer data)
{
- LoadSourceData *load_source_data = g_new0(LoadSourceData, 1);
+ LoadSourceData *load_source_data = g_new0 (LoadSourceData, 1);
load_source_data->source = g_object_ref (g_object_ref (e_book_get_source (book)));
load_source_data->cancelled = FALSE;
diff --git a/addressbook/util/eab-book-util.c b/addressbook/util/eab-book-util.c
index 3cd301bd70..ffe310d1c6 100644
--- a/addressbook/util/eab-book-util.c
+++ b/addressbook/util/eab-book-util.c
@@ -396,8 +396,8 @@ eab_query_address_default (const gchar *email,
gint
e_utf8_casefold_collate_len (const gchar *str1, const gchar *str2, gint len)
{
- gchar *s1 = g_utf8_casefold(str1, len);
- gchar *s2 = g_utf8_casefold(str2, len);
+ gchar *s1 = g_utf8_casefold (str1, len);
+ gchar *s2 = g_utf8_casefold (str2, len);
gint rv;
rv = g_utf8_collate (s1, s2);