[evolution] M!23 - Prefer g_string_append_c() over g_string_append()



commit 6dc66755af5be9afa96990a06a35bf39f4d9b01e
Author: Дилян Палаузов <git-dpa aegee org>
Date:   Sun Jul 7 14:07:59 2019 +0000

    M!23 - Prefer g_string_append_c() over g_string_append()
    
    Closes https://gitlab.gnome.org/GNOME/evolution/merge_requests/23

 src/addressbook/gui/contact-editor/e-contact-editor.c        |  2 +-
 src/addressbook/gui/widgets/eab-gui-util.c                   |  4 ++--
 src/calendar/gui/e-comp-editor-page-general.c                |  4 ++--
 src/calendar/gui/e-comp-editor-task.c                        |  2 +-
 src/calendar/gui/e-meeting-store.c                           |  2 +-
 src/calendar/gui/e-task-table.c                              |  4 ++--
 src/calendar/gui/e-to-do-pane.c                              | 10 +++++-----
 src/calendar/gui/print.c                                     | 12 ++++++------
 src/e-util/e-attachment.c                                    |  2 +-
 src/e-util/e-misc-utils.c                                    |  2 +-
 src/e-util/e-name-selector-entry.c                           | 12 ++++++------
 src/e-util/e-webdav-browser.c                                |  4 ++--
 src/em-format/e-mail-formatter-attachment.c                  |  2 +-
 src/libemail-engine/mail-vfolder.c                           |  2 +-
 src/mail/e-mail-free-form-exp.c                              |  2 +-
 src/mail/em-filter-editor.c                                  |  2 +-
 src/mail/mail-autofilter.c                                   |  2 +-
 src/mail/message-list.c                                      |  2 +-
 src/modules/alarm-notify/alarm-notify.c                      |  4 ++--
 src/modules/mail/e-mail-shell-backend.c                      |  2 +-
 src/modules/mail/e-mail-shell-view.c                         |  2 +-
 src/modules/plugin-manager/evolution-plugin-manager.c        |  2 +-
 .../webkit-editor/web-extension/e-composer-dom-functions.c   |  4 ++--
 .../webkit-editor/web-extension/e-editor-dom-functions.c     | 12 ++++++------
 src/plugins/publish-calendar/publish-calendar.c              |  4 ++--
 25 files changed, 51 insertions(+), 51 deletions(-)
