aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-08-16 13:06:47 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-08-16 13:08:36 +0800
commit582ba50c50e4f6250e82363ff7c9bffcff67fd3c (patch)
tree459e6ef61ff6e4e573ec72bd9816f38573abd853
parente68fb2bd5d5a400f8af7a46f0da356b9c6cd78c6 (diff)
downloadgsoc2013-evolution-582ba50c50e4f6250e82363ff7c9bffcff67fd3c.tar.gz
gsoc2013-evolution-582ba50c50e4f6250e82363ff7c9bffcff67fd3c.tar.zst
gsoc2013-evolution-582ba50c50e4f6250e82363ff7c9bffcff67fd3c.zip
Bug 681882 - Account signature not selected in new composer window
-rw-r--r--widgets/misc/e-mail-signature-combo-box.c51
1 files changed, 51 insertions, 0 deletions
diff --git a/widgets/misc/e-mail-signature-combo-box.c b/widgets/misc/e-mail-signature-combo-box.c
index 26f87b95eb..275c2538b9 100644
--- a/widgets/misc/e-mail-signature-combo-box.c
+++ b/widgets/misc/e-mail-signature-combo-box.c
@@ -81,6 +81,49 @@ mail_signature_combo_box_registry_changed (ESourceRegistry *registry,
combo_box);
}
+static gboolean
+mail_signature_combo_box_identity_to_signature (GBinding *binding,
+ const GValue *source_value,
+ GValue *target_value,
+ gpointer user_data)
+{
+ EMailSignatureComboBox *combo_box;
+ ESourceRegistry *registry;
+ GObject *source_object;
+ ESource *source;
+ ESourceMailIdentity *extension;
+ const gchar *identity_uid;
+ const gchar *signature_uid = "none";
+ const gchar *extension_name;
+
+ /* Source and target are the same object. */
+ source_object = g_binding_get_source (binding);
+ combo_box = E_MAIL_SIGNATURE_COMBO_BOX (source_object);
+ registry = e_mail_signature_combo_box_get_registry (combo_box);
+
+ identity_uid = g_value_get_string (source_value);
+ if (identity_uid == NULL)
+ return FALSE;
+
+ source = e_source_registry_ref_source (registry, identity_uid);
+ if (source == NULL)
+ return FALSE;
+
+ extension_name = E_SOURCE_EXTENSION_MAIL_IDENTITY;
+ if (!e_source_has_extension (source, extension_name)) {
+ g_object_unref (source);
+ return FALSE;
+ }
+
+ extension = e_source_get_extension (source, extension_name);
+ signature_uid = e_source_mail_identity_get_signature_uid (extension);
+ g_value_set_string (target_value, signature_uid);
+
+ g_object_unref (source);
+
+ return TRUE;
+}
+
static void
mail_signature_combo_box_set_registry (EMailSignatureComboBox *combo_box,
ESourceRegistry *registry)
@@ -218,6 +261,14 @@ mail_signature_combo_box_constructed (GObject *object)
gtk_cell_layout_add_attribute (
cell_layout, cell_renderer, "text", COLUMN_DISPLAY_NAME);
+ g_object_bind_property_full (
+ combo_box, "identity-uid",
+ combo_box, "active-id",
+ G_BINDING_DEFAULT,
+ mail_signature_combo_box_identity_to_signature,
+ NULL,
+ NULL, (GDestroyNotify) NULL);
+
e_mail_signature_combo_box_refresh (
E_MAIL_SIGNATURE_COMBO_BOX (object));
}
mitgraph'>* devel/boost-*: update to 1.69.0Jan Beich2018-12-121-1/+1 * - Bump PORTREVISIONJose Alonso Cardenas Marquez2018-11-151-1/+1 * devel/boost-*: update to 1.68.0Jan Beich2018-08-091-1/+1 * Bump PORTREVISION for ports depending on the canonical version of GCCGerald Pfeifer2018-07-301-1/+1 * devel/boost-*: update to 1.67.0Jan Beich2018-04-181-1/+1 * devel/boost-*: update to 1.66.0Jan Beich2018-01-181-0/+1 * - Those ports fail to build with python3Antoine Brodin2017-12-121-1/+1 * Update to upstream version 5.12Thomas Zander2017-11-033-5/+8 * devel/boost-*: update to 1.65.1Jan Beich2017-09-251-1/+1 * devel/boost-*: enable C++11 featuresJan Beich2017-09-251-1/+1 * Bump PORTREVISION for ports depending on the canonical version of GCCGerald Pfeifer2017-09-111-0/+1 * Update audio/ardour5 to 5.11.0Guido Falsi2017-08-273-5/+10 * Update devel/readline to 7.0 patch 3Sunpoet Po-Chuan Hsieh2017-06-271-0/+1 * - audio/ardour5: Update from 5.9.0 to 5.10.0Jochen Neumeister2017-06-213-4/+5 * Use USES=readline:portSunpoet Po-Chuan Hsieh2017-06-131-3/+2 * - Update to 5.9Jochen Neumeister2017-05-263-5/+15 * Mark some ports failing on power64. In cases where the error messageMark Linimon2017-05-221-1/+2 * devel/boost-*: update to 1.64.0Jan Beich2017-05-021-0/+1 * Fix build with newer sigc++20Baptiste Daroussin2017-04-031-2/+3 * audio/ardour5: update 5.6.0 -> 5.8.0Bartek Rutkowski2017-03-293-6/+10 * - Update to 5.6.0Wen Heping2017-02-233-45/+21 * Mark as broken on aarch64: multiple failures in configure.Mark Linimon2017-01-291-3/+5 * http://github.com redirects to the https version.Mathieu Arnold2017-01-131-2/+1