diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-05-21 00:57:56 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-05-21 00:57:56 +0800 |
commit | 292aea67a7f3f1d194ef60214d482881f54ab083 (patch) | |
tree | 268d5e8e59a0354f744189f5849fa0bfd3d2f4c3 /composer/e-composer-private.c | |
parent | 432c803741d14c6f5f5316544248d23f85c595c4 (diff) | |
parent | a1f287ca6bf35d27e5dcb9b89a10f76e9abbd057 (diff) | |
download | gsoc2013-evolution-292aea67a7f3f1d194ef60214d482881f54ab083.tar gsoc2013-evolution-292aea67a7f3f1d194ef60214d482881f54ab083.tar.gz gsoc2013-evolution-292aea67a7f3f1d194ef60214d482881f54ab083.tar.bz2 gsoc2013-evolution-292aea67a7f3f1d194ef60214d482881f54ab083.tar.lz gsoc2013-evolution-292aea67a7f3f1d194ef60214d482881f54ab083.tar.xz gsoc2013-evolution-292aea67a7f3f1d194ef60214d482881f54ab083.tar.zst gsoc2013-evolution-292aea67a7f3f1d194ef60214d482881f54ab083.zip |
Merge branch '274117-compoer-view-fields'
Diffstat (limited to 'composer/e-composer-private.c')
-rw-r--r-- | composer/e-composer-private.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c index 1729aae9fa..fe5b66ceee 100644 --- a/composer/e-composer-private.c +++ b/composer/e-composer-private.c @@ -90,6 +90,7 @@ e_composer_private_init (EMsgComposer *composer) GtkWidget *send_widget; const gchar *path; gchar *filename; + gint ii; GError *error = NULL; editor = GTKHTML_EDITOR (composer); @@ -165,6 +166,46 @@ e_composer_private_init (EMsgComposer *composer) GTK_BOX (container), widget, TRUE, TRUE, 0, GTK_PACK_START); composer_setup_recent_menu (composer); + + /* Bind headers to their corresponding actions. */ + + for (ii = 0; ii < E_COMPOSER_NUM_HEADERS; ii++) { + EComposerHeaderTable *table; + EComposerHeader *header; + GtkAction *action; + + table = E_COMPOSER_HEADER_TABLE (priv->header_table); + header = e_composer_header_table_get_header (table, ii); + + switch (ii) { + case E_COMPOSER_HEADER_BCC: + action = ACTION (VIEW_BCC); + break; + + case E_COMPOSER_HEADER_CC: + action = ACTION (VIEW_CC); + break; + + case E_COMPOSER_HEADER_FROM: + action = ACTION (VIEW_FROM); + break; + + case E_COMPOSER_HEADER_REPLY_TO: + action = ACTION (VIEW_REPLY_TO); + break; + + default: + continue; + } + + e_mutual_binding_new ( + G_OBJECT (header), "sensitive", + G_OBJECT (action), "sensitive"); + + e_mutual_binding_new ( + G_OBJECT (header), "visible", + G_OBJECT (action), "active"); + } } void |