aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer/e-composer-name-header.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/composer/e-composer-name-header.c b/composer/e-composer-name-header.c
index 3857f3954d..7f080c9071 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);