Ok, i will commit them immediately.
Cheers,
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?
Best Regards
Charles Zhang
Not Zed wrote:
On Fri, 2003-11-28 at 00:28, Charles Zhang wrote:
Hello Michael
Because of our carelessness in fixing bug 48998, a new bug comes.
Now, we cannot do any inputting in startup account setting dialog!
oops!
Fortunately, it is so early we found it that the patch hasn't been
commited to trunc till now.
I have found the reason and adjust the bad structure of coding.
Attachments is the patch to branch.
It works well in the account setting dialog and product no effect to
startup account setting dialog.
Ok, this looks reasonable. Please commit.
Index: mail/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.2901
diff -u -p -r1.2901 ChangeLog
--- mail/ChangeLog 26 Nov 2003 15:26:42 -0000 1.2901
+++ mail/ChangeLog 30 Nov 2003 14:18:41 -0000
@@ -0,0 +0,6 @@
+2003-11-27 Charles Zhang <charles zhang sun com>
+
+ * mail-account-editor.c (construct): connect "changed" signal.
+ (mail_account_editor_changed): change signal handler.
+ Fixes bug #48998.
+
Index: mail/mail-account-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-account-editor.c,v
retrieving revision 1.58
diff -u -p -r1.58 mail-account-editor.c
--- mail/mail-account-editor.c 24 Oct 2003 19:31:22 -0000 1.58
+++ mail/mail-account-editor.c 30 Nov 2003 14:18:43 -0000
@@ -105,7 +105,10 @@ apply_changes (MailAccountEditor *editor
if (mail_account_gui_save (editor->gui) == FALSE)
return FALSE;
-
+
+ gtk_dialog_set_response_sensitive (GTK_DIALOG (editor),
+ GTK_RESPONSE_APPLY, FALSE);
+
/* save any changes we may have */
mail_config_write ();
@@ -132,16 +135,22 @@ 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, EMAccountPrefs *dialog)
{
EAccountService *source = account->source;
-
+
editor->gui = mail_account_gui_new (account, dialog);
-
+
/* get our toplevel widget and reparent it */
editor->notebook = GTK_NOTEBOOK (glade_xml_get_widget (editor->gui->xml, "account_editor_notebook"));
gtk_widget_reparent (GTK_WIDGET (editor->notebook), GTK_DIALOG (editor)->vbox);
-
+
/* give our dialog an OK button and title */
gtk_window_set_title (GTK_WINDOW (editor), _("Evolution Account Editor"));
gtk_window_set_resizable (GTK_WINDOW (editor), TRUE);
@@ -151,13 +160,55 @@ construct (MailAccountEditor *editor, EA
GTK_STOCK_CLOSE, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
NULL);
-
+
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));
}
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
|