aboutsummaryrefslogtreecommitdiffstats
path: root/composer/e-composer-header-table.c
diff options
context:
space:
mode:
Diffstat (limited to 'composer/e-composer-header-table.c')
-rw-r--r--composer/e-composer-header-table.c54
1 files changed, 54 insertions, 0 deletions
diff --git a/composer/e-composer-header-table.c b/composer/e-composer-header-table.c
index d659e5290f..1954e92f47 100644
--- a/composer/e-composer-header-table.c
+++ b/composer/e-composer-header-table.c
@@ -80,6 +80,7 @@ enum {
PROP_DESTINATIONS_BCC,
PROP_DESTINATIONS_CC,
PROP_DESTINATIONS_TO,
+ PROP_MODEL,
PROP_POST_TO,
PROP_REPLY_TO,
PROP_SIGNATURE,
@@ -92,6 +93,7 @@ struct _EComposerHeaderTablePrivate {
GtkWidget *signature_label;
GtkWidget *signature_combo_box;
ENameSelector *name_selector;
+ EMFolderTreeModel *model;
};
static gpointer parent_class;
@@ -346,6 +348,12 @@ composer_header_table_set_property (GObject *object,
e_destination_freev (destinations);
return;
+ case PROP_MODEL:
+ e_composer_header_table_set_folder_tree_model (
+ E_COMPOSER_HEADER_TABLE (object),
+ g_value_get_object (value));
+ return;
+
case PROP_POST_TO:
list = g_value_dup_string_list (value);
e_composer_header_table_set_post_to_list (
@@ -437,6 +445,13 @@ composer_header_table_get_property (GObject *object,
e_destination_freev (destinations);
return;
+ case PROP_MODEL:
+ g_value_set_object (
+ value,
+ e_composer_header_table_get_folder_tree_model (
+ E_COMPOSER_HEADER_TABLE (object)));
+ return;
+
case PROP_POST_TO:
list = e_composer_header_table_get_post_to (
E_COMPOSER_HEADER_TABLE (object));
@@ -502,6 +517,11 @@ composer_header_table_dispose (GObject *object)
priv->name_selector = NULL;
}
+ if (priv->model != NULL) {
+ g_object_unref (priv->model);
+ priv->model = NULL;
+ }
+
/* Chain up to parent's dispose() method. */
G_OBJECT_CLASS (parent_class)->dispose (object);
}
@@ -591,6 +611,17 @@ composer_header_table_class_init (EComposerHeaderTableClass *class)
g_object_class_install_property (
object_class,
+ PROP_MODEL,
+ g_param_spec_object (
+ "model",
+ NULL,
+ NULL,
+ EM_TYPE_FOLDER_TREE_MODEL,
+ G_PARAM_READWRITE |
+ G_PARAM_CONSTRUCT_ONLY));
+
+ g_object_class_install_property (
+ object_class,
PROP_REPLY_TO,
g_param_spec_string (
"reply-to",
@@ -971,6 +1002,29 @@ e_composer_header_table_set_destinations_to (EComposerHeaderTable *table,
e_composer_name_header_set_destinations (header, destinations);
}
+EMFolderTreeModel *
+e_composer_header_table_get_folder_tree_model (EComposerHeaderTable *table)
+{
+ EComposerPostHeader *header;
+
+ g_return_val_if_fail (E_IS_COMPOSER_HEADER_TABLE (table), NULL);
+
+ header = E_COMPOSER_HEADER_TABLE_GET_POST_TO_HEADER (table);
+ return e_composer_post_header_get_folder_tree_model (header);
+}
+
+void
+e_composer_header_table_set_folder_tree_model (EComposerHeaderTable *table,
+ EMFolderTreeModel *model)
+{
+ EComposerPostHeader *header;
+
+ g_return_if_fail (E_IS_COMPOSER_HEADER_TABLE (table));
+
+ header = E_COMPOSER_HEADER_TABLE_GET_POST_TO_HEADER (table);
+ e_composer_post_header_set_folder_tree_model (header, model);
+}
+
GList *
e_composer_header_table_get_post_to (EComposerHeaderTable *table)
{