diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-09-12 02:56:28 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-09-13 20:28:58 +0800 |
commit | cd53ba990035bdb4861d9660917d457533d4ecb2 (patch) | |
tree | d9c9da2208f4a921c514497ea92d27e3d88481d1 /capplet/settings | |
parent | b2b27cfa1bfcd6efdac30d2745a6e8cd4e6de134 (diff) | |
download | gsoc2013-evolution-cd53ba990035bdb4861d9660917d457533d4ecb2.tar gsoc2013-evolution-cd53ba990035bdb4861d9660917d457533d4ecb2.tar.gz gsoc2013-evolution-cd53ba990035bdb4861d9660917d457533d4ecb2.tar.bz2 gsoc2013-evolution-cd53ba990035bdb4861d9660917d457533d4ecb2.tar.lz gsoc2013-evolution-cd53ba990035bdb4861d9660917d457533d4ecb2.tar.xz gsoc2013-evolution-cd53ba990035bdb4861d9660917d457533d4ecb2.tar.zst gsoc2013-evolution-cd53ba990035bdb4861d9660917d457533d4ecb2.zip |
Coding style cleanups.
Diffstat (limited to 'capplet/settings')
-rw-r--r-- | capplet/settings/anjal-mail-view.c | 12 | ||||
-rw-r--r-- | capplet/settings/mail-account-view.c | 284 | ||||
-rw-r--r-- | capplet/settings/mail-account-view.h | 2 | ||||
-rw-r--r-- | capplet/settings/mail-capplet-shell.c | 14 | ||||
-rw-r--r-- | capplet/settings/mail-decoration.c | 20 | ||||
-rw-r--r-- | capplet/settings/mail-guess-servers.c | 34 | ||||
-rw-r--r-- | capplet/settings/mail-settings-view.c | 46 | ||||
-rw-r--r-- | capplet/settings/mail-settings-view.h | 2 | ||||
-rw-r--r-- | capplet/settings/mail-view.c | 56 | ||||
-rw-r--r-- | capplet/settings/mail-view.h | 2 |
10 files changed, 236 insertions, 236 deletions
diff --git a/capplet/settings/anjal-mail-view.c b/capplet/settings/anjal-mail-view.c index 9f96bcd6ef..92c811b69a 100644 --- a/capplet/settings/anjal-mail-view.c +++ b/capplet/settings/anjal-mail-view.c @@ -41,7 +41,7 @@ G_DEFINE_TYPE (AnjalMailView, anjal_mail_view, GTK_TYPE_NOTEBOOK) static void anjal_mail_view_init (AnjalMailView *shell) { - shell->priv = g_new0(AnjalMailViewPrivate, 1); + shell->priv = g_new0 (AnjalMailViewPrivate, 1); shell->priv->started = TRUE; } @@ -107,30 +107,30 @@ anjal_mail_view_set_folder_uri (AnjalMailView *mv, const gchar *uri) if (!mv || !uri) return; - ANJAL_MAIL_VIEW_GET_CLASS(mv)->set_folder_uri (mv, uri); + ANJAL_MAIL_VIEW_GET_CLASS (mv)->set_folder_uri (mv, uri); } void anjal_mail_view_set_folder_tree_widget (AnjalMailView *mv, GtkWidget *tree) { - ANJAL_MAIL_VIEW_GET_CLASS(mv)->set_folder_tree_widget (mv, tree); + ANJAL_MAIL_VIEW_GET_CLASS (mv)->set_folder_tree_widget (mv, tree); } void anjal_mail_view_set_folder_tree (AnjalMailView *mv, GtkWidget *tree) { - ANJAL_MAIL_VIEW_GET_CLASS(mv)->set_folder_tree (mv, (EMFolderTree *)tree); + ANJAL_MAIL_VIEW_GET_CLASS (mv)->set_folder_tree (mv, (EMFolderTree *)tree); } void anjal_mail_view_set_search (AnjalMailView *view, const gchar *search) { - ANJAL_MAIL_VIEW_GET_CLASS(view)->set_search (view, search); + ANJAL_MAIL_VIEW_GET_CLASS (view)->set_search (view, search); } void anjal_mail_view_init_search (AnjalMailView *mv, GtkWidget *search) { - ANJAL_MAIL_VIEW_GET_CLASS(mv)->init_search (mv, search); + ANJAL_MAIL_VIEW_GET_CLASS (mv)->init_search (mv, search); } diff --git a/capplet/settings/mail-account-view.c b/capplet/settings/mail-account-view.c index 1dc638ebe4..9cf9d47754 100644 --- a/capplet/settings/mail-account-view.c +++ b/capplet/settings/mail-account-view.c @@ -81,7 +81,7 @@ static guint signals[LAST_SIGNAL] = { 0 }; static void mail_account_view_init (MailAccountView *shell) { - shell->priv = g_new0(MailAccountViewPrivate, 1); + shell->priv = g_new0 (MailAccountViewPrivate, 1); shell->priv->is_gmail = FALSE; shell->priv->is_yahoo = FALSE; @@ -93,7 +93,7 @@ mail_account_view_finalize (GObject *object) { MailAccountView *shell = (MailAccountView *)object; - g_free(shell->priv->username); + g_free (shell->priv->username); G_OBJECT_CLASS (mail_account_view_parent_class)->finalize (object); } @@ -139,10 +139,10 @@ struct _server_prefill { static gint check_servers (gchar *server) { - gint len = G_N_ELEMENTS(std_server), i; + gint len = G_N_ELEMENTS (std_server), i; for (i=0; i<len; i++) { - if (strstr(server, std_server[i].key) != NULL) + if (strstr (server, std_server[i].key) != NULL) return i; } @@ -157,8 +157,8 @@ save_identity (MailAccountView *view) static gint validate_identity (MailAccountView *view) { - gchar *user = (gchar *)e_account_get_string(em_account_editor_get_modified_account(view->edit), E_ACCOUNT_ID_NAME); - gchar *email = (gchar *)e_account_get_string(em_account_editor_get_modified_account(view->edit), E_ACCOUNT_ID_ADDRESS); + gchar *user = (gchar *)e_account_get_string (em_account_editor_get_modified_account (view->edit), E_ACCOUNT_ID_NAME); + gchar *email = (gchar *)e_account_get_string (em_account_editor_get_modified_account (view->edit), E_ACCOUNT_ID_ADDRESS); gchar *tmp; const gchar *pwd = gtk_entry_get_text ((GtkEntry *)view->password); @@ -171,7 +171,7 @@ validate_identity (MailAccountView *view) if (!pwd || !*pwd) return ERROR_NO_PASSWORD; - tmp = strchr(email, '@'); + tmp = strchr (email, '@'); if (!tmp || tmp[1] == 0) return ERROR_INVALID_EMAIL; @@ -239,8 +239,8 @@ setup_yahoo_account (MailAccountView *mav) { GConfClient *gconf = gconf_client_get_default (); - mav->priv->do_gcontacts = gtk_toggle_button_get_active((GtkToggleButton *)mav->priv->gcontacts); - mav->priv->do_calendar = gtk_toggle_button_get_active((GtkToggleButton *)mav->priv->calendar); + mav->priv->do_gcontacts = gtk_toggle_button_get_active ((GtkToggleButton *)mav->priv->gcontacts); + mav->priv->do_calendar = gtk_toggle_button_get_active ((GtkToggleButton *)mav->priv->calendar); if (mav->priv->do_calendar) { ESourceList *slist; @@ -248,7 +248,7 @@ setup_yahoo_account (MailAccountView *mav) ESource *calendar; gchar *sanitize_uname, *abs_uri, *rel_uri; GSList *ids, *temp; - const gchar *email = e_account_get_string(em_account_editor_get_modified_account(mav->edit), E_ACCOUNT_ID_ADDRESS); + const gchar *email = e_account_get_string (em_account_editor_get_modified_account (mav->edit), E_ACCOUNT_ID_ADDRESS); slist = e_source_list_new_for_gconf (gconf, "/apps/evolution/calendar/sources"); sgrp = e_source_list_peek_group_by_base_uri (slist, "caldav://"); @@ -274,10 +274,10 @@ setup_yahoo_account (MailAccountView *mav) sanitize_uname = sanitize_user_mail (email); abs_uri = g_strdup_printf ("caldav://%s@caldav.calendar.yahoo.com/dav/%s/Calendar/%s/", sanitize_uname, email, gtk_entry_get_text((GtkEntry *)mav->priv->yahoo_cal_entry)); - e_passwords_add_password (abs_uri, gtk_entry_get_text((GtkEntry *)mav->password)); + e_passwords_add_password (abs_uri, gtk_entry_get_text ((GtkEntry *)mav->password)); e_passwords_remember_password ("Calendar", abs_uri); - rel_uri = g_strdup_printf (YAHOO_CALENDAR_LOCATION, sanitize_uname, email, gtk_entry_get_text((GtkEntry *)mav->priv->yahoo_cal_entry)); + rel_uri = g_strdup_printf (YAHOO_CALENDAR_LOCATION, sanitize_uname, email, gtk_entry_get_text ((GtkEntry *)mav->priv->yahoo_cal_entry)); e_source_set_relative_uri (calendar, rel_uri); e_source_group_add_source (sgrp, calendar, -1); @@ -292,12 +292,12 @@ setup_yahoo_account (MailAccountView *mav) g_free (temp->data); g_slist_free (ids); - g_free(abs_uri); - g_free(rel_uri); - g_free(sanitize_uname); - g_object_unref(slist); - g_object_unref(sgrp); - g_object_unref(calendar); + g_free (abs_uri); + g_free (rel_uri); + g_free (sanitize_uname); + g_object_unref (slist); + g_object_unref (sgrp); + g_object_unref (calendar); } else printf("Not setting up Yahoo Calendar\n"); @@ -324,15 +324,15 @@ setup_yahoo_account (MailAccountView *mav) e_source_set_relative_uri (abook, mav->priv->username); rel_uri = g_strdup_printf("google://%s/", mav->priv->username); - e_passwords_add_password (rel_uri, gtk_entry_get_text((GtkEntry *)mav->password)); + e_passwords_add_password (rel_uri, gtk_entry_get_text ((GtkEntry *)mav->password)); e_passwords_remember_password ("Addressbook", rel_uri); e_source_group_add_source (sgrp, abook, -1); e_source_list_sync (slist, NULL); - g_free(rel_uri); - g_object_unref(slist); - g_object_unref(sgrp); - g_object_unref(abook); + g_free (rel_uri); + g_object_unref (slist); + g_object_unref (sgrp); + g_object_unref (abook); } @@ -344,8 +344,8 @@ setup_google_accounts (MailAccountView *mav) { GConfClient *gconf = gconf_client_get_default (); - mav->priv->do_gcontacts = gtk_toggle_button_get_active((GtkToggleButton *)mav->priv->gcontacts); - mav->priv->do_calendar = gtk_toggle_button_get_active((GtkToggleButton *)mav->priv->calendar); + mav->priv->do_gcontacts = gtk_toggle_button_get_active ((GtkToggleButton *)mav->priv->gcontacts); + mav->priv->do_calendar = gtk_toggle_button_get_active ((GtkToggleButton *)mav->priv->calendar); if (mav->priv->do_calendar) { ESourceList *slist; @@ -378,7 +378,7 @@ setup_google_accounts (MailAccountView *mav) abs_uri = g_strdup_printf (CALENDAR_CALDAV_URI, sanitize_uname, mav->priv->username); e_source_set_absolute_uri (calendar, abs_uri); - e_passwords_add_password (abs_uri, gtk_entry_get_text((GtkEntry *)mav->password)); + e_passwords_add_password (abs_uri, gtk_entry_get_text ((GtkEntry *)mav->password)); e_passwords_remember_password ("Calendar", abs_uri); rel_uri = g_strconcat ("https", GMAIL_CALENDAR_LOCATION, sanitize_uname, CALENDAR_DEFAULT_PATH, NULL); e_source_set_relative_uri (calendar, rel_uri); @@ -395,12 +395,12 @@ setup_google_accounts (MailAccountView *mav) g_free (temp->data); g_slist_free (ids); - g_free(abs_uri); - g_free(rel_uri); - g_free(sanitize_uname); - g_object_unref(slist); - g_object_unref(sgrp); - g_object_unref(calendar); + g_free (abs_uri); + g_free (rel_uri); + g_free (sanitize_uname); + g_object_unref (slist); + g_object_unref (sgrp); + g_object_unref (calendar); } else printf("Not setting up Google Calendar\n"); @@ -427,15 +427,15 @@ setup_google_accounts (MailAccountView *mav) e_source_set_relative_uri (abook, mav->priv->username); rel_uri = g_strdup_printf("google://%s/", mav->priv->username); - e_passwords_add_password (rel_uri, gtk_entry_get_text((GtkEntry *)mav->password)); + e_passwords_add_password (rel_uri, gtk_entry_get_text ((GtkEntry *)mav->password)); e_passwords_remember_password ("Addressbook", rel_uri); e_source_group_add_source (sgrp, abook, -1); e_source_list_sync (slist, NULL); - g_free(rel_uri); - g_object_unref(slist); - g_object_unref(sgrp); - g_object_unref(abook); + g_free (rel_uri); + g_object_unref (slist); + g_object_unref (sgrp); + g_object_unref (abook); } @@ -453,8 +453,8 @@ create_review (MailAccountView *view) CamelURL *url; gchar *buff; - uri = (gchar *)e_account_get_string(em_account_editor_get_modified_account(view->edit), E_ACCOUNT_SOURCE_URL); - if (!uri || (url = camel_url_new(uri, NULL)) == NULL) + uri = (gchar *)e_account_get_string (em_account_editor_get_modified_account (view->edit), E_ACCOUNT_SOURCE_URL); + if (!uri || (url = camel_url_new (uri, NULL)) == NULL) return NULL; table = gtk_table_new (4,2, FALSE); @@ -465,25 +465,25 @@ create_review (MailAccountView *view) gtk_label_set_markup ((GtkLabel *)label, buff); g_free (buff); gtk_widget_show (label); - PACK_BOXF(label) + PACK_BOXF (label) 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); + PACK_BOX (label); 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) + 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); label = gtk_label_new (_("Email address:")); gtk_widget_show (label); - PACK_BOX(label) + PACK_BOX (label) 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) + 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); label = gtk_label_new (NULL); @@ -491,7 +491,7 @@ create_review (MailAccountView *view) gtk_label_set_markup ((GtkLabel *)label, buff); g_free (buff); gtk_widget_show (label); - PACK_BOXF(label); + PACK_BOXF (label); gtk_table_attach ((GtkTable *)table, box, 0, 1, 3, 4, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); label = gtk_label_new (NULL); @@ -499,50 +499,50 @@ create_review (MailAccountView *view) gtk_label_set_markup ((GtkLabel *)label, buff); g_free (buff); gtk_widget_show (label); - PACK_BOXF(label); + PACK_BOXF (label); 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); + PACK_BOX (label); 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_widget_show (entry); + PACK_BOX (entry) 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); + PACK_BOX (label); 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_widget_show (entry); + PACK_BOX (entry); 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); + PACK_BOX (label); 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_widget_show (entry); + PACK_BOX (entry); 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); + PACK_BOX (label); 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, "use_ssl"); entry = gtk_label_new (enc ? enc : _("never")); - gtk_widget_show(entry); - PACK_BOX(entry); + 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); - view->priv->username = g_strdup(url->user); - camel_url_free(url); - uri =(gchar *) e_account_get_string(em_account_editor_get_modified_account(view->edit), E_ACCOUNT_TRANSPORT_URL); - if (!uri || (url = camel_url_new(uri, NULL)) == NULL) + view->priv->username = g_strdup (url->user); + camel_url_free (url); + uri =(gchar *) e_account_get_string (em_account_editor_get_modified_account (view->edit), E_ACCOUNT_TRANSPORT_URL); + if (!uri || (url = camel_url_new (uri, NULL)) == NULL) return NULL; label = gtk_label_new (NULL); @@ -550,40 +550,40 @@ create_review (MailAccountView *view) gtk_label_set_markup ((GtkLabel *)label, buff); g_free (buff); gtk_widget_show (label); - PACK_BOXF(label); + PACK_BOXF (label); 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_widget_show (entry); + PACK_BOX (entry) 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_widget_show (entry); + PACK_BOX (entry); 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_widget_show (entry); + PACK_BOX (entry); 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, "use_ssl"); entry = gtk_label_new (enc ? enc : _("never")); - gtk_widget_show(entry); - PACK_BOX(entry); + 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); /* label = gtk_label_new (_("Organization:")); gtk_widget_show (label); entry = gtk_entry_new (); - gtk_widget_show(entry); + 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_widget_show(table); + gtk_widget_show (table); return table; } @@ -640,38 +640,38 @@ mav_next_pressed (GtkButton *button, MailAccountView *mav) } if (mav->current_page == MAV_LAST - 1) { - gchar *uri = (gchar *)e_account_get_string(em_account_editor_get_modified_account(mav->edit), E_ACCOUNT_SOURCE_URL); + gchar *uri = (gchar *)e_account_get_string (em_account_editor_get_modified_account (mav->edit), E_ACCOUNT_SOURCE_URL); CamelURL *url; - e_account_set_string (em_account_editor_get_modified_account(mav->edit), E_ACCOUNT_NAME, e_account_get_string(em_account_editor_get_modified_account(mav->edit), E_ACCOUNT_ID_ADDRESS)); - if (uri != NULL && (url = camel_url_new(uri, NULL)) != NULL) { + e_account_set_string (em_account_editor_get_modified_account (mav->edit), E_ACCOUNT_NAME, e_account_get_string (em_account_editor_get_modified_account (mav->edit), E_ACCOUNT_ID_ADDRESS)); + if (uri != NULL && (url = camel_url_new (uri, NULL)) != NULL) { camel_url_set_param(url, "check_all", "1"); camel_url_set_param(url, "sync_offline", "1"); if (!mav->original) { - e_account_set_bool(em_account_editor_get_modified_account(mav->edit), E_ACCOUNT_SOURCE_AUTO_CHECK, TRUE); + e_account_set_bool (em_account_editor_get_modified_account (mav->edit), E_ACCOUNT_SOURCE_AUTO_CHECK, TRUE); } if (!mav->original && strcmp(url->protocol, "pop") == 0) { - e_account_set_bool (em_account_editor_get_modified_account(mav->edit), E_ACCOUNT_SOURCE_KEEP_ON_SERVER, TRUE); + e_account_set_bool (em_account_editor_get_modified_account (mav->edit), E_ACCOUNT_SOURCE_KEEP_ON_SERVER, TRUE); } - uri = camel_url_to_string(url, 0); - e_account_set_string(em_account_editor_get_modified_account(mav->edit), E_ACCOUNT_SOURCE_URL, uri); - g_free(uri); - camel_url_free(url); + uri = camel_url_to_string (url, 0); + e_account_set_string (em_account_editor_get_modified_account (mav->edit), E_ACCOUNT_SOURCE_URL, uri); + g_free (uri); + camel_url_free (url); } if (!mav->original) { - EAccount *account = em_account_editor_get_modified_account(mav->edit); + EAccount *account = em_account_editor_get_modified_account (mav->edit); CamelURL *aurl; gchar *surl; /* Save the password ahead of time */ aurl = camel_url_new (account->source->url, NULL); - surl = camel_url_to_string(aurl, CAMEL_URL_HIDE_ALL); - e_passwords_add_password (surl, gtk_entry_get_text((GtkEntry *)mav->password)); + surl = camel_url_to_string (aurl, CAMEL_URL_HIDE_ALL); + e_passwords_add_password (surl, gtk_entry_get_text ((GtkEntry *)mav->password)); e_passwords_remember_password ("Mail", surl); - camel_url_free(aurl); - g_free(surl); + camel_url_free (aurl); + g_free (surl); } if (mav->priv->is_gmail && !mav->original) @@ -694,17 +694,17 @@ mav_next_pressed (GtkButton *button, MailAccountView *mav) if (mav->current_page == MAV_LAST - 1) { MAVPage *page = mav->pages[mav->current_page]; GtkWidget *tmp; - EAccount *account = em_account_editor_get_modified_account(mav->edit); + EAccount *account = em_account_editor_get_modified_account (mav->edit); if (page->main) gtk_widget_destroy (page->main); - tmp = mail_account_pages[mav->current_page].create_page(mav); + tmp = mail_account_pages[mav->current_page].create_page (mav); page->main = gtk_hbox_new (FALSE, 0); gtk_widget_show (page->main); - gtk_box_pack_start((GtkBox *)page->main, tmp, FALSE, FALSE, 0); - gtk_widget_show(tmp); - gtk_box_pack_start((GtkBox *)page->box, page->main, FALSE, FALSE, 3); + gtk_box_pack_start ((GtkBox *)page->main, tmp, FALSE, FALSE, 0); + gtk_widget_show (tmp); + gtk_box_pack_start ((GtkBox *)page->box, page->main, FALSE, FALSE, 3); if (mav->priv->is_gmail) { gtk_widget_destroy (mav->priv->gcontacts); @@ -740,13 +740,13 @@ mav_next_pressed (GtkButton *button, MailAccountView *mav) buff = g_markup_printf_escaped ("<span size=\"large\" weight=\"bold\">%s</span>", _("Google account settings:")); gtk_label_set_markup ((GtkLabel *)tmp, buff); g_free (buff); - gtk_widget_show(tmp); + gtk_widget_show (tmp); #define PACK_IN_BOX(wid,child,num) { GtkWidget *tbox; tbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start ((GtkBox *)tbox, child, FALSE, FALSE, num); gtk_widget_show (tbox); gtk_box_pack_start ((GtkBox *)wid, tbox, FALSE, FALSE, 0); } - PACK_IN_BOX(page->box,tmp,12); - PACK_IN_BOX(page->box,mav->priv->gcontacts,24); - PACK_IN_BOX(page->box,mav->priv->calendar,24); + PACK_IN_BOX (page->box,tmp,12); + PACK_IN_BOX (page->box,mav->priv->gcontacts,24); + PACK_IN_BOX (page->box,mav->priv->calendar,24); #undef PACK_IN_BOX #define PACK_IN_BOX(wid,child1,child2,num1,num2) { GtkWidget *tbox; tbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start ((GtkBox *)tbox, child1, FALSE, FALSE, num1); gtk_box_pack_start ((GtkBox *)tbox, child2, FALSE, FALSE, num2); gtk_widget_show_all (tbox); gtk_box_pack_start ((GtkBox *)wid, tbox, FALSE, FALSE, 0); } @@ -778,20 +778,20 @@ mav_next_pressed (GtkButton *button, MailAccountView *mav) buff = g_markup_printf_escaped ("<span size=\"large\" weight=\"bold\">%s</span>", _("Yahoo account settings:")); gtk_label_set_markup ((GtkLabel *)tmp, buff); g_free (buff); - gtk_widget_show(tmp); + gtk_widget_show (tmp); #define PACK_IN_BOX(wid,child,num) { GtkWidget *tbox; tbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start ((GtkBox *)tbox, child, FALSE, FALSE, num); gtk_widget_show (tbox); gtk_box_pack_start ((GtkBox *)wid, tbox, FALSE, FALSE, 0); } #define PACK_IN_BOX_AND_TEXT(txt, child,num) { GtkWidget *txtlbl = gtk_label_new (txt); tmpbox = gtk_hbox_new (FALSE, 12); gtk_box_pack_start ((GtkBox *)tmpbox, txtlbl, FALSE, FALSE, num); gtk_box_pack_start ((GtkBox *)tmpbox, child, FALSE, FALSE, num); gtk_widget_show_all (tmpbox);} - PACK_IN_BOX(page->box,tmp,12); - PACK_IN_BOX(page->box,mav->priv->calendar,24); + PACK_IN_BOX (page->box,tmp,12); + PACK_IN_BOX (page->box,mav->priv->calendar,24); mav->priv->yahoo_cal_entry = gtk_entry_new (); gtk_widget_show (mav->priv->yahoo_cal_entry); - PACK_IN_BOX(page->box,mav->priv->gmail_info_label, 24); + PACK_IN_BOX (page->box,mav->priv->gmail_info_label, 24); PACK_IN_BOX_AND_TEXT(_("Yahoo Calendar name:"), mav->priv->yahoo_cal_entry, 0); - PACK_IN_BOX(page->box, tmpbox, 24); - cal_name = g_strdup(e_account_get_string(em_account_editor_get_modified_account(mav->edit), E_ACCOUNT_ID_NAME)); + PACK_IN_BOX (page->box, tmpbox, 24); + cal_name = g_strdup (e_account_get_string (em_account_editor_get_modified_account (mav->edit), E_ACCOUNT_ID_NAME)); cal_name = g_strdelimit(cal_name, " ", '_'); gtk_entry_set_text ((GtkEntry *)mav->priv->yahoo_cal_entry, cal_name); g_free (cal_name); @@ -808,7 +808,7 @@ mav_next_pressed (GtkButton *button, MailAccountView *mav) mav->pages[mav->current_page]->done = TRUE; if (mail_account_pages[mav->current_page].path) { - if (!mav->original && em_account_editor_check(mav->edit, mail_account_pages[mav->current_page].path)) + if (!mav->original && em_account_editor_check (mav->edit, mail_account_pages[mav->current_page].path)) mav_next_pressed (NULL, mav); } } @@ -831,9 +831,9 @@ 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); + MAVPage *page = g_new0 (MAVPage, 1); GtkWidget *box, *tmp, *error_box; gchar *str; @@ -852,24 +852,24 @@ mav_construct_page(MailAccountView *view, MAVPageType type) gtk_widget_show (error_box); box = gtk_hbox_new (FALSE, 12); - gtk_widget_show(box); - gtk_box_pack_start((GtkBox *)page->box, box, FALSE, FALSE, 12); + gtk_widget_show (box); + gtk_box_pack_start ((GtkBox *)page->box, box, FALSE, FALSE, 12); tmp = gtk_label_new (NULL); str = g_strdup_printf("<span size=\"xx-large\" weight=\"heavy\">%s</span>", _(mail_account_pages[type].head)); gtk_label_set_markup ((GtkLabel *)tmp, str); - g_free(str); + g_free (str); gtk_widget_show (tmp); - gtk_box_pack_start((GtkBox *)box, tmp, FALSE, FALSE, 12); + gtk_box_pack_start ((GtkBox *)box, tmp, FALSE, FALSE, 12); box = gtk_hbox_new (FALSE, 12); - gtk_widget_show(box); - gtk_box_pack_start((GtkBox *)page->box, box, FALSE, FALSE, 12); + gtk_widget_show (box); + gtk_box_pack_start ((GtkBox *)page->box, box, FALSE, FALSE, 12); tmp = gtk_label_new (_(mail_account_pages[type].detail)); gtk_widget_set_size_request (tmp, 600, -1); gtk_label_set_line_wrap ((GtkLabel *)tmp, TRUE); gtk_label_set_line_wrap_mode ((GtkLabel *)tmp, PANGO_WRAP_WORD); - gtk_widget_show(tmp); - gtk_box_pack_start((GtkBox *)box, tmp, FALSE, FALSE, 12); + gtk_widget_show (tmp); + gtk_box_pack_start ((GtkBox *)box, tmp, FALSE, FALSE, 12); page->main = NULL; if (mail_account_pages[type].create_page && mail_account_pages[type].path) { @@ -877,7 +877,7 @@ mav_construct_page(MailAccountView *view, MAVPageType type) gtk_box_pack_start ((GtkBox *)page->box, tmp, FALSE, FALSE, 3); page->main = gtk_hbox_new (FALSE, 0); gtk_widget_show (page->main); - gtk_box_pack_start((GtkBox *)page->main, tmp, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *)page->main, tmp, FALSE, FALSE, 0); } if (mail_account_pages[type].fill_page) { @@ -885,33 +885,33 @@ mav_construct_page(MailAccountView *view, MAVPageType type) } if ((view->original && mail_account_pages[type].prev_edit) || mail_account_pages[type].prev) { - box = gtk_hbox_new(FALSE, 0); + box = gtk_hbox_new (FALSE, 0); if (FALSE) { tmp = gtk_image_new_from_icon_name ("go-previous", GTK_ICON_SIZE_BUTTON); - gtk_box_pack_start((GtkBox *)box, tmp, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *)box, tmp, FALSE, FALSE, 0); } tmp = gtk_label_new (_(view->original ? mail_account_pages[type].prev_edit : mail_account_pages[type].prev)); - gtk_box_pack_start((GtkBox *)box, tmp, FALSE, FALSE, 3); + gtk_box_pack_start ((GtkBox *)box, tmp, FALSE, FALSE, 3); page->prev = gtk_button_new (); gtk_container_add ((GtkContainer *)page->prev, box); - gtk_widget_show_all(page->prev); + gtk_widget_show_all (page->prev); 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) { - box = gtk_hbox_new(FALSE, 0); + box = gtk_hbox_new (FALSE, 0); tmp = gtk_label_new (_(view->original ? mail_account_pages[type].next_edit : mail_account_pages[type].next)); - gtk_box_pack_start((GtkBox *)box, tmp, FALSE, FALSE, 3); + gtk_box_pack_start ((GtkBox *)box, tmp, FALSE, FALSE, 3); if (FALSE) { tmp = gtk_image_new_from_icon_name ("go-next", GTK_ICON_SIZE_BUTTON); - gtk_box_pack_start((GtkBox *)box, tmp, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *)box, tmp, FALSE, FALSE, 0); } page->next = gtk_button_new (); gtk_widget_set_can_default (page->next, TRUE); g_signal_connect (page->next, "hierarchy-changed", G_CALLBACK (gtk_widget_grab_default), NULL); gtk_container_add ((GtkContainer *)page->next, box); - gtk_widget_show_all(page->next); + gtk_widget_show_all (page->next); g_signal_connect(page->next, "clicked", G_CALLBACK(mav_next_pressed), view); } @@ -922,7 +922,7 @@ mav_construct_page(MailAccountView *view, MAVPageType type) gtk_box_pack_end ((GtkBox *)box, page->next, FALSE, FALSE, 12); gtk_widget_show (box); gtk_box_pack_end ((GtkBox *)page->box, box, FALSE, FALSE, 6); - gtk_widget_show(page->box); + gtk_widget_show (page->box); gtk_box_pack_end ((GtkBox *)page->box, error_box, FALSE, FALSE, 2); return (GtkWidget *)page; } @@ -930,20 +930,20 @@ mav_construct_page(MailAccountView *view, MAVPageType type) static ServerData * emae_check_servers (const gchar *email) { - ServerData *sdata = g_new0(ServerData, 1); - EmailProvider *provider = g_new0(EmailProvider, 1); - gchar *dupe = g_strdup(email); + ServerData *sdata = g_new0 (ServerData, 1); + EmailProvider *provider = g_new0 (EmailProvider, 1); + gchar *dupe = g_strdup (email); gchar *tmp; /* FIXME: Find a way to free the provider once given to account settings. */ provider->email = (gchar *)email; - tmp = strchr(email, '@'); + tmp = strchr (email, '@'); tmp++; provider->domain = tmp; - tmp = strchr(dupe, '@'); + tmp = strchr (dupe, '@'); *tmp = 0; - provider->username = (gchar *)g_quark_to_string(g_quark_from_string(dupe)); - g_free(dupe); + provider->username = (gchar *)g_quark_to_string (g_quark_from_string (dupe)); + g_free (dupe); if (!mail_guess_servers (provider)) { g_free (provider); @@ -1045,8 +1045,8 @@ mail_account_view_construct (MailAccountView *view) gtk_widget_hide (e_config_create_widget (E_CONFIG (view->edit->config))); view->edit->emae_check_servers = emae_check_servers; if (!view->original) { - e_account_set_bool (em_account_editor_get_modified_account(view->edit), E_ACCOUNT_SOURCE_SAVE_PASSWD, TRUE); - e_account_set_bool (em_account_editor_get_modified_account(view->edit), E_ACCOUNT_TRANSPORT_SAVE_PASSWD, TRUE); + e_account_set_bool (em_account_editor_get_modified_account (view->edit), E_ACCOUNT_SOURCE_SAVE_PASSWD, TRUE); + e_account_set_bool (em_account_editor_get_modified_account (view->edit), E_ACCOUNT_TRANSPORT_SAVE_PASSWD, TRUE); } em_account_editor_check (view->edit, mail_account_pages[0].path); view->pages[0]->done = TRUE; @@ -1063,8 +1063,8 @@ mail_account_view_construct (MailAccountView *view) gtk_entry_set_visibility ((GtkEntry *)pwd, FALSE); /* gtk_entry_set_activates_default ((GtkEntry *)pwd, TRUE); */ g_signal_connect (pwd, "activate", G_CALLBACK (next_page), view); - gtk_widget_show(label); - gtk_widget_show(pwd); + 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); @@ -1097,8 +1097,8 @@ mav_btn_expose (GtkWidget *w, GdkEventExpose *event, MailAccountView *mfv) cr = gdk_cairo_create (gtk_widget_get_window (w)); cairo_save (cr); gdk_cairo_set_source_pixbuf (cr, img, event->area.x-5, event->area.y-4); - cairo_paint(cr); - cairo_restore(cr); + cairo_paint (cr); + cairo_restore (cr); cairo_destroy (cr); return TRUE; @@ -1124,7 +1124,7 @@ mail_account_view_get_tab_widget (MailAccountView *mcv) g_signal_connect (img, "expose-event", G_CALLBACK(mav_btn_expose), mcv); tool = gtk_button_new (); - gtk_button_set_relief((GtkButton *)tool, GTK_RELIEF_NONE); + gtk_button_set_relief ((GtkButton *)tool, GTK_RELIEF_NONE); gtk_button_set_focus_on_click ((GtkButton *)tool, FALSE); gtk_widget_set_tooltip_text (tool, _("Close Tab")); g_signal_connect (tool, "clicked", G_CALLBACK(mav_close), mcv); @@ -1133,7 +1133,7 @@ mail_account_view_get_tab_widget (MailAccountView *mcv) gtk_box_pack_start ((GtkBox *)box, img, FALSE, FALSE, 0); 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_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); box = gtk_label_new (_("Account Wizard")); diff --git a/capplet/settings/mail-account-view.h b/capplet/settings/mail-account-view.h index 3d01156e5b..5b728bca93 100644 --- a/capplet/settings/mail-account-view.h +++ b/capplet/settings/mail-account-view.h @@ -88,6 +88,6 @@ typedef struct _MailAccountViewClass { GType mail_account_view_get_type (void); MailAccountView *mail_account_view_new (EAccount *account); -GtkWidget * mail_account_view_get_tab_widget(MailAccountView *mcv); +GtkWidget * 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); #endif diff --git a/capplet/settings/mail-capplet-shell.c b/capplet/settings/mail-capplet-shell.c index a1cdbb8989..8038f413ed 100644 --- a/capplet/settings/mail-capplet-shell.c +++ b/capplet/settings/mail-capplet-shell.c @@ -89,7 +89,7 @@ static void setup_abooks (void); static void mail_capplet_shell_init (MailCappletShell *shell) { - shell->priv = g_new0(MailCappletShellPrivate, 1); + shell->priv = g_new0 (MailCappletShellPrivate, 1); shell->priv->settings_view = NULL; } @@ -173,7 +173,7 @@ mail_capplet_shell_quit (MailCappletShell *shell) MailCappletShellPrivate *priv = shell->priv; if (priv->main_loop) - gtk_main_quit(); + gtk_main_quit (); else gtk_widget_hide ((GtkWidget *)shell); } @@ -211,8 +211,8 @@ mail_capplet_shell_construct (MailCappletShell *shell, gint socket_id, gboolean gtk_window_set_type_hint ((GtkWindow *)shell, GDK_WINDOW_TYPE_HINT_NORMAL); if (g_getenv("ANJAL_NO_MAX") == NULL && FALSE) { GdkScreen *scr = gtk_widget_get_screen ((GtkWidget *)shell); - window_width = gdk_screen_get_width(scr); - gtk_window_set_default_size ((GtkWindow *)shell, gdk_screen_get_width(scr), gdk_screen_get_height (scr)); + window_width = gdk_screen_get_width (scr); + gtk_window_set_default_size ((GtkWindow *)shell, gdk_screen_get_width (scr), gdk_screen_get_height (scr)); gtk_window_set_decorated ((GtkWindow *)shell, FALSE); } else { gtk_window_set_default_size ((GtkWindow *)shell, 1024, 500); @@ -255,7 +255,7 @@ mail_capplet_shell_construct (MailCappletShell *shell, gint socket_id, gboolean mc = mail_view_add_page ((MailView *)shell->view, MAIL_VIEW_ACCOUNT, NULL); g_signal_connect (mc, "view-close", G_CALLBACK(ms_show_post_druid), shell); setup_abooks (); - if (!g_file_test(pdir, G_FILE_TEST_EXISTS)) { + if (!g_file_test (pdir, G_FILE_TEST_EXISTS)) { g_mkdir (pdir, 0700); } g_free (pdir); @@ -286,7 +286,7 @@ mail_capplet_shell_new (gint socket_id, gboolean just_druid, gboolean main_loop) #define PERSONAL_RELATIVE_URI "system" static void -setup_abooks() +setup_abooks () { gchar *base_dir, *uri; GSList *groups; @@ -298,7 +298,7 @@ setup_abooks() base_dir = g_build_filename (e_get_user_data_dir (), "addressbook", "local", NULL); uri = g_filename_to_uri (base_dir, NULL, NULL); - if (!e_book_get_addressbooks(&list, NULL)) { + if (!e_book_get_addressbooks (&list, NULL)) { g_warning ("Unable to get books\n"); return; } diff --git a/capplet/settings/mail-decoration.c b/capplet/settings/mail-decoration.c index d208981a65..02ccf2f7d9 100644 --- a/capplet/settings/mail-decoration.c +++ b/capplet/settings/mail-decoration.c @@ -49,11 +49,11 @@ struct _MailDecorationPrivate static GObjectClass *parent_class = NULL; -static void mail_decoration_class_init(MailDecorationClass *klass); -static void mail_decoration_init(MailDecoration *facet); +static void mail_decoration_class_init (MailDecorationClass *klass); +static void mail_decoration_init (MailDecoration *facet); GType -mail_decoration_get_type(void) +mail_decoration_get_type (void) { static GType type = 0; @@ -154,7 +154,7 @@ update_cursor (MailDecoration *md, double x, double y, gboolean update) if (update) md->priv->resizing = TRUE; - if (in_top(md, y) && in_left (md, x)) { + if (in_top (md, y) && in_left (md, x)) { md->priv->last_edge = GDK_WINDOW_EDGE_NORTH_WEST; set_cursor (md, GDK_WINDOW_EDGE_NORTH_WEST); } else if (in_top (md, y) && in_right (md, x)) { @@ -241,7 +241,7 @@ md_size_allocate_event (GtkWidget *widget, GtkAllocation *allocation, gpointer u md->priv->window_width = width; gconf_client_set_int (client, "/apps/anjal/window_width", width, NULL); gconf_client_set_int (client, "/apps/anjal/window_height", height, NULL); - g_object_unref(client); + g_object_unref (client); } } @@ -293,9 +293,9 @@ md_button_release_event (GtkWidget *widget, GdkEventButton *event, gpointer user return FALSE; } -MailDecoration* mail_decoration_new(GtkWindow *window) +MailDecoration* mail_decoration_new (GtkWindow *window) { - MailDecoration *md = g_object_new(mail_decoration_get_type(), NULL); + MailDecoration *md = g_object_new (mail_decoration_get_type (), NULL); GConfClient *client = gconf_client_get_default (); gint width, height; @@ -327,17 +327,17 @@ MailDecoration* mail_decoration_new(GtkWindow *window) } static void -mail_decoration_class_init(MailDecorationClass *klass) +mail_decoration_class_init (MailDecorationClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); parent_class = g_type_class_peek_parent (klass); - g_type_class_add_private (object_class, sizeof(MailDecorationPrivate)); + g_type_class_add_private (object_class, sizeof (MailDecorationPrivate)); } static void -mail_decoration_init(MailDecoration *md) +mail_decoration_init (MailDecoration *md) { MailDecorationPrivate *priv; diff --git a/capplet/settings/mail-guess-servers.c b/capplet/settings/mail-guess-servers.c index 69e0d8dfa6..66200cc5aa 100644 --- a/capplet/settings/mail-guess-servers.c +++ b/capplet/settings/mail-guess-servers.c @@ -60,7 +60,7 @@ xml_to_gchar (xmlChar *xml, EmailProvider *provider) tmp = xml ? strstr((gchar *) xml, "\%EMAIL") : NULL; if (!tmp) { - gxml = xml ? g_strdup((gchar *) xml) : NULL; + gxml = xml ? g_strdup ((gchar *) xml) : NULL; } else { decodepart: *tmp = 0; @@ -83,7 +83,7 @@ xml_to_gchar (xmlChar *xml, EmailProvider *provider) } } - xmlFree(xml); + xmlFree (xml); return gxml; } @@ -124,15 +124,15 @@ handle_incoming (xmlNodePtr head, EmailProvider *provider) while (node) { if (strcmp ((gchar *)node->name, "hostname") == 0) { - provider->recv_hostname = xml_to_gchar(xmlNodeGetContent(node), provider); + provider->recv_hostname = xml_to_gchar (xmlNodeGetContent (node), provider); } else if (strcmp ((gchar *)node->name, "port") == 0) { - provider->recv_port = xml_to_gchar(xmlNodeGetContent(node), provider); + provider->recv_port = xml_to_gchar (xmlNodeGetContent (node), provider); } else if (strcmp ((gchar *)node->name, "socketType") == 0) { - provider->recv_socket_type = xml_to_gchar(xmlNodeGetContent(node), provider); + provider->recv_socket_type = xml_to_gchar (xmlNodeGetContent (node), provider); } else if (strcmp ((gchar *)node->name, "username") == 0) { - provider->recv_username = xml_to_gchar(xmlNodeGetContent(node), provider); + provider->recv_username = xml_to_gchar (xmlNodeGetContent (node), provider); } else if (strcmp ((gchar *)node->name, "authentication") == 0) { - provider->recv_auth = xml_to_gchar(xmlNodeGetContent(node), provider); + provider->recv_auth = xml_to_gchar (xmlNodeGetContent (node), provider); } node = node->next; @@ -148,15 +148,15 @@ handle_outgoing (xmlNodePtr head, EmailProvider *provider) while (node) { if (strcmp ((gchar *)node->name, "hostname") == 0) { - provider->send_hostname = xml_to_gchar(xmlNodeGetContent(node), provider); + provider->send_hostname = xml_to_gchar (xmlNodeGetContent (node), provider); } else if (strcmp ((gchar *)node->name, "port") == 0) { - provider->send_port = xml_to_gchar(xmlNodeGetContent(node), provider); + provider->send_port = xml_to_gchar (xmlNodeGetContent (node), provider); } else if (strcmp ((gchar *)node->name, "socketType") == 0) { - provider->send_socket_type = xml_to_gchar(xmlNodeGetContent(node), provider); + provider->send_socket_type = xml_to_gchar (xmlNodeGetContent (node), provider); } else if (strcmp ((gchar *)node->name, "username") == 0) { - provider->send_username = xml_to_gchar(xmlNodeGetContent(node), provider); + provider->send_username = xml_to_gchar (xmlNodeGetContent (node), provider); } else if (strcmp ((gchar *)node->name, "authentication") == 0) { - provider->send_auth = xml_to_gchar(xmlNodeGetContent(node), provider); + provider->send_auth = xml_to_gchar (xmlNodeGetContent (node), provider); } node = node->next; @@ -211,7 +211,7 @@ parse_message (const gchar *msg, gint length, EmailProvider *provider) node = node->next; } - xmlFreeDoc(doc); + xmlFreeDoc (doc); return TRUE; } @@ -272,8 +272,8 @@ guess_when_online (EmailProvider *provider) g_object_unref (proxy); g_object_unref (msg); - g_object_unref(session); - g_free(url); + g_object_unref (session); + g_free (url); return TRUE; @@ -312,7 +312,7 @@ out: } gboolean -mail_guess_servers(EmailProvider *provider) +mail_guess_servers (EmailProvider *provider) { if (is_online () && guess_when_online (provider)) return TRUE; @@ -328,7 +328,7 @@ main (gint argc, gchar **argv) g_thread_init (NULL); g_type_init (); - provider = g_new0(EmailProvider, 1); + provider = g_new0 (EmailProvider, 1); provider->email = "sragavan@iijmio-mail.jp"; provider->domain = "iijmio-mail.jp"; diff --git a/capplet/settings/mail-settings-view.c b/capplet/settings/mail-settings-view.c index dc786b3349..2c3d56d0e1 100644 --- a/capplet/settings/mail-settings-view.c +++ b/capplet/settings/mail-settings-view.c @@ -55,7 +55,7 @@ static void msv_regen_view (MailSettingsView *acview); static void mail_settings_view_init (MailSettingsView *shell) { - shell->priv = g_new0(MailSettingsViewPrivate, 1); + shell->priv = g_new0 (MailSettingsViewPrivate, 1); } @@ -95,7 +95,7 @@ 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"); @@ -103,7 +103,7 @@ 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 (); @@ -138,21 +138,21 @@ build_account_button (MailSettingsView *acview, EAccount *account) if (FALSE) { tlabel = (GtkWidget *)gtk_image_new_from_stock (account ? "gtk-edit" : "gtk-new", GTK_ICON_SIZE_BUTTON); - gtk_widget_show(tlabel); - gtk_box_pack_start((GtkBox *)tbox, tlabel, FALSE, FALSE, 6); + gtk_widget_show (tlabel); + gtk_box_pack_start ((GtkBox *)tbox, tlabel, FALSE, FALSE, 6); } if (account) tmp = g_strdup_printf (_("Modify %s..."), e_account_get_string(account, E_ACCOUNT_ID_ADDRESS)); else tmp = _("Add a new account"); - tlabel = gtk_label_new(tmp); + tlabel = gtk_label_new (tmp); if (account) - g_free(tmp); - gtk_widget_show(tlabel); - gtk_box_pack_start((GtkBox *)tbox, tlabel, FALSE, FALSE, 0); - gtk_widget_show(tbox); - gtk_container_add((GtkContainer *)label, tbox); + g_free (tmp); + gtk_widget_show (tlabel); + gtk_box_pack_start ((GtkBox *)tbox, tlabel, FALSE, FALSE, 0); + 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); gtk_box_pack_start ((GtkBox *)box1, label, FALSE, FALSE, 0); @@ -160,13 +160,13 @@ build_account_button (MailSettingsView *acview, EAccount *account) if (account) { tlabel = gtk_button_new_from_stock ("gtk-delete"); - gtk_box_pack_start((GtkBox *)box1, tlabel, FALSE, FALSE, 12); - gtk_widget_show(tlabel); + gtk_box_pack_start ((GtkBox *)box1, tlabel, FALSE, FALSE, 12); + gtk_widget_show (tlabel); g_object_set_data ((GObject *)tlabel, "account", account); g_signal_connect (tlabel, "clicked", G_CALLBACK(msv_delete_account), acview); } - PACK_BOX(box1,24); + PACK_BOX (box1,24); } static void @@ -178,13 +178,13 @@ msv_regen_view (MailSettingsView *acview) GtkWidget *box, *label; gchar *buff; - gtk_container_foreach((GtkContainer *)acview->priv->box, (GtkCallback)gtk_widget_destroy, NULL); + gtk_container_foreach ((GtkContainer *)acview->priv->box, (GtkCallback)gtk_widget_destroy, NULL); label = gtk_label_new (NULL); buff = g_markup_printf_escaped ("<span size=\"large\" weight=\"bold\">%s</span>", _("Account management")); gtk_label_set_markup ((GtkLabel *)label, buff); g_free (buff); - PACK_BOX(label,12); + PACK_BOX (label,12); node = e_list_get_iterator ((EList *) accounts); while (e_iterator_is_valid (node)) { @@ -210,7 +210,7 @@ mail_settings_view_construct (MailSettingsView *acview) acview->priv->accounts = e_get_account_list (); g_signal_connect (acview->priv->accounts, "account-added", G_CALLBACK(msv_account_added), acview); msv_regen_view (acview); - gtk_widget_show((GtkWidget *)acview); + gtk_widget_show ((GtkWidget *)acview); } @@ -235,8 +235,8 @@ msv_btn_expose (GtkWidget *w, GdkEventExpose *event, MailSettingsView *mfv) cr = gdk_cairo_create (gtk_widget_get_window (w)); cairo_save (cr); gdk_cairo_set_source_pixbuf (cr, img, event->area.x-5, event->area.y-4); - cairo_paint(cr); - cairo_restore(cr); + cairo_paint (cr); + cairo_restore (cr); cairo_destroy (cr); return TRUE; @@ -249,7 +249,7 @@ msv_close (GtkButton *w, MailSettingsView *mfv) } GtkWidget * -mail_settings_view_get_tab_widget(MailSettingsView *mcv) +mail_settings_view_get_tab_widget (MailSettingsView *mcv) { GdkPixbuf *pbuf = gtk_widget_render_icon ((GtkWidget *)mcv, "gtk-close", GTK_ICON_SIZE_MENU, NULL); @@ -262,7 +262,7 @@ mail_settings_view_get_tab_widget(MailSettingsView *mcv) g_signal_connect (img, "expose-event", G_CALLBACK(msv_btn_expose), mcv); tool = gtk_button_new (); - gtk_button_set_relief((GtkButton *)tool, GTK_RELIEF_NONE); + gtk_button_set_relief ((GtkButton *)tool, GTK_RELIEF_NONE); gtk_button_set_focus_on_click ((GtkButton *)tool, FALSE); gtk_widget_set_tooltip_text (tool, _("Close Tab")); g_signal_connect (tool, "clicked", G_CALLBACK(msv_close), mcv); @@ -271,7 +271,7 @@ mail_settings_view_get_tab_widget(MailSettingsView *mcv) gtk_box_pack_start ((GtkBox *)box, img, FALSE, FALSE, 0); 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_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); box = gtk_label_new (_("Settings")); @@ -291,7 +291,7 @@ mail_settings_view_activate (MailSettingsView *mcv, GtkWidget *tree, GtkWidget * { if (!check_mail || !sort_by) return; - //if (!GTK_WIDGET_VISIBLE(folder_tree)) + //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-settings-view.h b/capplet/settings/mail-settings-view.h index 136e4414a2..299d25b5e7 100644 --- a/capplet/settings/mail-settings-view.h +++ b/capplet/settings/mail-settings-view.h @@ -54,6 +54,6 @@ typedef struct _MailSettingsViewClass { GType mail_settings_view_get_type (void); MailSettingsView *mail_settings_view_new (void); -GtkWidget * mail_settings_view_get_tab_widget(MailSettingsView *mcv); +GtkWidget * 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); #endif diff --git a/capplet/settings/mail-view.c b/capplet/settings/mail-view.c index 54a5647e0c..a294a8e5c0 100644 --- a/capplet/settings/mail-view.c +++ b/capplet/settings/mail-view.c @@ -73,7 +73,7 @@ void anjal_shell_view_restore_state (EShellView *view, const gchar *uri); static void mail_view_init (MailView *shell) { - shell->priv = g_new0(MailViewPrivate, 1); + shell->priv = g_new0 (MailViewPrivate, 1); shell->priv->children = NULL; shell->priv->current_view = NULL; shell->folder_tree = NULL; @@ -151,7 +151,7 @@ mv_switch (GtkNotebook *notebook, GtkWidget *page, guint page_num, gpointer user child = (MailViewChild *)gtk_notebook_get_nth_page (notebook, current_child); priv->current_view = child; - REALIGN_NODES(shell->priv->children,child); + REALIGN_NODES (shell->priv->children,child); #ifndef ANJAL_SETTINGS if (child->type == MAIL_VIEW_COMPOSER) @@ -198,7 +198,7 @@ mv_get_page_number (GtkNotebook *note, GtkWidget *widget) total = gtk_notebook_get_n_pages (note); for (i=0; i<total; i++) { - if (gtk_notebook_get_nth_page(note, i) == widget) + if (gtk_notebook_get_nth_page (note, i) == widget) return i; } @@ -213,7 +213,7 @@ mv_close_mcv (MailViewChild *mfv, MailView *mv) MailViewChild *child; gboolean removing_viewed = FALSE; - if (g_list_length(mv->priv->children) == 1) + if (g_list_length (mv->priv->children) == 1) return; #ifndef ANJAL_SETTINGS @@ -235,14 +235,14 @@ mv_close_mcv (MailViewChild *mfv, MailView *mv) } if (mfv->type == MAIL_VIEW_COMPOSER) { - if (!mail_composer_view_can_quit((MailComposerView *)mfv)) + if (!mail_composer_view_can_quit ((MailComposerView *)mfv)) return; } #endif - g_signal_handlers_block_by_func(mv, mv_switch, mv); + g_signal_handlers_block_by_func (mv, mv_switch, mv); gtk_notebook_remove_page ((GtkNotebook *)mv, n); - g_signal_handlers_unblock_by_func(mv, mv_switch, mv); + g_signal_handlers_unblock_by_func (mv, mv_switch, mv); if (mfv == mv->priv->children->data) removing_viewed = TRUE; @@ -281,11 +281,11 @@ mv_close_mcv (MailViewChild *mfv, MailView *mv) static void mv_message_new (MailFolderView *mfv, gpointer data, gchar *umid, MailView *mv) { - MailConvView *conv = (MailConvView *)mv_switch_message_view(mv, umid); + MailConvView *conv = (MailConvView *)mv_switch_message_view (mv, umid); *(MailConvView **)data = conv; if (conv) - conv->uri = g_strdup(umid); + conv->uri = g_strdup (umid); return; } @@ -299,7 +299,7 @@ mv_search_set (MailFolderView *mfv, MailView *mv) static void mv_folder_loaded (MailFolderView *mfv, MailView *mv) { - g_signal_handlers_block_by_func(mfv, mv_folder_loaded, mv); + g_signal_handlers_block_by_func (mfv, mv_folder_loaded, mv); g_signal_emit (mv, signals[VIEW_NEW], 0); } @@ -311,7 +311,7 @@ mail_view_add_folder (MailView *mv, gpointer data, gboolean block) mail_folder_view_set_folder_pane (mfv, mv->folder_tree); if (!block) mv->priv->current_view = (MailViewChild *)mfv; - mv->priv->children = block ? g_list_append(mv->priv->children, mfv) : g_list_prepend (mv->priv->children, mfv); + mv->priv->children = block ? g_list_append (mv->priv->children, mfv) : g_list_prepend (mv->priv->children, mfv); position = gtk_notebook_append_page ((GtkNotebook *)mv, (GtkWidget *)mfv, mfv->tab_label); gtk_notebook_set_tab_reorderable (GTK_NOTEBOOK (mv), (GtkWidget *)mfv, TRUE); gtk_notebook_set_tab_detachable (GTK_NOTEBOOK (mv), (GtkWidget *)mfv, FALSE); @@ -345,7 +345,7 @@ mail_view_add_composer (MailView *mv, gpointer data, gboolean block) mcv = mail_composer_view_new_with_composer ((GtkWidget *)data); if (!block) mv->priv->current_view = (MailViewChild *)mcv; - mv->priv->children = block ? g_list_append(mv->priv->children, mcv) : g_list_prepend (mv->priv->children, mcv); + mv->priv->children = block ? g_list_append (mv->priv->children, mcv) : g_list_prepend (mv->priv->children, mcv); if (!special) position = gtk_notebook_append_page ((GtkNotebook *)mv, (GtkWidget *)mcv, mcv->tab_label); @@ -377,10 +377,10 @@ mail_view_add_message (MailView *mv, gpointer data, gboolean block) mcv->type = MAIL_VIEW_MESSAGE; if (!block) mv->priv->current_view = (MailViewChild *)mcv; - mv->priv->children = block ? g_list_append(mv->priv->children, mcv) : g_list_prepend (mv->priv->children, mcv); + 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) @@ -399,7 +399,7 @@ mail_view_add_message (MailView *mv, gpointer data, gboolean block) static void mv_show_acc_mcv (MailViewChild *mfv, EAccount *account, MailView *mv) { - mail_view_add_page(mv, MAIL_VIEW_ACCOUNT, account); + mail_view_add_page (mv, MAIL_VIEW_ACCOUNT, account); } static MailViewChild * @@ -411,9 +411,9 @@ mail_view_add_settings (MailView *mv, gpointer data, gboolean block) gtk_widget_show ((GtkWidget *)msv); if (!block) mv->priv->current_view = (MailViewChild *)msv; - mv->priv->children = block ? g_list_append(mv->priv->children, msv) : g_list_prepend (mv->priv->children, msv); + mv->priv->children = block ? g_list_append (mv->priv->children, msv) : g_list_prepend (mv->priv->children, msv); - position = gtk_notebook_append_page ((GtkNotebook *)mv, (GtkWidget *)msv, mail_settings_view_get_tab_widget(msv)); + position = gtk_notebook_append_page ((GtkNotebook *)mv, (GtkWidget *)msv, mail_settings_view_get_tab_widget (msv)); g_signal_connect (msv, "view-close", G_CALLBACK(mv_close_mcv), mv); g_signal_connect (msv, "show-account", G_CALLBACK(mv_show_acc_mcv), mv); gtk_notebook_set_tab_reorderable (GTK_NOTEBOOK (mv), (GtkWidget *)msv, TRUE); @@ -431,8 +431,8 @@ mail_view_switch_to_settings (MailView* mv, MailViewChild *mpv) { gint position = 0; - position = mv_get_page_number((GtkNotebook *)mv, (GtkWidget *)mpv); - REALIGN_NODES(mv->priv->children,mpv); + position = mv_get_page_number ((GtkNotebook *)mv, (GtkWidget *)mpv); + REALIGN_NODES (mv->priv->children,mpv); gtk_notebook_set_current_page ((GtkNotebook *)mv, position); mail_settings_view_activate ((MailSettingsView *)mpv, mv->tree, mv->folder_tree, mv->check_mail, mv->sort_by, mv->slider, FALSE); } @@ -446,8 +446,8 @@ mail_view_add_account (MailView *mv, gpointer data, gboolean block) gtk_widget_show ((GtkWidget *)msv); if (!block) mv->priv->current_view = (MailViewChild *)msv; - mv->priv->children = block ? g_list_append(mv->priv->children, msv) : g_list_prepend (mv->priv->children, msv); - position = gtk_notebook_append_page ((GtkNotebook *)mv, (GtkWidget *)msv, mail_account_view_get_tab_widget(msv)); + mv->priv->children = block ? g_list_append (mv->priv->children, msv) : g_list_prepend (mv->priv->children, msv); + position = gtk_notebook_append_page ((GtkNotebook *)mv, (GtkWidget *)msv, mail_account_view_get_tab_widget (msv)); g_signal_connect_after (msv, "view-close", G_CALLBACK(mv_close_mcv), mv); gtk_notebook_set_tab_reorderable (GTK_NOTEBOOK (mv), (GtkWidget *)msv, TRUE); gtk_notebook_set_tab_detachable (GTK_NOTEBOOK (mv), (GtkWidget *)msv, FALSE); @@ -469,7 +469,7 @@ mail_view_add_page (MailView *mv, guint16 type, gpointer data) if (current_child && (current_child->flags & MAIL_VIEW_HOLD_FOCUS)) block = TRUE; - g_signal_handlers_block_by_func(mv, mv_switch, mv); + g_signal_handlers_block_by_func (mv, mv_switch, mv); switch (type) { #ifndef ANJAL_SETTINGS case MAIL_VIEW_FOLDER: @@ -490,9 +490,9 @@ mail_view_add_page (MailView *mv, guint16 type, gpointer data) child = mail_view_add_account (mv, data, block); break; } - gtk_widget_grab_focus((GtkWidget *)child); + gtk_widget_grab_focus ((GtkWidget *)child); child->type = type; - g_signal_handlers_unblock_by_func(mv, mv_switch, mv); + g_signal_handlers_unblock_by_func (mv, mv_switch, mv); child->flags = 0; @@ -503,7 +503,7 @@ mail_view_add_page (MailView *mv, guint16 type, gpointer data) static void 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) { MailViewChild *child = (MailViewChild *)gtk_notebook_get_nth_page ((GtkNotebook *)mv, i); @@ -532,7 +532,7 @@ mv_switch_message_view (MailView *mv, const gchar *uri) if (child->type == MAIL_VIEW_MESSAGE && !strcmp (uri, child->uri)) { gtk_notebook_set_current_page ((GtkNotebook *)mv, i); mail_conv_view_activate ((MailConvView *)child, mv->tree, mv->folder_tree, mv->check_mail, mv->sort_by, FALSE); - REALIGN_NODES(mv->priv->children,child); + REALIGN_NODES (mv->priv->children,child); return NULL; } i++; @@ -630,7 +630,7 @@ mv_spinner_done (CamelFolder *f, gpointer data) } void -mail_view_check_mail(MailView *mv, gboolean deep) +mail_view_check_mail (MailView *mv, gboolean deep) { MailViewChild *child = (MailViewChild *)mv->priv->current_view; @@ -640,7 +640,7 @@ mail_view_check_mail(MailView *mv, gboolean deep) if ((folder = em_folder_tree_get_selected_folder ((EMFolderTree *)mv->tree)) != NULL) { mv_spinner_show (mv, TRUE); - mail_refresh_folder(folder, mv_spinner_done, mv); + mail_refresh_folder (folder, mv_spinner_done, mv); } } diff --git a/capplet/settings/mail-view.h b/capplet/settings/mail-view.h index b76a425bbe..a2a8df68c6 100644 --- a/capplet/settings/mail-view.h +++ b/capplet/settings/mail-view.h @@ -82,7 +82,7 @@ void mail_view_show_list (MailView *mv); void mail_view_close_view (MailView *mv); void mail_view_set_check_email (MailView *mv, GtkWidget *button); void mail_view_set_sort_by (MailView *mv, GtkWidget *button); -void mail_view_check_mail(MailView *mv, gboolean deep); +void mail_view_check_mail (MailView *mv, gboolean deep); void mail_view_set_folder_tree_widget (MailView *mv, GtkWidget *tree); void mail_view_set_folder_tree (MailView *mv, GtkWidget *tree); void mail_view_save (MailView *mv); |