From 299521f02c02278857dfd2561973dc0c94e44b57 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 1 Apr 2012 22:31:50 -0400 Subject: Whitespace cleanup. Replace 8-space indentation with tab characters, and various other automated cleanups. --- addressbook/gui/widgets/eab-contact-display.c | 4 +- addressbook/gui/widgets/eab-contact-formatter.c | 216 ++++++++++++------------ addressbook/gui/widgets/eab-gui-util.c | 4 +- 3 files changed, 112 insertions(+), 112 deletions(-) (limited to 'addressbook') diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c index fe1728c3b1..6d83966844 100644 --- a/addressbook/gui/widgets/eab-contact-display.c +++ b/addressbook/gui/widgets/eab-contact-display.c @@ -501,8 +501,8 @@ eab_contact_display_init (EABContactDisplay *display) display->priv->formatter = g_object_new ( EAB_TYPE_CONTACT_FORMATTER, - "display-mode", EAB_CONTACT_DISPLAY_RENDER_NORMAL, - "render-maps", FALSE, NULL); + "display-mode", EAB_CONTACT_DISPLAY_RENDER_NORMAL, + "render-maps", FALSE, NULL); web_view = E_WEB_VIEW (display); ui_manager = e_web_view_get_ui_manager (web_view); diff --git a/addressbook/gui/widgets/eab-contact-formatter.c b/addressbook/gui/widgets/eab-contact-formatter.c index c0ca4ed524..0531087295 100644 --- a/addressbook/gui/widgets/eab-contact-formatter.c +++ b/addressbook/gui/widgets/eab-contact-formatter.c @@ -143,7 +143,7 @@ render_address_link (GString *buffer, gint map_type) { EContactAddress *adr; - GString *link = g_string_new (""); + GString *link = g_string_new (""); adr = e_contact_get (contact, map_type); if (adr && @@ -166,8 +166,8 @@ render_address_link (GString *buffer, g_string_assign (link, escaped); g_free (escaped); - g_string_prepend (link, "%s", _("Open map")); + g_string_prepend (link, "%s", _("Open map")); } if (adr) @@ -186,7 +186,7 @@ accum_address (GString *buffer, { EContactAddress *adr; const gchar *label; - GString *map_link = g_string_new ("
"); + GString *map_link = g_string_new ("
"); render_address_link (map_link, contact, adr_field); @@ -265,7 +265,7 @@ accum_address (GString *buffer, "" "", html_label, map_link->str); } else { - g_string_append_printf (buffer, ""); + g_string_append_printf (buffer, ""); } } @@ -293,27 +293,27 @@ render_table_row (GString *buffer, if (icon) { gchar *icon_uri = get_icon_uri (icon); - icon_html = g_strdup_printf ("", icon_uri); + icon_html = g_strdup_printf ("", icon_uri); g_free (icon_uri); } else { - icon_html = ""; + icon_html = ""; } if (TEXT_IS_RIGHT_TO_LEFT) { g_string_append_printf ( - buffer, "" - "%s" - ":%s" - "%s" - "", + buffer, "" + "%s" + ":%s" + "%s" + "", value, label, icon_html); } else { g_string_append_printf ( - buffer, "" - "%s" - "%s:" - "%s" - "", + buffer, "" + "%s" + "%s:" + "%s" + "", icon_html, label, value); } @@ -354,7 +354,7 @@ accum_time_attribute (GString *buffer, gdate = g_date_new_dmy ( date->day, date->month, date->year ); - g_date_strftime (sdate, 100, "%x", gdate); + g_date_strftime (sdate, 100, "%x", gdate); g_date_free (gdate); render_table_row (buffer, html_label, sdate, icon, html_flags); e_contact_date_free (date); @@ -370,13 +370,13 @@ accum_attribute_multival (GString *buffer, guint html_flags) { GList *val_list, *l; - GString *val = g_string_new (""); + GString *val = g_string_new (""); val_list = e_contact_get (contact, field); for (l = val_list; l; l = l->next) { if (l != val_list) - g_string_append (val, "
"); + g_string_append (val, "
"); g_string_append (val, l->data); } @@ -399,7 +399,7 @@ get_email_location (EVCardAttribute *attr) return _(common_location[i].pretty_name); } - return _("Other"); + return _("Other"); } static void @@ -416,8 +416,8 @@ render_title_block (EABContactFormatter *formatter, g_string_append_printf ( buffer, "" - "
", TEXT_IS_RIGHT_TO_LEFT ? - "align=\"right\"" : ""); + "", TEXT_IS_RIGHT_TO_LEFT ? + "align=\"right\"" : ""); photo = e_contact_get (contact, E_CONTACT_PHOTO); if (!photo) @@ -442,14 +442,14 @@ render_title_block (EABContactFormatter *formatter, if (e_contact_get (contact, E_CONTACT_IS_LIST)) { gchar *icon = get_icon_uri (CONTACT_LIST_ICON); - g_string_append_printf (buffer, "", icon); + g_string_append_printf (buffer, "", icon); g_free (icon); } g_string_append_printf ( buffer, "\n", - TEXT_IS_RIGHT_TO_LEFT ? "align=\"right\"" : ""); + TEXT_IS_RIGHT_TO_LEFT ? "align=\"right\"" : ""); str = e_contact_get_const (contact, E_CONTACT_FILE_AS); if (!str) @@ -463,12 +463,12 @@ render_title_block (EABContactFormatter *formatter, "

%s

", html); } else { - g_string_append_printf (buffer, "

%s

", html); + g_string_append_printf (buffer, "

%s

", html); } g_free (html); } - g_string_append (buffer, "
"); + g_string_append (buffer, ""); } static void @@ -487,11 +487,11 @@ render_contact_list_row (EABContactFormatter *formatter, if (!eab_parse_qp_email (textrep, &name, &email_addr)) email_addr = g_strdup (textrep); - g_string_append (buffer, ""); + g_string_append (buffer, ""); if (e_destination_is_evolution_list (destination)) { g_string_append_printf ( buffer, - "" + "" "" @@ -513,10 +513,10 @@ render_contact_list_row (EABContactFormatter *formatter, formatter, dest->data, buffer); } - g_string_append (buffer, ""); + g_string_append (buffer, ""); } - g_string_append (buffer, ""); + g_string_append (buffer, ""); } else { if (name && *name) { @@ -536,7 +536,7 @@ render_contact_list_row (EABContactFormatter *formatter, } } - g_string_append (buffer, ""); + g_string_append (buffer, ""); g_free (evolution_imagesdir); g_free (name); @@ -564,13 +564,13 @@ render_contact_list (EABContactFormatter *formatter, "" "
%s
", _("List Members:")); - g_string_append (buffer, ""); + g_string_append (buffer, "
"); for (dest = dests; dest; dest = dest->next) render_contact_list_row (formatter, dest->data, buffer); - g_string_append (buffer, "
"); - g_string_append (buffer, "
"); + g_string_append (buffer, ""); + g_string_append (buffer, ""); g_object_unref (destination); } @@ -586,8 +586,8 @@ render_contact_column (EABContactFormatter *formatter, const gchar *nl; contact = formatter->priv->contact; - email = g_string_new (""); - nl = ""; + email = g_string_new (""); + nl = ""; email_list = e_contact_get (contact, E_CONTACT_EMAIL); email_attr_list = e_contact_get_attributes (contact, E_CONTACT_EMAIL); @@ -604,14 +604,14 @@ render_contact_column (EABContactFormatter *formatter, "%s%s%s%s%s " "(%s)", nl, - name ? name : "", - name ? " <" : "", + name ? name : "", + name ? " <" : "", email_num, mail, - name ? ">" : "", - attr_str ? attr_str : ""); + name ? ">" : "", + attr_str ? attr_str : ""); email_num++; - nl = "
"; + nl = "
"; g_free (name); g_free (mail); @@ -621,27 +621,27 @@ render_contact_column (EABContactFormatter *formatter, g_list_free (email_list); g_list_free (email_attr_list); - accum = g_string_new (""); + accum = g_string_new (""); if (email->len) - render_table_row (accum, _("Email"), email->str, NULL, 0); - - accum_attribute (accum, contact, _("Nickname"), E_CONTACT_NICKNAME, NULL, 0); - accum_attribute_multival (accum, contact, _("AIM"), E_CONTACT_IM_AIM, AIM_ICON, 0); - accum_attribute_multival (accum, contact, _("GroupWise"), E_CONTACT_IM_GROUPWISE, GROUPWISE_ICON, 0); - accum_attribute_multival (accum, contact, _("ICQ"), E_CONTACT_IM_ICQ, ICQ_ICON, 0); - accum_attribute_multival (accum, contact, _("Jabber"), E_CONTACT_IM_JABBER, JABBER_ICON, 0); - accum_attribute_multival (accum, contact, _("MSN"), E_CONTACT_IM_MSN, MSN_ICON, 0); - accum_attribute_multival (accum, contact, _("Yahoo"), E_CONTACT_IM_YAHOO, YAHOO_ICON, 0); - accum_attribute_multival (accum, contact, _("Gadu-Gadu"), E_CONTACT_IM_GADUGADU, GADUGADU_ICON, 0); - accum_attribute_multival (accum, contact, _("Skype"), E_CONTACT_IM_SKYPE, SKYPE_ICON, 0); + render_table_row (accum, _("Email"), email->str, NULL, 0); + + accum_attribute (accum, contact, _("Nickname"), E_CONTACT_NICKNAME, NULL, 0); + accum_attribute_multival (accum, contact, _("AIM"), E_CONTACT_IM_AIM, AIM_ICON, 0); + accum_attribute_multival (accum, contact, _("GroupWise"), E_CONTACT_IM_GROUPWISE, GROUPWISE_ICON, 0); + accum_attribute_multival (accum, contact, _("ICQ"), E_CONTACT_IM_ICQ, ICQ_ICON, 0); + accum_attribute_multival (accum, contact, _("Jabber"), E_CONTACT_IM_JABBER, JABBER_ICON, 0); + accum_attribute_multival (accum, contact, _("MSN"), E_CONTACT_IM_MSN, MSN_ICON, 0); + accum_attribute_multival (accum, contact, _("Yahoo"), E_CONTACT_IM_YAHOO, YAHOO_ICON, 0); + accum_attribute_multival (accum, contact, _("Gadu-Gadu"), E_CONTACT_IM_GADUGADU, GADUGADU_ICON, 0); + accum_attribute_multival (accum, contact, _("Skype"), E_CONTACT_IM_SKYPE, SKYPE_ICON, 0); if (accum->len) g_string_append_printf ( buffer, - "
" - "%s
" - "
", accum->str); + "
" + "%s
" + "
", accum->str); g_string_free (accum, TRUE); g_string_free (email, TRUE); @@ -654,19 +654,19 @@ accum_address_map (GString *buffer, { #ifdef WITH_CONTACT_MAPS - g_string_append (buffer, ""); + g_string_append (buffer, ""); if (map_type == E_CONTACT_ADDRESS_WORK) { g_string_append (buffer, - ""); + ""); } else { g_string_append (buffer, - ""); + ""); } - g_string_append (buffer, ""); + g_string_append (buffer, ""); #endif } @@ -676,30 +676,30 @@ render_work_column (EABContactFormatter *formatter, GString *buffer) { EContact *contact = formatter->priv->contact; - GString *accum = g_string_new (""); - - accum_attribute (accum, contact, _("Company"), E_CONTACT_ORG, NULL, 0); - accum_attribute (accum, contact, _("Department"), E_CONTACT_ORG_UNIT, NULL, 0); - accum_attribute (accum, contact, _("Profession"), E_CONTACT_ROLE, NULL, 0); - accum_attribute (accum, contact, _("Position"), E_CONTACT_TITLE, NULL, 0); - accum_attribute (accum, contact, _("Manager"), E_CONTACT_MANAGER, NULL, 0); - accum_attribute (accum, contact, _("Assistant"), E_CONTACT_ASSISTANT, NULL, 0); - accum_attribute (accum, contact, _("Video Chat"), E_CONTACT_VIDEO_URL, VIDEOCONF_ICON, E_TEXT_TO_HTML_CONVERT_URLS); - accum_attribute (accum, contact, _("Calendar"), E_CONTACT_CALENDAR_URI, NULL, E_TEXT_TO_HTML_CONVERT_URLS); - accum_attribute (accum, contact, _("Free/Busy"), E_CONTACT_FREEBUSY_URL, NULL, E_TEXT_TO_HTML_CONVERT_URLS); - accum_attribute (accum, contact, _("Phone"), E_CONTACT_PHONE_BUSINESS, NULL, 0); - accum_attribute (accum, contact, _("Fax"), E_CONTACT_PHONE_BUSINESS_FAX, NULL, 0); - accum_address (accum, contact, _("Address"), E_CONTACT_ADDRESS_WORK, E_CONTACT_ADDRESS_LABEL_WORK); + GString *accum = g_string_new (""); + + accum_attribute (accum, contact, _("Company"), E_CONTACT_ORG, NULL, 0); + accum_attribute (accum, contact, _("Department"), E_CONTACT_ORG_UNIT, NULL, 0); + accum_attribute (accum, contact, _("Profession"), E_CONTACT_ROLE, NULL, 0); + accum_attribute (accum, contact, _("Position"), E_CONTACT_TITLE, NULL, 0); + accum_attribute (accum, contact, _("Manager"), E_CONTACT_MANAGER, NULL, 0); + accum_attribute (accum, contact, _("Assistant"), E_CONTACT_ASSISTANT, NULL, 0); + accum_attribute (accum, contact, _("Video Chat"), E_CONTACT_VIDEO_URL, VIDEOCONF_ICON, E_TEXT_TO_HTML_CONVERT_URLS); + accum_attribute (accum, contact, _("Calendar"), E_CONTACT_CALENDAR_URI, NULL, E_TEXT_TO_HTML_CONVERT_URLS); + accum_attribute (accum, contact, _("Free/Busy"), E_CONTACT_FREEBUSY_URL, NULL, E_TEXT_TO_HTML_CONVERT_URLS); + accum_attribute (accum, contact, _("Phone"), E_CONTACT_PHONE_BUSINESS, NULL, 0); + accum_attribute (accum, contact, _("Fax"), E_CONTACT_PHONE_BUSINESS_FAX, NULL, 0); + accum_address (accum, contact, _("Address"), E_CONTACT_ADDRESS_WORK, E_CONTACT_ADDRESS_LABEL_WORK); if (formatter->priv->render_maps) accum_address_map (accum, contact, E_CONTACT_ADDRESS_WORK); if (accum->len > 0) { g_string_append_printf ( buffer, - "
" - "

%s

" - "%s
" - "
", _("Work"), accum->str); + "
" + "

%s

" + "%s
" + "
", _("Work"), accum->str); } g_string_free (accum, TRUE); @@ -710,26 +710,26 @@ render_personal_column (EABContactFormatter *formatter, GString *buffer) { EContact *contact = formatter->priv->contact; - GString *accum = g_string_new (""); - - accum_attribute (accum, contact, _("Home Page"), E_CONTACT_HOMEPAGE_URL, NULL, E_TEXT_TO_HTML_CONVERT_URLS); - accum_attribute (accum, contact, _("Web Log"), E_CONTACT_BLOG_URL, NULL, E_TEXT_TO_HTML_CONVERT_URLS); - accum_attribute (accum, contact, _("Phone"), E_CONTACT_PHONE_HOME, NULL, 0); - accum_attribute (accum, contact, _("Mobile Phone"), E_CONTACT_PHONE_MOBILE, NULL, 0); - accum_address (accum, contact, _("Address"), E_CONTACT_ADDRESS_HOME, E_CONTACT_ADDRESS_LABEL_HOME); - accum_time_attribute (accum, contact, _("Birthday"), E_CONTACT_BIRTH_DATE, NULL, 0); - accum_time_attribute (accum, contact, _("Anniversary"), E_CONTACT_ANNIVERSARY, NULL, 0); - accum_attribute (accum, contact, _("Spouse"), E_CONTACT_SPOUSE, NULL, 0); + GString *accum = g_string_new (""); + + accum_attribute (accum, contact, _("Home Page"), E_CONTACT_HOMEPAGE_URL, NULL, E_TEXT_TO_HTML_CONVERT_URLS); + accum_attribute (accum, contact, _("Web Log"), E_CONTACT_BLOG_URL, NULL, E_TEXT_TO_HTML_CONVERT_URLS); + accum_attribute (accum, contact, _("Phone"), E_CONTACT_PHONE_HOME, NULL, 0); + accum_attribute (accum, contact, _("Mobile Phone"), E_CONTACT_PHONE_MOBILE, NULL, 0); + accum_address (accum, contact, _("Address"), E_CONTACT_ADDRESS_HOME, E_CONTACT_ADDRESS_LABEL_HOME); + accum_time_attribute (accum, contact, _("Birthday"), E_CONTACT_BIRTH_DATE, NULL, 0); + accum_time_attribute (accum, contact, _("Anniversary"), E_CONTACT_ANNIVERSARY, NULL, 0); + accum_attribute (accum, contact, _("Spouse"), E_CONTACT_SPOUSE, NULL, 0); if (formatter->priv->render_maps) accum_address_map (accum, contact, E_CONTACT_ADDRESS_HOME); if (accum->len > 0) { g_string_append_printf ( buffer, - "
" - "

%s

" - "%s
" - "
", _("Personal"), accum->str); + "
" + "

%s

" + "%s
" + "
", _("Personal"), accum->str); } g_string_free (accum, TRUE); @@ -760,7 +760,7 @@ render_footer (EABContactFormatter *formatter, E_TEXT_TO_HTML_CONVERT_URLS | E_TEXT_TO_HTML_CONVERT_NL); - g_string_append (buffer, ""); + g_string_append (buffer, ""); } static void @@ -769,11 +769,11 @@ render_contact (EABContactFormatter *formatter, { render_title_block (formatter, buffer); - g_string_append (buffer, "
"); + g_string_append (buffer, "
"); render_contact_column (formatter, buffer); render_work_column (formatter, buffer); render_personal_column (formatter, buffer); - g_string_append (buffer, "
"); + g_string_append (buffer, "
"); render_footer (formatter, buffer); } @@ -783,7 +783,7 @@ render_normal (EABContactFormatter *formatter, GString *buffer) { g_string_append (buffer, HTML_HEADER); - g_string_append (buffer, ""); + g_string_append (buffer, ""); if (formatter->priv->contact) { @@ -799,7 +799,7 @@ render_normal (EABContactFormatter *formatter, } - g_string_append (buffer, "\n"); + g_string_append (buffer, "\n"); } static void @@ -1137,9 +1137,9 @@ eab_contact_formatter_class_init (EABContactFormatterClass *klass) object_class, PROP_DISPLAY_MODE, g_param_spec_int ( - "display-mode", - "", - "", + "display-mode", + "", + "", EAB_CONTACT_DISPLAY_RENDER_NORMAL, EAB_CONTACT_DISPLAY_RENDER_COMPACT, EAB_CONTACT_DISPLAY_RENDER_NORMAL, @@ -1149,9 +1149,9 @@ eab_contact_formatter_class_init (EABContactFormatterClass *klass) object_class, PROP_RENDER_MAPS, g_param_spec_boolean ( - "render-maps", - "", - "", + "render-maps", + "", + "", FALSE, G_PARAM_READWRITE)); } @@ -1177,7 +1177,7 @@ eab_contact_formatter_set_display_mode (EABContactFormatter *formatter, formatter->priv->mode = mode; - g_object_notify (G_OBJECT (formatter), "display-mode"); + g_object_notify (G_OBJECT (formatter), "display-mode"); } EABContactDisplayMode @@ -1200,7 +1200,7 @@ eab_contact_formatter_set_render_maps (EABContactFormatter *formatter, formatter->priv->render_maps = render_maps; - g_object_notify (G_OBJECT (formatter), "render-maps"); + g_object_notify (G_OBJECT (formatter), "render-maps"); } gboolean diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c index b1c8cdc898..887ffc845c 100644 --- a/addressbook/gui/widgets/eab-gui-util.c +++ b/addressbook/gui/widgets/eab-gui-util.c @@ -1037,14 +1037,14 @@ parse_address_template_section (const gchar *format, if (ret && (pos >= format + 2) && /* If there's something before %, */ (g_ascii_strcasecmp (pos - 2, "\n") != 0) && /* And if it is not a newline */ (g_ascii_strcasecmp (pos - 2, "%w") != 0)) /* Nor whitespace */ - g_string_append (res, ", "); + g_string_append (res, ", "); pos += 2; break; case 'w': if (ret && (pos >= format + 2) && (g_ascii_strcasecmp (pos - 2, "\n") != 0) && (g_ascii_strcasecmp (pos - 1, " ") != 0)) - g_string_append (res, " "); + g_string_append (res, " "); pos += 2; break; case '0': { -- cgit v1.2.3