[evolution] Bug #681314 - Add address dialog should follow composer's view settings



commit 4f6b7704e2ef7943310c917175a35ab94e0cb0dd
Author: Milan Crha <mcrha redhat com>
Date:   Mon Oct 15 19:51:57 2012 +0200

    Bug #681314 - Add address dialog should follow composer's view settings

 composer/e-composer-name-header.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/composer/e-composer-name-header.c b/composer/e-composer-name-header.c
index 3857f39..7f080c9 100644
--- a/composer/e-composer-name-header.c
+++ b/composer/e-composer-name-header.c
@@ -111,6 +111,21 @@ composer_name_header_entry_query_tooltip_cb (GtkEntry *entry,
 }
 
 static void
+composer_name_header_visible_changed_cb (EComposerNameHeader *header)
+{
+	const gchar *label;
+	EComposerNameHeaderPrivate *priv;
+	ENameSelectorDialog *dialog;
+
+	priv = E_COMPOSER_NAME_HEADER_GET_PRIVATE (header);
+	label = e_composer_header_get_label (E_COMPOSER_HEADER (header));
+	dialog = e_name_selector_peek_dialog (priv->name_selector);
+
+	e_name_selector_dialog_set_section_visible (dialog, label,
+		e_composer_header_get_visible (E_COMPOSER_HEADER (header)));
+}
+
+static void
 composer_name_header_set_property (GObject *object,
                                    guint property_id,
                                    const GValue *value,
@@ -206,6 +221,9 @@ composer_name_header_constructed (GObject *object)
 		NULL);
 	E_COMPOSER_HEADER (object)->input_widget = g_object_ref_sink (entry);
 
+	g_signal_connect_swapped (object, "notify::visible",
+		G_CALLBACK (composer_name_header_visible_changed_cb), object);
+
 	/* Chain up to parent's constructed() method. */
 	G_OBJECT_CLASS (e_composer_name_header_parent_class)->
 		constructed (object);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]