[evolution/wip/webkit-composer: 592/966] Minor coding style update



commit a05cccee842d923edebd42adcf60c233b8081e60
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 ++++++++++++++-------
 e-util/e-editor-actions.c     |    4 ++--
 3 files changed, 22 insertions(+), 12 deletions(-)
---
diff --git a/composer/e-composer-actions.c b/composer/e-composer-actions.c
index e9cf109..9479b97 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 21d093d..a3eaee5 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -409,14 +409,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);
@@ -448,11 +450,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;
 }
@@ -518,13 +522,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. */
@@ -662,8 +668,9 @@ e_composer_selection_is_image_uris (EMsgComposer *composer,
 
        uris = gtk_selection_data_get_uris (selection);
 
-       if (!uris)
+       if (uris == NULL) {
                return FALSE;
+       }
 
        for (ii = 0; uris[ii] != NULL; ii++) {
                GFile *file;
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]