aboutsummaryrefslogtreecommitdiffstats
path: root/composer/e-composer-private.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-05-21 00:02:30 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-05-21 00:56:55 +0800
commita1f287ca6bf35d27e5dcb9b89a10f76e9abbd057 (patch)
treecfc2fe1694a379a53e533d19edcf1205e55d54e5 /composer/e-composer-private.c
parentacabcb0be8e3c983e3400d7f7436f618e0000cfe (diff)
downloadgsoc2013-evolution-a1f287ca6bf35d27e5dcb9b89a10f76e9abbd057.tar
gsoc2013-evolution-a1f287ca6bf35d27e5dcb9b89a10f76e9abbd057.tar.gz
gsoc2013-evolution-a1f287ca6bf35d27e5dcb9b89a10f76e9abbd057.tar.bz2
gsoc2013-evolution-a1f287ca6bf35d27e5dcb9b89a10f76e9abbd057.tar.lz
gsoc2013-evolution-a1f287ca6bf35d27e5dcb9b89a10f76e9abbd057.tar.xz
gsoc2013-evolution-a1f287ca6bf35d27e5dcb9b89a10f76e9abbd057.tar.zst
gsoc2013-evolution-a1f287ca6bf35d27e5dcb9b89a10f76e9abbd057.zip
Bug 274117 – Difficult to post a new message to newsgroups
Completely rewrite how composer headers are managed. There's now two sets of headers (with some overlap): one set is for sending an email message, the other is for posting to a newsgroup. The correct set of headers is chosen on-the-fly based on the currently selected account type. The user's "view" preferences for these two sets are stored separately, so that switching between an email account and a news account will no longer stomp on your preferences. This also eliminates the need for the "Post New Message to Folder" and "Post a Reply" actions, so they've been removed. Usenet users can now just highlight a newsgroup in the folder tree and click New or Reply, and the composer window will show the correct set of headers with the Post-To field filled in automatically. Comment #6 in the bug discusses other standard news reader behaviors we still don't get right, particularly the missing "Followup To" header. These will be dealt with separately.
Diffstat (limited to 'composer/e-composer-private.c')
-rw-r--r--composer/e-composer-private.c41
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