[evolution/webkit-composer: 81/147] Minor coding style update
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/webkit-composer: 81/147] Minor coding style update
- Date: Mon, 21 Jan 2013 02:16:56 +0000 (UTC)
commit af17de2697f7afb8dcc9485d73b86c4df45fe501
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 | 18 +++++++++++-------
composer/e-composer-private.c | 21 ++++++++++++++-------
composer/e-msg-composer.c | 4 +++-
e-util/e-editor-actions.c | 4 ++--
4 files changed, 30 insertions(+), 17 deletions(-)
---
diff --git a/composer/e-composer-actions.c b/composer/e-composer-actions.c
index a7b7f33..b14ae75 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
@@ -120,12 +122,13 @@ action_preferences_cb (GtkAction *action,
GTK_WIN_POS_CENTER_ON_PARENT);
gtk_window_present (GTK_WINDOW (preferences_window));
- if (e_shell_get_express_mode (shell))
+ if (e_shell_get_express_mode (shell)) {
e_preferences_window_filter_page (
E_PREFERENCES_WINDOW (preferences_window), page_name);
- else
+ } else {
e_preferences_window_show_page (
E_PREFERENCES_WINDOW (preferences_window), page_name);
+ }
}
static void
@@ -227,8 +230,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));
@@ -258,9 +262,9 @@ action_send_cb (GtkAction *action,
/* If we're online, send the message now.
* Otherwise write the message to Outbox. */
- if (camel_session_get_online (session))
+ if (camel_session_get_online (session)) {
e_msg_composer_send (composer);
- else {
+ } else {
/* Inform the user. */
e_alert_run_dialog_for_args (
GTK_WINDOW (composer),
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c
index 2972836..02b644f 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -518,14 +518,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);
@@ -557,11 +559,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;
}
@@ -708,13 +712,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. */
@@ -823,8 +829,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 222cd25..8852308 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -4420,7 +4420,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]