[evolution/webkit-composer: 81/210] Minor coding style update
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/webkit-composer: 81/210] Minor coding style update
- Date: Mon, 8 Jul 2013 00:52:39 +0000 (UTC)
commit f6f4bcfd4d0812d8dcbb306f377a60879a97a693
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 2a4cfed..1f6ba47 100644
--- a/composer/e-composer-actions.c
+++ b/composer/e-composer-actions.c
@@ -46,8 +46,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");
@@ -59,8 +60,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
@@ -223,8 +225,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 5dc0081..0885d2a 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -425,14 +425,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);
@@ -464,11 +466,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;
}
@@ -615,13 +619,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. */
@@ -730,8 +736,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 86ca388..2656dbf 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -4406,7 +4406,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]