aboutsummaryrefslogtreecommitdiffstats
path: root/composer/e-composer-name-header.c
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@novell.com>2009-05-22 19:30:53 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-05-24 22:12:26 +0800
commitc0b6183c73fc170913bba39e65794af3f596e30e (patch)
tree324e54cabe50fcbff2fd76ad51b6fbcc7f6f7598 /composer/e-composer-name-header.c
parent2ea8d8f1930bdc7f30e8556d6abeca33eb263af6 (diff)
downloadgsoc2013-evolution-c0b6183c73fc170913bba39e65794af3f596e30e.tar.gz
gsoc2013-evolution-c0b6183c73fc170913bba39e65794af3f596e30e.tar.zst
gsoc2013-evolution-c0b6183c73fc170913bba39e65794af3f596e30e.zip
Johnny's composer changes for Anjal.
Diffstat (limited to 'composer/e-composer-name-header.c')
-rw-r--r--composer/e-composer-name-header.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/composer/e-composer-name-header.c b/composer/e-composer-name-header.c
index a6618fdb4a..1f9fc9fe8d 100644
--- a/composer/e-composer-name-header.c
+++ b/composer/e-composer-name-header.c
@@ -105,10 +105,12 @@ composer_name_header_constructor (GType type,
entry = E_NAME_SELECTOR_ENTRY (
e_name_selector_peek_section_list (
priv->name_selector, label));
+
e_name_selector_entry_set_contact_editor_func (
entry, e_contact_editor_new);
e_name_selector_entry_set_contact_list_editor_func (
entry, e_contact_list_editor_new);
+
g_signal_connect (
entry, "changed",
G_CALLBACK (composer_name_header_entry_changed_cb), object);
@@ -264,6 +266,32 @@ e_composer_name_header_new (const gchar *label,
"button", TRUE, "name-selector", name_selector, NULL);
}
+EComposerHeader *
+e_composer_name_header_new_with_label (const gchar *label,
+ ENameSelector *name_selector)
+{
+ return g_object_new (
+ E_TYPE_COMPOSER_NAME_HEADER, "label", label,
+ "button", FALSE, "name-selector", name_selector,
+ "addaction", FALSE, "visible", TRUE,
+ NULL);
+}
+
+EComposerHeader *
+e_composer_name_header_new_with_action (const gchar *label,
+ const gchar *action_label,
+ ENameSelector *name_selector)
+{
+ g_return_val_if_fail (E_IS_NAME_SELECTOR (name_selector), NULL);
+
+ return g_object_new (
+ E_TYPE_COMPOSER_NAME_HEADER, "label", label,
+ "button", FALSE, "name-selector", name_selector,
+ "addaction_text", action_label,
+ "addaction", action_label != NULL,
+ NULL);
+}
+
ENameSelector *
e_composer_name_header_get_name_selector (EComposerNameHeader *header)
{