aboutsummaryrefslogtreecommitdiffstats
path: root/capplet
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-05-25 22:15:32 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-05-25 22:15:32 +0800
commit96538878911586a9e9ca26b81e1916c04e538980 (patch)
treeffcfe184bab289d6917a65d850bc4ba310be0447 /capplet
parent3e1b34841d3a699f77848f5de019f18ccb2d1ca1 (diff)
downloadgsoc2013-evolution-96538878911586a9e9ca26b81e1916c04e538980.tar.gz
gsoc2013-evolution-96538878911586a9e9ca26b81e1916c04e538980.tar.zst
gsoc2013-evolution-96538878911586a9e9ca26b81e1916c04e538980.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'capplet')
-rw-r--r--capplet/settings/anjal-mail-view.c2
-rw-r--r--capplet/settings/mail-account-view.c86
-rw-r--r--capplet/settings/mail-guess-servers.c4
3 files changed, 45 insertions, 47 deletions
diff --git a/capplet/settings/anjal-mail-view.c b/capplet/settings/anjal-mail-view.c
index 99ff93a065..9f96bcd6ef 100644
--- a/capplet/settings/anjal-mail-view.c
+++ b/capplet/settings/anjal-mail-view.c
@@ -56,7 +56,7 @@ anjal_mail_view_finalize (GObject *object)
G_OBJECT_CLASS (anjal_mail_view_parent_class)->finalize (object);
}
-static void
+static void
view_set_folder_uri (AnjalMailView *mail_view, const gchar *uri)
{
}
diff --git a/capplet/settings/mail-account-view.c b/capplet/settings/mail-account-view.c
index a6751b9a1b..cd47ae5223 100644
--- a/capplet/settings/mail-account-view.c
+++ b/capplet/settings/mail-account-view.c
@@ -48,7 +48,7 @@ struct _MailAccountViewPrivate {
gboolean do_gcontacts;
gboolean do_calendar;
- char *username;
+ gchar *username;
GtkWidget *yahoo_cal_entry;
};
@@ -246,10 +246,10 @@ setup_yahoo_account (MailAccountView *mav)
ESourceList *slist;
ESourceGroup *sgrp;
ESource *calendar;
- char *sanitize_uname, *abs_uri, *rel_uri;
+ gchar *sanitize_uname, *abs_uri, *rel_uri;
GSList *ids, *temp;
- const char *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://");
if (!sgrp) {
@@ -259,20 +259,20 @@ setup_yahoo_account (MailAccountView *mav)
printf("Setting up Yahoo Calendar: list:%p CalDAVGrp: %p\n", slist, sgrp);
/* FIXME: Not sure if we should localize 'Calendar' */
- calendar = e_source_new ("Yahoo", "");
+ calendar = e_source_new ("Yahoo", "");
e_source_set_property (calendar, "ssl", "1");
e_source_set_property (calendar, "refresh", "30");
- e_source_set_property (calendar, "refresh-type", "0");
+ e_source_set_property (calendar, "refresh-type", "0");
e_source_set_property (calendar, "auth", "1");
e_source_set_property (calendar, "offline_sync", "1");
e_source_set_property (calendar, "username", email);
e_source_set_property (calendar, "default", "true");
e_source_set_property (calendar, "alarm", "true");
-
+
e_source_set_readonly (calendar, FALSE);
-
+
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_remember_password ("Calendar", abs_uri);
@@ -290,7 +290,7 @@ setup_yahoo_account (MailAccountView *mav)
for (; temp != NULL; temp = g_slist_next (temp))
g_free (temp->data);
- g_slist_free (ids);
+ g_slist_free (ids);
g_free(abs_uri);
g_free(rel_uri);
@@ -305,14 +305,14 @@ setup_yahoo_account (MailAccountView *mav)
ESourceList *slist;
ESourceGroup *sgrp;
ESource *abook;
- char *rel_uri;;
+ gchar *rel_uri;;
slist = e_source_list_new_for_gconf (gconf, "/apps/evolution/addressbook/sources" );
-
+
sgrp = e_source_list_peek_group_by_base_uri (slist, "google://");
-
+
/* FIXME: Not sure if we should localize 'Contacts' */
- abook = e_source_new ("Contacts", "");
+ abook = e_source_new ("Contacts", "");
e_source_set_property (abook, "default", "true");
e_source_set_property (abook, "offline_sync", "1");
e_source_set_property (abook, "auth", "plain/password");
@@ -322,7 +322,7 @@ setup_yahoo_account (MailAccountView *mav)
e_source_set_property (abook, "completion", "true");
e_source_set_property (abook, "username", mav->priv->username);
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_remember_password ("Addressbook", rel_uri);
@@ -334,7 +334,6 @@ setup_yahoo_account (MailAccountView *mav)
g_object_unref(sgrp);
g_object_unref(abook);
-
}
g_object_unref (gconf);
@@ -352,9 +351,9 @@ setup_google_accounts (MailAccountView *mav)
ESourceList *slist;
ESourceGroup *sgrp;
ESource *calendar;
- char *sanitize_uname, *abs_uri, *rel_uri;
+ gchar *sanitize_uname, *abs_uri, *rel_uri;
GSList *ids, *temp;
-
+
slist = e_source_list_new_for_gconf (gconf, "/apps/evolution/calendar/sources");
sgrp = e_source_list_peek_group_by_base_uri (slist, "google://");
if (!sgrp) {
@@ -364,13 +363,13 @@ setup_google_accounts (MailAccountView *mav)
printf("Setting up Google Calendar: list:%p GoogleGrp: %p\n", slist, sgrp);
/* FIXME: Not sure if we should localize 'Calendar' */
- calendar = e_source_new ("Calendar", "");
+ calendar = e_source_new ("Calendar", "");
e_source_set_property (calendar, "ssl", "1");
e_source_set_property (calendar, "refresh", "30");
e_source_set_property (calendar, "auth", "1");
e_source_set_property (calendar, "offline_sync", "1");
e_source_set_property (calendar, "username", mav->priv->username);
- e_source_set_property (calendar, "setup-username", mav->priv->username);
+ e_source_set_property (calendar, "setup-username", mav->priv->username);
e_source_set_property (calendar, "default", "true");
e_source_set_readonly (calendar, FALSE);
@@ -378,7 +377,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_remember_password ("Calendar", abs_uri);
rel_uri = g_strconcat ("https", GMAIL_CALENDAR_LOCATION, sanitize_uname, CALENDAR_DEFAULT_PATH, NULL);
@@ -394,7 +393,7 @@ setup_google_accounts (MailAccountView *mav)
for (; temp != NULL; temp = g_slist_next (temp))
g_free (temp->data);
- g_slist_free (ids);
+ g_slist_free (ids);
g_free(abs_uri);
g_free(rel_uri);
@@ -409,14 +408,14 @@ setup_google_accounts (MailAccountView *mav)
ESourceList *slist;
ESourceGroup *sgrp;
ESource *abook;
- char *rel_uri;;
+ gchar *rel_uri;;
slist = e_source_list_new_for_gconf (gconf, "/apps/evolution/addressbook/sources" );
-
+
sgrp = e_source_list_peek_group_by_base_uri (slist, "google://");
-
+
/* FIXME: Not sure if we should localize 'Contacts' */
- abook = e_source_new ("Contacts", "");
+ abook = e_source_new ("Contacts", "");
e_source_set_property (abook, "default", "true");
e_source_set_property (abook, "offline_sync", "1");
e_source_set_property (abook, "auth", "plain/password");
@@ -426,7 +425,7 @@ setup_google_accounts (MailAccountView *mav)
e_source_set_property (abook, "completion", "true");
e_source_set_property (abook, "username", mav->priv->username);
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_remember_password ("Addressbook", rel_uri);
@@ -438,7 +437,6 @@ setup_google_accounts (MailAccountView *mav)
g_object_unref(sgrp);
g_object_unref(abook);
-
}
g_object_unref (gconf);
@@ -657,7 +655,7 @@ mav_next_pressed (GtkButton *button, MailAccountView *mav)
if (!mav->original) {
EAccount *account = em_account_editor_get_modified_account(mav->edit);
CamelURL *aurl;
- char *surl;
+ 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);
@@ -667,7 +665,7 @@ mav_next_pressed (GtkButton *button, MailAccountView *mav)
g_free(surl);
}
- if (mav->priv->is_gmail && !mav->original)
+ if (mav->priv->is_gmail && !mav->original)
setup_google_accounts (mav);
else if (mav->priv->is_yahoo && !mav->original)
setup_yahoo_account (mav);
@@ -688,7 +686,7 @@ mav_next_pressed (GtkButton *button, MailAccountView *mav)
MAVPage *page = mav->pages[mav->current_page];
GtkWidget *tmp;
EAccount *account = em_account_editor_get_modified_account(mav->edit);
-
+
if (page->main)
gtk_widget_destroy (page->main);
@@ -698,7 +696,7 @@ mav_next_pressed (GtkButton *button, MailAccountView *mav)
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);
gtk_widget_destroy (mav->priv->calendar);
@@ -717,19 +715,19 @@ mav_next_pressed (GtkButton *button, MailAccountView *mav)
mav->priv->gcontacts = gtk_check_button_new_with_label (_("Setup Google contacts with Evolution"));
mav->priv->calendar = gtk_check_button_new_with_label (_("Setup Google calendar with Evolution"));
-
+
gtk_toggle_button_set_active ((GtkToggleButton *)mav->priv->gcontacts, TRUE);
gtk_toggle_button_set_active ((GtkToggleButton *)mav->priv->calendar, TRUE);
mav->priv->gmail_info_label = gtk_label_new (_("You may need to enable IMAP access."));
gtk_label_set_selectable ((GtkLabel *)mav->priv->gmail_info_label, TRUE);
-
+
gtk_widget_show (mav->priv->gcontacts);
gtk_widget_show (mav->priv->calendar);
gtk_widget_show (mav->priv->gmail_info_label);
-
+
tmp = gtk_label_new (NULL);
- gtk_label_set_markup ((GtkLabel *)tmp, _("<span size=\"large\" weight=\"bold\">Google account settings:</span>"));
+ gtk_label_set_markup ((GtkLabel *)tmp, _("<span size=\"large\" weight=\"bold\">Google account settings:</span>"));
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); }
@@ -742,29 +740,29 @@ mav_next_pressed (GtkButton *button, MailAccountView *mav)
PACK_IN_BOX(page->box,mav->priv->gmail_info_label,gtk_link_button_new("https://mail.google.com/mail/?ui=2&amp;shva=1#settings/fwdandpop"), 24, 0);
#undef PACK_IN_BOX
- } else if (mav->original == NULL &&
+ } else if (mav->original == NULL &&
(g_strrstr(account->source->url, "yahoo.") ||
g_strrstr(account->source->url, "ymail.") ||
g_strrstr(account->source->url, "rocketmail."))) {
/* Yahoo accounts*/
GtkWidget *tmp;
- char *cal_name;
+ gchar *cal_name;
GtkWidget *tmpbox;
mav->priv->is_yahoo = TRUE;
printf("Google account: %s\n", account->source->url);
mav->priv->calendar = gtk_check_button_new_with_label (_("Setup Yahoo calendar with Evolution"));
-
+
gtk_toggle_button_set_active ((GtkToggleButton *)mav->priv->calendar, TRUE);
mav->priv->gmail_info_label = gtk_label_new (_("Yahoo calendars are named as firstname_lastname. We have tried to form the calendar name. So please confirm and re-enter the calendar name if it is not correct."));
gtk_label_set_selectable ((GtkLabel *)mav->priv->gmail_info_label, TRUE);
-
+
gtk_widget_show (mav->priv->calendar);
gtk_widget_show (mav->priv->gmail_info_label);
-
+
tmp = gtk_label_new (NULL);
- gtk_label_set_markup ((GtkLabel *)tmp, _("<span size=\"large\" weight=\"bold\">Yahoo account settings:</span>"));
+ gtk_label_set_markup ((GtkLabel *)tmp, _("<span size=\"large\" weight=\"bold\">Yahoo account settings:</span>"));
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); }
@@ -1013,7 +1011,7 @@ mail_account_view_construct (MailAccountView *view)
shell = e_shell_get_default ();
if (!shell || e_shell_get_express_mode (shell)) {
- GtkWidget *table = em_account_editor_get_widget (view->edit, "identity_required_table");
+ GtkWidget *table = em_account_editor_get_widget (view->edit, "identity_required_table");
GtkWidget *label, *pwd;
gtk_widget_hide (em_account_editor_get_widget (view->edit, "identity_optional_frame"));
@@ -1027,7 +1025,7 @@ mail_account_view_construct (MailAccountView *view)
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);
-
+
view->password = pwd;
}
}
diff --git a/capplet/settings/mail-guess-servers.c b/capplet/settings/mail-guess-servers.c
index f94fbb90e6..0a5f07d75b 100644
--- a/capplet/settings/mail-guess-servers.c
+++ b/capplet/settings/mail-guess-servers.c
@@ -131,7 +131,7 @@ handle_incoming (xmlNodePtr head, EmailProvider *provider)
} else if (strcmp ((gchar *)node->name, "username") == 0) {
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;
@@ -155,7 +155,7 @@ handle_outgoing (xmlNodePtr head, EmailProvider *provider)
} else if (strcmp ((gchar *)node->name, "username") == 0) {
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;