aboutsummaryrefslogtreecommitdiffstats
path: root/capplet/settings
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-08-16 23:25:56 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-09-04 19:34:32 +0800
commitfcbbdfbd18e15b4ee8322a0217cf03a689a5e033 (patch)
treee16cd2a2279558c6a2bfb6ca39fcbaac4c85ba59 /capplet/settings
parentf78417c48861759d7b0c4535ecd3febe4638a7d3 (diff)
downloadgsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.tar
gsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.tar.gz
gsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.tar.bz2
gsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.tar.lz
gsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.tar.xz
gsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.tar.zst
gsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'capplet/settings')
-rw-r--r--capplet/settings/anjal-mail-view.c19
-rw-r--r--capplet/settings/mail-account-view.c85
-rw-r--r--capplet/settings/mail-account-view.h2
-rw-r--r--capplet/settings/mail-capplet-shell.c19
-rw-r--r--capplet/settings/mail-guess-servers.c16
-rw-r--r--capplet/settings/mail-settings-view.c34
-rw-r--r--capplet/settings/mail-view.c93
-rw-r--r--capplet/settings/mail-view.h6
8 files changed, 171 insertions, 103 deletions
diff --git a/capplet/settings/anjal-mail-view.c b/capplet/settings/anjal-mail-view.c
index eb8a06e56d..c0926536cb 100644
--- a/capplet/settings/anjal-mail-view.c
+++ b/capplet/settings/anjal-mail-view.c
@@ -39,7 +39,7 @@ struct _AnjalMailViewPrivate {
G_DEFINE_TYPE (AnjalMailView, anjal_mail_view, GTK_TYPE_NOTEBOOK)
static void
-anjal_mail_view_init (AnjalMailView *shell)
+anjal_mail_view_init (AnjalMailView *shell)
{
shell->priv = g_new0 (AnjalMailViewPrivate, 1);
shell->priv->started = TRUE;
@@ -57,25 +57,32 @@ anjal_mail_view_finalize (GObject *object)
}
static void
-view_set_folder_uri (AnjalMailView *mail_view, const gchar *uri)
+view_set_folder_uri (AnjalMailView *mail_view,
+ const gchar *uri)
{
}
+
static void
-view_set_folder_tree_widget (AnjalMailView *mail_view, GtkWidget *tree)
+view_set_folder_tree_widget (AnjalMailView *mail_view,
+ GtkWidget *tree)
{
}
+
static void
-view_set_folder_tree (AnjalMailView *mail_view, EMFolderTree *tree)
+view_set_folder_tree (AnjalMailView *mail_view,
+ EMFolderTree *tree)
{
}
static void
-view_set_search (AnjalMailView *mail_view, const gchar *search)
+view_set_search (AnjalMailView *mail_view,
+ const gchar *search)
{
}
static void
-view_init_search (AnjalMailView *mail_view, GtkWidget *search)
+view_init_search (AnjalMailView *mail_view,
+ GtkWidget *search)
{
}
diff --git a/capplet/settings/mail-account-view.c b/capplet/settings/mail-account-view.c
index e579e6a070..3e35276361 100644
--- a/capplet/settings/mail-account-view.c
+++ b/capplet/settings/mail-account-view.c
@@ -82,7 +82,7 @@ struct _dialog_errors {
static guint signals[LAST_SIGNAL] = { 0 };
static void
-mail_account_view_init (MailAccountView *shell)
+mail_account_view_init (MailAccountView *shell)
{
shell->priv = g_new0 (MailAccountViewPrivate, 1);
@@ -144,7 +144,7 @@ check_servers (gchar *server)
{
gint len = G_N_ELEMENTS (std_server), i;
- for (i=0; i<len; i++) {
+ for (i = 0; i < len; i++) {
if (strstr (server, std_server[i].key) != NULL)
return i;
}
@@ -204,7 +204,7 @@ static gboolean
is_email (const gchar *address)
{
/* This is supposed to check if the address's domain could be
- an FQDN but alas, it's not worth the pain and suffering. */
+ * an FQDN but alas, it's not worth the pain and suffering. */
const gchar *at;
at = strchr (address, '@');
@@ -414,7 +414,7 @@ setup_google_accounts (MailAccountView *mav)
sources = e_source_group_peek_sources (sgrp);
for (; sources; sources = sources->next) {
- ESource *existing = (ESource*) sources->data;
+ ESource *existing = (ESource *) sources->data;
if (!g_strcmp0 (e_source_peek_relative_uri (existing),
mav->priv->username)) {
@@ -482,25 +482,25 @@ create_review (MailAccountView *view)
g_free (buff);
gtk_widget_show (label);
PACK_BOXF (label)
- gtk_table_attach ((GtkTable *) table, box, 0, 1, 0, 1, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
+ gtk_table_attach ((GtkTable *) table, box, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_SHRINK, INDENTATION, 0);
label = gtk_label_new (_("Name:"));
gtk_widget_show (label);
PACK_BOX (label);
- gtk_table_attach ((GtkTable *) table, box, 0, 1, 1, 2, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
+ gtk_table_attach ((GtkTable *) table, box, 0, 1, 1, 2, GTK_EXPAND | GTK_FILL, GTK_SHRINK, INDENTATION, 0);
entry = gtk_label_new (e_account_get_string (em_account_editor_get_modified_account (view->edit), E_ACCOUNT_ID_NAME));
gtk_widget_show (entry);
PACK_BOX (entry)
- gtk_table_attach ((GtkTable *) table, box, 1, 2, 1, 2, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
+ gtk_table_attach ((GtkTable *) table, box, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_SHRINK, INDENTATION, 0);
label = gtk_label_new (_("Email address:"));
gtk_widget_show (label);
PACK_BOX (label)
- gtk_table_attach ((GtkTable *) table, box, 0, 1, 2, 3, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
+ gtk_table_attach ((GtkTable *) table, box, 0, 1, 2, 3, GTK_EXPAND | GTK_FILL, GTK_SHRINK, INDENTATION, 0);
entry = gtk_label_new (e_account_get_string (em_account_editor_get_modified_account (view->edit), E_ACCOUNT_ID_ADDRESS));
gtk_widget_show (entry);
PACK_BOX (entry)
- gtk_table_attach ((GtkTable *) table, box, 1, 2, 2, 3, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
+ gtk_table_attach ((GtkTable *) table, box, 1, 2, 2, 3, GTK_EXPAND | GTK_FILL, GTK_SHRINK, INDENTATION, 0);
label = gtk_label_new (NULL);
buff = g_markup_printf_escaped ("<span size=\"large\" weight=\"bold\">%s</span>", _("Details:"));
@@ -508,7 +508,7 @@ create_review (MailAccountView *view)
g_free (buff);
gtk_widget_show (label);
PACK_BOXF (label);
- gtk_table_attach ((GtkTable *) table, box, 0, 1, 3, 4, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
+ gtk_table_attach ((GtkTable *) table, box, 0, 1, 3, 4, GTK_EXPAND | GTK_FILL, GTK_SHRINK, INDENTATION, 0);
label = gtk_label_new (NULL);
buff = g_markup_printf_escaped ("<span size=\"large\" weight=\"bold\">%s</span>", _("Receiving"));
@@ -516,44 +516,44 @@ create_review (MailAccountView *view)
g_free (buff);
gtk_widget_show (label);
PACK_BOXF (label);
- gtk_table_attach ((GtkTable *) table, box, 1, 2, 3, 4, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
+ gtk_table_attach ((GtkTable *) table, box, 1, 2, 3, 4, GTK_EXPAND | GTK_FILL, GTK_SHRINK, INDENTATION, 0);
label = gtk_label_new (_("Server type:"));
gtk_widget_show (label);
PACK_BOX (label);
- gtk_table_attach ((GtkTable *) table, box, 0, 1, 4, 5, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
+ gtk_table_attach ((GtkTable *) table, box, 0, 1, 4, 5, GTK_EXPAND | GTK_FILL, GTK_SHRINK, INDENTATION, 0);
entry = gtk_label_new (url->protocol);
gtk_widget_show (entry);
PACK_BOX (entry)
- gtk_table_attach ((GtkTable *) table, box, 1, 2, 4, 5, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
+ gtk_table_attach ((GtkTable *) table, box, 1, 2, 4, 5, GTK_EXPAND | GTK_FILL, GTK_SHRINK, INDENTATION, 0);
label = gtk_label_new (_("Server address:"));
gtk_widget_show (label);
PACK_BOX (label);
- gtk_table_attach ((GtkTable *) table, box, 0, 1, 5, 6, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
+ gtk_table_attach ((GtkTable *) table, box, 0, 1, 5, 6, GTK_EXPAND | GTK_FILL, GTK_SHRINK, INDENTATION, 0);
entry = gtk_label_new (url->host);
gtk_widget_show (entry);
PACK_BOX (entry);
- gtk_table_attach ((GtkTable *) table, box, 1, 2, 5, 6, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
+ gtk_table_attach ((GtkTable *) table, box, 1, 2, 5, 6, GTK_EXPAND | GTK_FILL, GTK_SHRINK, INDENTATION, 0);
label = gtk_label_new (_("Username:"));
gtk_widget_show (label);
PACK_BOX (label);
- gtk_table_attach ((GtkTable *) table, box, 0, 1, 6, 7, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
+ gtk_table_attach ((GtkTable *) table, box, 0, 1, 6, 7, GTK_EXPAND | GTK_FILL, GTK_SHRINK, INDENTATION, 0);
entry = gtk_label_new (url->user);
gtk_widget_show (entry);
PACK_BOX (entry);
- gtk_table_attach ((GtkTable *) table, box, 1, 2, 6, 7, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
+ gtk_table_attach ((GtkTable *) table, box, 1, 2, 6, 7, GTK_EXPAND | GTK_FILL, GTK_SHRINK, INDENTATION, 0);
label = gtk_label_new (_("Use encryption:"));
gtk_widget_show (label);
PACK_BOX (label);
- gtk_table_attach ((GtkTable *) table, box, 0, 1, 7, 8, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
+ gtk_table_attach ((GtkTable *) table, box, 0, 1, 7, 8, GTK_EXPAND | GTK_FILL, GTK_SHRINK, INDENTATION, 0);
enc = (gchar *)camel_url_get_param(url, "security-method");
entry = gtk_label_new (enc ? enc : _("never"));
gtk_widget_show (entry);
PACK_BOX (entry);
- gtk_table_attach ((GtkTable *) table, box, 1, 2, 7, 8, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
+ gtk_table_attach ((GtkTable *) table, box, 1, 2, 7, 8, GTK_EXPAND | GTK_FILL, GTK_SHRINK, INDENTATION, 0);
view->priv->username = g_strdup (url->user);
camel_url_free (url);
@@ -567,28 +567,28 @@ create_review (MailAccountView *view)
g_free (buff);
gtk_widget_show (label);
PACK_BOXF (label);
- gtk_table_attach ((GtkTable *) table, box, 2, 3, 3, 4, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
+ gtk_table_attach ((GtkTable *) table, box, 2, 3, 3, 4, GTK_EXPAND | GTK_FILL, GTK_SHRINK, INDENTATION, 0);
entry = gtk_label_new (url->protocol);
gtk_widget_show (entry);
PACK_BOX (entry)
- gtk_table_attach ((GtkTable *) table, box, 2, 3, 4, 5, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
+ gtk_table_attach ((GtkTable *) table, box, 2, 3, 4, 5, GTK_EXPAND | GTK_FILL, GTK_SHRINK, INDENTATION, 0);
entry = gtk_label_new (url->host);
gtk_widget_show (entry);
PACK_BOX (entry);
- gtk_table_attach ((GtkTable *) table, box, 2, 3, 5, 6, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
+ gtk_table_attach ((GtkTable *) table, box, 2, 3, 5, 6, GTK_EXPAND | GTK_FILL, GTK_SHRINK, INDENTATION, 0);
entry = gtk_label_new (url->user);
gtk_widget_show (entry);
PACK_BOX (entry);
- gtk_table_attach ((GtkTable *) table, box, 2, 3, 6, 7, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
+ gtk_table_attach ((GtkTable *) table, box, 2, 3, 6, 7, GTK_EXPAND | GTK_FILL, GTK_SHRINK, INDENTATION, 0);
enc = (gchar *)camel_url_get_param(url, "security-method");
entry = gtk_label_new (enc ? enc : _("never"));
gtk_widget_show (entry);
PACK_BOX (entry);
- gtk_table_attach ((GtkTable *) table, box, 2, 3, 7, 8, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
+ gtk_table_attach ((GtkTable *) table, box, 2, 3, 7, 8, GTK_EXPAND | GTK_FILL, GTK_SHRINK, INDENTATION, 0);
/*
label = gtk_label_new (_("Organization:"));
@@ -596,7 +596,7 @@ create_review (MailAccountView *view)
entry = gtk_entry_new ();
gtk_widget_show (entry);
gtk_table_attach (table, label, 0, 1, 3, 4, GTK_SHRINK, GTK_SHRINK, INDENTATION, 0);
- gtk_table_attach (table, entry, 1, 2, 3, 4, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
+ gtk_table_attach (table, entry, 1, 2, 3, 4, GTK_EXPAND | GTK_FILL, GTK_SHRINK, INDENTATION, 0);
*/
gtk_widget_show (table);
@@ -638,13 +638,14 @@ struct _page_text {
};
static void
-mav_next_pressed (GtkButton *button, MailAccountView *mav)
+mav_next_pressed (GtkButton *button,
+ MailAccountView *mav)
{
if (mail_account_pages[mav->current_page].validate_page) {
gint ret = (*mail_account_pages[mav->current_page].validate_page) (mav);
MAVPage *page = mav->pages[mav->current_page];
if (ret) {
- gtk_label_set_text ((GtkLabel *) page->error_label, _(dialog_errors[ret-1].detail));
+ gtk_label_set_text ((GtkLabel *) page->error_label, _(dialog_errors[ret - 1].detail));
gtk_widget_show (page->error);
return;
}
@@ -847,7 +848,8 @@ mav_next_pressed (GtkButton *button, MailAccountView *mav)
}
static void
-mav_prev_pressed (GtkButton *button, MailAccountView *mav)
+mav_prev_pressed (GtkButton *button,
+ MailAccountView *mav)
{
if (mav->current_page == 0)
return;
@@ -863,7 +865,8 @@ mav_prev_pressed (GtkButton *button, MailAccountView *mav)
}
static GtkWidget *
-mav_construct_page (MailAccountView *view, MAVPageType type)
+mav_construct_page (MailAccountView *view,
+ MAVPageType type)
{
MAVPage *page = g_new0 (MAVPage, 1);
GtkWidget *box, *tmp, *error_box;
@@ -927,7 +930,7 @@ mav_construct_page (MailAccountView *view, MAVPageType type)
page->prev = gtk_button_new ();
gtk_container_add ((GtkContainer *) page->prev, box);
gtk_widget_show_all (page->prev);
- g_signal_connect(page->prev, "clicked", G_CALLBACK(mav_prev_pressed), view);
+ g_signal_connect (page->prev, "clicked", G_CALLBACK(mav_prev_pressed), view);
}
if ((view->original && mail_account_pages[type].next_edit) || mail_account_pages[type].next) {
@@ -944,7 +947,7 @@ mav_construct_page (MailAccountView *view, MAVPageType type)
G_CALLBACK (gtk_widget_grab_default), NULL);
gtk_container_add ((GtkContainer *) page->next, box);
gtk_widget_show_all (page->next);
- g_signal_connect(page->next, "clicked", G_CALLBACK(mav_next_pressed), view);
+ g_signal_connect (page->next, "clicked", G_CALLBACK(mav_next_pressed), view);
}
box = gtk_hbox_new (FALSE, 0);
@@ -1043,7 +1046,8 @@ emae_check_servers (const gchar *email)
}
static void
-next_page (GtkWidget *entry, MailAccountView *mav)
+next_page (GtkWidget *entry,
+ MailAccountView *mav)
{
mav_next_pressed (NULL, mav);
}
@@ -1062,7 +1066,7 @@ mail_account_view_construct (MailAccountView *view,
gtk_scrolled_window_add_with_viewport ((GtkScrolledWindow *) view->scroll, view->page_widget);
gtk_widget_show_all (view->scroll);
gtk_widget_set_size_request ((GtkWidget *) view, -1, 300);
- for (i=0; i<MAV_LAST; i++) {
+ for (i = 0; i < MAV_LAST; i++) {
view->pages[i] = (MAVPage *) mav_construct_page (view, i);
view->pages[i]->done = FALSE;
view->wpages[i] = view->pages[i]->box;
@@ -1099,7 +1103,7 @@ mail_account_view_construct (MailAccountView *view,
gtk_widget_show (label);
gtk_widget_show (pwd);
gtk_table_attach ((GtkTable *) table, label, 0, 1, 2, 3, GTK_FILL, 0, 0, 0);
- gtk_table_attach ((GtkTable *) table, pwd, 1, 2, 2, 3, GTK_FILL|GTK_EXPAND, 0, 0, 0);
+ gtk_table_attach ((GtkTable *) table, pwd, 1, 2, 2, 3, GTK_FILL | GTK_EXPAND, 0, 0, 0);
view->password = pwd;
}
@@ -1123,7 +1127,8 @@ mail_account_view_new (EAccount *account,
}
static void
-mav_close (GtkButton *w, MailAccountView *mfv)
+mav_close (GtkButton *w,
+ MailAccountView *mfv)
{
g_signal_emit (mfv, signals[VIEW_CLOSE], 0);
}
@@ -1150,7 +1155,7 @@ mail_account_view_get_tab_widget (MailAccountView *mcv)
gtk_container_add ((GtkContainer *) tool, box);
gtk_widget_show_all (tool);
gtk_icon_size_lookup_for_settings (gtk_widget_get_settings (tool) , GTK_ICON_SIZE_MENU, &w, &h);
- gtk_widget_set_size_request (tool, w+2, h+2);
+ gtk_widget_set_size_request (tool, w + 2, h + 2);
box = gtk_label_new (_("Account Wizard"));
tab_label = gtk_hbox_new (FALSE, 0);
@@ -1163,11 +1168,15 @@ mail_account_view_get_tab_widget (MailAccountView *mcv)
}
void
-mail_account_view_activate (MailAccountView *mcv, GtkWidget *tree, GtkWidget *folder_tree, GtkWidget *check_mail, GtkWidget *sort_by, gboolean act)
+mail_account_view_activate (MailAccountView *mcv,
+ GtkWidget *tree,
+ GtkWidget *folder_tree,
+ GtkWidget *check_mail,
+ GtkWidget *sort_by,
+ gboolean act)
{
if (!check_mail || !sort_by)
return;
- //gtk_widget_hide (folder_tree);
gtk_widget_set_sensitive (check_mail, TRUE);
gtk_widget_set_sensitive (sort_by, FALSE);
}
diff --git a/capplet/settings/mail-account-view.h b/capplet/settings/mail-account-view.h
index 1b04533403..0a582c4a13 100644
--- a/capplet/settings/mail-account-view.h
+++ b/capplet/settings/mail-account-view.h
@@ -39,7 +39,7 @@ typedef struct _MailAccountViewPrivate MailAccountViewPrivate;
typedef struct _MailAccountService MailAccountService;
typedef enum {
- MAV_IDENTITY_PAGE=0,
+ MAV_IDENTITY_PAGE = 0,
MAV_RECV_PAGE,
MAV_RECV_OPT_PAGE,
MAV_SEND_PAGE,
diff --git a/capplet/settings/mail-capplet-shell.c b/capplet/settings/mail-capplet-shell.c
index 75e2e11fff..47956cd782 100644
--- a/capplet/settings/mail-capplet-shell.c
+++ b/capplet/settings/mail-capplet-shell.c
@@ -91,7 +91,7 @@ G_DEFINE_TYPE (MailCappletShell, mail_capplet_shell, GTK_TYPE_WINDOW)
static void setup_abooks (void);
static void
-mail_capplet_shell_init (MailCappletShell *shell)
+mail_capplet_shell_init (MailCappletShell *shell)
{
shell->priv = g_new0 (MailCappletShellPrivate, 1);
shell->priv->settings_view = NULL;
@@ -184,15 +184,15 @@ mail_capplet_shell_quit (MailCappletShell *shell)
static void
ms_delete_event (MailCappletShell *shell,
- GdkEvent *event G_GNUC_UNUSED,
- gpointer data G_GNUC_UNUSED)
+ GdkEvent *event G_GNUC_UNUSED,
+ gpointer data G_GNUC_UNUSED)
{
mail_capplet_shell_quit (shell);
}
static void
ms_show_post_druid (MailViewChild *mfv G_GNUC_UNUSED,
- MailCappletShell *shell)
+ MailCappletShell *shell)
{
gtk_widget_destroy (GTK_WIDGET (shell));
}
@@ -200,7 +200,10 @@ ms_show_post_druid (MailViewChild *mfv G_GNUC_UNUSED,
#define PACK_IN_TOOL(wid,icon) { GtkWidget *tbox; tbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start ((GtkBox *)tbox, gtk_image_new_from_icon_name(icon, GTK_ICON_SIZE_BUTTON), FALSE, FALSE, 0); wid = (GtkWidget *)gtk_tool_button_new (tbox, NULL); }
static void
-mail_capplet_shell_construct (MailCappletShell *shell, gint socket_id, gboolean just_druid, gboolean main_loop)
+mail_capplet_shell_construct (MailCappletShell *shell,
+ gint socket_id,
+ gboolean just_druid,
+ gboolean main_loop)
{
MailCappletShellPrivate *priv = shell->priv;
GtkStyle *style = gtk_widget_get_default_style ();
@@ -292,7 +295,9 @@ mail_capplet_shell_construct (MailCappletShell *shell, gint socket_id, gboolean
}
GtkWidget *
-mail_capplet_shell_new (gint socket_id, gboolean just_druid, gboolean main_loop)
+mail_capplet_shell_new (gint socket_id,
+ gboolean just_druid,
+ gboolean main_loop)
{
MailCappletShell *shell = g_object_new (MAIL_CAPPLET_SHELL_TYPE, NULL);
mail_capplet_shell_construct (shell, socket_id, just_druid, main_loop);
@@ -351,7 +356,7 @@ setup_abooks (void)
if (on_this_computer) {
/* make sure "Personal" shows up as a source under
- this group */
+ * this group */
GSList *sources = e_source_group_peek_sources (on_this_computer);
GSList *s;
for (s = sources; s; s = s->next) {
diff --git a/capplet/settings/mail-guess-servers.c b/capplet/settings/mail-guess-servers.c
index 307aeeec1c..0b144940e9 100644
--- a/capplet/settings/mail-guess-servers.c
+++ b/capplet/settings/mail-guess-servers.c
@@ -50,7 +50,8 @@
#include "mail-guess-servers.h"
static gchar *
-xml_to_gchar (xmlChar *xml, EmailProvider *provider)
+xml_to_gchar (xmlChar *xml,
+ EmailProvider *provider)
{
gchar *gxml = NULL;
gchar *tmp;
@@ -89,7 +90,8 @@ xml_to_gchar (xmlChar *xml, EmailProvider *provider)
}
static SoupMessage *
-get_url (SoupSession *session, const gchar *url)
+get_url (SoupSession *session,
+ const gchar *url)
{
SoupMessage *msg;
const gchar *header;
@@ -175,7 +177,9 @@ handle_outgoing (xmlNodePtr head,
}
static gboolean
-parse_message (const gchar *msg, gint length, EmailProvider *provider)
+parse_message (const gchar *msg,
+ gint length,
+ EmailProvider *provider)
{
xmlDocPtr doc;
xmlNodePtr node;
@@ -227,7 +231,8 @@ parse_message (const gchar *msg, gint length, EmailProvider *provider)
}
static gboolean
-parse_soup_message (SoupMessage *msg, EmailProvider *provider)
+parse_soup_message (SoupMessage *msg,
+ EmailProvider *provider)
{
return parse_message (
msg->response_body->data,
@@ -334,7 +339,8 @@ mail_guess_servers (EmailProvider *provider)
#ifdef TEST
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EmailProvider *provider;
g_thread_init (NULL);
diff --git a/capplet/settings/mail-settings-view.c b/capplet/settings/mail-settings-view.c
index 3ae2c6d30c..a699dca9ea 100644
--- a/capplet/settings/mail-settings-view.c
+++ b/capplet/settings/mail-settings-view.c
@@ -52,7 +52,7 @@ static guint signals[LAST_SIGNAL] = { 0 };
static void msv_regen_view (MailSettingsView *acview);
static void
-mail_settings_view_init (MailSettingsView *shell)
+mail_settings_view_init (MailSettingsView *shell)
{
shell->priv = g_new0 (MailSettingsViewPrivate, 1);
@@ -94,7 +94,8 @@ mail_settings_view_class_init (MailSettingsViewClass *klass)
}
static void
-msv_edit_account (GtkButton *button, MailSettingsView *msv)
+msv_edit_account (GtkButton *button,
+ MailSettingsView *msv)
{
EAccount *acc = g_object_get_data((GObject *)button, "account");
@@ -102,7 +103,8 @@ msv_edit_account (GtkButton *button, MailSettingsView *msv)
}
static void
-msv_delete_account (GtkButton *button, MailSettingsView *msv)
+msv_delete_account (GtkButton *button,
+ MailSettingsView *msv)
{
EAccount *account = g_object_get_data((GObject *)button, "account");
EAccountList *account_list = e_get_account_list ();
@@ -116,7 +118,9 @@ msv_delete_account (GtkButton *button, MailSettingsView *msv)
}
static void
-msv_account_added (EAccountList *al, EAccount *account, MailSettingsView *msv)
+msv_account_added (EAccountList *al,
+ EAccount *account,
+ MailSettingsView *msv)
{
msv_regen_view (msv);
}
@@ -124,7 +128,8 @@ msv_account_added (EAccountList *al, EAccount *account, MailSettingsView *msv)
#define PACK_BOX(w,s) box = gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *)box, w, FALSE, FALSE, s); gtk_widget_show(box); gtk_widget_show(w); gtk_box_pack_start((GtkBox *)acview->priv->box, box, FALSE, FALSE, 3);
static void
-build_account_button (MailSettingsView *acview, EAccount *account)
+build_account_button (MailSettingsView *acview,
+ EAccount *account)
{
GtkWidget *box, *box1, *label, *tbox, *tlabel;
gchar *tmp;
@@ -153,7 +158,7 @@ build_account_button (MailSettingsView *acview, EAccount *account)
gtk_widget_show (tbox);
gtk_container_add ((GtkContainer *) label, tbox);
g_object_set_data ((GObject *)label, "account", account);
- g_signal_connect(label, "clicked", G_CALLBACK(msv_edit_account), acview);
+ g_signal_connect (label, "clicked", G_CALLBACK(msv_edit_account), acview);
gtk_box_pack_start ((GtkBox *) box1, label, FALSE, FALSE, 0);
gtk_widget_show (label);
@@ -171,7 +176,7 @@ build_account_button (MailSettingsView *acview, EAccount *account)
static void
msv_regen_view (MailSettingsView *acview)
{
- struct _EAccount *account;
+ EAccount *account;
EAccountList *accounts = acview->priv->accounts;
EIterator *node;
GtkWidget *box, *label;
@@ -226,7 +231,8 @@ mail_settings_view_new ()
}
static void
-msv_close (GtkButton *w, MailSettingsView *mfv)
+msv_close (GtkButton *w,
+ MailSettingsView *mfv)
{
g_signal_emit (mfv, signals[VIEW_CLOSE], 0);
}
@@ -253,7 +259,7 @@ mail_settings_view_get_tab_widget (MailSettingsView *mcv)
gtk_container_add ((GtkContainer *) tool, box);
gtk_widget_show_all (tool);
gtk_icon_size_lookup_for_settings (gtk_widget_get_settings (tool) , GTK_ICON_SIZE_MENU, &w, &h);
- gtk_widget_set_size_request (tool, w+2, h+2);
+ gtk_widget_set_size_request (tool, w + 2, h + 2);
box = gtk_label_new (_("Settings"));
tab_label = gtk_hbox_new (FALSE, 0);
@@ -268,12 +274,16 @@ mail_settings_view_get_tab_widget (MailSettingsView *mcv)
}
void
-mail_settings_view_activate (MailSettingsView *mcv, GtkWidget *tree, GtkWidget *folder_tree, GtkWidget *check_mail, GtkWidget *sort_by, GtkWidget *slider, gboolean act)
+mail_settings_view_activate (MailSettingsView *mcv,
+ GtkWidget *tree,
+ GtkWidget *folder_tree,
+ GtkWidget *check_mail,
+ GtkWidget *sort_by,
+ GtkWidget *slider,
+ gboolean act)
{
if (!check_mail || !sort_by)
return;
- //if (!GTK_WIDGET_VISIBLE (folder_tree))
- // gtk_widget_show (slider);
gtk_widget_set_sensitive (check_mail, TRUE);
gtk_widget_set_sensitive (sort_by, FALSE);
}
diff --git a/capplet/settings/mail-view.c b/capplet/settings/mail-view.c
index 279b83c2d5..53daf3fd08 100644
--- a/capplet/settings/mail-view.c
+++ b/capplet/settings/mail-view.c
@@ -72,7 +72,7 @@ static MailConvView * mv_switch_message_view (MailView *mv, const gchar *uri);
void anjal_shell_view_restore_state (EShellView *view, const gchar *uri);
static void
-mail_view_init (MailView *shell)
+mail_view_init (MailView *shell)
{
shell->priv = g_new0 (MailViewPrivate, 1);
shell->priv->children = NULL;
@@ -95,7 +95,8 @@ mail_view_finalize (GObject *object)
}
static void
-mv_set_folder_uri (AnjalMailView *mv, const gchar *uri)
+mv_set_folder_uri (AnjalMailView *mv,
+ const gchar *uri)
{
#ifndef ANJAL_SETTINGS
mail_view_set_folder_uri ((MailView *) mv, uri);
@@ -108,7 +109,8 @@ static void set_folder_tree (AnjalMailView *mv, EMFolderTree *tree)
}
static void
-set_search (AnjalMailView *mv, const gchar *search)
+set_search (AnjalMailView *mv,
+ const gchar *search)
{
#ifndef ANJAL_SETTINGS
mail_view_set_search ((MailView *) mv, search);
@@ -138,7 +140,10 @@ mail_view_class_init (MailViewClass *klass)
};
static void
-mv_switch (GtkNotebook *notebook, GtkWidget *page, guint page_num, gpointer user_data)
+mv_switch (GtkNotebook *notebook,
+ GtkWidget *page,
+ guint page_num,
+ gpointer user_data)
{
MailView *shell = (MailView *) notebook;
MailViewPrivate *priv = shell->priv;
@@ -192,21 +197,23 @@ mail_view_new ()
}
static gint
-mv_get_page_number (GtkNotebook *note, GtkWidget *widget)
+mv_get_page_number (GtkNotebook *note,
+ GtkWidget *widget)
{
gint i, total;
total = gtk_notebook_get_n_pages (note);
- for (i=0; i<total; i++) {
+ for (i = 0; i < total; i++) {
if (gtk_notebook_get_nth_page (note, i) == widget)
return i;
}
- return total-1;
+ return total - 1;
}
static void
-mv_close_mcv (MailViewChild *mfv, MailView *mv)
+mv_close_mcv (MailViewChild *mfv,
+ MailView *mv)
{
gint n = mv_get_page_number ((GtkNotebook *) mv, (GtkWidget *) mfv);
gint pos = gtk_notebook_get_current_page ((GtkNotebook *) mv);
@@ -279,7 +286,10 @@ mv_close_mcv (MailViewChild *mfv, MailView *mv)
#ifndef ANJAL_SETTINGS
static void
-mv_message_new (MailFolderView *mfv, gpointer data, gchar *umid, MailView *mv)
+mv_message_new (MailFolderView *mfv,
+ gpointer data,
+ gchar *umid,
+ MailView *mv)
{
MailConvView *conv = (MailConvView *) mv_switch_message_view (mv, umid);
*(MailConvView **)data = conv;
@@ -291,20 +301,24 @@ mv_message_new (MailFolderView *mfv, gpointer data, gchar *umid, MailView *mv)
}
static void
-mv_search_set (MailFolderView *mfv, MailView *mv)
+mv_search_set (MailFolderView *mfv,
+ MailView *mv)
{
anjal_shell_view_restore_state (mv->shell_view, ((MailViewChild *) mfv)->uri);
}
static void
-mv_folder_loaded (MailFolderView *mfv, MailView *mv)
+mv_folder_loaded (MailFolderView *mfv,
+ MailView *mv)
{
g_signal_handlers_block_by_func (mfv, mv_folder_loaded, mv);
g_signal_emit (mv, signals[VIEW_NEW], 0);
}
static MailViewChild *
-mail_view_add_folder (MailView *mv, gpointer data, gboolean block)
+mail_view_add_folder (MailView *mv,
+ gpointer data,
+ gboolean block)
{
MailFolderView *mfv = mail_folder_view_new ();
gint position = 0;
@@ -330,7 +344,9 @@ mail_view_add_folder (MailView *mv, gpointer data, gboolean block)
}
static MailViewChild *
-mail_view_add_composer (MailView *mv, gpointer data, gboolean block)
+mail_view_add_composer (MailView *mv,
+ gpointer data,
+ gboolean block)
{
MailComposerView *mcv;
gint position = 0;
@@ -338,7 +354,7 @@ mail_view_add_composer (MailView *mv, gpointer data, gboolean block)
if (!data)
mcv = mail_composer_view_new ();
- else if (data == (gpointer)-1) {
+ else if (data == (gpointer) - 1) {
special = TRUE;
data = NULL;
} else
@@ -351,7 +367,7 @@ mail_view_add_composer (MailView *mv, gpointer data, gboolean block)
position = gtk_notebook_append_page ((GtkNotebook *) mv, (GtkWidget *) mcv, mcv->tab_label);
else {
gint position = gtk_notebook_get_current_page ((GtkNotebook *) mv);
- gtk_notebook_insert_page ((GtkNotebook *) mv, (GtkWidget *) mcv, mcv->tab_label, position+1);
+ gtk_notebook_insert_page ((GtkNotebook *) mv, (GtkWidget *) mcv, mcv->tab_label, position + 1);
}
gtk_notebook_set_tab_reorderable (GTK_NOTEBOOK (mv), (GtkWidget *) mcv, TRUE);
@@ -368,7 +384,9 @@ mail_view_add_composer (MailView *mv, gpointer data, gboolean block)
}
static MailViewChild *
-mail_view_add_message (MailView *mv, gpointer data, gboolean block)
+mail_view_add_message (MailView *mv,
+ gpointer data,
+ gboolean block)
{
MailConvView *mcv = mail_conv_view_new ();
gint position = 0;
@@ -380,11 +398,11 @@ mail_view_add_message (MailView *mv, gpointer data, gboolean block)
mv->priv->children = block ? g_list_append (mv->priv->children, mcv) : g_list_prepend (mv->priv->children, mcv);
position = gtk_notebook_get_current_page ((GtkNotebook *) mv);
- gtk_notebook_insert_page ((GtkNotebook *) mv, (GtkWidget *) mcv, mail_conv_view_get_tab_widget (mcv), position+1);
+ gtk_notebook_insert_page ((GtkNotebook *) mv, (GtkWidget *) mcv, mail_conv_view_get_tab_widget (mcv), position + 1);
gtk_notebook_set_tab_reorderable (GTK_NOTEBOOK (mv), (GtkWidget *) mcv, TRUE);
gtk_notebook_set_tab_detachable (GTK_NOTEBOOK (mv), (GtkWidget *) mcv, FALSE);
if (!block)
- gtk_notebook_set_current_page ((GtkNotebook *) mv, position+1);
+ gtk_notebook_set_current_page ((GtkNotebook *) mv, position + 1);
if (!block)
mail_conv_view_activate (mcv, mv->tree, mv->folder_tree, mv->check_mail, mv->sort_by, FALSE);
@@ -397,13 +415,17 @@ mail_view_add_message (MailView *mv, gpointer data, gboolean block)
#endif
static void
-mv_show_acc_mcv (MailViewChild *mfv, EAccount *account, MailView *mv)
+mv_show_acc_mcv (MailViewChild *mfv,
+ EAccount *account,
+ MailView *mv)
{
mail_view_add_page (mv, MAIL_VIEW_ACCOUNT, account);
}
static MailViewChild *
-mail_view_add_settings (MailView *mv, gpointer data, gboolean block)
+mail_view_add_settings (MailView *mv,
+ gpointer data,
+ gboolean block)
{
MailSettingsView *msv = mail_settings_view_new ();
gint position = 0;
@@ -452,7 +474,9 @@ mail_view_add_account (MailView *mv,
}
MailViewChild *
-mail_view_add_page (MailView *mv, guint16 type, gpointer data)
+mail_view_add_page (MailView *mv,
+ guint16 type,
+ gpointer data)
{
MailViewChild *child = NULL, *current_child;
gboolean block = FALSE;
@@ -493,11 +517,12 @@ mail_view_add_page (MailView *mv, guint16 type, gpointer data)
#ifndef ANJAL_SETTINGS
static void
-mv_switch_folder_view (MailView *mv, const gchar *uri)
+mv_switch_folder_view (MailView *mv,
+ const gchar *uri)
{
- gint i=0, len = g_list_length (mv->priv->children);
+ gint i = 0, len = g_list_length (mv->priv->children);
GList *tmp = mv->priv->children;
- while (i<len) {
+ while (i < len) {
MailViewChild *child = (MailViewChild *) gtk_notebook_get_nth_page ((GtkNotebook *) mv, i);
if (child->type == MAIL_VIEW_FOLDER && !strcmp (uri, child->uri)) {
@@ -515,9 +540,10 @@ mv_switch_folder_view (MailView *mv, const gchar *uri)
}
static MailConvView *
-mv_switch_message_view (MailView *mv, const gchar *uri)
+mv_switch_message_view (MailView *mv,
+ const gchar *uri)
{
- gint i=0;
+ gint i = 0;
GList *tmp = mv->priv->children;
while (tmp) {
MailViewChild *child = tmp->data;
@@ -535,7 +561,8 @@ mv_switch_message_view (MailView *mv, const gchar *uri)
}
void
-mail_view_set_folder_uri (MailView *mv, const gchar *uri)
+mail_view_set_folder_uri (MailView *mv,
+ const gchar *uri)
{
mv_switch_folder_view (mv, uri);
@@ -551,21 +578,24 @@ mail_view_close_view (MailView *mv)
}
void
-mail_view_set_folder_tree (MailView *mv, GtkWidget *tree)
+mail_view_set_folder_tree (MailView *mv,
+ GtkWidget *tree)
{
mv->tree = tree;
}
#ifndef ANJAL_SETTINGS
static void
-mv_spinner_done (CamelFolder *f, gpointer data)
+mv_spinner_done (CamelFolder *f,
+ gpointer data)
{
MailView *mv = (MailView *) data;
mv_spinner_show (mv, FALSE);
}
void
-mail_view_set_search (MailView *mv, const gchar *search)
+mail_view_set_search (MailView *mv,
+ const gchar *search)
{
MailViewChild *child = (MailViewChild *) mv->priv->current_view;
@@ -578,7 +608,8 @@ mail_view_set_search (MailView *mv, const gchar *search)
#endif
void
-mail_view_set_shell_view (MailView *mv, EShellView *shell)
+mail_view_set_shell_view (MailView *mv,
+ EShellView *shell)
{
mv->shell_view = shell;
}
diff --git a/capplet/settings/mail-view.h b/capplet/settings/mail-view.h
index 6f814fd81e..3295cdb61c 100644
--- a/capplet/settings/mail-view.h
+++ b/capplet/settings/mail-view.h
@@ -36,7 +36,7 @@
#define MAIL_VIEW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), MAIL_VIEW_TYPE, MailViewClass))
enum {
- MAIL_VIEW_FOLDER=1,
+ MAIL_VIEW_FOLDER = 1,
MAIL_VIEW_COMPOSER,
MAIL_VIEW_MESSAGE,
MAIL_VIEW_ACCOUNT,
@@ -60,12 +60,12 @@ typedef struct _MailView {
typedef struct _MailViewClass {
AnjalMailViewClass parent_class;
- void (* view_new) (MailView*);
+ void (* view_new) (MailView *);
} MailViewClass;
typedef enum {
- MAIL_VIEW_HOLD_FOCUS=1,
+ MAIL_VIEW_HOLD_FOCUS = 1,
} MailViewFlags;
typedef struct _MailViewChild {