---
diff --git a/src/addressbook/gui/contact-editor/e-contact-editor.c 
b/src/addressbook/gui/contact-editor/e-contact-editor.c
index c8b08a9438..f61c317387 100644
--- a/src/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/src/addressbook/gui/contact-editor/e-contact-editor.c
@@ -4767,7 +4767,7 @@ e_contact_editor_is_valid (EABEditor *editor)
        }
 
        if (validation_error) {
-               g_string_append (errmsg, ".");
+               g_string_append_c (errmsg, '.');
                e_alert_run_dialog_for_args (
                        GTK_WINDOW (ce->priv->app),
                        "addressbook:generic-error",
diff --git a/src/addressbook/gui/widgets/eab-gui-util.c b/src/addressbook/gui/widgets/eab-gui-util.c
index aa8d66866d..0a3bd1cb5c 100644
--- a/src/addressbook/gui/widgets/eab-gui-util.c
+++ b/src/addressbook/gui/widgets/eab-gui-util.c
@@ -950,7 +950,7 @@ parse_address_template_section (const gchar *format,
                                if (address->street && *(address->street)) {
                                        string_append_upper (res, address->street);
                                        if (address->ext && *(address->ext)) {
-                                               g_string_append (res, "\n");
+                                               g_string_append_c (res, '\n');
                                                string_append_upper (res, address->ext);
                                        }
                                        ret = TRUE;
@@ -1003,7 +1003,7 @@ parse_address_template_section (const gchar *format,
                                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_c (res, ' ');
                                pos += 2;
                                break;
                        case '0': {
diff --git a/src/calendar/gui/e-comp-editor-page-general.c b/src/calendar/gui/e-comp-editor-page-general.c
index 1c2a1a44ac..e000208511 100644
--- a/src/calendar/gui/e-comp-editor-page-general.c
+++ b/src/calendar/gui/e-comp-editor-page-general.c
@@ -388,14 +388,14 @@ ecep_general_attendees_remove_clicked_cb (GtkButton *button,
                        if (!errors)
                                errors = g_string_new ("");
                        else
-                               g_string_append (errors, "\n");
+                               g_string_append_c (errors, '\n');
                        g_string_append_printf (errors, _("Cannot find attendee “%s” in the list of 
attendees"), address);
                        failures++;
                } else if (e_meeting_attendee_get_edit_level (attendee) != E_MEETING_ATTENDEE_EDIT_FULL) {
                        if (!errors)
                                errors = g_string_new ("");
                        else
-                               g_string_append (errors, "\n");
+                               g_string_append_c (errors, '\n');
                        g_string_append_printf (errors, _("Not enough rights to delete attendee “%s”"), 
e_meeting_attendee_get_address (attendee));
                        failures++;
                } else {
diff --git a/src/calendar/gui/e-comp-editor-task.c b/src/calendar/gui/e-comp-editor-task.c
index 513b7a5ba1..d4ff76f72b 100644
--- a/src/calendar/gui/e-comp-editor-task.c
+++ b/src/calendar/gui/e-comp-editor-task.c
@@ -257,7 +257,7 @@ ece_task_check_dates_in_the_past (ECompEditorTask *task_editor)
 
                if (cal_comp_util_compare_time_with_today (due_date_itt) < 0) {
                        if (message)
-                               g_string_append (message, "\n");
+                               g_string_append_c (message, '\n');
                        else
                                message = g_string_new ("");
 
diff --git a/src/calendar/gui/e-meeting-store.c b/src/calendar/gui/e-meeting-store.c
index 4aa7e36d84..c7739da486 100644
--- a/src/calendar/gui/e-meeting-store.c
+++ b/src/calendar/gui/e-meeting-store.c
@@ -2008,7 +2008,7 @@ soup_authenticate (SoupSession *session,
                g_free (bold_user);
 
                if (retrying && msg->reason_phrase && *msg->reason_phrase) {
-                       g_string_append (description, "\n");
+                       g_string_append_c (description, '\n');
                        g_string_append_printf (
                                description, _("Failure reason: %s"),
                                msg->reason_phrase);
diff --git a/src/calendar/gui/e-task-table.c b/src/calendar/gui/e-task-table.c
index 4717646d5e..47e7612e34 100644
--- a/src/calendar/gui/e-task-table.c
+++ b/src/calendar/gui/e-task-table.c
@@ -868,8 +868,8 @@ task_table_query_tooltip (GtkWidget *widget,
                        len += strlen (e_cal_component_text_get_value (text));
                        g_string_append (tmp2, e_cal_component_text_get_value (text));
                        if (len > 1024) {
-                               g_string_set_size (tmp2, 1020);
-                               g_string_append (tmp2, "...");
+                               g_string_set_size (tmp2, 1023);
+                               g_string_append (tmp2, "…");
                                break;
                        }
                }
diff --git a/src/calendar/gui/e-to-do-pane.c b/src/calendar/gui/e-to-do-pane.c
index c5fc014c60..7ef7094783 100644
--- a/src/calendar/gui/e-to-do-pane.c
+++ b/src/calendar/gui/e-to-do-pane.c
@@ -370,7 +370,7 @@ etdp_get_component_data (EToDoPane *to_do_pane,
        etdp_append_to_string_escaped (tooltip, "<b>%s</b>", comp_summary, NULL);
 
        if (location) {
-               g_string_append (tooltip, "\n");
+               g_string_append_c (tooltip, '\n');
                /* Translators: It will display "Location: LocationOfTheAppointment" */
                etdp_append_to_string_escaped (tooltip, _("Location: %s"), location, NULL);
        }
@@ -399,7 +399,7 @@ etdp_get_component_data (EToDoPane *to_do_pane,
                                e_cal_component_datetime_get_value (dtstart),
                                e_cal_component_datetime_get_tzid (dtstart));
 
-                       g_string_append (tooltip, "\n");
+                       g_string_append_c (tooltip, '\n');
                        /* Translators: It will display "Start: StartDateAndTime" */
                        etdp_append_to_string_escaped (tooltip, _("Start: %s"), tmp, NULL);
 
@@ -421,7 +421,7 @@ etdp_get_component_data (EToDoPane *to_do_pane,
                                e_cal_component_datetime_get_value (dt),
                                e_cal_component_datetime_get_tzid (dt));
 
-                       g_string_append (tooltip, "\n");
+                       g_string_append_c (tooltip, '\n');
                        /* Translators: It will display "Due: DueDateAndTime" */
                        etdp_append_to_string_escaped (tooltip, _("Due: %s"), tmp, NULL);
 
@@ -435,7 +435,7 @@ etdp_get_component_data (EToDoPane *to_do_pane,
 
                        tmp = etdp_format_date_time (client, default_zone, completed, NULL);
 
-                       g_string_append (tooltip, "\n");
+                       g_string_append_c (tooltip, '\n');
                        /* Translators: It will display "Completed: DateAndTimeWhenCompleted" */
                        etdp_append_to_string_escaped (tooltip, _("Completed: %s"), tmp, NULL);
 
@@ -473,7 +473,7 @@ etdp_get_component_data (EToDoPane *to_do_pane,
                        strstart = etdp_format_date_time (client, default_zone, ittstart, NULL);
                        strduration = calculate_time (i_cal_time_as_timet (ittstart), i_cal_time_as_timet 
(ittend));
 
-                       g_string_append (tooltip, "\n");
+                       g_string_append_c (tooltip, '\n');
                        /* Translators: It will display "Time: StartDateAndTime (Duration)" */
                        etdp_append_to_string_escaped (tooltip, _("Time: %s %s"), strstart, strduration);
 
diff --git a/src/calendar/gui/print.c b/src/calendar/gui/print.c
index 8d14117c2b..e5d02a5677 100644
--- a/src/calendar/gui/print.c
+++ b/src/calendar/gui/print.c
@@ -684,19 +684,19 @@ format_date (struct tm *tm,
        }
        if (flags & DATE_DAY) {
                if (flags & DATE_DAYNAME)
-                       g_string_append (fmt, " ");
+                       g_string_append_c (fmt, ' ');
                g_string_append (fmt, e_cal_recur_get_localized_nth (tm->tm_mday - 1));
        }
        if (flags & DATE_MONTH) {
                if (flags & (DATE_DAY | DATE_DAYNAME))
-                       g_string_append (fmt, " ");
+                       g_string_append_c (fmt, ' ');
                g_string_append (fmt, "%B");
                if ((flags & (DATE_DAY | DATE_YEAR)) == (DATE_DAY | DATE_YEAR))
-                       g_string_append (fmt, ",");
+                       g_string_append_c (fmt, ',');
        }
        if (flags & DATE_YEAR) {
                if (flags & (DATE_DAY | DATE_DAYNAME | DATE_MONTH))
-                       g_string_append (fmt, " ");
+                       g_string_append_c (fmt, ' ');
                g_string_append (fmt, "%Y");
        }
        e_utf8_strftime (buffer, bufflen, fmt->str, tm);
@@ -1313,7 +1313,7 @@ print_attendees (GtkPrintContext *context,
                        text = g_string_new (tmp ? tmp : "");
 
                        if (tmp)
-                               g_string_append (text, " ");
+                               g_string_append_c (text, ' ');
 
                        if (e_cal_component_attendee_get_cn (attendee) && e_cal_component_attendee_get_cn 
(attendee)[0])
                                g_string_append (text, e_cal_component_attendee_get_cn (attendee));
@@ -1325,7 +1325,7 @@ print_attendees (GtkPrintContext *context,
                        if (tmp) {
                                g_string_append (text, " (");
                                g_string_append (text, tmp);
-                               g_string_append (text, ")");
+                               g_string_append_c (text, ')');
                        }
 
                        if (top > bottom) {
diff --git a/src/e-util/e-attachment.c b/src/e-util/e-attachment.c
index c9ab68b163..ef2624ca3b 100644
--- a/src/e-util/e-attachment.c
+++ b/src/e-util/e-attachment.c
@@ -2966,7 +2966,7 @@ get_new_name_with_count (const gchar *initial_name,
 
        g_string_append_len (string, initial_name, length);
        g_string_append_printf (string, " (%d)", count);
-       g_string_append (string, (ext != NULL) ? ext : "");
+       g_string_append (string, ext ? ext : "");
 
        return g_string_free (string, FALSE);
 }
diff --git a/src/e-util/e-misc-utils.c b/src/e-util/e-misc-utils.c
index 610be90907..3bde635956 100644
--- a/src/e-util/e-misc-utils.c
+++ b/src/e-util/e-misc-utils.c
@@ -348,7 +348,7 @@ e_display_help (GtkWindow *parent,
                screen = gtk_widget_get_screen (GTK_WIDGET (parent));
 
        if (link_id != NULL) {
-               g_string_append (uri, "/");
+               g_string_append_c (uri, '/');
                g_string_append (uri, link_id);
        }
 
diff --git a/src/e-util/e-name-selector-entry.c b/src/e-util/e-name-selector-entry.c
index bd09abc5aa..f494f4235f 100644
--- a/src/e-util/e-name-selector-entry.c
+++ b/src/e-util/e-name-selector-entry.c
@@ -411,18 +411,18 @@ describe_contact (EContact *contact)
 
        str = e_contact_get_const (contact, E_CONTACT_FILE_AS);
        g_string_append (description, str ? str : "");
-       g_string_append (description, "\n");
+       g_string_append_c (description, '\n');
 
        str = e_contact_get_const (contact, E_CONTACT_FULL_NAME);
        g_string_append (description, str ? str : "");
-       g_string_append (description, "\n");
+       g_string_append_c (description, '\n');
 
        emails = g_list_sort (emails, (GCompareFunc) g_ascii_strcasecmp);
        for (link = emails; link; link = g_list_next (link)) {
                str = link->data;
 
                g_string_append (description, str ? str : "");
-               g_string_append (description, "\n");
+               g_string_append_c (description, '\n');
        }
 
        deep_free_list (emails);
@@ -744,7 +744,7 @@ name_style_query (const gchar *field,
        g_string_append (out, " (beginswith ");
        e_sexp_encode_string (out, field);
        e_sexp_encode_string (out, spaced_str);
-       g_string_append (out, ")");
+       g_string_append_c (out, ')');
 
        if (comma_str) {
                g_string_append (out, " (beginswith ");
@@ -814,9 +814,9 @@ ens_util_populate_user_query_fields (GSList *user_query_fields,
                } else {
                        gchar *tmp = name_style_query (field, cue_str);
 
-                       g_string_append (user_fields, " ");
+                       g_string_append_c (user_fields, ' ');
                        g_string_append (user_fields, tmp);
-                       g_string_append (user_fields, " ");
+                       g_string_append_c (user_fields, ' ');
                        g_free (tmp);
                }
        }
diff --git a/src/e-util/e-webdav-browser.c b/src/e-util/e-webdav-browser.c
index 691f6d9e45..0ced0b0ea1 100644
--- a/src/e-util/e-webdav-browser.c
+++ b/src/e-util/e-webdav-browser.c
@@ -451,7 +451,7 @@ webdav_browser_update_ui (EWebDAVBrowser *webdav_browser)
                        #define append_if_set(_flag, _str) \
                                if ((rd->resource->supports & (_flag)) != 0) { \
                                        if (type_info->len) \
-                                               g_string_append (type_info, " "); \
+                                               g_string_append_c (type_info, ' '); \
                                        g_string_append (type_info, _str); \
                                }
 
@@ -463,7 +463,7 @@ webdav_browser_update_ui (EWebDAVBrowser *webdav_browser)
 
                        if (type_info->len) {
                                g_string_prepend (type_info, " (");
-                               g_string_append (type_info, ")");
+                               g_string_append_c (type_info, ')');
                        }
 
                        g_string_prepend (type_info, _("Calendar"));
diff --git a/src/em-format/e-mail-formatter-attachment.c b/src/em-format/e-mail-formatter-attachment.c
index 8e88efefb5..9a186618d7 100644
--- a/src/em-format/e-mail-formatter-attachment.c
+++ b/src/em-format/e-mail-formatter-attachment.c
@@ -298,7 +298,7 @@ emfe_attachment_format (EMailFormatterExtension *extension,
                        wrapper_element_id);
 
                if (e_mail_part_should_show_inline (part)) {
-                       g_string_append (buffer, ">");
+                       g_string_append_c (buffer, '>');
                        g_string_append_len (buffer, data, size);
                } else {
                        gchar *inner_html_data;
diff --git a/src/libemail-engine/mail-vfolder.c b/src/libemail-engine/mail-vfolder.c
index 9d7acdd17f..2559670365 100644
--- a/src/libemail-engine/mail-vfolder.c
+++ b/src/libemail-engine/mail-vfolder.c
@@ -634,7 +634,7 @@ mail_vfolder_delete_folder (CamelStore *store,
                                } else {
                                        if (changed_count == 1) {
                                                g_string_prepend (changed, "    ");
-                                               g_string_append (changed, "\n");
+                                               g_string_append_c (changed, '\n');
                                        }
                                        g_string_append_printf (
                                                changed, "    %s\n",
diff --git a/src/mail/e-mail-free-form-exp.c b/src/mail/e-mail-free-form-exp.c
index a347fc8bca..ef9118d984 100644
--- a/src/mail/e-mail-free-form-exp.c
+++ b/src/mail/e-mail-free-form-exp.c
@@ -84,7 +84,7 @@ mail_ffe_build_header_sexp (const gchar *word,
        }
 
        if (header_names[1])
-               g_string_append (sexp, ")");
+               g_string_append_c (sexp, ')');
 
        g_string_free (encoded_word, TRUE);
 
diff --git a/src/mail/em-filter-editor.c b/src/mail/em-filter-editor.c
index 8e1653dc7e..c16e7dbfdc 100644
--- a/src/mail/em-filter-editor.c
+++ b/src/mail/em-filter-editor.c
@@ -171,7 +171,7 @@ emfe_describe_filters_cb (GtkWidget *button,
                        g_string_append_printf (description, _("%s (%s, for any account)"), rule_name, 
rule->enabled ? _("enabled") : _("disabled"));
                }
 
-               g_string_append (description, "\n");
+               g_string_append_c (description, '\n');
 
                g_free (rule_name);
                g_free (account);
diff --git a/src/mail/mail-autofilter.c b/src/mail/mail-autofilter.c
index c1f5b28fdc..8d4b5f79d9 100644
--- a/src/mail/mail-autofilter.c
+++ b/src/mail/mail-autofilter.c
@@ -536,7 +536,7 @@ mail_filter_delete_folder (CamelStore *store,
                        } else {
                                if (s_count == 1) {
                                        g_string_prepend (s, "    ");
-                                       g_string_append (s, "\n");
+                                       g_string_append_c (s, '\n');
                                }
                                g_string_append_printf (s, "    %s\n", name);
                        }
diff --git a/src/mail/message-list.c b/src/mail/message-list.c
index 58fb1aea35..d0dba87128 100644
--- a/src/mail/message-list.c
+++ b/src/mail/message-list.c
@@ -1661,7 +1661,7 @@ sanitize_addresses (const gchar *string,
                        addr_start = gstring->len + 1;
                } else if (c == ',' && !quoted) {
                        ml_add_name_or_email (addresses, gstring->str, addr_start, return_names);
-                       g_string_append (addresses, ",");
+                       g_string_append_c (addresses, ',');
                        g_string_truncate (gstring, 0);
                        addr_start = -1;
                        continue;
diff --git a/src/modules/alarm-notify/alarm-notify.c b/src/modules/alarm-notify/alarm-notify.c
index 7a374f66da..1df835f629 100644
--- a/src/modules/alarm-notify/alarm-notify.c
+++ b/src/modules/alarm-notify/alarm-notify.c
@@ -150,7 +150,7 @@ alarm_notify_module_row_activated_cb (ERemindersWidget *reminders,
                cmd = g_string_sized_new (128);
 
                g_string_append (cmd, PACKAGE);
-               g_string_append (cmd, " ");
+               g_string_append_c (cmd, ' ');
                g_string_append (cmd, scheme);
                g_string_append (cmd, "///?");
 
@@ -159,7 +159,7 @@ alarm_notify_module_row_activated_cb (ERemindersWidget *reminders,
                g_string_append (cmd, tmp);
                g_free (tmp);
 
-               g_string_append (cmd, "&");
+               g_string_append_c (cmd, '&');
 
                tmp = g_uri_escape_string (comp_uid, NULL, TRUE);
                g_string_append (cmd, "comp-uid=");
diff --git a/src/modules/mail/e-mail-shell-backend.c b/src/modules/mail/e-mail-shell-backend.c
index 75bf0c789c..9db7468641 100644
--- a/src/modules/mail/e-mail-shell-backend.c
+++ b/src/modules/mail/e-mail-shell-backend.c
@@ -1462,7 +1462,7 @@ e_mail_labels_get_filter_code (EFilterElement *element,
        }
 
        if (is_not)
-               g_string_append (out, ")");
+               g_string_append_c (out, ')');
        g_string_append (out, " ))");
 }
 
diff --git a/src/modules/mail/e-mail-shell-view.c b/src/modules/mail/e-mail-shell-view.c
index c3221615d5..264cb2d015 100644
--- a/src/modules/mail/e-mail-shell-view.c
+++ b/src/modules/mail/e-mail-shell-view.c
@@ -512,7 +512,7 @@ mail_shell_view_construct_filter_message_thread (EMailShellView *mail_shell_view
        g_string_append (query, ")))");
 
        if (with_query)
-               g_string_append (query, ")");
+               g_string_append_c (query, ')');
 
        return g_string_free (query, FALSE);
 }
diff --git a/src/modules/plugin-manager/evolution-plugin-manager.c 
b/src/modules/plugin-manager/evolution-plugin-manager.c
index 551ee6ee51..024b5f9f82 100644
--- a/src/modules/plugin-manager/evolution-plugin-manager.c
+++ b/src/modules/plugin-manager/evolution-plugin-manager.c
@@ -160,7 +160,7 @@ eppm_show_plugin (Manager *m,
                                if (epa->email) {
                                        g_string_append (out, " <");
                                        g_string_append (out, epa->email);
-                                       g_string_append (out, ">");
+                                       g_string_append_c (out, '>');
                                }
                        }
                        gtk_label_set_label (m->items[LABEL_AUTHOR], out->str);
diff --git a/src/modules/webkit-editor/web-extension/e-composer-dom-functions.c 
b/src/modules/webkit-editor/web-extension/e-composer-dom-functions.c
index 1544c13243..4e1b7d1cc5 100644
--- a/src/modules/webkit-editor/web-extension/e-composer-dom-functions.c
+++ b/src/modules/webkit-editor/web-extension/e-composer-dom-functions.c
@@ -585,9 +585,9 @@ e_composer_dom_get_raw_body_content_without_signature (EEditorPage *editor_page)
                        g_free (text);
 
                        if (WEBKIT_DOM_IS_HTML_DIV_ELEMENT (node))
-                               g_string_append (content, "\n");
+                               g_string_append_c (content, '\n');
                        else
-                               g_string_append (content, " ");
+                               g_string_append_c (content, ' ');
                }
        }
        g_clear_object (&list);
diff --git a/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c 
b/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c
index 9a83d2c350..040cdbfc02 100644
--- a/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c
+++ b/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c
@@ -7032,7 +7032,7 @@ process_list_to_plain_text (EEditorPage *editor_page,
        item = webkit_dom_node_get_first_child (WEBKIT_DOM_NODE (element));
        while (item) {
                if (WEBKIT_DOM_IS_HTML_BR_ELEMENT (item))
-                       g_string_append (output, "\n");
+                       g_string_append_c (output, '\n');
 
                if (WEBKIT_DOM_IS_HTML_LI_ELEMENT (item)) {
                        gchar *space = NULL, *item_str = NULL;
@@ -7055,7 +7055,7 @@ process_list_to_plain_text (EEditorPage *editor_page,
                                while (node) {
                                        if (WEBKIT_DOM_IS_HTML_BR_ELEMENT (node) &&
                                            element_has_class (WEBKIT_DOM_ELEMENT (node), "-x-evo-wrap-br")) {
-                                               g_string_append (line, "\n");
+                                               g_string_append_c (line, '\n');
                                                /* put spaces before line characters -> wordwraplength - 
indentation */
                                                for (ii = 0; ii < level; ii++)
                                                        g_string_append (line, indent_per_level);
@@ -7233,7 +7233,7 @@ process_list_to_plain_text (EEditorPage *editor_page,
                        counter++;
                        item = webkit_dom_node_get_next_sibling (item);
                        if (item)
-                               g_string_append (output, "\n");
+                               g_string_append_c (output, '\n');
 
                        g_free (item_str);
                        g_string_free (item_value, TRUE);
@@ -7247,7 +7247,7 @@ process_list_to_plain_text (EEditorPage *editor_page,
        }
 
        if (webkit_dom_node_get_next_sibling (WEBKIT_DOM_NODE (element)) && !empty)
-               g_string_append (output, "\n");
+               g_string_append_c (output, '\n');
 
        g_free (indent_per_level);
 }
@@ -7657,7 +7657,7 @@ process_node_to_plain_text_for_exporting (EEditorPage *editor_page,
                }
 
                if (WEBKIT_DOM_IS_HTML_BR_ELEMENT (child)) {
-                       g_string_append (buffer, "\n");
+                       g_string_append_c (buffer, '\n');
                        goto next;
                }
 
@@ -7679,7 +7679,7 @@ process_node_to_plain_text_for_exporting (EEditorPage *editor_page,
              WEBKIT_DOM_IS_HTML_PARAGRAPH_ELEMENT (source) ||
              WEBKIT_DOM_IS_HTML_PRE_ELEMENT (source) ||
              WEBKIT_DOM_IS_HTML_QUOTE_ELEMENT (source)))
-               g_string_append (buffer, "\n");
+               g_string_append_c (buffer, '\n');
 
        if (g_str_has_suffix (buffer->str, "\n") && buffer->len > 1 &&
            WEBKIT_DOM_IS_HTML_BODY_ELEMENT (source))
diff --git a/src/plugins/publish-calendar/publish-calendar.c b/src/plugins/publish-calendar/publish-calendar.c
index 2a57835f40..c985f8175e 100644
--- a/src/plugins/publish-calendar/publish-calendar.c
+++ b/src/plugins/publish-calendar/publish-calendar.c
@@ -125,7 +125,7 @@ update_publish_notification (GtkMessageType msg_type,
        if (!actual_msg) {
                actual_msg = g_string_new (msg_text);
        } else {
-               g_string_append (actual_msg, "\n");
+               g_string_append_c (actual_msg, '\n');
                g_string_append (actual_msg, msg_text);
        }
 
@@ -1031,7 +1031,7 @@ error_queue_show_idle (gpointer user_data)
                                if (!info) {
                                        info = g_string_new (data->error->message);
                                } else if (data->description) {
-                                       g_string_append (info, " ");
+                                       g_string_append_c (info, ' ');
                                        g_string_append (info, data->error->message);
                                } else {
                                        g_string_append (info, "\n\n");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]