diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-08-07 05:48:45 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-08-07 06:42:42 +0800 |
commit | 740af34bdf59229f5c63b30b5cca6264672f6707 (patch) | |
tree | 153c02805da8ade80f8e0934fcdd529f20d8d4be /mail/em-account-editor.c | |
parent | ba5c9e6f8046f76ffda4a1871d1287f9834d1211 (diff) | |
download | gsoc2013-evolution-740af34bdf59229f5c63b30b5cca6264672f6707.tar gsoc2013-evolution-740af34bdf59229f5c63b30b5cca6264672f6707.tar.gz gsoc2013-evolution-740af34bdf59229f5c63b30b5cca6264672f6707.tar.bz2 gsoc2013-evolution-740af34bdf59229f5c63b30b5cca6264672f6707.tar.lz gsoc2013-evolution-740af34bdf59229f5c63b30b5cca6264672f6707.tar.xz gsoc2013-evolution-740af34bdf59229f5c63b30b5cca6264672f6707.tar.zst gsoc2013-evolution-740af34bdf59229f5c63b30b5cca6264672f6707.zip |
Seal up ESignature and add GObject properties.
Diffstat (limited to 'mail/em-account-editor.c')
-rw-r--r-- | mail/em-account-editor.c | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c index 21650d0624..dceaec5bb3 100644 --- a/mail/em-account-editor.c +++ b/mail/em-account-editor.c @@ -604,11 +604,16 @@ emae_signature_added (ESignatureList *signatures, ESignature *sig, EMAccountEdit { GtkTreeModel *model; GtkTreeIter iter; + const gchar *name; + const gchar *uid; + + name = e_signature_get_name (sig); + uid = e_signature_get_uid (sig); model = gtk_combo_box_get_model (emae->priv->signatures_dropdown); gtk_list_store_append ((GtkListStore *)model, &iter); - gtk_list_store_set ((GtkListStore *)model, &iter, 0, sig->autogen?_("Autogenerated"):sig->name, 1, sig->uid, -1); + gtk_list_store_set ((GtkListStore *)model, &iter, 0, name, 1, uid, -1); gtk_combo_box_set_active (emae->priv->signatures_dropdown, gtk_tree_model_iter_n_children (model, NULL)-1); } @@ -625,10 +630,13 @@ emae_signature_get_iter (EMAccountEditor *emae, ESignature *sig, GtkTreeModel ** return FALSE; do { + const gchar *signature_uid; gchar *uid; + signature_uid = e_signature_get_uid (sig); + gtk_tree_model_get (model, iter, 1, &uid, -1); - if (uid && !strcmp (uid, sig->uid)) + if (uid && !strcmp (uid, signature_uid)) found = TRUE; g_free (uid); } while (!found && gtk_tree_model_iter_next (model, iter)); @@ -651,9 +659,12 @@ emae_signature_changed (ESignatureList *signatures, ESignature *sig, EMAccountEd { GtkTreeIter iter; GtkTreeModel *model; + const gchar *name; + + name = e_signature_get_name (sig); if (emae_signature_get_iter (emae, sig, &model, &iter)) - gtk_list_store_set ((GtkListStore *)model, &iter, 0, sig->autogen?_("Autogenerated"):sig->name, -1); + gtk_list_store_set ((GtkListStore *)model, &iter, 0, name, -1); } static void @@ -718,11 +729,16 @@ emae_setup_signatures (EMAccountEditor *emae, GladeXML *xml) it = e_list_get_iterator ((EList *) signatures); while (e_iterator_is_valid (it)) { ESignature *sig = (ESignature *)e_iterator_get (it); + const gchar *name; + const gchar *uid; + + name = e_signature_get_name (sig); + uid = e_signature_get_uid (sig); gtk_list_store_append (store, &iter); - gtk_list_store_set (store, &iter, 0, sig->autogen?_("Autogenerated"):sig->name, 1, sig->uid, -1); + gtk_list_store_set (store, &iter, 0, name, 1, uid, -1); - if (current && !strcmp (current, sig->uid)) + if (current && !strcmp (current, uid)) active = i; e_iterator_next (it); |