Index: composer/e-composer-option-table.c
===================================================================
--- composer/e-composer-option-table.c	(revision 0)
+++ composer/e-composer-option-table.c	(revision 0)
@@ -0,0 +1,359 @@
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>  
+ *
+ * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
+ */
+
+#include "e-composer-option-table.h"
+
+#include <glib/gi18n.h>
+
+#define E_COMPOSER_OPTION_TABLE_GET_PRIVATE(obj) \
+	(G_TYPE_INSTANCE_GET_PRIVATE \
+	((obj), E_TYPE_COMPOSER_OPTION_TABLE, EComposerOptionTablePrivate))
+
+typedef struct _EComposerOption EComposerOption;
+
+struct _EComposerOption {
+	GtkToggleAction *action;
+	GtkWidget *container;
+};
+
+struct _EComposerOptionTablePrivate {
+	EComposerOption options[E_COMPOSER_NUM_OPTIONS];
+};
+
+static gpointer parent_class;
+
+static void
+composer_option_action_toggled_cb (EComposerOption *option)
+{
+	if (gtk_toggle_action_get_active (option->action))
+		gtk_widget_show (option->container);
+	else
+		gtk_widget_hide (option->container);
+}
+
+static void
+composer_option_button_clicked_cb (EComposerOption *option)
+{
+	gtk_widget_hide (option->container);
+
+	if (option->action != NULL)
+		gtk_toggle_action_set_active (option->action, FALSE);
+}
+
+static void
+composer_option_table_create_option (EComposerOptionTable *table,
+                                     EComposerOptionType type,
+                                     GtkSizeGroup *icon_size_group,
+                                     GtkSizeGroup *button_size_group,
+                                     const gchar *icon_name,
+                                     const gchar *description,
+                                     const gchar *button_label)
+{
+	EComposerOption *option;
+	GHashTable *color_hash;
+	GtkSettings *settings;
+	GtkWidget *container;
+	GtkWidget *widget;
+	GtkWidget *label;
+	const GdkColor *color;
+	gchar *markup;
+
+	option = &table->priv->options[type];
+
+	settings = gtk_settings_get_default ();
+	g_object_get (settings, "color-hash", &color_hash, NULL);
+	color = g_hash_table_lookup (color_hash, "tooltip_bg_color");
+
+	widget = gtk_frame_new (NULL);
+	gtk_frame_set_shadow_type (GTK_FRAME (widget), GTK_SHADOW_IN);
+	gtk_widget_modify_bg (widget, GTK_STATE_NORMAL, color);
+	option->container = g_object_ref_sink (widget);
+	gtk_widget_hide (widget);
+
+	container = widget;
+
+	widget = gtk_event_box_new ();
+	gtk_widget_modify_bg (widget, GTK_STATE_NORMAL, color);
+	gtk_container_add (GTK_CONTAINER (container), widget);
+	gtk_widget_show (widget);
+
+	container = widget;
+
+	widget = gtk_hbox_new (FALSE, 0);
+	gtk_container_add (GTK_CONTAINER (container), widget);
+	gtk_widget_show (widget);
+
+	container = widget;
+
+	widget = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
+	gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 3);
+	gtk_size_group_add_widget (icon_size_group, widget);
+	gtk_widget_show (widget);
+
+	widget = gtk_label_new (description);
+	gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.5);
+	gtk_label_set_ellipsize (GTK_LABEL (widget), PANGO_ELLIPSIZE_END);
+	gtk_box_pack_start (GTK_BOX (container), widget, TRUE, TRUE, 3);
+	gtk_widget_show (widget);
+
+	label = gtk_label_new (NULL);
+	markup = g_markup_printf_escaped ("<small>%s</small>", button_label);
+	gtk_label_set_markup (GTK_LABEL (label), markup);
+	gtk_widget_show (label);
+	g_free (markup);
+
+	widget = gtk_button_new ();
+	gtk_container_add (GTK_CONTAINER (widget), label);
+	gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 3);
+	gtk_size_group_add_widget (button_size_group, widget);
+	gtk_widget_show (widget);
+
+	g_signal_connect_swapped (
+		widget, "clicked",
+		G_CALLBACK (composer_option_button_clicked_cb), option);
+
+	g_hash_table_unref (color_hash);
+}
+
+static void
+composer_option_table_dispose (GObject *object)
+{
+	EComposerOptionTablePrivate *priv;
+	gint ii;
+
+	priv = E_COMPOSER_OPTION_TABLE_GET_PRIVATE (object);
+
+	for (ii = 0; ii < E_COMPOSER_NUM_OPTIONS; ii++) {
+		EComposerOption *option = &priv->options[ii];
+
+		if (option->action != NULL) {
+			g_signal_handlers_disconnect_matched (
+				option->action, G_SIGNAL_MATCH_FUNC, 0, 0,
+				NULL, composer_option_action_toggled_cb, NULL);
+			g_object_unref (option->action);
+			option->action = NULL;
+		}
+
+		if (option->container != NULL) {
+			g_object_unref (option->container);
+			option->container = NULL;
+		}
+	}
+
+	/* Chain up to parent's dispose() method. */
+	G_OBJECT_CLASS (parent_class)->dispose (object);
+}
+
+static void
+composer_option_table_class_init (EComposerOptionTableClass *class)
+{
+	GObjectClass *object_class;
+
+	parent_class = g_type_class_peek_parent (class);
+	g_type_class_add_private (class, sizeof (EComposerOptionTablePrivate));
+
+	object_class = G_OBJECT_CLASS (class);
+	object_class->dispose = composer_option_table_dispose;
+}
+
+static void
+composer_option_table_init (EComposerOptionTable *table)
+{
+	GtkSizeGroup *icon_size_group;
+	GtkSizeGroup *button_size_group;
+	gint ii;
+
+	table->priv = E_COMPOSER_OPTION_TABLE_GET_PRIVATE (table);
+
+	icon_size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
+	button_size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
+
+	gtk_box_set_spacing (GTK_BOX (table), 3);
+	gtk_box_set_homogeneous (GTK_BOX (table), TRUE);
+
+	composer_option_table_create_option (
+		table, E_COMPOSER_OPTION_PRIORITIZE_MESSAGE,
+		icon_size_group, button_size_group,
+		"emblem-important",
+		_("This is a high priority message."),
+		_("Remove Priority"));
+
+	composer_option_table_create_option (
+		table, E_COMPOSER_OPTION_REQUEST_READ_RECEIPT,
+		icon_size_group, button_size_group,
+		"mail-read",
+		_("You are requesting a read receipt for this message."),
+		_("Remove Request"));
+
+	composer_option_table_create_option (
+		table, E_COMPOSER_OPTION_PGP_ENCRYPT,
+		icon_size_group, button_size_group,
+		"security-high",
+		_("This message will be encrypted with your PGP key."),
+		_("Do Not Encrypt"));
+
+	composer_option_table_create_option (
+		table, E_COMPOSER_OPTION_PGP_SIGN,
+		icon_size_group, button_size_group,
+		"mail-signed",
+		_("This message will be signed with your PGP key."),
+		_("Do Not Sign"));
+
+	composer_option_table_create_option (
+		table, E_COMPOSER_OPTION_SMIME_ENCRYPT,
+		icon_size_group, button_size_group,
+		"security-high",
+		_("This message will be encrypted with your S/MIME "
+		  "encryption certificate."),
+		_("Do Not Encrypt"));
+
+	composer_option_table_create_option (
+		table, E_COMPOSER_OPTION_SMIME_SIGN,
+		icon_size_group, button_size_group,
+		"mail-signed",
+		_("This message will be signed with your S/MIME "
+		  "signing certificate."),
+		_("Do Not Sign"));
+
+	for (ii = 0; ii < E_COMPOSER_NUM_OPTIONS; ii++)
+		gtk_box_pack_start (
+			GTK_BOX (table),
+			table->priv->options[ii].container,
+			FALSE, FALSE, 0);
+
+	g_object_unref (icon_size_group);
+	g_object_unref (button_size_group);
+}
+
+GType
+e_composer_option_table_get_type (void)
+{
+	static GType type = 0;
+
+	if (G_UNLIKELY (type == 0)) {
+		static const GTypeInfo type_info = {
+			sizeof (EComposerOptionTableClass),
+			(GBaseInitFunc) NULL,
+			(GBaseFinalizeFunc) NULL,
+			(GClassInitFunc) composer_option_table_class_init,
+			(GClassFinalizeFunc) NULL,
+			NULL,  /* class_data */
+			sizeof (EComposerOptionTable),
+			0,     /* n_preallocs */
+			(GInstanceInitFunc) composer_option_table_init,
+			NULL   /* value_table */
+		};
+
+		type = g_type_register_static (
+			GTK_TYPE_VBOX, "EComposerOptionTable", &type_info, 0);
+	}
+
+	return type;
+}
+
+GtkWidget *
+e_composer_option_table_new (void)
+{
+	return g_object_new (E_TYPE_COMPOSER_OPTION_TABLE, NULL);
+}
+
+gboolean
+e_composer_option_table_get_option_visible (EComposerOptionTable *table,
+                                            EComposerOptionType type)
+{
+	EComposerOption *option;
+
+	g_return_val_if_fail (E_IS_COMPOSER_OPTION_TABLE (table), FALSE);
+	g_return_val_if_fail (type < E_COMPOSER_NUM_OPTIONS, FALSE);
+	g_return_val_if_fail (type >= 0, FALSE);
+
+	option = &table->priv->options[type];
+
+	return GTK_WIDGET_VISIBLE (option->container);
+}
+
+void
+e_composer_option_table_set_option_visible (EComposerOptionTable *table,
+                                            EComposerOptionType type,
+                                            gboolean visible)
+{
+	EComposerOption *option;
+
+	g_return_if_fail (E_IS_COMPOSER_OPTION_TABLE (table));
+	g_return_if_fail (type < E_COMPOSER_NUM_OPTIONS);
+	g_return_if_fail (type >= 0);
+
+	option = &table->priv->options[type];
+
+	if (visible)
+		gtk_widget_show (option->container);
+	else
+		gtk_widget_hide (option->container);
+}
+
+GtkToggleAction *
+e_composer_option_table_get_toggle_action (EComposerOptionTable *table,
+                                           EComposerOptionType type)
+{
+	EComposerOption *option;
+
+	g_return_val_if_fail (E_IS_COMPOSER_OPTION_TABLE (table), FALSE);
+	g_return_val_if_fail (type < E_COMPOSER_NUM_OPTIONS, FALSE);
+	g_return_val_if_fail (type >= 0, FALSE);
+
+	option = &table->priv->options[type];
+
+	return option->action;
+}
+
+void
+e_composer_option_table_set_toggle_action (EComposerOptionTable *table,
+                                           EComposerOptionType type,
+                                           GtkToggleAction *action)
+{
+	EComposerOption *option;
+	gboolean active;
+
+	g_return_if_fail (E_IS_COMPOSER_OPTION_TABLE (table));
+	g_return_if_fail (type < E_COMPOSER_NUM_OPTIONS);
+	g_return_if_fail (type >= 0);
+
+	if (action != NULL)
+		g_return_if_fail (GTK_IS_TOGGLE_ACTION (action));
+
+	option = &table->priv->options[type];
+
+	if (option->action != NULL) {
+		g_signal_handlers_disconnect_matched (
+			option->action, G_SIGNAL_MATCH_FUNC, 0, 0,
+			NULL, composer_option_action_toggled_cb, NULL);
+		g_object_unref (option->action);
+		option->action = NULL;
+	}
+
+	if (action == NULL)
+		return;
+
+	option->action = g_object_ref (action);
+	active = gtk_toggle_action_get_active (action);
+	e_composer_option_table_set_option_visible (table, type, active);
+
+	g_signal_connect_swapped (
+		action, "toggled",
+		G_CALLBACK (composer_option_action_toggled_cb),
+		option);
+}
Index: composer/e-composer-option-table.h
===================================================================
--- composer/e-composer-option-table.h	(revision 0)
+++ composer/e-composer-option-table.h	(revision 0)
@@ -0,0 +1,88 @@
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>  
+ *
+ * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
+ */
+
+#ifndef E_COMPOSER_OPTION_TABLE_H
+#define E_COMPOSER_OPTION_TABLE_H
+
+#include "e-composer-common.h"
+
+/* Standard GObject macros */
+#define E_TYPE_COMPOSER_OPTION_TABLE \
+	(e_composer_option_table_get_type ())
+#define E_COMPOSER_OPTION_TABLE(obj) \
+	(G_TYPE_CHECK_INSTANCE_CAST \
+	((obj), E_TYPE_COMPOSER_OPTION_TABLE, EComposerOptionTable))
+#define E_COMPOSER_OPTION_TABLE_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_CAST \
+	((cls), E_TYPE_COMPOSER_OPTION_TABLE, EComposerOptionTableClass))
+#define E_IS_COMPOSER_OPTION_TABLE(obj) \
+	(G_TYPE_CHECK_INSTANCE_TYPE \
+	((obj), E_TYPE_COMPOSER_OPTION_TABLE))
+#define E_IS_COMPOSER_OPTION_TABLE_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_TYPE \
+	((cls), E_TYPE_COMPOSER_OPTION_TABLE))
+#define E_COMPOSER_OPTION_TABLE_GET_CLASS(obj) \
+	(G_TYPE_INSTANCE_GET_CLASS \
+	((obj), E_TYPE_COMPOSER_OPTION_TABLE, EComposerOptionTableClass))
+
+G_BEGIN_DECLS
+
+typedef struct _EComposerOptionTable EComposerOptionTable;
+typedef struct _EComposerOptionTableClass EComposerOptionTableClass;
+typedef struct _EComposerOptionTablePrivate EComposerOptionTablePrivate;
+
+/* Options, listed in the order they should appear in the table. */
+typedef enum {
+	E_COMPOSER_OPTION_PRIORITIZE_MESSAGE,
+	E_COMPOSER_OPTION_REQUEST_READ_RECEIPT,
+	E_COMPOSER_OPTION_PGP_ENCRYPT,
+	E_COMPOSER_OPTION_PGP_SIGN,
+	E_COMPOSER_OPTION_SMIME_ENCRYPT,
+	E_COMPOSER_OPTION_SMIME_SIGN,
+	E_COMPOSER_NUM_OPTIONS
+} EComposerOptionType;
+
+struct _EComposerOptionTable {
+	GtkVBox parent;
+	EComposerOptionTablePrivate *priv;
+};
+
+struct _EComposerOptionTableClass {
+	GtkVBoxClass parent_class;
+};
+
+GType		e_composer_option_table_get_type(void);
+GtkWidget *	e_composer_option_table_new	(void);
+gboolean	e_composer_option_table_get_option_visible
+						(EComposerOptionTable *table,
+						 EComposerOptionType type);
+void		e_composer_option_table_set_option_visible
+						(EComposerOptionTable *table,
+						 EComposerOptionType type,
+						 gboolean visible);
+GtkToggleAction *
+		e_composer_option_table_get_toggle_action
+						(EComposerOptionTable *table,
+						 EComposerOptionType type);
+void		e_composer_option_table_set_toggle_action
+						(EComposerOptionTable *table,
+						 EComposerOptionType type,
+						 GtkToggleAction *action);
+
+G_END_DECLS
+
+#endif /* E_COMPOSER_OPTION_TABLE_H */
Index: composer/e-composer-private.c
===================================================================
--- composer/e-composer-private.c	(revision 36714)
+++ composer/e-composer-private.c	(working copy)
@@ -143,6 +143,42 @@ e_composer_private_init (EMsgComposer *c
 	priv->header_table = g_object_ref (widget);
 	gtk_widget_show (widget);
 
+	/* Construct the option table. */
+
+	widget = e_composer_option_table_new ();
+	gtk_box_pack_start (GTK_BOX (editor->vbox), widget, FALSE, FALSE, 0);
+	gtk_widget_show (widget);
+
+	e_composer_option_table_set_toggle_action (
+		E_COMPOSER_OPTION_TABLE (widget),
+		E_COMPOSER_OPTION_PRIORITIZE_MESSAGE,
+		GTK_TOGGLE_ACTION (ACTION (PRIORITIZE_MESSAGE)));
+
+	e_composer_option_table_set_toggle_action (
+		E_COMPOSER_OPTION_TABLE (widget),
+		E_COMPOSER_OPTION_REQUEST_READ_RECEIPT,
+		GTK_TOGGLE_ACTION (ACTION (REQUEST_READ_RECEIPT)));
+
+	e_composer_option_table_set_toggle_action (
+		E_COMPOSER_OPTION_TABLE (widget),
+		E_COMPOSER_OPTION_PGP_ENCRYPT,
+		GTK_TOGGLE_ACTION (ACTION (PGP_ENCRYPT)));
+
+	e_composer_option_table_set_toggle_action (
+		E_COMPOSER_OPTION_TABLE (widget),
+		E_COMPOSER_OPTION_PGP_SIGN,
+		GTK_TOGGLE_ACTION (ACTION (PGP_SIGN)));
+
+	e_composer_option_table_set_toggle_action (
+		E_COMPOSER_OPTION_TABLE (widget),
+		E_COMPOSER_OPTION_SMIME_ENCRYPT,
+		GTK_TOGGLE_ACTION (ACTION (SMIME_ENCRYPT)));
+
+	e_composer_option_table_set_toggle_action (
+		E_COMPOSER_OPTION_TABLE (widget),
+		E_COMPOSER_OPTION_SMIME_SIGN,
+		GTK_TOGGLE_ACTION (ACTION (SMIME_SIGN)));
+
 	/* Construct attachment widgets.
 	 * XXX Move this stuff into a new custom widget. */
 
Index: composer/e-composer-private.h
===================================================================
--- composer/e-composer-private.h	(revision 36714)
+++ composer/e-composer-private.h	(working copy)
@@ -29,6 +29,7 @@
 #include "e-composer-actions.h"
 #include "e-composer-autosave.h"
 #include "e-composer-header-table.h"
+#include "e-composer-option-table.h"
 #include "e-util/gconf-bridge.h"
 
 #define E_MSG_COMPOSER_GET_PRIVATE(obj) \
Index: composer/Makefile.am
===================================================================
--- composer/Makefile.am	(revision 36714)
+++ composer/Makefile.am	(working copy)
@@ -40,6 +40,8 @@ libcomposer_la_SOURCES = 			\
 	e-composer-from-header.h		\
 	e-composer-name-header.c		\
 	e-composer-name-header.h		\
+	e-composer-option-table.c		\
+	e-composer-option-table.h		\
 	e-composer-post-header.c		\
 	e-composer-post-header.h		\
 	e-composer-private.c			\
