diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2003-01-18 07:30:37 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2003-01-18 07:30:37 +0800 |
commit | 650c61584f8970de2cd9c9915dade6843d386191 (patch) | |
tree | daa62a11ebe224073ed487bed3d427ae1e51785c /e-util | |
parent | fdabee2040637d8ed03f4dd807d0e40a0116630b (diff) | |
download | gsoc2013-evolution-650c61584f8970de2cd9c9915dade6843d386191.tar.gz gsoc2013-evolution-650c61584f8970de2cd9c9915dade6843d386191.tar.zst gsoc2013-evolution-650c61584f8970de2cd9c9915dade6843d386191.zip |
Changed signal names to use - instead of _ like the rest of Gtk2.
2003-01-17 Jeffrey Stedfast <fejj@ximian.com>
* e-account-list.c: Changed signal names to use - instead of _
like the rest of Gtk2.
* e-account.c (e_account_import): New function that is basically
the old account_copy().
svn path=/trunk/; revision=19508
Diffstat (limited to 'e-util')
-rw-r--r-- | e-util/ChangeLog | 8 | ||||
-rw-r--r-- | e-util/e-account-list.c | 6 | ||||
-rw-r--r-- | e-util/e-account.c | 66 | ||||
-rw-r--r-- | e-util/e-account.h | 3 |
4 files changed, 80 insertions, 3 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog index 152da6bd88..9492610fe1 100644 --- a/e-util/ChangeLog +++ b/e-util/ChangeLog @@ -1,3 +1,11 @@ +2003-01-17 Jeffrey Stedfast <fejj@ximian.com> + + * e-account-list.c: Changed signal names to use - instead of _ + like the rest of Gtk2. + + * e-account.c (e_account_import): New function that is basically + the old account_copy(). + 2003-01-17 Dan Winship <danw@ximian.com> * e-xml-hash-utils.c: New, sort of from evolution-recurid-branch. diff --git a/e-util/e-account-list.c b/e-util/e-account-list.c index 4e7b86a85f..89b0f1f9d8 100644 --- a/e-util/e-account-list.c +++ b/e-util/e-account-list.c @@ -58,7 +58,7 @@ class_init (GObjectClass *object_class) /* signals */ signals[ACCOUNT_ADDED] = - g_signal_new ("account_added", + g_signal_new ("account-added", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (EAccountListClass, account_added), @@ -67,7 +67,7 @@ class_init (GObjectClass *object_class) G_TYPE_NONE, 1, E_TYPE_ACCOUNT); signals[ACCOUNT_CHANGED] = - g_signal_new ("account_changed", + g_signal_new ("account-changed", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (EAccountListClass, account_changed), @@ -76,7 +76,7 @@ class_init (GObjectClass *object_class) G_TYPE_NONE, 1, E_TYPE_ACCOUNT); signals[ACCOUNT_REMOVED] = - g_signal_new ("account_removed", + g_signal_new ("account-removed", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (EAccountListClass, account_removed), diff --git a/e-util/e-account.c b/e-util/e-account.c index ac58575d51..16cded8cf6 100644 --- a/e-util/e-account.c +++ b/e-util/e-account.c @@ -378,6 +378,72 @@ e_account_set_from_xml (EAccount *account, const char *xml) return changed; } + +/** + * e_account_import: + * @dest: destination account object + * @src: source account object + * + * Import the settings from @src to @dest. + **/ +void +e_account_import (EAccount *dest, EAccount *src) +{ + g_free (dest->name); + dest->name = g_strdup (src->name); + + dest->enabled = src->enabled; + + g_free (dest->id->name); + dest->id->name = g_strdup (src->id->name); + g_free (dest->id->address); + dest->id->address = g_strdup (src->id->address); + g_free (dest->id->reply_to); + dest->id->reply_to = g_strdup (src->id->reply_to); + g_free (dest->id->organization); + dest->id->organization = g_strdup (src->id->organization); + dest->id->def_signature = src->id->def_signature; + dest->id->auto_signature = src->id->auto_signature; + + g_free (dest->source->url); + dest->source->url = g_strdup (src->source->url); + dest->source->keep_on_server = src->source->keep_on_server; + dest->source->auto_check = src->source->auto_check; + dest->source->auto_check_time = src->source->auto_check_time; + dest->source->save_passwd = src->source->save_passwd; + + g_free (dest->transport->url); + dest->transport->url = g_strdup (src->transport->url); + dest->transport->save_passwd = src->transport->save_passwd; + + g_free (dest->drafts_folder_uri); + dest->drafts_folder_uri = g_strdup (src->drafts_folder_uri); + + g_free (dest->sent_folder_uri); + dest->sent_folder_uri = g_strdup (src->sent_folder_uri); + + dest->always_cc = src->always_cc; + g_free (dest->cc_addrs); + dest->cc_addrs = g_strdup (src->cc_addrs); + + dest->always_bcc = src->always_bcc; + g_free (dest->bcc_addrs); + dest->bcc_addrs = g_strdup (src->bcc_addrs); + + g_free (dest->pgp_key); + dest->pgp_key = g_strdup (src->pgp_key); + dest->pgp_encrypt_to_self = src->pgp_encrypt_to_self; + dest->pgp_always_sign = src->pgp_always_sign; + dest->pgp_no_imip_sign = src->pgp_no_imip_sign; + dest->pgp_always_trust = src->pgp_always_trust; + + g_free (dest->smime_key); + dest->smime_key = g_strdup (src->smime_key); + dest->smime_encrypt_to_self = src->smime_encrypt_to_self; + dest->smime_always_sign = src->smime_always_sign; +} + + /** * e_account_to_xml: * @account: an #EAccount diff --git a/e-util/e-account.h b/e-util/e-account.h index f20588a0ea..78eb70b7a8 100644 --- a/e-util/e-account.h +++ b/e-util/e-account.h @@ -92,6 +92,9 @@ EAccount *e_account_new_from_xml (const char *xml); gboolean e_account_set_from_xml (EAccount *account, const char *xml); +void e_account_import (EAccount *dest, + EAccount *src); + char *e_account_to_xml (EAccount *account); |