aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer/e-msg-composer.c23
-rw-r--r--e-util/e-mail-signature-editor.c4
-rw-r--r--e-util/e-menu-tool-button.c4
-rw-r--r--e-util/e-spell-entry.c22
-rw-r--r--mail/em-utils.c10
-rw-r--r--mail/em-utils.h8
6 files changed, 42 insertions, 29 deletions
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index dcfd3852e6..82f1b30f96 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -576,8 +576,9 @@ build_message_headers (EMsgComposer *composer,
value = camel_address_encode (CAMEL_ADDRESS (addr));
camel_medium_set_header (medium, "Resent-From", value);
g_free (value);
- } else
+ } else {
camel_mime_message_set_from (message, addr);
+ }
g_object_unref (addr);
/* X-Evolution-Identity */
@@ -1374,9 +1375,10 @@ composer_build_message (EMsgComposer *composer,
context->top_level_part =
CAMEL_DATA_WRAPPER (html_with_images);
- } else
+ } else {
context->top_level_part =
CAMEL_DATA_WRAPPER (body);
+ }
}
/* If there are attachments, wrap what we've built so far
@@ -3231,13 +3233,13 @@ e_msg_composer_new_with_message (EShell *shell,
flags = g_strsplit (format, ", ", 0);
for (i = 0; flags[i]; i++) {
- if (g_ascii_strcasecmp (flags[i], "text/html") == 0)
+ if (g_ascii_strcasecmp (flags[i], "text/html") == 0) {
gtkhtml_editor_set_html_mode (
GTKHTML_EDITOR (composer), TRUE);
- else if (g_ascii_strcasecmp (flags[i], "text/plain") == 0)
+ } else if (g_ascii_strcasecmp (flags[i], "text/plain") == 0) {
gtkhtml_editor_set_html_mode (
GTKHTML_EDITOR (composer), FALSE);
- else if (g_ascii_strcasecmp (flags[i], "pgp-sign") == 0) {
+ } else if (g_ascii_strcasecmp (flags[i], "pgp-sign") == 0) {
action = GTK_TOGGLE_ACTION (ACTION (PGP_SIGN));
gtk_toggle_action_set_active (action, TRUE);
} else if (g_ascii_strcasecmp (flags[i], "pgp-encrypt") == 0) {
@@ -3333,10 +3335,12 @@ e_msg_composer_new_with_message (EShell *shell,
camel_content_type_is (
content_type, "application", "x-pkcs7-mime") ||
camel_content_type_is (
- content_type, "application", "pkcs7-mime")))
+ content_type, "application", "pkcs7-mime"))) {
+
gtk_toggle_action_set_active (
GTK_TOGGLE_ACTION (
ACTION (SMIME_ENCRYPT)), TRUE);
+ }
html = emcu_part_to_html (
session, CAMEL_MIME_PART (message),
@@ -3881,9 +3885,10 @@ merge_cc_bcc (EDestination **addrv,
for (ii = 0; addrv && addrv[ii]; ii++) {
if (!list_contains_addr (to, addrv[ii]) &&
!list_contains_addr (cc, addrv[ii]) &&
- !list_contains_addr (bcc, addrv[ii]))
+ !list_contains_addr (bcc, addrv[ii])) {
*merge_into = g_list_append (
*merge_into, g_object_ref (addrv[ii]));
+ }
}
}
@@ -5017,7 +5022,9 @@ e_save_spell_languages (GList *spell_languages)
/* Save the language codes to GSettings. */
settings = g_settings_new ("org.gnome.evolution.mail");
- g_settings_set_strv (settings, "composer-spell-languages", (const gchar * const *) lang_array->pdata);
+ g_settings_set_strv (
+ settings, "composer-spell-languages",
+ (const gchar * const *) lang_array->pdata);
g_object_unref (settings);
g_ptr_array_free (lang_array, TRUE);
diff --git a/e-util/e-mail-signature-editor.c b/e-util/e-mail-signature-editor.c
index 961edf14ca..de5337d923 100644
--- a/e-util/e-mail-signature-editor.c
+++ b/e-util/e-mail-signature-editor.c
@@ -586,9 +586,9 @@ mail_signature_editor_constructed (GObject *object)
/* Set the focus appropriately. If this is a new signature, draw
* the user's attention to the signature name entry. Otherwise go
* straight to the editing area. */
- if (source == NULL)
+ if (source == NULL) {
gtk_widget_grab_focus (editor->priv->entry);
- else {
+ } else {
GtkHTML *html;
html = gtkhtml_editor_get_html (gtkhtml_editor);
diff --git a/e-util/e-menu-tool-button.c b/e-util/e-menu-tool-button.c
index c2a68d0c05..16340dc483 100644
--- a/e-util/e-menu-tool-button.c
+++ b/e-util/e-menu-tool-button.c
@@ -191,7 +191,9 @@ menu_tool_button_get_property (GObject *object,
static void
menu_tool_button_dispose (GObject *object)
{
- EMenuToolButtonPrivate *priv = E_MENU_TOOL_BUTTON (object)->priv;
+ EMenuToolButtonPrivate *priv;
+
+ priv = E_MENU_TOOL_BUTTON_GET_PRIVATE (object);
if (priv->prefer_item) {
g_free (priv->prefer_item);
diff --git a/e-util/e-spell-entry.c b/e-util/e-spell-entry.c
index 56f7c14f8c..f9949c0bd7 100644
--- a/e-util/e-spell-entry.c
+++ b/e-util/e-spell-entry.c
@@ -330,7 +330,7 @@ replace_word (GtkWidget *menuitem,
checker = g_object_get_data (G_OBJECT (menuitem), "spell-entry-checker");
- if (checker)
+ if (checker != NULL)
gtkhtml_spell_checker_store_replacement (checker, oldword, -1, newword, -1);
g_free (oldword);
@@ -763,16 +763,15 @@ e_spell_entry_finalize (GObject *object)
if (entry->priv->settings)
g_object_unref (entry->priv->settings);
- if (entry->priv->checkers)
- g_slist_free_full (entry->priv->checkers, g_object_unref);
+
+ g_slist_free_full (entry->priv->checkers, g_object_unref);
+
if (entry->priv->attr_list)
pango_attr_list_unref (entry->priv->attr_list);
- if (entry->priv->words)
- g_strfreev (entry->priv->words);
- if (entry->priv->word_starts)
- g_free (entry->priv->word_starts);
- if (entry->priv->word_ends)
- g_free (entry->priv->word_ends);
+
+ g_strfreev (entry->priv->words);
+ g_free (entry->priv->word_starts);
+ g_free (entry->priv->word_ends);
G_OBJECT_CLASS (e_spell_entry_parent_class)->finalize (object);
}
@@ -844,7 +843,7 @@ e_spell_entry_set_languages (ESpellEntry *spell_entry,
gboolean
e_spell_entry_get_checking_enabled (ESpellEntry *spell_entry)
{
- g_return_val_if_fail (spell_entry != NULL, FALSE);
+ g_return_val_if_fail (E_IS_SPELL_ENTRY (spell_entry), FALSE);
return spell_entry->priv->checking_enabled;
}
@@ -853,7 +852,7 @@ void
e_spell_entry_set_checking_enabled (ESpellEntry *spell_entry,
gboolean enable_checking)
{
- g_return_if_fail (spell_entry != NULL);
+ g_return_if_fail (E_IS_SPELL_ENTRY (spell_entry));
if (spell_entry->priv->checking_enabled == enable_checking)
return;
@@ -862,5 +861,4 @@ e_spell_entry_set_checking_enabled (ESpellEntry *spell_entry,
spell_entry_recheck_all (spell_entry);
g_object_notify (G_OBJECT (spell_entry), "checking-enabled");
-
}
diff --git a/mail/em-utils.c b/mail/em-utils.c
index 3bb4b9f647..fc6568d1ea 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -1305,7 +1305,7 @@ em_utils_message_to_html (CamelSession *session,
gtk_widget_get_style (GTK_WIDGET (window)),
gtk_widget_get_state (GTK_WIDGET (window)));
- if (!parts_list) {
+ if (parts_list == NULL) {
GSettings *settings;
gchar *charset;
@@ -1356,7 +1356,7 @@ em_utils_message_to_html (CamelSession *session,
while (!g_queue_is_empty (&queue))
e_mail_part_unref (g_queue_pop_head (&queue));
- if (validity_found)
+ if (validity_found != NULL)
*validity_found = is_validity_found;
e_mail_formatter_format_sync (
@@ -1364,14 +1364,14 @@ em_utils_message_to_html (CamelSession *session,
E_MAIL_FORMATTER_MODE_PRINTING, NULL);
g_object_unref (formatter);
- if (hidden_text_html_part)
+ if (hidden_text_html_part != NULL)
hidden_text_html_part->is_hidden = TRUE;
g_object_unref (parts_list);
- if (parser)
+ if (parser != NULL)
g_object_unref (parser);
- if (append && *append)
+ if (append != NULL && *append != '\0')
camel_stream_write_string (mem, append, NULL, NULL);
camel_stream_write (mem, "", 1, NULL, NULL);
diff --git a/mail/em-utils.h b/mail/em-utils.h
index db286eb55b..1fe83077a1 100644
--- a/mail/em-utils.h
+++ b/mail/em-utils.h
@@ -66,7 +66,13 @@ void em_utils_selection_get_urilist (GtkSelectionData *data, CamelFolder *folder
EProxy * em_utils_get_proxy (void);
/* FIXME: should this have an override charset? */
-gchar *em_utils_message_to_html (CamelSession *session, CamelMimeMessage *msg, const gchar *credits, guint32 flags, struct _EMailPartList *parts_list, const gchar *append, guint32 *validity_found);
+gchar * em_utils_message_to_html (CamelSession *session,
+ CamelMimeMessage *msg,
+ const gchar *credits,
+ guint32 flags,
+ struct _EMailPartList *parts_list,
+ const gchar *append,
+ guint32 *validity_found);
void em_utils_empty_trash (GtkWidget *parent,
EMailSession *session);