From c53fbc0b8f3b98827d6816a627bdd4d467b84f74 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 16 Feb 2014 09:36:49 -0500 Subject: Miscellaneous cleanups. --- .../gui/contact-editor/e-contact-editor-fullname.c | 8 ++--- addressbook/gui/contact-editor/e-contact-editor.c | 21 ++++++------ addressbook/gui/contact-editor/test-editor.c | 2 +- addressbook/gui/widgets/e-addressbook-model.c | 6 ++-- .../gui/widgets/e-addressbook-reflow-adapter.c | 2 +- addressbook/gui/widgets/e-addressbook-selector.c | 2 +- addressbook/gui/widgets/e-minicard-label.c | 4 +-- addressbook/gui/widgets/e-minicard-view.c | 8 ++--- addressbook/gui/widgets/e-minicard.c | 22 ++++++------ addressbook/gui/widgets/ea-addressbook-view.c | 2 +- addressbook/gui/widgets/ea-minicard-view.c | 2 +- addressbook/gui/widgets/ea-minicard.c | 2 +- addressbook/gui/widgets/eab-contact-compare.c | 2 +- addressbook/gui/widgets/eab-contact-compare.h | 18 +++++----- addressbook/gui/widgets/eab-contact-formatter.c | 20 +++++------ addressbook/gui/widgets/eab-contact-merging.c | 39 ++++++++++++++-------- addressbook/gui/widgets/eab-gui-util.c | 6 ++-- 17 files changed, 89 insertions(+), 77 deletions(-) (limited to 'addressbook/gui') diff --git a/addressbook/gui/contact-editor/e-contact-editor-fullname.c b/addressbook/gui/contact-editor/e-contact-editor-fullname.c index 6850797cb0..cec35aad47 100644 --- a/addressbook/gui/contact-editor/e-contact-editor-fullname.c +++ b/addressbook/gui/contact-editor/e-contact-editor-fullname.c @@ -322,9 +322,9 @@ extract_info (EContactEditorFullname *editor) editor->name = name; } - name->prefixes = extract_field (editor, "comboentry-title"); - name->given = extract_field (editor, "entry-first"); + name->prefixes = extract_field (editor, "comboentry-title"); + name->given = extract_field (editor, "entry-first"); name->additional = extract_field (editor, "entry-middle"); - name->family = extract_field (editor, "entry-last"); - name->suffixes = extract_field (editor, "comboentry-suffix"); + name->family = extract_field (editor, "entry-last"); + name->suffixes = extract_field (editor, "comboentry-suffix"); } diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index 7f3aaa17b6..aa02ab0eb6 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -1369,7 +1369,7 @@ set_arrow_image (EContactEditor *editor, { GtkWidget *arrow; - arrow = e_builder_get_widget (editor->priv->builder, arrow_widget); + arrow = e_builder_get_widget (editor->priv->builder, arrow_widget); if (expanded) gtk_arrow_set ( GTK_ARROW (arrow), GTK_ARROW_DOWN, GTK_SHADOW_NONE); @@ -2432,10 +2432,10 @@ extract_address_record (EContactEditor *editor, extract_address_textview (editor, record, address); address->locality = extract_address_field (editor, record, "city"); - address->region = extract_address_field (editor, record, "state"); - address->code = extract_address_field (editor, record, "zip"); - address->country = extract_address_field (editor, record, "country"); - address->po = extract_address_field (editor, record, "pobox"); + address->region = extract_address_field (editor, record, "state"); + address->code = extract_address_field (editor, record, "zip"); + address->country = extract_address_field (editor, record, "country"); + address->po = extract_address_field (editor, record, "pobox"); if (!STRING_IS_EMPTY (address->street) || !STRING_IS_EMPTY (address->ext) || @@ -2695,7 +2695,7 @@ fill_in_simple_field (EContactEditor *editor, } else if (GTK_IS_TEXT_VIEW (widget)) { GtkTextBuffer *buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (widget)); - gchar *text = e_contact_get (contact, field_id); + gchar *text = e_contact_get (contact, field_id); gtk_text_buffer_set_text (buffer, STRING_MAKE_NON_NULL (text), -1); g_free (text); @@ -2830,7 +2830,7 @@ extract_simple_field (EContactEditor *editor, g_free (text); } else if (E_IS_URL_ENTRY (widget)) { - const gchar *text = gtk_entry_get_text (GTK_ENTRY (widget)); + const gchar *text = gtk_entry_get_text (GTK_ENTRY (widget)); e_contact_set (contact, field_id, (gchar *) text); } else if (E_IS_DATE_EDIT (widget)) { @@ -4177,8 +4177,8 @@ expand_mail_toggle (EContactEditor *ce) static void contact_editor_focus_widget_changed_cb (EFocusTracker *focus_tracker, - GParamSpec *param, - EContactEditor *editor) + GParamSpec *param, + EContactEditor *editor) { GtkWidget *widget; @@ -4350,7 +4350,8 @@ e_contact_editor_constructed (GObject *object) GTK_WINDOW (editor->priv->app), gtk_ui_manager_get_accel_group (editor->priv->ui_manager)); - g_signal_connect (editor->priv->focus_tracker, "notify::focus", + g_signal_connect ( + editor->priv->focus_tracker, "notify::focus", G_CALLBACK (contact_editor_focus_widget_changed_cb), editor); action_group = gtk_action_group_new ("undo"); diff --git a/addressbook/gui/contact-editor/test-editor.c b/addressbook/gui/contact-editor/test-editor.c index 5136f18d4b..7c848087be 100644 --- a/addressbook/gui/contact-editor/test-editor.c +++ b/addressbook/gui/contact-editor/test-editor.c @@ -53,7 +53,7 @@ read_file (gchar *name) if (f == NULL) g_error ("Unable to open %s!\n", name); - len = 0; + len = 0; while (fgets (line, sizeof (line), f) != NULL) { strcpy (buff + len, line); len += strlen (line); diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c index d116ec4f8f..95fc3afd2e 100644 --- a/addressbook/gui/widgets/e-addressbook-model.c +++ b/addressbook/gui/widgets/e-addressbook-model.c @@ -54,9 +54,9 @@ struct _EAddressbookModelPrivate { gulong view_complete_id; guint remove_status_id; - guint search_in_progress : 1; - guint editable : 1; - guint first_get_view : 1; + guint search_in_progress : 1; + guint editable : 1; + guint first_get_view : 1; }; enum { diff --git a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c index 3cd21deca2..97c46db83c 100644 --- a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c +++ b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c @@ -217,7 +217,7 @@ addressbook_create_cmp_cache (EReflowModel *erm) for (ii = 0; ii < count; ii++) { EContact *contact; - contact = (EContact *) + contact = (EContact *) e_addressbook_model_contact_at (priv->model, ii); if (contact != NULL) { const gchar *file_as; diff --git a/addressbook/gui/widgets/e-addressbook-selector.c b/addressbook/gui/widgets/e-addressbook-selector.c index 2a1af0b8f0..4b044867c9 100644 --- a/addressbook/gui/widgets/e-addressbook-selector.c +++ b/addressbook/gui/widgets/e-addressbook-selector.c @@ -48,7 +48,7 @@ struct _MergeContext { gboolean pending_adds; gint remove_from_source : 1; - gint copy_done : 1; + gint copy_done : 1; }; enum { diff --git a/addressbook/gui/widgets/e-minicard-label.c b/addressbook/gui/widgets/e-minicard-label.c index 4e3d0e9aa5..2fedce3dea 100644 --- a/addressbook/gui/widgets/e-minicard-label.c +++ b/addressbook/gui/widgets/e-minicard-label.c @@ -173,8 +173,8 @@ e_minicard_label_class_init (EMinicardLabelClass *class) GTK_TYPE_STYLE); /* GnomeCanvasItem method overrides */ - item_class->realize = e_minicard_label_realize; - item_class->event = e_minicard_label_event; + item_class->realize = e_minicard_label_realize; + item_class->event = e_minicard_label_event; } static void diff --git a/addressbook/gui/widgets/e-minicard-view.c b/addressbook/gui/widgets/e-minicard-view.c index 7d7628fdba..023c71d6e9 100644 --- a/addressbook/gui/widgets/e-minicard-view.c +++ b/addressbook/gui/widgets/e-minicard-view.c @@ -487,9 +487,9 @@ e_minicard_view_class_init (EMinicardViewClass *class) item_class = (GnomeCanvasItemClass *) class; reflow_class = (EReflowClass *) class; - object_class->set_property = e_minicard_view_set_property; - object_class->get_property = e_minicard_view_get_property; - object_class->dispose = e_minicard_view_dispose; + object_class->set_property = e_minicard_view_set_property; + object_class->get_property = e_minicard_view_get_property; + object_class->dispose = e_minicard_view_dispose; g_object_class_install_property ( object_class, @@ -557,7 +557,7 @@ e_minicard_view_class_init (EMinicardViewClass *class) G_TYPE_INT, 1, G_TYPE_POINTER); - item_class->event = e_minicard_view_event; + item_class->event = e_minicard_view_event; reflow_class->selection_event = e_minicard_view_selection_event; /* GnomeCanvasItem method overrides */ diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c index 1ef150f471..e48c5321a6 100644 --- a/addressbook/gui/widgets/e-minicard.c +++ b/addressbook/gui/widgets/e-minicard.c @@ -237,21 +237,21 @@ e_minicard_class_init (EMinicardClass *class) static void e_minicard_init (EMinicard *minicard) { - minicard->rect = NULL; - minicard->fields = NULL; - minicard->width = 10; - minicard->height = 10; - minicard->has_focus = FALSE; - minicard->selected = FALSE; - minicard->editable = FALSE; - minicard->has_cursor = FALSE; + minicard->rect = NULL; + minicard->fields = NULL; + minicard->width = 10; + minicard->height = 10; + minicard->has_focus = FALSE; + minicard->selected = FALSE; + minicard->editable = FALSE; + minicard->has_cursor = FALSE; - minicard->contact = NULL; + minicard->contact = NULL; minicard->list_icon_pixbuf = e_icon_factory_get_icon (LIST_ICON_NAME, GTK_ICON_SIZE_MENU); - minicard->list_icon_size = gdk_pixbuf_get_height (minicard->list_icon_pixbuf); + minicard->list_icon_size = gdk_pixbuf_get_height (minicard->list_icon_pixbuf); - minicard->changed = FALSE; + minicard->changed = FALSE; e_canvas_item_set_reflow_callback (GNOME_CANVAS_ITEM (minicard), e_minicard_reflow); } diff --git a/addressbook/gui/widgets/ea-addressbook-view.c b/addressbook/gui/widgets/ea-addressbook-view.c index 0cb5f09996..f7324e5086 100644 --- a/addressbook/gui/widgets/ea-addressbook-view.c +++ b/addressbook/gui/widgets/ea-addressbook-view.c @@ -40,7 +40,7 @@ ea_ab_view_get_type (void) GType derived_atk_type; if (!type) { - static GTypeInfo tinfo = { + static GTypeInfo tinfo = { sizeof (EAddressbookViewClass), (GBaseInitFunc) NULL, /* base_init */ (GBaseFinalizeFunc) NULL, /* base_finalize */ diff --git a/addressbook/gui/widgets/ea-minicard-view.c b/addressbook/gui/widgets/ea-minicard-view.c index 96e1403064..1f3ca9e8d7 100644 --- a/addressbook/gui/widgets/ea-minicard-view.c +++ b/addressbook/gui/widgets/ea-minicard-view.c @@ -78,7 +78,7 @@ ea_minicard_view_get_type (void) GType derived_atk_type; if (!type) { - static GTypeInfo tinfo = { + static GTypeInfo tinfo = { sizeof (EaMinicardViewClass), (GBaseInitFunc) NULL, /* base_init */ (GBaseFinalizeFunc) NULL, /* base_finalize */ diff --git a/addressbook/gui/widgets/ea-minicard.c b/addressbook/gui/widgets/ea-minicard.c index e797a6ef1e..389e8e8f65 100644 --- a/addressbook/gui/widgets/ea-minicard.c +++ b/addressbook/gui/widgets/ea-minicard.c @@ -72,7 +72,7 @@ ea_minicard_get_type (void) GType derived_atk_type; if (!type) { - static GTypeInfo tinfo = { + static GTypeInfo tinfo = { sizeof (EaMinicardClass), (GBaseInitFunc) NULL, /* base_init */ (GBaseFinalizeFunc) NULL, /* base_finalize */ diff --git a/addressbook/gui/widgets/eab-contact-compare.c b/addressbook/gui/widgets/eab-contact-compare.c index aac0cc5ee6..776e26d2c7 100644 --- a/addressbook/gui/widgets/eab-contact-compare.c +++ b/addressbook/gui/widgets/eab-contact-compare.c @@ -150,7 +150,7 @@ eab_contact_compare_name_to_string_full (EContact *contact, *s = ' '; ++s; } - namev = g_strsplit (str_cpy, " ", 0); + namev = g_strsplit (str_cpy, " ", 0); g_free (str_cpy); contact_name = e_contact_get (contact, E_CONTACT_NAME); diff --git a/addressbook/gui/widgets/eab-contact-compare.h b/addressbook/gui/widgets/eab-contact-compare.h index c19285ff57..ebc60e0c19 100644 --- a/addressbook/gui/widgets/eab-contact-compare.h +++ b/addressbook/gui/widgets/eab-contact-compare.h @@ -29,18 +29,18 @@ typedef enum { EAB_CONTACT_MATCH_NOT_APPLICABLE = 0, - EAB_CONTACT_MATCH_NONE = 1, - EAB_CONTACT_MATCH_VAGUE = 2, - EAB_CONTACT_MATCH_PARTIAL = 3, - EAB_CONTACT_MATCH_EXACT = 4 + EAB_CONTACT_MATCH_NONE = 1, + EAB_CONTACT_MATCH_VAGUE = 2, + EAB_CONTACT_MATCH_PARTIAL = 3, + EAB_CONTACT_MATCH_EXACT = 4 } EABContactMatchType; typedef enum { - EAB_CONTACT_MATCH_PART_NOT_APPLICABLE = -1, - EAB_CONTACT_MATCH_PART_NONE = 0, - EAB_CONTACT_MATCH_PART_GIVEN_NAME = 1 << 0, - EAB_CONTACT_MATCH_PART_ADDITIONAL_NAME = 1 << 2, - EAB_CONTACT_MATCH_PART_FAMILY_NAME = 1 << 3 + EAB_CONTACT_MATCH_PART_NOT_APPLICABLE = -1, + EAB_CONTACT_MATCH_PART_NONE = 0, + EAB_CONTACT_MATCH_PART_GIVEN_NAME = 1 << 0, + EAB_CONTACT_MATCH_PART_ADDITIONAL_NAME = 1 << 2, + EAB_CONTACT_MATCH_PART_FAMILY_NAME = 1 << 3 } EABContactMatchPart; typedef void (*EABContactMatchQueryCallback) (EContact *contact, diff --git a/addressbook/gui/widgets/eab-contact-formatter.c b/addressbook/gui/widgets/eab-contact-formatter.c index 539a8e5131..5b61bcde19 100644 --- a/addressbook/gui/widgets/eab-contact-formatter.c +++ b/addressbook/gui/widgets/eab-contact-formatter.c @@ -48,7 +48,7 @@ #define MAX_COMPACT_IMAGE_DIMENSION 48 -#define HTML_HEADER "\n\n" \ +#define HTML_HEADER "\n\n" \ "\n\n" \ "" \ "