aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichel Danzer <daenzer@debian.org>2008-04-03 21:39:28 +0800
committerMilan Crha <mcrha@src.gnome.org>2008-04-03 21:39:28 +0800
commita861e09f792c333c483c32219b99a40f0bd9750b (patch)
tree2594803d2fd2838daa7dc01e3d6c76e4b02b558f
parent457bb2d46718026ff205dfe93d582f44c000534c (diff)
downloadgsoc2013-evolution-a861e09f792c333c483c32219b99a40f0bd9750b.tar.gz
gsoc2013-evolution-a861e09f792c333c483c32219b99a40f0bd9750b.tar.zst
gsoc2013-evolution-a861e09f792c333c483c32219b99a40f0bd9750b.zip
** Fix for bug #525522
2008-04-03 Michel Danzer <daenzer@debian.org> ** Fix for bug #525522 * e-msg-composer-hdrs.c: (hdrs_changed), (from_changed), (subject_changed), (msg_composer_hdrs_init): Hook signals to notice changes in headers and subject line. svn path=/branches/gnome-2-22/; revision=35315
-rw-r--r--composer/ChangeLog8
-rw-r--r--composer/e-msg-composer-hdrs.c33
2 files changed, 41 insertions, 0 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index f630340f75..41118a669d 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,11 @@
+2008-04-03 Michel Danzer <daenzer@debian.org>
+
+ ** Fix for bug #525522
+
+ * e-msg-composer-hdrs.c: (hdrs_changed), (from_changed),
+ (subject_changed), (msg_composer_hdrs_init):
+ Hook signals to notice changes in headers and subject line.
+
2008-02-25 Johny Jacob <jjohnny@novell.com>
* e-msg-composer.c (e_msg_composer_show_sig_file): Reverting
diff --git a/composer/e-msg-composer-hdrs.c b/composer/e-msg-composer-hdrs.c
index 471cc40dc2..990a26ea8b 100644
--- a/composer/e-msg-composer-hdrs.c
+++ b/composer/e-msg-composer-hdrs.c
@@ -87,6 +87,12 @@ static gpointer parent_class;
static guint signal_ids[LAST_SIGNAL];
static void
+hdrs_changed (EMsgComposerHdrs *hdrs)
+{
+ g_signal_emit (hdrs, signal_ids[HDRS_CHANGED], 0);
+}
+
+static void
from_changed (EComposerFromHeader *from_header, EMsgComposerHdrs *hdrs)
{
EComposerHeader *header;
@@ -105,6 +111,7 @@ from_changed (EComposerFromHeader *from_header, EMsgComposerHdrs *hdrs)
E_COMPOSER_TEXT_HEADER (header), account->id->reply_to);
g_signal_emit (hdrs, signal_ids[FROM_CHANGED], 0);
+ hdrs_changed (hdrs);
}
static void
@@ -114,6 +121,14 @@ signature_changed (EMsgComposerHdrs *hdrs)
}
static void
+subject_changed (EMsgComposerHdrs *hdrs)
+{
+ g_signal_emit (hdrs, signal_ids[SUBJECT_CHANGED], 0,
+ e_msg_composer_hdrs_get_subject (hdrs));
+ hdrs_changed (hdrs);
+}
+
+static void
headers_set_visibility (EMsgComposerHdrs *h, int visible_flags)
{
EMsgComposerHdrsPrivate *p = h->priv;
@@ -330,17 +345,26 @@ msg_composer_hdrs_init (EMsgComposerHdrs *hdrs)
hdrs->priv->headers[HEADER_FROM] = header;
header = e_composer_text_header_new_label (_("_Reply-To:"));
+ g_signal_connect_swapped (
+ header, "changed",
+ G_CALLBACK (hdrs_changed), hdrs);
hdrs->priv->headers[HEADER_REPLY_TO] = header;
header = e_composer_name_header_new (_("_To:"), name_selector);
e_composer_header_set_input_tooltip (
header, _("Enter the recipients of the message"));
+ g_signal_connect_swapped (
+ header, "changed",
+ G_CALLBACK (hdrs_changed), hdrs);
hdrs->priv->headers[HEADER_TO] = header;
header = e_composer_name_header_new (_("_Cc:"), name_selector);
e_composer_header_set_input_tooltip (
header, _("Enter the addresses that will receive a "
"carbon copy of the message"));
+ g_signal_connect_swapped (
+ header, "changed",
+ G_CALLBACK (hdrs_changed), hdrs);
hdrs->priv->headers[HEADER_CC] = header;
header = e_composer_name_header_new (_("_Bcc:"), name_selector);
@@ -348,12 +372,21 @@ msg_composer_hdrs_init (EMsgComposerHdrs *hdrs)
header, _("Enter the addresses that will receive a "
"carbon copy of the message without appearing in the "
"recipient list of the message"));
+ g_signal_connect_swapped (
+ header, "changed",
+ G_CALLBACK (hdrs_changed), hdrs);
hdrs->priv->headers[HEADER_BCC] = header;
header = e_composer_post_header_new (_("_Post To:"));
+ g_signal_connect_swapped (
+ header, "changed",
+ G_CALLBACK (hdrs_changed), hdrs);
hdrs->priv->headers[HEADER_POST_TO] = header;
header = e_composer_text_header_new_label (_("S_ubject:"));
+ g_signal_connect_swapped (
+ header, "changed",
+ G_CALLBACK (subject_changed), hdrs);
hdrs->priv->headers[HEADER_SUBJECT] = header;
/* Do this after all the headers are initialized. */