aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-01-19 10:24:06 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-01-19 12:48:48 +0800
commit59e6e599ba390b0aa720973ff297260d7d354b73 (patch)
tree42342a51edb84a0f08f3c2a49def3c60bc71d0fa /mail
parent61ae36351b24cc676f60483d576706bf827f2987 (diff)
downloadgsoc2013-evolution-59e6e599ba390b0aa720973ff297260d7d354b73.tar
gsoc2013-evolution-59e6e599ba390b0aa720973ff297260d7d354b73.tar.gz
gsoc2013-evolution-59e6e599ba390b0aa720973ff297260d7d354b73.tar.bz2
gsoc2013-evolution-59e6e599ba390b0aa720973ff297260d7d354b73.tar.lz
gsoc2013-evolution-59e6e599ba390b0aa720973ff297260d7d354b73.tar.xz
gsoc2013-evolution-59e6e599ba390b0aa720973ff297260d7d354b73.tar.zst
gsoc2013-evolution-59e6e599ba390b0aa720973ff297260d7d354b73.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'mail')
-rw-r--r--mail/e-mail-backend.c26
-rw-r--r--mail/e-mail-ui-session.c21
-rw-r--r--mail/em-account-editor.c5
-rw-r--r--mail/em-composer-utils.c1
-rw-r--r--mail/em-format-html-print.c6
-rw-r--r--mail/em-format-html.c5
-rw-r--r--mail/em-utils.c164
-rw-r--r--mail/mail-vfolder.c6
-rw-r--r--mail/message-list.c2
9 files changed, 116 insertions, 120 deletions
diff --git a/mail/e-mail-backend.c b/mail/e-mail-backend.c
index 921b2d0efc..9e32b654d7 100644
--- a/mail/e-mail-backend.c
+++ b/mail/e-mail-backend.c
@@ -764,8 +764,8 @@ mail_backend_finalize (GObject *object)
static void
mail_backend_add_store (EMailSession *session,
- CamelStore *store,
- EMailBackend *backend)
+ CamelStore *store,
+ EMailBackend *backend)
{
EMFolderTreeModel *model;
@@ -775,8 +775,8 @@ mail_backend_add_store (EMailSession *session,
static void
mail_backend_remove_store (EMailSession *session,
- CamelStore *store,
- EMailBackend *backend)
+ CamelStore *store,
+ EMailBackend *backend)
{
EMFolderTreeModel *model;
@@ -789,7 +789,7 @@ mail_backend_remove_store (EMailSession *session,
#define GET_ACITIVITY(cancellable) \
g_object_get_data (G_OBJECT (cancellable), "e-activity")
-static void
+static void
mail_mt_create_activity (GCancellable *cancellable)
{
EActivity *activity;
@@ -817,7 +817,7 @@ mail_mt_submit_activity (GCancellable *cancellable)
}
-static void
+static void
mail_mt_free_activity (GCancellable *cancellable)
{
EActivity *activity = GET_ACITIVITY (cancellable);
@@ -826,7 +826,7 @@ mail_mt_free_activity (GCancellable *cancellable)
g_object_unref (activity);
}
-static void
+static void
mail_mt_complete_acitivity (GCancellable *cancellable)
{
EActivity *activity = GET_ACITIVITY (cancellable);
@@ -835,19 +835,19 @@ mail_mt_complete_acitivity (GCancellable *cancellable)
e_activity_set_state (activity, E_ACTIVITY_COMPLETED);
}
-static void
+static void
mail_mt_cancel_activity (GCancellable *cancellable)
{
EActivity *activity = GET_ACITIVITY (cancellable);
if (activity)
- e_activity_set_state (activity, E_ACTIVITY_CANCELLED);
+ e_activity_set_state (activity, E_ACTIVITY_CANCELLED);
}
-static void
+static void
mail_mt_alert_error (GCancellable *cancellable,
- const char *what,
- const char *message)
+ const gchar *what,
+ const gchar *message)
{
EShell *shell;
EShellView *shell_view;
@@ -910,7 +910,7 @@ mail_backend_constructed (GObject *object)
g_signal_connect (
priv->session, "flush-outbox",
- G_CALLBACK (mail_send), priv->session);
+ G_CALLBACK (mail_send), priv->session);
g_object_bind_property (
shell, "online",
diff --git a/mail/e-mail-ui-session.c b/mail/e-mail-ui-session.c
index dcb2e25573..d0ddb05477 100644
--- a/mail/e-mail-ui-session.c
+++ b/mail/e-mail-ui-session.c
@@ -38,7 +38,6 @@
#include <gtk/gtk.h>
-
#ifdef HAVE_CANBERRA
#include <canberra-gtk.h>
#endif
@@ -93,7 +92,7 @@ struct _EMailUISessionPrivate {
enum {
PROP_0,
PROP_ACCOUNT_STORE,
- PROP_LABEL_STORE,
+ PROP_LABEL_STORE,
PROP_VFOLDER_STORE
};
@@ -128,7 +127,7 @@ struct _user_message_msg {
GSList *button_captions;
EFlag *done;
- gint result;
+ gint result;
guint ismain : 1;
};
@@ -243,7 +242,7 @@ user_message_exec (struct _user_message_msg *m,
}
/* when no shell-content found, which might not happen, but just in case,
- process the information alert like usual, through an EAlertDialog machinery
+ * process the information alert like usual, through an EAlertDialog machinery
*/
if (shell_content) {
e_alert_submit (E_ALERT_SINK (shell_content), error_type, m->prompt, NULL);
@@ -253,7 +252,7 @@ user_message_exec (struct _user_message_msg *m,
return;
}
}
-
+
/* Pull in the active window from the shell to get a parent window */
parent = e_shell_get_active_window (shell);
user_message_dialog = e_alert_dialog_new_for_args (
@@ -279,7 +278,6 @@ user_message_exec (struct _user_message_msg *m,
gtk_dialog_add_button (GTK_DIALOG (user_message_dialog), iter->data, index);
}
-
/* XXX This is a case where we need to be able to construct
* custom EAlerts without a predefined XML definition. */
if (m->ismain) {
@@ -293,7 +291,7 @@ user_message_exec (struct _user_message_msg *m,
if (g_slist_length (m->button_captions) <= 1)
user_data = NULL;
-
+
g_signal_connect (
user_message_dialog, "response",
G_CALLBACK (user_message_response), user_data);
@@ -492,7 +490,6 @@ mail_ui_session_dispose (GObject *object)
priv->label_store = NULL;
}
-
if (priv->vfolder_store != NULL) {
g_object_unref (priv->vfolder_store);
priv->vfolder_store = NULL;
@@ -621,7 +618,7 @@ mail_ui_session_constructed (GObject *object)
gulong handler_id;
session = E_MAIL_SESSION (object);
- uisession = E_MAIL_UI_SESSION(object);
+ uisession = E_MAIL_UI_SESSION (object);
uisession->priv = priv = E_MAIL_UI_SESSION_GET_PRIVATE (object);
priv->account_store = e_mail_account_store_new (session);
@@ -713,7 +710,7 @@ mail_ui_session_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
}
static void
@@ -737,7 +734,6 @@ mail_ui_session_get_property (GObject *object,
E_MAIL_UI_SESSION (object)));
return;
-
case PROP_VFOLDER_STORE:
g_value_set_object (
value,
@@ -802,7 +798,7 @@ e_mail_ui_session_class_init (EMailUISessionClass *class)
object_class = G_OBJECT_CLASS (class);
object_class->set_property = mail_ui_session_set_property;
- object_class->get_property = mail_ui_session_get_property;
+ object_class->get_property = mail_ui_session_get_property;
object_class->dispose = mail_ui_session_dispose;
object_class->constructed = mail_ui_session_constructed;
@@ -867,7 +863,6 @@ e_mail_ui_session_new (void)
NULL);
}
-
EMailAccountStore *
e_mail_ui_session_get_account_store (EMailUISession *session)
{
diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c
index 8b7f1600d6..ffcc637a84 100644
--- a/mail/em-account-editor.c
+++ b/mail/em-account-editor.c
@@ -273,7 +273,8 @@ static void emae_account_folder_changed (EMFolderSelectionButton *folder, EMAcco
G_DEFINE_TYPE (EMAccountEditor, em_account_editor, G_TYPE_OBJECT)
static void
-emae_config_gone_cb (gpointer pemae, GObject *pconfig)
+emae_config_gone_cb (gpointer pemae,
+ GObject *pconfig)
{
EMAccountEditor *emae = pemae;
struct _EMConfig *config = (struct _EMConfig *) pconfig;
@@ -5507,7 +5508,7 @@ emae_commit (EConfig *ec,
service = camel_session_get_service (
CAMEL_SESSION (session), account->uid);
- store = e_mail_ui_session_get_account_store (E_MAIL_UI_SESSION(session));
+ store = e_mail_ui_session_get_account_store (E_MAIL_UI_SESSION (session));
e_mail_account_store_set_default_service (store, service);
}
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index 4d8e37d9a4..fdd3322a63 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -61,7 +61,6 @@
#include "em-event.h"
#include "mail-send-recv.h"
-
#ifdef G_OS_WIN32
#ifdef gmtime_r
#undef gmtime_r
diff --git a/mail/em-format-html-print.c b/mail/em-format-html-print.c
index 04216900bc..97a7627c6d 100644
--- a/mail/em-format-html-print.c
+++ b/mail/em-format-html-print.c
@@ -224,14 +224,14 @@ em_format_html_print_message (EMFormatHTMLPrint *efhp,
if (efhp->async) {
g_signal_connect (
efhp, "complete", G_CALLBACK (emfhp_complete), efhp);
-
+
/* FIXME Not passing a GCancellable here. */
em_format_format_clone (
- (EMFormat *) efhp,
+ (EMFormat *) efhp,
folder, message_uid, message,
(EMFormat *) efhp->source, NULL);
} else {
- em_format_html_clone_sync (folder, message_uid, message, (EMFormatHTML *)efhp, (EMFormat *)efhp->source);
+ em_format_html_clone_sync (folder, message_uid, message, (EMFormatHTML *) efhp, (EMFormat *) efhp->source);
emfhp_complete (efhp);
}
}
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index a720d2cc9f..8e4769ecf2 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -332,7 +332,8 @@ static MailMsgInfo efh_format_info = {
};
static gboolean
-efh_format_helper (struct _format_msg *m, gboolean async)
+efh_format_helper (struct _format_msg *m,
+ gboolean async)
{
GtkHTMLStream *hstream;
EMFormatHTML *efh = m->format;
@@ -409,7 +410,7 @@ efh_format_helper (struct _format_msg *m, gboolean async)
if (async) {
mail_msg_unordered_push (m);
} else {
- efh_format_exec(m, NULL, NULL);
+ efh_format_exec (m, NULL, NULL);
}
}
diff --git a/mail/em-utils.c b/mail/em-utils.c
index 247b47d967..c712431aa8 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -617,9 +617,9 @@ em_utils_write_messages_to_stream (CamelFolder *folder,
}
static gboolean
-em_utils_print_messages_to_file (CamelFolder *folder,
- const gchar * uid,
- const gchar *filename)
+em_utils_print_messages_to_file (CamelFolder *folder,
+ const gchar *uid,
+ const gchar *filename)
{
EMFormatHTMLPrint *efhp;
CamelMimeMessage *message;
@@ -884,11 +884,11 @@ em_utils_selection_get_uidlist (GtkSelectionData *selection_data,
}
static gchar *
-em_utils_build_export_filename (CamelFolder *folder,
- const gchar * uid,
- const gchar * exporttype,
- gint exportname,
- const gchar * tmpdir)
+em_utils_build_export_filename (CamelFolder *folder,
+ const gchar *uid,
+ const gchar *exporttype,
+ gint exportname,
+ const gchar *tmpdir)
{
CamelMessageInfo *info;
gchar *file, *tmpfile;
@@ -896,16 +896,16 @@ em_utils_build_export_filename (CamelFolder *folder,
gchar datetmp[15];
/* Try to get the drop filename from the message or folder */
- info = camel_folder_get_message_info(folder, uid);
+ info = camel_folder_get_message_info (folder, uid);
if (info) {
if (camel_message_info_subject (info)) {
time_t reftime;
reftime = camel_message_info_date_sent (info);
- if (exportname==DND_USE_DND_DATE) {
- reftime = time(NULL);
+ if (exportname == DND_USE_DND_DATE) {
+ reftime = time (NULL);
}
- ts = localtime(&reftime);
+ ts = localtime (&reftime);
strftime(datetmp, 15, "%Y%m%d%H%M%S", ts);
if (g_ascii_strcasecmp (exporttype, "pdf")==0)
@@ -914,11 +914,11 @@ em_utils_build_export_filename (CamelFolder *folder,
file = g_strdup_printf ("%s_%s", datetmp, camel_message_info_subject(info));
}
- camel_folder_free_message_info(folder, info);
+ camel_folder_free_message_info (folder, info);
} else {
time_t reftime;
- reftime = time(NULL);
- ts = localtime(&reftime);
+ reftime = time (NULL);
+ ts = localtime (&reftime);
strftime(datetmp, 15, "%Y%m%d%H%M%S", ts);
if (g_ascii_strcasecmp (exporttype, "pdf")==0)
file = g_strdup_printf ("%s_Untitled Message.pdf", datetmp);
@@ -927,11 +927,11 @@ em_utils_build_export_filename (CamelFolder *folder,
}
- e_filename_make_safe(file);
+ e_filename_make_safe (file);
- tmpfile = g_build_filename(tmpdir, file, NULL);
+ tmpfile = g_build_filename (tmpdir, file, NULL);
- g_free(file);
+ g_free (file);
return tmpfile;
}
@@ -951,17 +951,17 @@ em_utils_selection_set_urilist (GtkSelectionData *data,
CamelFolder *folder,
GPtrArray *uids)
{
- gchar *tmpdir;
+ gchar *tmpdir;
gchar *uri;
- gint fd;
+ gint fd;
GConfClient *client;
gchar *exporttype;
gint exportname;
-
+
tmpdir = e_mkdtemp("drag-n-drop-XXXXXX");
- if (tmpdir == NULL)
- return;
-
+ if (tmpdir == NULL)
+ return;
+
client = gconf_client_get_default ();
exporttype = gconf_client_get_string (
client, "/apps/evolution/mail/save_file_format", NULL);
@@ -974,91 +974,91 @@ em_utils_selection_set_urilist (GtkSelectionData *data,
gchar * file = NULL;
CamelStream *fstream;
- if(uids->len>1) {
+ if (uids->len > 1) {
gchar * tmp = g_strdup_printf(_("Messages from %s"), camel_folder_get_display_name (folder));
- e_filename_make_safe(tmp);
- file = g_build_filename(tmpdir, tmp, NULL);
- g_free(tmp);
+ e_filename_make_safe (tmp);
+ file = g_build_filename (tmpdir, tmp, NULL);
+ g_free (tmp);
} else {
- file = em_utils_build_export_filename(folder, uids->pdata[0], exporttype, exportname, tmpdir);
- }
-
- g_free(tmpdir);
- fd = g_open(file, O_WRONLY | O_CREAT | O_EXCL | O_BINARY, 0666);
+ file = em_utils_build_export_filename (folder, uids->pdata[0], exporttype, exportname, tmpdir);
+ }
+
+ g_free (tmpdir);
+ fd = g_open (file, O_WRONLY | O_CREAT | O_EXCL | O_BINARY, 0666);
if (fd == -1) {
- g_free(file);
- g_free(exporttype);
+ g_free (file);
+ g_free (exporttype);
return;
- }
-
- uri = g_filename_to_uri(file, NULL, NULL);
- fstream = camel_stream_fs_new_with_fd(fd);
+ }
+
+ uri = g_filename_to_uri (file, NULL, NULL);
+ fstream = camel_stream_fs_new_with_fd (fd);
if (fstream) {
- if (em_utils_write_messages_to_stream(folder, uids, fstream) == 0) {
+ if (em_utils_write_messages_to_stream (folder, uids, fstream) == 0) {
GdkAtom type;
/* terminate with \r\n to be compliant with the spec */
gchar *uri_crlf = g_strconcat(uri, "\r\n", NULL);
type = gtk_selection_data_get_target (data);
- gtk_selection_data_set(data, type, 8, (guchar *) uri_crlf, strlen(uri_crlf));
- g_free(uri_crlf);
+ gtk_selection_data_set (data, type, 8, (guchar *) uri_crlf, strlen (uri_crlf));
+ g_free (uri_crlf);
}
g_object_unref (fstream);
} else
- close(fd);
-
- g_free(exporttype);
- g_free(file);
- g_free(uri);
+ close (fd);
+
+ g_free (exporttype);
+ g_free (file);
+ g_free (uri);
} else if(g_ascii_strcasecmp (exporttype, "pdf")==0) {
gchar ** filenames, **uris;
- gint i, uris_count=0;
+ gint i, uris_count = 0;
- filenames = g_new(gchar *, uids->len);
- uris = g_new(gchar *, uids->len + 1);
- for(i=0; i<uids->len; i++) {
- filenames[i] = em_utils_build_export_filename(folder, uids->pdata[i], exporttype, exportname, tmpdir);
+ filenames = g_new (gchar *, uids->len);
+ uris = g_new (gchar *, uids->len + 1);
+ for (i = 0; i < uids->len; i++) {
+ filenames[i] = em_utils_build_export_filename (folder, uids->pdata[i], exporttype, exportname, tmpdir);
/* validity test */
- fd = g_open(filenames[i], O_WRONLY | O_CREAT | O_EXCL | O_BINARY, 0666);
+ fd = g_open (filenames[i], O_WRONLY | O_CREAT | O_EXCL | O_BINARY, 0666);
if (fd == -1) {
gint j;
- for(j=0; j<=i; j++) {
- g_free(filenames[j]);
+ for (j = 0; j <= i; j++) {
+ g_free (filenames[j]);
}
- g_free(filenames);
- g_free(uris);
- g_free(tmpdir);
- g_free(exporttype);
+ g_free (filenames);
+ g_free (uris);
+ g_free (tmpdir);
+ g_free (exporttype);
return;
}
- close(fd);
+ close (fd);
/* export */
if (em_utils_print_messages_to_file (folder, uids->pdata[i], filenames[i])) {
/* terminate with \r\n to be compliant with the spec */
- uri = g_filename_to_uri(filenames[i], NULL, NULL);
+ uri = g_filename_to_uri (filenames[i], NULL, NULL);
uris[uris_count++] = g_strconcat(uri, "\r\n", NULL);
- g_free(uri);
+ g_free (uri);
}
- }
-
+ }
+
uris[uris_count] = NULL;
- gtk_selection_data_set_uris(data, uris);
-
- g_free(tmpdir);
- for(i=0; i<uids->len; i++) {
- g_free(filenames[i]);
- }
- g_free(filenames);
- for(i=0; i<uris_count; i++) {
- g_free(uris[i]);
+ gtk_selection_data_set_uris (data, uris);
+
+ g_free (tmpdir);
+ for (i = 0; i < uids->len; i++) {
+ g_free (filenames[i]);
+ }
+ g_free (filenames);
+ for (i = 0; i < uris_count; i++) {
+ g_free (uris[i]);
}
- g_free(uris);
- g_free(exporttype);
-
+ g_free (uris);
+ g_free (exporttype);
+
} else {
- g_free(tmpdir);
- g_free(exporttype);
+ g_free (tmpdir);
+ g_free (exporttype);
}
}
@@ -1346,8 +1346,8 @@ emu_restore_folder_tree_state (EMFolderTree *folder_tree)
static gboolean
check_prefix (const gchar *subject,
- const gchar *prefix,
- gint *skip_len)
+ const gchar *prefix,
+ gint *skip_len)
{
gint plen;
@@ -1375,8 +1375,8 @@ check_prefix (const gchar *subject,
gboolean
em_utils_is_re_in_subject (EShell *shell,
- const gchar *subject,
- gint *skip_len)
+ const gchar *subject,
+ gint *skip_len)
{
EShellSettings *shell_settings;
gchar *prefixes, **prefixes_strv;
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c
index 4b10e829de..7d5b3c24e8 100644
--- a/mail/mail-vfolder.c
+++ b/mail/mail-vfolder.c
@@ -250,7 +250,7 @@ vfolder_adduri_exec (struct _adduri_msg *m,
}
/* always pick fresh folders - they are
- from CamelStore's folders bag anyway */
+ * from CamelStore's folders bag anyway */
folder = e_mail_session_uri_to_folder_sync (
m->session, m->uri, 0, cancellable, error);
@@ -691,7 +691,7 @@ rule_add_sources (EMailSession *session,
const gchar *uri = link->data;
/* always pick fresh folders - they are
- from CamelStore's folders bag anyway */
+ * from CamelStore's folders bag anyway */
if (mail_folder_cache_get_folder_from_uri (folder_cache, uri, NULL)) {
sources_uri = g_list_append (sources_uri, g_strdup (uri));
}
@@ -1023,7 +1023,7 @@ vfolder_load_storage (EMailBackend *backend)
config_dir = mail_session_get_config_dir ();
session = e_mail_backend_get_session (backend);
- vfolder_store = e_mail_ui_session_get_vfolder_store (E_MAIL_UI_SESSION(session));
+ vfolder_store = e_mail_ui_session_get_vfolder_store (E_MAIL_UI_SESSION (session));
g_signal_connect (
vfolder_store, "folder-deleted",
diff --git a/mail/message-list.c b/mail/message-list.c
index 405e9d08cd..82f6540b1a 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -4238,7 +4238,7 @@ message_list_count (MessageList *message_list)
static void
ml_getselcount_cb (gint model_row,
- gpointer user_data)
+ gpointer user_data)
{
struct ml_count_data *data = user_data;