[evolution/wip/webkit-composer: 147/372] Minor coding style update
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit-composer: 147/372] Minor coding style update
- Date: Thu, 6 Feb 2014 11:35:51 +0000 (UTC)
commit 86a272bb906721ed28a12e0823e628f0074d5307
Author: Dan Vrátil <dvratil redhat com>
Date: Tue Sep 11 11:47:57 2012 +0200
Minor coding style update
composer/e-composer-actions.c | 9 ++++++---
composer/e-composer-private.c | 21 ++++++++++++++-------
composer/e-msg-composer.c | 4 +++-
e-util/e-editor-actions.c | 4 ++--
4 files changed, 25 insertions(+), 13 deletions(-)
---
diff --git a/composer/e-composer-actions.c b/composer/e-composer-actions.c
index 1a19cc3..db4e75a 100644
--- a/composer/e-composer-actions.c
+++ b/composer/e-composer-actions.c
@@ -45,8 +45,9 @@ action_charset_cb (GtkRadioAction *action,
{
const gchar *charset;
- if (action != current)
+ if (action != current) {
return;
+ }
charset = g_object_get_data (G_OBJECT (action), "charset");
@@ -58,8 +59,9 @@ static void
action_close_cb (GtkAction *action,
EMsgComposer *composer)
{
- if (e_msg_composer_can_close (composer, TRUE))
+ if (e_msg_composer_can_close (composer, TRUE)) {
gtk_widget_destroy (GTK_WIDGET (composer));
+ }
}
static void
@@ -222,8 +224,9 @@ action_save_as_cb (GtkAction *action,
response = gtk_dialog_run (GTK_DIALOG (dialog));
- if (response != GTK_RESPONSE_OK)
+ if (response != GTK_RESPONSE_OK) {
goto exit;
+ }
editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c
index 943ec2c..f24dd78 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -429,14 +429,16 @@ e_composer_find_data_file (const gchar *basename)
/* Support running directly from the source tree. */
filename = g_build_filename (".", basename, NULL);
- if (g_file_test (filename, G_FILE_TEST_EXISTS))
+ if (g_file_test (filename, G_FILE_TEST_EXISTS)) {
return filename;
+ }
g_free (filename);
/* XXX This is kinda broken. */
filename = g_build_filename (EVOLUTION_UIDIR, basename, NULL);
- if (g_file_test (filename, G_FILE_TEST_EXISTS))
+ if (g_file_test (filename, G_FILE_TEST_EXISTS)) {
return filename;
+ }
g_free (filename);
g_critical ("Could not locate '%s'", basename);
@@ -468,11 +470,13 @@ e_composer_get_default_charset (void)
g_object_unref (settings);
- if (charset == NULL)
+ if (charset == NULL) {
charset = g_strdup (camel_iconv_locale_charset ());
+ }
- if (charset == NULL)
+ if (charset == NULL) {
charset = g_strdup ("us-ascii");
+ }
return charset;
}
@@ -619,13 +623,15 @@ e_composer_paste_image (EMsgComposer *composer,
}
/* Save the pixbuf as a temporary file in image/png format. */
- if (!gdk_pixbuf_save (pixbuf, filename, "png", &error, NULL))
+ if (!gdk_pixbuf_save (pixbuf, filename, "png", &error, NULL)) {
goto exit;
+ }
/* Convert the filename to a URI. */
uri = g_filename_to_uri (filename, NULL, &error);
- if (uri == NULL)
+ if (uri == NULL) {
goto exit;
+ }
/* In HTML mode, paste the image into the message body.
* In text mode, add the image to the attachment store. */
@@ -734,8 +740,9 @@ e_composer_selection_is_image_uris (EMsgComposer *composer,
uris = gtk_selection_data_get_uris (selection);
- if (uris == NULL)
+ if (uris == NULL) {
return FALSE;
+ }
for (ii = 0; uris[ii] != NULL; ii++) {
GFile *file;
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 3deb5f2..54f213e 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -4435,7 +4435,9 @@ e_msg_composer_attach (EMsgComposer *composer,
attachment = e_attachment_new ();
e_attachment_set_mime_part (attachment, mime_part);
e_attachment_store_add_attachment (store, attachment);
- e_attachment_load (attachment, NULL);
+ e_attachment_load_async (
+ attachment, (GAsyncReadyCallback)
+ e_attachment_load_handle_error, composer);
g_object_unref (attachment);
}
diff --git a/e-util/e-editor-actions.c b/e-util/e-editor-actions.c
index fbbe518..87ef70c 100644
--- a/e-util/e-editor-actions.c
+++ b/e-util/e-editor-actions.c
@@ -591,11 +591,11 @@ action_language_cb (GtkToggleAction *action,
/* Update the list of active dictionaries */
list = editor->priv->active_dictionaries;
- if (active)
+ if (active) {
list = g_list_insert_sorted (
list, (EnchantDict *) dictionary,
(GCompareFunc) e_spell_dictionary_compare);
- else {
+ } else {
GList *link;
link = g_list_find (list, dictionary);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]