aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-account-editor.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-08-07 05:48:45 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-08-07 08:00:49 +0800
commit052e89dd423b5ba2f394f55c2fcc48102e7b9bc3 (patch)
tree1e619c123276e604996423df38a2bffafd28b633 /mail/em-account-editor.c
parent6a2b0904893199ceb5b291405721845fd17a08db (diff)
downloadgsoc2013-evolution-052e89dd423b5ba2f394f55c2fcc48102e7b9bc3.tar.gz
gsoc2013-evolution-052e89dd423b5ba2f394f55c2fcc48102e7b9bc3.tar.zst
gsoc2013-evolution-052e89dd423b5ba2f394f55c2fcc48102e7b9bc3.zip
Seal up ESignature and add GObject properties.
Diffstat (limited to 'mail/em-account-editor.c')
-rw-r--r--mail/em-account-editor.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c
index 6c55a659f8..6ba40772c2 100644
--- a/mail/em-account-editor.c
+++ b/mail/em-account-editor.c
@@ -787,11 +787,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);
}
@@ -808,10 +813,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));
@@ -834,9 +842,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
@@ -923,11 +934,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);