aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-08-03 07:38:22 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-08-03 07:48:54 +0800
commit49e8d834fc6c5b12d9e2b9f120034dd6180a70d4 (patch)
tree4b6056df4580f4b14d5b67180934a139008e2ca8
parentceec3b8f6064d20a1603e4049c76a6a15a8dad9a (diff)
downloadgsoc2013-evolution-49e8d834fc6c5b12d9e2b9f120034dd6180a70d4.tar
gsoc2013-evolution-49e8d834fc6c5b12d9e2b9f120034dd6180a70d4.tar.gz
gsoc2013-evolution-49e8d834fc6c5b12d9e2b9f120034dd6180a70d4.tar.bz2
gsoc2013-evolution-49e8d834fc6c5b12d9e2b9f120034dd6180a70d4.tar.lz
gsoc2013-evolution-49e8d834fc6c5b12d9e2b9f120034dd6180a70d4.tar.xz
gsoc2013-evolution-49e8d834fc6c5b12d9e2b9f120034dd6180a70d4.tar.zst
gsoc2013-evolution-49e8d834fc6c5b12d9e2b9f120034dd6180a70d4.zip
Coding style and whitespace cleanup.
-rw-r--r--mail/e-mail-notebook-view.c148
-rw-r--r--mail/e-mail-paned-view.c3
-rw-r--r--mail/e-mail-reader.c142
-rw-r--r--plugins/mail-notification/mail-notification.c16
4 files changed, 200 insertions, 109 deletions
diff --git a/mail/e-mail-notebook-view.c b/mail/e-mail-notebook-view.c
index fa6d340f52..365af755a4 100644
--- a/mail/e-mail-notebook-view.c
+++ b/mail/e-mail-notebook-view.c
@@ -156,7 +156,9 @@ mnv_page_changed (GtkNotebook *book,
#if HAVE_CLUTTER
static void
-fix_tab_picker_width (GtkWidget *widget, GtkAllocation *allocation, ClutterActor *actor)
+fix_tab_picker_width (GtkWidget *widget,
+ GtkAllocation *allocation,
+ ClutterActor *actor)
{
ClutterActor *stage = g_object_get_data ((GObject *)actor, "stage");
@@ -167,7 +169,7 @@ fix_tab_picker_width (GtkWidget *widget, GtkAllocation *allocation, ClutterActor
static void
fix_height_cb (ClutterActor *actor,
GParamSpec *pspec,
- ClutterActor *table)
+ ClutterActor *table)
{
GtkWidget *embed = (GtkWidget *)g_object_get_data ((GObject *)actor, "embed");
ClutterActor *stage = g_object_get_data ((GObject *)actor, "stage");
@@ -177,24 +179,30 @@ fix_height_cb (ClutterActor *actor,
}
static void
-chooser_clicked_cb (EMailTabPicker *picker, EMailNotebookView *view)
+chooser_clicked_cb (EMailTabPicker *picker,
+ EMailNotebookView *view)
{
- EMailNotebookViewPrivate *priv = E_MAIL_NOTEBOOK_VIEW (view)->priv;
+ EMailNotebookViewPrivate *priv;
+
+ gboolean preview_mode;
+
+ priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (view);
+ preview_mode = !e_mail_tab_picker_get_preview_mode (priv->tab_picker);
- gboolean preview_mode = !e_mail_tab_picker_get_preview_mode (priv->tab_picker);
e_mail_tab_picker_set_preview_mode (priv->tab_picker , preview_mode);
}
static void
tab_picker_preview_mode_notify (EMailTabPicker *picker,
- GParamSpec *pspec,
+ GParamSpec *pspec,
EMailNotebookView *view)
{
GList *tabs, *t;
gboolean preview_mode = e_mail_tab_picker_get_preview_mode (picker);
- clutter_actor_set_name (CLUTTER_ACTOR (picker),
- preview_mode ? "tab-picker-preview" : NULL);
+ clutter_actor_set_name (
+ CLUTTER_ACTOR (picker),
+ preview_mode ? "tab-picker-preview" : NULL);
tabs = e_mail_tab_picker_get_tabs (picker);
for (t = tabs; t; t = t->next) {
@@ -362,11 +370,15 @@ create_tab_label (EMailNotebookView *view,
widget = gtk_button_new ();
gtk_button_set_relief (GTK_BUTTON (widget), GTK_RELIEF_NONE);
- gtk_button_set_image (GTK_BUTTON (widget), gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU));
+ gtk_button_set_image (
+ GTK_BUTTON (widget), gtk_image_new_from_stock (
+ "gtk-close", GTK_ICON_SIZE_MENU));
gtk_widget_show_all (widget);
gtk_box_pack_end (GTK_BOX(container), widget, FALSE, FALSE, 0);
g_object_set_data ((GObject *)widget, "page", page);
- g_signal_connect (widget, "clicked", G_CALLBACK (tab_remove_gtk_cb), view);
+ g_signal_connect (
+ widget, "clicked",
+ G_CALLBACK (tab_remove_gtk_cb), view);
return container;
}
@@ -390,7 +402,9 @@ create_gtk_actor (GtkWidget *vbox)
}
static void
-fix_clutter_embed_width (GtkWidget *widget, GtkAllocation *allocation, ClutterActor *actor)
+fix_clutter_embed_width (GtkWidget *widget,
+ GtkAllocation *allocation,
+ ClutterActor *actor)
{
GtkWidget *embed = (GtkWidget *)g_object_get_data ((GObject *)actor, "embed");
GtkAllocation galoc;
@@ -419,7 +433,9 @@ create_under_clutter (GtkWidget *widget, GtkWidget *paned)
g_object_set_data ((GObject *)widget, "actor", actor);
g_object_set_data ((GObject *)embed, "actor", actor);
- g_signal_connect (paned, "size-allocate", G_CALLBACK(fix_clutter_embed_width), actor);
+ g_signal_connect (
+ paned, "size-allocate",
+ G_CALLBACK (fix_clutter_embed_width), actor);
clutter_actor_show(stage);
return embed;
@@ -468,7 +484,9 @@ mail_notebook_view_constructed (GObject *object)
priv->tab_picker, "notify::height",
G_CALLBACK(fix_height_cb), widget);
- clutter_container_add_actor ((ClutterContainer *)stage, (ClutterActor *)priv->tab_picker);
+ clutter_container_add_actor (
+ (ClutterContainer *) stage,
+ (ClutterActor *) priv->tab_picker);
g_object_set_data ((GObject *)priv->tab_picker, "embed", widget);
g_object_set_data ((GObject *)priv->tab_picker, "stage", stage);
@@ -477,8 +495,12 @@ mail_notebook_view_constructed (GObject *object)
object, "size-allocate",
G_CALLBACK(fix_tab_picker_width), priv->tab_picker);
- clutter_actor_set_height (stage, clutter_actor_get_height((ClutterActor *)priv->tab_picker));
- gtk_widget_set_size_request (widget, -1, (gint) clutter_actor_get_height((ClutterActor *)priv->tab_picker));
+ clutter_actor_set_height (
+ stage, clutter_actor_get_height (
+ (ClutterActor *) priv->tab_picker));
+ gtk_widget_set_size_request (
+ widget, -1, (gint) clutter_actor_get_height (
+ (ClutterActor *) priv->tab_picker));
tab = (EMailTab *) e_mail_tab_new_full ("", NULL, 1);
clone = e_mail_tab_new_full ("", NULL, 200);
@@ -581,22 +603,37 @@ static void
mail_notebook_view_set_search_strings (EMailView *view,
GSList *search_strings)
{
- e_mail_view_set_search_strings (E_MAIL_NOTEBOOK_VIEW (view)->priv->current_view, search_strings);
+ EMailNotebookViewPrivate *priv;
+
+ priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (view);
+
+ e_mail_view_set_search_strings (priv->current_view, search_strings);
}
static GalViewInstance *
mail_notebook_view_get_view_instance (EMailView *view)
{
- if (!E_MAIL_NOTEBOOK_VIEW(view)->priv->current_view)
+ EMailNotebookViewPrivate *priv;
+
+ priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (view);
+
+ if (priv->current_view == NULL)
return NULL;
- return e_mail_view_get_view_instance (E_MAIL_NOTEBOOK_VIEW (view)->priv->current_view);
+ return e_mail_view_get_view_instance (priv->current_view);
}
static void
mail_notebook_view_update_view_instance (EMailView *view)
{
- e_mail_view_update_view_instance (E_MAIL_NOTEBOOK_VIEW (view)->priv->current_view);
+ EMailNotebookViewPrivate *priv;
+
+ priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (view);
+
+ if (priv->current_view == NULL)
+ return;
+
+ e_mail_view_update_view_instance (priv->current_view);
}
static void
@@ -607,7 +644,7 @@ mail_notebook_view_set_orientation (EMailView *view,
priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (view);
- if (!priv->current_view)
+ if (priv->current_view == NULL)
return;
e_mail_view_set_orientation (priv->current_view, orientation);
@@ -620,7 +657,7 @@ mail_notebook_view_get_orientation (EMailView *view)
priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (view);
- if (!priv->current_view)
+ if (priv->current_view == NULL)
return GTK_ORIENTATION_VERTICAL;
return e_mail_view_get_orientation (priv->current_view);
@@ -633,7 +670,7 @@ mail_notebook_view_get_show_deleted (EMailView *view)
priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (view);
- if (!priv->current_view)
+ if (priv->current_view == NULL)
return FALSE;
return e_mail_view_get_show_deleted (priv->current_view);
@@ -647,7 +684,7 @@ mail_notebook_view_set_show_deleted (EMailView *view,
priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (view);
- if (!priv->current_view)
+ if (priv->current_view == NULL)
return;
e_mail_view_set_show_deleted (priv->current_view, show_deleted);
@@ -660,7 +697,7 @@ mail_notebook_view_get_preview_visible (EMailView *view)
priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (view);
- if (!priv->current_view)
+ if (priv->current_view == NULL)
return FALSE;
return e_mail_view_get_preview_visible (priv->current_view);
@@ -674,7 +711,7 @@ mail_notebook_view_set_preview_visible (EMailView *view,
priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (view);
- if (!priv->current_view)
+ if (priv->current_view == NULL)
return;
e_mail_view_set_preview_visible (priv->current_view, preview_visible);
@@ -697,9 +734,11 @@ mail_notebook_view_get_action_group (EMailReader *reader)
static EMFormatHTML *
mail_notebook_view_get_formatter (EMailReader *reader)
{
- EMailNotebookViewPrivate *priv = E_MAIL_NOTEBOOK_VIEW (reader)->priv;
+ EMailNotebookViewPrivate *priv;
- if (!priv->current_view)
+ priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (reader);
+
+ if (priv->current_view == NULL)
return NULL;
return e_mail_reader_get_formatter (E_MAIL_READER(priv->current_view));
@@ -708,34 +747,46 @@ mail_notebook_view_get_formatter (EMailReader *reader)
static gboolean
mail_notebook_view_get_hide_deleted (EMailReader *reader)
{
- EMailNotebookViewPrivate *priv = E_MAIL_NOTEBOOK_VIEW (reader)->priv;
+ EMailNotebookViewPrivate *priv;
+
+ priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (reader);
- if (!priv->current_view)
+ if (priv->current_view == NULL)
return FALSE;
- return e_mail_reader_get_hide_deleted (E_MAIL_READER(priv->current_view));
+ reader = E_MAIL_READER (priv->current_view);
+
+ return e_mail_reader_get_hide_deleted (reader);
}
static GtkWidget *
mail_notebook_view_get_message_list (EMailReader *reader)
{
- EMailNotebookViewPrivate *priv = E_MAIL_NOTEBOOK_VIEW (reader)->priv;
+ EMailNotebookViewPrivate *priv;
- if (!priv->current_view)
+ priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (reader);
+
+ if (priv->current_view == NULL)
return NULL;
- return e_mail_reader_get_message_list (E_MAIL_READER(priv->current_view));
+ reader = E_MAIL_READER (priv->current_view);
+
+ return e_mail_reader_get_message_list (reader);
}
static GtkMenu *
mail_notebook_view_get_popup_menu (EMailReader *reader)
{
- EMailNotebookViewPrivate *priv = E_MAIL_NOTEBOOK_VIEW (reader)->priv;
+ EMailNotebookViewPrivate *priv;
- if (!priv->current_view)
+ priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (reader);
+
+ if (priv->current_view == NULL)
return NULL;
- return e_mail_reader_get_popup_menu (E_MAIL_READER(priv->current_view));
+ reader = E_MAIL_READER (priv->current_view);
+
+ return e_mail_reader_get_popup_menu (reader);
}
static EShellBackend *
@@ -889,7 +940,7 @@ mail_notebook_view_set_folder (EMailReader *reader,
CamelFolder *folder,
const gchar *folder_uri)
{
- EMailNotebookViewPrivate *priv = E_MAIL_NOTEBOOK_VIEW (reader)->priv;
+ EMailNotebookViewPrivate *priv;
GtkWidget *new_view;
#if HAVE_CLUTTER
EMailTab *tab;
@@ -900,6 +951,8 @@ mail_notebook_view_set_folder (EMailReader *reader,
if (!folder_uri)
return;
+ priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (reader);
+
new_view = g_hash_table_lookup (priv->views, folder_uri);
if (new_view) {
gint curr = emnv_get_page_num (E_MAIL_NOTEBOOK_VIEW (reader), new_view);
@@ -1034,20 +1087,31 @@ mail_notebook_view_set_folder (EMailReader *reader,
static void
mail_notebook_view_show_search_bar (EMailReader *reader)
{
- EMailNotebookViewPrivate *priv = E_MAIL_NOTEBOOK_VIEW (reader)->priv;
+ EMailNotebookViewPrivate *priv;
+
+ priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (reader);
+
+ if (priv->current_view == NULL)
+ return;
+
+ reader = E_MAIL_READER (priv->current_view);
- e_mail_reader_show_search_bar (E_MAIL_READER(priv->current_view));
+ e_mail_reader_show_search_bar (reader);
}
static guint
mail_notebook_view_open_selected_mail (EMailReader *reader)
{
- EMailNotebookViewPrivate *priv = E_MAIL_NOTEBOOK_VIEW (reader)->priv;
+ EMailNotebookViewPrivate *priv;
- if (!priv->current_view)
+ priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (reader);
+
+ if (priv->current_view == NULL)
return 0;
- return e_mail_reader_open_selected_mail (E_MAIL_READER(priv->current_view));
+ reader = E_MAIL_READER (priv->current_view);
+
+ return e_mail_reader_open_selected_mail (reader);
}
static void
diff --git a/mail/e-mail-paned-view.c b/mail/e-mail-paned-view.c
index 342dc39c7b..106e761492 100644
--- a/mail/e-mail-paned-view.c
+++ b/mail/e-mail-paned-view.c
@@ -516,7 +516,8 @@ mail_paned_view_show_search_bar (EMailReader *reader)
static guint
mail_paned_view_reader_open_selected_mail (EMailReader *reader)
{
- return E_MAIL_PANED_VIEW_CLASS (G_OBJECT_GET_CLASS (reader))->open_selected_mail (E_MAIL_PANED_VIEW (reader));
+ return E_MAIL_PANED_VIEW_GET_CLASS (reader)->
+ open_selected_mail (E_MAIL_PANED_VIEW (reader));
}
static void
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index 3d4378b6bf..f60a3d44c0 100644
--- a/mail/e-mail-reader.c
+++ b/mail/e-mail-reader.c
@@ -840,7 +840,10 @@ action_mail_redirect_cb (GtkAction *action,
}
static void
-action_mail_reply_all_check(CamelFolder *folder, const gchar *uid, CamelMimeMessage *message, gpointer user_data)
+action_mail_reply_all_check (CamelFolder *folder,
+ const gchar *uid,
+ CamelMimeMessage *message,
+ gpointer user_data)
{
EMailReader *reader = user_data;
CamelInternetAddress *to, *cc;
@@ -850,37 +853,38 @@ action_mail_reply_all_check(CamelFolder *folder, const gchar *uid, CamelMimeMess
if (!message)
return;
- /* get_message_free() will unref the message, so we need to take an
- extra ref for e_mail_reader_reply_to_message() to own. */
- g_object_ref(message);
+ /* get_message_free () will unref the message, so we need to take an
+ extra ref for e_mail_reader_reply_to_message () to own. */
+ g_object_ref (message);
to = camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_TO);
cc = camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_CC);
- recip_count = camel_address_length(CAMEL_ADDRESS(to));
- recip_count += camel_address_length(CAMEL_ADDRESS(cc));
+ recip_count = camel_address_length (CAMEL_ADDRESS (to));
+ recip_count += camel_address_length (CAMEL_ADDRESS (cc));
if (recip_count >= 15) {
GConfClient *gconf = mail_config_get_gconf_client ();
- GtkDialog *dialog;
+ GtkWidget *dialog;
GtkWidget *content_area, *check;
gint response;
- dialog = (GtkDialog*) e_alert_dialog_new_for_args (e_mail_reader_get_window (reader),
- "mail:ask-reply-many-recips", NULL);
+ dialog = e_alert_dialog_new_for_args (
+ e_mail_reader_get_window (reader),
+ "mail:ask-reply-many-recips", NULL);
- /*Check buttons*/
+ /* Check buttons */
check = gtk_check_button_new_with_mnemonic (_("_Do not ask me again."));
- gtk_container_set_border_width((GtkContainer *)check, 12);
- content_area = gtk_dialog_get_content_area (dialog);
+ gtk_container_set_border_width (GTK_CONTAINER (check), 12);
+ content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
gtk_box_pack_start (GTK_BOX (content_area), check, TRUE, TRUE, 0);
gtk_widget_show (check);
- response = gtk_dialog_run ((GtkDialog *) dialog);
+ response = gtk_dialog_run (GTK_DIALOG (dialog));
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check)))
- gconf_client_set_bool(gconf, "/apps/evolution/mail/prompts/reply_many_recips", FALSE, NULL);
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check)))
+ gconf_client_set_bool (gconf, "/apps/evolution/mail/prompts/reply_many_recips", FALSE, NULL);
- gtk_widget_destroy((GtkWidget *)dialog);
+ gtk_widget_destroy (dialog);
if (response == GTK_RESPONSE_NO)
mode = REPLY_MODE_SENDER;
@@ -906,7 +910,7 @@ action_mail_reply_all_cb (GtkAction *action,
formatter = e_mail_reader_get_formatter (reader);
web_view = em_format_html_get_web_view (formatter);
- if (gtk_widget_get_mapped (GTK_WIDGET(web_view)))
+ if (gtk_widget_get_mapped (GTK_WIDGET (web_view)))
message = CAMEL_MIME_MESSAGE (EM_FORMAT (formatter)->message);
if (!message) {
@@ -920,10 +924,10 @@ action_mail_reply_all_cb (GtkAction *action,
uid = MESSAGE_LIST (message_list)->cursor_uid;
g_return_if_fail (uid != NULL);
- mail_get_message(folder, uid, action_mail_reply_all_check, reader, mail_msg_unordered_push);
+ mail_get_message (folder, uid, action_mail_reply_all_check, reader, mail_msg_unordered_push);
return;
}
- action_mail_reply_all_check(NULL, NULL, message, reader);
+ action_mail_reply_all_check (NULL, NULL, message, reader);
return;
}
@@ -942,7 +946,7 @@ action_mail_reply_group_cb (GtkAction *action,
if (reply_list && (state & E_MAIL_READER_SELECTION_IS_MAILING_LIST))
e_mail_reader_reply_to_message (reader, NULL, REPLY_MODE_LIST);
else
- action_mail_reply_all_cb(action, reader);
+ action_mail_reply_all_cb (action, reader);
}
static void
@@ -953,7 +957,7 @@ action_mail_reply_list_cb (GtkAction *action,
}
static void
-action_mail_reply_sender_check(CamelFolder *folder, const gchar *uid, CamelMimeMessage *message, gpointer user_data)
+action_mail_reply_sender_check (CamelFolder *folder, const gchar *uid, CamelMimeMessage *message, gpointer user_data)
{
GConfClient *gconf = mail_config_get_gconf_client ();
EMailReader *reader = user_data;
@@ -962,35 +966,38 @@ action_mail_reply_sender_check(CamelFolder *folder, const gchar *uid, CamelMimeM
if (!message)
return;
- /* get_message_free() will unref the message, so we need to take an
- extra ref for e_mail_reader_reply_to_message() to own. */
- g_object_ref(message);
+ /* get_message_free () will unref the message, so we need to take an
+ extra ref for e_mail_reader_reply_to_message () to own. */
+ g_object_ref (message);
/* Don't do the "Are you sure you want to reply in private?" pop-up if
it's a Reply-To: munged list message... unless we're ignoring munging */
- if (gconf_client_get_bool (gconf,
- "/apps/evolution/mail/composer/ignore_list_reply_to", NULL)
+ if (gconf_client_get_bool (gconf, "/apps/evolution/mail/composer/ignore_list_reply_to", NULL)
|| !em_utils_is_munged_list_message (message)) {
- GtkDialog *dialog;
+ GtkWidget *dialog;
GtkWidget *content_area, *check;
gint response;
- dialog = (GtkDialog*) e_alert_dialog_new_for_args (e_mail_reader_get_window (reader),
- "mail:ask-list-private-reply", NULL);
-
- /*Check buttons*/
- check = gtk_check_button_new_with_mnemonic (_("_Do not ask me again."));
- gtk_container_set_border_width((GtkContainer *)check, 12);
- content_area = gtk_dialog_get_content_area (dialog);
- gtk_box_pack_start (GTK_BOX (content_area), check, TRUE, TRUE, 0);
+ dialog = e_alert_dialog_new_for_args (
+ e_mail_reader_get_window (reader),
+ "mail:ask-list-private-reply", NULL);
+
+ /* Check buttons */
+ check = gtk_check_button_new_with_mnemonic (
+ _("_Do not ask me again."));
+ gtk_container_set_border_width ((GtkContainer *)check, 12);
+ content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
+ gtk_box_pack_start (
+ GTK_BOX (content_area), check, TRUE, TRUE, 0);
gtk_widget_show (check);
- response = gtk_dialog_run ((GtkDialog *) dialog);
+ response = gtk_dialog_run (GTK_DIALOG (dialog));
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check)))
- gconf_client_set_bool(gconf, "/apps/evolution/mail/prompts/private_list_reply", FALSE, NULL);
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check)))
+ gconf_client_set_bool (
+ gconf, "/apps/evolution/mail/prompts/private_list_reply", FALSE, NULL);
- gtk_widget_destroy((GtkWidget *)dialog);
+ gtk_widget_destroy (dialog);
if (response == GTK_RESPONSE_YES)
mode = REPLY_MODE_ALL;
@@ -998,39 +1005,48 @@ action_mail_reply_sender_check(CamelFolder *folder, const gchar *uid, CamelMimeM
mode = REPLY_MODE_LIST;
else if (response == GTK_RESPONSE_CANCEL)
return;
- } else if (gconf_client_get_bool(gconf, "/apps/evolution/mail/prompts/list_reply_to", NULL)) {
- GtkDialog *dialog;
- GtkWidget *content_area, *vbox, *check_again, *check_always_ignore;
+ } else if (gconf_client_get_bool (gconf, "/apps/evolution/mail/prompts/list_reply_to", NULL)) {
+ GtkWidget *dialog;
+ GtkWidget *content_area;
+ GtkWidget *vbox;
+ GtkWidget *check_again;
+ GtkWidget *check_always_ignore;
gint response;
- dialog = (GtkDialog*) e_alert_dialog_new_for_args (e_mail_reader_get_window (reader),
- "mail:ask-list-honour-reply-to", NULL);
+ dialog = e_alert_dialog_new_for_args (
+ e_mail_reader_get_window (reader),
+ "mail:ask-list-honour-reply-to", NULL);
/*Check buttons*/
vbox = gtk_vbox_new (FALSE, 0);
- content_area = gtk_dialog_get_content_area (dialog);
- gtk_container_set_border_width((GtkContainer *)vbox, 12);
+ content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
+ gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
gtk_widget_show (vbox);
- check_again = gtk_check_button_new_with_mnemonic (_("_Do not ask me again."));
+ check_again = gtk_check_button_new_with_mnemonic (
+ _("_Do not ask me again."));
gtk_box_pack_start (GTK_BOX (vbox), check_again, TRUE, TRUE, 0);
gtk_widget_show (check_again);
- check_always_ignore = gtk_check_button_new_with_mnemonic (_("_Always ignore Reply-To: for mailing lists."));
- gtk_box_pack_start (GTK_BOX (vbox), check_always_ignore, TRUE, TRUE, 0);
+ check_always_ignore = gtk_check_button_new_with_mnemonic (
+ _("_Always ignore Reply-To: for mailing lists."));
+ gtk_box_pack_start (
+ GTK_BOX (vbox), check_always_ignore, TRUE, TRUE, 0);
gtk_widget_show (check_always_ignore);
- response = gtk_dialog_run ((GtkDialog *) dialog);
+ response = gtk_dialog_run (GTK_DIALOG (dialog));
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_again)))
- gconf_client_set_bool(gconf, "/apps/evolution/mail/prompts/list_reply_to", FALSE, NULL);
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check_again)))
+ gconf_client_set_bool (
+ gconf, "/apps/evolution/mail/prompts/list_reply_to", FALSE, NULL);
- gconf_client_set_bool(gconf, "/apps/evolution/mail/composer/ignore_list_reply_to",
- gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_always_ignore)),
- NULL);
+ gconf_client_set_bool (
+ gconf, "/apps/evolution/mail/composer/ignore_list_reply_to",
+ gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check_always_ignore)),
+ NULL);
- gtk_widget_destroy((GtkWidget *)dialog);
+ gtk_widget_destroy (dialog);
if (response == GTK_RESPONSE_NO)
mode = REPLY_MODE_FROM;
@@ -1052,14 +1068,14 @@ action_mail_reply_sender_cb (GtkAction *action,
gconf = mail_config_get_gconf_client ();
if ((gconf_client_get_bool (gconf, "/apps/evolution/mail/prompts/private_list_reply", NULL) ||
gconf_client_get_bool (gconf, "/apps/evolution/mail/prompts/list_reply_to", NULL)) &&
- e_mail_reader_check_state(reader) & E_MAIL_READER_SELECTION_IS_MAILING_LIST) {
+ e_mail_reader_check_state (reader) & E_MAIL_READER_SELECTION_IS_MAILING_LIST) {
CamelMimeMessage *message = NULL;
EWebView *web_view;
EMFormatHTML *formatter;
formatter = e_mail_reader_get_formatter (reader);
web_view = em_format_html_get_web_view (formatter);
- if (gtk_widget_get_mapped (GTK_WIDGET(web_view)))
+ if (gtk_widget_get_mapped (GTK_WIDGET (web_view)))
message = CAMEL_MIME_MESSAGE (EM_FORMAT (formatter)->message);
if (!message) {
@@ -1073,10 +1089,12 @@ action_mail_reply_sender_cb (GtkAction *action,
uid = MESSAGE_LIST (message_list)->cursor_uid;
g_return_if_fail (uid != NULL);
- mail_get_message(folder, uid, action_mail_reply_sender_check, reader, mail_msg_unordered_push);
+ mail_get_message (
+ folder, uid, action_mail_reply_sender_check,
+ reader, mail_msg_unordered_push);
return;
}
- action_mail_reply_sender_check(NULL, NULL, message, reader);
+ action_mail_reply_sender_check (NULL, NULL, message, reader);
return;
}
e_mail_reader_reply_to_message (reader, NULL, REPLY_MODE_SENDER);
@@ -2145,7 +2163,7 @@ mail_reader_message_loaded_cb (CamelFolder *folder,
g_clear_error (error);
}
- /* We referenced this in the call to mail_get_messagex(). */
+ /* We referenced this in the call to mail_get_messagex (). */
g_object_unref (reader);
exit:
@@ -3414,7 +3432,7 @@ e_mail_reader_set_folder (EMailReader *reader,
iface->set_folder (reader, folder, folder_uri);
}
-/* Helper for e_mail_reader_set_folder_uri() */
+/* Helper for e_mail_reader_set_folder_uri () */
static void
mail_reader_got_folder_cb (gchar *folder_uri,
CamelFolder *folder,
diff --git a/plugins/mail-notification/mail-notification.c b/plugins/mail-notification/mail-notification.c
index 985ef9ba5d..5015e9c874 100644
--- a/plugins/mail-notification/mail-notification.c
+++ b/plugins/mail-notification/mail-notification.c
@@ -161,13 +161,15 @@ send_dbus_message (const gchar *name,
g_dbus_message_set_body (message, g_variant_builder_end (builder));
/* Sends the message */
- g_dbus_connection_send_message (connection, message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, &error);
+ g_dbus_connection_send_message (
+ connection, message,
+ G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, &error);
/* Frees the message */
g_object_unref (message);
if (error) {
- g_debug ("Mail-Notification: %s: Error while sending DBus message: %s", G_STRFUNC, error->message);
+ g_warning ("%s: %s", G_STRFUNC, error->message);
g_error_free (error);
}
}
@@ -183,7 +185,10 @@ reinit_gdbus (gpointer user_data)
}
static void
-connection_closed_cb (GDBusConnection *pconnection, gboolean remote_peer_vanished, GError *error, gpointer user_data)
+connection_closed_cb (GDBusConnection *pconnection,
+ gboolean remote_peer_vanished,
+ GError *error,
+ gpointer user_data)
{
g_return_if_fail (connection != pconnection);
@@ -210,7 +215,10 @@ init_gdbus (void)
}
g_dbus_connection_set_exit_on_close (connection, FALSE);
- g_signal_connect (connection, "closed", G_CALLBACK (connection_closed_cb), NULL);
+
+ g_signal_connect (
+ connection, "closed",
+ G_CALLBACK (connection_closed_cb), NULL);
return TRUE;
}