From 9e4fcb29cf7f05c18f7fd34e318f9e795fa32e91 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 14 Nov 2007 22:04:21 +0000 Subject: ** Remove trailing whitespace from source code. 2007-11-14 Matthew Barnes ** Remove trailing whitespace from source code. svn path=/trunk/; revision=34537 --- .../exchange-operations/exchange-account-setup.c | 122 ++++++++++----------- 1 file changed, 61 insertions(+), 61 deletions(-) (limited to 'plugins/exchange-operations/exchange-account-setup.c') diff --git a/plugins/exchange-operations/exchange-account-setup.c b/plugins/exchange-operations/exchange-account-setup.c index 24aa1935be..9707006f4b 100644 --- a/plugins/exchange-operations/exchange-account-setup.c +++ b/plugins/exchange-operations/exchange-account-setup.c @@ -56,7 +56,7 @@ GtkWidget *org_gnome_exchange_owa_url(EPlugin *epl, EConfigHookItemFactoryData * gboolean org_gnome_exchange_check_options(EPlugin *epl, EConfigHookPageCheckData *data); GtkWidget *org_gnome_exchange_auth_section (EPlugin *epl, EConfigHookItemFactoryData *data); void org_gnome_exchange_commit (EPlugin *epl, EConfigHookItemFactoryData *data); -GtkWidget* org_gnome_exchange_show_folder_size_factory (EPlugin *epl, EConfigHookItemFactoryData *data); +GtkWidget* org_gnome_exchange_show_folder_size_factory (EPlugin *epl, EConfigHookItemFactoryData *data); CamelServiceAuthType camel_exchange_ntlm_authtype = { /* i18n: "Secure Password Authentication" is an Outlookism */ @@ -103,13 +103,13 @@ update_state (GtkTextBuffer *buffer, gpointer data) } } -static void +static void toggled_state (GtkToggleButton *button, gpointer data) { gboolean current_oof_state = gtk_toggle_button_get_active (button); if (current_oof_state == oof_data->state) - return; + return; oof_data->state = current_oof_state; gtk_widget_set_sensitive (oof_data->text_view, current_oof_state); } @@ -123,7 +123,7 @@ btn_chpass_clicked (GtkButton *button, gpointer data) ExchangeAccountResult result; account = exchange_operations_get_exchange_account (); - + old_password = exchange_account_get_password (account); if (!old_password) { g_print ("Could not fetch old password\n"); @@ -138,9 +138,9 @@ btn_chpass_clicked (GtkButton *button, gpointer data) result = exchange_account_set_password (account, old_password, new_password); if (result != EXCHANGE_ACCOUNT_CONNECT_SUCCESS) exchange_operations_report_error (account, result); - + g_free (old_password); - g_free (new_password); + g_free (new_password); } #endif @@ -198,7 +198,7 @@ org_gnome_exchange_settings(EPlugin *epl, EConfigHookItemFactoryData *data) #endif GtkLabel *lbl_dass; GtkButton *btn_dass; - + /* Miscelleneous setting */ GtkFrame *frm_misc; GtkVBox *vbox_misc; @@ -235,14 +235,14 @@ org_gnome_exchange_settings(EPlugin *epl, EConfigHookItemFactoryData *data) oof_data->text_view = NULL; /* See if oof info found already */ - + if (account && !exchange_oof_get (account, &oof_state, &message)) { e_error_run (NULL, ERROR_DOMAIN ":state-read-error", NULL); return NULL; } - + if (message && *message) oof_data->message = g_strdup (message); else @@ -256,22 +256,22 @@ org_gnome_exchange_settings(EPlugin *epl, EConfigHookItemFactoryData *data) frm_oof = (GtkFrame*) gtk_object_new (GTK_TYPE_FRAME, "label", _("Out Of Office"), NULL); gtk_box_pack_start (GTK_BOX (vbox_settings), GTK_WIDGET (frm_oof), FALSE, FALSE, 0); - + vbox_oof = (GtkVBox*) gtk_object_new (GTK_TYPE_VBOX, NULL, "homogeneous", FALSE, "spacing", 12, NULL); gtk_container_set_border_width (GTK_CONTAINER (vbox_oof), 6); gtk_container_add (GTK_CONTAINER (frm_oof), GTK_WIDGET (vbox_oof)); - - lbl_oof_desc = (GtkLabel*) gtk_object_new (GTK_TYPE_LABEL, "label", _("The message specified below will be automatically sent to \neach person who sends mail to you while you are out of the office."), "justify", GTK_JUSTIFY_LEFT, NULL); + + lbl_oof_desc = (GtkLabel*) gtk_object_new (GTK_TYPE_LABEL, "label", _("The message specified below will be automatically sent to \neach person who sends mail to you while you are out of the office."), "justify", GTK_JUSTIFY_LEFT, NULL); gtk_misc_set_alignment (GTK_MISC (lbl_oof_desc), 0, 0.5); gtk_box_pack_start (GTK_BOX (vbox_oof), GTK_WIDGET (lbl_oof_desc), FALSE, FALSE, 0); - + tbl_oof_status = (GtkTable*) gtk_object_new (GTK_TYPE_TABLE, "n-rows", 2, "n-columns", 2, "homogeneous", FALSE, "row-spacing", 6, "column-spacing", 6, NULL); txt = g_strdup_printf ("%s", _("Status:")); lbl_status = (GtkLabel*) gtk_object_new (GTK_TYPE_LABEL, "label", txt, "use-markup", TRUE, NULL); g_free (txt); gtk_misc_set_alignment (GTK_MISC (lbl_status), 0, 0.5); gtk_misc_set_padding (GTK_MISC (lbl_status), 0, 0); - + if (oof_data->state) { radio_oof = (GtkRadioButton*) gtk_object_new (GTK_TYPE_RADIO_BUTTON, "label", _("I am out of the office"), NULL); radio_iof = (GtkRadioButton*) gtk_object_new (GTK_TYPE_RADIO_BUTTON, "label", _("I am in the office"), "group", radio_oof, NULL); @@ -281,15 +281,15 @@ org_gnome_exchange_settings(EPlugin *epl, EConfigHookItemFactoryData *data) radio_oof = (GtkRadioButton*) gtk_object_new (GTK_TYPE_RADIO_BUTTON, "label", _("I am out of the office"), "group", radio_iof, NULL); } g_signal_connect (radio_oof, "toggled", G_CALLBACK (toggled_state), NULL); - + gtk_table_attach (tbl_oof_status, GTK_WIDGET (lbl_status), 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0); gtk_table_attach (tbl_oof_status, GTK_WIDGET (radio_iof), 1, 2, 0, 1, GTK_FILL, GTK_FILL, 0, 0); gtk_table_attach (tbl_oof_status, GTK_WIDGET (radio_oof), 1, 2, 1, 2, GTK_FILL, GTK_FILL, 0, 0); gtk_box_pack_start (GTK_BOX (vbox_oof), GTK_WIDGET (tbl_oof_status), FALSE, FALSE, 0); - - + + scrwnd_oof = (GtkScrolledWindow*) gtk_object_new (GTK_TYPE_SCROLLED_WINDOW, "hscrollbar-policy", GTK_POLICY_AUTOMATIC, "vscrollbar-policy", GTK_POLICY_AUTOMATIC, "shadow-type", GTK_SHADOW_IN, NULL); gtk_box_pack_start (GTK_BOX (vbox_oof), GTK_WIDGET (scrwnd_oof), FALSE, FALSE, 0); txtview_oof = (GtkTextView*) gtk_object_new (GTK_TYPE_TEXT_VIEW, "justification", GTK_JUSTIFY_LEFT, "wrap-mode", GTK_WRAP_WORD, "editable", TRUE, NULL); @@ -304,7 +304,7 @@ org_gnome_exchange_settings(EPlugin *epl, EConfigHookItemFactoryData *data) /* previuosly set message */ gtk_text_buffer_set_text (buffer, oof_data->message, -1); gtk_text_view_set_buffer (txtview_oof, buffer); - + } gtk_text_buffer_set_modified (buffer, FALSE); if (!oof_data->state) @@ -316,7 +316,7 @@ org_gnome_exchange_settings(EPlugin *epl, EConfigHookItemFactoryData *data) /* Security settings */ frm_auth = (GtkFrame*) gtk_object_new (GTK_TYPE_FRAME, "label", _("Security"), NULL); gtk_box_pack_start (GTK_BOX (vbox_settings), GTK_WIDGET (frm_auth), FALSE, FALSE, 0); - + vbox_auth = (GtkVBox*) gtk_object_new (GTK_TYPE_VBOX, "homogeneous", FALSE, "spacing", 6, NULL); gtk_container_set_border_width (GTK_CONTAINER (vbox_auth), 6); gtk_container_add (GTK_CONTAINER (frm_auth), GTK_WIDGET (vbox_auth)); @@ -348,7 +348,7 @@ org_gnome_exchange_settings(EPlugin *epl, EConfigHookItemFactoryData *data) /* Miscelleneous settings */ frm_misc = (GtkFrame*) gtk_object_new (GTK_TYPE_FRAME, "label", _("Miscelleneous"), NULL); gtk_box_pack_start (GTK_BOX (vbox_settings), GTK_WIDGET (frm_misc), FALSE, FALSE, 0); - + vbox_misc = (GtkVBox*) gtk_object_new (GTK_TYPE_VBOX, "homogeneous", FALSE, "spacing", 6, NULL); gtk_container_set_border_width (GTK_CONTAINER (vbox_misc), 6); gtk_container_add (GTK_CONTAINER (frm_misc), GTK_WIDGET (vbox_misc)); @@ -399,7 +399,7 @@ print_error (const char *owa_url, E2kAutoconfigResult result) break; case E2K_AUTOCONFIG_CANT_BPROPFIND: - e_error_run (NULL, ERROR_DOMAIN ":connect-exchange-error", + e_error_run (NULL, ERROR_DOMAIN ":connect-exchange-error", "http://support.novell.com/cgi-bin/search/searchtid.cgi?/ximian/ximian328.html", NULL); break; @@ -422,7 +422,7 @@ owa_authenticate_user(GtkWidget *button, EConfig *config) E2kAutoconfigResult result; CamelURL *url=NULL; gboolean remember_password; - char *url_string, *key; + char *url_string, *key; const char *source_url, *id_name, *owa_url; char *at, *user; gboolean valid = FALSE; @@ -444,7 +444,7 @@ owa_authenticate_user(GtkWidget *button, EConfig *config) at = strchr(id_name, '@'); user = g_alloca(at-id_name+1); memcpy(user, id_name, at-id_name); - user[at-id_name] = 0; + user[at-id_name] = 0; camel_url_set_user (url, user); } } @@ -466,21 +466,21 @@ owa_authenticate_user(GtkWidget *button, EConfig *config) key = camel_url_to_string (url, CAMEL_URL_HIDE_PASSWORD | CAMEL_URL_HIDE_PARAMS); /* Supress the trailing slash */ key [strlen(key) -1] = 0; - - valid = e2k_validate_user (owa_url, key, &url->user, exchange_params, + + valid = e2k_validate_user (owa_url, key, &url->user, exchange_params, &remember_password, &result, GTK_WINDOW (gtk_widget_get_toplevel (button))); g_free (key); - + if (!valid && result != E2K_AUTOCONFIG_CANCELLED) print_error (owa_url, result); camel_url_set_host (url, valid ? exchange_params->host : ""); - + if (valid) camel_url_set_param (url, "save-passwd", remember_password? "true" : "false"); - + camel_url_set_param (url, "ad_server", valid ? exchange_params->ad_server: NULL); camel_url_set_param (url, "mailbox", valid ? exchange_params->mailbox : NULL); camel_url_set_param (url, "owa_path", valid ? exchange_params->owa_path : NULL); @@ -491,7 +491,7 @@ owa_authenticate_user(GtkWidget *button, EConfig *config) g_free (exchange_params->ad_server); g_free (exchange_params); - if (valid) { + if (valid) { url_string = camel_url_to_string (url, 0); e_account_set_string (target_account->account, E_ACCOUNT_SOURCE_URL, url_string); e_account_set_string (target_account->account, E_ACCOUNT_TRANSPORT_URL, url_string); @@ -540,7 +540,7 @@ owa_editor_entry_changed(GtkWidget *entry, EConfig *config) } static char * -construct_owa_url (CamelURL *url) +construct_owa_url (CamelURL *url) { const char *owa_path, *use_ssl = NULL; const char *protocol = "http", *mailbox_name; @@ -558,9 +558,9 @@ construct_owa_url (CamelURL *url) mailbox_name = camel_url_get_param (url, "mailbox"); if (mailbox_name) - owa_url = g_strdup_printf("%s://%s%s/%s", protocol, url->host, owa_path, mailbox_name); + owa_url = g_strdup_printf("%s://%s%s/%s", protocol, url->host, owa_path, mailbox_name); else - owa_url = g_strdup_printf("%s://%s%s", protocol, url->host, owa_path ); + owa_url = g_strdup_printf("%s://%s%s", protocol, url->host, owa_path ); return owa_url; } @@ -624,7 +624,7 @@ org_gnome_exchange_owa_url(EPlugin *epl, EConfigHookItemFactoryData *data) if (url->host[0] != 0) { char *uri; - /* url has hostname but not owa_url. + /* url has hostname but not owa_url. * Account has been created using x-c-s or evo is upgraded to 2.2 * When invoked from druid, hostname will get set after validation, * so this condition will never be true during account creation. @@ -636,9 +636,9 @@ org_gnome_exchange_owa_url(EPlugin *epl, EConfigHookItemFactoryData *data) g_free(uri); } } - camel_url_free (url); + camel_url_free (url); if (owa_url) - gtk_entry_set_text(GTK_ENTRY (owa_entry), owa_url); + gtk_entry_set_text(GTK_ENTRY (owa_entry), owa_url); gtk_label_set_mnemonic_widget((GtkLabel *)label, owa_entry); button = gtk_button_new_with_mnemonic (_("A_uthenticate")); @@ -648,8 +648,8 @@ org_gnome_exchange_owa_url(EPlugin *epl, EConfigHookItemFactoryData *data) gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); gtk_widget_show_all(hbox); - gtk_table_attach (GTK_TABLE (data->parent), label, 0, 1, row, row+1, 0, 0, 0, 0); - gtk_table_attach (GTK_TABLE (data->parent), hbox, 1, 2, row, row+1, GTK_FILL|GTK_EXPAND, GTK_FILL, 0, 0); + gtk_table_attach (GTK_TABLE (data->parent), label, 0, 1, row, row+1, 0, 0, 0, 0); + gtk_table_attach (GTK_TABLE (data->parent), hbox, 1, 2, row, row+1, GTK_FILL|GTK_EXPAND, GTK_FILL, 0, 0); g_signal_connect (owa_entry, "changed", G_CALLBACK(owa_editor_entry_changed), data->config); g_object_set_data((GObject *)owa_entry, "authenticate-button", button); @@ -693,7 +693,7 @@ org_gnome_exchange_check_options(EPlugin *epl, EConfigHookPageCheckData *data) return status; } -static void +static void set_oof_info (void) { ExchangeAccount *account; @@ -711,7 +711,7 @@ destroy_oof_data (void) { if (oof_data->message) g_free (oof_data->message); - g_free (oof_data); + g_free (oof_data); } void @@ -720,7 +720,7 @@ org_gnome_exchange_commit (EPlugin *epl, EConfigHookItemFactoryData *data) EMConfigTargetAccount *target_account; const char *source_url; CamelURL *url; - + target_account = (EMConfigTargetAccount *)data->config->target; source_url = e_account_get_string (target_account->account, E_ACCOUNT_SOURCE_URL); url = camel_url_new (source_url, NULL); @@ -749,7 +749,7 @@ exchange_check_authtype (GtkWidget *w, EConfig *config) return; } -static void +static void exchange_authtype_changed (GtkComboBox *dropdown, EConfig *config) { EMConfigTargetAccount *target = (EMConfigTargetAccount *)config->target; @@ -771,7 +771,7 @@ exchange_authtype_changed (GtkComboBox *dropdown, EConfig *config) transport_url = e_account_get_string (target->account, E_ACCOUNT_TRANSPORT_URL); url_transport = camel_url_new (transport_url, NULL); - + model = gtk_combo_box_get_model(dropdown); if (gtk_tree_model_iter_nth_child(model, &iter, NULL, id)) { gtk_tree_model_get(model, &iter, 1, &authtype, -1); @@ -783,7 +783,7 @@ exchange_authtype_changed (GtkComboBox *dropdown, EConfig *config) camel_url_set_authmech(url_source, NULL); camel_url_set_authmech(url_transport, NULL); } - + source_url_string = camel_url_to_string(url_source, 0); transport_url_string = camel_url_to_string(url_transport, 0); e_account_set_string(target->account, E_ACCOUNT_SOURCE_URL, source_url_string); @@ -800,7 +800,7 @@ GtkWidget * org_gnome_exchange_auth_section (EPlugin *epl, EConfigHookItemFactoryData *data) { EMConfigTargetAccount *target_account; - const char *source_url; + const char *source_url; char *label_text, *exchange_account_authtype = NULL; CamelURL *url; GtkWidget *hbox, *button, *auth_label, *vbox, *label_hide; @@ -812,7 +812,7 @@ org_gnome_exchange_auth_section (EPlugin *epl, EConfigHookItemFactoryData *data) ExchangeAccount *account; target_account = (EMConfigTargetAccount *)data->config->target; - source_url = e_account_get_string (target_account->account, + source_url = e_account_get_string (target_account->account, E_ACCOUNT_SOURCE_URL); url = camel_url_new (source_url, NULL); if (url == NULL @@ -839,7 +839,7 @@ org_gnome_exchange_auth_section (EPlugin *epl, EConfigHookItemFactoryData *data) g_free (label_text); gtk_label_set_justify (GTK_LABEL (auth_label), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (auth_label), 0, 0.5); - gtk_misc_set_padding (GTK_MISC (auth_label), 0, 0); + gtk_misc_set_padding (GTK_MISC (auth_label), 0, 0); gtk_label_set_use_markup (GTK_LABEL (auth_label), TRUE); label_hide = gtk_label_new("\n"); @@ -860,23 +860,23 @@ org_gnome_exchange_auth_section (EPlugin *epl, EConfigHookItemFactoryData *data) if (authtypes) { for (ll = authtypes; ll; ll = g_list_next(ll)) - if (!strcmp(authtype->authproto, + if (!strcmp(authtype->authproto, ((CamelServiceAuthType *)ll->data)->authproto)) break; avail = ll != NULL; } gtk_list_store_append (store, &iter); - gtk_list_store_set (store, &iter, 0, authtype->name, 1, + gtk_list_store_set (store, &iter, 0, authtype->name, 1, authtype, 2, !avail, -1); if (url && url->authmech && !strcmp(url->authmech, authtype->authproto)) { active = i; } - else if (url && exchange_account_authtype && + else if (url && exchange_account_authtype && !strcmp (exchange_account_authtype, authtype->authproto)) { - /* if the url doesn't contain authmech, read the value from - * exchange account and set the tab selection and - * also set the authmech back to url + /* if the url doesn't contain authmech, read the value from + * exchange account and set the tab selection and + * also set the authmech back to url */ camel_url_set_authmech (url, exchange_account_authtype); active = i; @@ -890,16 +890,16 @@ org_gnome_exchange_auth_section (EPlugin *epl, EConfigHookItemFactoryData *data) GtkCellRenderer *cell = gtk_cell_renderer_text_new(); gtk_cell_layout_pack_start ((GtkCellLayout *)dropdown, cell, TRUE); - gtk_cell_layout_set_attributes ((GtkCellLayout *)dropdown, cell, + gtk_cell_layout_set_attributes ((GtkCellLayout *)dropdown, cell, "text", 0, "strikethrough", 2, NULL); - auth_changed_id = g_signal_connect (dropdown, - "changed", - G_CALLBACK (exchange_authtype_changed), + auth_changed_id = g_signal_connect (dropdown, + "changed", + G_CALLBACK (exchange_authtype_changed), data->config); - g_signal_connect (button, - "clicked", - G_CALLBACK(exchange_check_authtype), + g_signal_connect (button, + "clicked", + G_CALLBACK(exchange_check_authtype), data->config); } @@ -913,7 +913,7 @@ org_gnome_exchange_auth_section (EPlugin *epl, EConfigHookItemFactoryData *data) gtk_box_pack_start (GTK_BOX (vbox), label_hide, TRUE, TRUE, 0); gtk_widget_show_all (vbox); - gtk_box_pack_start (GTK_BOX (data->parent), vbox, TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (data->parent), vbox, TRUE, TRUE, 0); if (url) camel_url_free(url); @@ -947,7 +947,7 @@ org_gnome_exchange_show_folder_size_factory (EPlugin *epl, EConfigHookItemFactor if (g_ascii_strcasecmp (provider->protocol, "exchange")) return NULL; - + folder_name = (char*) camel_folder_get_name (cml_folder); if (!folder_name) folder_name = g_strdup ("name"); -- cgit