Thank you, Michael. I have sent to you two attahments in my last mail. 48998-branch-2.diff is for evolution 1.4 48998-trunc.diff is for HEAD You must have misunderstood :) This patch can be applied to evolution-1-4-branch. Please check it. Best Regards Not Zed wrote: Hi Charles, This patch would not apply to 1.4, could you generate a new patch please? I've committed it to HEAD though. Michael On Mon, 2003-12-01 at 01:43, Charles Zhang wrote:Thank you Michael. This time I did some Adjustment on the patches. Can you help me to commit them into branch and trunc separately? |
Index: mail/ChangeLog =================================================================== RCS file: /cvs/gnome/evolution/mail/ChangeLog,v retrieving revision 1.2761.2.35 diff -u -p -r1.2761.2.35 ChangeLog --- mail/ChangeLog 17 Nov 2003 12:18:50 -0000 1.2761.2.35 +++ mail/ChangeLog 27 Nov 2003 11:35:00 -0000 @@ -0,0 +0,10 @@ +2003-11-27 Charles Zhang <charles zhang sun com> + + * mail-account-gui.c (mail_account_gui_changed): move to file + mail-account-editor.c + (mail_account_gui_setup): move signal connect statements to file + mail-account-editor.c + * mail-account-editor.c (construct): same as above + (mail_account_editor_changed): changed from mail_account_gui_changed + in file mail-account-gui.c + Index: mail/mail-account-editor.c =================================================================== RCS file: /cvs/gnome/evolution/mail/mail-account-editor.c,v retrieving revision 1.57.6.1 diff -u -p -r1.57.6.1 mail-account-editor.c --- mail/mail-account-editor.c 17 Nov 2003 12:18:52 -0000 1.57.6.1 +++ mail/mail-account-editor.c 27 Nov 2003 11:35:01 -0000 @@ -135,6 +135,12 @@ editor_response_cb (GtkWidget *widget, i } static void +mail_account_editor_changed (GtkWidget *widget, MailAccountEditor *editor) +{ + gtk_dialog_set_response_sensitive (GTK_WIDGET (editor), GTK_RESPONSE_APPLY, TRUE); +} + +static void construct (MailAccountEditor *editor, EAccount *account, MailAccountsTab *dialog) { EAccountService *source = account->source; @@ -155,15 +161,54 @@ construct (MailAccountEditor *editor, EA GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); - gtk_dialog_set_response_sensitive (GTK_DIALOG (editor), - GTK_RESPONSE_APPLY, FALSE); - g_signal_connect (editor, "response", G_CALLBACK (editor_response_cb), editor); - + + g_signal_connect (editor->gui->account_name, "changed", G_CALLBACK (mail_account_editor_changed), editor); + g_signal_connect (editor->gui->default_account, "toggled", G_CALLBACK (mail_account_editor_changed), editor); + g_signal_connect (editor->gui->full_name, "changed", G_CALLBACK (mail_account_editor_changed), editor); + g_signal_connect (editor->gui->email_address, "changed", G_CALLBACK (mail_account_editor_changed), editor); + g_signal_connect (editor->gui->reply_to, "changed", G_CALLBACK (mail_account_editor_changed), editor); + g_signal_connect (editor->gui->organization, "changed", G_CALLBACK (mail_account_editor_changed), editor); + + g_signal_connect (editor->gui->source.type, "changed", G_CALLBACK (mail_account_editor_changed), editor); + g_signal_connect (editor->gui->source.hostname, "changed", G_CALLBACK (mail_account_editor_changed), editor); + g_signal_connect (editor->gui->source.username, "changed", G_CALLBACK (mail_account_editor_changed), editor); + g_signal_connect (editor->gui->source.path, "changed", G_CALLBACK (mail_account_editor_changed), editor); + g_signal_connect (editor->gui->source.use_ssl, "changed", G_CALLBACK (mail_account_editor_changed), editor); + g_signal_connect (editor->gui->source.authtype, "changed", G_CALLBACK (mail_account_editor_changed), editor); + g_signal_connect (editor->gui->source.remember, "toggled", G_CALLBACK (mail_account_editor_changed), editor); + + g_signal_connect (editor->gui->source_auto_check, "toggled", G_CALLBACK (mail_account_editor_changed), editor); + g_signal_connect (editor->gui->source_auto_check_min, "value-changed", G_CALLBACK (mail_account_editor_changed), editor); + + g_signal_connect (editor->gui->transport.type, "changed", G_CALLBACK (mail_account_editor_changed), editor); + g_signal_connect (editor->gui->transport.hostname, "changed", G_CALLBACK (mail_account_editor_changed), editor); + g_signal_connect (editor->gui->transport.username, "changed", G_CALLBACK (mail_account_editor_changed), editor); + g_signal_connect (editor->gui->transport_needs_auth, "toggled", G_CALLBACK (mail_account_editor_changed), editor); + g_signal_connect (editor->gui->transport.use_ssl, "changed", G_CALLBACK (mail_account_editor_changed), editor); + g_signal_connect (editor->gui->transport.authtype, "changed", G_CALLBACK (mail_account_editor_changed), editor); + g_signal_connect (editor->gui->transport.remember, "toggled", G_CALLBACK (mail_account_editor_changed), editor); + + g_signal_connect (editor->gui->drafts_folder_button, "clicked", G_CALLBACK (mail_account_editor_changed), editor); + g_signal_connect (editor->gui->sent_folder_button, "clicked", G_CALLBACK (mail_account_editor_changed), editor); + g_signal_connect (editor->gui->always_cc, "toggled", G_CALLBACK (mail_account_editor_changed), editor); + g_signal_connect (editor->gui->cc_addrs, "changed", G_CALLBACK (mail_account_editor_changed), editor); + g_signal_connect (editor->gui->always_bcc, "toggled", G_CALLBACK (mail_account_editor_changed), editor); + g_signal_connect (editor->gui->bcc_addrs, "changed", G_CALLBACK (mail_account_editor_changed), editor); + + g_signal_connect (editor->gui->pgp_key, "changed", G_CALLBACK (mail_account_editor_changed), editor); + g_signal_connect (editor->gui->pgp_encrypt_to_self, "toggled", G_CALLBACK (mail_account_editor_changed), editor); + g_signal_connect (editor->gui->pgp_always_sign, "toggled", G_CALLBACK (mail_account_editor_changed), editor); + g_signal_connect (editor->gui->pgp_no_imip_sign, "toggled", G_CALLBACK (mail_account_editor_changed), editor); + g_signal_connect (editor->gui->pgp_always_trust, "toggled", G_CALLBACK (mail_account_editor_changed), editor); + mail_account_gui_setup (editor->gui, GTK_WIDGET (editor)); - + mail_account_gui_build_extra_conf (editor->gui, source->url); - + + gtk_dialog_set_response_sensitive (GTK_DIALOG (editor), + GTK_RESPONSE_APPLY, FALSE); + gtk_widget_grab_focus (GTK_WIDGET (editor->gui->account_name)); } @@ -177,11 +222,4 @@ mail_account_editor_new (EAccount *accou construct (new, account, dialog); return new; -} - -void -mail_account_editor_changed (MailAccountEditor *editor) -{ - gtk_dialog_set_response_sensitive (GTK_WIDGET (editor), - GTK_RESPONSE_APPLY, TRUE); } Index: mail/mail-account-editor.h =================================================================== RCS file: /cvs/gnome/evolution/mail/mail-account-editor.h,v retrieving revision 1.20.10.1 diff -u -p -r1.20.10.1 mail-account-editor.h --- mail/mail-account-editor.h 17 Nov 2003 12:18:52 -0000 1.20.10.1 +++ mail/mail-account-editor.h 27 Nov 2003 11:35:01 -0000 @@ -59,7 +59,6 @@ typedef struct { GtkType mail_account_editor_get_type (void); MailAccountEditor *mail_account_editor_new (EAccount *account, GtkWindow *parent, MailAccountsTab *dialog); -void mail_account_editor_changed (MailAccountEditor *editor); #ifdef __cplusplus } Index: mail/mail-account-gui.c =================================================================== RCS file: /cvs/gnome/evolution/mail/mail-account-gui.c,v retrieving revision 1.133.4.4 diff -u -p -r1.133.4.4 mail-account-gui.c --- mail/mail-account-gui.c 17 Nov 2003 12:18:52 -0000 1.133.4.4 +++ mail/mail-account-gui.c 27 Nov 2003 11:35:11 -0000 @@ -730,14 +730,6 @@ setup_toggle (GtkWidget *widget, const c toggle_sensitivity (toggle, widget); } -static void -mail_account_gui_changed (GtkWidget *widget, MailAccountGui *gui) -{ - MailAccountsTab *dialog = (MailAccountsTab *) gui->dialog; - MailAccountEditor *editor = (MailAccountEditor *) dialog->editor; - mail_account_editor_changed (editor); -} - void mail_account_gui_build_extra_conf (MailAccountGui *gui, const char *url_string) { @@ -885,8 +877,6 @@ mail_account_gui_build_extra_conf (MailA if (entries[i].depname) setup_toggle (checkbox, entries[i].depname, gui); - g_signal_connect (checkbox, "toggled", G_CALLBACK (mail_account_gui_changed), gui); - break; } @@ -934,8 +924,6 @@ mail_account_gui_build_extra_conf (MailA } g_hash_table_insert (gui->extra_config, entries[i].name, entry); - - g_signal_connect (entry, "changed", G_CALLBACK (mail_account_gui_changed), gui); break; } @@ -1101,8 +1089,6 @@ default_folders_clicked (GtkButton *butt gui->sent_folder_uri = g_strdup (default_sent_folder_uri); evolution_folder_selector_button_set_uri (EVOLUTION_FOLDER_SELECTOR_BUTTON (gui->sent_folder_button), gui->sent_folder_uri); - - mail_account_gui_changed (GTK_WIDGET (button), gui); } GtkWidget *mail_account_gui_folder_selector_button_new (char *widget_name, char *string1, char *string2, int int1, int int2); @@ -1296,8 +1282,6 @@ sig_changed (GtkWidget *w, MailAccountGu gui->def_signature = (MailConfigSignature *) g_object_get_data(G_OBJECT(active), "sig"); gui->auto_signature = index == 1 ? TRUE : FALSE; - - mail_account_gui_changed (w, gui); } static void @@ -1777,45 +1761,6 @@ mail_account_gui_setup (MailAccountGui * gui->transport.provider_type = CAMEL_PROVIDER_TRANSPORT; g_free (transport_proto); } - - g_signal_connect (gui->account_name, "changed", G_CALLBACK (mail_account_gui_changed), gui); - g_signal_connect (gui->default_account, "toggled", G_CALLBACK (mail_account_gui_changed), gui); - g_signal_connect (gui->full_name, "changed", G_CALLBACK (mail_account_gui_changed), gui); - g_signal_connect (gui->email_address, "changed", G_CALLBACK (mail_account_gui_changed), gui); - g_signal_connect (gui->reply_to, "changed", G_CALLBACK (mail_account_gui_changed), gui); - g_signal_connect (gui->organization, "changed", G_CALLBACK (mail_account_gui_changed), gui); - - g_signal_connect (gui->source.type, "changed", G_CALLBACK (mail_account_gui_changed), gui); - g_signal_connect (gui->source.hostname, "changed", G_CALLBACK (mail_account_gui_changed), gui); - g_signal_connect (gui->source.username, "changed", G_CALLBACK (mail_account_gui_changed), gui); - g_signal_connect (gui->source.path, "changed", G_CALLBACK (mail_account_gui_changed), gui); - g_signal_connect (gui->source.use_ssl, "changed", G_CALLBACK (mail_account_gui_changed), gui); - g_signal_connect (gui->source.authtype, "changed", G_CALLBACK (mail_account_gui_changed), gui); - g_signal_connect (gui->source.remember, "toggled", G_CALLBACK (mail_account_gui_changed), gui); - - g_signal_connect (gui->source_auto_check, "toggled", G_CALLBACK (mail_account_gui_changed), gui); - g_signal_connect (gui->source_auto_check_min, "value-changed", G_CALLBACK (mail_account_gui_changed), gui); - - g_signal_connect (gui->transport.type, "changed", G_CALLBACK (mail_account_gui_changed), gui); - g_signal_connect (gui->transport.hostname, "changed", G_CALLBACK (mail_account_gui_changed), gui); - g_signal_connect (gui->transport.username, "changed", G_CALLBACK (mail_account_gui_changed), gui); - g_signal_connect (gui->transport_needs_auth, "toggled", G_CALLBACK (mail_account_gui_changed), gui); - g_signal_connect (gui->transport.use_ssl, "changed", G_CALLBACK (mail_account_gui_changed), gui); - g_signal_connect (gui->transport.authtype, "changed", G_CALLBACK (mail_account_gui_changed), gui); - g_signal_connect (gui->transport.remember, "toggled", G_CALLBACK (mail_account_gui_changed), gui); - - g_signal_connect (gui->drafts_folder_button, "clicked", G_CALLBACK (mail_account_gui_changed), gui); - g_signal_connect (gui->sent_folder_button, "clicked", G_CALLBACK (mail_account_gui_changed), gui); - g_signal_connect (gui->always_cc, "toggled", G_CALLBACK (mail_account_gui_changed), gui); - g_signal_connect (gui->cc_addrs, "changed", G_CALLBACK (mail_account_gui_changed), gui); - g_signal_connect (gui->always_bcc, "toggled", G_CALLBACK (mail_account_gui_changed), gui); - g_signal_connect (gui->bcc_addrs, "changed", G_CALLBACK (mail_account_gui_changed), gui); - - g_signal_connect (gui->pgp_key, "changed", G_CALLBACK (mail_account_gui_changed), gui); - g_signal_connect (gui->pgp_encrypt_to_self, "toggled", G_CALLBACK (mail_account_gui_changed), gui); - g_signal_connect (gui->pgp_always_sign, "toggled", G_CALLBACK (mail_account_gui_changed), gui); - g_signal_connect (gui->pgp_no_imip_sign, "toggled", G_CALLBACK (mail_account_gui_changed), gui); - g_signal_connect (gui->pgp_always_trust, "toggled", G_CALLBACK (mail_account_gui_changed), gui); } static void