aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-07-11 23:31:15 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-07-12 10:25:06 +0800
commiteb29179da623f9cf4abd663577395a085452ca18 (patch)
treea7eec4690f254d4cb9048ca87a5e7f401a2e74ae /addressbook
parentbeb8e74577f695d0d3c2efea52dc10c2136f0135 (diff)
downloadgsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.tar.gz
gsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.tar.zst
gsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor-fullname.c2
-rw-r--r--addressbook/gui/widgets/e-addressbook-reflow-adapter.c2
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c18
-rw-r--r--addressbook/gui/widgets/e-minicard.c4
-rw-r--r--addressbook/gui/widgets/eab-contact-display.c2
-rw-r--r--addressbook/gui/widgets/eab-contact-display.h11
-rw-r--r--addressbook/gui/widgets/eab-gui-util.c4
-rw-r--r--addressbook/importers/evolution-csv-importer.c2
-rw-r--r--addressbook/importers/evolution-ldif-importer.c2
-rw-r--r--addressbook/printing/e-contact-print.c36
-rw-r--r--addressbook/util/addressbook.c29
-rw-r--r--addressbook/util/eab-book-util.c2
12 files changed, 71 insertions, 43 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-editor-fullname.c b/addressbook/gui/contact-editor/e-contact-editor-fullname.c
index a872afb7d9..4f1df719ca 100644
--- a/addressbook/gui/contact-editor/e-contact-editor-fullname.c
+++ b/addressbook/gui/contact-editor/e-contact-editor-fullname.c
@@ -217,7 +217,7 @@ e_contact_editor_fullname_set_property (GObject *object, guint prop_id,
NULL
};
e_contact_editor_fullname->editable = g_value_get_boolean (value) ? TRUE : FALSE;
- for (i = 0; widget_names[i] != NULL; i ++) {
+ for (i = 0; widget_names[i] != NULL; i++) {
GtkWidget *w = e_builder_get_widget(e_contact_editor_fullname->builder, widget_names[i]);
if (GTK_IS_ENTRY (w)) {
gtk_editable_set_editable (GTK_EDITABLE (w),
diff --git a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
index f167075886..d5ac8c68d4 100644
--- a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
+++ b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
@@ -170,7 +170,7 @@ addressbook_height (EReflowModel *erm, gint i, GnomeCanvasGroup *parent)
this_height += 3;
height += this_height;
- count ++;
+ count++;
}
g_free (string);
}
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
index 187b08b290..db9917f37f 100644
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ b/addressbook/gui/widgets/e-addressbook-view.c
@@ -66,13 +66,17 @@
#define d(x)
-static void status_message (EAddressbookView *view, const gchar *status);
-static void search_result (EAddressbookView *view, EBookViewStatus status, const gchar *error_msg);
-static void folder_bar_message (EAddressbookView *view, const gchar *status);
-static void stop_state_changed (GtkObject *object, EAddressbookView *view);
-static void backend_died (EAddressbookView *view);
-
-static void command_state_change (EAddressbookView *view);
+static void status_message (EAddressbookView *view,
+ const gchar *status);
+static void search_result (EAddressbookView *view,
+ EBookViewStatus status,
+ const gchar *error_msg);
+static void folder_bar_message (EAddressbookView *view,
+ const gchar *status);
+static void stop_state_changed (GtkObject *object,
+ EAddressbookView *view);
+static void backend_died (EAddressbookView *view);
+static void command_state_change (EAddressbookView *view);
struct _EAddressbookViewPrivate {
gpointer shell_view; /* weak pointer */
diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c
index 92a415b88f..654858a21d 100644
--- a/addressbook/gui/widgets/e-minicard.c
+++ b/addressbook/gui/widgets/e-minicard.c
@@ -734,7 +734,7 @@ e_minicard_resize_children( EMinicard *e_minicard )
e_minicard->width - e_minicard->list_icon_size - 3,
3);
}
- for ( list = e_minicard->fields; list; list = g_list_next( list ) ) {
+ 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 );
@@ -973,7 +973,7 @@ remodel( EMinicard *e_minicard )
g_object_set(minicard_field->label,
"field", string,
NULL);
- count ++;
+ count++;
} else {
e_minicard_field_destroy(minicard_field);
}
diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c
index 8c0e37fccc..939ed77a59 100644
--- a/addressbook/gui/widgets/eab-contact-display.c
+++ b/addressbook/gui/widgets/eab-contact-display.c
@@ -495,7 +495,7 @@ render_contact (GString *buffer,
mail,
name ? "&gt;" : "",
attr_str ? attr_str : "");
- email_num ++;
+ email_num++;
nl = "<br>";
g_free (html);
diff --git a/addressbook/gui/widgets/eab-contact-display.h b/addressbook/gui/widgets/eab-contact-display.h
index 7b9707e0af..fde3bc6d76 100644
--- a/addressbook/gui/widgets/eab-contact-display.h
+++ b/addressbook/gui/widgets/eab-contact-display.h
@@ -52,9 +52,16 @@ typedef struct _EABContactDisplay EABContactDisplay;
typedef struct _EABContactDisplayClass EABContactDisplayClass;
typedef struct _EABContactDisplayPrivate EABContactDisplayPrivate;
+/**
+ * EABContactDisplayMode:
+ * @EAB_CONTACT_DISPLAY_RENDER_NORMAL:
+ * For use in the preview pane.
+ * @EAB_CONTACT_DISPLAY_RENDER_COMPACT:
+ * For use with embedded vcards.
+ **/
typedef enum {
- EAB_CONTACT_DISPLAY_RENDER_NORMAL, /* for use in the preview pane */
- EAB_CONTACT_DISPLAY_RENDER_COMPACT /* for use with embedded vcards (e.g, the EABVCardControl) */
+ EAB_CONTACT_DISPLAY_RENDER_NORMAL,
+ EAB_CONTACT_DISPLAY_RENDER_COMPACT
} EABContactDisplayMode;
struct _EABContactDisplay {
diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c
index a7642625e3..8e3a6a4e38 100644
--- a/addressbook/gui/widgets/eab-gui-util.c
+++ b/addressbook/gui/widgets/eab-gui-util.c
@@ -329,7 +329,7 @@ delete_contacts (ContactCopyProcess *process)
static void
process_unref (ContactCopyProcess *process)
{
- process->count --;
+ process->count--;
if (process->count == 0) {
if (process->done_cb)
process->done_cb (process);
@@ -374,7 +374,7 @@ do_copy (gpointer data, gpointer user_data)
book = process->destination;
- process->count ++;
+ process->count++;
eab_merging_book_add_contact(book, contact, contact_added_cb, process);
}
diff --git a/addressbook/importers/evolution-csv-importer.c b/addressbook/importers/evolution-csv-importer.c
index 29204b2c2e..20025c81ec 100644
--- a/addressbook/importers/evolution-csv-importer.c
+++ b/addressbook/importers/evolution-csv-importer.c
@@ -671,7 +671,7 @@ getNextCSVEntry(CSVImporter *gci, FILE *f) {
else
g_string_append_c (line, c);
}
- gci->count ++;
+ gci->count++;
}
str = g_string_new("");
diff --git a/addressbook/importers/evolution-ldif-importer.c b/addressbook/importers/evolution-ldif-importer.c
index 0e6b707426..9eb9ca5bb6 100644
--- a/addressbook/importers/evolution-ldif-importer.c
+++ b/addressbook/importers/evolution-ldif-importer.c
@@ -266,7 +266,7 @@ parseLine (GHashTable *dn_contact_hash, EContact *contact,
ldif_value = getValue(&value );
field_handled = FALSE;
- for (i = 0; i < G_N_ELEMENTS (ldif_fields); i ++) {
+ for (i = 0; i < G_N_ELEMENTS (ldif_fields); i++) {
if (!g_ascii_strcasecmp (ptr, ldif_fields[i].ldif_attribute)) {
if (ldif_fields[i].flags & FLAG_WORK_ADDRESS) {
populate_contact_address (work_address, ptr, ldif_value->str);
diff --git a/addressbook/printing/e-contact-print.c b/addressbook/printing/e-contact-print.c
index 37b2837b5c..b1e38c7e52 100644
--- a/addressbook/printing/e-contact-print.c
+++ b/addressbook/printing/e-contact-print.c
@@ -154,7 +154,8 @@ e_contact_text_height (GtkPrintContext *context,
}
static void
-e_contact_print_letter_heading (EContactPrintContext *ctxt, gchar *letter)
+e_contact_print_letter_heading (EContactPrintContext *ctxt,
+ gchar *letter)
{
PangoLayout *layout;
PangoFontDescription *desc;
@@ -230,7 +231,8 @@ e_contact_start_new_column (EContactPrintContext *ctxt)
}
static gdouble
-e_contact_get_contact_height (EContact *contact, EContactPrintContext *ctxt)
+e_contact_get_contact_height (EContact *contact,
+ EContactPrintContext *ctxt)
{
GtkPageSetup *setup;
gchar *file_as;
@@ -278,7 +280,8 @@ e_contact_get_contact_height (EContact *contact, EContactPrintContext *ctxt)
}
static void
-e_contact_print_contact (EContact *contact, EContactPrintContext *ctxt)
+e_contact_print_contact (EContact *contact,
+ EContactPrintContext *ctxt)
{
GtkPageSetup *setup;
gchar *file_as;
@@ -359,7 +362,8 @@ e_contact_print_contact (EContact *contact, EContactPrintContext *ctxt)
}
static gint
-contact_compare (EContact *contact1, EContact *contact2)
+contact_compare (EContact *contact1,
+ EContact *contact2)
{
const gchar *field1, *field2;
@@ -384,7 +388,8 @@ contact_compare (EContact *contact1, EContact *contact2)
}
static void
-contacts_added (EBookView *book_view, const GList *contact_list,
+contacts_added (EBookView *book_view,
+ const GList *contact_list,
EContactPrintContext *ctxt)
{
while (contact_list != NULL) {
@@ -397,7 +402,10 @@ contacts_added (EBookView *book_view, const GList *contact_list,
}
static void
-view_complete (EBookView *book_view, EBookViewStatus status, const gchar *error_msg, EFlag *book_view_started)
+view_complete (EBookView *book_view,
+ EBookViewStatus status,
+ const gchar *error_msg,
+ EFlag *book_view_started)
{
e_flag_set (book_view_started);
}
@@ -431,7 +439,8 @@ get_float (gchar *data)
}
static void
-get_font (gchar *data, PangoFontDescription **variable)
+get_font (gchar *data,
+ PangoFontDescription **variable)
{
PangoFontDescription *desc = NULL;
@@ -612,7 +621,8 @@ load_contacts (EContactPrintContext *ctxt)
}
static void
-contact_draw (EContact *contact, EContactPrintContext *ctxt)
+contact_draw (EContact *contact,
+ EContactPrintContext *ctxt)
{
GtkPageSetup *setup;
gdouble page_height;
@@ -720,8 +730,8 @@ contact_begin_print (GtkPrintOperation *operation,
* while printing*/
void
contact_page_draw_footer (GtkPrintOperation *operation,
- GtkPrintContext *context,
- gint page_nr)
+ GtkPrintContext *context,
+ gint page_nr)
{
PangoFontDescription *desc;
PangoLayout *layout;
@@ -802,8 +812,10 @@ contact_end_print (GtkPrintOperation *operation,
}
void
-e_contact_print (EBook *book, EBookQuery *query,
- GList *contact_list, GtkPrintOperationAction action)
+e_contact_print (EBook *book,
+ EBookQuery *query,
+ GList *contact_list,
+ GtkPrintOperationAction action)
{
GtkPrintOperation *operation;
EContactPrintContext ctxt;
diff --git a/addressbook/util/addressbook.c b/addressbook/util/addressbook.c
index 2185434d00..10ec1a5b26 100644
--- a/addressbook/util/addressbook.c
+++ b/addressbook/util/addressbook.c
@@ -96,27 +96,32 @@ load_source_auth_cb (EBook *book, const GError *error, gpointer closure)
so that it wil valid for other servers which provide
anonymous access*/
- dialog = gtk_message_dialog_new (NULL,
- 0,
- GTK_MESSAGE_WARNING,
- GTK_BUTTONS_OK,
- "%s", _("Accessing LDAP Server anonymously"));
- g_signal_connect (dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL);
+ dialog = gtk_message_dialog_new (
+ NULL, 0,
+ GTK_MESSAGE_WARNING,
+ GTK_BUTTONS_OK,
+ "%s", _("Accessing LDAP Server anonymously"));
+ g_signal_connect (
+ dialog, "response",
+ G_CALLBACK(gtk_widget_destroy), NULL);
gtk_widget_show (dialog);
error = NULL;
goto done;
}
- } else if (g_error_matches (error, E_BOOK_ERROR, E_BOOK_ERROR_INVALID_SERVER_VERSION)) {
- e_alert_run_dialog_for_args (e_shell_get_active_window (NULL),
- "addressbook:server-version",
- NULL);
+ } else if (g_error_matches (error, E_BOOK_ERROR,
+ E_BOOK_ERROR_INVALID_SERVER_VERSION)) {
+ e_alert_run_dialog_for_args (
+ e_shell_get_active_window (NULL),
+ "addressbook:server-version", NULL);
error = NULL;
goto done;
- } else if (g_error_matches (error, E_BOOK_ERROR, E_BOOK_ERROR_UNSUPPORTED_AUTHENTICATION_METHOD)) {
+ } else if (g_error_matches (error, E_BOOK_ERROR,
+ E_BOOK_ERROR_UNSUPPORTED_AUTHENTICATION_METHOD)) {
goto done;
} else {
- if (g_error_matches (error, E_BOOK_ERROR, E_BOOK_ERROR_AUTHENTICATION_FAILED)) {
+ if (g_error_matches (error, E_BOOK_ERROR,
+ E_BOOK_ERROR_AUTHENTICATION_FAILED)) {
const gchar *uri = e_book_get_uri (book);
gchar *stripped_uri = remove_parameters_from_uri (uri);
const gchar *auth_domain = e_source_get_property (data->source, "auth-domain");
diff --git a/addressbook/util/eab-book-util.c b/addressbook/util/eab-book-util.c
index 2b1966684e..a1827d3cc9 100644
--- a/addressbook/util/eab-book-util.c
+++ b/addressbook/util/eab-book-util.c
@@ -48,7 +48,7 @@ escape (const gchar *str)
else
g_string_append_c (s, *p);
- p ++;
+ p++;
}
return g_string_free (s, FALSE);